summaryrefslogtreecommitdiffstats
path: root/emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-03-23 11:14:27 +0100
committerGravatar Tom Willemsen2011-03-23 11:14:27 +0100
commit0d342f0aee3f2f800e486c0051dabe718a7b2841 (patch)
tree1f55afabb8f4876dbe564f7ed5d8e573ddc78df3 /emacs.d
parentd4510153b17625a3dd2f1852cc6392fc26efecf6 (diff)
downloaddotfiles-0d342f0aee3f2f800e486c0051dabe718a7b2841.tar.gz
dotfiles-0d342f0aee3f2f800e486c0051dabe718a7b2841.zip
I don't like nxhtml
Diffstat (limited to 'emacs.d')
-rw-r--r--emacs.d/10-modules.el2
-rw-r--r--emacs.d/elisp/php-mode-improved.el (renamed from emacs.d/nxhtml/related/php-mode.el)600
-rw-r--r--emacs.d/elisp/php-mode.el291
-rw-r--r--emacs.d/nxhtml/README.txt46
-rw-r--r--emacs.d/nxhtml/alts/find-recursive-orig.el137
-rw-r--r--emacs.d/nxhtml/alts/javascript-mozlab.el712
-rw-r--r--emacs.d/nxhtml/alts/smarty-mode-vdebout.el2715
-rw-r--r--emacs.d/nxhtml/autostart.el194
-rw-r--r--emacs.d/nxhtml/autostart22.el71
-rw-r--r--emacs.d/nxhtml/emacs22.cmd1
-rw-r--r--emacs.d/nxhtml/etc/img/pause/pause.jpgbin25849 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/etc/img/pause/pause2.jpgbin26756 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.docbin47104 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/etc/schema/genshi-old.rnc27
-rw-r--r--emacs.d/nxhtml/etc/schema/genshi-schemas.xml3
-rw-r--r--emacs.d/nxhtml/etc/schema/genshi.rnc84
-rw-r--r--emacs.d/nxhtml/etc/schema/mjt.rnc74
-rw-r--r--emacs.d/nxhtml/etc/schema/nxml-erb.patch37
-rw-r--r--emacs.d/nxhtml/etc/schema/old-genshi.rnc31
-rw-r--r--emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc61
-rw-r--r--emacs.d/nxhtml/etc/schema/old-xinclude.rnc11
-rw-r--r--emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc58
-rw-r--r--emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc66
-rw-r--r--emacs.d/nxhtml/etc/schema/schema-path-patch.el95
-rw-r--r--emacs.d/nxhtml/etc/schema/xinclude.rnc35
-rw-r--r--emacs.d/nxhtml/etc/templates/rollover-2v.css25
-rw-r--r--emacs.d/nxhtml/etc/uts39/idnchars.txt894
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/0intro59
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/1basics187
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/2moving269
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/3cutpaste318
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/4inserting180
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/5tricks229
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/README49
-rw-r--r--emacs.d/nxhtml/etc/viper-tut/outline131
-rw-r--r--emacs.d/nxhtml/nxhtml-base.el150
-rw-r--r--emacs.d/nxhtml/nxhtml-loaddefs.el4502
-rw-r--r--emacs.d/nxhtml/nxhtml-web-vcs.el689
-rw-r--r--emacs.d/nxhtml/nxhtml/ChangeLog17
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/demo.html71
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/html2xhtml.html39
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html424
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpgbin40927 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpgbin17430 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpgbin67205 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpgbin14954 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/butterflies.pngbin65893 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcfbin87456 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpgbin44390 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/divine2.jpgbin69985 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/edit-part.pngbin23263 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.pngbin7237 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcfbin15415 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.pngbin23199 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/emacsP.pngbin1882 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/emacsP16.pngbin694 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/embedded-css.pngbin14019 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.pngbin17326 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.pngbin7894 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.pngbin17590 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.pngbin40042 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.pngbin1931 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcfbin5446 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.pngbin1276 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.pngbin1324 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcfbin5988 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpgbin20966 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpgbin24042 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.pngbin14720 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.pngbin7124 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/nxml-where.pngbin17217 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.pngbin23203 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.pngbin22179 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/php-in-php.pngbin21113 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.pngbin21510 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/popup-compl.pngbin8709 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpgbin36480 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.pngbin3122 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.pngbin27193 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/region-selected.pngbin3662 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpgbin52583 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.pngbin19275 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.pngbin1485 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.pngbin1520 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.pngbin1347 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcfbin3484 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/validation-error.pngbin2293 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/volga.jpgbin34027 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.pngbin23172 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gifbin243 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gifbin241 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gifbin1035 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.pngbin2626 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gifbin974 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.pngbin2889 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gifbin10814 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gifbin489 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.pngbin1258 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css238
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css91
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js449
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.js2
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js4078
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/nxhtml-changes.html3395
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/nxhtml.css171
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/nxhtml.html987
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/wd/grapes/grapes.css107
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/bkgrnd.gifbin974 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/grapes.jpgbin24419 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/quote.gifbin643 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/wd/grapes/index.html76
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/wd/grapes/nxhtml-grapes.css252
-rw-r--r--emacs.d/nxhtml/nxhtml/doc/working-demo.html60
-rw-r--r--emacs.d/nxhtml/nxhtml/html-chklnk.el168
-rw-r--r--emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm774
-rw-r--r--emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm448
-rw-r--r--emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/datadir.txt1
-rw-r--r--emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/PathSubs.pm207
-rw-r--r--emacs.d/nxhtml/nxhtml/html-chklnk/link_checker.pl328
-rw-r--r--emacs.d/nxhtml/nxhtml/html-imenu.el101
-rw-r--r--emacs.d/nxhtml/nxhtml/html-move.el251
-rw-r--r--emacs.d/nxhtml/nxhtml/html-pagetoc.el336
-rw-r--r--emacs.d/nxhtml/nxhtml/html-quote.el71
-rw-r--r--emacs.d/nxhtml/nxhtml/html-site.el801
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc.el363
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc-template.html83
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css141
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css84
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js361
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gifbin825 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gifbin853 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gifbin913 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.pngbin1957 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcfbin22466 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gifbin917 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gifbin917 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gifbin1100 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gifbin857 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gifbin1118 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gifbin909 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-upl.el329
-rw-r--r--emacs.d/nxhtml/nxhtml/html-upl/COPYING340
-rw-r--r--emacs.d/nxhtml/nxhtml/html-upl/Changes115
-rw-r--r--emacs.d/nxhtml/nxhtml/html-upl/README111
-rw-r--r--emacs.d/nxhtml/nxhtml/html-upl/TODO2
-rw-r--r--emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl700
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc.el200
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm207
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm127
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css141
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html143
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css84
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js361
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl1395
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/blank12.gifbin825 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/down.gifbin853 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/freeCont.gifbin913 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.pngbin1957 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.xcfbin22466 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/hideCont.gifbin917 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/nailCont.gifbin917 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/nosearch.gifbin1100 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.gifbin3202 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.pngbin6710 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/blue_left_top.pngbin381 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/close-cross.gifbin866 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue.pngbin3763 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue1.pngbin4012 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1.gifbin3732 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1_30.gifbin1299 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/other/up.gifbin851 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/right.gifbin857 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/search.gifbin1118 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/html-wtoc/img/showCont.gifbin909 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml-autoload.el147
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml-bug.el332
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml-menu.el1658
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml-mode.el2796
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el365
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml-strval.el210
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtml.el339
-rw-r--r--emacs.d/nxhtml/nxhtml/nxhtmljs.el240
-rw-r--r--emacs.d/nxhtml/nxhtml/nxml-where.el734
-rw-r--r--emacs.d/nxhtml/nxhtml/outline-magic.el588
-rw-r--r--emacs.d/nxhtml/nxhtml/rngalt.el828
-rw-r--r--emacs.d/nxhtml/nxhtml/tidy-xhtml.el2921
-rw-r--r--emacs.d/nxhtml/nxhtml/wtest.el56
-rw-r--r--emacs.d/nxhtml/nxhtml/xhtml-help.el373
-rw-r--r--emacs.d/nxhtml/nxhtmlmaint.el439
-rw-r--r--emacs.d/nxhtml/related/blank.html6
-rw-r--r--emacs.d/nxhtml/related/csharp-mode.el1977
-rw-r--r--emacs.d/nxhtml/related/django.el203
-rw-r--r--emacs.d/nxhtml/related/env.js695
-rw-r--r--emacs.d/nxhtml/related/flymake-css.el161
-rw-r--r--emacs.d/nxhtml/related/flymake-helpers.el78
-rw-r--r--emacs.d/nxhtml/related/flymake-java-1.el109
-rw-r--r--emacs.d/nxhtml/related/flymake-js.el234
-rw-r--r--emacs.d/nxhtml/related/flymakemsg.el144
-rw-r--r--emacs.d/nxhtml/related/flymu.el157
-rw-r--r--emacs.d/nxhtml/related/iss-mode.el205
-rw-r--r--emacs.d/nxhtml/related/iss-mumamo.el70
-rw-r--r--emacs.d/nxhtml/related/js_temp.js4
-rw-r--r--emacs.d/nxhtml/related/jslint.js523
-rw-r--r--emacs.d/nxhtml/related/moz.el289
-rw-r--r--emacs.d/nxhtml/related/mozadd.el369
-rw-r--r--emacs.d/nxhtml/related/php-imenu.el174
-rw-r--r--emacs.d/nxhtml/related/readme.txt7
-rw-r--r--emacs.d/nxhtml/related/rhino.js14
-rw-r--r--emacs.d/nxhtml/related/smarty-mode.el2753
-rw-r--r--emacs.d/nxhtml/related/tt-mode.el124
-rw-r--r--emacs.d/nxhtml/related/visual-basic-mode.el1263
-rw-r--r--emacs.d/nxhtml/related/wikipedia-mode.el2296
-rw-r--r--emacs.d/nxhtml/tests/angus77-setup-jde.el90
-rw-r--r--emacs.d/nxhtml/tests/emacstest-suites.el102
-rw-r--r--emacs.d/nxhtml/tests/ert.el2418
-rw-r--r--emacs.d/nxhtml/tests/ert2.el268
-rw-r--r--emacs.d/nxhtml/tests/hfy-test.el102
-rw-r--r--emacs.d/nxhtml/tests/in/3-heights.html42
-rw-r--r--emacs.d/nxhtml/tests/in/400415-index.phtml43
-rw-r--r--emacs.d/nxhtml/tests/in/asp.asp40
-rw-r--r--emacs.d/nxhtml/tests/in/bastien-test.mm38
-rw-r--r--emacs.d/nxhtml/tests/in/bigfile-stringerr-64000.html1850
-rw-r--r--emacs.d/nxhtml/tests/in/blorgit.rb313
-rw-r--r--emacs.d/nxhtml/tests/in/bug-080609.html9
-rw-r--r--emacs.d/nxhtml/tests/in/bug-1908494.php6
-rw-r--r--emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.mm10
-rw-r--r--emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.org3
-rw-r--r--emacs.d/nxhtml/tests/in/bug-290364.php66
-rw-r--r--emacs.d/nxhtml/tests/in/bug-300946-index.html24
-rw-r--r--emacs.d/nxhtml/tests/in/bug-311640-index.html24
-rw-r--r--emacs.d/nxhtml/tests/in/bug-311641.php7
-rw-r--r--emacs.d/nxhtml/tests/in/bug-373106-flipbook.html160
-rw-r--r--emacs.d/nxhtml/tests/in/bug-381191-dh-test.el23
-rw-r--r--emacs.d/nxhtml/tests/in/bug-381191-dh-test.php6
-rw-r--r--emacs.d/nxhtml/tests/in/bug-johan-2010-02-12.rhtml22
-rw-r--r--emacs.d/nxhtml/tests/in/bug-johan-2010-02-16.html.haml34
-rw-r--r--emacs.d/nxhtml/tests/in/bug-johan-2010-02-17-2.erb14
-rw-r--r--emacs.d/nxhtml/tests/in/bug-johan-2010-02-17.erb4
-rw-r--r--emacs.d/nxhtml/tests/in/bug261792.ghtml7
-rw-r--r--emacs.d/nxhtml/tests/in/bug271497.el14
-rw-r--r--emacs.d/nxhtml/tests/in/bug271497.txt7
-rw-r--r--emacs.d/nxhtml/tests/in/bug272871.php7
-rw-r--r--emacs.d/nxhtml/tests/in/bug290364-messages.txt97
-rw-r--r--emacs.d/nxhtml/tests/in/bug354363-index.php38
-rw-r--r--emacs.d/nxhtml/tests/in/bug354363-test.php3
-rw-r--r--emacs.d/nxhtml/tests/in/bug369800-load-history.txt9483
-rw-r--r--emacs.d/nxhtml/tests/in/bug370417.php10
-rw-r--r--emacs.d/nxhtml/tests/in/bug381979-2-bad-traceb.txt24
-rw-r--r--emacs.d/nxhtml/tests/in/bug381979-2.php6
-rw-r--r--emacs.d/nxhtml/tests/in/bug381979-svnlib.inc744
-rw-r--r--emacs.d/nxhtml/tests/in/bug384115-bt2.txt11
-rw-r--r--emacs.d/nxhtml/tests/in/bug388729-messages.txt292
-rw-r--r--emacs.d/nxhtml/tests/in/bug388729-nxhtml_test.php2
-rw-r--r--emacs.d/nxhtml/tests/in/bug393137-new.html.erb18
-rw-r--r--emacs.d/nxhtml/tests/in/bug400415-foo.php9
-rw-r--r--emacs.d/nxhtml/tests/in/bug400415-foo2.php9
-rw-r--r--emacs.d/nxhtml/tests/in/bug409183.html14
-rw-r--r--emacs.d/nxhtml/tests/in/bug416505-Body.mxml85
-rw-r--r--emacs.d/nxhtml/tests/in/bug416505-nxhtml.el45
-rw-r--r--emacs.d/nxhtml/tests/in/bug452676.php12
-rw-r--r--emacs.d/nxhtml/tests/in/bug463136.php5
-rw-r--r--emacs.d/nxhtml/tests/in/bug492366-test.php21
-rw-r--r--emacs.d/nxhtml/tests/in/bug495770-heredoc_demo.pl95
-rw-r--r--emacs.d/nxhtml/tests/in/bug505554-nxhtml-download-messages.txt98
-rw-r--r--emacs.d/nxhtml/tests/in/bug505554-sample.html.erb11
-rw-r--r--emacs.d/nxhtml/tests/in/bug505726-foo.html10
-rw-r--r--emacs.d/nxhtml/tests/in/bug509586.ghtml16
-rw-r--r--emacs.d/nxhtml/tests/in/bug523065.jsp9
-rw-r--r--emacs.d/nxhtml/tests/in/bug523065.php6
-rw-r--r--emacs.d/nxhtml/tests/in/bug529133-statemachine.py1491
-rw-r--r--emacs.d/nxhtml/tests/in/bug531328.rhtml1
-rw-r--r--emacs.d/nxhtml/tests/in/bug532500.rhtml7
-rw-r--r--emacs.d/nxhtml/tests/in/bug532759.djhtml17
-rw-r--r--emacs.d/nxhtml/tests/in/bug546027.html17
-rw-r--r--emacs.d/nxhtml/tests/in/bug552789-loremipsum.php10
-rw-r--r--emacs.d/nxhtml/tests/in/bug552789.php20
-rw-r--r--emacs.d/nxhtml/tests/in/bug556832-error-test.py23
-rw-r--r--emacs.d/nxhtml/tests/in/bug557700-2.erb5
-rw-r--r--emacs.d/nxhtml/tests/in/bug557700-3.erb3
-rw-r--r--emacs.d/nxhtml/tests/in/bug557700-4.erb11
-rw-r--r--emacs.d/nxhtml/tests/in/bug557700-5.erb4
-rw-r--r--emacs.d/nxhtml/tests/in/bug557700-6.erb11
-rw-r--r--emacs.d/nxhtml/tests/in/bug557700.erb3
-rw-r--r--emacs.d/nxhtml/tests/in/bug559772-TextHelper.php205
-rw-r--r--emacs.d/nxhtml/tests/in/bug565595.mako12
-rw-r--r--emacs.d/nxhtml/tests/in/bug568178.pl4
-rw-r--r--emacs.d/nxhtml/tests/in/bug568178.sh9
-rw-r--r--emacs.d/nxhtml/tests/in/bug569742-master-end.html37
-rw-r--r--emacs.d/nxhtml/tests/in/ch-2008-07-25-test.html.erb37
-rw-r--r--emacs.d/nxhtml/tests/in/chunks-in-chunks1.php19
-rw-r--r--emacs.d/nxhtml/tests/in/chunks.html63
-rw-r--r--emacs.d/nxhtml/tests/in/cr-lf.el2
-rw-r--r--emacs.d/nxhtml/tests/in/csr-080710-2.html23
-rw-r--r--emacs.d/nxhtml/tests/in/csr-080710.html24
-rw-r--r--emacs.d/nxhtml/tests/in/cvd-080805-ac.php21
-rw-r--r--emacs.d/nxhtml/tests/in/cvd-080805-cc.php18
-rw-r--r--emacs.d/nxhtml/tests/in/drechsler-080517-simple.xml3
-rw-r--r--emacs.d/nxhtml/tests/in/el-070424-duh.xml6
-rw-r--r--emacs.d/nxhtml/tests/in/el-070511-simple.html102
-rw-r--r--emacs.d/nxhtml/tests/in/el-070602-index.php54
-rw-r--r--emacs.d/nxhtml/tests/in/el-070604.html11
-rw-r--r--emacs.d/nxhtml/tests/in/el-070604.php11
-rw-r--r--emacs.d/nxhtml/tests/in/el-070722-comment-error.php6
-rw-r--r--emacs.d/nxhtml/tests/in/el-070722-index-2.el7
-rw-r--r--emacs.d/nxhtml/tests/in/el-070722-index-2.php48
-rw-r--r--emacs.d/nxhtml/tests/in/el-070722-index-noheader.php48
-rw-r--r--emacs.d/nxhtml/tests/in/el-070722-index.php55
-rw-r--r--emacs.d/nxhtml/tests/in/el-071217-foo.html13
-rw-r--r--emacs.d/nxhtml/tests/in/emacswiki-080119.php15
-rw-r--r--emacs.d/nxhtml/tests/in/emacswiki-erb-bug.el36
-rw-r--r--emacs.d/nxhtml/tests/in/err-line38.html768
-rw-r--r--emacs.d/nxhtml/tests/in/eval-in-html.elbin22420 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/tests/in/fontif-err.html339
-rw-r--r--emacs.d/nxhtml/tests/in/fontif-err.php339
-rw-r--r--emacs.d/nxhtml/tests/in/genshi-HelloWorldPage.ghtml10
-rw-r--r--emacs.d/nxhtml/tests/in/genshi-auto-mode.html10
-rw-r--r--emacs.d/nxhtml/tests/in/genshi.ghtml23
-rw-r--r--emacs.d/nxhtml/tests/in/goesele-091110-testnote-orig.mm16
-rw-r--r--emacs.d/nxhtml/tests/in/goesele-091110-testnote-temp.mm16
-rw-r--r--emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm16
-rw-r--r--emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org5
-rw-r--r--emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org.mm16
-rw-r--r--emacs.d/nxhtml/tests/in/haml1.haml132
-rw-r--r--emacs.d/nxhtml/tests/in/heredoc.php61
-rw-r--r--emacs.d/nxhtml/tests/in/heredoc.pl11
-rw-r--r--emacs.d/nxhtml/tests/in/heredoc.py11
-rw-r--r--emacs.d/nxhtml/tests/in/heredoc.rb8
-rw-r--r--emacs.d/nxhtml/tests/in/heredoc.sh4
-rw-r--r--emacs.d/nxhtml/tests/in/hg-2008-03-22-ajax.xhtml38
-rw-r--r--emacs.d/nxhtml/tests/in/hq-070510-test.php12
-rw-r--r--emacs.d/nxhtml/tests/in/hq-070510-test.php.html44
-rw-r--r--emacs.d/nxhtml/tests/in/hq-070524-bug.php10
-rw-r--r--emacs.d/nxhtml/tests/in/hq-071006-index.php38
-rw-r--r--emacs.d/nxhtml/tests/in/html-syntactic-err-l164.html1474
-rw-r--r--emacs.d/nxhtml/tests/in/ind-0-error.php28
-rw-r--r--emacs.d/nxhtml/tests/in/indent-bug-html-mode.html18
-rw-r--r--emacs.d/nxhtml/tests/in/java.java13
-rw-r--r--emacs.d/nxhtml/tests/in/jcl-080802-index.html.erb16
-rw-r--r--emacs.d/nxhtml/tests/in/jcl-080802-messages_controller.rb57
-rw-r--r--emacs.d/nxhtml/tests/in/jj-081226.html26
-rw-r--r--emacs.d/nxhtml/tests/in/josh-091115-cancer_summary.xsl490
-rw-r--r--emacs.d/nxhtml/tests/in/jump-parse.html7
-rw-r--r--emacs.d/nxhtml/tests/in/jump-parse.rhtml9
-rw-r--r--emacs.d/nxhtml/tests/in/kp-080604.php4
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-1.html13
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-2.html174
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-2j.html174
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-3.html61
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-4.html58
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-5.html20
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-6.html58
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-7.html56
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-8.html57
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-9.html57
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-a-notabs.html57
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-a.html57
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-b.html55
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-c.html52
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-d.html51
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-e.html50
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-f.html49
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-g.html39
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-h.html27
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-i.html19
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-j.html19
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing-k.html19
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing.css36
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing.html174
-rw-r--r--emacs.d/nxhtml/tests/in/kubica-080516-freezing.txt10
-rw-r--r--emacs.d/nxhtml/tests/in/kwalo-080930.php23
-rw-r--r--emacs.d/nxhtml/tests/in/latex-clojre-mumamo-test.lclj17
-rw-r--r--emacs.d/nxhtml/tests/in/lg-080813-div.html16
-rw-r--r--emacs.d/nxhtml/tests/in/lg-080813-label.html15
-rw-r--r--emacs.d/nxhtml/tests/in/long-lines.txt1
-rw-r--r--emacs.d/nxhtml/tests/in/markdown.markdown16
-rw-r--r--emacs.d/nxhtml/tests/in/mason.mason46
-rw-r--r--emacs.d/nxhtml/tests/in/menu-err.txt10
-rw-r--r--emacs.d/nxhtml/tests/in/mjt-feed.html86
-rw-r--r--emacs.d/nxhtml/tests/in/mjt-imagesearch.html46
-rw-r--r--emacs.d/nxhtml/tests/in/mjt-minimal.html11
-rw-r--r--emacs.d/nxhtml/tests/in/mumamo-and-org.org20
-rw-r--r--emacs.d/nxhtml/tests/in/mumamo-and-org.org.mm45
-rw-r--r--emacs.d/nxhtml/tests/in/ng-080309-read-url.html11
-rw-r--r--emacs.d/nxhtml/tests/in/no-php-end-2.php18
-rw-r--r--emacs.d/nxhtml/tests/in/no-php-end-2.php-log.txt312
-rw-r--r--emacs.d/nxhtml/tests/in/no-php-end-2.php-log2.txt238
-rw-r--r--emacs.d/nxhtml/tests/in/no-php-end-3.php18
-rw-r--r--emacs.d/nxhtml/tests/in/no-php-end-4.php18
-rw-r--r--emacs.d/nxhtml/tests/in/no-php-end.php4
-rw-r--r--emacs.d/nxhtml/tests/in/nojump-parse.html9
-rw-r--r--emacs.d/nxhtml/tests/in/noweb1.now38
-rw-r--r--emacs.d/nxhtml/tests/in/nutshell.mako27
-rw-r--r--emacs.d/nxhtml/tests/in/nxml-bug.html11
-rw-r--r--emacs.d/nxhtml/tests/in/nxml-indent-2.html134
-rw-r--r--emacs.d/nxhtml/tests/in/nxml-indent-3.html134
-rw-r--r--emacs.d/nxhtml/tests/in/nxml-indent-noerr1.html192
-rw-r--r--emacs.d/nxhtml/tests/in/nxml-indent.el1
-rw-r--r--emacs.d/nxhtml/tests/in/nxml-indent.html192
-rw-r--r--emacs.d/nxhtml/tests/in/only-html.html11
-rw-r--r--emacs.d/nxhtml/tests/in/only-php.php10
-rw-r--r--emacs.d/nxhtml/tests/in/pavel-071116.djhtml31
-rw-r--r--emacs.d/nxhtml/tests/in/php-parseable.php11
-rw-r--r--emacs.d/nxhtml/tests/in/question43320.html35
-rw-r--r--emacs.d/nxhtml/tests/in/question44504-folding.html28
-rw-r--r--emacs.d/nxhtml/tests/in/question49234.sh41
-rw-r--r--emacs.d/nxhtml/tests/in/rgr-030809-indexbody.php57
-rw-r--r--emacs.d/nxhtml/tests/in/rgr-080307.php2
-rw-r--r--emacs.d/nxhtml/tests/in/rgr-080308-header-2.php56
-rw-r--r--emacs.d/nxhtml/tests/in/rgr-080308-header.php56
-rw-r--r--emacs.d/nxhtml/tests/in/rgr-080308-indexbody.php57
-rw-r--r--emacs.d/nxhtml/tests/in/rr-090524-header.php76
-rw-r--r--emacs.d/nxhtml/tests/in/rr-090923-header.php101
-rw-r--r--emacs.d/nxhtml/tests/in/rr-address-090304.php4
-rw-r--r--emacs.d/nxhtml/tests/in/rr-address-nxhtml.errbin6647 -> 0 bytes
-rw-r--r--emacs.d/nxhtml/tests/in/rr-min8.php6
-rw-r--r--emacs.d/nxhtml/tests/in/ryan-091104-literal.tpl148
-rw-r--r--emacs.d/nxhtml/tests/in/ryan-091111-wrong-side.tpl18
-rw-r--r--emacs.d/nxhtml/tests/in/schemas.xml3
-rw-r--r--emacs.d/nxhtml/tests/in/sd-080803-test.php14
-rw-r--r--emacs.d/nxhtml/tests/in/senny-091118.htm247
-rw-r--r--emacs.d/nxhtml/tests/in/sheit-2007-12-26.php9
-rw-r--r--emacs.d/nxhtml/tests/in/short-tags.php3
-rw-r--r--emacs.d/nxhtml/tests/in/single-question-sign.html11
-rw-r--r--emacs.d/nxhtml/tests/in/ssjs.ssjs9
-rw-r--r--emacs.d/nxhtml/tests/in/string-bug.php1
-rw-r--r--emacs.d/nxhtml/tests/in/style=.html12
-rw-r--r--emacs.d/nxhtml/tests/in/style=string-font.html18
-rw-r--r--emacs.d/nxhtml/tests/in/svg.svg1
-rw-r--r--emacs.d/nxhtml/tests/in/temp2.php48
-rw-r--r--emacs.d/nxhtml/tests/in/temp3.html44
-rw-r--r--emacs.d/nxhtml/tests/in/test-only-nxml.my-xhtml38
-rw-r--r--emacs.d/nxhtml/tests/in/test.tt11
-rw-r--r--emacs.d/nxhtml/tests/in/tut1.jsp5
-rw-r--r--emacs.d/nxhtml/tests/in/utf8-problem.el7
-rw-r--r--emacs.d/nxhtml/tests/in/wiki-080606-indent.php18
-rw-r--r--emacs.d/nxhtml/tests/in/wiki-080708-ind-problem.rhtml5
-rw-r--r--emacs.d/nxhtml/tests/in/wiki-090804-js.html32
-rw-r--r--emacs.d/nxhtml/tests/in/wiki-2008-01-30.rhtml1
-rw-r--r--emacs.d/nxhtml/tests/in/wiki-comments.php20
-rw-r--r--emacs.d/nxhtml/tests/in/wiki-strange-hili-080629.html5
-rw-r--r--emacs.d/nxhtml/tests/in/xml-as-string.php54
-rw-r--r--emacs.d/nxhtml/tests/in/ygne-2008-02-07-hotproperty.html.php1967
-rw-r--r--emacs.d/nxhtml/tests/in/zero-pi.html11
-rw-r--r--emacs.d/nxhtml/tests/in/zn-090529-doxysample.php37
-rw-r--r--emacs.d/nxhtml/tests/inemacs/bug1013.el35
-rw-r--r--emacs.d/nxhtml/tests/mumamo-test.el299
-rw-r--r--emacs.d/nxhtml/tests/nxhtmltest-Q.el114
-rw-r--r--emacs.d/nxhtml/tests/nxhtmltest-helpers.el156
-rw-r--r--emacs.d/nxhtml/tests/nxhtmltest-suites.el632
-rw-r--r--emacs.d/nxhtml/util/anchored-transpose.el305
-rw-r--r--emacs.d/nxhtml/util/appmenu-fold.el79
-rw-r--r--emacs.d/nxhtml/util/appmenu.el523
-rw-r--r--emacs.d/nxhtml/util/as-external.el310
-rw-r--r--emacs.d/nxhtml/util/buffer-bg.el89
-rw-r--r--emacs.d/nxhtml/util/chartg.el844
-rw-r--r--emacs.d/nxhtml/util/css-color.el983
-rw-r--r--emacs.d/nxhtml/util/css-palette.el471
-rw-r--r--emacs.d/nxhtml/util/css-simple-completion.el238
-rw-r--r--emacs.d/nxhtml/util/cus-new-user.el803
-rw-r--r--emacs.d/nxhtml/util/custsets.el83
-rw-r--r--emacs.d/nxhtml/util/ecb-batch-compile.el65
-rw-r--r--emacs.d/nxhtml/util/ediff-url.el188
-rw-r--r--emacs.d/nxhtml/util/ffip.el304
-rw-r--r--emacs.d/nxhtml/util/fold-dwim.el466
-rw-r--r--emacs.d/nxhtml/util/foldit.el357
-rw-r--r--emacs.d/nxhtml/util/fupd.el127
-rw-r--r--emacs.d/nxhtml/util/gimpedit.el172
-rw-r--r--emacs.d/nxhtml/util/gpl.el213
-rw-r--r--emacs.d/nxhtml/util/hfyview.el651
-rw-r--r--emacs.d/nxhtml/util/hl-needed.el402
-rw-r--r--emacs.d/nxhtml/util/html-write.el455
-rw-r--r--emacs.d/nxhtml/util/idn.el151
-rw-r--r--emacs.d/nxhtml/util/inlimg.el429
-rw-r--r--emacs.d/nxhtml/util/key-cat.el329
-rw-r--r--emacs.d/nxhtml/util/majmodpri.el448
-rw-r--r--emacs.d/nxhtml/util/markchars.el151
-rw-r--r--emacs.d/nxhtml/util/mlinks.el1367
-rw-r--r--emacs.d/nxhtml/util/mumamo-aspnet.el227
-rw-r--r--emacs.d/nxhtml/util/mumamo-fun.el3333
-rw-r--r--emacs.d/nxhtml/util/mumamo-regions.el311
-rw-r--r--emacs.d/nxhtml/util/mumamo-trace.el6
-rw-r--r--emacs.d/nxhtml/util/mumamo.el9101
-rw-r--r--emacs.d/nxhtml/util/n-back.el1296
-rw-r--r--emacs.d/nxhtml/util/new-key-seq-widget.el312
-rw-r--r--emacs.d/nxhtml/util/nxml-mode-os-additions.el99
-rw-r--r--emacs.d/nxhtml/util/ocr-user.el86
-rw-r--r--emacs.d/nxhtml/util/org-panel.el745
-rw-r--r--emacs.d/nxhtml/util/ourcomments-util.el2427
-rw-r--r--emacs.d/nxhtml/util/ourcomments-widgets.el141
-rw-r--r--emacs.d/nxhtml/util/pause.el794
-rw-r--r--emacs.d/nxhtml/util/pointback.el93
-rw-r--r--emacs.d/nxhtml/util/popcmp.el472
-rw-r--r--emacs.d/nxhtml/util/readme.txt3
-rw-r--r--emacs.d/nxhtml/util/rebind.el240
-rw-r--r--emacs.d/nxhtml/util/rnc-mode.el265
-rw-r--r--emacs.d/nxhtml/util/rxi.el148
-rw-r--r--emacs.d/nxhtml/util/search-form.el473
-rw-r--r--emacs.d/nxhtml/util/sex-mode.el463
-rw-r--r--emacs.d/nxhtml/util/sml-modeline.el192
-rw-r--r--emacs.d/nxhtml/util/tabkey2.el1701
-rw-r--r--emacs.d/nxhtml/util/tyda.el94
-rw-r--r--emacs.d/nxhtml/util/udev-ecb.el229
-rw-r--r--emacs.d/nxhtml/util/udev-rinari.el204
-rw-r--r--emacs.d/nxhtml/util/udev.el456
-rw-r--r--emacs.d/nxhtml/util/useful-commands.el63
-rw-r--r--emacs.d/nxhtml/util/viper-tut.el1009
-rw-r--r--emacs.d/nxhtml/util/vline.el350
-rw-r--r--emacs.d/nxhtml/util/web-vcs-revision.txt1
-rw-r--r--emacs.d/nxhtml/util/whelp.el988
-rw-r--r--emacs.d/nxhtml/util/winsav.el1585
-rw-r--r--emacs.d/nxhtml/util/winsize.el1173
-rw-r--r--emacs.d/nxhtml/util/wrap-to-fill.el364
-rw-r--r--emacs.d/nxhtml/util/zencoding-mode.el801
-rw-r--r--emacs.d/nxhtml/web-autoload.el262
-rw-r--r--emacs.d/nxhtml/web-vcs.el2069
515 files changed, 317 insertions, 130679 deletions
diff --git a/emacs.d/10-modules.el b/emacs.d/10-modules.el
index 7701bc3..22372b9 100644
--- a/emacs.d/10-modules.el
+++ b/emacs.d/10-modules.el
@@ -1,7 +1,7 @@
(require 'naquadah-theme)
(require 'autopair)
-(load "autostart.el")
+;(load "autostart.el")
(autoload 'vala-mode
"vala-mode" "A Major mode for editing Vala files" t)
diff --git a/emacs.d/nxhtml/related/php-mode.el b/emacs.d/elisp/php-mode-improved.el
index a25fb82..1cf9f36 100644
--- a/emacs.d/nxhtml/related/php-mode.el
+++ b/emacs.d/elisp/php-mode-improved.el
@@ -1,5 +1,40 @@
;;; php-mode.el --- major mode for editing PHP code
+;; This is a version of the php-mode from http://php-mode.sourceforge.net that
+;; fixes a few bugs which make using php-mode much more palatable, namely:
+;;
+;; 1. New customisation options for some of the syntax highlighting
+;; features. I personally use the 'Gauchy' level of syntax
+;; highlighting -- I want variables and function calls fontified --
+;; but there were several very annoying "features" in this level of
+;; syntax highlighting, particularly the ones that warn you about
+;; perfectly valid code. I've added:
+;;
+;; * `php-mode-dollar-property-warning', which, if non-nil, warns on
+;; $foo->$bar. (Default is nil.)
+;; * `php-mode-dot-property-warning', which, if non-nil, warns on
+;; $foo.bar. (Default is nil.)
+;; * `php-mode-warn-on-unmatches', which, if non-nil, warns on
+;; "everything else". (Default is nil.)
+;; * `php-mode-warn-if-mumamo-off', which, if nil, suppresses the
+;; once-per-file warning about indenting with mumamo-mode turned
+;; off. (Default is t)
+;;
+;; 2. Bugfix in `php-show-arglist': this function no longer jumps to the
+;; function definition if that definition is in the current buffer.
+;;
+;; 3. Bugfix: 'class' keywords at the beginning of a line are now
+;; correctly fontified.
+;;
+;; This has been submitted to the php-mode maintainer, but I've not yet had a
+;; response.
+;;
+;; This was branched from the php-mode in nxhtml-mode, so if you have problems,
+;; download the latest nxhtml-mode, and replace related/php-mode.el in the
+;; nxhtml distribution with this file.
+;;
+;; -- David House, dmhouse@gmail.com
+
;; Copyright (C) 1999, 2000, 2001, 2003, 2004 Turadg Aleahmad
;; 2008 Aaron S. Hawley
@@ -7,10 +42,10 @@
;; Author: Turadg Aleahmad, 1999-2004
;; Keywords: php languages oop
;; Created: 1999-05-17
-;; Modified: 2008-11-28 Fri
+;; Modified: 2008-01-25T22:25:26+0100 Fri
;; X-URL: http://php-mode.sourceforge.net/
-(defconst php-mode-version-number "1.5.0-nxhtml-1.94"
+(defconst php-mode-version-number "1.4.1a-nxhtml"
"PHP Mode version number.")
;;; License
@@ -58,6 +93,7 @@
;; handy IDE-type features such as documentation search and a source
;; and class browser.
+
;;; Contributors: (in chronological order)
;; Juanjo, Torsten Martinsen, Vinai Kopp, Sean Champ, Doug Marcey,
@@ -66,36 +102,19 @@
;; Sammartino, ppercot, Valentin Funk, Stig Bakken, Gregory Stark,
;; Chris Morris, Nils Rennebarth, Gerrit Riessen, Eric Mc Sween,
;; Ville Skytta, Giacomo Tesio, Lennart Borgman, Stefan Monnier,
-;; Aaron S. Hawley, Ian Eure, Bill Lovett, Dias Badekas, David House
+;; Aaron S. Hawley, Ian Eure, Bill Lovett, David House
;;; Changelog:
-;; 1.5.0-nxhtml-1.88 (Lennart Borgman)
-;; Don't indent heredoc end mark
-;; 1.5.0-nxhtml-1.61 (Lennart Borgman)
-;; Added php-mode-to-use.
+;; 1.4.1a-nxhtml
;; Made underscore be part of identifiers.
-;; Remove php-mode-to.
-;; Make the indentation check only on current line.
-;; Warn only once per session about indentation.
-;; Tell if can't complete in `php-complete-function'.
-;; Move back point after checking indentation in
-;; `php-check-html-for-indentation'.
-;; Add `c-at-vsemi-p-fn' etc after advice from Alan Mackenzie.
;;
-;; 1.5
-;; Support function keywords like public, private and the ampersand
-;; character for function-based commands. Support abstract, final,
-;; static, public, private and protected keywords in Imenu. Fix
-;; reversed order of Imenu entries. Use font-lock-preprocessor-face
-;; for PHP and ASP tags. Make php-mode-modified a literal value
-;; rather than a computed string. Add date and time constants of
-;; PHP. (Dias Badekas) Fix false syntax highlighting of keywords
-;; because of underscore character. Change HTML indentation warning
-;; to match only HTML at the beginning of the line. Fix
-;; byte-compiler warnings. Clean-up whitespace and audited style
-;; consistency of code. Remove conditional bindings and XEmacs code
-;; that likely does nothing.
+;; 1.4.1-nxhtml
+;; Added php-mode-to-use.
+
+;; 1.4.1
+;; Modified `php-check-html-for-indentation' to check for multiple
+;; mode support libraries. (Lennart Borgman)
;;
;; 1.4
;; Updated GNU GPL to version 3. Ported to Emacs 22 (CC mode
@@ -109,23 +128,36 @@
;; Monnier to correct highlighting and indentation. (Lennart Borgman)
;; Changed the highlighting of the HTML part. (Lennart Borgman)
;;
-;; See the ChangeLog file included with the source package.
+;; 1.2
+;; Implemented php-show-arglist, C-. (Engelke Eschner)
+;; Implemented php-complete-function, M-tab (Engelke Eschner)
+;; Re-enabled # comment detection in GNU Emacs (Urban Müller)
+;; Fixed some keybindings and default settings (Engelke Eschner)
+;;
+;; 1.1
+;; Added PHP5 support (Giacomo Tesio)
+;; known problem: doesn't highlight after first 'implements'
+;; Better XEmacs compatibility (imenu, regexp, and comments!) (Ville Skytta)
+;; Improvement to php-conditional-key regexp (Eric Mc Sween)
+
+;; 1.05
+;; Incorporated speedbar defs by Gerrit Riessen
+;; Add "foreach" to conditional introducing keywords (Nils Rennebarth)
+;; Cleared the Changelog
+;; Moved contribution credits into comments above
;;; Code:
-(require 'add-log)
(require 'speedbar)
(require 'font-lock)
(require 'cc-mode)
-(require 'cc-langs)
(require 'custom)
(require 'etags)
(eval-when-compile
(require 'regexp-opt))
-
+
;; Local variables
-;;;###autoload
(defgroup php nil
"Major mode `php-mode' for editing PHP code."
:prefix "php-"
@@ -137,7 +169,7 @@
:group 'php)
(defcustom php-speedbar-config t
- "When set to true automatically configures Speedbar to observe PHP files.
+ "When set to true automatically configures Speedbar to observe PHP files.\
Ignores php-file patterns option; fixed to expression \"\\.\\(inc\\|php[s34]?\\)\""
:type 'boolean
:set (lambda (sym val)
@@ -148,7 +180,7 @@ Ignores php-file patterns option; fixed to expression \"\\.\\(inc\\|php[s34]?\\)
:group 'php)
(defcustom php-mode-speedbar-open nil
- "Normally `php-mode' starts with the speedbar closed.
+ "Normally `php-mode' starts with the speedbar closed.\
Turning this on will open it whenever `php-mode' is loaded."
:type 'boolean
:set (lambda (sym val)
@@ -157,53 +189,51 @@ Turning this on will open it whenever `php-mode' is loaded."
(speedbar 1)))
:group 'php)
-(defvar php-imenu-generic-expression
- '(
- ("Private Methods"
- "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?private\\s-+\\(?:static\\s-+\\)?function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- ("Protected Methods"
- "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?protected\\s-+\\(?:static\\s-+\\)?function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- ("Public Methods"
- "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?public\\s-+\\(?:static\\s-+\\)?function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- ("Classes"
- "^\\s-*class\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*" 1)
- ("All Functions"
- "^\\s-*\\(?:\\(?:abstract\\|final\\|private\\|protected\\|public\\|static\\)\\s-+\\)*function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- )
- "Imenu generic expression for PHP Mode. See `imenu-generic-expression'."
- )
-
(defcustom php-manual-url "http://www.php.net/manual/en/"
- "URL at which to find PHP manual.
+ "URL at which to find PHP manual.\
You can replace \"en\" with your ISO language code."
:type 'string
:group 'php)
(defcustom php-search-url "http://www.php.net/"
- "URL at which to search for documentation on a word."
+ "URL at which to search for documentation on a word"
:type 'string
:group 'php)
(defcustom php-completion-file ""
- "Path to the file which contains the function names known to PHP."
+ "Path to the file which contains the function names known to PHP"
:type 'string
:group 'php)
(defcustom php-manual-path ""
- "Path to the directory which contains the PHP manual."
+ "Path to the directory which contains the PHP manual"
:type 'string
:group 'php)
;;;###autoload
+(defcustom php-mode-to-use
+ (progn
+ (require 'mumamo nil t)
+ (if (fboundp 'nxhtml-mumamo-turn-on)
+ 'nxhtml-mumamo-turn-on
+ (if (fboundp 'html-mumamo-turn-on)
+ 'html-mumamo-turn-on
+ 'php-mode)))
+ "Major mode turn on function to use for php files."
+ :type 'function
+ :group 'php)
+
+;;;###autoload
(defcustom php-file-patterns '("\\.php[s34]?\\'" "\\.phtml\\'" "\\.inc\\'")
"List of file patterns for which to automatically invoke `php-mode'."
:type '(repeat (regexp :tag "Pattern"))
+ :set-after '(php-mode-to-use)
:set (lambda (sym val)
(set-default sym val)
(let ((php-file-patterns-temp val))
(while php-file-patterns-temp
(add-to-list 'auto-mode-alist
- (cons (car php-file-patterns-temp) 'php-mode))
+ (cons (car php-file-patterns-temp) php-mode-to-use))
(setq php-file-patterns-temp (cdr php-file-patterns-temp)))))
:group 'php)
@@ -218,22 +248,56 @@ You can replace \"en\" with your ISO language code."
:group 'php)
(defcustom php-mode-force-pear nil
- "Normally PEAR coding rules are enforced only when the filename contains \"PEAR.\"
+ "Normally PEAR coding rules are enforced only when the filename contains \"PEAR\"\
Turning this on will force PEAR rules on all PHP files."
:type 'boolean
:group 'php)
-
-(defconst php-mode-modified "2009-08-12"
- "PHP Mode build date.")
+
+(defcustom php-mode-dollar-property-warning nil
+ "If non-`nil', warn about expressions like $foo->$bar where you
+might have meant $foo->bar. Defaults to `nil' since this is valid
+code."
+ :type 'boolean
+ :group 'php)
+
+(defcustom php-mode-dot-property-warning nil
+ "If non-`nil', wan about expressions like $foo.bar, which could
+be a valid concatenation (if bar were a constant, or interpreted
+as an unquoted string), but it's more likely you meant $foo->bar."
+ :type 'boolean
+ :group 'php)
+
+(defcustom php-mode-warn-on-unmatched nil
+ "If non-`nil', use `font-lock-warning-face' on any expression
+that isn't matched by the other font lock regular expressions."
+ :type 'boolean
+ :group 'php)
+
+(defcustom php-warn-if-mumamo-off t
+ "Warn once per buffer if you try to indent a buffer without
+mumamo-mode turned on. Detects if there are any HTML tags in the
+buffer before warning, but this is not very smart; e.g. if you
+have any tags inside a PHP string, it will be fooled."
+ :type '(choice (const :tag "Warn" t) (const "Don't warn" nil))
+ :group 'php)
+
+
+(eval-when-compile
+ (defconst php-mode-modified
+ (save-excursion
+ (and
+ (re-search-backward "^;; Modified: \\(.*\\)" nil 'noerror)
+ (match-string-no-properties 1)))
+ "PHP Mode version number."))
(defun php-mode-version ()
- "Display string describing the version of PHP mode."
+ "Display string describing the version of PHP mode"
(interactive)
(message "PHP mode %s of %s"
php-mode-version-number php-mode-modified))
(defconst php-beginning-of-defun-regexp
- "^\\s-*\\(?:\\(?:abstract\\|final\\|private\\|protected\\|public\\|static\\)\\s-+\\)*function\\s-+&?\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*("
+ "^\\s *function\\s +&?\\(\\(\\sw\\|\\s_\\)+\\)\\s *("
"Regular expression for a PHP function.")
(defun php-beginning-of-defun (&optional arg)
@@ -264,23 +328,20 @@ See `php-beginning-of-defun'."
(interactive "p")
(php-beginning-of-defun (- (or arg 1))))
-
+
+(defvar php-completion-table nil
+ "Obarray of tag names defined in current tags table and functions know to PHP.")
+
(defvar php-warned-bad-indent nil)
;;(make-variable-buffer-local 'php-warned-bad-indent)
;; Do it but tell it is not good if html tags in buffer.
(defun php-check-html-for-indentation ()
- (let ((html-tag-re "^\\s-*</?\\sw+.*?>")
+ (let ((html-tag-re "</?\\sw+.*?>")
(here (point)))
- (goto-char (line-beginning-position))
- (if (or (when (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- ;; Fix-me: no idea how to check for mmm or multi-mode
- (save-match-data
- (not (or (re-search-forward html-tag-re (line-end-position) t)
- (re-search-backward html-tag-re (line-beginning-position) t)))))
- (progn
- (goto-char here)
- t)
+ (if (not (or (re-search-forward html-tag-re (+ (point) 1000) t)
+ (re-search-backward html-tag-re (- (point) 1000) t)))
+ t
(goto-char here)
(setq php-warned-bad-indent t)
;;(setq php-warned-bad-indent nil)
@@ -296,11 +357,11 @@ See `php-beginning-of-defun'."
(available-names (mapcar (lambda (lib) (car lib)) available-multi-libs))
(base-msg
(concat
- "Indentation fails badly with mixed HTML/PHP in the HTML part in
-plaín `php-mode'. To get indentation to work you must use an
-Emacs library that supports 'multiple major modes' in a buffer.
-Parts of the buffer will then be in `php-mode' and parts in for
-example `html-mode'. Known such libraries are:\n\t"
+ "Indentation fails badly with mixed HTML/PHP in plaín\n"
+ "`php-mode'. To get indentation to work you must use an Emacs\n"
+ "library that supports 'multiple major modes' in a buffer. Parts\n"
+ "of the buffer will then be in `php-mode' and parts in for example\n"
+ "`html-mode'. Known such libraries are:\n\t"
(mapconcat 'identity known-names ", ")
"\n"
(if available-multi-libs
@@ -341,104 +402,29 @@ example `html-mode'. Known such libraries are:\n\t"
nil))))
(defun php-cautious-indent-region (start end &optional quiet)
- (if (or php-warned-bad-indent
+ (if (or (not php-warn-if-mumamo-off)
+ php-warned-bad-indent
(php-check-html-for-indentation))
(funcall 'c-indent-region start end quiet)))
(defun php-cautious-indent-line ()
- (if (or php-warned-bad-indent
+ (if (or (not php-warn-if-mumamo-off)
+ php-warned-bad-indent
(php-check-html-for-indentation))
- (let ((here (point))
- doit)
- (move-beginning-of-line nil)
- ;; Don't indent heredoc end mark
- (save-match-data
- (unless (looking-at "[a-zA-Z0-9_]+;\n")
- (setq doit t)))
- (goto-char here)
- (when doit
- (funcall 'c-indent-line)))))
-
-(defconst php-tags '("<?php" "?>" "<?" "<?="))
-(defconst php-tags-key (regexp-opt php-tags))
-
-(defconst php-block-stmt-1-kwds '("do" "else" "finally" "try"))
-(defconst php-block-stmt-2-kwds
- '("for" "if" "while" "switch" "foreach" "elseif" "catch all"))
-
-(defconst php-block-stmt-1-key
- (regexp-opt php-block-stmt-1-kwds))
-(defconst php-block-stmt-2-key
- (regexp-opt php-block-stmt-2-kwds))
-
-(defconst php-class-decl-kwds '("class" "interface"))
-
-(defconst php-class-key
- (concat
- "\\(" (regexp-opt php-class-decl-kwds) "\\)\\s-+"
- (c-lang-const c-symbol-key c) ;; Class name.
- "\\(\\s-+extends\\s-+" (c-lang-const c-symbol-key c) "\\)?" ;; Name of superclass.
- "\\(\\s-+implements\\s-+[^{]+{\\)?")) ;; List of any adopted protocols.
-
-
-(defun php-c-at-vsemi-p (&optional pos)
- "Return t on html lines (including php region border), otherwise nil.
-POS is a position on the line in question.
-
-This is was done due to the problem reported here:
-
- URL `https://answers.launchpad.net/nxhtml/+question/43320'"
- (setq pos (or pos (point)))
- (let ((here (point))
- ret)
- (save-match-data
- (goto-char pos)
- (beginning-of-line)
- (setq ret (looking-at
- (rx
- (or (seq
- bol
- (0+ space)
- "<"
- (in "a-z\\?"))
- (seq
- ;;(0+ anything)
- (0+ not-newline)
- (in "a-z\\?")
- ">"
- (0+ space)
- eol))))))
- (goto-char here)
- ret))
-
-(defun php-c-vsemi-status-unknown-p ()
- "See `php-c-at-vsemi-p'."
- )
+ (funcall 'c-indent-line)))
;;;###autoload
(define-derived-mode php-mode c-mode "PHP"
"Major mode for editing PHP code.\n\n\\{php-mode-map}"
- (c-add-language 'php-mode 'c-mode)
-
-;; PHP doesn't have C-style macros.
-;; HACK: Overwrite this syntax with rules to match <?php and others.
-;; (c-lang-defconst c-opt-cpp-start php php-tags-key)
-;; (c-lang-defvar c-opt-cpp-start (c-lang-const c-opt-cpp-start))
- (set (make-local-variable 'c-opt-cpp-start) php-tags-key)
-;; (c-lang-defconst c-opt-cpp-start php php-tags-key)
-;; (c-lang-defvar c-opt-cpp-start (c-lang-const c-opt-cpp-start))
- (set (make-local-variable 'c-opt-cpp-prefix) php-tags-key)
-
- (c-set-offset 'cpp-macro 0)
-
-;; (c-lang-defconst c-block-stmt-1-kwds php php-block-stmt-1-kwds)
-;; (c-lang-defvar c-block-stmt-1-kwds (c-lang-const c-block-stmt-1-kwds))
+;; (c-add-language 'php-mode 'c-mode)
+
+;; (c-lang-defconst c-block-stmt-1-kwds
+;; php php-block-stmt-1-kwds)
(set (make-local-variable 'c-block-stmt-1-key) php-block-stmt-1-key)
-;; (c-lang-defconst c-block-stmt-2-kwds php php-block-stmt-2-kwds)
-;; (c-lang-defvar c-block-stmt-2-kwds (c-lang-const c-block-stmt-2-kwds))
+;; (c-lang-defconst c-block-stmt-2-kwds
+;; php php-block-stmt-2-kwds)
(set (make-local-variable 'c-block-stmt-2-key) php-block-stmt-2-key)
-
;; Specify that cc-mode recognize Javadoc comment style
(set (make-local-variable 'c-doc-comment-style)
'((php-mode . javadoc)))
@@ -447,6 +433,20 @@ This is was done due to the problem reported here:
;; php php-class-decl-kwds)
(set (make-local-variable 'c-class-key) php-class-key)
+ ;; this line makes $ into punctuation instead of a word constituent
+ ;; it used to be active, but it killed indenting of case lines that
+ ;; begin with '$' (many do). If anyone has a solution to this
+ ;; problem, please let me know. Of course, you're welcome to
+ ;; uncomment this line in your installation.
+; (modify-syntax-entry ?$ "." php-mode-syntax-table)
+
+ ;; The above causes XEmacs to handle shell-style comments correctly,
+ ;; but fails to work in GNU Emacs which fails to interpret \n as the
+ ;; end of the comment.
+ (if (featurep 'xemacs) (progn
+ (modify-syntax-entry ?# "< b" php-mode-syntax-table)
+ (modify-syntax-entry ?\n "> b" php-mode-syntax-table)))
+
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
'((php-font-lock-keywords-1
@@ -455,11 +455,11 @@ This is was done due to the problem reported here:
;; extreme/ugly for you.
php-font-lock-keywords-3)
nil ; KEYWORDS-ONLY
- t ; CASE-FOLD
- (("_" . "w")) ; SYNTAX-ALIST
+ nil ; CASE-FOLD
+ nil ; SYNTAX-ALIST
nil)) ; SYNTAX-BEGIN
(modify-syntax-entry ?# "< b" php-mode-syntax-table)
- ;;(modify-syntax-entry ?_ "w" php-mode-syntax-table)
+ (modify-syntax-entry ?_ "w" php-mode-syntax-table)
;; Electric behaviour must be turned off, they do not work since
;; they can not find the correct syntax in embedded PHP.
@@ -496,8 +496,6 @@ This is was done due to the problem reported here:
(setq indent-line-function 'php-cautious-indent-line)
(setq indent-region-function 'php-cautious-indent-region)
(setq c-special-indent-hook nil)
- (setq c-at-vsemi-p-fn 'php-c-at-vsemi-p)
- (setq c-vsemi-status-unknown-p 'php-c-vsemi-status-unknown-p)
(set (make-local-variable 'syntax-begin-function)
'c-beginning-of-syntax)
@@ -508,12 +506,12 @@ This is was done due to the problem reported here:
(set (make-local-variable 'open-paren-in-column-0-is-defun-start)
nil)
(set (make-local-variable 'defun-prompt-regexp)
- "^\\s-*function\\s-+&?\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*")
+ "^\\s *function\\s +&?\\(\\(\\sw\\|\\s_\\)+\\)\\s *")
(set (make-local-variable 'add-log-current-defun-header-regexp)
php-beginning-of-defun-regexp)
(run-hooks 'php-mode-hook))
-
+
;; Make a menu keymap (with a prompt string)
;; and make it the menu bar item's definition.
(define-key php-mode-map [menu-bar] (make-sparse-keymap))
@@ -529,11 +527,8 @@ This is was done due to the problem reported here:
(define-key php-mode-map
[menu-bar php search-documentation]
'("Search documentation" . php-search-documentation))
-
+
;; Define function name completion function
-(defvar php-completion-table nil
- "Obarray of tag names defined in current tags table and functions known to PHP.")
-
(defun php-complete-function ()
"Perform function completion on the text around point.
Completes to the set of names listed in the current tags table
@@ -546,29 +541,27 @@ for \\[find-tag] (which see)."
completion
(php-functions (php-completion-table)))
(if (not pattern) (message "Nothing to complete")
- (if (not (search-backward pattern nil t))
- (message "Can't complete here")
- (setq beg (point))
- (forward-char (length pattern))
- (setq completion (try-completion pattern php-functions nil))
- (cond ((eq completion t))
- ((null completion)
- (message "Can't find completion for \"%s\"" pattern)
- (ding))
- ((not (string= pattern completion))
- (delete-region beg (point))
- (insert completion))
- (t
- (message "Making completion list...")
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list
- (all-completions pattern php-functions)))
- (message "Making completion list...%s" "done")))))))
-
+ (search-backward pattern)
+ (setq beg (point))
+ (forward-char (length pattern))
+ (setq completion (try-completion pattern php-functions nil))
+ (cond ((eq completion t))
+ ((null completion)
+ (message "Can't find completion for \"%s\"" pattern)
+ (ding))
+ ((not (string= pattern completion))
+ (delete-region beg (point))
+ (insert completion))
+ (t
+ (message "Making completion list...")
+ (with-output-to-temp-buffer "*Completions*"
+ (display-completion-list
+ (all-completions pattern php-functions)))
+ (message "Making completion list...%s" "done"))))))
+
+;; Build php-completion-table on demand. The table includes the
+;; PHP functions and the tags from the current tags-file-name
(defun php-completion-table ()
- "Build variable `php-completion-table' on demand.
-The table includes the PHP functions and the tags from the
-current `tags-file-name'."
(or (and tags-file-name
(save-excursion (tags-verify-table tags-file-name))
php-completion-table)
@@ -645,26 +638,25 @@ current `tags-file-name'."
(point))))
nil)))
+
(defun php-show-arglist ()
(interactive)
- (let* ((tagname (php-get-pattern))
- (buf (find-tag-noselect tagname nil nil))
- arglist)
+ (let* ((tagname (php-get-pattern)) arglist)
(save-excursion
- (set-buffer buf)
+ (set-buffer (find-tag-noselect tagname nil nil))
(goto-char (point-min))
(when (re-search-forward
- (format "function\\s-+%s\\s-*(\\([^{]*\\))" tagname)
+ (format "function[ \t]+%s[ \t]*(\\([^{]*\\))" tagname)
nil t)
(setq arglist (buffer-substring-no-properties
(match-beginning 1) (match-end 1)))))
(if arglist
(message "Arglist for %s: %s" tagname arglist)
- (message "Unknown function: %s" tagname))))
-
+ (message "Unknown function: %s" tagname))))
+
;; Define function documentation function
(defun php-search-documentation ()
- "Search PHP documentation for the word at point."
+ "Search PHP documentation for the word at the point."
(interactive)
(browse-url (concat php-search-url (current-word t))))
@@ -693,13 +685,7 @@ current `tags-file-name'."
(define-key php-mode-map
'[(control .)]
'php-show-arglist)
-
-;; Use the Emacs standard indentation binding. This may upset c-mode
-;; which does not follow this at the moment, but I see no better
-;; choice.
-(define-key php-mode-map [?\t] 'indent-for-tab-command)
-
-
+
(defconst php-constants
(eval-when-compile
(regexp-opt
@@ -715,12 +701,6 @@ current `tags-file-name'."
"PHP_LOCALSTATEDIR" "PHP_CONFIG_FILE_PATH"
"PHP_EOL"
- ;; date and time constants
- "DATE_ATOM" "DATE_COOKIE" "DATE_ISO8601"
- "DATE_RFC822" "DATE_RFC850" "DATE_RFC1036" "DATE_RFC1123"
- "DATE_RFC2822" "DATE_RFC3339"
- "DATE_RSS" "DATE_W3C"
-
;; from ext/standard:
"EXTR_OVERWRITE" "EXTR_SKIP" "EXTR_PREFIX_SAME"
"EXTR_PREFIX_ALL" "EXTR_PREFIX_INVALID" "SORT_ASC" "SORT_DESC"
@@ -895,7 +875,6 @@ current `tags-file-name'."
; "MCAL_M_WEEKEND" "MCAL_M_ALLDAYS" "MCRYPT_" "MCRYPT_"
; "MCRYPT_ENCRYPT" "MCRYPT_DECRYPT" "MCRYPT_DEV_RANDOM"
; "MCRYPT_DEV_URANDOM" "MCRYPT_RAND" "SWFBUTTON_HIT"
-; "SUNFUNCS_RET_STRING" "SUNFUNCS_RET_DOUBLE"
; "SWFBUTTON_DOWN" "SWFBUTTON_OVER" "SWFBUTTON_UP"
; "SWFBUTTON_MOUSEUPOUTSIDE" "SWFBUTTON_DRAGOVER"
; "SWFBUTTON_DRAGOUT" "SWFBUTTON_MOUSEUP" "SWFBUTTON_MOUSEDOWN"
@@ -1073,7 +1052,7 @@ current `tags-file-name'."
"endfor" "endforeach" "endif" "endswitch" "endwhile" "exit"
"extends" "for" "foreach" "global" "if" "include" "include_once"
"next" "or" "require" "require_once" "return" "static" "switch"
- "then" "var" "while" "xor" "throw" "catch" "try"
+ "then" "var" "while" "xor" "private" "throw" "catch" "try"
"instanceof" "catch all" "finally")))
"PHP keywords.")
@@ -1100,19 +1079,19 @@ current `tags-file-name'."
(list
;; Fontify constants
(cons
- (concat "[^_$]?\\<\\(" php-constants "\\)\\>[^_]?")
- '(1 font-lock-constant-face))
+ (concat "\\<\\(" php-constants "\\)\\>")
+ 'font-lock-constant-face)
;; Fontify keywords
(cons
- (concat "[^_$]?\\<\\(" php-keywords "\\)\\>[^_]?")
- '(1 font-lock-keyword-face))
+ (concat "\\<\\(" php-keywords "\\)\\>")
+ 'font-lock-keyword-face)
;; Fontify keywords and targets, and case default tags.
- (list "\\<\\(break\\|case\\|continue\\)\\>\\s-+\\(-?\\sw+\\)?"
+ (list "\\<\\(break\\|case\\|continue\\)\\>[ \t]*\\(-?\\(?:\\sw\\|\\s_\\)+\\)?"
'(1 font-lock-keyword-face) '(2 font-lock-constant-face t t))
;; This must come after the one for keywords and targets.
- '(":" ("^\\s-+\\(\\sw+\\)\\s-+\\s-+$"
+ '(":" ("^[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)[ \t]*:[ \t]*$"
(beginning-of-line) (end-of-line)
(1 font-lock-constant-face)))
@@ -1121,11 +1100,12 @@ current `tags-file-name'."
'("\\<print\\>" . font-lock-keyword-face)
;; Fontify PHP tag
- (cons php-tags-key font-lock-preprocessor-face)
+ '("<\\?\\(php\\)?" . font-lock-constant-face)
+ '("\\?>" . font-lock-constant-face)
;; Fontify ASP-style tag
- '("<\\%\\(=\\)?" . font-lock-preprocessor-face)
- '("\\%>" . font-lock-preprocessor-face)
+ '("<\\%\\(=\\)?" . font-lock-constant-face)
+ '("\\%>" . font-lock-constant-face)
)
"Subdued level highlighting for PHP mode.")
@@ -1136,33 +1116,33 @@ current `tags-file-name'."
(list
;; class declaration
- '("\\<\\(class\\|interface\\)\\s-+\\(\\sw+\\)?"
+ '("[^_]*\\<\\(class\\|interface\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?"
(1 font-lock-keyword-face) (2 font-lock-type-face nil t))
;; handle several words specially, to include following word,
;; thereby excluding it from unknown-symbol checks later
;; FIX to handle implementing multiple
;; currently breaks on "class Foo implements Bar, Baz"
- '("\\<\\(new\\|extends\\|implements\\)\\s-+\\$?\\(\\sw+\\)"
+ '("\\<\\(new\\|extends\\|implements\\)\\s-+\\$?\\(\\(?:\\sw\\|\\s_\\)+\\)"
(1 font-lock-keyword-face) (2 font-lock-type-face))
;; function declaration
- '("\\<\\(function\\)\\s-+&?\\(\\sw+\\)\\s-*("
+ '("\\<\\(function\\)\\s-+&?\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*("
(1 font-lock-keyword-face)
(2 font-lock-function-name-face nil t))
;; class hierarchy
- '("\\<\\(self\\|parent\\)\\>" (1 font-lock-constant-face nil nil))
+ '("\\(self\\|parent\\)\\W" (1 font-lock-constant-face nil nil))
;; method and variable features
- '("\\<\\(private\\|protected\\|public\\)\\s-+\\$?\\sw+"
+ '("\\<\\(private\\|protected\\|public\\)\\s-+\\$?\\(?:\\sw\\|\\s_\\)+"
(1 font-lock-keyword-face))
;; method features
- '("^\\s-*\\(abstract\\|static\\|final\\)\\s-+\\$?\\sw+"
+ '("^[ \t]*\\(abstract\\|static\\|final\\)\\s-+\\$?\\(?:\\sw\\|\\s_\\)+"
(1 font-lock-keyword-face))
;; variable features
- '("^\\s-*\\(static\\|const\\)\\s-+\\$?\\sw+"
+ '("^[ \t]*\\(static\\|const\\)\\s-+\\$?\\(?:\\sw\\|\\s_\\)+"
(1 font-lock-keyword-face))
))
"Medium level highlighting for PHP mode.")
@@ -1170,61 +1150,113 @@ current `tags-file-name'."
(defconst php-font-lock-keywords-3
(append
php-font-lock-keywords-2
- (list
-
- ;; <word> or </word> for HTML
- ;;'("</?\\sw+[^> ]*>" . font-lock-constant-face)
- ;;'("</?\\sw+[^>]*" . font-lock-constant-face)
- ;;'("<!DOCTYPE" . font-lock-constant-face)
- '("</?[a-z!:]+" . font-lock-constant-face)
-
- ;; HTML >
- '("<[^>]*\\(>\\)" (1 font-lock-constant-face))
-
- ;; HTML tags
- '("\\(<[a-z]+\\)[[:space:]]+\\([a-z:]+=\\)[^>]*?" (1 font-lock-constant-face) (2 font-lock-constant-face) )
- '("\"[[:space:]]+\\([a-z:]+=\\)" (1 font-lock-constant-face))
-
- ;; HTML entities
- ;;'("&\\w+;" . font-lock-variable-name-face)
-
- ;; warn about '$' immediately after ->
- '("\\$\\sw+->\\s-*\\(\\$\\)\\(\\sw+\\)"
- (1 font-lock-warning-face) (2 php-default-face))
+ `(
+ ;; <word> or </word> for HTML
+ ;;'("</?\\sw+[^> ]*>" . font-lock-constant-face)
+ ;;'("</?\\sw+[^>]*" . font-lock-constant-face)
+ ;;'("<!DOCTYPE" . font-lock-constant-face)
+ ("</?[a-z!:]+" . font-lock-constant-face)
+
+ ;; HTML >
+ ("<[^>]*\\(>\\)" (1 font-lock-constant-face))
+
+ ;; HTML tags
+ ("\\(<[a-z]+\\)[[:space:]]+\\([a-z:]+=\\)[^>]*?" (1 font-lock-constant-face) (2 font-lock-constant-face) )
+ ("\"[[:space:]]+\\([a-z:]+=\\)" (1 font-lock-constant-face))
+
+ ;; HTML entities
+ ;;'("&\\w+;" . font-lock-variable-name-face)
+
+ ;; warn about '$' immediately after ->
+ ,@(if php-mode-dollar-property-warning
+ '("\\$\\(?:\\sw\\|\\s_\\)+->\\s-*\\(\\$\\)\\(\\(?:\\sw\\|\\s_\\)+\\)"
+ (1 font-lock-warning-face) (2 php-default-face)))
+
+ ;; warn about $word.word -- it could be a valid concatenation,
+ ;; but without any spaces we'll assume $word->word was meant.
+ ,@(if php-mode-dot-property-warning
+ '("\\$\\(?:\\sw\\|\\s_\\)+\\(\\.\\)\\sw" 1 font-lock-warning-face))
+
+ ;; Warn about ==> instead of =>
+ ("==+>" . font-lock-warning-face)
+
+ ;; exclude casts from bare-word treatment (may contain spaces)
+ (,(concat "(\\s-*\\(" php-types "\\)\\s-*)") 1 font-lock-type-face)
+
+ ;; PHP5: function declarations may contain classes as parameters type
+ (,(concat
+ "[(,]\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-+&?\\$\\(?:\\sw\\|\\s_\\)+\\>")
+ 1 font-lock-type-face)
- ;; warn about $word.word -- it could be a valid concatenation,
- ;; but without any spaces we'll assume $word->word was meant.
- '("\\$\\sw+\\(\\.\\)\\sw"
- 1 font-lock-warning-face)
+ ;; Fontify variables and function calls
+ ("\\$\\(this\\|that\\)\\W" (1 font-lock-constant-face nil nil))
+ (,(concat "\\$\\(" php-superglobals "\\)\\W")
+ (1 font-lock-constant-face nil nil)) ; $_GET & co
+ ("\\$\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face)) ; $variable
+ ("->\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; ->variable
+ ("->\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" . (1 php-default-face t t)) ; ->function_call
+ ("\\(\\(?:\\sw\\|\\s_\\)+\\)::\\(?:\\sw\\|\\s_\\)+\\s-*(?" . (1 font-lock-type-face)) ; class::member
+ ("::\\(\\(?:\\sw\\|\\s_\\)+\\>[^(]\\)" . (1 php-default-face)) ; class::constant
+ ("\\<\\(?:\\sw\\|\\s_\\)+\\s-*[[(]" . php-default-face) ; word( or word[
+ ("\\<[0-9]+" . php-default-face) ; number (also matches word)
+
+ ;; Warn on any words not already fontified
+ ,@(if php-mode-warn-on-unmatched
+ '("\\<\\(?:\\sw\\|\\s_\\)+\\>" . font-lock-warning-face))
+
+ )
+ )
+ "Gauchy level highlighting for PHP mode.")
- ;; Warn about ==> instead of =>
- '("==+>" . font-lock-warning-face)
+;; Define the imenu-generic-expression for PHP mode.
+;; To use, execute M-x imenu, then click on Functions or Classes,
+;; then select given function/class name to go to its definition.
+;; [Contributed by Gerrit Riessen]
+(defvar php-imenu-generic-expression
+ '(
+ ("All Functions"
+ "^\\s-*function\\s-+\\([[:alnum:]_]+\\)\\s-*(" 1)
+ ("Classes"
+ "^\\s-*class\\s-+\\([[:alnum:]_]+\\)\\s-*" 1)
+ ("Public Methods"
+ "^\\s-*public function\\s-+\\([[:alnum:]_]+\\)\\s-*(" 1)
+ ("Protected Methods"
+ "^\\s-*protected function\\s-+\\([[:alnum:]_]+\\)\\s-*(" 1)
+ ("Private Methods"
+ "^\\s-*private function\\s-+\\([[:alnum:]_]+\\)\\s-*(" 1)
+ )
+ "Imenu generic expression for PHP Mode. See `imenu-generic-expression'."
+ )
- ;; exclude casts from bare-word treatment (may contain spaces)
- `(,(concat "(\\s-*\\(" php-types "\\)\\s-*)")
- 1 font-lock-type-face)
+(defconst php-block-stmt-1-kwds '("do" "else" "finally" "try"))
+(defconst php-block-stmt-2-kwds
+ '("for" "if" "while" "switch" "foreach" "elseif" "catch all"))
- ;; PHP5: function declarations may contain classes as parameters type
- `(,(concat "[(,]\\s-*\\(\\sw+\\)\\s-+&?\\$\\sw+\\>")
- 1 font-lock-type-face)
+(defconst php-block-stmt-1-key
+ (regexp-opt php-block-stmt-1-kwds))
+(defconst php-block-stmt-2-key
+ (regexp-opt php-block-stmt-2-kwds))
- ;; Fontify variables and function calls
- '("\\$\\(this\\|that\\)\\W" (1 font-lock-constant-face nil nil))
- `(,(concat "\\$\\(" php-superglobals "\\)\\W")
- (1 font-lock-constant-face nil nil)) ;; $_GET & co
- '("\\$\\(\\sw+\\)" (1 font-lock-variable-name-face)) ;; $variable
- '("->\\(\\sw+\\)" (1 font-lock-variable-name-face t t)) ;; ->variable
- '("->\\(\\sw+\\)\\s-*(" . (1 php-default-face t t)) ;; ->function_call
- '("\\(\\sw+\\)::\\sw+\\s-*(?" . (1 font-lock-type-face)) ;; class::member
- '("::\\(\\sw+\\>[^(]\\)" . (1 php-default-face)) ;; class::constant
- '("\\<\\sw+\\s-*[[(]" . php-default-face) ;; word( or word[
- '("\\<[0-9]+" . php-default-face) ;; number (also matches word)
-
- ;; Warn on any words not already fontified
- '("\\<\\sw+\\>" . font-lock-warning-face)
+(defconst php-class-decl-kwds '("class" "interface"))
- ))
- "Gauchy level highlighting for PHP mode.")
+(defconst php-class-key
+ (concat
+ "\\(" (regexp-opt php-class-decl-kwds) "\\)\\s +"
+ c-symbol-key ;; Class name.
+ "\\(\\s *extends\\s *" c-symbol-key "\\)?" ;; Name of superclass.
+ "\\(\\s *implements *[^{]+{\\)?")) ;; List of any adopted protocols.
+
+;; Create "php-default-face" symbol for GNU Emacs so that both XEmacs
+;; and GNU emacs can refer to the default face.
+(unless (boundp 'php-default-face)
+ (defvar php-default-face 'php-default-face))
+
+;; Create faces for XEmacs
+(when (featurep 'xemacs)
+ (unless (boundp 'font-lock-keyword-face)
+ (copy-face 'bold 'font-lock-keyword-face))
+ (unless (boundp 'font-lock-constant-face)
+ (copy-face 'font-lock-keyword-face 'font-lock-constant-face)))
(provide 'php-mode)
diff --git a/emacs.d/elisp/php-mode.el b/emacs.d/elisp/php-mode.el
deleted file mode 100644
index a8e34bf..0000000
--- a/emacs.d/elisp/php-mode.el
+++ /dev/null
@@ -1,291 +0,0 @@
-
-
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- ViewVC :: http://www.viewvc.org/ -->
-<head>
-<title>SourceForge.net Repository - [php-mode] Index of /</title>
-<meta name="generator" content="ViewVC 1.1.6" />
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="description" content="The world's largest development and download repository of Open Source code and applications" />
-<meta name="keywords" content="Open Source, Development, Developers, Projects, Downloads, OSTG, VA Software, SF.net, SourceForge" />
-<title>SourceForge.net Repository - php-mode Index of /</title>
-<link rel="shortcut icon" href="http://a.fsdn.com/con/img/favicon.ico" />
-<link rel="stylesheet" href="http://a.fsdn.com/con/css/sf.min.css?1256826599" type="text/css" />
-<link rel="stylesheet" href="/viewvc-static/styles.css" type="text/css" />
-<style type="text/css"> .short-head #hd { background-position:0 -247px; } #hd .yui-b { height:47px; margin:0 auto; position:relative; text-align:left; width:74.923em; } pre.vc_log { margin:1em; }</style>
-
-<!-- BEGIN: AdSolution-Tag 4.2: Global-Code [PLACE IN HTML-HEAD-AREA!] -->
-<!-- DoubleClick Random Number -->
-<script language="JavaScript" type="text/javascript">
-dfp_ord=Math.random()*10000000000000000;
-dfp_tile = 1;
-</script>
-<!-- End DoubleClick Random Number -->
-<script type="text/javascript">
-var google_page_url = 'http://sourceforge.net/projects/php-mode/';
-var sourceforge_project_name = 'php-mode';
-var sourceforge_project_description = '';
-</script>
-<!-- END: AdSolution-Tag 4.2: Global-Code -->
-<!-- after META tags -->
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-</head>
-<body class="short-head">
-<!--[if IE 7]><div id="ie7only"><![endif]-->
-<!--[if IE 6]><div id="ie6only"><![endif]-->
-<!--[if IE]><div id="ieonly"><![endif]-->
-<div id="doc3">
-<div id="hd">
-<div class="yui-b">
-<div class="yui-gc">
-<div class="yui-u first">
-<a href="http://sourceforge.net/" class="logo">Find and develop open source software</a>
-</div>
-<div class="yui-u">
-<div class="search">
-<form action="http://sourceforge.net/search/" method="get" name="searchform" id="searchform">
-<input type="hidden" name="type_of_search" value="soft" />
-<input type="text" class="text clear hint" name="words" id="words" value="enter keyword" />
-<span class="yui-button yui-push-button default"><span class="first-child"><button type="submit" value="Search">Search</button></span></span>
-</form>
-</div>
-</div>
-</div>
-</div>
-</div>
-<div id="bd" class="inner-bd">
-<div id="doc4" class="yui-t6">
-<div id="breadcrumbs">
-
-<a href="http://sourceforge.net/">SourceForge.net</a>
-&gt; <a href="http://sourceforge.net/softwaremap/">Find Software</a>
-&gt; <a href="http://sourceforge.net/projects/php-mode/">php-mode</a>
-&gt; SCM Repositories
-
-
-
-&gt; php-mode
-
-
-
-
-</div>
-
-
-
-
-
-
-
-
-
-
-<div id="project_nav_container">
-<h1>SCM Repositories - <a href="http://sourceforge.net/projects/php-mode">php-mode</a></h1>
-</div>
-<hr class="clear">
-<div class="yui-b">
-<div id="fad83">
-<!-- DoubleClick Ad Tag -->
-<script type="text/javascript">
-//<![CDATA[
-document.write('<script src="http://ad.doubleclick.net/adj/ostg.sourceforge/pg_viewvc_p88_shortrec;pg=viewvc;tile='+dfp_tile+';tpc=php-mode;ord='+dfp_ord+'?" type="text/javascript"><\/script>');
-dfp_tile++;
-//]]>
-</script>
-<!-- End DoubleClick Ad Tag -->
-</div>
-</div>
-<div id="yui-main">
-<div class="yui-b">
-
-<!-- you may insert repository access instructions here -->
-
-<div class="sfBox">
-<table class="auto">
-<tr><td>Files shown:</td><td><strong>0</strong>
-
-
-</td></tr>
-
-<tr>
-<td>Directory revision:</td>
-<td><a href="/viewvc/php-mode?view=revision&amp;revision=97" title="Revision 97">97</a> (of <a href="/viewvc/php-mode?view=revision" title="Revision 97">97</a>)</td>
-</tr>
-
-<tr>
-<td>Sticky Revision:</td>
-<td><form method="get" action="/viewvc/php-mode" style="display: inline">
-<div style="display: inline">
-<input type="hidden" name="orig_pathtype" value="DIR"/><input type="hidden" name="orig_view" value="dir"/><input type="hidden" name="orig_path" value=""/><input type="hidden" name="view" value="redirect_pathrev"/>
-
-<input type="text" name="pathrev" value="" size="6"/>
-
-<input type="submit" value="Set" />
-</div>
-</form>
-
-</td>
-</tr>
-
-
-</table>
-
-
-</div>
-</div>
-</div>
-<hr class="clear">
-<div>
-<p><a name="dirlist"></a></p>
-
-<table cellspacing="1" cellpadding="2">
-<thead>
-<tr>
-<th class="vc_header_sort" colspan="2">
-<a href="/viewvc/php-mode/?sortdir=down#dirlist">File</a>
-
-<img class="vc_sortarrow" alt=""
-width="13" height="13"
-src="/viewvc-static/images/up.png" />
-
-</th>
-<th class="vc_header">
-<a href="/viewvc/php-mode/?sortby=rev#dirlist">Rev.</a>
-
-</th>
-<th class="vc_header">
-<a href="/viewvc/php-mode/?sortby=date#dirlist">Age</a>
-
-</th>
-<th class="vc_header">
-<a href="/viewvc/php-mode/?sortby=author#dirlist">Author</a>
-
-</th>
-
-<th class="vc_header">
-<a href="/viewvc/php-mode/?sortby=log#dirlist">Last log entry</a>
-
-</th>
-
-</tr>
-</thead>
-<tbody>
-
-
-<tr class="vc_row_even">
-<td colspan="2">
-
-<a name="branches" href="/viewvc/php-mode/branches/" title="View directory contents">
-
-<img src="/viewvc-static/images/dir.png" alt="" class="vc_icon" />
-branches/</a>
-
-</td>
-
-
-
-<td>&nbsp;<a href="/viewvc/php-mode/branches/?view=log" title="View directory revision log"><strong>3</strong></a></td>
-
-<td>&nbsp;7 years</td>
-<td>&nbsp;turadg</td>
-
-
-<td>&nbsp;Initial import.
-</td>
-
-
-
-</tr>
-
-<tr class="vc_row_odd">
-<td colspan="2">
-
-<a name="tags" href="/viewvc/php-mode/tags/" title="View directory contents">
-
-<img src="/viewvc-static/images/dir.png" alt="" class="vc_icon" />
-tags/</a>
-
-</td>
-
-
-
-<td>&nbsp;<a href="/viewvc/php-mode/tags/?view=log" title="View directory revision log"><strong>94</strong></a></td>
-
-<td>&nbsp;2 years</td>
-<td>&nbsp;ashawley</td>
-
-
-<td>&nbsp;Remove typo tag.</td>
-
-
-
-</tr>
-
-<tr class="vc_row_even">
-<td colspan="2">
-
-<a name="trunk" href="/viewvc/php-mode/trunk/" title="View directory contents">
-
-<img src="/viewvc-static/images/dir.png" alt="" class="vc_icon" />
-trunk/</a>
-
-</td>
-
-
-
-<td>&nbsp;<a href="/viewvc/php-mode/trunk/?view=log" title="View directory revision log"><strong>97</strong></a></td>
-
-<td>&nbsp;2 years</td>
-<td>&nbsp;ashawley</td>
-
-
-<td>&nbsp;Require add-log to avoid byte compilation warning
-for add-log-current-defun-head&hellip;</td>
-
-
-
-</tr>
-
-</tbody>
-</table>
- <hr />
-
-
-
-
-<p style="margin:0;"><a href="/viewvc/php-mode/?view=tar">Download GNU tarball</a></p>
-
-
-<br />
-</div>
-</div>
-</div>
-<div id="ft">
-<div class="yui-b">
-<div class="yui-gb">
-<div class="yui-u first" style="text-align: center;"> <a href="http://p.sf.net/sourceforge/support">SourceForge Help<a/> </div>
-<div class="yui-u" style="text-align: center;"> <strong><a href="/viewvc-static/help_rootview.html">ViewVC Help</a></strong> </div>
-<div class="yui-u" style="text-align: center;"> <a href="http://viewvc.tigris.org/">Powered by ViewVC 1.1.6</a> </div>
-</div>
-<p class="copyright">Copyright &copy; 2010 <a title="Network which provides and promotes Open Source software downloads, development, discussion and news." href="http://geek.net">Geeknet, Inc.</a> All rights reserved. <a href="http://p.sf.net/sourceforge/terms">Terms of Use</a></p>
-</div>
-</div>
-</div>
-<!--[if IE]></div><![endif]-->
-<!--[if IE 6]></div><![endif]-->
-<!--[if IE 7]></div><![endif]-->
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-32013-37");
-pageTracker._setDomainName(".sourceforge.net");
-pageTracker._trackPageview();
-</script>
-</body>
-</html>
-
-
diff --git a/emacs.d/nxhtml/README.txt b/emacs.d/nxhtml/README.txt
deleted file mode 100644
index e9204b4..0000000
--- a/emacs.d/nxhtml/README.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-To install nXhtml put this in your .emacs:
-
- (load "YOUR-PATH-TO/nxhtml/autostart.el")
-
-where autostart.el is the file in the same directory as this
-readme.txt file.
-
-Note 1: If you are using Emacs+EmacsW32 then nXhtml is already
- installed.
-
-Note 2: If you are using Emacs 22 then you need to install nXml
- separately. (It is included in Emacs 23.)
-
-Note 3: You may optionally also byte compile nXhtml from the nXhtml
- menu (recommended).
-
-
-
-Files that are now in Emacs' development (CVS/Bazaar) repository
-================================================================
-
-Some files that were previously distributed with nXhtml are now in
-Emacs' development repository. Distributing them also with nXhtml is
-a bad idea since that can lead to that the wrong file is loaded. They
-are therefore not distributed with nXhtml anymore.
-
-Instead you can (if you do not have the files in your Emacs) in many
-cases use the version from the repository. To do that you can
-currently start from
-
- http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/
-
-Files you can download and use this way are for example
-
- js.el (JavaScript, formerly called espresso.el)
- htmlfontify.el
-
-If you do that I suggest that you put these files in a special
-directory and add that to load-path in your .emacs and make that
-adding to load-path depend on your Emacs version so that they will not
-be loaded when you have upgraded your Emacs.
-
-Note that if you want to use nxml-mode (and it is not in your Emacs)
-you should not download it from Emacs' development directory. Instead go to
-
- http://www.thaiopensource.com/download/
diff --git a/emacs.d/nxhtml/alts/find-recursive-orig.el b/emacs.d/nxhtml/alts/find-recursive-orig.el
deleted file mode 100644
index 509a038..0000000
--- a/emacs.d/nxhtml/alts/find-recursive-orig.el
+++ /dev/null
@@ -1,137 +0,0 @@
-;; find-recursive.el -- Find files recursively into a directory
-;;
-;; Copyright (C) 2001 Ovidiu Predescu
-;;
-;; Author: Ovidiu Predescu <ovidiu@cup.hp.com>
-;; Date: March 26, 2001
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;
-;; Setup: put this file in your Lisp path and add the following line in
-;; your .emacs:
-;;
-;; (require 'find-recursive)
-;;
-
-(require 'cl)
-
-(defcustom find-recursive-exclude-files '(".*.class$" ".*~$" ".*.elc$")
- "List of regular expressions of files to be excluded when recursively searching for files."
- :type '(repeat (string :tag "File regexp")))
-
-(defun find-file-recursively (file-regexp directory)
- (interactive "sFile name to search for recursively: \nDIn directory: ")
- (let ((directory (if (equal (substring directory -1) "/")
- directory
- (concat directory "/")))
- (matches
- (find-recursive-filter-out
- find-recursive-exclude-files
- (find-recursive-directory-relative-files directory "" file-regexp))))
- (cond ((eq (length matches) 0) (message "No file(s) found!"))
- ((eq (length matches) 1)
- (find-file (concat directory (car matches))))
- (t
- (run-with-timer 0.001 nil
- (lambda ()
- (dispatch-event
- (make-event 'key-press '(key tab)))))
- (let ((file (completing-read "Choose file: "
- (mapcar 'list matches)
- nil t)))
- (if (or (eq file nil) (equal file ""))
- (message "No file selected.")
- (find-file (concat directory file))))))))
-
-(defun find-recursive-directory-relative-files (directory
- relative-directory
- file-regexp)
- (let* ((full-dir (concat directory "/" relative-directory))
- (matches
- (mapcar
- (function (lambda (x)
- (concat relative-directory x)))
- (find-recursive-filter-out '(nil)
- (directory-files full-dir nil
- file-regexp nil t))))
- (inner
- (mapcar
- (function
- (lambda (dir)
- (find-recursive-directory-relative-files directory
- (concat relative-directory
- dir "/")
- file-regexp)))
- (find-recursive-filter-out '(nil "\\." "\\.\\.")
- (directory-files full-dir nil ".*"
- nil 'directories)))))
- (mapcar (function (lambda (dir) (setq matches (append matches dir))))
- inner)
- matches))
-
-(defun find-recursive-filter-out (remove-list list)
- "Remove all the elements in *remove-list* from *list*"
- (if (eq list nil)
- nil
- (let ((elem (car list))
- (rest (cdr list)))
- (if (some
- (lambda (regexp)
- (if (or (eq elem nil) (eq regexp nil))
- nil
- (not (eq (string-match regexp elem) nil))))
- remove-list)
- (find-recursive-filter-out remove-list rest)
- (cons elem (find-recursive-filter-out remove-list rest))))))
-
-(defvar find-recursive-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
-
-(if find-recursive-running-xemacs
- nil
- (defadvice directory-files (after
- directory-files-xemacs
- (dirname &optional full match nosort files-only)
- activate)
- "Add an additional argument, FILES-ONLY to the list of arguments
-for GNU Emacs. If the symbol is t, then only the files in the
-directory will be returned. If FILES-ONLY is nil, then both files and
-directories are selected. If FILES-ONLY is not nil and not t, then
-only sundirectories are returned."
- (setq ad-return-value
- (cond ((null files-only) ad-return-value)
- ((eq files-only t)
- (find-recursive-remove-if (lambda (f)
- (file-directory-p
- (concat dirname "/" f)))
- ad-return-value))
- (t
- (find-recursive-remove-if (lambda (f)
- (not (file-directory-p
- (concat dirname "/" f))))
- ad-return-value)))))
-
- (defun find-recursive-remove-if (func list)
- "Removes all elements satisfying FUNC from LIST."
- (let ((result nil))
- (while list
- (if (not (funcall func (car list)))
- (setq result (cons (car list) result)))
- (setq list (cdr list)))
- (nreverse result))))
-
-(global-set-key [(control x) (meta f)] 'find-file-recursively)
-
-(provide 'find-recursive)
diff --git a/emacs.d/nxhtml/alts/javascript-mozlab.el b/emacs.d/nxhtml/alts/javascript-mozlab.el
deleted file mode 100644
index bcec39b..0000000
--- a/emacs.d/nxhtml/alts/javascript-mozlab.el
+++ /dev/null
@@ -1,712 +0,0 @@
-;;; javascript.el --- Major mode for editing JavaScript source text
-
-;; Copyright (C) 2006 Karl Landström
-
-;; Author: Karl Landström <kland@comhem.se>
-;; Maintainer: Karl Landström <kland@comhem.se>
-;; Version: 2.0 Beta 8
-;; Date: 2006-12-26
-;; Keywords: languages, oop
-
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-;;
-;; The main features of this JavaScript mode are syntactic
-;; highlighting (enabled with `font-lock-mode' or
-;; `global-font-lock-mode'), automatic indentation and filling of
-;; comments.
-;;
-;; This package has (only) been tested with GNU Emacs 21.4 (the latest
-;; stable release).
-;;
-;; Installation:
-;;
-;; Put this file in a directory where Emacs can find it (`C-h v
-;; load-path' for more info). Then add the following lines to your
-;; Emacs initialization file:
-;;
-;; (add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
-;; (autoload 'javascript-mode "javascript" nil t)
-;;
-;; General Remarks:
-;;
-;; This mode assumes that block comments are not nested inside block
-;; comments and that strings do not contain line breaks.
-;;
-;; Exported names start with "javascript-" whereas private names start
-;; with "js-".
-;;
-;; Changes:
-;;
-;; See javascript.el.changelog.
-
-;;; Code:
-
-(require 'cc-mode)
-(require 'font-lock)
-(require 'newcomment)
-
-(defgroup javascript nil
- "Customization variables for `javascript-mode'."
- :tag "JavaScript"
- :group 'languages)
-
-(defcustom javascript-indent-level 4
- "Number of spaces for each indentation step."
- :type 'integer
- :group 'javascript)
-
-(defcustom javascript-auto-indent-flag t
- "Automatic indentation with punctuation characters. If non-nil, the
-current line is indented when certain punctuations are inserted."
- :type 'boolean
- :group 'javascript)
-
-
-;; --- Keymap ---
-
-(defvar javascript-mode-map nil
- "Keymap used in JavaScript mode.")
-
-(unless javascript-mode-map
- (setq javascript-mode-map (make-sparse-keymap)))
-
-(when javascript-auto-indent-flag
- (mapc (lambda (key)
- (define-key javascript-mode-map key 'javascript-insert-and-indent))
- '("{" "}" "(" ")" ":" ";" ",")))
-
-(defun javascript-insert-and-indent (key)
- "Run command bound to key and indent current line. Runs the command
-bound to KEY in the global keymap and indents the current line."
- (interactive (list (this-command-keys)))
- (call-interactively (lookup-key (current-global-map) key))
- (indent-according-to-mode))
-
-
-;; --- Syntax Table And Parsing ---
-
-(defvar javascript-mode-syntax-table
- (let ((table (make-syntax-table)))
- (c-populate-syntax-table table)
-
- ;; The syntax class of underscore should really be `symbol' ("_")
- ;; but that makes matching of tokens much more complex as e.g.
- ;; "\\<xyz\\>" matches part of e.g. "_xyz" and "xyz_abc". Defines
- ;; it as word constituent for now.
- (modify-syntax-entry ?_ "w" table)
-
- table)
- "Syntax table used in JavaScript mode.")
-
-
-(defun js-re-search-forward-inner (regexp &optional bound count)
- "Auxiliary function for `js-re-search-forward'."
- (let ((parse)
- (saved-point (point-min)))
- (while (> count 0)
- (re-search-forward regexp bound)
- (setq parse (parse-partial-sexp saved-point (point)))
- (cond ((nth 3 parse)
- (re-search-forward
- (concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
- (save-excursion (end-of-line) (point)) t))
- ((nth 7 parse)
- (forward-line))
- ((or (nth 4 parse)
- (and (eq (char-before) ?\/) (eq (char-after) ?\*)))
- (re-search-forward "\\*/"))
- (t
- (setq count (1- count))))
- (setq saved-point (point))))
- (point))
-
-
-(defun js-re-search-forward (regexp &optional bound noerror count)
- "Search forward but ignore strings and comments. Invokes
-`re-search-forward' but treats the buffer as if strings and
-comments have been removed."
- (let ((saved-point (point))
- (search-expr
- (cond ((null count)
- '(js-re-search-forward-inner regexp bound 1))
- ((< count 0)
- '(js-re-search-backward-inner regexp bound (- count)))
- ((> count 0)
- '(js-re-search-forward-inner regexp bound count)))))
- (condition-case err
- (eval search-expr)
- (search-failed
- (goto-char saved-point)
- (unless noerror
- (error (error-message-string err)))))))
-
-
-(defun js-re-search-backward-inner (regexp &optional bound count)
- "Auxiliary function for `js-re-search-backward'."
- (let ((parse)
- (saved-point (point-min)))
- (while (> count 0)
- (re-search-backward regexp bound)
- (when (and (> (point) (point-min))
- (save-excursion (backward-char) (looking-at "/[/*]")))
- (forward-char))
- (setq parse (parse-partial-sexp saved-point (point)))
- (cond ((nth 3 parse)
- (re-search-backward
- (concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
- (save-excursion (beginning-of-line) (point)) t))
- ((nth 7 parse)
- (goto-char (nth 8 parse)))
- ((or (nth 4 parse)
- (and (eq (char-before) ?/) (eq (char-after) ?*)))
- (re-search-backward "/\\*"))
- (t
- (setq count (1- count))))))
- (point))
-
-
-(defun js-re-search-backward (regexp &optional bound noerror count)
- "Search backward but ignore strings and comments. Invokes
-`re-search-backward' but treats the buffer as if strings and
-comments have been removed."
- (let ((saved-point (point))
- (search-expr
- (cond ((null count)
- '(js-re-search-backward-inner regexp bound 1))
- ((< count 0)
- '(js-re-search-forward-inner regexp bound (- count)))
- ((> count 0)
- '(js-re-search-backward-inner regexp bound count)))))
- (condition-case err
- (eval search-expr)
- (search-failed
- (goto-char saved-point)
- (unless noerror
- (error (error-message-string err)))))))
-
-
-(defun js-continued-var-decl-list-p ()
- "Return non-nil if point is inside a continued variable declaration
-list."
- (interactive)
- (let ((start (save-excursion (js-re-search-backward "\\<var\\>" nil t))))
- (and start
- (save-excursion (re-search-backward "\n" start t))
- (not (save-excursion
- (js-re-search-backward
- ";\\|[^, \t][ \t]*\\(/[/*]\\|$\\)" start t))))))
-
-
-;; --- Font Lock ---
-
-(defun js-inside-param-list-p ()
- "Return non-nil if point is inside a function parameter list."
- (condition-case err
- (save-excursion
- (up-list -1)
- (and (looking-at "(")
- (progn (backward-word 1)
- (or (looking-at "function")
- (progn (backward-word 1) (looking-at "function"))))))
- (error nil)))
-
-
-(defconst js-function-heading-1-re
- "^[ \t]*function[ \t]+\\(\\w+\\)"
- "Regular expression matching the start of a function header.")
-
-(defconst js-function-heading-2-re
- "^[ \t]*\\(\\w+\\)[ \t]*:[ \t]*function\\>"
- "Regular expression matching the start of a function entry in
- an associative array.")
-
-(defconst js-keyword-re
- (regexp-opt '("abstract" "break" "case" "catch" "class" "const"
- "continue" "debugger" "default" "delete" "do" "else"
- "enum" "export" "extends" "final" "finally" "for"
- "function" "goto" "if" "implements" "import" "in"
- "instanceof" "interface" "native" "new" "package"
- "private" "protected" "public" "return" "static"
- "super" "switch" "synchronized" "this" "throw"
- "throws" "transient" "try" "typeof" "var" "void"
- "volatile" "while" "with"
- "let") 'words)
- "Regular expression matching any JavaScript keyword.")
-
-(defconst js-basic-type-re
- (regexp-opt '("boolean" "byte" "char" "double" "float" "int" "long"
- "short" "void") 'words)
- "Regular expression matching any predefined type in JavaScript.")
-
-(defconst js-constant-re
- (regexp-opt '("false" "null" "true") 'words)
- "Regular expression matching any future reserved words in JavaScript.")
-
-
-(defconst js-font-lock-keywords-1
- (list
- "\\<import\\>"
- (list js-function-heading-1-re 1 font-lock-function-name-face)
- (list js-function-heading-2-re 1 font-lock-function-name-face)
- (list "[=(][ \t]*\\(/.*?[^\\]/\\w*\\)" 1 font-lock-string-face))
- "Level one font lock.")
-
-(defconst js-font-lock-keywords-2
- (append js-font-lock-keywords-1
- (list (list js-keyword-re 1 font-lock-keyword-face)
- (cons js-basic-type-re font-lock-type-face)
- (cons js-constant-re font-lock-constant-face)))
- "Level two font lock.")
-
-
-;; Limitations with variable declarations: There seems to be no
-;; sensible way to highlight variables occuring after an initialized
-;; variable in a variable list. For instance, in
-;;
-;; var x, y = f(a, b), z
-;;
-;; z will not be highlighted.
-
-(defconst js-font-lock-keywords-3
- (append
- js-font-lock-keywords-2
- (list
-
- ;; variable declarations
- (list
- (concat "\\<\\(const\\|var\\)\\>\\|" js-basic-type-re)
- (list "\\(\\w+\\)[ \t]*\\([=;].*\\|,\\|/[/*]\\|$\\)"
- nil
- nil
- '(1 font-lock-variable-name-face)))
-
- ;; continued variable declaration list
- (list
- (concat "^[ \t]*\\w+[ \t]*\\([,;=]\\|/[/*]\\|$\\)")
- (list "\\(\\w+\\)[ \t]*\\([=;].*\\|,\\|/[/*]\\|$\\)"
- '(if (save-excursion (backward-char) (js-continued-var-decl-list-p))
- (backward-word 1)
- (end-of-line))
- '(end-of-line)
- '(1 font-lock-variable-name-face)))
-
- ;; formal parameters
- (list
- (concat "\\<function\\>\\([ \t]+\\w+\\)?[ \t]*([ \t]*\\w")
- (list "\\(\\w+\\)\\([ \t]*).*\\)?"
- '(backward-char)
- '(end-of-line)
- '(1 font-lock-variable-name-face)))
-
- ;; continued formal parameter list
- (list
- (concat "^[ \t]*\\w+[ \t]*[,)]")
- (list "\\w+"
- '(if (save-excursion (backward-char) (js-inside-param-list-p))
- (backward-word 1)
- (end-of-line))
- '(end-of-line)
- '(0 font-lock-variable-name-face)))))
- "Level three font lock.")
-
-(defconst js-font-lock-keywords
- '(js-font-lock-keywords-3 js-font-lock-keywords-1 js-font-lock-keywords-2
- js-font-lock-keywords-3)
- "See `font-lock-keywords'.")
-
-
-;; --- Indentation ---
-
-(defconst js-possibly-braceless-keyword-re
- (regexp-opt
- '("catch" "do" "else" "finally" "for" "if" "try" "while" "with" "let")
- 'words)
- "Regular expression matching keywords that are optionally
- followed by an opening brace.")
-
-(defconst js-indent-operator-re
- (concat "[-+*/%<>=&^|?:.]\\([^-+*/]\\|$\\)\\|"
- (regexp-opt '("in" "instanceof") 'words))
- "Regular expression matching operators that affect indentation
- of continued expressions.")
-
-
-(defun js-looking-at-operator-p ()
- "Return non-nil if text after point is an operator (that is not
-a comma)."
- (save-match-data
- (and (looking-at js-indent-operator-re)
- (or (not (looking-at ":"))
- (save-excursion
- (and (js-re-search-backward "[?:{]\\|\\<case\\>" nil t)
- (looking-at "?")))))))
-
-
-(defun js-continued-expression-p ()
- "Returns non-nil if the current line continues an expression."
- (save-excursion
- (back-to-indentation)
- (or (js-looking-at-operator-p)
- (and (js-re-search-backward "\n" nil t)
- (progn
- (skip-chars-backward " \t")
- (backward-char)
- (and (> (point) (point-min))
- (save-excursion (backward-char) (not (looking-at "[/*]/")))
- (js-looking-at-operator-p)
- (and (progn (backward-char)
- (not (looking-at "++\\|--\\|/[/*]"))))))))))
-
-
-(defun js-end-of-do-while-loop-p ()
- "Returns non-nil if word after point is `while' of a do-while
-statement, else returns nil. A braceless do-while statement
-spanning several lines requires that the start of the loop is
-indented to the same column as the current line."
- (interactive)
- (save-excursion
- (save-match-data
- (when (looking-at "\\s-*\\<while\\>")
- (if (save-excursion
- (skip-chars-backward "[ \t\n]*}")
- (looking-at "[ \t\n]*}"))
- (save-excursion
- (backward-list) (backward-word 1) (looking-at "\\<do\\>"))
- (js-re-search-backward "\\<do\\>" (point-at-bol) t)
- (or (looking-at "\\<do\\>")
- (let ((saved-indent (current-indentation)))
- (while (and (js-re-search-backward "^[ \t]*\\<" nil t)
- (/= (current-indentation) saved-indent)))
- (and (looking-at "[ \t]*\\<do\\>")
- (not (js-re-search-forward
- "\\<while\\>" (point-at-eol) t))
- (= (current-indentation) saved-indent)))))))))
-
-
-(defun js-ctrl-statement-indentation ()
- "Returns the proper indentation of the current line if it
-starts the body of a control statement without braces, else
-returns nil."
- (save-excursion
- (back-to-indentation)
- (when (save-excursion
- (and (not (looking-at "[{]"))
- (progn
- (js-re-search-backward "[[:graph:]]" nil t)
- (forward-char)
- (when (= (char-before) ?\)) (backward-list))
- (skip-syntax-backward " ")
- (skip-syntax-backward "w")
- (looking-at js-possibly-braceless-keyword-re))
- (not (js-end-of-do-while-loop-p))))
- (save-excursion
- (goto-char (match-beginning 0))
- (+ (current-indentation) javascript-indent-level)))))
-
-
-(defun js-proper-indentation (parse-status)
- "Return the proper indentation for the current line."
- (save-excursion
- (back-to-indentation)
- (let ((ctrl-stmt-indent (js-ctrl-statement-indentation))
- (same-indent-p (looking-at "[]})]\\|\\<case\\>\\|\\<default\\>"))
- (continued-expr-p (js-continued-expression-p)))
- (cond (ctrl-stmt-indent)
- ((js-continued-var-decl-list-p)
- (js-re-search-backward "\\<var\\>" nil t)
- (+ (current-indentation) javascript-indent-level))
- ((nth 1 parse-status)
- (goto-char (nth 1 parse-status))
- (if (looking-at "[({[][ \t]*\\(/[/*]\\|$\\)")
- (progn
- (skip-syntax-backward " ")
- (when (= (char-before) ?\)) (backward-list))
- (back-to-indentation)
- (cond (same-indent-p
- (current-column))
- (continued-expr-p
- (+ (current-column) (* 2 javascript-indent-level)))
- (t
- (+ (current-column) javascript-indent-level))))
- (unless same-indent-p
- (forward-char)
- (skip-chars-forward " \t"))
- (current-column)))
- (continued-expr-p javascript-indent-level)
- (t 0)))))
-
-
-(defun javascript-indent-line ()
- "Indent the current line as JavaScript source text."
- (interactive)
- (let ((parse-status
- (save-excursion (parse-partial-sexp (point-min) (point-at-bol))))
- (offset (- (current-column) (current-indentation))))
- (when (not (nth 8 parse-status))
- (indent-line-to (js-proper-indentation parse-status))
- (when (> offset 0) (forward-char offset)))))
-
-
-;; --- Filling ---
-
-;; FIXME: It should be possible to use the more sofisticated function
-;; `c-fill-paragraph' in `cc-cmds.el' instead. However, just setting
-;; `fill-paragraph-function' to `c-fill-paragraph' does not work;
-;; inside `c-fill-paragraph', `fill-paragraph-function' evaluates to
-;; nil!?
-
-(defun js-backward-paragraph ()
- "Move backward to start of paragraph. Postcondition: Point is at
-beginning of buffer or the previous line contains only whitespace."
- (forward-line -1)
- (while (not (or (bobp) (looking-at "^[ \t]*$")))
- (forward-line -1))
- (when (not (bobp)) (forward-line 1)))
-
-
-(defun js-forward-paragraph ()
- "Move forward to end of paragraph. Postcondition: Point is at
-end of buffer or the next line contains only whitespace."
- (forward-line 1)
- (while (not (or (eobp) (looking-at "^[ \t]*$")))
- (forward-line 1))
- (when (not (eobp)) (backward-char 1)))
-
-
-(defun js-fill-block-comment-paragraph (parse-status justify)
- "Fill current paragraph as a block comment. PARSE-STATUS is the
-result of `parse-partial-regexp' from beginning of buffer to
-point. JUSTIFY has the same meaning as in `fill-paragraph'."
- (let ((offset (save-excursion
- (goto-char (nth 8 parse-status)) (current-indentation))))
- (save-excursion
- (save-restriction
- (narrow-to-region (save-excursion
- (goto-char (nth 8 parse-status)) (point-at-bol))
- (save-excursion
- (goto-char (nth 8 parse-status))
- (re-search-forward "*/")))
- (narrow-to-region (save-excursion
- (js-backward-paragraph)
- (when (looking-at "^[ \t]*$") (forward-line 1))
- (point))
- (save-excursion
- (js-forward-paragraph)
- (when (looking-at "^[ \t]*$") (backward-char))
- (point)))
- (goto-char (point-min))
- (while (not (eobp))
- (delete-horizontal-space)
- (forward-line 1))
- (let ((fill-column (- fill-column offset))
- (fill-paragraph-function nil))
- (fill-paragraph justify))
-
- ;; In Emacs 21.4 as opposed to CVS Emacs 22,
- ;; `fill-paragraph' seems toadd a newline at the end of the
- ;; paragraph. Remove it!
- (goto-char (point-max))
- (when (looking-at "^$") (backward-delete-char 1))
-
- (goto-char (point-min))
- (while (not (eobp))
- (indent-to offset)
- (forward-line 1))))))
-
-
-(defun js-sline-comment-par-start ()
- "Return point at the beginning of the line where the current
-single-line comment paragraph starts."
- (save-excursion
- (beginning-of-line)
- (while (and (not (bobp))
- (looking-at "^[ \t]*//[ \t]*[[:graph:]]"))
- (forward-line -1))
- (unless (bobp) (forward-line 1))
- (point)))
-
-
-(defun js-sline-comment-par-end ()
- "Return point at end of current single-line comment paragraph."
- (save-excursion
- (beginning-of-line)
- (while (and (not (eobp))
- (looking-at "^[ \t]*//[ \t]*[[:graph:]]"))
- (forward-line 1))
- (unless (bobp) (backward-char))
- (point)))
-
-
-(defun js-sline-comment-offset (line)
- "Return the column at the start of the current single-line
-comment paragraph."
- (save-excursion
- (goto-line line)
- (re-search-forward "//" (point-at-eol))
- (goto-char (match-beginning 0))
- (current-column)))
-
-
-(defun js-sline-comment-text-offset (line)
- "Return the column at the start of the text of the current
-single-line comment paragraph."
- (save-excursion
- (goto-line line)
- (re-search-forward "//[ \t]*" (point-at-eol))
- (current-column)))
-
-
-(defun js-at-empty-sline-comment-p ()
- "Return non-nil if inside an empty single-line comment."
- (and (save-excursion
- (beginning-of-line)
- (not (looking-at "^.*//.*[[:graph:]]")))
- (save-excursion
- (re-search-backward "//" (point-at-bol) t))))
-
-
-(defun js-fill-sline-comments (parse-status justify)
- "Fill current paragraph as a sequence of single-line comments.
-PARSE-STATUS is the result of `parse-partial-regexp' from
-beginning of buffer to point. JUSTIFY has the same meaning as in
-`fill-paragraph'."
- (when (not (js-at-empty-sline-comment-p))
- (let* ((start (js-sline-comment-par-start))
- (start-line (1+ (count-lines (point-min) start)))
- (end (js-sline-comment-par-end))
- (offset (js-sline-comment-offset start-line))
- (text-offset (js-sline-comment-text-offset start-line)))
- (save-excursion
- (save-restriction
- (narrow-to-region start end)
- (goto-char (point-min))
- (while (re-search-forward "^[ \t]*//[ \t]*" nil t)
- (replace-match "")
- (forward-line 1))
- (let ((fill-paragraph-function nil)
- (fill-column (- fill-column text-offset)))
- (fill-paragraph justify))
-
- ;; In Emacs 21.4 as opposed to CVS Emacs 22,
- ;; `fill-paragraph' seems toadd a newline at the end of the
- ;; paragraph. Remove it!
- (goto-char (point-max))
- (when (looking-at "^$") (backward-delete-char 1))
-
- (goto-char (point-min))
- (while (not (eobp))
- (indent-to offset)
- (insert "//")
- (indent-to text-offset)
- (forward-line 1)))))))
-
-
-(defun js-trailing-comment-p (parse-status)
- "Return non-nil if inside a trailing comment. PARSE-STATUS is
-the result of `parse-partial-regexp' from beginning of buffer to
-point."
- (save-excursion
- (when (nth 4 parse-status)
- (goto-char (nth 8 parse-status))
- (skip-chars-backward " \t")
- (not (bolp)))))
-
-
-(defun js-block-comment-p (parse-status)
- "Return non-nil if inside a block comment. PARSE-STATUS is the
-result of `parse-partial-regexp' from beginning of buffer to
-point."
- (save-excursion
- (save-match-data
- (when (nth 4 parse-status)
- (goto-char (nth 8 parse-status))
- (looking-at "/\\*")))))
-
-
-(defun javascript-fill-paragraph (&optional justify)
- "If inside a comment, fill the current comment paragraph.
-Trailing comments are ignored."
- (interactive)
- (let ((parse-status (parse-partial-sexp (point-min) (point))))
- (when (and (nth 4 parse-status)
- (not (js-trailing-comment-p parse-status)))
- (if (js-block-comment-p parse-status)
- (js-fill-block-comment-paragraph parse-status justify)
- (js-fill-sline-comments parse-status justify))))
- t)
-
-
-;; --- Imenu ---
-
-(defconst js-imenu-generic-expression
- (list
- (list
- nil
- "function\\s-+\\(\\w+\\)\\s-*("
- 1))
- "Regular expression matching top level procedures. Used by imenu.")
-
-
-;; --- Main Function ---
-
-;;;###autoload
-(defun javascript-mode ()
- "Major mode for editing JavaScript source text.
-
-Key bindings:
-
-\\{javascript-mode-map}"
- (interactive)
- (kill-all-local-variables)
-
- (use-local-map javascript-mode-map)
- (set-syntax-table javascript-mode-syntax-table)
- (set (make-local-variable 'indent-line-function) 'javascript-indent-line)
- (set (make-local-variable 'font-lock-defaults) (list js-font-lock-keywords))
-
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
-
- ;; Comments
- (setq comment-start "// ")
- (setq comment-end "")
- (set (make-local-variable 'fill-paragraph-function)
- 'javascript-fill-paragraph)
-
- ;; Make c-mark-function work
- (setq c-nonsymbol-token-regexp "!=\\|%=\\|&[&=]\\|\\*[/=]\\|\\+[+=]\\|-[=-]\\|/[*/=]\\|<\\(?:<=\\|[<=]\\)\\|==\\|>\\(?:>\\(?:>=\\|[=>]\\)\\|[=>]\\)\\|\\^=\\||[=|]\\|[]!%&(-,./:-?[{-~^-]"
- c-stmt-delim-chars "^;{}?:"
- c-syntactic-ws-end "[ \n
- \f/]"
- c-syntactic-eol "\\(\\s \\|/\\*\\([^*\n
-]\\|\\*[^/\n
-]\\)*\\*/\\)*\\(\\(/\\*\\([^*\n
-]\\|\\*[^/\n
-]\\)*\\|\\\\\\)?$\\|//\\)")
-
- ;; Imenu
- (setq imenu-case-fold-search nil)
- (set (make-local-variable 'imenu-generic-expression)
- js-imenu-generic-expression)
-
- (setq major-mode 'javascript-mode)
- (setq mode-name "JavaScript")
- (run-hooks 'javascript-mode-hook))
-
-
-(provide 'javascript-mode)
-;;; javascript.el ends here
diff --git a/emacs.d/nxhtml/alts/smarty-mode-vdebout.el b/emacs.d/nxhtml/alts/smarty-mode-vdebout.el
deleted file mode 100644
index 94d7352..0000000
--- a/emacs.d/nxhtml/alts/smarty-mode-vdebout.el
+++ /dev/null
@@ -1,2715 +0,0 @@
-;;; smarty-mode.el --- major mode for editing Smarty templates
-
-;; Author: Vincent DEBOUT <deboutv@free.fr>
-;; Maintainer: Vincent DEBOUT <deboutv@free.fr>
-;; Keywords: languages smarty templates
-;; WWW: http://deboutv.free.fr/lisp/smarty/
-
-;;; License
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-;;; History
-
-;; $Log: smarty-mode.el,v $
-;; Revision 1.6 2006/12/16 19:54:26 vincent
-;; Update release version
-;;
-;; Revision 1.5 2006/12/16 19:53:00 vincent
-;; Fix bug #15
-;;
-;; Revision 1.4 2006/12/16 14:59:46 vincent
-;; Fix bugs for release
-;;
-;; Revision 1.3 2006/11/19 12:29:53 vincent
-;; Fix highlight bug, add templates
-;;
-;; Revision 1.2 2006/11/12 11:44:18 vincent
-;; First release commit
-;;
-
-(defconst smarty-version "0.0.4"
- "Smarty Mode version number.")
-
-(defconst smarty-time-stamp "2006-12-16"
- "Smarty Mode time stamp for last update.")
-
-(require 'font-lock)
-(require 'cc-mode)
-(require 'custom)
-(require 'etags)
-(eval-when-compile
-(require 'regexp-opt))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Customization
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defgroup smarty nil
- "Customizations for Smarty mode."
- :prefix "smarty-"
- :group 'languages)
-
-(defgroup smarty-mode nil
- "Customizations for Smarty mode."
- :group 'smarty)
-
-(defcustom smarty-electric-mode t
- "*Non-nil enables electrification (automatic template generation).
-If nil, template generators can still be invoked through key bindings and
-menu. Is indicated in the modeline by \"/e\" after the mode name and can be
-toggled by `\\[smarty-electric-mode]'."
- :type 'boolean
- :group 'smarty-mode)
-
-(defcustom smarty-stutter-mode t
- "*Non-nil enables stuttering.
-Is indicated in the modeline by \"/s\" after the mode name and can be toggled
-by `\\[smarty-stutter-mode]'."
- :type 'boolean
- :group 'smarty-mode)
-
-(defgroup smarty-menu nil
- "Customizations for menues."
- :group 'smarty)
-
-(defcustom smarty-source-file-menu t
- "*Non-nil means add a menu of all source files in current directory."
- :type 'boolean
- :group 'smarty-menu)
-
-(defgroup smarty-highlight nil
- "Customizations for highlight."
- :group 'smarty)
-
-(defcustom smarty-highlight-plugin-functions t
- "*Non-nil means highlight the plugin functions in the buffer."
- :type 'boolean
- :group 'smarty-highlight)
-
-(defgroup smarty-template nil
- "Customizations for templates."
- :group 'smarty)
-
-(defgroup smarty-header nil
- "Customizations for header template."
- :group 'smarty-template)
-
-(defcustom smarty-file-header ""
- "*String or file to insert as file header.
-If the string specifies an existing file name, the contents of the file is
-inserted, otherwise the string itself is inserted as file header.
-Type `C-j' for newlines.
-If the header contains RCS keywords, they may be written as <RCS>Keyword<RCS>
-if the header needs to be version controlled.
-
-The following keywords for template generation are supported:
- <filename> : replaced by the name of the buffer
- <author> : replaced by the user name and email address
- \(`user-full-name',`mail-host-address', `user-mail-address')
- <login> : replaced by user login name (`user-login-name')
- <company> : replaced by contents of option `smarty-company-name'
- <date> : replaced by the current date
- <year> : replaced by the current year
- <copyright> : replaced by copyright string (`smarty-copyright-string')
- <cursor> : final cursor position."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-file-footer ""
- "*String or file to insert as file footer.
-If the string specifies an existing file name, the contents of the file is
-inserted, otherwise the string itself is inserted as file footer (i.e. at
-the end of the file).
-Type `C-j' for newlines.
-The same keywords as in option `smarty-file-header' can be used."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-company-name ""
- "*Name of company to insert in file header.
-See option `smarty-file-header'."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-copyright-string ""
- "*Copyright string to insert in file header.
-Can be multi-line string (type `C-j' for newline) and contain other file
-header keywords (see option `smarty-file-header')."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-date-format "%Y-%m-%d"
- "*Specifies the date format to use in the header.
-This string is passed as argument to the command `format-time-string'.
-For more information on format strings, see the documentation for the
-`format-time-string' command (C-h f `format-time-string')."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-modify-date-prefix-string ""
- "*Prefix string of modification date in Smarty file header.
-If actualization of the modification date is called (menu,
-`\\[smarty-template-modify]'), this string is searched and the rest
-of the line replaced by the current date."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-modify-date-on-saving nil
- "*Non-nil means update the modification date when the buffer is saved.
-Calls function `\\[smarty-template-modify]').
-
-NOTE: Activate the new setting in a Smarty buffer by using the menu entry
- \"Activate Options\"."
- :type 'boolean
- :group 'smarty-header)
-
-(defgroup smarty-misc nil
- "Miscellaneous customizations."
- :group 'smarty)
-
-(defcustom smarty-left-delimiter "{"
- "Left escaping delimiter."
- :type 'string
- :group 'smarty-misc)
-
-(defcustom smarty-right-delimiter "}"
- "Right escaping delimiter."
- :type 'string
- :group 'smarty-misc)
-
-(defcustom smarty-intelligent-tab t
- "*Non-nil means `TAB' does indentation, word completion and tab insertion.
-That is, if preceding character is part of a word then complete word,
-else if not at beginning of line then insert tab,
-else if last command was a `TAB' or `RET' then dedent one step,
-else indent current line (i.e. `TAB' is bound to `smarty-electric-tab').
-If nil, TAB always indents current line (i.e. `TAB' is bound to
-`indent-according-to-mode').
-
-NOTE: Activate the new setting in a Smarty buffer by using the menu entry
- \"Activate Options\"."
- :type 'boolean
- :group 'smarty-misc)
-
-(defcustom smarty-word-completion-in-minibuffer t
- "*Non-nil enables word completion in minibuffer (for template prompts).
-
-NOTE: Activate the new setting by restarting Emacs."
- :type 'boolean
- :group 'smarty-misc)
-
-(defcustom smarty-word-completion-case-sensitive nil
- "*Non-nil means word completion using `TAB' is case sensitive.
-That is, `TAB' completes words that start with the same letters and case.
-Otherwise, case is ignored."
- :type 'boolean
- :group 'smarty-misc)
-
-;; Functions
-
-(defun smarty-customize ()
- "Call the customize function with `smarty' as argument."
- (interactive)
- (customize-browse 'smarty))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Variables
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-menu-max-size 20
- "*Specifies the maximum size of a menu before splitting it into submenues.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Menu tools functions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-menu-split (list title)
- "Split menu LIST into several submenues, if number of
-elements > `smarty-menu-max-size'."
- (if (> (length list) smarty-menu-max-size)
- (let ((remain list)
- (result '())
- (sublist '())
- (menuno 1)
- (i 0))
- (while remain
- (setq sublist (cons (car remain) sublist))
- (setq remain (cdr remain))
- (setq i (+ i 1))
- (if (= i smarty-menu-max-size)
- (progn
- (setq result (cons (cons (format "%s %s" title menuno)
- (nreverse sublist)) result))
- (setq i 0)
- (setq menuno (+ menuno 1))
- (setq sublist '()))))
- (and sublist
- (setq result (cons (cons (format "%s %s" title menuno)
- (nreverse sublist)) result)))
- (nreverse result))
- list))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Source file menu
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-sources-menu nil)
-
-;; Create the source menu
-(defun smarty-add-source-files-menu ()
- "Scan directory for all Smarty source files and generate menu.
-The directory of the current source file is scanned."
- (interactive)
- (message "Scanning directory for source files ...")
- (let ((newmap (current-local-map))
- (file-list (smarty-get-source-files))
- menu-list found)
- ;; Create list for menu
- (setq found nil)
- (while file-list
- (setq found t)
- (setq menu-list (cons (vector (car file-list)
- (list 'find-file (car file-list)) t)
- menu-list))
- (setq file-list (cdr file-list)))
- (setq menu-list (smarty-menu-split menu-list "Sources"))
- (when found (setq menu-list (cons "--" menu-list)))
- (setq menu-list (cons ["*Rescan*" smarty-add-source-files-menu t] menu-list))
- (setq menu-list (cons "Sources" menu-list))
- ;; Create menu
- (easy-menu-add menu-list)
- (easy-menu-define smarty-sources-menu newmap
- "Smarty source files menu" menu-list))
- (message ""))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Smarty menu
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-create-mode-menu ()
- "Create Smarty Mode menu."
- `("Smarty"
- ("Templates"
- ("Built-in Functions"
- ["capture" smarty-template-capture t]
- ["config_load" smarty-template-config-load t]
- ["else" smarty-template-else t]
- ["elseif" smarty-template-elseif t]
- ["foreach" smarty-template-foreach t]
- ["foreachelse" smarty-template-foreachelse t]
- ["if" smarty-template-if t]
- ["include" smarty-template-include t]
- ["include_php" smarty-template-include-php t]
- ["insert" smarty-template-insert t]
- ["ldelim" smarty-template-ldelim t]
- ["literal" smarty-template-literal t]
- ["php" smarty-template-php t]
- ["rdelim" smarty-template-rdelim t]
- ["section" smarty-template-section t]
- ["sectionelse" smarty-template-sectionelse t]
- ["strip" smarty-template-strip t])
- ("Custom Functions"
- ["assign" smarty-template-assign t]
- ["counter" smarty-template-counter t]
- ["cycle" smarty-template-cycle t]
- ["debug" smarty-template-debug t]
- ["eval" smarty-template-eval t]
- ["fetch" smarty-template-fetch t]
- ["html_checkboxes" smarty-template-html-checkboxes t]
- ["html_image" smarty-template-html-image t]
- ["html_options" smarty-template-html-options t]
- ["html_radios" smarty-template-html-radios t]
- ["html_select_date" smarty-template-html-select-date t]
- ["html_select_time" smarty-template-html-select-time t]
- ["html_table" smarty-template-html-table t]
- ["mailto" smarty-template-mailto t]
- ["math" smarty-template-math t]
- ["popup" smarty-template-popup t]
- ["popup_init" smarty-template-popup-init t]
- ["textformat" smarty-template-textformat t])
- ("Variable Modifiers"
- ["capitalize" smarty-template-capitalize t]
- ["cat" smarty-template-cat t]
- ["count_characters" smarty-template-count-characters t]
- ["count_paragraphs" smarty-template-count-paragraphs t]
- ["count_sentences" smarty-template-count-sentences t]
- ["count_words" smarty-template-count-words t]
- ["date_format" smarty-template-date-format t]
- ["default" smarty-template-default t]
- ["escape" smarty-template-escape t]
- ["indent" smarty-template-indent t]
- ["lower" smarty-template-lower t]
- ["nl2br" smarty-template-nl2br t]
- ["regex_replace" smarty-template-regex-replace t]
- ["replace" smarty-template-replace t]
- ["spacify" smarty-template-spacify t]
- ["string_format" smarty-template-string-format t]
- ["strip" smarty-template-vstrip t]
- ["strip_tags" smarty-template-strip-tags t]
- ["truncate" smarty-template-truncate t]
- ["upper" smarty-template-upper t]
- ["wordwrap" smarty-template-wordwrap t])
- ("Plugins (Functions)"
- ("SmartyFormtool"
- ["formtool_checkall" smarty-template-formtool-checkall t]
- ["formtool_copy" smarty-template-formtool-copy t]
- ["formtool_count_chars" smarty-template-formtool-count-chars t]
- ["formtool_init" smarty-template-formtool-init t]
- ["formtool_move" smarty-template-formtool-move t]
- ["formtool_moveall" smarty-template-formtool-moveall t]
- ["formtool_movedown" smarty-template-formtool-movedown t]
- ["formtool_moveup" smarty-template-formtool-moveup t]
- ["formtool_remove" smarty-template-formtool-remove t]
- ["formtool_rename" smarty-template-formtool-rename t]
- ["formtool_save" smarty-template-formtool-save t]
- ["formtool_selectall" smarty-template-formtool-selectall t])
- ("SmartyPaginate"
- ["paginate_first" smarty-template-paginate-first t]
- ["paginate_last" smarty-template-paginate-last t]
- ["paginate_middle" smarty-template-paginate-middle t]
- ["paginate_next" smarty-template-paginate-next t]
- ["paginate_prev" smarty-template-paginate-prev t])
- ("SmartyValidate"
- ["validate" smarty-template-validate t]))
- ("Plugins (Variable Modifiers)"
- ("AlternativeDateModifierPlugin"
- ["date_format2" smarty-template-date-formatto t])
- ("B2Smilies"
- ["B2Smilies" smarty-template-btosmilies t])
- ("BBCodePlugin"
- ["bbcode2html" smarty-template-bbcodetohtml t])
- )
- "--"
- ["Insert Header" smarty-template-header t]
- ["Insert Footer" smarty-template-footer t]
- ["Insert Date" smarty-template-insert-date t]
- ["Modify Date" smarty-template-modify t])
- "--"
- ["Show Messages" smarty-show-messages :keys "C-c M-m"]
- ["Smarty Mode Documentation" smarty-doc-mode :keys "C-c C-h"]
- ["Version" smarty-version :keys "C-c C-v"]
- "--"
- ("Options"
- ("Mode"
- ["Electric Mode"
- (progn (customize-set-variable 'smarty-electric-mode
- (not smarty-electric-mode))
- (smarty-mode-line-update))
- :style toggle :selected smarty-electric-mode :keys "C-c C-m C-e"]
- ["Stutter Mode"
- (progn (customize-set-variable 'smarty-stutter-mode
- (not smarty-stutter-mode))
- (smarty-mode-line-update))
- :style toggle :selected smarty-stutter-mode :keys "C-c C-m C-s"]
- "--"
- ["Customize Group..." (customize-group 'smarty-mode) t])
- ("Menu"
- ["Source Menu"
- (customize-set-variable 'smarty-source-file-menu
- (not smarty-source-file-menu))
- :style toggle :selected smarty-source-file-menu]
- "--"
- ["Customize Group..." (customize-group 'smarty-menu) t])
- ("Highlight"
- ["Highlight plugin functions"
- (progn (customize-set-variable 'smarty-highlight-plugin-functions
- (not smarty-highlight-plugin-functions)))
- :style toggle :selected smarty-highlight-plugin-functions]
- "--"
- ["Customize Group..." (customize-group 'smarty-highlight) t])
- ("Template"
- ("Header"
- ["Header template..."
- (customize-option 'smarty-file-header) t]
- ["Footer template..."
- (customize-option 'smarty-file-footer) t]
- ["Company..."
- (customize-option 'smarty-company-name) t]
- ["Copyright..."
- (customize-option 'smarty-copyright-string) t]
- ["Date format..."
- (customize-option 'smarty-date-format) t]
- ["Modify date prefix..."
- (customize-option 'smarty-modify-date-prefix-string) t]
- ["Modify date on saving"
- (customize-set-variable 'smarty-modify-date-on-saving
- (not smarty-modify-date-on-saving))
- :style toggle :selected smarty-modify-date-on-saving]
- "--"
- ["Customize Group..." (customize-group 'smarty-header) t])
- "--"
- ["Customize Group..." (customize-group 'smarty-template) t])
- ("Miscellaneous"
- ["Left delimiter..."
- (customize-option 'smarty-left-delimiter) t]
- ["Right delimiter..."
- (customize-option 'smarty-right-delimiter) t]
- ["Use Intelligent Tab"
- (progn (customize-set-variable 'smarty-intelligent-tab
- (not smarty-intelligent-tab))
- (smarty-activate-customizations))
- :style toggle :selected smarty-intelligent-tab]
- ["Word Completion in Minibuffer"
- (progn (customize-set-variable 'smarty-word-completion-in-minibuffer
- (not smarty-word-completion-in-minibuffer))
- (message "Activate new setting by saving options and restarting Emacs"))
- :style toggle :selected smarty-word-completion-in-minibuffer]
- ["Completion is case sensitive"
- (customize-set-variable 'smarty-word-completion-case-sensitive
- (not smarty-word-completion-case-sensitive))
- :style toggle :selected smarty-word-completion-case-sensitive]
- "--"
- ["Customize Group..." (customize-group 'smarty-misc) t])
- "--"
- ["Save Options" customize-save-customized t]
- ["Activate Options" smarty-activate-customizations t]
- ["Browse Options..." smarty-customize t])))
-
-(defvar smarty-mode-menu-list (smarty-create-mode-menu)
- "Smarty Mode menu.")
-
-(defvar smarty-mode-map nil
- "Keymap for Smarty Mode.")
-
-(defun smarty-update-mode-menu ()
- "Update Smarty Mode menu."
- (interactive)
- (easy-menu-remove smarty-mode-menu-list)
- (setq smarty-mode-menu-list (smarty-create-mode-menu))
- (easy-menu-add smarty-mode-menu-list)
- (easy-menu-define smarty-mode-menu smarty-mode-map
- "Menu keymap for Smarty Mode." smarty-mode-menu-list))
-
-
-
-
-(defvar smarty-mode-hook nil)
-
-(defvar smarty-functions nil
- "List of Smarty functions.")
-
-(defvar smarty-functions-regexp nil
- "Regexp for Smarty functions.")
-
-(defconst smarty-01-functions
- '("capture" "config_load" "foreach" "foreachelse" "include"
- "include_php" "insert" "if" "elseif" "else" "ldelim" "rdelim"
- "literal" "php" "section" "sectionelse" "strip" "assign" "counter"
- "cycle" "debug" "eval" "fetch" "html_checkboxes" "html_image"
- "html_options" "html_radios" "html_select_date" "html_select_time"
- "html_table" "math" "mailto" "popup_init" "popup" "textformat")
- "Smarty built-in & custom functions.")
-
-(defvar smarty-modifiers nil
- "List of Smarty variable modifiers.")
-
-(defvar smarty-modifiers-regexp nil
- "Regexp for Smarty variable modifiers.")
-
-(defconst smarty-01-modifiers
- '("capitalize" "cat" "count_characters" "count_paragraphs"
- "count_sentences" "count_words" "date_format" "default"
- "escape" "indent" "lower" "nl2br" "regex_replace" "replace"
- "spacify" "string_format" "strip" "strip_tags" "truncate"
- "upper" "wordwrap")
- "Smarty variable modifiers.")
-
-(defvar smarty-plugins-functions nil
- "List of Smarty functions.")
-
-(defvar smarty-plugins-functions-regexp nil
- "Regexp for Smarty functions.")
-
-(defconst smarty-01-plugins-functions
- '("validate" "formtool_checkall" "formtool_copy" "formtool_count_chars"
- "formtool_init" "formtool_move" "formtool_moveall"
- "formtool_movedown" "formtool_moveup" "formtool_remove"
- "formtool_rename" "formtool_save" "formtool_selectall"
- "paginate_first" "paginate_last" "paginate_middle"
- "paginate_next" "paginate_prev")
- "Smarty plugins functions.")
-
-(defvar smarty-plugins-modifiers nil
- "List of Smarty variable modifiers.")
-
-(defvar smarty-plugins-modifiers-regexp nil
- "Regexp for Smarty functions.")
-
-(defconst smarty-01-plugins-modifiers
- '("B2Smilies" "bbcode2html" "date_format2")
- "Smarty plugins modifiers.")
-
-(defconst smarty-constants
- (eval-when-compile
- (regexp-opt
- '("TRUE" "FALSE" "NULL") t))
- "Smarty constants.")
-
-
-;; Syntax table creation
-(defvar smarty-mode-syntax-table nil
- "Syntax table for smarty-mode.")
-
-(defvar smarty-mode-ext-syntax-table nil
- "Syntax table extended by `_' used in `smarty-mode' buffers.")
-
-(defun smarty-create-syntax-table ()
- (if smarty-mode-syntax-table
- ()
- (setq smarty-mode-syntax-table (make-syntax-table))
-
- ;; Make | a punctuation character
- (modify-syntax-entry ?| "." smarty-mode-syntax-table)
- ;; Make " a punctuation character so highlighing works withing html strings
- (modify-syntax-entry ?\" "." smarty-mode-syntax-table)
- ;; define parentheses to match
- (modify-syntax-entry ?\( "()" smarty-mode-syntax-table)
- (modify-syntax-entry ?\) ")(" smarty-mode-syntax-table)
- (modify-syntax-entry ?\[ "(]" smarty-mode-syntax-table)
- (modify-syntax-entry ?\] ")[" smarty-mode-syntax-table)
- (modify-syntax-entry ?\{ "(}" smarty-mode-syntax-table)
- (modify-syntax-entry ?\} "){" smarty-mode-syntax-table)
- )
- (set-syntax-table smarty-mode-syntax-table)
- ;; extended syntax table including '_' (for simpler search regexps)
- (setq smarty-mode-ext-syntax-table (copy-syntax-table smarty-mode-syntax-table))
- (modify-syntax-entry ?_ "w" smarty-mode-ext-syntax-table))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; File/directory manipulation
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-directory-files (directory &optional full match)
- "Call `directory-files' if DIRECTORY exists, otherwise generate error
-message."
- (if (not (file-directory-p directory))
- (smarty-warning-when-idle "No such directory: \"%s\"" directory)
- (let ((dir (directory-files directory full match)))
- (setq dir (delete "." dir))
- (setq dir (delete ".." dir))
- dir)))
-
-(defun smarty-get-source-files (&optional full directory)
- "Get list of SMARTY source files in DIRECTORY or current directory."
- (let ((mode-alist auto-mode-alist)
- filename-regexp)
- ;; create regular expressions for matching file names
- (setq filename-regexp "\\`[^.].*\\(")
- (while mode-alist
- (when (eq (cdar mode-alist) 'smarty-mode)
- (setq filename-regexp
- (concat filename-regexp (caar mode-alist) "\\|")))
- (setq mode-alist (cdr mode-alist)))
- (setq filename-regexp
- (concat (substring filename-regexp 0
- (string-match "\\\\|$" filename-regexp)) "\\)"))
- ;; find files
- (smarty-directory-files
- (or directory default-directory) full filename-regexp)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Messages reporting
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-warnings nil
- "Warnings to tell the user during start up.")
-
-(defun smarty-run-when-idle (secs repeat function)
- "Wait until idle, then run FUNCTION."
- (if (fboundp 'start-itimer)
- (start-itimer "smarty-mode" function secs repeat t)
-; (run-with-idle-timer secs repeat function)))
- ;; explicitely activate timer (necessary when Emacs is already idle)
- (aset (run-with-idle-timer secs repeat function) 0 nil)))
-
-(defun smarty-warning-when-idle (&rest args)
- "Wait until idle, then print out warning STRING and beep."
- (if noninteractive
- (smarty-warning (apply 'format args) t)
- (unless smarty-warnings
- (smarty-run-when-idle .1 nil 'smarty-print-warnings))
- (setq smarty-warnings (cons (apply 'format args) smarty-warnings))))
-
-(defun smarty-warning (string &optional nobeep)
- "Print out warning STRING and beep."
- (message (concat "WARNING: " string))
- (unless (or nobeep noninteractive) (beep)))
-
-(defun smarty-print-warnings ()
- "Print out messages in variable `smarty-warnings'."
- (let ((no-warnings (length smarty-warnings)))
- (setq smarty-warnings (nreverse smarty-warnings))
- (while smarty-warnings
- (message (concat "WARNING: " (car smarty-warnings)))
- (setq smarty-warnings (cdr smarty-warnings)))
- (beep)
- (when (> no-warnings 1)
- (message "WARNING: See warnings in message buffer (type `C-c M-m')."))))
-
-(defun smarty-show-messages ()
- "Get *Messages* buffer to show recent messages."
- (interactive)
- (display-buffer " *Message-Log*"))
-
-(defun smarty-version ()
- "Echo the current version of Smarty Mode in the minibuffer."
- (interactive)
- (message "Smarty Mode %s (%s)" smarty-version smarty-time-stamp)
- (smarty-keep-region-active))
-
-;; active regions
-(defun smarty-keep-region-active ()
- "Do whatever is necessary to keep the region active in XEmacs.
-Ignore byte-compiler warnings you might see."
- (and (boundp 'zmacs-region-stays)
- (setq zmacs-region-stays t)))
-
-(defmacro smarty-prepare-search-1 (&rest body)
- "Enable case insensitive search and switch to syntax table that includes '_',
-then execute BODY, and finally restore the old environment. Used for
-consistent searching."
- `(let ((case-fold-search t) ; case insensitive search
- (current-syntax-table (syntax-table))
- result
- (restore-prog ; program to restore enviroment
- '(progn
- ;; restore syntax table
- (set-syntax-table current-syntax-table))))
- ;; use extended syntax table
- (set-syntax-table smarty-mode-ext-syntax-table)
- ;; execute BODY safely
- (setq result
- (condition-case info
- (progn ,@body)
- (error (eval restore-prog) ; restore environment on error
- (error (cadr info))))) ; pass error up
- ;; restore environment
- (eval restore-prog)
- result))
-
-(defmacro smarty-prepare-search-2 (&rest body)
- "Enable case insensitive search, switch to syntax table that includes '_',
-and remove `intangible' overlays, then execute BODY, and finally restore the
-old environment. Used for consistent searching."
- `(let ((case-fold-search t) ; case insensitive search
- (current-syntax-table (syntax-table))
- result overlay-all-list overlay-intangible-list overlay
- (restore-prog ; program to restore enviroment
- '(progn
- ;; restore syntax table
- (set-syntax-table current-syntax-table)
- ;; restore `intangible' overlays
- (when (fboundp 'overlay-lists)
- (while overlay-intangible-list
- (overlay-put (car overlay-intangible-list) 'intangible t)
- (setq overlay-intangible-list
- (cdr overlay-intangible-list)))))))
- ;; use extended syntax table
- (set-syntax-table smarty-mode-ext-syntax-table)
- ;; remove `intangible' overlays
- (when (fboundp 'overlay-lists)
- (setq overlay-all-list (overlay-lists))
- (setq overlay-all-list
- (append (car overlay-all-list) (cdr overlay-all-list)))
- (while overlay-all-list
- (setq overlay (car overlay-all-list))
- (when (memq 'intangible (overlay-properties overlay))
- (setq overlay-intangible-list
- (cons overlay overlay-intangible-list))
- (overlay-put overlay 'intangible nil))
- (setq overlay-all-list (cdr overlay-all-list))))
- ;; execute BODY safely
- (setq result
- (condition-case info
- (progn ,@body)
- (error (eval restore-prog) ; restore environment on error
- (error (cadr info))))) ; pass error up
- ;; restore environment
- (eval restore-prog)
- result))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Enabling/disabling
-
-(defun smarty-mode-line-update ()
- "Update the modeline string for Smarty major mode."
- (setq mode-name (concat "Smarty"
- (and (or smarty-electric-mode smarty-stutter-mode) "/")
- (and smarty-electric-mode "e")
- (and smarty-stutter-mode "s")))
- (force-mode-line-update t))
-
-(defun smarty-electric-mode (arg)
- "Toggle Smarty electric mode.
-Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
- (interactive "P")
- (setq smarty-electric-mode
- (cond ((or (not arg) (zerop arg)) (not smarty-electric-mode))
- ((> arg 0) t) (t nil)))
- (smarty-mode-line-update))
-
-(defun smarty-stutter-mode (arg)
- "Toggle Smarty stuttering mode.
-Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
- (interactive "P")
- (setq smarty-stutter-mode
- (cond ((or (not arg) (zerop arg)) (not smarty-stutter-mode))
- ((> arg 0) t) (t nil)))
- (smarty-mode-line-update))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Smarty code delimitation
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-in-literal ()
- "Determine if point is in a Smarty literal."
- (save-excursion
- (let ((here (point))
- start state)
- (beginning-of-line)
- (setq start (point))
- (goto-char here)
- (setq state (parse-partial-sexp start (point)))
- (cond
- ((nth 3 state) 'string)
- ((nth 4 state) 'comment)
- (t nil)))))
-
-(defun smarty-in-comment-p ()
- "Check if point is in a comment."
- (let ((result nil) (here (point-marker)) found)
- (save-excursion
- (setq found (re-search-backward (regexp-quote (concat smarty-left-delimiter "*")) nil t))
- (when found
- (setq result (re-search-forward (regexp-quote (concat "*" smarty-right-delimiter)) here t))
- (setq result (not result))))
- result))
-
-(defun smarty-after-ldelim ()
- "Check that the previous character is the left delimiter."
- (let ((here (point-marker)) ldelim-found ldelim-point)
- (save-excursion
- (setq ldelim-found (re-search-backward (regexp-quote smarty-left-delimiter) nil t))
- (re-search-forward (regexp-quote smarty-left-delimiter) here t)
- (setq ldelim-point (point-marker))
- (goto-char here)
- (if (and (= here ldelim-point) ldelim-found)
- t
- nil))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Words to expand
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-words-init ()
- "Initialize reserved words."
- (setq smarty-functions smarty-01-functions)
- (setq smarty-modifiers smarty-01-modifiers)
- (setq smarty-plugins-functions smarty-01-plugins-functions)
- (setq smarty-plugins-modifiers smarty-01-plugins-modifiers)
- (setq smarty-functions-regexp (concat "\\<\\(" (regexp-opt smarty-functions) "\\)\\>"))
- (setq smarty-modifiers-regexp (concat "\\<\\(" (regexp-opt smarty-modifiers) "\\)\\>"))
- (setq smarty-plugins-functions-regexp (concat "\\<\\(" (regexp-opt smarty-plugins-functions) "\\)\\>"))
- (setq smarty-plugins-modifiers-regexp (concat "\\<\\(" (regexp-opt smarty-plugins-modifiers) "\\)\\>"))
- (smarty-abbrev-list-init))
-
-(defvar smarty-abbrev-list nil
- "Predefined abbreviations for Smarty.")
-
-(defun smarty-abbrev-list-init ()
- (setq smarty-abbrev-list
- (append
- (list nil) smarty-functions
- (list nil) smarty-modifiers
- (list nil) smarty-plugins-functions
- (list nil) smarty-plugins-modifiers)))
-
-(defvar smarty-expand-upper-case nil)
-
-(defun smarty-try-expand-abbrev (old)
- "Try expanding abbreviations from `smarty-abbrev-list'."
- (unless old
- (he-init-string (he-dabbrev-beg) (point))
- (setq he-expand-list
- (let ((abbrev-list smarty-abbrev-list)
- (sel-abbrev-list '()))
- (while abbrev-list
- ; (if (stringp (car abbrev-list))
- ; (insert (concat " " (car abbrev-list))))
- (when (or (not (stringp (car abbrev-list)))
- (string-match
- (concat "^" he-search-string) (car abbrev-list)))
- (setq sel-abbrev-list
- (cons (car abbrev-list) sel-abbrev-list)))
- (setq abbrev-list (cdr abbrev-list)))
- (nreverse sel-abbrev-list))))
- (while (and he-expand-list
- (or (not (stringp (car he-expand-list)))
- (he-string-member (car he-expand-list) he-tried-table t)))
- (unless (stringp (car he-expand-list))
- (setq smarty-expand-upper-case (car he-expand-list)))
- (setq he-expand-list (cdr he-expand-list)))
- (if (null he-expand-list)
- (progn (when old (he-reset-string))
- nil)
- (he-substitute-string
- (if smarty-expand-upper-case
- (upcase (car he-expand-list))
- (car he-expand-list))
- t)
- (setq he-expand-list (cdr he-expand-list))
- t))
-
-;; initialize reserved words for Smarty Mode
-(smarty-words-init)
-
-;; function for expanding abbrevs and dabbrevs
-(defun smarty-expand-abbrev (arg))
-(fset 'smarty-expand-abbrev (make-hippie-expand-function
- '(try-expand-dabbrev
- try-expand-dabbrev-all-buffers
- smarty-try-expand-abbrev)))
-
-;; function for expanding parenthesis
-(defun smarty-expand-paren (arg))
-(fset 'smarty-expand-paren (make-hippie-expand-function
- '(try-expand-list
- try-expand-list-all-buffers)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Stuttering
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-electric-tab (&optional prefix-arg)
- "If preceding character is part of a word or a paren then hippie-expand,
-else if right of non whitespace on line then insert tab,
-else if last command was a tab or return then dedent one step or if a comment
-toggle between normal indent and inline comment indent,
-else indent `correctly'."
- (interactive "*P")
- (smarty-prepare-search-2
- (cond
- ;; expand word
- ((= (char-syntax (preceding-char)) ?w)
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil)
- (hippie-expand-only-buffers
- (or (and (boundp 'hippie-expand-only-buffers)
- hippie-expand-only-buffers)
- '(smarty-mode))))
- (smarty-expand-abbrev prefix-arg)))
- ;; expand parenthesis
- ((or (= (preceding-char) ?\() (= (preceding-char) ?\)))
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil))
- (smarty-expand-paren prefix-arg))))
- (setq this-command 'smarty-electric-tab)))
-
-(defun smarty-electric-space (count)
- "Expand abbreviations and self-insert space(s)."
- (interactive "p")
- (let ((here (point-marker)) ldelim-found ldelim-point rdelim-found rdelim-point
- delete-a)
- (setq ldelim-found (re-search-backward (regexp-quote smarty-left-delimiter) nil t))
- (re-search-forward (regexp-quote smarty-left-delimiter) here t)
- (setq ldelim-point (point-marker))
- (goto-char here)
- (setq rdelim-found (re-search-backward (regexp-quote (concat " " smarty-right-delimiter)) nil t))
- (re-search-forward (regexp-quote (concat " " smarty-right-delimiter)) here t)
- (setq rdelim-point (point-marker))
- (goto-char here)
- (cond ((and (= here ldelim-point) ldelim-found) (insert (concat "ldelim" smarty-right-delimiter)))
- ((and (= here rdelim-point) rdelim-found)
- (re-search-backward (regexp-quote (concat " " smarty-right-delimiter)) nil t)
- (delete-char 1)
- (insert (concat " " smarty-left-delimiter "rdelim"))
- (goto-char here))
- ((smarty-in-comment-p)
- (self-insert-command count)
- (cond ((>= (current-column) (+ 2 end-comment-column))
- (backward-char 1)
- (skip-chars-backward "^ \t\n")
- (indent-new-comment-line)
- (skip-chars-forward "^ \t\n")
- (forward-char 1))
- ((>= (current-column) end-comment-column)
- (indent-new-comment-line))
- (t nil)))
- ((or (and (>= (preceding-char) ?a) (<= (preceding-char) ?z))
- (and (>= (preceding-char) ?A) (<= (preceding-char) ?Z))
- (and (>= (preceding-char) ?0) (<= (preceding-char) ?9)))
- (progn
- (setq here (point-marker))
- (insert " ")
- (setq delete-a t)
- (if (re-search-backward "|" nil t)
- (progn
- (setq found (re-search-forward (regexp-quote "B2Smilies") here t))
- (if (and found (= here (point-marker)))
- (replace-match "btosmilies")
- (setq found (re-search-forward (regexp-quote "bbcode2html") here t))
- (if (and found (= here (point-marker)))
- (replace-match "bbcodetohtml")
- (setq found (re-search-forward (regexp-quote "date_format2") here t))
- (if (and found (= here (point-marker)))
- (replace-match "date_formatto")
- (goto-char here)
- (setq delete-a nil)
- (delete-char 1)))))
- (goto-char here)
- (setq delete-a nil)
- (delete-char 1)))
- (smarty-prepare-search-1 (expand-abbrev))
- (self-insert-command count)
- (if (and delete-a (looking-at " "))
- (delete-char 1)))
- (t (self-insert-command count)))))
-
-(defun smarty-electric-open-bracket (count)
- "'(' --> '(', '((' --> '[', '[(' --> '{'"
- (interactive "p")
- (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal)))
- (if (= (preceding-char) ?\()
- (progn (delete-char -1) (insert-char ?\[ 1))
- (if (= (preceding-char) ?\[)
- (progn (delete-char -1) (insert-char ?\{ 1))
- (insert-char ?\( 1)))
- (self-insert-command count)))
-
-(defun smarty-electric-close-bracket (count)
- "')' --> ')', '))' --> ']', '])' --> '}'"
- (interactive "p")
- (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal)))
- (progn
- (if (= (preceding-char) ?\))
- (progn (delete-char -1) (insert-char ?\] 1))
- (if (= (preceding-char) ?\])
- (progn (delete-char -1) (insert-char ?} 1))
- (insert-char ?\) 1)))
- (blink-matching-open))
- (self-insert-command count)))
-
-(defun smarty-electric-star (count)
- "After a left delimiter add a right delemiter to close the comment"
- (interactive "p")
- (let ((here (point-marker)) found)
- (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal)))
- (progn
- (setq found (re-search-backward (regexp-quote smarty-left-delimiter) nil t))
- (re-search-forward (regexp-quote smarty-left-delimiter) here t)
- (if (not (and (= here (point-marker)) found))
- (progn (goto-char here)
- (self-insert-command count))
- (self-insert-command count)
- (insert " ")
- (setq here (point-marker))
- (insert " *")
- (insert smarty-right-delimiter)
- (goto-char here)))
- (self-insert-command count))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Electrification
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defconst smarty-template-prompt-syntax "[^ =<>][^<>@.\n]*[^ =<>]"
- "Syntax of prompt inserted by template generators.")
-
-(defvar smarty-template-invoked-by-hook nil
- "Indicates whether a template has been invoked by a hook or by key or menu.
-Used for undoing after template abortion.")
-
-(defun smarty-minibuffer-tab (&optional prefix-arg)
- "If preceding character is part of a word or a paren then hippie-expand,
-else insert tab (used for word completion in Smarty minibuffer)."
- (interactive "P")
- (cond
- ;; expand word
- ((= (char-syntax (preceding-char)) ?w)
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil)
- (hippie-expand-only-buffers
- (or (and (boundp 'hippie-expand-only-buffers)
- hippie-expand-only-buffers)
- '(smarty-mode))))
- (smarty-expand-abbrev prefix-arg)))
- ;; expand parenthesis
- ((or (= (preceding-char) ?\() (= (preceding-char) ?\)))
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil))
- (smarty-expand-paren prefix-arg)))
- ;; insert tab
- (t (insert-tab))))
-
-;; correct different behavior of function `unread-command-events' in XEmacs
-(defun smarty-character-to-event (arg))
-(defalias 'smarty-character-to-event
- (if (fboundp 'character-to-event) 'character-to-event 'identity))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Abbrev ook bindings
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-mode-abbrev-table nil
- "Abbrev table to use in `smarty-mode' buffers.")
-
-(defun smarty-mode-abbrev-table-init ()
- "Initialize `smarty-mode-abbrev-table'."
- (when smarty-mode-abbrev-table (clear-abbrev-table smarty-mode-abbrev-table))
- (define-abbrev-table 'smarty-mode-abbrev-table
- (append
- '(
- ("capture" "" smarty-template-capture-hook 0)
- ("config_load" "" smarty-template-config-load-hook 0)
- ("else" "" smarty-template-else-hook 0)
- ("elseif" "" smarty-template-elseif-hook 0)
- ("foreach" "" smarty-template-foreach-hook 0)
- ("foreachelse" "" smarty-template-foreachelse-hook 0)
- ("if" "" smarty-template-if-hook 0)
- ("include" "" smarty-template-include-hook 0)
- ("include_php" "" smarty-template-include-php-hook 0)
- ("insert" "" smarty-template-insert-hook 0)
- ("ldelim" "" smarty-template-ldelim-hook 0)
- ("literal" "" smarty-template-literal-hook 0)
- ("php" "" smarty-template-php-hook 0)
- ("rdelim" "" smarty-template-rdelim-hook 0)
- ("section" "" smarty-template-section-hook 0)
- ("sectionelse" "" smarty-template-sectionelse-hook 0)
- ("strip" "" smarty-template-strip-hook 0)
- ("assign" "" smarty-template-assign-hook 0)
- ("counter" "" smarty-template-counter-hook 0)
- ("cycle" "" smarty-template-cycle-hook 0)
- ("debug" "" smarty-template-debug-hook 0)
- ("eval" "" smarty-template-eval-hook 0)
- ("fetch" "" smarty-template-fetch-hook 0)
- ("html_checkboxes" "" smarty-template-html-checkboxes-hook 0)
- ("html_image" "" smarty-template-html-image-hook 0)
- ("html_options" "" smarty-template-html-options-hook 0)
- ("html_radios" "" smarty-template-html-radios-hook 0)
- ("html_select_date" "" smarty-template-html-select-date-hook 0)
- ("html_select_time" "" smarty-template-html-select-time-hook 0)
- ("html_table" "" smarty-template-html-table-hook 0)
- ("mailto" "" smarty-template-mailto-hook 0)
- ("math" "" smarty-template-math-hook 0)
- ("popup" "" smarty-template-popup-hook 0)
- ("popup_init" "" smarty-template-popup-init-hook 0)
- ("textformat" "" smarty-template-textformat-hook 0)
- ("capitalize" "" smarty-template-capitalize-hook 0)
- ("cat" "" smarty-template-cat-hook 0)
- ("count_characters" "" smarty-template-count-characters-hook 0)
- ("count_paragraphs" "" smarty-template-count-paragraphs-hook 0)
- ("count_sentences" "" smarty-template-count-sentences-hook 0)
- ("count_words" "" smarty-template-count-words-hook 0)
- ("date_format" "" smarty-template-date-format-hook 0)
- ("default" "" smarty-template-default-hook 0)
- ("escape" "" smarty-template-escape-hook 0)
- ("indent" "" smarty-template-indent-hook 0)
- ("lower" "" smarty-template-lower-hook 0)
- ("nl2br" "" smarty-template-nl2br-hook 0)
- ("regex_replace" "" smarty-template-regex-replace-hook 0)
- ("replace" "" smarty-template-replace-hook 0)
- ("spacify" "" smarty-template-spacify-hook 0)
- ("string_format" "" smarty-template-string-format-hook 0)
- ("strip" "" smarty-template-vstrip-hook 0)
- ("strip_tags" "" smarty-template-strip-tags-hook 0)
- ("truncate" "" smarty-template-truncate-hook 0)
- ("upper" "" smarty-template-upper-hook 0)
- ("wordwrap" "" smarty-template-wordwrap-hook 0)
- ("validate" "" smarty-template-validate-hook 0)
- ("formtool_checkall" "" smarty-template-formtool-checkall-hook 0)
- ("formtool_copy" "" smarty-template-formtool-copy-hook 0)
- ("formtool_count_chars" "" smarty-template-formtool-count-chars-hook 0)
- ("formtool_init" "" smarty-template-formtool-init-hook 0)
- ("formtool_move" "" smarty-template-formtool-move-hook 0)
- ("formtool_moveall" "" smarty-template-formtool-moveall-hook 0)
- ("formtool_movedown" "" smarty-template-formtool-movedown-hook 0)
- ("formtool_moveup" "" smarty-template-formtool-moveup-hook 0)
- ("formtool_remove" "" smarty-template-formtool-remove-hook 0)
- ("formtool_rename" "" smarty-template-formtool-rename-hook 0)
- ("formtool_save" "" smarty-template-formtool-save-hook 0)
- ("formtool_selectall" "" smarty-template-formtool-selectall-hook 0)
- ("paginate_first" "" smarty-template-paginate-first-hook 0)
- ("paginate_last" "" smarty-template-paginate-last-hook 0)
- ("paginate_middle" "" smarty-template-paginate-middle-hook 0)
- ("paginate_next" "" smarty-template-paginate-next-hook 0)
- ("paginate_prev" "" smarty-template-paginate-prev-hook 0)
- ("btosmilies" "" smarty-template-btosmilies-hook 0)
- ("bbcodetohtml" "" smarty-template-bbcodetohtml-hook 0)
- ("date_formatto" "" smarty-template-date-formatto-hook 0)))))
-
-;; initialize abbrev table for Smarty Mode
-(smarty-mode-abbrev-table-init)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Abbrev hooks
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-hooked-abbrev (func)
- "Do function, if syntax says abbrev is a keyword, invoked by hooked abbrev,
-but not if inside a comment or quote)."
- (if (or (smarty-in-literal)
- (smarty-in-comment-p))
- (progn
- (insert " ")
- (unexpand-abbrev)
- (delete-char -1))
- (if (not smarty-electric-mode)
- (progn
- (insert " ")
- (unexpand-abbrev)
- (backward-word 1)
- (delete-char 1))
- (let ((invoke-char last-command-char)
- (abbrev-mode -1)
- (smarty-template-invoked-by-hook t))
- (let ((caught (catch 'abort
- (funcall func))))
- (when (stringp caught) (message caught)))
- (when (= invoke-char ?-) (setq abbrev-start-location (point)))
- ;; delete CR which is still in event queue
- (if (fboundp 'enqueue-eval-event)
- (enqueue-eval-event 'delete-char -1)
- (setq unread-command-events ; push back a delete char
- (list (smarty-character-to-event ?\177))))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Fontification
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-font-lock-keywords-1
- (list
-
- ;; Fontify built-in functions
- (cons
- (concat (regexp-quote smarty-left-delimiter) "[/]*" smarty-functions-regexp)
- '(1 font-lock-keyword-face))
-
- (cons
- (concat "\\<\\(" smarty-constants "\\)\\>")
- 'font-lock-constant-face)
-
- (cons (concat "\\(" (regexp-quote (concat smarty-left-delimiter "*")) "\\(\\s-\\|\\w\\|\\s.\\|\\s_\\|\\s(\\|\\s)\\|\\s\\\\)*" (regexp-quote (concat "*" smarty-right-delimiter)) "\\)")
- 'font-lock-comment-face)
-
- )
- "Subdued level highlighting for Smarty mode.")
-
-(defconst smarty-font-lock-keywords-2
- (append
- smarty-font-lock-keywords-1
- (list
-
- ;; Fontify variable names (\\sw\\|\\s_\\) matches any word character +
- ;; underscore
- '("\\$\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face)) ; $variable
- '("->\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; ->variable
- '("\\.\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; .variable
- '("->\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" (1 font-lock-function-name-face t t)) ; ->function_call
- '("\\<\\(\\(?:\\sw\\|\\s_\\)+\\s-*\\)(" (1 font-lock-function-name-face)) ; word(
- '("\\<\\(\\(?:\\sw\\|\\s_\\)+\\s-*\\)[[]" (1 font-lock-variable-name-face)) ; word[
- '("\\<[0-9]+" . default) ; number (also matches word)
-
- ;; Fontify strings
- ;;'("\"\\([^\"]*\\)\"[^\"]+" (1 font-lock-string-face t t))
- ))
-
- "Medium level highlighting for Smarty mode.")
-
-(defconst smarty-font-lock-keywords-3
- (append
- smarty-font-lock-keywords-2
- (list
- ;; Fontify modifiers
- (cons (concat "|\\(" smarty-modifiers-regexp "\\)[:|]+") '(1 font-lock-function-name-face))
- (cons (concat "|\\(" smarty-modifiers-regexp "\\)" (regexp-quote smarty-right-delimiter)) '(1 font-lock-function-name-face))
-
- ;; Fontify config vars
- (cons (concat (regexp-quote smarty-left-delimiter) "\\(#\\(?:\\sw\\|\\s_\\)+#\\)") '(1 font-lock-constant-face))))
- "Balls-out highlighting for Smarty mode.")
-
-(defconst smarty-font-lock-keywords-4
- (append
- smarty-font-lock-keywords-3
- (list
- ;; Fontify plugin functions
- (cons
- (concat (regexp-quote smarty-left-delimiter) "[/]*" smarty-plugins-functions-regexp)
- '(1 font-lock-keyword-face))
-
- (cons (concat "|\\(" smarty-plugins-modifiers-regexp "\\)[:|]+") '(1 font-lock-function-name-face))
- (cons (concat "|\\(" smarty-plugins-modifiers-regexp "\\)" (regexp-quote smarty-right-delimiter)) '(1 font-lock-function-name-face)))))
-
-(defvar smarty-font-lock-keywords smarty-font-lock-keywords-3
- "Default highlighting level for Smarty mode")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Mode map
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-template-map nil
- "Keymap for Smarty templates.")
-
-(defun smarty-template-map-init ()
- "Initialize `smarty-template-map'."
- (setq smarty-template-map (make-sparse-keymap))
- ;; key bindings for Smarty templates
- (define-key smarty-template-map "\C-ba" 'smarty-template-capture)
- (define-key smarty-template-map "\C-bc" 'smarty-template-config-load)
- (define-key smarty-template-map "\C-b\M-e" 'smarty-template-else)
- (define-key smarty-template-map "\C-b\C-e" 'smarty-template-elseif)
- (define-key smarty-template-map "\C-b\C-f" 'smarty-template-foreach)
- (define-key smarty-template-map "\C-b\M-f" 'smarty-template-foreachelse)
- (define-key smarty-template-map "\C-bf" 'smarty-template-if)
- (define-key smarty-template-map "\C-b\C-i" 'smarty-template-include)
- (define-key smarty-template-map "\C-b\M-i" 'smarty-template-include-php)
- (define-key smarty-template-map "\C-bi" 'smarty-template-insert)
- (define-key smarty-template-map "\C-bl" 'smarty-template-ldelim)
- (define-key smarty-template-map "\C-b\C-l" 'smarty-template-literal)
- (define-key smarty-template-map "\C-bp" 'smarty-template-php)
- (define-key smarty-template-map "\C-br" 'smarty-template-rdelim)
- (define-key smarty-template-map "\C-b\C-s" 'smarty-template-section)
- (define-key smarty-template-map "\C-b\M-s" 'smarty-template-sectionelse)
- (define-key smarty-template-map "\C-bs" 'smarty-template-strip)
- (define-key smarty-template-map "\C-ca" 'smarty-template-assign)
- (define-key smarty-template-map "\C-co" 'smarty-template-counter)
- (define-key smarty-template-map "\C-cc" 'smarty-template-cycle)
- (define-key smarty-template-map "\C-cd" 'smarty-template-debug)
- (define-key smarty-template-map "\C-ce" 'smarty-template-eval)
- (define-key smarty-template-map "\C-cf" 'smarty-template-fetch)
- (define-key smarty-template-map "\C-c\C-hc" 'smarty-template-html-checkboxes)
- (define-key smarty-template-map "\C-c\C-hi" 'smarty-template-html-image)
- (define-key smarty-template-map "\C-c\C-ho" 'smarty-template-html-options)
- (define-key smarty-template-map "\C-c\C-hr" 'smarty-template-html-radios)
- (define-key smarty-template-map "\C-c\C-hd" 'smarty-template-html-select-date)
- (define-key smarty-template-map "\C-c\C-hm" 'smarty-template-html-select-time)
- (define-key smarty-template-map "\C-c\C-ht" 'smarty-template-html-table)
- (define-key smarty-template-map "\C-ci" 'smarty-template-mailto)
- (define-key smarty-template-map "\C-ch" 'smarty-template-math)
- (define-key smarty-template-map "\C-c\C-p" 'smarty-template-popup)
- (define-key smarty-template-map "\C-c\M-p" 'smarty-template-popup-init)
- (define-key smarty-template-map "\C-ct" 'smarty-template-textformat)
- (define-key smarty-template-map "\C-vp" 'smarty-template-capitalize)
- (define-key smarty-template-map "\C-vc" 'smarty-template-cat)
- (define-key smarty-template-map "\C-v\C-cc" 'smarty-template-count-characters)
- (define-key smarty-template-map "\C-v\C-cp" 'smarty-template-count-paragraphs)
- (define-key smarty-template-map "\C-v\C-cs" 'smarty-template-count-sentences)
- (define-key smarty-template-map "\C-v\C-cw" 'smarty-template-count-words)
- (define-key smarty-template-map "\C-vf" 'smarty-template-date-format)
- (define-key smarty-template-map "\C-vd" 'smarty-template-default)
- (define-key smarty-template-map "\C-ve" 'smarty-template-escape)
- (define-key smarty-template-map "\C-vi" 'smarty-template-indent)
- (define-key smarty-template-map "\C-vl" 'smarty-template-lower)
- (define-key smarty-template-map "\C-vn" 'smarty-template-nl2br)
- (define-key smarty-template-map "\C-vx" 'smarty-template-regex-replace)
- (define-key smarty-template-map "\C-v\C-p" 'smarty-template-replace)
- (define-key smarty-template-map "\C-vy" 'smarty-template-spacify)
- (define-key smarty-template-map "\C-vs" 'smarty-template-string-format)
- (define-key smarty-template-map "\C-v\C-s" 'smarty-template-vstrip)
- (define-key smarty-template-map "\C-v\M-s" 'smarty-template-strip-tags)
- (define-key smarty-template-map "\C-vt" 'smarty-template-truncate)
- (define-key smarty-template-map "\C-vu" 'smarty-template-upper)
- (define-key smarty-template-map "\C-vw" 'smarty-template-wordwrap)
- (define-key smarty-template-map "\C-h" 'smarty-template-header)
- (define-key smarty-template-map "\C-f" 'smarty-template-footer)
- (define-key smarty-template-map "\C-di" 'smarty-template-insert-date)
- (define-key smarty-template-map "\C-dm" 'smarty-template-modify))
-
-;; initialize template map for Smarty Mode
-(smarty-template-map-init)
-
-(defun smarty-mode-map-init ()
- "Initialize `smarty-mode-map'."
- (setq smarty-mode-map (make-sparse-keymap))
- ;; template key bindings
- (define-key smarty-mode-map "\C-c\C-t" smarty-template-map)
- ;; mode specific key bindings
- (define-key smarty-mode-map "\C-c\C-m\C-e" 'smarty-electric-mode)
- (define-key smarty-mode-map "\C-c\C-m\C-s" 'smarty-stutter-mode)
- (define-key smarty-mode-map "\C-c\C-s\C-u" 'smarty-add-source-files-menu)
- (define-key smarty-mode-map "\C-c\M-m" 'smarty-show-messages)
- (define-key smarty-mode-map "\C-c\C-h" 'smarty-doc-mode)
- (define-key smarty-mode-map "\C-c\C-v" 'smarty-version)
- ;; electric key bindings
- (when smarty-intelligent-tab
- (define-key smarty-mode-map "\t" 'smarty-electric-tab))
- (define-key smarty-mode-map " " 'smarty-electric-space)
- (define-key smarty-mode-map "(" 'smarty-electric-open-bracket)
- (define-key smarty-mode-map ")" 'smarty-electric-close-bracket)
- (define-key smarty-mode-map "*" 'smarty-electric-star))
-
-;; initialize mode map for Smarty Mode
-(smarty-mode-map-init)
-
-(defvar smarty-minibuffer-local-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map minibuffer-local-map)
- (when smarty-word-completion-in-minibuffer
- (define-key map "\t" 'smarty-minibuffer-tab))
- map)
- "Keymap for minibuffer used in Smarty Mode.")
-
-(mapcar
- (function
- (lambda (sym)
- (put sym 'delete-selection t) ; for `delete-selection-mode' (Emacs)
- (put sym 'pending-delete t))) ; for `pending-delete-mode' (XEmacs)
- '(smarty-electric-space
- smarty-electric-tab
- smarty-electric-open-bracket
- smarty-electric-close-bracket
- smarty-electric-star))
-
-;;;###autoload
-(defun smarty-mode ()
- "Smarty Mode
-***********
-
-Smarty Mode is a GNU XEmacs major mode for editing Smarty templates.
-
-1 Introduction
-**************
-
-Smarty-Mode is a mode allowing easy edit of Smarty templates:
-highlight, templates, navigation into source files...
-
-
-
-Features (new features in bold) :
-
- * Completion
-
- * Customizable
-
- * Highlight
-
- * Menu
-
- * Stuttering
-
- * Templates
- - Built-in Functions
-
- - User Functions
-
- - Variable Modifiers
-
- - Plugin (Functions)
- * Smarty Formtool
-
- * Smarty Paginate
-
- * Smarty Validate
-
- - Plugin (Variable Modifiers)
- * AlternativeDateModifierPlugin
-
- * B2Smilies
-
- * BBCodePlugin
-
- - Fonctions Non-Smarty
-
-
-
-This manual describes Smarty Mode version 0.0.4.
-
-2 Installation
-**************
-
-2.1 Requirements
-================
-
-Smarty Mode is a XEmacs major mode that needs the following
-software/packages:
-
- * XEmacs (http://www.xemacs.org/).
-
- * `font-lock' mode generaly installed with XEmacs.
-
- * `assoc' mode generaly installed with XEmacs.
-
- * `easymenu' mode generaly installed with XEmacs.
-
- * `hippie-exp' mode generaly installed with XEmacs.
-
-Before continuing, you must be sure to have all this packages
-installed.
-
-2.2 Download
-============
-
-Two internet address to download Smarty Mode :
-
- * Principal: Smarty-Mode 0.0.4
- (http://deboutv.free.fr/lisp/smarty/download/smarty-0.0.4.tar.gz)
- (http://deboutv.free.fr/lisp/smarty/)
-
- * Secondary: Smarty-Mode 0.0.4
- (http://www.morinie.fr/lisp/smarty/download/smarty-0.0.4.tar.gz)
- (http://www.morinie.fr/lisp/smarty/)
-
- * Old releases: Smarty-Mode
- (http://deboutv.free.fr/lisp/smarty/download.php)
- (http://deboutv.free.fr/lisp/smarty/)
-
-2.3 Installation
-================
-
-2.3.1 Installation
-------------------
-
-To install Smarty Mode you need to choose an installation directory
-(for example `/usr/local/share/lisp' or `c:\lisp'). The administrator
-must have the write rights on this directory.
-
-With your favorite unzip software, unzip the archive in the
-installation directory.
-
-Example:
- cd /usr/local/share/lisp
- tar zxvf smarty-0.0.4.tar.gz
-Now you have a `smarty' directory in the installation directory. This
-directory contains 2 files `smarty-mode.el' and `smarty-mode.elc' and
-another directory `docs' containing the documentation.
-
-You need to configure XEmacs. open you initialization file `init.el'
-(open the file or start XEmacs then choose the Options menu and Edit
-Init File). Add the following lines (the installation directory in
-this example is `/usr/local/share/lisp') :
-
- (setq load-path
- (append (list \"/usr/local/share/lisp/\") load-path))
- (autoload 'smarty-mode \"smarty-mode\" \"Smarty Mode\" t)
-
-2.3.2 Update
-------------
-
-The update is easy. You need to unzip the archive in the installation
-directory to remove the old release.
-
-Example:
- cd /usr/local/share/lisp
- rm -rf smarty
- tar zxvf smarty-0.0.4.tar.gz
-
-2.4 Invoke Smarty-Mode
-======================
-
-You have two possibilities to invoke the Smarty Mode.
-
- - Manually: At each file opening you need to launch Smarty Mode
- with the following command:
-
- `M-x smarty-mode'
-
- - Automatically: Add the following linesin your initialization
- file `init.el' :
-
- (setq auto-mode-alist
- (append
- '((\"\\.tpl$\" . smarty-mode))
- auto-mode-alist))
-
-
-3 Customization
-***************
-
-This chapter describes the differents parameters and functions that
-you can change to customize Smarty Mode. To do that, open a Smarty
-file, click on the Smarty menu and choose Options then Browse
-Options....
-
-3.1 Parameters
-==============
-
-3.1.1 Mode
-----------
-
-Smarty Mode has 2 modes allowing to simplify the writing of Smarty
-templates. You can enable/disable each mode individually.
-
-`smarty-electric-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable automatic generation of template.
- If `nil'; template generators can still be invoked through key
- bindings and menu. Is indicated in the modeline by \"/e\" after
- the mode name and can be toggled by `smarty-electric-mode'.
-
-`smarty-stutter-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable the stuttering. Is indicated in the
- modeline by \"/s\" after the mode name and can be toggled by
- `smarty-stutter-mode'.
-
-3.1.2 Menu
-----------
-
-Smarty Mode has also 1 menu that you can enable/disable. The menu
-Sources is specific to each Smarty files opened.
-
-`smarty-source-file-menu'
- Type: boolean
- Default value: `t'
- Description: If `t'; the Sources menu is enabled. This menu
- contains the list of Smarty file located in the current
- directory. The Sources menu scans the directory when a file is
- opened.
-
-3.1.3 Menu
-----------
-
-`smarty-highlight-plugin-functions'
- Type: boolean
- Default value: `t'
- Description: If `t'; the functions described in the smarty
- plugins are highlighted.
-
-3.1.4 Templates
----------------
-
-3.1.4.1 Header
-..............
-
-`smarty-file-header'
- Type: string
- Default value: `\"\"'
- Description: String or file to insert as file header. If the
- string specifies an existing file name the contents of the file
- is inserted; otherwise the string itself is inserted as file
- header.
- Type `C-j' for newlines.
- The follonwing keywords are supported:
- <filename>: replaced by the file name.
- <author>: replaced by the user name and email address.
- <login>: replaced by `user-login-name'.
- <company>: replaced by `smarty-company-name' content.
- <date>: replaced by the current date.
- <year>: replaced by the current year.
- <copyright>: replaced by `smarty-copyright-string' content.
- <cursor>: final cursor position.
-
-`smarty-file-footer'
- Type: string
- Default value: `\"\"'
- Description: String or file to insert as file footer. See
- `smarty-file-header'
-
-`smarty-company-name'
- Type: string
- Default value: `\"\"'
- Description: Name of the company to insert in file header.
-
-`smarty-copyright-string'
- Type: string
- Default value: `\"\"'
- Description: Coryright string to insert in file header.
-
-`smarty-date-format'
- Type: string
- Default value: `\"%Y-%m-%d\"'
- Description: Date format.
-
-`smarty-modify-date-prefix-string'
- Type: string
- Default value: `\"\"'
- Description: Prefix string of modification date in Smarty file
- header.
-
-`smarty-modify-date-on-saving'
- Type: bool
- Default value: `nil'
- Description: If `t'; update the modification date when the
- buffer is saved.
-
-3.1.5 Miscellaneous
--------------------
-
-`smarty-left-delimiter'
- Type: string
- Default value: `\"\"'
- Description: Left escaping delimiter for Smarty templates.
-
-`smarty-right-delimiter'
- Type: string
- Default value: `\"\"'
- Description: Right escaping delimiter for Smarty templates.
-
-`smarty-intelligent-tab'
- Type: bool
- Default value: `t'
- Description: If `t'; TAB does indentation; completion and insert
- tabulations. If `nil'; TAB does only indentation.
-
-`smarty-word-completion-in-minibuffer'
- Type: bool
- Default value: `t'
- Description: If `t'; enable completion in the minibuffer.
-
-`smarty-word-completion-case-sensitive'
- Type: bool
- Default value: `nil'
- Description: If `t'; completion is case sensitive.
-
-3.2 Functions
-=============
-
-3.2.1 Mode
-----------
-
-`smarty-electric-mode'
- Menu: Smarty -> Options -> Mode -> Electric Mode
- Keybinding: `C-c C-m C-e'
- Description: This functions is used to enable/disable the
- electric mode.
-
-`smarty-stutter-mode'
- Menu: Smarty -> Options -> Mode -> Stutter Mode
- Keybinding: `C-c C-m C-s'
- Description: This function is used to enable/disable the stutter
- mode.
-
-4 Menus
-*******
-
-There are 2 menus: Smarty and Sources. All theses menus can be
-accessed from the menubar or from the right click. This chapter
-describes each menus.
-
-4.1 Smarty
-==========
-
-This is the main menu of Smarty Mode. It allows an easy access to the
-main features of the Smarty Mode: Templates (see *Note Templates::)
-and Options (see *Note Customization::).
-
-This menu contains also 3 functions that are discussed in the next
-part.
-
-4.1.1 Functions
----------------
-
-`smarty-show-messages'
- Menu: Smarty -> Show Messages
- Keybinding: `C-c M-m'
- Description: This function opens the *Messages* buffer to
- display previous error messages.
-
-`smarty-doc-mode'
- Menu: Smarty -> Smarty Mode Documentation
- Keybinding: `C-c C-h'
- Description: This function opens the *Help* buffer and prints in
- it the Smarty Mode documentation.
-
-`smarty-version'
- Menu: Smarty -> Version
- Keybinding: `C-c C-v'
- Description: This function displays in the minibuffer the
- current Smarty Mode version with the timestamp.
-
-4.2 Sources
-===========
-
-The Sources menu shows the Smarty files in the current directory. If
-you add or delete a file in the current directory, you need to
-refresh the menu.
-
-4.2.1 Customization
--------------------
-
-`smarty-source-file-menu'
- Type: boolean
- Default value: `t'
- Description: If `t'; the Sources menu is enabled. This menu
- contains the list of Smarty file located in the current
- directory. The Sources menu scans the directory when a file is
- opened.
-
-4.2.2 Functions
----------------
-
-`smarty-add-source-files-menu'
- Menu: Sources -> *Rescan*
- Keybinding: `C-c C-s C-u'
- Description: This function is used to refresh the Sources menu.
-
-5 Stuttering
-************
-
-The stutter mode is a mode that affects a function to a key. For
-example, when you use the `ENTER' key, the associated function will
-create a new line and indent it.
-
-5.1 Customization
-=================
-
-`smarty-stutter-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable the stuttering. Is indicated in the
- modeline by \"/s\" after the mode name and can be toggled by
- `smarty-stutter-mode'.
-
-5.2 Functions
-=============
-
-`SPACE'
- If in comment, indent the comment and add new line if necessary.
- In other case, add a space.
-
-`('
- If the previous character is a `(', the `((' will be replaced by
- `['.
- If the previous character is a `[', the `[(' will be replaced by
- `{'.
- In other case, insert a `('.
-
-`)'
- If the previous character is a `)', the `))' will be replaced by
- `]'.
- If the previous character is a `]', the `])' will be replaced by
- `}'.
- In other case, insert a `)'.
-
-6 Templates
-***********
-
-In the Smarty Mode, the Smarty functions (like if, while, for, fopen,
-fclose) are predefined in functions called \"Templates\".
-
-Each template can be invoked by the function name or by using the
-<SPACE> key after the Smarty function name in the buffer (Note, using
-`M-<SPACE>' disable the template).
-
-A template can be aborted by using the `C-g' or by lefting empty the
-tempate prompt (in the minibuffer).
-
-6.1 Customization
-=================
-
-`smarty-electric-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable automatic generation of template.
- If `nil'; template generators can still be invoked through key
- bindings and menu. Is indicated in the modeline by \"/e\" after
- the mode name and can be toggled by `smarty-electric-mode'.
-
-For a complete description of the template customizable variables,
-see *Note Cu01-Pa01-Template::
-
-6.2 Functions
-=============
-
-6.2.1 Smarty Functions
-----------------------
-
-For Smarty functions, see PDF or HTML documentation.
-
-6.2.2 Non-Smarty Functions
---------------------------
-
-`smarty-template-header'
- Menu: Smarty -> Templates -> Insert Header
- Keybinding: `C-c C-t C-h'
- Description: This function is used to insert a header in the
- current buffer.
-
-`smarty-template-footer'
- Menu: Smarty -> Templates -> Insert Footer
- Keybinding: `C-c C-t C-f'
- Description: This function is used to insert a footer in the
- current buffer.
-
-`smarty-template-insert-date'
- Menu: Smarty -> Templates -> Insert Date
- Keybinding: `C-c C-t C-d i'
- Description: This function is used to insert the date in the
- current buffer.
-
-`smarty-template-modify'
- Menu: Smarty -> Templates -> Modify Date
- Keybinding: `C-c C-t C-d m'
- Description: This function is used to modify the last
- modification date in the current buffer.
-
-7 Bugs, Help
-************
-
- * To report bugs: Bugtracker
- (http://bugtracker.morinie.fr/lisp/set_project.php?project_id=2)
-
- * To obtain help you can post on the dedicated forum: Forum
- (http://forum.morinie.fr/lisp/)
-
-8 Key bindings
-**************
-
-\\{smarty-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'smarty-mode)
- (setq mode-name "Smarty")
-
- (smarty-create-syntax-table)
-
- ;; set maps and tables
- (use-local-map smarty-mode-map)
- (set-syntax-table smarty-mode-syntax-table)
- (setq local-abbrev-table smarty-mode-abbrev-table)
-
- (set (make-local-variable 'comment-start) (concat smarty-left-delimiter "*"))
- (set (make-local-variable 'comment-end) (concat "*" smarty-right-delimiter))
- (set (make-local-variable 'comment-multi-line) t)
- (set (make-local-variable 'end-comment-column) 80)
-
- (make-local-variable 'font-lock-defaults)
- (if smarty-highlight-plugin-functions
- (setq smarty-font-lock-keywords smarty-font-lock-keywords-4)
- (setq smarty-font-lock-keywords smarty-font-lock-keywords-3))
- (setq font-lock-defaults
- '((smarty-font-lock-keywords)
- nil ; Keywords only (i.e. no comment or string highlighting
- t ; case fold
- nil ; syntax-alist
- nil ; syntax-begin
- ))
-
- (setq font-lock-maximum-decoration t
- case-fold-search t)
-
- ;; add source file menu
- (if smarty-source-file-menu (smarty-add-source-files-menu))
- ;; add Smarty menu
- (easy-menu-add smarty-mode-menu-list)
- (easy-menu-define smarty-mode-menu smarty-mode-map
- "Menu keymap for Smarty Mode." smarty-mode-menu-list)
-
- (message "Smarty Mode %s.%s" smarty-version
- (if noninteractive "" " See menu for documentation and release notes."))
- (smarty-mode-line-update)
- (run-hooks 'smarty-mode-hook))
-
-(defun smarty-doc-mode ()
- "Display Smarty Mode documentation in *Help* buffer."
- (interactive)
- (with-output-to-temp-buffer
- (if (fboundp 'help-buffer) (help-buffer) "*Help*")
- (princ mode-name)
- (princ " mode:\n")
- (princ (documentation 'smarty-mode))
- (with-current-buffer standard-output
- (help-mode))
- (print-help-return-message)))
-
-(defun smarty-activate-customizations ()
- "Activate all customizations on local variables."
- (interactive)
- (smarty-mode-map-init)
- (use-local-map smarty-mode-map)
- (set-syntax-table smarty-mode-syntax-table)
- (smarty-update-mode-menu)
- (run-hooks 'menu-bar-update-hook)
- (smarty-mode-line-update))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Templates
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-template-field (prompt &optional follow-string optional
- begin end is-string string-char default)
- "Prompt for string and insert it in buffer with optional FOLLOW-STRING.
-If OPTIONAL is nil, the prompt is left if an empty string is inserted. If
-an empty string is inserted, return nil and call `smarty-template-undo' for
-the region between BEGIN and END. IS-STRING indicates whether a string
-with double-quotes is to be inserted. DEFAULT specifies a default string."
- (let ((position (point))
- string)
- (insert "<" prompt ">")
- (if (not (> (length string-char) 0))
- (setq string-char "\""))
- (setq string
- (condition-case ()
- (read-from-minibuffer (concat prompt ": ")
- (or (and is-string (cons (concat string-char string-char) 1)) default)
- smarty-minibuffer-local-map)
- (quit (if (and optional begin end)
- (progn (beep) "")
- (keyboard-quit)))))
- (when (or (not (equal string "")) optional)
- (delete-region position (point)))
- (when (and (equal string "") optional begin end)
- (smarty-template-undo begin end)
- (message "Template aborted"))
- (unless (equal string "")
- (insert string))
- (when (or (not (equal string "")) (not optional))
- (insert (or follow-string "")))
- (if (equal string "") nil string)))
-
-(defun smarty-template-undo (begin end)
- "Undo aborted template by deleting region and unexpanding the keyword."
- (cond (smarty-template-invoked-by-hook
- (goto-char end)
- (insert " ")
- (delete-region begin end)
- (unexpand-abbrev))
- (t (delete-region begin end))))
-
-(defun smarty-template-generic-function (label close-label field mandatory-count &optional infinite special-field)
- "Generic function template 'label field1= field2=..."
- (interactive)
- (let ((start (point)) found here result-value elt continue field-count stop prompt)
- (if smarty-template-invoked-by-hook
- (setq found (smarty-after-ldelim))
- (insert smarty-left-delimiter)
- (setq found t))
- (insert label)
- (setq here (point-marker))
- (insert " ")
- (when found
- (setq elt field)
- (setq continue t)
- (setq field-count 0)
- (setq stop nil)
- (while (and elt continue)
- (setq prompt (car elt))
- (when (not special-field)
- (insert prompt "="))
- (setq result-value (smarty-template-field prompt nil t))
- (if (and (not result-value)
- (< field-count mandatory-count))
- (progn (setq continue nil)
- (delete-region start (point))
- (insert (concat label " "))
- (setq stop t))
- (if (not result-value)
- (setq continue nil)
- (setq here (point-marker))
- (insert " ")))
- (setq field-count (+ 1 field-count))
- (setq elt (cdr elt)))
- (when (and infinite continue)
- (while continue
- (setq result-value (smarty-template-field "var_name" "=" t here))
- (if (not result-value)
- (setq continue nil)
- (setq continue (smarty-template-field "var_value" nil t here))
- (setq here (point-marker))
- (insert " "))))
- (when (not stop)
- (delete-region here (point))
- (if (> 0 mandatory-count)
- (delete-char -1))
- (if special-field
- (delete-char -1))
- (insert smarty-right-delimiter)
- (setq here (point-marker))
- (if close-label
- (insert smarty-left-delimiter "/" label smarty-right-delimiter))
- (goto-char here)))))
-
-(defun smarty-template-generic-modifier (label field mandatory-count)
- "Generic modifier template '|label:field1:field2..."
- (interactive)
- (let ((start (point)) found here result-value elt continue field-count stop prompt)
- (setq found (re-search-backward (concat (regexp-quote smarty-left-delimiter) "\\$\\(\\w+\\)" (regexp-quote "|")) nil t))
- (if found
- (progn
- (setq found (re-search-forward (regexp-quote smarty-right-delimiter) start t))
- (if (not found)
- (progn
- (goto-char start)
- (insert label)
- (setq here (point-marker))
- (setq elt field)
- (setq continue t)
- (setq field-count 0)
- (setq stop nil)
- (while (and elt continue)
- (setq prompt (car elt))
- (insert ":")
- (setq result-value (smarty-template-field prompt nil t))
- (if (and (not result-value)
- (< field-count mandatory-count))
- (progn (setq continue nil)
- (delete-region start (point))
- (insert (concat label " "))
- (setq stop t))
- (if (not result-value)
- (setq continue nil)
- (setq here (point-marker))
- (insert ":")))
- (setq field-count (+ 1 field-count))
- (setq elt (cdr elt)))
- (when (not stop)
- (delete-region here (point))
- (if (not (or (looking-at smarty-right-delimiter)
- (looking-at "|")))
- (insert smarty-right-delimiter))))
- (goto-char start)
- (insert label " ")))
- (goto-char start)
- (insert label " "))))
-
-(defun smarty-template-capture-hook ()
- (smarty-hooked-abbrev 'smarty-template-capture))
-(defun smarty-template-config-load-hook ()
- (smarty-hooked-abbrev 'smarty-template-config-load))
-(defun smarty-template-else-hook ()
- (smarty-hooked-abbrev 'smarty-template-else))
-(defun smarty-template-elseif-hook ()
- (smarty-hooked-abbrev 'smarty-template-elseif))
-(defun smarty-template-foreach-hook ()
- (smarty-hooked-abbrev 'smarty-template-foreach))
-(defun smarty-template-foreachelse-hook ()
- (smarty-hooked-abbrev 'smarty-template-foreachelse))
-(defun smarty-template-if-hook ()
- (smarty-hooked-abbrev 'smarty-template-if))
-(defun smarty-template-include-hook ()
- (smarty-hooked-abbrev 'smarty-template-include))
-(defun smarty-template-include-php-hook ()
- (smarty-hooked-abbrev 'smarty-template-include-php))
-(defun smarty-template-insert-hook ()
- (smarty-hooked-abbrev 'smarty-template-insert))
-(defun smarty-template-ldelim-hook ()
- (smarty-hooked-abbrev 'smarty-template-ldelim))
-(defun smarty-template-literal-hook ()
- (smarty-hooked-abbrev 'smarty-template-literal))
-(defun smarty-template-php-hook ()
- (smarty-hooked-abbrev 'smarty-template-php))
-(defun smarty-template-rdelim-hook ()
- (smarty-hooked-abbrev 'smarty-template-rdelim))
-(defun smarty-template-section-hook ()
- (smarty-hooked-abbrev 'smarty-template-section))
-(defun smarty-template-sectionelse-hook ()
- (smarty-hooked-abbrev 'smarty-template-sectionelse))
-(defun smarty-template-strip-hook ()
- (smarty-hooked-abbrev 'smarty-template-strip))
-
-(defun smarty-template-assign-hook ()
- (smarty-hooked-abbrev 'smarty-template-assign))
-(defun smarty-template-counter-hook ()
- (smarty-hooked-abbrev 'smarty-template-counter))
-(defun smarty-template-cycle-hook ()
- (smarty-hooked-abbrev 'smarty-template-cycle))
-(defun smarty-template-debug-hook ()
- (smarty-hooked-abbrev 'smarty-template-debug))
-(defun smarty-template-eval-hook ()
- (smarty-hooked-abbrev 'smarty-template-eval))
-(defun smarty-template-fetch-hook ()
- (smarty-hooked-abbrev 'smarty-template-fetch))
-(defun smarty-template-html-checkboxes-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-checkboxes))
-(defun smarty-template-html-image-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-image))
-(defun smarty-template-html-options-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-options))
-(defun smarty-template-html-radios-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-radios))
-(defun smarty-template-html-select-date-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-select-date))
-(defun smarty-template-html-select-time-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-select-time))
-(defun smarty-template-html-table-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-table))
-(defun smarty-template-mailto-hook ()
- (smarty-hooked-abbrev 'smarty-template-mailto))
-(defun smarty-template-math-hook ()
- (smarty-hooked-abbrev 'smarty-template-math))
-(defun smarty-template-popup-hook ()
- (smarty-hooked-abbrev 'smarty-template-popup))
-(defun smarty-template-popup-init-hook ()
- (smarty-hooked-abbrev 'smarty-template-popup-init))
-(defun smarty-template-textformat-hook ()
- (smarty-hooked-abbrev 'smarty-template-textformat))
-
-(defun smarty-template-capitalize-hook ()
- (smarty-hooked-abbrev 'smarty-template-capitalize))
-(defun smarty-template-cat-hook ()
- (smarty-hooked-abbrev 'smarty-template-cat))
-(defun smarty-template-count-characters-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-characters))
-(defun smarty-template-count-paragraphs-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-paragraphs))
-(defun smarty-template-count-sentences-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-sentences))
-(defun smarty-template-count-words-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-words))
-(defun smarty-template-date-format-hook ()
- (smarty-hooked-abbrev 'smarty-template-date-format))
-(defun smarty-template-default-hook ()
- (smarty-hooked-abbrev 'smarty-template-default))
-(defun smarty-template-escape-hook ()
- (smarty-hooked-abbrev 'smarty-template-escape))
-(defun smarty-template-indent-hook ()
- (smarty-hooked-abbrev 'smarty-template-indent))
-(defun smarty-template-lower-hook ()
- (smarty-hooked-abbrev 'smarty-template-lower))
-(defun smarty-template-nl2br-hook ()
- (smarty-hooked-abbrev 'smarty-template-nl2br))
-(defun smarty-template-regex-replace-hook ()
- (smarty-hooked-abbrev 'smarty-template-regex-replace))
-(defun smarty-template-replace-hook ()
- (smarty-hooked-abbrev 'smarty-template-replace))
-(defun smarty-template-spacify-hook ()
- (smarty-hooked-abbrev 'smarty-template-spacify))
-(defun smarty-template-string-format-hook ()
- (smarty-hooked-abbrev 'smarty-template-string-format))
-(defun smarty-template-vstrip-hook ()
- (smarty-hooked-abbrev 'smarty-template-vstrip))
-(defun smarty-template-strip-tags-hook ()
- (smarty-hooked-abbrev 'smarty-template-strip-tags))
-(defun smarty-template-truncate-hook ()
- (smarty-hooked-abbrev 'smarty-template-truncate))
-(defun smarty-template-upper-hook ()
- (smarty-hooked-abbrev 'smarty-template-upper))
-(defun smarty-template-wordwrap-hook ()
- (smarty-hooked-abbrev 'smarty-template-wordwrap))
-
-(defun smarty-template-validate-hook ()
- (smarty-hooked-abbrev 'smarty-template-validate))
-(defun smarty-template-formtool-checkall-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-checkall))
-(defun smarty-template-formtool-copy-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-copy))
-(defun smarty-template-formtool-count-chars-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-count-chars))
-(defun smarty-template-formtool-init-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-init))
-(defun smarty-template-formtool-move-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-move))
-(defun smarty-template-formtool-moveall-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-moveall))
-(defun smarty-template-formtool-movedown-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-movedown))
-(defun smarty-template-formtool-moveup-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-moveup))
-(defun smarty-template-formtool-remove-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-remove))
-(defun smarty-template-formtool-rename-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-rename))
-(defun smarty-template-formtool-save-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-save))
-(defun smarty-template-formtool-selectall-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-selectall))
-(defun smarty-template-paginate-first-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-first))
-(defun smarty-template-paginate-last-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-last))
-(defun smarty-template-paginate-middle-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-middle))
-(defun smarty-template-paginate-next-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-next))
-(defun smarty-template-paginate-prev-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-prev))
-
-(defun smarty-template-btosmilies-hook ()
- (smarty-hooked-abbrev 'smarty-template-btosmilies))
-(defun smarty-template-bbcodetohtml-hook ()
- (smarty-hooked-abbrev 'smarty-template-bbcodetohtml))
-(defun smarty-template-date-formatto-hook ()
- (smarty-hooked-abbrev 'smarty-template-date-formatto))
-
-(defun smarty-template-capture ()
- "Insert a capture statement."
- (interactive)
- (smarty-template-generic-function "capture" t '("name" "assign") 0))
-
-(defun smarty-template-config-load ()
- "Insert a config_load statement."
- (interactive)
- (smarty-template-generic-function "config_load" nil '("file" "section" "scope" "global") 1))
-
-(defun smarty-template-else ()
- "Insert a else statement."
- (interactive)
- (smarty-template-generic-function "else" nil '() 0))
-
-(defun smarty-template-elseif ()
- "Insert a elseif statement."
- (interactive)
- (smarty-template-generic-function "elseif" nil '("condition") 1 nil t))
-
-(defun smarty-template-foreach ()
- "Insert a foreach statement."
- (interactive)
- (smarty-template-generic-function "foreach" t '("from" "item" "key" "name") 2))
-
-(defun smarty-template-foreachelse ()
- "Insert a foreachelse statement."
- (interactive)
- (smarty-template-generic-function "foreachelse" nil '() 0))
-
-(defun smarty-template-if ()
- "Insert a if statement."
- (interactive)
- (smarty-template-generic-function "if" t '("condition") 1 nil t))
-
-(defun smarty-template-include ()
- "Insert a include statement."
- (interactive)
- (smarty-template-generic-function "include" nil '("file" "assign") 1 t))
-
-(defun smarty-template-include-php ()
- "Insert a include_php statement."
- (interactive)
- (smarty-template-generic-function "include_php" nil '("file" "once" "assign") 1))
-
-(defun smarty-template-insert ()
- "Insert a insert statement."
- (interactive)
- (smarty-template-generic-function "insert" nil '("name" "assign" "script") 1 t))
-
-(defun smarty-template-ldelim ()
- "Insert a ldelim statement."
- (interactive)
- (smarty-template-generic-function "ldelim" nil '() 0))
-
-(defun smarty-template-literal ()
- "Insert a literal statement."
- (interactive)
- (smarty-template-generic-function "literal" t '() 0))
-
-(defun smarty-template-php ()
- "Insert a php statement."
- (interactive)
- (smarty-template-generic-function "php" t '() 0))
-
-(defun smarty-template-rdelim ()
- "Insert a rdelim statement."
- (interactive)
- (smarty-template-generic-function "rdelim" nil '() 0))
-
-(defun smarty-template-section ()
- "Insert a section statement."
- (interactive)
- (smarty-template-generic-function "section" t '("name" "loop" "start" "step" "max" "show") 2))
-
-(defun smarty-template-sectionelse ()
- "Insert a sectionelse statement."
- (interactive)
- (smarty-template-generic-function "sectionelse" nil '() 0))
-
-(defun smarty-template-strip ()
- "Insert a strip statement."
- (interactive)
- (smarty-template-generic-function "strip" t '() 0))
-
-
-(defun smarty-template-assign ()
- "Insert a assign statement."
- (interactive)
- (smarty-template-generic-function "assign" nil '("var" "value") 2))
-
-(defun smarty-template-counter ()
- "Insert a counter statement."
- (interactive)
- (smarty-template-generic-function "counter" nil '("name" "start" "skip" "direction" "print" "assign") 0))
-
-(defun smarty-template-cycle ()
- "Insert a cycle statement."
- (interactive)
- (smarty-template-generic-function "cycle" nil '("values" "name" "print" "advance" "delimiter" "assign" "reset") 1))
-
-(defun smarty-template-debug ()
- "Insert a debug statement."
- (interactive)
- (smarty-template-generic-function "debug" nil '("output") 0))
-
-(defun smarty-template-eval ()
- "Insert a eval statement."
- (interactive)
- (smarty-template-generic-function "eval" nil '("var" "assign") 1))
-
-(defun smarty-template-fetch ()
- "Insert a fetch statement."
- (interactive)
- (smarty-template-generic-function "fetch" nil '("file" "assign") 1))
-
-(defun smarty-template-html-checkboxes ()
- "Insert a html_checkboxes statement."
- (interactive)
- (smarty-template-generic-function "html_checkboxes" nil '("name" "values" "output" "selected" "options" "separator" "assign" "labels") 0))
-
-(defun smarty-template-html-image ()
- "Insert a html_image statement."
- (interactive)
- (smarty-template-generic-function "html_image" nil '("file" "height" "width" "basedir" "alt" "href" "path_prefix") 1))
-
-(defun smarty-template-html-options ()
- "Insert a html_options statement."
- (interactive)
- (smarty-template-generic-function "html_options" nil '("name" "values" "output" "selected" "options") 0))
-
-(defun smarty-template-html-radios ()
- "Insert a html_radios statement."
- (interactive)
- (smarty-template-generic-function "html_radios" nil '("name" "values" "output" "selected" "options" "separator" "assign") 0))
-
-(defun smarty-template-html-select-date ()
- "Insert a html_select_date statement."
- (interactive)
- (smarty-template-generic-function "html_select_date" nil '("prefix" "time" "start_year" "end_year" "display_days" "display_months" "display_years" "month_format" "day_format" "day_value_format" "year_as_text" "reverse_years" "field_array" "day_size" "month_size" "year_size" "all_extra" "day_extra" "month_extra" "year_extra" "field_order" "field_separator" "month_value_format" "year_empty" "month_empty" "day_empty") 0))
-
-(defun smarty-template-html-select-time ()
- "Insert a html_select_time statement."
- (interactive)
- (smarty-template-generic-function "html_select_time" nil '("prefix" "time" "display_hours" "display_minutes" "display_seconds" "display_meridian" "use_24_hours" "minute_interval" "second_interval" "field_array" "all_extra" "hour_extra" "minute_extra" "second_extra" "meridian_extra") 0))
-
-(defun smarty-template-html-table ()
- "Insert a html_table statement."
- (interactive)
- (smarty-template-generic-function "html_table" nil '("loop" "cols" "rows" "inner" "caption" "table_attr" "th_attr" "tr_attr" "td_attr" "trailpad" "hdir" "vdir") 1))
-
-(defun smarty-template-mailto ()
- "Insert a mailto statement."
- (interactive)
- (smarty-template-generic-function "mailto" nil '("address" "text" "encode" "cc" "bcc" "subject" "newsgroups" "followupto" "extra") 1))
-
-(defun smarty-template-math ()
- "Insert a math statement."
- (interactive)
- (smarty-template-generic-function "math" nil '("equation" "var" "format" "assign") 2 t))
-
-(defun smarty-template-popup ()
- "Insert a popup statement."
- (interactive)
- (smarty-template-generic-function "popup" nil '("text" "trigger" "sticky" "caption" "fgcolor" "bgcolor" "textcolor" "capcolor" "closecolor" "textfont" "captionfont" "closefont" "textsize" "captionsize" "closesize" "width" "height" "left" "right" "center" "above" "below" "border" "offsetx" "offsety" "fgbackground" "bgbackground" "closetext" "noclose" "status" "autostatus" "autostatuscap" "inarray" "caparray" "capicon" "snapx" "snapy" "fixx" "fixy" "background" "padx" "pady" "fullhtml" "frame" "function" "delay" "hauto" "vauto") 1))
-
-(defun smarty-template-popup-init ()
- "Insert a popup_init statement."
- (interactive)
- (smarty-template-generic-function "popup_init" nil '("src") 1))
-
-(defun smarty-template-textformat ()
- "Insert a textformat statement."
- (interactive)
- (smarty-template-generic-function "textformat" t '("style" "indent" "indent_first" "indent_char" "wrap" "wrap_char" "wrap_cut" "assign") 0))
-
-(defun smarty-template-capitalize ()
- "Insert a capitalize statement."
- (interactive)
- (smarty-template-generic-modifier "capitalize" '("upcase_numeric") 0))
-
-(defun smarty-template-cat ()
- "Insert a cat statement."
- (interactive)
- (smarty-template-generic-modifier "cat" '("value") 0))
-
-(defun smarty-template-count-characters ()
- "Insert a count_characters statement."
- (interactive)
- (smarty-template-generic-modifier "count_characters" '("include_whitespace") 0))
-
-(defun smarty-template-count-paragraphs ()
- "Insert a count_paragraphs statement."
- (interactive)
- (smarty-template-generic-modifier "count_paragraphs" '() 0))
-
-(defun smarty-template-count-sentences ()
- "Insert a count_sentences statement."
- (interactive)
- (smarty-template-generic-modifier "count_sentences" '() 0))
-
-(defun smarty-template-count-words ()
- "Insert a count_words statement."
- (interactive)
- (smarty-template-generic-modifier "count_words" '() 0))
-
-(defun smarty-template-date-format ()
- "Insert a date_format statement."
- (interactive)
- (smarty-template-generic-modifier "date_format" '("format" "default") 0))
-
-(defun smarty-template-default ()
- "Insert a default statement."
- (interactive)
- (smarty-template-generic-modifier "default" '("value") 0))
-
-(defun smarty-template-escape ()
- "Insert a escape statement."
- (interactive)
- (smarty-template-generic-modifier "escape" '("html|htmlall|url|urlpathinfo|quotes|hex|hexentity|javascript|mail" "charset") 0))
-
-(defun smarty-template-indent ()
- "Insert a indent statement."
- (interactive)
- (smarty-template-generic-modifier "indent" '("value" "character") 0))
-
-(defun smarty-template-lower ()
- "Insert a lower statement."
- (interactive)
- (smarty-template-generic-modifier "lower" '() 0))
-
-(defun smarty-template-nl2br ()
- "Insert a nl2br statement."
- (interactive)
- (smarty-template-generic-modifier "nl2br" '() 0))
-
-(defun smarty-template-regex-replace ()
- "Insert a regex_replace statement."
- (interactive)
- (smarty-template-generic-modifier "regex_replace" '("regexp" "string_to_replace") 2))
-
-(defun smarty-template-replace ()
- "Insert a replace statement."
- (interactive)
- (smarty-template-generic-modifier "replace" '("string" "string_to_replace_with") 2))
-
-(defun smarty-template-spacify ()
- "Insert a spacify statement."
- (interactive)
- (smarty-template-generic-modifier "spacify" '("character") 0))
-
-(defun smarty-template-string-format ()
- "Insert a string_format statement."
- (interactive)
- (smarty-template-generic-modifier "string_format" '("format") 1))
-
-(defun smarty-template-vstrip ()
- "Insert a strip statement."
- (interactive)
- (smarty-template-generic-modifier "strip" '() 0))
-
-(defun smarty-template-strip-tags ()
- "Insert a strip_tags statement."
- (interactive)
- (smarty-template-generic-modifier "strip_tags" '("replace_by_space") 0))
-
-(defun smarty-template-truncate ()
- "Insert a truncate statement."
- (interactive)
- (smarty-template-generic-modifier "truncate" '("count" "text_to_replace" "character_boundary" "middle_string") 0))
-
-(defun smarty-template-upper ()
- "Insert a upper statement."
- (interactive)
- (smarty-template-generic-modifier "upper" '() 0))
-
-(defun smarty-template-wordwrap ()
- "Insert a wordwrap statement."
- (interactive)
- (smarty-template-generic-modifier "wordwrap" '("count" "string" "character_boundary") 0))
-
-
-(defun smarty-template-validate ()
- "Insert a validate statement."
- (interactive)
- (smarty-template-generic-function "validate" nil '("field" "criteria" "message" "form" "transform" "trim" "empty" "halt" "assign" "append" "page") 3))
-
-(defun smarty-template-formtool-checkall ()
- "Insert a formtool_checkall statement."
- (interactive)
- (smarty-template-generic-function "formtool_checkall" nil '("name" "class" "style") 1))
-
-(defun smarty-template-formtool-copy ()
- "Insert a formtool_copy statement."
- (interactive)
- (smarty-template-generic-function "formtool_copy" nil '("from" "to" "save" "button_text" "all" "counter" "class" "style") 3))
-
-(defun smarty-template-formtool-count-chars ()
- "Insert a formtool_count_chars statement."
- (interactive)
- (smarty-template-generic-function "formtool_count_chars" nil '("name" "limit" "alert") 3))
-
-(defun smarty-template-formtool-init ()
- "Insert a formtool_init statement."
- (interactive)
- (smarty-template-generic-function "formtool_init" nil '("src") 1))
-
-(defun smarty-template-formtool-move ()
- "Insert a formtool_move statement."
- (interactive)
- (smarty-template-generic-function "formtool_move" nil '("from" "to" "save_from" "save_to" "all" "count_to" "count_from" "class" "style") 4))
-
-(defun smarty-template-formtool-moveall ()
- "Insert a formtool_moveall statement."
- (interactive)
- (smarty-template-generic-function "formtool_moveall" nil '("from" "to" "save_from" "save_to" "all" "count_to" "count_from" "class" "style") 4))
-
-(defun smarty-template-formtool-movedown ()
- "Insert a formtool_movedown statement."
- (interactive)
- (smarty-template-generic-function "formtool_movedown" nil '("save" "name" "class" "style") 2))
-
-(defun smarty-template-formtool-moveup ()
- "Insert a formtool_moveup statement."
- (interactive)
- (smarty-template-generic-function "formtool_moveup" nil '("save" "name" "class" "style") 2))
-
-(defun smarty-template-formtool-remove ()
- "Insert a formtool_remove statement."
- (interactive)
- (smarty-template-generic-function "formtool_remove" nil '("from" "save" "all" "counter" "class" "style") 2))
-
-(defun smarty-template-formtool-rename ()
- "Insert a formtool_rename statement."
- (interactive)
- (smarty-template-generic-function "formtool_rename" nil '("name" "from" "save" "class" "style") 3))
-
-(defun smarty-template-formtool-save ()
- "Insert a formtool_save statement."
- (interactive)
- (smarty-template-generic-function "formtool_save" nil '("from" "name" "save") 3))
-
-(defun smarty-template-formtool-selectall ()
- "Insert a formtool_selectall statement."
- (interactive)
- (smarty-template-generic-function "formtool_selectall" nil '("name" "class" "style") 1))
-
-(defun smarty-template-paginate-first ()
- "Insert a paginate_first statement."
- (interactive)
- (smarty-template-generic-function "paginate_first" nil '("id" "text") 0))
-
-(defun smarty-template-paginate-last ()
- "Insert a paginate_last statement."
- (interactive)
- (smarty-template-generic-function "paginate_last" nil '("id" "text") 0))
-
-(defun smarty-template-paginate-middle ()
- "Insert a paginate_middle statement."
- (interactive)
- (smarty-template-generic-function "paginate_middle" nil '("id" "format" "prefix" "page_limit" "link_prefix" "link_suffix") 0))
-
-(defun smarty-template-paginate-next ()
- "Insert a paginate_next statement."
- (interactive)
- (smarty-template-generic-function "paginate_next" nil '("id" "text") 0))
-
-(defun smarty-template-paginate-prev ()
- "Insert a paginate_prev statement."
- (interactive)
- (smarty-template-generic-function "paginate_prev" nil '("id" "text") 0))
-
-
-(defun smarty-template-btosmilies ()
- "Insert a B2Smilies statement."
- (interactive)
- (smarty-template-generic-modifier "B2Smilies" '() 0))
-
-(defun smarty-template-bbcodetohtml ()
- "Insert a bbcode2html statement."
- (interactive)
- (smarty-template-generic-modifier "bbcode2html" '() 0))
-
-(defun smarty-template-date-formatto ()
- "Insert a date_format2 statement."
- (interactive)
- (smarty-template-generic-modifier "date_format2" '("format" "default") 0))
-
-;;
-
-(defun smarty-resolve-env-variable (string)
- "Resolve environment variables in STRING."
- (while (string-match "\\(.*\\)${?\\(\\(\\w\\|_\\)+\\)}?\\(.*\\)" string)
- (setq string (concat (match-string 1 string)
- (getenv (match-string 2 string))
- (match-string 4 string))))
- string)
-
-(defun smarty-insert-string-or-file (string)
- "Insert STRING or file contents if STRING is an existing file name."
- (unless (equal string "")
- (let ((file-name
- (progn (string-match "^\\([^\n]+\\)" string)
- (smarty-resolve-env-variable (match-string 1 string)))))
- (if (file-exists-p file-name)
- (forward-char (cadr (insert-file-contents file-name)))
- (insert string)))))
-
-(defun smarty-template-insert-date ()
- "Insert date in appropriate format."
- (interactive)
- (insert
- (cond
- ;; 'american, 'european, 'scientific kept for backward compatibility
- ((eq smarty-date-format 'american) (format-time-string "%m/%d/%Y" nil))
- ((eq smarty-date-format 'european) (format-time-string "%d.%m.%Y" nil))
- ((eq smarty-date-format 'scientific) (format-time-string "%Y/%m/%d" nil))
- (t (format-time-string smarty-date-format nil)))))
-
-(defun smarty-template-header (&optional file-title)
- "Insert a Smarty file header."
- (interactive)
- (unless (equal smarty-file-header "")
- (let (pos)
- (save-excursion
- (smarty-insert-string-or-file smarty-file-header)
- (setq pos (point-marker)))
- (smarty-template-replace-header-keywords
- (point-min-marker) pos file-title))))
-
-(defun smarty-template-footer ()
- "Insert a Smarty file footer."
- (interactive)
- (unless (equal smarty-file-footer "")
- (let (pos)
- (save-excursion
- (setq pos (point-marker))
- (smarty-insert-string-or-file smarty-file-footer)
- (unless (= (preceding-char) ?\n)
- (insert "\n")))
- (smarty-template-replace-header-keywords pos (point-max-marker)))))
-
-(defun smarty-template-replace-header-keywords (beg end &optional file-title is-model)
- "Replace keywords in header and footer."
- (let ()
- (smarty-prepare-search-2
- (save-excursion
- (goto-char beg)
- (while (search-forward "<filename>" end t)
- (replace-match (buffer-name) t t))
- (goto-char beg)
- (while (search-forward "<copyright>" end t)
- (replace-match smarty-copyright-string t t))
- (goto-char beg)
- (while (search-forward "<author>" end t)
- (replace-match "" t t)
- (insert (user-full-name))
- (when user-mail-address (insert " <" user-mail-address ">")))
- (goto-char beg)
- (while (search-forward "<login>" end t)
- (replace-match (user-login-name) t t))
- (goto-char beg)
- (while (search-forward "<company>" end t)
- (replace-match smarty-company-name t t))
- (goto-char beg)
- ;; Replace <RCS> with $, so that RCS for the source is
- ;; not over-enthusiastic with replacements
- (while (search-forward "<RCS>" end t)
- (replace-match "$" nil t))
- (goto-char beg)
- (while (search-forward "<date>" end t)
- (replace-match "" t t)
- (smarty-template-insert-date))
- (goto-char beg)
- (while (search-forward "<year>" end t)
- (replace-match (format-time-string "%Y" nil) t t))
- (goto-char beg)
- (let (string)
- (while
- (re-search-forward "<\\(\\(\\w\\|\\s_\\)*\\) string>" end t)
- (setq string (read-string (concat (match-string 1) ": ")))
- (replace-match string t t)))
- (goto-char beg)
- (when (and (not is-model) (search-forward "<cursor>" end t))
- (replace-match "" t t))))))
-
-(provide 'smarty-mode)
-;;; smarty-mode.el ends here \ No newline at end of file
diff --git a/emacs.d/nxhtml/autostart.el b/emacs.d/nxhtml/autostart.el
deleted file mode 100644
index 44a6901..0000000
--- a/emacs.d/nxhtml/autostart.el
+++ /dev/null
@@ -1,194 +0,0 @@
-;;; autostart.el --- Load nxhtml
-;;
-;; Author: By: Lennart Borgman
-;; Created: Fri Dec 15 2006
-;; Version:
-;; Last-Updated: 2009-04-30 Thu
-;; Keywords:
-;; Compatibility:
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Fix-me: Split out the definitions from this file so it can be
-;; loaded during byte compilation.
-
-;;(eval-when-compile (require 'web-vcs nil t))
-;;(eval-when-compile (require 'nxhtml-web-vcs nil t))
-
-(message "Nxml/Nxhtml Autostart.el loading ...")
-
-(defconst nxhtml-autostart-trace nil)
-(defsubst nxhtml-autostart-trace (format-string &rest args)
- (when nxhtml-autostart-trace
- (apply 'message format-string args)))
-
-(defconst nxhtml-load-time-start (float-time))
-
-;; Add this dir to load-path
-(add-to-list 'load-path
- (file-name-directory (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name)))
-
-(require 'nxhtml-base)
-(eval-and-compile (when (fboundp 'nxml-mode)
- (load (expand-file-name "etc/schema/schema-path-patch"
- nxhtml-install-dir))))
-
-;; (defun nxhtml-custom-load-and-get-value (symbol)
-;; (custom-load-symbol symbol)
-;; (symbol-value symbol))
-
-(defun nxhtml-list-loaded-features (use-message)
- (interactive (list t))
- (let ((buf (when use-message ;(called-interactively-p)
- (get-buffer-create "*nXhtml loaded features*"))))
- (if buf
- (with-current-buffer buf (erase-buffer))
- (message "")
- (message "=== Loaded at nxhtml/autostart.el end:"))
- (dolist (feature '(
- as-external
- html-chklnk
- html-imenu
- html-move
- html-pagetoc
- html-quote
- html-site
- html-toc
- html-upl
- html-wtoc
- inlimg
- mumamo
- nxhtml-bug
- nxhtml-menu
- nxhtml-mode
- nxhtml-mumamo
- nxhtml-strval
- nxhtml
- nxhtml-js
- nxml-where
- outline-magic
- rngalt
- tidy-xhtml
- xhtml-help
- ))
- (when (featurep feature)
- (if buf
- (with-current-buffer buf
- (insert (format "(feature '%s)=%s\n" feature (featurep feature))))
- (message "(feature '%s)=%s" feature (featurep feature)))))
- (if buf
- (display-buffer buf)
- (message ""))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Code that will run on loading this file
-
-(if (< emacs-major-version 23)
- (unless (featurep 'autostart22)
- (load (expand-file-name "autostart22" nxhtml-install-dir)))
- ;; Check that the nxml-mode included with Emacs is used. There
- ;; has been some problems on Debian with this.
- (let ((nxml-mode-file (locate-library "nxml-mode"))
- (help-file (locate-library "help")))
- (unless (string= (expand-file-name ".." help-file)
- (expand-file-name "../.." nxml-mode-file))
- (error "Wrong nxml-mode=%s used, please use the one that comes with Emacs" nxml-mode-file))))
-
-(let* ((util-dir (file-name-as-directory (expand-file-name "util" nxhtml-install-dir)))
- (related-dir (file-name-as-directory (expand-file-name "related" nxhtml-install-dir)))
- (nxhtml-dir (file-name-as-directory (expand-file-name "nxhtml" nxhtml-install-dir)))
- ;;(company-dir (file-name-as-directory (expand-file-name "util/nxhtml-company-mode" nxhtml-install-dir)))
- (tests-dir (file-name-as-directory (expand-file-name "tests" nxhtml-install-dir))))
- (add-to-list 'load-path nxhtml-dir)
- (add-to-list 'load-path related-dir)
- (add-to-list 'load-path util-dir)
- (add-to-list 'load-path nxhtml-install-dir)
- ;;(add-to-list 'load-path company-dir)
- (add-to-list 'load-path tests-dir)
-
- (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start))
-
- ;; Autoloading etc
- ;; (unless (featurep 'web-vcs)
- ;; (load (expand-file-name "web-vcs" nxhtml-install-dir) (not nxhtml-autoload-web)))
-
- ;; (when (catch 'miss
- ;; (dolist (file nxhtml-basic-files)
- ;; (let ((dl-file (expand-file-name file nxhtml-install-dir)))
- ;; (unless (file-exists-p dl-file)
- ;; (throw 'miss t))))
- ;; nil)
- ;; (nxhtml-setup-auto-download nxhtml-install-dir))
-
- (unless (featurep 'web-autoload)
- (load (expand-file-name "web-autoload" nxhtml-install-dir) (not nxhtml-autoload-web)))
-
- (when nxhtml-autoload-web
- (ad-activate 'require t))
-
- ;; Fix-me: Why must as-external be loaded? Why doesn't it work in batch?
- ;;(unless noninteractive (require 'as-external))
-
- (unless (featurep 'nxhtml-loaddefs)
- (load (expand-file-name "nxhtml-loaddefs" nxhtml-install-dir) nxhtml-autoload-web))
- (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start))
-
- ;; Turn on `nxhtml-menu-mode' unconditionally
- (nxhtml-autostart-trace "Turn on `nxhtml-menu-mode' unconditionally")
- (nxhtml-menu-mode 1)
- (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start))
-
- ;; Patch the rnc include paths
- (when (fboundp 'rncpp-patch-xhtml-loader) (rncpp-patch-xhtml-loader))
- (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start))
-
- ;; Load nXhtml
- (unless (featurep 'nxhtml-autoload)
- (load (expand-file-name "nxhtml/nxhtml-autoload" nxhtml-install-dir))))
-(nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start))
-
-
-(unless (featurep 'nxhtml-autostart)
- ;; Provide the feature here to avoid loading looping on error.
- (provide 'nxhtml-autostart)
-
- ;; Tell what have been loaded of nXhtml:
- (when nxhtml-autostart-trace (nxhtml-list-loaded-features nil))
-
- ;; How long time did it all take?
- (message "Nxml/Nxhtml Autostart.el loaded in %.1f seconds" (- (float-time) nxhtml-load-time-start)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; autostart.el ends here
diff --git a/emacs.d/nxhtml/autostart22.el b/emacs.d/nxhtml/autostart22.el
deleted file mode 100644
index 2376d43..0000000
--- a/emacs.d/nxhtml/autostart22.el
+++ /dev/null
@@ -1,71 +0,0 @@
-;;; autostart22.el --- Example of autostart file for Emacs22
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-01-01 Thu
-;; Version:
-;; Last-Updated: 2009-01-05 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; This file is for Emacs 22 only.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Change this file according to the path of your nxml-mode dir. If
-;; you do not use nxml-mode then just use autostart.el.
-;;
-;; NOTICE: You need to enter the path to your nxml-mode installation
-;; below.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(let ((debug-on-error t))
- (if (/= emacs-major-version 22)
- (message "This file (autostart22.el) is for Emacs 22 only")
-
- (defalias 'Custom-mode 'custom-mode)
-
- (let* ((this-file (or load-file-name buffer-file-name))
- (this-dir (file-name-directory this-file))
- ;; FIX-ME: Download nXml (since it is not included in Emacs
- ;; 22) and place the path to rng-auto.el in your downloaded
- ;; nXml HERE:
- (rng-auto-file (or (locate-library "rng-auto.el")
- "c:/emacs/u/081231/EmacsW32/nxhtml/nxml-mode-20041004/rng-auto.el")))
- (unless (file-exists-p rng-auto-file)
- (error "Can't find rng-auto.el, please edit %s" this-file))
- (load rng-auto-file))))
-
-(provide 'autostart22)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; autostart22.el ends here
diff --git a/emacs.d/nxhtml/emacs22.cmd b/emacs.d/nxhtml/emacs22.cmd
deleted file mode 100644
index d50ac96..0000000
--- a/emacs.d/nxhtml/emacs22.cmd
+++ /dev/null
@@ -1 +0,0 @@
-c:\emacs\emacs-22.3\bin\emacs.exe -Q --debug-init -l autostart.el
diff --git a/emacs.d/nxhtml/etc/img/pause/pause.jpg b/emacs.d/nxhtml/etc/img/pause/pause.jpg
deleted file mode 100644
index ff92075..0000000
--- a/emacs.d/nxhtml/etc/img/pause/pause.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/etc/img/pause/pause2.jpg b/emacs.d/nxhtml/etc/img/pause/pause2.jpg
deleted file mode 100644
index 6411344..0000000
--- a/emacs.d/nxhtml/etc/img/pause/pause2.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc b/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc
deleted file mode 100644
index aa2eff3..0000000
--- a/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/etc/schema/genshi-old.rnc b/emacs.d/nxhtml/etc/schema/genshi-old.rnc
deleted file mode 100644
index 5384fe1..0000000
--- a/emacs.d/nxhtml/etc/schema/genshi-old.rnc
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace py = "http://genshi.edgewall.org/"
-
-genshi.expr-type = xsd:string { minLength = "1" }
-genshi.with-type = xsd:string { minLength = "1" }
-genshi.choose-type = xsd:string
-genshi.def-type = xsd:string
-genshi.xpath-type = xsd:anyURI
-
-genshi.attrib = attribute py:if { genshi.expr-type }?,
- attribute py:choose { genshi.choose-type }?,
- attribute py:when { genshi.expr-type }?,
- attribute py:otherwise { genshi.expr-type }?,
- attribute py:for { genshi.expr-type }?,
- attribute py:def { genshi.def-type }?,
- attribute py:match { genshi.xpath-type }?,
- attribute py:with { genshi.with-type }?,
- attribute py:attrs { genshi.expr-type }?,
- attribute py:content { genshi.expr-type }?,
- attribute py:replace { genshi.expr-type }?,
- attribute py:strip { genshi.expr-type }?
-
-genshi.if.attlist = attribute expr { genshi.expr-type }
-genshi.for.attlist = attribute each { genshi.expr-type }
-genshi.def.attlist = attribute each { genshi.expr-type }
-genshi.with.attlist = attribute vars { genshi.with-type }
-
-
diff --git a/emacs.d/nxhtml/etc/schema/genshi-schemas.xml b/emacs.d/nxhtml/etc/schema/genshi-schemas.xml
deleted file mode 100644
index 89fe05f..0000000
--- a/emacs.d/nxhtml/etc/schema/genshi-schemas.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <typeId id="XHTML" uri="qtmstr-xhtml.rnc" />
-</locatingRules>
diff --git a/emacs.d/nxhtml/etc/schema/genshi.rnc b/emacs.d/nxhtml/etc/schema/genshi.rnc
deleted file mode 100644
index b9ddf76..0000000
--- a/emacs.d/nxhtml/etc/schema/genshi.rnc
+++ /dev/null
@@ -1,84 +0,0 @@
-default namespace = "http://genshi.edgewall.org/"
-namespace py = "http://genshi.edgewall.org/"
-
-include "xinclude.rnc"
-
-# There's no way to just match the text part against a Genshi Python expression
-# See: http://relaxng.org/compact-tutorial-20030326.html#id2814737
-python.expression = text
-
-genshi.expr-type = xsd:string { minLength = "1" }
-genshi.xpath-type = xsd:anyURI
-
-genshi.attrib =
- attribute py:if { genshi.expr-type }?,
- attribute py:choose { text }?,
- attribute py:when { genshi.expr-type }?,
- attribute py:otherwise { text }?,
- attribute py:for { genshi.expr-type }?,
- attribute py:def { genshi.expr-type }?,
- attribute py:match { genshi.xpath-type}?,
- attribute py:with { genshi.expr-type }?,
- attribute py:attrs { genshi.expr-type }?,
- attribute py:content { text }?,
- attribute py:replace { genshi.expr-type }?,
- attribute py:strip { text }?
-
-genshi.if.attlist = attribute test { genshi.expr-type }
-genshi.choose.attlist = attribute test { text }
-genshi.when.attlist = attribute test { genshi.expr-type }
-genshi.for.attlist = attribute each { genshi.expr-type }
-genshi.def.attlist = attribute function { genshi.expr-type }
-genshi.with.attlist = attribute vars { genshi.expr-type }
-genshi.replace.attlist = attribute value { genshi.expr-type }
-genshi.match.attlist =
- attribute path { genshi.xpath-type },
- attribute buffer { "true" | "false" }?,
- attribute once { "true" | "false" }?,
- attribute recursive { "true" | "false" }?
-
-genshi.choose =
- element py:choose { genshi.choose.attlist,
- genshi.model
- }
-genshi.when =
- element py:when { genshi.when.attlist,
- genshi.model
- }
-genshi.otherwise =
- element py:otherwise {
- genshi.model
- }
-genshi.if =
- element py:if { genshi.if.attlist,
- genshi.model
- }
-genshi.for =
- element py:for { genshi.for.attlist,
- genshi.model
- }
-genshi.def =
- element py:def { genshi.def.attlist,
- genshi.model
- }
-genshi.with =
- element py:with { genshi.with.attlist,
- genshi.model
- }
-genshi.match =
- element py:match { genshi.match.attlist,
- genshi.model
- }
-genshi.replace =
- element py:replace { genshi.replace.attlist,
- genshi.model
- }
-
-genshi.allowed.children = text
-
-genshi.class = genshi.if | genshi.choose | genshi.when | genshi.otherwise
- | genshi.for | genshi.def | genshi.with | genshi.match | genshi.replace
- | python.expression
- | xi.include
-
-genshi.model = genshi.class* | genshi.allowed.children* \ No newline at end of file
diff --git a/emacs.d/nxhtml/etc/schema/mjt.rnc b/emacs.d/nxhtml/etc/schema/mjt.rnc
deleted file mode 100644
index b37f01a..0000000
--- a/emacs.d/nxhtml/etc/schema/mjt.rnc
+++ /dev/null
@@ -1,74 +0,0 @@
-include "xhtml-loader.rnc"
-
-MjtAll.attrib =
- attribute mjt.def { Text.datatype }?,
- attribute mjt.when { Text.datatype }?,
- attribute mjt.otherwise { Text.datatype }?,
- attribute mjt.for { Text.datatype }?,
- attribute mjt.if { Text.datatype }?,
- attribute mjt.elif { Text.datatype }?,
- attribute mjt.else { Text.datatype }?,
- attribute mjt.script { Text.datatype }?,
- attribute mjt.choose { Text.datatype }?,
- attribute mjt.replace { Text.datatype }?,
- attribute mjt.content { Text.datatype }?,
- attribute mjt.strip { Text.datatype }?,
- attribute mjt.src { Text.datatype }?,
- attribute mjt.style { Text.datatype }?,
- attribute mjt.class { Text.datatype }?,
- attribute mjt.id { Text.datatype }?,
- attribute mjt.attrs { Text.datatype }?,
- attribute mjt.task { Text.datatype }?
-
-
-a.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?
-area.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?
-form.attlist &=
- attribute mjt.onreset { Script.datatype }?,
- attribute mjt.onsubmit { Script.datatype }?
-body.attlist &=
- attribute mjt.onload { Script.datatype }?,
- attribute mjt.onunload { Script.datatype }?
-label.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?
-input.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onchange { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?,
- attribute mjt.onselect { Script.datatype }?
-select.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onchange { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?
-textarea.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onchange { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?,
- attribute mjt.onselect { Script.datatype }?
-button.attlist &=
- attribute mjt.onblur { Script.datatype }?,
- attribute mjt.onfocus { Script.datatype }?
-
-MjtEvents.attrib =
- attribute mjt.onclick { Script.datatype }?,
- attribute mjt.ondblclick { Script.datatype }?,
- attribute mjt.onmousedown { Script.datatype }?,
- attribute mjt.onmouseup { Script.datatype }?,
- attribute mjt.onmouseover { Script.datatype }?,
- attribute mjt.onmousemove { Script.datatype }?,
- attribute mjt.onmouseout { Script.datatype }?,
- attribute mjt.onkeypress { Script.datatype }?,
- attribute mjt.onkeydown { Script.datatype }?,
- attribute mjt.onkeyup { Script.datatype }?
-
-
-Common.attrib &= MjtAll.attrib
-CommonIdRequired.attrib &= MjtAll.attrib
-
-Common.attrib &= MjtEvents.attrib
-CommonIdRequired.attrib &= MjtEvents.attrib
diff --git a/emacs.d/nxhtml/etc/schema/nxml-erb.patch b/emacs.d/nxhtml/etc/schema/nxml-erb.patch
deleted file mode 100644
index 362913b..0000000
--- a/emacs.d/nxhtml/etc/schema/nxml-erb.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- nxml-mode-orig/xmltok.el 2005-10-16 15:32:53.000000000 -0400
-+++ nxml-mode-erb/xmltok.el 2006-09-01 01:02:55.000000000 -0400
-@@ -496,6 +496,9 @@
- (xmltok+ (xmltok-g markup-declaration "!")
- (xmltok-g comment-first-dash "-"
- (xmltok-g comment-open "-") opt) opt))
-+ (erb-section
-+ (xmltok+ "%"
-+ (xmltok-g erb-section-open "[^%]") opt))
- (cdata-section
- (xmltok+ "!"
- (xmltok-g marked-section-open "\\[")
-@@ -526,6 +529,7 @@
- ;; by default
- or cdata-section
- or comment
-+ or erb-section
- or processing-instruction))
- (xmltok-defregexp
- xmltok-attribute
-@@ -693,6 +697,16 @@
- nil
- "]]>")
- 'not-well-formed)))
-+ ((xmltok-after-lt start erb-section-open)
-+ (setq xmltok-type
-+ (if (re-search-forward "[^%]%>" nil t)
-+ 'erb-section
-+ (xmltok-add-error "No closing %>")
-+ (xmltok-add-dependent 'xmltok-unclosed-reparse-p
-+ nil
-+ nil
-+ "%>")
-+ 'not-well-formed)))
- ((xmltok-after-lt start processing-instruction-question)
- (xmltok-scan-after-processing-instruction-open))
- ((xmltok-after-lt start comment-open)
diff --git a/emacs.d/nxhtml/etc/schema/old-genshi.rnc b/emacs.d/nxhtml/etc/schema/old-genshi.rnc
deleted file mode 100644
index 5a50385..0000000
--- a/emacs.d/nxhtml/etc/schema/old-genshi.rnc
+++ /dev/null
@@ -1,31 +0,0 @@
-namespace py = "http://genshi.edgewall.org/"
-
-genshi.expr-type = xsd:string { minLength = "1" }
-genshi.with-type = xsd:string { minLength = "1" }
-genshi.choose-type = xsd:string
-genshi.def-type = xsd:string
-genshi.xpath-type = xsd:anyURI
-
-genshi.attrib = attribute py:if { genshi.expr-type }?,
- attribute py:choose { genshi.choose-type }?,
- attribute py:when { genshi.expr-type }?,
- attribute py:otherwise { genshi.expr-type }?,
- attribute py:for { genshi.expr-type }?,
- attribute py:def { genshi.def-type }?,
- attribute py:match { genshi.xpath-type }?,
- attribute py:with { genshi.with-type }?,
- attribute py:attrs { genshi.expr-type }?,
- attribute py:content { genshi.expr-type }?,
- attribute py:replace { genshi.expr-type }?,
- attribute py:strip { genshi.expr-type }?
-
-genshi.if.attlist = attribute test { genshi.expr-type }
-genshi.for.attlist = attribute each { genshi.expr-type }
-genshi.def.attlist = attribute function { genshi.expr-type }
-genshi.with.attlist = attribute vars { genshi.with-type }
-genshi.match.attlist = attribute path { genshi.xpath-type },
- attribute buffer { genshi.expr-type }?,
- attribute once { genshi.expr-type }?,
- attribute recursive { genshi.expr-type }?
-
-
diff --git a/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc b/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc
deleted file mode 100644
index b5f84bd..0000000
--- a/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc
+++ /dev/null
@@ -1,61 +0,0 @@
-namespace py = "http://genshi.edgewall.org/"
-namespace xi = "http://www.w3.org/2001/XInclude"
-
-include "genshi.rnc"
-include "xinclude.rnc"
-include "xhtml-loader.rnc"
-
-start |= head|body|p|\div|h1|h2|h3|h4|h5|h6|hr|pre|dl|ol|ul|table|form
-
-Common.attrib &= genshi.attrib
-head.attlist &= genshi.attrib
-html.attlist &= genshi.attrib
-
-Head.class = base | isindex | link | meta | script | title | style |
- if-head | for-head | def-head | with-head
-
-Head.model = Head.class*
-
-head.content &= Head.model*
-
-if-inline = element py:if { genshi.if.attlist, Inline.model }
-if-block = element py:if { genshi.if.attlist, Block.model }
-if-head = element py:if { genshi.if.attlist, Head.model }
-for-inline = element py:for { genshi.for.attlist, Inline.model }
-for-block = element py:for { genshi.for.attlist, Block.model }
-for-head = element py:for { genshi.for.attlist, Head.model }
-def-inline = element py:def { genshi.def.attlist, Inline.model }
-def-block = element py:def { genshi.def.attlist, Block.model }
-def-head = element py:def { genshi.def.attlist, Head.model }
-with-inline = element py:with { genshi.with.attlist, Inline.model }
-with-block = element py:with { genshi.with.attlist, Block.model }
-with-head = element py:with { genshi.with.attlist, Head.model }
-match-inline = element py:match { genshi.match.attlist, Inline.model }
-match-block = element py:match { genshi.match.attlist, Block.model }
-match-head = element py:match { genshi.match.attlist, Head.model }
-
-Inline.class |= if-inline | for-inline | def-inline | with-inline | match-inline
-Block.class |= if-block | for-block | def-block | with-block | match-block
-
-xi-inline = element xi:include {
- xinclude.include.attlist,
- element xi:fallback { genshi.attrib,
- (xi-inline | Inline.model)*
- }?
- }
-
-xi-block = element xi:include { xinclude.include.attlist,
- element xi:fallback { genshi.attrib,
- (xi-block | Block.model)*
- }?
- }
-
-xi-head = element xi:include { xinclude.include.attlist,
- element xi:fallback { genshi.attrib,
- (xi-head | Head.model)*
- }?
- }
-
-Inline.class |= xi-inline
-Block.class |= xi-block
-Head.class |= xi-head
diff --git a/emacs.d/nxhtml/etc/schema/old-xinclude.rnc b/emacs.d/nxhtml/etc/schema/old-xinclude.rnc
deleted file mode 100644
index c45cf0c..0000000
--- a/emacs.d/nxhtml/etc/schema/old-xinclude.rnc
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace xi = "http://www.w3.org/2001/XInclude"
-namespace local = ""
-
-xinclude.include.attlist =
- attribute href { xsd:anyURI }?,
- attribute parse { xsd:string }?,
- attribute xpointer { xsd:string }?,
- attribute encoding { xsd:string }?,
- attribute accept { xsd:string }?,
- attribute accept-language { xsd:string }?
-
diff --git a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc
deleted file mode 100644
index 61ab89e..0000000
--- a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc
+++ /dev/null
@@ -1,58 +0,0 @@
-namespace py = "http://genshi.edgewall.org/"
-namespace xi = "http://www.w3.org/2001/XInclude"
-
-include "genshi.rnc"
-include "xinclude.rnc"
-include "xhtml-loader.rnc"
-
-start |= head|body|p|\div|h1|h2|h3|h4|h5|h6|hr|pre|dl|ol|ul|table|form
-
-Common.attrib &= genshi.attrib
-head.attlist &= genshi.attrib
-html.attlist &= genshi.attrib
-
-Head.class = base | isindex | link | meta | script | title | style |
- if-head | for-head | def-head | with-head
-
-Head.model = Head.class*
-
-head.content &= Head.model*
-
-if-inline = element py:if { genshi.if.attlist, Inline.model }
-if-block = element py:if { genshi.if.attlist, Block.model }
-if-head = element py:if { genshi.if.attlist, Head.model }
-for-inline = element py:for { genshi.for.attlist, Inline.model }
-for-block = element py:for { genshi.for.attlist, Block.model }
-for-head = element py:for { genshi.for.attlist, Head.model }
-def-inline = element py:def { genshi.def.attlist, Inline.model }
-def-block = element py:def { genshi.def.attlist, Block.model }
-def-head = element py:def { genshi.def.attlist, Head.model }
-with-inline = element py:with { genshi.with.attlist, Inline.model }
-with-block = element py:with { genshi.with.attlist, Block.model }
-with-head = element py:with { genshi.with.attlist, Head.model }
-
-Inline.class |= if-inline | for-inline | def-inline | with-inline
-Block.class |= if-block | for-block | def-block | with-block
-
-xi-inline = element xi:include {
- xinclude.include.attlist,
- element xi:fallback { genshi.attrib,
- (xi-inline | Inline.model)*
- }?
- }
-
-xi-block = element xi:include { xinclude.include.attlist,
- element xi:fallback { genshi.attrib,
- (xi-block | Block.model)*
- }?
- }
-
-xi-head = element xi:include { xinclude.include.attlist,
- element xi:fallback { genshi.attrib,
- (xi-head | Head.model)*
- }?
- }
-
-Inline.class |= xi-inline
-Block.class |= xi-block
-Head.class |= xi-head
diff --git a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc
deleted file mode 100644
index ff5d0a9..0000000
--- a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc
+++ /dev/null
@@ -1,66 +0,0 @@
-default namespace = "http://www.w3.org/1999/xhtml"
-
-include "genshi.rnc"
-include "xhtml-loader.rnc" {
- start = html | head | head.content | body | frameset | frame | noframes |
- Block.class | Inline.class | Table.class | Form.extra.class | genshi.class
- html = element html { html.attlist, (genshi.model | (head, (body | frameset | genshi.model))) }
- frameset =
- element frameset {
- frameset.attlist,
- (((frameset | frame)+ & noframes?) | genshi.model)
- }
- noframes = element noframes { noframes.attlist, (body | genshi.model) }
- title = element title { title.attlist, (text | genshi.model)* }
- script = element script { script.attlist, (text | genshi.model)* }
- style = element style { style.attlist, (text | genshi.model)* }
- dl = element dl { dl.attlist, ((dt | dd)+ | genshi.model) }
- ol = element ol { ol.attlist, (li+ | genshi.model) }
- ul = element ul { ul.attlist, (li+ | genshi.model) }
- dir = element dir { dir.attlist, (li.noblock+ | genshi.model) }
- menu = element menu { menu.attlist, (li.noblock+ | genshi.model) }
- select = element select { select.attlist, ((option | optgroup)+ | genshi.model) }
- option =
- element option {
- Common.attrib,
- attribute selected { "selected" }?,
- attribute value { text }?,
- (text | genshi.model)*
- }
- textarea = element textarea { textarea.attlist, (text & genshi.model)* }
- optgroup = element optgroup { optgroup.attlist, (option+ | genshi.model) }
- table =
- element table {
- table.attlist,
- (caption? | genshi.model),
- (col* | colgroup* | genshi.model),
- (((thead? | genshi.model),
- (tfoot? | genshi.model),
- (tbody+ | genshi.model)) | (tr+ | genshi.model))
- }
- colgroup = element colgroup { colgroup.attlist, (col* | genshi.model) }
- tr = element tr { tr.attlist, ((th | td)+ | genshi.model) }
- tbody = element tbody { tbody.attlist, (tr+ | genshi.model) }
- thead = element thead { thead.attlist, (tr+ | genshi.model) }
- tfoot = element tfoot { tfoot.attlist, (tr+ | genshi.model) }
-}
-
-Table.class = caption | colgroup | col | tbody | thead | tfoot | th | tr | td
-Form.extra.class = option | optgroup | legend
-
-Block.class |= genshi.class
-Inline.class |= genshi.class
-head.content &= genshi.class
-
-Core.attrib &= genshi.attrib
-html.attlist &= genshi.attrib
-head.attlist &= genshi.attrib
-title.attlist &= genshi.attrib
-base.attlist &= genshi.attrib
-meta.attlist &= genshi.attrib
-script.attlist &= genshi.attrib
-param.attlist &= genshi.attrib
-Edit.attrib &= genshi.attrib
-
-genshi.allowed.children |= html | head | head.content | body | frameset | frame
- | noframes | Inline.class | Block.class | Table.class | Form.extra.class
diff --git a/emacs.d/nxhtml/etc/schema/schema-path-patch.el b/emacs.d/nxhtml/etc/schema/schema-path-patch.el
deleted file mode 100644
index a6d59fc..0000000
--- a/emacs.d/nxhtml/etc/schema/schema-path-patch.el
+++ /dev/null
@@ -1,95 +0,0 @@
-;;; schema-path-patch.el --- Patch schema paths
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-08T20:21:31+0200 Fri
-;; Version: 0.2
-;; Last-Updated: 2008-08-19T00:21:25+0200 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; Cannot open load file: schema-path-patch.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Schemas here may include parts from nxml and need to know the path.
-;; This file can be used to patch the paths.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defvar rncpp-this-dir
- (file-name-as-directory
- (file-name-directory
- (if load-file-name load-file-name buffer-file-name))))
-
-(defun rncpp-get-nxml-schema-dir ()
- ;; First look for nxml-mode included with Emacs
- (let ((schema-dir (file-name-as-directory
- (expand-file-name "schema" data-directory))))
- (unless (file-directory-p schema-dir)
- ;; This is an old nxml-mode, look for its schemas dir.
- (let ((nxml-mode-dir (file-name-as-directory
- (file-name-directory (locate-library "nxml-mode")))))
- (setq schema-dir (file-name-as-directory
- (expand-file-name "schema" nxml-mode-dir)))))
- (unless (file-directory-p schema-dir)
- (error "Can't find schema-dir=%s" schema-dir))
- schema-dir))
-
-;; Use xhtml-loader.rnc (an idea from Bryan Waite):
-(defun rncpp-patch-xhtml-loader ()
- "Patch xhtml-loader.rnc so genshi and mjt rnc files works."
- ;;(interactive)
- (let* ((default-directory rncpp-this-dir)
- (loader-path (expand-file-name "xhtml-loader.rnc"))
- (loader-buf (find-buffer-visiting loader-path))
- (schema-dir (rncpp-get-nxml-schema-dir))
- (schema-relative-dir (file-relative-name schema-dir))
- (loader-string (concat "include \""
- schema-relative-dir
- "xhtml.rnc\"\n")))
- (when loader-buf (kill-buffer loader-buf))
- (setq loader-buf (find-file-noselect loader-path))
- (with-current-buffer loader-buf
- (unless (file-exists-p loader-path)
- (insert loader-string))
- ;; Test if correct
- (if (string= (buffer-substring-no-properties (point-min) (point-max))
- loader-string)
- (message "xhtml-loader.rnc was ok")
- (message "Patching xhtml-loader.rnc")
- (delete-region (point-min) (point-max))
- (insert loader-string))
- (basic-save-buffer)
- (kill-buffer (current-buffer)))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; schema-path-patch.el ends here
diff --git a/emacs.d/nxhtml/etc/schema/xinclude.rnc b/emacs.d/nxhtml/etc/schema/xinclude.rnc
deleted file mode 100644
index cbda979..0000000
--- a/emacs.d/nxhtml/etc/schema/xinclude.rnc
+++ /dev/null
@@ -1,35 +0,0 @@
-default namespace = "http://www.w3.org/2001/XInclude"
-namespace xi = "http://www.w3.org/2001/XInclude"
-
-xi.include.attlist =
- attribute href { xsd:anyURI }?,
- attribute parse { "xml" | "text" }?,
- attribute xpointer { xsd:string }?,
- attribute encoding { xsd:string }?,
- attribute accept { xsd:string }?,
- attribute accept-language { xsd:string }?
-
-xi.include.attlist.extra =
- attribute * - xi.include.attlist { text }*
-
-xi.include =
- element xi:include {
- xi.include.attlist,
- xi.include.attlist.extra,
- (xi.fallback? | xi.include.extra)*
- }
-
-xi.include.extra = notAllowed
-
-xi.fallback.attlist =
- attribute * { text }*
-
-xi.fallback =
- element xi:fallback {
- xi.fallback.attlist,
- (xi.include | xi.fallback.extra)*
- }
-
-xi.fallback.extra = notAllowed
-
-xi.class = xi.include | xi.fallback \ No newline at end of file
diff --git a/emacs.d/nxhtml/etc/templates/rollover-2v.css b/emacs.d/nxhtml/etc/templates/rollover-2v.css
deleted file mode 100644
index ed10a41..0000000
--- a/emacs.d/nxhtml/etc/templates/rollover-2v.css
+++ /dev/null
@@ -1,25 +0,0 @@
-ROLLOVER_SPEC a {
- /* Image */
- display: block;
- background: transparent url("IMG_URL") 0 0 no-repeat;
- overflow: hidden;
- width: IMG_WIDTHpx;
- /* Text placement and size, etc */
- CENTER_OR_PAD;
- padding-top: PADDING_TOPpx;
- font-size: FONT_SIZEpx;
- padding-bottom: PADDING_BOTTOMpx;
- text-decoration: none;
- white-space: nowrap;
- border: none;
- margin: 0;
-}
-ROLLOVER_SPEC a:hover {
- background-position: 0 -IMG_HEIGHT_2px;
-}
-ROLLOVER_SPEC li {
- display: inline;
- padding: 0;
- margin: 0;
- HOR_OR_VER;
-}
diff --git a/emacs.d/nxhtml/etc/uts39/idnchars.txt b/emacs.d/nxhtml/etc/uts39/idnchars.txt
deleted file mode 100644
index 369f8f8..0000000
--- a/emacs.d/nxhtml/etc/uts39/idnchars.txt
+++ /dev/null
@@ -1,894 +0,0 @@
-# Recommended Identifier Profiles for IDN
-# File: idnchars.txt
-# Version: 2.0
-# Generated: 2006-08-15, 04:35:10 GMT
-# Checkin: $Revision: 1.11 $
-#
-# For documentation and usage, see http://www.unicode.org/reports/tr39/
-#
-# Allowed as output characters
-
-002D ; output # (-) HYPHEN-MINUS
-0030..0039 ; output # [10] (0..9) DIGIT ZERO..DIGIT NINE
-0041..005A ; output # [26] (A..Z) LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
-0061..007A ; output # [26] (a..z) LATIN SMALL LETTER A..LATIN SMALL LETTER Z
-00B7 ; output # (·) MIDDLE DOT
-00E0..00F6 ; output # [23] (à..ö) LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER O WITH DIAERESIS
-00F8..00FF ; output # [8] (ø..ÿ) LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER Y WITH DIAERESIS
-0101 ; output # (Ä) LATIN SMALL LETTER A WITH MACRON
-0103 ; output # (ă) LATIN SMALL LETTER A WITH BREVE
-0105 ; output # (Ä…) LATIN SMALL LETTER A WITH OGONEK
-0107 ; output # (ć) LATIN SMALL LETTER C WITH ACUTE
-0109 ; output # (ĉ) LATIN SMALL LETTER C WITH CIRCUMFLEX
-010B ; output # (Ä‹) LATIN SMALL LETTER C WITH DOT ABOVE
-010D ; output # (Ä) LATIN SMALL LETTER C WITH CARON
-010F ; output # (Ä) LATIN SMALL LETTER D WITH CARON
-0111 ; output # (Ä‘) LATIN SMALL LETTER D WITH STROKE
-0113 ; output # (Ä“) LATIN SMALL LETTER E WITH MACRON
-0115 ; output # (Ä•) LATIN SMALL LETTER E WITH BREVE
-0117 ; output # (Ä—) LATIN SMALL LETTER E WITH DOT ABOVE
-0119 ; output # (Ä™) LATIN SMALL LETTER E WITH OGONEK
-011B ; output # (Ä›) LATIN SMALL LETTER E WITH CARON
-011D ; output # (Ä) LATIN SMALL LETTER G WITH CIRCUMFLEX
-011F ; output # (ÄŸ) LATIN SMALL LETTER G WITH BREVE
-0121 ; output # (Ä¡) LATIN SMALL LETTER G WITH DOT ABOVE
-0123 ; output # (Ä£) LATIN SMALL LETTER G WITH CEDILLA
-0125 ; output # (Ä¥) LATIN SMALL LETTER H WITH CIRCUMFLEX
-0127 ; output # (ħ) LATIN SMALL LETTER H WITH STROKE
-0129 ; output # (Ä©) LATIN SMALL LETTER I WITH TILDE
-012B ; output # (Ä«) LATIN SMALL LETTER I WITH MACRON
-012D ; output # (Ä­) LATIN SMALL LETTER I WITH BREVE
-012F ; output # (į) LATIN SMALL LETTER I WITH OGONEK
-0131 ; output # (ı) LATIN SMALL LETTER DOTLESS I
-0135 ; output # (ĵ) LATIN SMALL LETTER J WITH CIRCUMFLEX
-0137..0138 ; output # [2] (ķ..ĸ) LATIN SMALL LETTER K WITH CEDILLA..LATIN SMALL LETTER KRA
-013A ; output # (ĺ) LATIN SMALL LETTER L WITH ACUTE
-013C ; output # (ļ) LATIN SMALL LETTER L WITH CEDILLA
-013E ; output # (ľ) LATIN SMALL LETTER L WITH CARON
-0142 ; output # (Å‚) LATIN SMALL LETTER L WITH STROKE
-0144 ; output # (Å„) LATIN SMALL LETTER N WITH ACUTE
-0146 ; output # (ņ) LATIN SMALL LETTER N WITH CEDILLA
-0148 ; output # (ň) LATIN SMALL LETTER N WITH CARON
-014B ; output # (Å‹) LATIN SMALL LETTER ENG
-014D ; output # (Å) LATIN SMALL LETTER O WITH MACRON
-014F ; output # (Å) LATIN SMALL LETTER O WITH BREVE
-0151 ; output # (Å‘) LATIN SMALL LETTER O WITH DOUBLE ACUTE
-0153 ; output # (Å“) LATIN SMALL LIGATURE OE
-0155 ; output # (Å•) LATIN SMALL LETTER R WITH ACUTE
-0157 ; output # (Å—) LATIN SMALL LETTER R WITH CEDILLA
-0159 ; output # (Å™) LATIN SMALL LETTER R WITH CARON
-015B ; output # (Å›) LATIN SMALL LETTER S WITH ACUTE
-015D ; output # (Å) LATIN SMALL LETTER S WITH CIRCUMFLEX
-015F ; output # (ÅŸ) LATIN SMALL LETTER S WITH CEDILLA
-0161 ; output # (Å¡) LATIN SMALL LETTER S WITH CARON
-0163 ; output # (Å£) LATIN SMALL LETTER T WITH CEDILLA
-0165 ; output # (Å¥) LATIN SMALL LETTER T WITH CARON
-0167 ; output # (ŧ) LATIN SMALL LETTER T WITH STROKE
-0169 ; output # (Å©) LATIN SMALL LETTER U WITH TILDE
-016B ; output # (Å«) LATIN SMALL LETTER U WITH MACRON
-016D ; output # (Å­) LATIN SMALL LETTER U WITH BREVE
-016F ; output # (ů) LATIN SMALL LETTER U WITH RING ABOVE
-0171 ; output # (ű) LATIN SMALL LETTER U WITH DOUBLE ACUTE
-0173 ; output # (ų) LATIN SMALL LETTER U WITH OGONEK
-0175 ; output # (ŵ) LATIN SMALL LETTER W WITH CIRCUMFLEX
-0177 ; output # (Å·) LATIN SMALL LETTER Y WITH CIRCUMFLEX
-017A ; output # (ź) LATIN SMALL LETTER Z WITH ACUTE
-017C ; output # (ż) LATIN SMALL LETTER Z WITH DOT ABOVE
-017E ; output # (ž) LATIN SMALL LETTER Z WITH CARON
-0183 ; output # (ƃ) LATIN SMALL LETTER B WITH TOPBAR
-0185 ; output # (Æ…) LATIN SMALL LETTER TONE SIX
-0188 ; output # (ƈ) LATIN SMALL LETTER C WITH HOOK
-018C ; output # (ƌ) LATIN SMALL LETTER D WITH TOPBAR
-0192 ; output # (Æ’) LATIN SMALL LETTER F WITH HOOK
-0195 ; output # (Æ•) LATIN SMALL LETTER HV
-0199..019B ; output # [3] (Æ™..Æ›) LATIN SMALL LETTER K WITH HOOK..LATIN SMALL LETTER LAMBDA WITH STROKE
-019E ; output # (Æž) LATIN SMALL LETTER N WITH LONG RIGHT LEG
-01A1 ; output # (Æ¡) LATIN SMALL LETTER O WITH HORN
-01A3 ; output # (Æ£) LATIN SMALL LETTER OI
-01A5 ; output # (Æ¥) LATIN SMALL LETTER P WITH HOOK
-01A8 ; output # (ƨ) LATIN SMALL LETTER TONE TWO
-01AD ; output # (Æ­) LATIN SMALL LETTER T WITH HOOK
-01B0 ; output # (Æ°) LATIN SMALL LETTER U WITH HORN
-01B4 ; output # (Æ´) LATIN SMALL LETTER Y WITH HOOK
-01B6 ; output # (ƶ) LATIN SMALL LETTER Z WITH STROKE
-01BD ; output # (ƽ) LATIN SMALL LETTER TONE FIVE
-01CE ; output # (ÇŽ) LATIN SMALL LETTER A WITH CARON
-01D0 ; output # (Ç) LATIN SMALL LETTER I WITH CARON
-01D2 ; output # (Ç’) LATIN SMALL LETTER O WITH CARON
-01D4 ; output # (Ç”) LATIN SMALL LETTER U WITH CARON
-01D6 ; output # (Ç–) LATIN SMALL LETTER U WITH DIAERESIS AND MACRON
-01D8 ; output # (ǘ) LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE
-01DA ; output # (Çš) LATIN SMALL LETTER U WITH DIAERESIS AND CARON
-01DC..01DD ; output # [2] (Çœ..Ç) LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE..LATIN SMALL LETTER TURNED E
-01DF ; output # (ÇŸ) LATIN SMALL LETTER A WITH DIAERESIS AND MACRON
-01E1 ; output # (Ç¡) LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON
-01E3 ; output # (Ç£) LATIN SMALL LETTER AE WITH MACRON
-01E5 ; output # (Ç¥) LATIN SMALL LETTER G WITH STROKE
-01E7 ; output # (ǧ) LATIN SMALL LETTER G WITH CARON
-01E9 ; output # (Ç©) LATIN SMALL LETTER K WITH CARON
-01EB ; output # (Ç«) LATIN SMALL LETTER O WITH OGONEK
-01ED ; output # (Ç­) LATIN SMALL LETTER O WITH OGONEK AND MACRON
-01EF..01F0 ; output # [2] (ǯ..ǰ) LATIN SMALL LETTER EZH WITH CARON..LATIN SMALL LETTER J WITH CARON
-01F5 ; output # (ǵ) LATIN SMALL LETTER G WITH ACUTE
-01F9 ; output # (ǹ) LATIN SMALL LETTER N WITH GRAVE
-01FB ; output # (Ç») LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE
-01FD ; output # (ǽ) LATIN SMALL LETTER AE WITH ACUTE
-01FF ; output # (Ç¿) LATIN SMALL LETTER O WITH STROKE AND ACUTE
-0201 ; output # (È) LATIN SMALL LETTER A WITH DOUBLE GRAVE
-0203 ; output # (ȃ) LATIN SMALL LETTER A WITH INVERTED BREVE
-0205 ; output # (È…) LATIN SMALL LETTER E WITH DOUBLE GRAVE
-0207 ; output # (ȇ) LATIN SMALL LETTER E WITH INVERTED BREVE
-0209 ; output # (ȉ) LATIN SMALL LETTER I WITH DOUBLE GRAVE
-020B ; output # (È‹) LATIN SMALL LETTER I WITH INVERTED BREVE
-020D ; output # (È) LATIN SMALL LETTER O WITH DOUBLE GRAVE
-020F ; output # (È) LATIN SMALL LETTER O WITH INVERTED BREVE
-0211 ; output # (È‘) LATIN SMALL LETTER R WITH DOUBLE GRAVE
-0213 ; output # (È“) LATIN SMALL LETTER R WITH INVERTED BREVE
-0215 ; output # (È•) LATIN SMALL LETTER U WITH DOUBLE GRAVE
-0217 ; output # (È—) LATIN SMALL LETTER U WITH INVERTED BREVE
-0219 ; output # (È™) LATIN SMALL LETTER S WITH COMMA BELOW
-021B ; output # (È›) LATIN SMALL LETTER T WITH COMMA BELOW
-021F ; output # (ÈŸ) LATIN SMALL LETTER H WITH CARON
-0223 ; output # (È£) LATIN SMALL LETTER OU
-0225 ; output # (È¥) LATIN SMALL LETTER Z WITH HOOK
-0227 ; output # (ȧ) LATIN SMALL LETTER A WITH DOT ABOVE
-0229 ; output # (È©) LATIN SMALL LETTER E WITH CEDILLA
-022B ; output # (È«) LATIN SMALL LETTER O WITH DIAERESIS AND MACRON
-022D ; output # (È­) LATIN SMALL LETTER O WITH TILDE AND MACRON
-022F ; output # (ȯ) LATIN SMALL LETTER O WITH DOT ABOVE
-0231 ; output # (ȱ) LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON
-0233 ; output # (ȳ) LATIN SMALL LETTER Y WITH MACRON
-0253..0254 ; output # [2] (É“..É”) LATIN SMALL LETTER B WITH HOOK..LATIN SMALL LETTER OPEN O
-0256..0257 ; output # [2] (É–..É—) LATIN SMALL LETTER D WITH TAIL..LATIN SMALL LETTER D WITH HOOK
-0259 ; output # (É™) LATIN SMALL LETTER SCHWA
-025B ; output # (É›) LATIN SMALL LETTER OPEN E
-0260 ; output # (É ) LATIN SMALL LETTER G WITH HOOK
-0263 ; output # (É£) LATIN SMALL LETTER GAMMA
-0268..0269 ; output # [2] (ɨ..ɩ) LATIN SMALL LETTER I WITH STROKE..LATIN SMALL LETTER IOTA
-026F ; output # (ɯ) LATIN SMALL LETTER TURNED M
-0272 ; output # (ɲ) LATIN SMALL LETTER N WITH LEFT HOOK
-0275 ; output # (ɵ) LATIN SMALL LETTER BARRED O
-0280 ; output # (Ê€) LATIN LETTER SMALL CAPITAL R
-0283 ; output # (ʃ) LATIN SMALL LETTER ESH
-0288 ; output # (ʈ) LATIN SMALL LETTER T WITH RETROFLEX HOOK
-028A..028B ; output # [2] (ÊŠ..Ê‹) LATIN SMALL LETTER UPSILON..LATIN SMALL LETTER V WITH HOOK
-0292 ; output # (Ê’) LATIN SMALL LETTER EZH
-0294 ; output # (Ê”) LATIN LETTER GLOTTAL STOP
-0300..033F ; output # [64] (Ì€..Ì¿) COMBINING GRAVE ACCENT..COMBINING DOUBLE OVERLINE
-0342 ; output # (Í‚) COMBINING GREEK PERISPOMENI
-0346..034E ; output # [9] (͆..͎) COMBINING BRIDGE ABOVE..COMBINING UPWARDS ARROW BELOW
-0360..036F ; output # [16] (͠..ͯ) COMBINING DOUBLE TILDE..COMBINING LATIN SMALL LETTER X
-0390 ; output # (Î) GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
-03AC..03C1 ; output # [22] (ά..Ï) GREEK SMALL LETTER ALPHA WITH TONOS..GREEK SMALL LETTER RHO
-03C3..03CE ; output # [12] (σ..ώ) GREEK SMALL LETTER SIGMA..GREEK SMALL LETTER OMEGA WITH TONOS
-0430..045F ; output # [48] (а..џ) CYRILLIC SMALL LETTER A..CYRILLIC SMALL LETTER DZHE
-0461 ; output # (Ñ¡) CYRILLIC SMALL LETTER OMEGA
-0463 ; output # (Ñ£) CYRILLIC SMALL LETTER YAT
-0465 ; output # (Ñ¥) CYRILLIC SMALL LETTER IOTIFIED E
-0467 ; output # (ѧ) CYRILLIC SMALL LETTER LITTLE YUS
-0469 ; output # (Ñ©) CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS
-046B ; output # (Ñ«) CYRILLIC SMALL LETTER BIG YUS
-046D ; output # (Ñ­) CYRILLIC SMALL LETTER IOTIFIED BIG YUS
-046F ; output # (ѯ) CYRILLIC SMALL LETTER KSI
-0471 ; output # (ѱ) CYRILLIC SMALL LETTER PSI
-0473 ; output # (ѳ) CYRILLIC SMALL LETTER FITA
-0475 ; output # (ѵ) CYRILLIC SMALL LETTER IZHITSA
-0477 ; output # (Ñ·) CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
-0479 ; output # (ѹ) CYRILLIC SMALL LETTER UK
-047B ; output # (Ñ») CYRILLIC SMALL LETTER ROUND OMEGA
-047D ; output # (ѽ) CYRILLIC SMALL LETTER OMEGA WITH TITLO
-047F ; output # (Ñ¿) CYRILLIC SMALL LETTER OT
-0481 ; output # (Ò) CYRILLIC SMALL LETTER KOPPA
-048B ; output # (Ò‹) CYRILLIC SMALL LETTER SHORT I WITH TAIL
-048D ; output # (Ò) CYRILLIC SMALL LETTER SEMISOFT SIGN
-048F ; output # (Ò) CYRILLIC SMALL LETTER ER WITH TICK
-0491 ; output # (Ò‘) CYRILLIC SMALL LETTER GHE WITH UPTURN
-0493 ; output # (Ò“) CYRILLIC SMALL LETTER GHE WITH STROKE
-0495 ; output # (Ò•) CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK
-0497 ; output # (Ò—) CYRILLIC SMALL LETTER ZHE WITH DESCENDER
-0499 ; output # (Ò™) CYRILLIC SMALL LETTER ZE WITH DESCENDER
-049B ; output # (Ò›) CYRILLIC SMALL LETTER KA WITH DESCENDER
-049D ; output # (Ò) CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
-049F ; output # (ÒŸ) CYRILLIC SMALL LETTER KA WITH STROKE
-04A1 ; output # (Ò¡) CYRILLIC SMALL LETTER BASHKIR KA
-04A3 ; output # (Ò£) CYRILLIC SMALL LETTER EN WITH DESCENDER
-04A5 ; output # (Ò¥) CYRILLIC SMALL LIGATURE EN GHE
-04A7 ; output # (Ò§) CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK
-04A9 ; output # (Ò©) CYRILLIC SMALL LETTER ABKHASIAN HA
-04AB ; output # (Ò«) CYRILLIC SMALL LETTER ES WITH DESCENDER
-04AD ; output # (Ò­) CYRILLIC SMALL LETTER TE WITH DESCENDER
-04AF ; output # (Ò¯) CYRILLIC SMALL LETTER STRAIGHT U
-04B1 ; output # (Ò±) CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
-04B3 ; output # (Ò³) CYRILLIC SMALL LETTER HA WITH DESCENDER
-04B5 ; output # (Òµ) CYRILLIC SMALL LIGATURE TE TSE
-04B7 ; output # (Ò·) CYRILLIC SMALL LETTER CHE WITH DESCENDER
-04B9 ; output # (Ò¹) CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
-04BB ; output # (Ò») CYRILLIC SMALL LETTER SHHA
-04BD ; output # (Ò½) CYRILLIC SMALL LETTER ABKHASIAN CHE
-04BF..04C0 ; output # [2] (Ò¿..Ó€) CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER..CYRILLIC LETTER PALOCHKA
-04C2 ; output # (Ó‚) CYRILLIC SMALL LETTER ZHE WITH BREVE
-04C4 ; output # (Ó„) CYRILLIC SMALL LETTER KA WITH HOOK
-04C6 ; output # (Ó†) CYRILLIC SMALL LETTER EL WITH TAIL
-04C8 ; output # (Óˆ) CYRILLIC SMALL LETTER EN WITH HOOK
-04CA ; output # (ÓŠ) CYRILLIC SMALL LETTER EN WITH TAIL
-04CC ; output # (ӌ) CYRILLIC SMALL LETTER KHAKASSIAN CHE
-04CE ; output # (ÓŽ) CYRILLIC SMALL LETTER EM WITH TAIL
-04D1 ; output # (Ó‘) CYRILLIC SMALL LETTER A WITH BREVE
-04D3 ; output # (Ó“) CYRILLIC SMALL LETTER A WITH DIAERESIS
-04D5 ; output # (Ó•) CYRILLIC SMALL LIGATURE A IE
-04D7 ; output # (Ó—) CYRILLIC SMALL LETTER IE WITH BREVE
-04D9 ; output # (Ó™) CYRILLIC SMALL LETTER SCHWA
-04DB ; output # (Ó›) CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS
-04DD ; output # (Ó) CYRILLIC SMALL LETTER ZHE WITH DIAERESIS
-04DF ; output # (ÓŸ) CYRILLIC SMALL LETTER ZE WITH DIAERESIS
-04E1 ; output # (Ó¡) CYRILLIC SMALL LETTER ABKHASIAN DZE
-04E3 ; output # (Ó£) CYRILLIC SMALL LETTER I WITH MACRON
-04E5 ; output # (Ó¥) CYRILLIC SMALL LETTER I WITH DIAERESIS
-04E7 ; output # (Ó§) CYRILLIC SMALL LETTER O WITH DIAERESIS
-04E9 ; output # (Ó©) CYRILLIC SMALL LETTER BARRED O
-04EB ; output # (Ó«) CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS
-04ED ; output # (Ó­) CYRILLIC SMALL LETTER E WITH DIAERESIS
-04EF ; output # (Ó¯) CYRILLIC SMALL LETTER U WITH MACRON
-04F1 ; output # (Ó±) CYRILLIC SMALL LETTER U WITH DIAERESIS
-04F3 ; output # (Ó³) CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE
-04F5 ; output # (Óµ) CYRILLIC SMALL LETTER CHE WITH DIAERESIS
-04F9 ; output # (Ó¹) CYRILLIC SMALL LETTER YERU WITH DIAERESIS
-0501 ; output # (Ô) CYRILLIC SMALL LETTER KOMI DE
-0503 ; output # (Ôƒ) CYRILLIC SMALL LETTER KOMI DJE
-0505 ; output # (Ô…) CYRILLIC SMALL LETTER KOMI ZJE
-0507 ; output # (Ô‡) CYRILLIC SMALL LETTER KOMI DZJE
-0509 ; output # (Ô‰) CYRILLIC SMALL LETTER KOMI LJE
-050B ; output # (Ô‹) CYRILLIC SMALL LETTER KOMI NJE
-050D ; output # (Ô) CYRILLIC SMALL LETTER KOMI SJE
-050F ; output # (Ô) CYRILLIC SMALL LETTER KOMI TJE
-0561..0586 ; output # [38] (Õ¡..Ö†) ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LETTER FEH
-0591..05A1 ; output # [17] (Ö‘..Ö¡) HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER
-05A3..05B9 ; output # [23] (Ö£..Ö¹) HEBREW ACCENT MUNAH..HEBREW POINT HOLAM
-05BB..05BD ; output # [3] (Ö»..Ö½) HEBREW POINT QUBUTS..HEBREW POINT METEG
-05BF ; output # (Ö¿) HEBREW POINT RAFE
-05C1..05C2 ; output # [2] (×..ׂ) HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
-05C4 ; output # (ׄ) HEBREW MARK UPPER DOT
-05D0..05EA ; output # [27] (×..ת) HEBREW LETTER ALEF..HEBREW LETTER TAV
-05F0..05F2 ; output # [3] (װ..ײ) HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW LIGATURE YIDDISH DOUBLE YOD
-0621..063A ; output # [26] (ء..غ) ARABIC LETTER HAMZA..ARABIC LETTER GHAIN
-0641..0655 ; output # [21] (Ù..Ù•) ARABIC LETTER FEH..ARABIC HAMZA BELOW
-0660..0669 ; output # [10] (Ù ..Ù©) ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
-0670..0674 ; output # [5] (Ù°..Ù´) ARABIC LETTER SUPERSCRIPT ALEF..ARABIC LETTER HIGH HAMZA
-0679..068D ; output # [21] (Ù¹..Ú) ARABIC LETTER TTEH..ARABIC LETTER DDAHAL
-068F..06D3 ; output # [69] (Ú..Û“) ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARDS..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
-06D5..06DC ; output # [8] (ە..ۜ) ARABIC LETTER AE..ARABIC SMALL HIGH SEEN
-06DF..06E8 ; output # [10] (ÛŸ..Û¨) ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH NOON
-06EA..06ED ; output # [4] (Ûª..Û­) ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM
-06F0..06FC ; output # [13] (Û°..Û¼) EXTENDED ARABIC-INDIC DIGIT ZERO..ARABIC LETTER GHAIN WITH DOT BELOW
-0710..072C ; output # [29] (Ü..ܬ) SYRIAC LETTER ALAPH..SYRIAC LETTER TAW
-0730..073F ; output # [16] (Ü°..Ü¿) SYRIAC PTHAHA ABOVE..SYRIAC RWAHA
-0780..07B1 ; output # [50] (Þ€..Þ±) THAANA LETTER HAA..THAANA LETTER NAA
-0901..0903 ; output # [3] (à¤..ः) DEVANAGARI SIGN CANDRABINDU..DEVANAGARI SIGN VISARGA
-0905..0939 ; output # [53] (अ..ह) DEVANAGARI LETTER A..DEVANAGARI LETTER HA
-093C..094D ; output # [18] (़..à¥) DEVANAGARI SIGN NUKTA..DEVANAGARI SIGN VIRAMA
-0950..0954 ; output # [5] (à¥..॔) DEVANAGARI OM..DEVANAGARI ACUTE ACCENT
-0960..0963 ; output # [4] (ॠ..ॣ) DEVANAGARI LETTER VOCALIC RR..DEVANAGARI VOWEL SIGN VOCALIC LL
-0966..096F ; output # [10] (०..९) DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE
-0981..0983 ; output # [3] (à¦..ঃ) BENGALI SIGN CANDRABINDU..BENGALI SIGN VISARGA
-0985..098C ; output # [8] (অ..ঌ) BENGALI LETTER A..BENGALI LETTER VOCALIC L
-098F..0990 ; output # [2] (à¦..à¦) BENGALI LETTER E..BENGALI LETTER AI
-0993..09A8 ; output # [22] (ও..ন) BENGALI LETTER O..BENGALI LETTER NA
-09AA..09B0 ; output # [7] (প..র) BENGALI LETTER PA..BENGALI LETTER RA
-09B2 ; output # (ল) BENGALI LETTER LA
-09B6..09B9 ; output # [4] (শ..হ) BENGALI LETTER SHA..BENGALI LETTER HA
-09BC ; output # (়) BENGALI SIGN NUKTA
-09BE..09C4 ; output # [7] (া..ৄ) BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN VOCALIC RR
-09C7..09C8 ; output # [2] (ে..ৈ) BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
-09CB..09CD ; output # [3] (ো..à§) BENGALI VOWEL SIGN O..BENGALI SIGN VIRAMA
-09D7 ; output # (ৗ) BENGALI AU LENGTH MARK
-09E0..09E3 ; output # [4] (ৠ..ৣ) BENGALI LETTER VOCALIC RR..BENGALI VOWEL SIGN VOCALIC LL
-09E6..09F1 ; output # [12] (০..ৱ) BENGALI DIGIT ZERO..BENGALI LETTER RA WITH LOWER DIAGONAL
-0A02 ; output # (ਂ) GURMUKHI SIGN BINDI
-0A05..0A0A ; output # [6] (ਅ..ਊ) GURMUKHI LETTER A..GURMUKHI LETTER UU
-0A0F..0A10 ; output # [2] (à¨..à¨) GURMUKHI LETTER EE..GURMUKHI LETTER AI
-0A13..0A28 ; output # [22] (ਓ..ਨ) GURMUKHI LETTER OO..GURMUKHI LETTER NA
-0A2A..0A30 ; output # [7] (ਪ..ਰ) GURMUKHI LETTER PA..GURMUKHI LETTER RA
-0A32 ; output # (ਲ) GURMUKHI LETTER LA
-0A35 ; output # (ਵ) GURMUKHI LETTER VA
-0A38..0A39 ; output # [2] (ਸ..ਹ) GURMUKHI LETTER SA..GURMUKHI LETTER HA
-0A3C ; output # (਼) GURMUKHI SIGN NUKTA
-0A3E..0A42 ; output # [5] (ਾ..ੂ) GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN UU
-0A47..0A48 ; output # [2] (ੇ..ੈ) GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI
-0A4B..0A4D ; output # [3] (à©‹..à©) GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA
-0A5C ; output # (ੜ) GURMUKHI LETTER RRA
-0A66..0A74 ; output # [15] (੦..ੴ) GURMUKHI DIGIT ZERO..GURMUKHI EK ONKAR
-0A81..0A83 ; output # [3] (àª..ઃ) GUJARATI SIGN CANDRABINDU..GUJARATI SIGN VISARGA
-0A85..0A8B ; output # [7] (અ..ઋ) GUJARATI LETTER A..GUJARATI LETTER VOCALIC R
-0A8D ; output # (àª) GUJARATI VOWEL CANDRA E
-0A8F..0A91 ; output # [3] (àª..ઑ) GUJARATI LETTER E..GUJARATI VOWEL CANDRA O
-0A93..0AA8 ; output # [22] (ઓ..ન) GUJARATI LETTER O..GUJARATI LETTER NA
-0AAA..0AB0 ; output # [7] (પ..ર) GUJARATI LETTER PA..GUJARATI LETTER RA
-0AB2..0AB3 ; output # [2] (લ..ળ) GUJARATI LETTER LA..GUJARATI LETTER LLA
-0AB5..0AB9 ; output # [5] (વ..હ) GUJARATI LETTER VA..GUJARATI LETTER HA
-0ABC..0AC5 ; output # [10] (઼..ૅ) GUJARATI SIGN NUKTA..GUJARATI VOWEL SIGN CANDRA E
-0AC7..0AC9 ; output # [3] (ે..ૉ) GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN CANDRA O
-0ACB..0ACD ; output # [3] (à«‹..à«) GUJARATI VOWEL SIGN O..GUJARATI SIGN VIRAMA
-0AD0 ; output # (à«) GUJARATI OM
-0AE0 ; output # (à« ) GUJARATI LETTER VOCALIC RR
-0AE6..0AEF ; output # [10] (૦..૯) GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE
-0B01..0B03 ; output # [3] (à¬..ଃ) ORIYA SIGN CANDRABINDU..ORIYA SIGN VISARGA
-0B05..0B0C ; output # [8] (ଅ..ଌ) ORIYA LETTER A..ORIYA LETTER VOCALIC L
-0B0F..0B10 ; output # [2] (à¬..à¬) ORIYA LETTER E..ORIYA LETTER AI
-0B13..0B28 ; output # [22] (ଓ..ନ) ORIYA LETTER O..ORIYA LETTER NA
-0B2A..0B30 ; output # [7] (ପ..ର) ORIYA LETTER PA..ORIYA LETTER RA
-0B32..0B33 ; output # [2] (ଲ..ଳ) ORIYA LETTER LA..ORIYA LETTER LLA
-0B36..0B39 ; output # [4] (ଶ..ହ) ORIYA LETTER SHA..ORIYA LETTER HA
-0B3C..0B43 ; output # [8] (଼..ୃ) ORIYA SIGN NUKTA..ORIYA VOWEL SIGN VOCALIC R
-0B47..0B48 ; output # [2] (à­‡..à­ˆ) ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
-0B4B..0B4D ; output # [3] (à­‹..à­) ORIYA VOWEL SIGN O..ORIYA SIGN VIRAMA
-0B56..0B57 ; output # [2] (à­–..à­—) ORIYA AI LENGTH MARK..ORIYA AU LENGTH MARK
-0B5F..0B61 ; output # [3] (à­Ÿ..à­¡) ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL
-0B66..0B6F ; output # [10] (à­¦..à­¯) ORIYA DIGIT ZERO..ORIYA DIGIT NINE
-0B82..0B83 ; output # [2] (ஂ..ஃ) TAMIL SIGN ANUSVARA..TAMIL SIGN VISARGA
-0B85..0B8A ; output # [6] (அ..ஊ) TAMIL LETTER A..TAMIL LETTER UU
-0B8E..0B90 ; output # [3] (எ..à®) TAMIL LETTER E..TAMIL LETTER AI
-0B92..0B95 ; output # [4] (ஒ..க) TAMIL LETTER O..TAMIL LETTER KA
-0B99..0B9A ; output # [2] (ங..ச) TAMIL LETTER NGA..TAMIL LETTER CA
-0B9C ; output # (ஜ) TAMIL LETTER JA
-0B9E..0B9F ; output # [2] (ஞ..ட) TAMIL LETTER NYA..TAMIL LETTER TTA
-0BA3..0BA4 ; output # [2] (ண..த) TAMIL LETTER NNA..TAMIL LETTER TA
-0BA8..0BAA ; output # [3] (ந..ப) TAMIL LETTER NA..TAMIL LETTER PA
-0BAE..0BB5 ; output # [8] (ம..வ) TAMIL LETTER MA..TAMIL LETTER VA
-0BB7..0BB9 ; output # [3] (ஷ..ஹ) TAMIL LETTER SSA..TAMIL LETTER HA
-0BBE..0BC2 ; output # [5] (ா..ூ) TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN UU
-0BC6..0BC8 ; output # [3] (ெ..ை) TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
-0BCA..0BCD ; output # [4] (ொ..à¯) TAMIL VOWEL SIGN O..TAMIL SIGN VIRAMA
-0BD7 ; output # (ௗ) TAMIL AU LENGTH MARK
-0BE7..0BEF ; output # [9] (௧..௯) TAMIL DIGIT ONE..TAMIL DIGIT NINE
-0C01..0C03 ; output # [3] (à°..à°ƒ) TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
-0C05..0C0C ; output # [8] (అ..ఌ) TELUGU LETTER A..TELUGU LETTER VOCALIC L
-0C0E..0C10 ; output # [3] (à°Ž..à°) TELUGU LETTER E..TELUGU LETTER AI
-0C12..0C28 ; output # [23] (à°’..à°¨) TELUGU LETTER O..TELUGU LETTER NA
-0C2A..0C33 ; output # [10] (à°ª..à°³) TELUGU LETTER PA..TELUGU LETTER LLA
-0C35..0C39 ; output # [5] (à°µ..à°¹) TELUGU LETTER VA..TELUGU LETTER HA
-0C3E..0C44 ; output # [7] (ా..ౄ) TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN VOCALIC RR
-0C46..0C48 ; output # [3] (ె..ై) TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
-0C4A..0C4D ; output # [4] (ొ..à±) TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
-0C55..0C56 ; output # [2] (ౕ..ౖ) TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
-0C60..0C61 ; output # [2] (ౠ..ౡ) TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL
-0C66..0C6F ; output # [10] (౦..౯) TELUGU DIGIT ZERO..TELUGU DIGIT NINE
-0C82..0C83 ; output # [2] (ಂ..ಃ) KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
-0C85..0C8C ; output # [8] (ಅ..ಌ) KANNADA LETTER A..KANNADA LETTER VOCALIC L
-0C8E..0C90 ; output # [3] (ಎ..à²) KANNADA LETTER E..KANNADA LETTER AI
-0C92..0CA8 ; output # [23] (ಒ..ನ) KANNADA LETTER O..KANNADA LETTER NA
-0CAA..0CB3 ; output # [10] (ಪ..ಳ) KANNADA LETTER PA..KANNADA LETTER LLA
-0CB5..0CB9 ; output # [5] (ವ..ಹ) KANNADA LETTER VA..KANNADA LETTER HA
-0CBE..0CC4 ; output # [7] (ಾ..ೄ) KANNADA VOWEL SIGN AA..KANNADA VOWEL SIGN VOCALIC RR
-0CC6..0CC8 ; output # [3] (ೆ..ೈ) KANNADA VOWEL SIGN E..KANNADA VOWEL SIGN AI
-0CCA..0CCD ; output # [4] (ೊ..à³) KANNADA VOWEL SIGN O..KANNADA SIGN VIRAMA
-0CD5..0CD6 ; output # [2] (ೕ..ೖ) KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
-0CE0..0CE1 ; output # [2] (ೠ..ೡ) KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL
-0CE6..0CEF ; output # [10] (೦..೯) KANNADA DIGIT ZERO..KANNADA DIGIT NINE
-0D02..0D03 ; output # [2] (à´‚..à´ƒ) MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
-0D05..0D0C ; output # [8] (അ..ഌ) MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L
-0D0E..0D10 ; output # [3] (à´Ž..à´) MALAYALAM LETTER E..MALAYALAM LETTER AI
-0D12..0D28 ; output # [23] (à´’..à´¨) MALAYALAM LETTER O..MALAYALAM LETTER NA
-0D2A..0D39 ; output # [16] (à´ª..à´¹) MALAYALAM LETTER PA..MALAYALAM LETTER HA
-0D3E..0D43 ; output # [6] (ാ..ൃ) MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN VOCALIC R
-0D46..0D48 ; output # [3] (െ..ൈ) MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
-0D4A..0D4D ; output # [4] (ൊ..àµ) MALAYALAM VOWEL SIGN O..MALAYALAM SIGN VIRAMA
-0D57 ; output # (ൗ) MALAYALAM AU LENGTH MARK
-0D60..0D61 ; output # [2] (ൠ..ൡ) MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL
-0D66..0D6F ; output # [10] (൦..൯) MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE
-0D82..0D83 ; output # [2] (ං..ඃ) SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA
-0D85..0D96 ; output # [18] (අ..ඖ) SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA
-0D9A..0DB1 ; output # [24] (ක..න) SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA
-0DB3..0DBB ; output # [9] (ඳ..ර) SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA
-0DBD ; output # (ල) SINHALA LETTER DANTAJA LAYANNA
-0DC0..0DC6 ; output # [7] (à·€..à·†) SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA
-0DCA ; output # (à·Š) SINHALA SIGN AL-LAKUNA
-0DCF..0DD4 ; output # [6] (à·..à·”) SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA
-0DD6 ; output # (à·–) SINHALA VOWEL SIGN DIGA PAA-PILLA
-0DD8..0DDF ; output # [8] (à·˜..à·Ÿ) SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA
-0DF2..0DF3 ; output # [2] (à·²..à·³) SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA
-0E01..0E32 ; output # [50] (à¸..า) THAI CHARACTER KO KAI..THAI CHARACTER SARA AA
-0E34..0E3A ; output # [7] (ิ..ฺ) THAI CHARACTER SARA I..THAI CHARACTER PHINTHU
-0E40..0E4E ; output # [15] (เ..๎) THAI CHARACTER SARA E..THAI CHARACTER YAMAKKAN
-0E50..0E59 ; output # [10] (à¹..๙) THAI DIGIT ZERO..THAI DIGIT NINE
-0E81..0E82 ; output # [2] (àº..ຂ) LAO LETTER KO..LAO LETTER KHO SUNG
-0E84 ; output # (ຄ) LAO LETTER KHO TAM
-0E87..0E88 ; output # [2] (ງ..ຈ) LAO LETTER NGO..LAO LETTER CO
-0E8A ; output # (ຊ) LAO LETTER SO TAM
-0E8D ; output # (àº) LAO LETTER NYO
-0E94..0E97 ; output # [4] (ດ..ທ) LAO LETTER DO..LAO LETTER THO TAM
-0E99..0E9F ; output # [7] (ນ..ຟ) LAO LETTER NO..LAO LETTER FO SUNG
-0EA1..0EA3 ; output # [3] (ມ..ຣ) LAO LETTER MO..LAO LETTER LO LING
-0EA5 ; output # (ລ) LAO LETTER LO LOOT
-0EA7 ; output # (ວ) LAO LETTER WO
-0EAA..0EAB ; output # [2] (ສ..ຫ) LAO LETTER SO SUNG..LAO LETTER HO SUNG
-0EAD..0EB2 ; output # [6] (ອ..າ) LAO LETTER O..LAO VOWEL SIGN AA
-0EB4..0EB9 ; output # [6] (ິ..ູ) LAO VOWEL SIGN I..LAO VOWEL SIGN UU
-0EBB..0EBD ; output # [3] (ົ..ຽ) LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN NYO
-0EC0..0EC4 ; output # [5] (ເ..ໄ) LAO VOWEL SIGN E..LAO VOWEL SIGN AI
-0EC6 ; output # (ໆ) LAO KO LA
-0EC8..0ECD ; output # [6] (່..à») LAO TONE MAI EK..LAO NIGGAHITA
-0ED0..0ED9 ; output # [10] (à»..à»™) LAO DIGIT ZERO..LAO DIGIT NINE
-0F00 ; output # (ༀ) TIBETAN SYLLABLE OM
-0F18..0F19 ; output # [2] (༘..༙) TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
-0F20..0F29 ; output # [10] (༠..༩) TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE
-0F35 ; output # (༵) TIBETAN MARK NGAS BZUNG NYI ZLA
-0F37 ; output # (༷) TIBETAN MARK NGAS BZUNG SGOR RTAGS
-0F39 ; output # (༹) TIBETAN MARK TSA -PHRU
-0F3E..0F42 ; output # [5] (༾..ག) TIBETAN SIGN YAR TSHES..TIBETAN LETTER GA
-0F44..0F47 ; output # [4] (ང..ཇ) TIBETAN LETTER NGA..TIBETAN LETTER JA
-0F49..0F4C ; output # [4] (ཉ..ཌ) TIBETAN LETTER NYA..TIBETAN LETTER DDA
-0F4E..0F51 ; output # [4] (ཎ..ད) TIBETAN LETTER NNA..TIBETAN LETTER DA
-0F53..0F56 ; output # [4] (ན..བ) TIBETAN LETTER NA..TIBETAN LETTER BA
-0F58..0F5B ; output # [4] (མ..ཛ) TIBETAN LETTER MA..TIBETAN LETTER DZA
-0F5D..0F68 ; output # [12] (à½..ཨ) TIBETAN LETTER WA..TIBETAN LETTER A
-0F6A ; output # (ཪ) TIBETAN LETTER FIXED-FORM RA
-0F71..0F72 ; output # [2] (ཱ..ི) TIBETAN VOWEL SIGN AA..TIBETAN VOWEL SIGN I
-0F74 ; output # (ུ) TIBETAN VOWEL SIGN U
-0F7A..0F80 ; output # [7] (ེ..ྀ) TIBETAN VOWEL SIGN E..TIBETAN VOWEL SIGN REVERSED I
-0F82..0F84 ; output # [3] (ྂ..྄) TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA
-0F86..0F8B ; output # [6] (྆..ྋ) TIBETAN SIGN LCI RTAGS..TIBETAN SIGN GRU MED RGYINGS
-0F90..0F92 ; output # [3] (à¾..ྒ) TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER GA
-0F94..0F97 ; output # [4] (ྔ..ྗ) TIBETAN SUBJOINED LETTER NGA..TIBETAN SUBJOINED LETTER JA
-0F99..0F9C ; output # [4] (ྙ..ྜ) TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER DDA
-0F9E..0FA1 ; output # [4] (ྞ..ྡ) TIBETAN SUBJOINED LETTER NNA..TIBETAN SUBJOINED LETTER DA
-0FA3..0FA6 ; output # [4] (ྣ..ྦ) TIBETAN SUBJOINED LETTER NA..TIBETAN SUBJOINED LETTER BA
-0FA8..0FAB ; output # [4] (ྨ..ྫ) TIBETAN SUBJOINED LETTER MA..TIBETAN SUBJOINED LETTER DZA
-0FAD..0FB8 ; output # [12] (ྭ..ྸ) TIBETAN SUBJOINED LETTER WA..TIBETAN SUBJOINED LETTER A
-0FBA..0FBC ; output # [3] (ྺ..ྼ) TIBETAN SUBJOINED LETTER FIXED-FORM WA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
-0FC6 ; output # (࿆) TIBETAN SYMBOL PADMA GDAN
-1000..1021 ; output # [34] (က..အ) MYANMAR LETTER KA..MYANMAR LETTER A
-1023..1027 ; output # [5] (ဣ..ဧ) MYANMAR LETTER I..MYANMAR LETTER E
-1029..102A ; output # [2] (ဩ..ဪ) MYANMAR LETTER O..MYANMAR LETTER AU
-102C..1032 ; output # [7] (ာ..ဲ) MYANMAR VOWEL SIGN AA..MYANMAR VOWEL SIGN AI
-1036..1039 ; output # [4] (ံ..္) MYANMAR SIGN ANUSVARA..MYANMAR SIGN VIRAMA
-1040..1049 ; output # [10] (á€..á‰) MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE
-1050..1059 ; output # [10] (á..á™) MYANMAR LETTER SHA..MYANMAR VOWEL SIGN VOCALIC LL
-10A0..10C5 ; output # [38] (Ⴀ..Ⴥ) GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE
-10D0..10F0 ; output # [33] (áƒ..ჰ) GEORGIAN LETTER AN..GEORGIAN LETTER HAE
-10F7..10F8 ; output # [2] (ჷ..ჸ) GEORGIAN LETTER YN..GEORGIAN LETTER ELIFI
-1200..1206 ; output # [7] (ሀ..ሆ) ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE HO
-1208..1246 ; output # [63] (ለ..ቆ) ETHIOPIC SYLLABLE LA..ETHIOPIC SYLLABLE QO
-1248 ; output # (ቈ) ETHIOPIC SYLLABLE QWA
-124A..124D ; output # [4] (ቊ..á‰) ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE
-1250..1256 ; output # [7] (á‰..ቖ) ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO
-1258 ; output # (ቘ) ETHIOPIC SYLLABLE QHWA
-125A..125D ; output # [4] (ቚ..á‰) ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE
-1260..1286 ; output # [39] (በ..ኆ) ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XO
-1288 ; output # (ኈ) ETHIOPIC SYLLABLE XWA
-128A..128D ; output # [4] (ኊ..áŠ) ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE
-1290..12AE ; output # [31] (áŠ..ኮ) ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KO
-12B0 ; output # (ኰ) ETHIOPIC SYLLABLE KWA
-12B2..12B5 ; output # [4] (ኲ..ኵ) ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE
-12B8..12BE ; output # [7] (ኸ..ኾ) ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO
-12C0 ; output # (á‹€) ETHIOPIC SYLLABLE KXWA
-12C2..12C5 ; output # [4] (á‹‚..á‹…) ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE
-12C8..12CE ; output # [7] (ወ..ዎ) ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE WO
-12D0..12D6 ; output # [7] (á‹..á‹–) ETHIOPIC SYLLABLE PHARYNGEAL A..ETHIOPIC SYLLABLE PHARYNGEAL O
-12D8..12EE ; output # [23] (ዘ..ዮ) ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE YO
-12F0..130E ; output # [31] (ደ..ጎ) ETHIOPIC SYLLABLE DA..ETHIOPIC SYLLABLE GO
-1310 ; output # (áŒ) ETHIOPIC SYLLABLE GWA
-1312..1315 ; output # [4] (ጒ..ጕ) ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE
-1318..131E ; output # [7] (ጘ..ጞ) ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE GGO
-1320..1346 ; output # [39] (ጠ..á†) ETHIOPIC SYLLABLE THA..ETHIOPIC SYLLABLE TZO
-1348..135A ; output # [19] (áˆ..áš) ETHIOPIC SYLLABLE FA..ETHIOPIC SYLLABLE FYA
-1369..1371 ; output # [9] (á©..á±) ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE
-13A0..13F4 ; output # [85] (Ꭰ..á´) CHEROKEE LETTER A..CHEROKEE LETTER YV
-1401..166C ; output # [620] (á..ᙬ) CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA
-166F..1676 ; output # [8] (ᙯ..ᙶ) CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS NNGAA
-1780..17A2 ; output # [35] (ក..អ) KHMER LETTER KA..KHMER LETTER QA
-17A5..17A7 ; output # [3] (ឥ..ឧ) KHMER INDEPENDENT VOWEL QI..KHMER INDEPENDENT VOWEL QU
-17A9..17B3 ; output # [11] (áž©..áž³) KHMER INDEPENDENT VOWEL QUU..KHMER INDEPENDENT VOWEL QAU
-17B6..17D0 ; output # [27] (ា..áŸ) KHMER VOWEL SIGN AA..KHMER SIGN SAMYOK SANNYA
-17D2 ; output # (្) KHMER SIGN COENG
-17D7 ; output # (ៗ) KHMER SIGN LEK TOO
-17DC ; output # (ៜ) KHMER SIGN AVAKRAHASANYA
-17E0..17E9 ; output # [10] (០..៩) KHMER DIGIT ZERO..KHMER DIGIT NINE
-1810..1819 ; output # [10] (á ..á ™) MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE
-1820..1877 ; output # [88] (á  ..á¡·) MONGOLIAN LETTER A..MONGOLIAN LETTER MANCHU ZHA
-1880..18A9 ; output # [42] (ᢀ..ᢩ) MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI DAGALGA
-1E01 ; output # (á¸) LATIN SMALL LETTER A WITH RING BELOW
-1E03 ; output # (ḃ) LATIN SMALL LETTER B WITH DOT ABOVE
-1E05 ; output # (ḅ) LATIN SMALL LETTER B WITH DOT BELOW
-1E07 ; output # (ḇ) LATIN SMALL LETTER B WITH LINE BELOW
-1E09 ; output # (ḉ) LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
-1E0B ; output # (ḋ) LATIN SMALL LETTER D WITH DOT ABOVE
-1E0D ; output # (á¸) LATIN SMALL LETTER D WITH DOT BELOW
-1E0F ; output # (á¸) LATIN SMALL LETTER D WITH LINE BELOW
-1E11 ; output # (ḑ) LATIN SMALL LETTER D WITH CEDILLA
-1E13 ; output # (ḓ) LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW
-1E15 ; output # (ḕ) LATIN SMALL LETTER E WITH MACRON AND GRAVE
-1E17 ; output # (ḗ) LATIN SMALL LETTER E WITH MACRON AND ACUTE
-1E19 ; output # (ḙ) LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW
-1E1B ; output # (ḛ) LATIN SMALL LETTER E WITH TILDE BELOW
-1E1D ; output # (á¸) LATIN SMALL LETTER E WITH CEDILLA AND BREVE
-1E1F ; output # (ḟ) LATIN SMALL LETTER F WITH DOT ABOVE
-1E21 ; output # (ḡ) LATIN SMALL LETTER G WITH MACRON
-1E23 ; output # (ḣ) LATIN SMALL LETTER H WITH DOT ABOVE
-1E25 ; output # (ḥ) LATIN SMALL LETTER H WITH DOT BELOW
-1E27 ; output # (ḧ) LATIN SMALL LETTER H WITH DIAERESIS
-1E29 ; output # (ḩ) LATIN SMALL LETTER H WITH CEDILLA
-1E2B ; output # (ḫ) LATIN SMALL LETTER H WITH BREVE BELOW
-1E2D ; output # (ḭ) LATIN SMALL LETTER I WITH TILDE BELOW
-1E2F ; output # (ḯ) LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE
-1E31 ; output # (ḱ) LATIN SMALL LETTER K WITH ACUTE
-1E33 ; output # (ḳ) LATIN SMALL LETTER K WITH DOT BELOW
-1E35 ; output # (ḵ) LATIN SMALL LETTER K WITH LINE BELOW
-1E37 ; output # (ḷ) LATIN SMALL LETTER L WITH DOT BELOW
-1E39 ; output # (ḹ) LATIN SMALL LETTER L WITH DOT BELOW AND MACRON
-1E3B ; output # (ḻ) LATIN SMALL LETTER L WITH LINE BELOW
-1E3D ; output # (ḽ) LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW
-1E3F ; output # (ḿ) LATIN SMALL LETTER M WITH ACUTE
-1E41 ; output # (á¹) LATIN SMALL LETTER M WITH DOT ABOVE
-1E43 ; output # (ṃ) LATIN SMALL LETTER M WITH DOT BELOW
-1E45 ; output # (á¹…) LATIN SMALL LETTER N WITH DOT ABOVE
-1E47 ; output # (ṇ) LATIN SMALL LETTER N WITH DOT BELOW
-1E49 ; output # (ṉ) LATIN SMALL LETTER N WITH LINE BELOW
-1E4B ; output # (ṋ) LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW
-1E4D ; output # (á¹) LATIN SMALL LETTER O WITH TILDE AND ACUTE
-1E4F ; output # (á¹) LATIN SMALL LETTER O WITH TILDE AND DIAERESIS
-1E51 ; output # (ṑ) LATIN SMALL LETTER O WITH MACRON AND GRAVE
-1E53 ; output # (ṓ) LATIN SMALL LETTER O WITH MACRON AND ACUTE
-1E55 ; output # (ṕ) LATIN SMALL LETTER P WITH ACUTE
-1E57 ; output # (á¹—) LATIN SMALL LETTER P WITH DOT ABOVE
-1E59 ; output # (á¹™) LATIN SMALL LETTER R WITH DOT ABOVE
-1E5B ; output # (á¹›) LATIN SMALL LETTER R WITH DOT BELOW
-1E5D ; output # (á¹) LATIN SMALL LETTER R WITH DOT BELOW AND MACRON
-1E5F ; output # (ṟ) LATIN SMALL LETTER R WITH LINE BELOW
-1E61 ; output # (ṡ) LATIN SMALL LETTER S WITH DOT ABOVE
-1E63 ; output # (á¹£) LATIN SMALL LETTER S WITH DOT BELOW
-1E65 ; output # (á¹¥) LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE
-1E67 ; output # (ṧ) LATIN SMALL LETTER S WITH CARON AND DOT ABOVE
-1E69 ; output # (ṩ) LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE
-1E6B ; output # (ṫ) LATIN SMALL LETTER T WITH DOT ABOVE
-1E6D ; output # (á¹­) LATIN SMALL LETTER T WITH DOT BELOW
-1E6F ; output # (ṯ) LATIN SMALL LETTER T WITH LINE BELOW
-1E71 ; output # (á¹±) LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW
-1E73 ; output # (á¹³) LATIN SMALL LETTER U WITH DIAERESIS BELOW
-1E75 ; output # (á¹µ) LATIN SMALL LETTER U WITH TILDE BELOW
-1E77 ; output # (á¹·) LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW
-1E79 ; output # (á¹¹) LATIN SMALL LETTER U WITH TILDE AND ACUTE
-1E7B ; output # (á¹») LATIN SMALL LETTER U WITH MACRON AND DIAERESIS
-1E7D ; output # (á¹½) LATIN SMALL LETTER V WITH TILDE
-1E7F ; output # (ṿ) LATIN SMALL LETTER V WITH DOT BELOW
-1E81 ; output # (áº) LATIN SMALL LETTER W WITH GRAVE
-1E83 ; output # (ẃ) LATIN SMALL LETTER W WITH ACUTE
-1E85 ; output # (ẅ) LATIN SMALL LETTER W WITH DIAERESIS
-1E87 ; output # (ẇ) LATIN SMALL LETTER W WITH DOT ABOVE
-1E89 ; output # (ẉ) LATIN SMALL LETTER W WITH DOT BELOW
-1E8B ; output # (ẋ) LATIN SMALL LETTER X WITH DOT ABOVE
-1E8D ; output # (áº) LATIN SMALL LETTER X WITH DIAERESIS
-1E8F ; output # (áº) LATIN SMALL LETTER Y WITH DOT ABOVE
-1E91 ; output # (ẑ) LATIN SMALL LETTER Z WITH CIRCUMFLEX
-1E93 ; output # (ẓ) LATIN SMALL LETTER Z WITH DOT BELOW
-1E95..1E99 ; output # [5] (ẕ..ẙ) LATIN SMALL LETTER Z WITH LINE BELOW..LATIN SMALL LETTER Y WITH RING ABOVE
-1EA1 ; output # (ạ) LATIN SMALL LETTER A WITH DOT BELOW
-1EA3 ; output # (ả) LATIN SMALL LETTER A WITH HOOK ABOVE
-1EA5 ; output # (ấ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE
-1EA7 ; output # (ầ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE
-1EA9 ; output # (ẩ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
-1EAB ; output # (ẫ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE
-1EAD ; output # (ậ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW
-1EAF ; output # (ắ) LATIN SMALL LETTER A WITH BREVE AND ACUTE
-1EB1 ; output # (ằ) LATIN SMALL LETTER A WITH BREVE AND GRAVE
-1EB3 ; output # (ẳ) LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE
-1EB5 ; output # (ẵ) LATIN SMALL LETTER A WITH BREVE AND TILDE
-1EB7 ; output # (ặ) LATIN SMALL LETTER A WITH BREVE AND DOT BELOW
-1EB9 ; output # (ẹ) LATIN SMALL LETTER E WITH DOT BELOW
-1EBB ; output # (ẻ) LATIN SMALL LETTER E WITH HOOK ABOVE
-1EBD ; output # (ẽ) LATIN SMALL LETTER E WITH TILDE
-1EBF ; output # (ế) LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE
-1EC1 ; output # (á») LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE
-1EC3 ; output # (ể) LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
-1EC5 ; output # (á»…) LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE
-1EC7 ; output # (ệ) LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW
-1EC9 ; output # (ỉ) LATIN SMALL LETTER I WITH HOOK ABOVE
-1ECB ; output # (ị) LATIN SMALL LETTER I WITH DOT BELOW
-1ECD ; output # (á») LATIN SMALL LETTER O WITH DOT BELOW
-1ECF ; output # (á») LATIN SMALL LETTER O WITH HOOK ABOVE
-1ED1 ; output # (ố) LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE
-1ED3 ; output # (ồ) LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE
-1ED5 ; output # (ổ) LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
-1ED7 ; output # (á»—) LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE
-1ED9 ; output # (á»™) LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW
-1EDB ; output # (á»›) LATIN SMALL LETTER O WITH HORN AND ACUTE
-1EDD ; output # (á») LATIN SMALL LETTER O WITH HORN AND GRAVE
-1EDF ; output # (ở) LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE
-1EE1 ; output # (ỡ) LATIN SMALL LETTER O WITH HORN AND TILDE
-1EE3 ; output # (ợ) LATIN SMALL LETTER O WITH HORN AND DOT BELOW
-1EE5 ; output # (ụ) LATIN SMALL LETTER U WITH DOT BELOW
-1EE7 ; output # (ủ) LATIN SMALL LETTER U WITH HOOK ABOVE
-1EE9 ; output # (ứ) LATIN SMALL LETTER U WITH HORN AND ACUTE
-1EEB ; output # (ừ) LATIN SMALL LETTER U WITH HORN AND GRAVE
-1EED ; output # (á»­) LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE
-1EEF ; output # (ữ) LATIN SMALL LETTER U WITH HORN AND TILDE
-1EF1 ; output # (á»±) LATIN SMALL LETTER U WITH HORN AND DOT BELOW
-1EF3 ; output # (ỳ) LATIN SMALL LETTER Y WITH GRAVE
-1EF5 ; output # (ỵ) LATIN SMALL LETTER Y WITH DOT BELOW
-1EF7 ; output # (á»·) LATIN SMALL LETTER Y WITH HOOK ABOVE
-1EF9 ; output # (ỹ) LATIN SMALL LETTER Y WITH TILDE
-1F00..1F07 ; output # [8] (ἀ..ἇ) GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI
-1F10..1F15 ; output # [6] (á¼..ἕ) GREEK SMALL LETTER EPSILON WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
-1F20..1F27 ; output # [8] (ἠ..ἧ) GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI
-1F30..1F37 ; output # [8] (á¼°..á¼·) GREEK SMALL LETTER IOTA WITH PSILI..GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI
-1F40..1F45 ; output # [6] (á½€..á½…) GREEK SMALL LETTER OMICRON WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
-1F50..1F57 ; output # [8] (á½..á½—) GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
-1F60..1F67 ; output # [8] (ὠ..ὧ) GREEK SMALL LETTER OMEGA WITH PSILI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI
-1F70 ; output # (á½°) GREEK SMALL LETTER ALPHA WITH VARIA
-1F72 ; output # (á½²) GREEK SMALL LETTER EPSILON WITH VARIA
-1F74 ; output # (á½´) GREEK SMALL LETTER ETA WITH VARIA
-1F76 ; output # (ὶ) GREEK SMALL LETTER IOTA WITH VARIA
-1F78 ; output # (ὸ) GREEK SMALL LETTER OMICRON WITH VARIA
-1F7A ; output # (ὺ) GREEK SMALL LETTER UPSILON WITH VARIA
-1F7C ; output # (á½¼) GREEK SMALL LETTER OMEGA WITH VARIA
-1FB0..1FB1 ; output # [2] (á¾°..á¾±) GREEK SMALL LETTER ALPHA WITH VRACHY..GREEK SMALL LETTER ALPHA WITH MACRON
-1FB6 ; output # (ᾶ) GREEK SMALL LETTER ALPHA WITH PERISPOMENI
-1FC6 ; output # (ῆ) GREEK SMALL LETTER ETA WITH PERISPOMENI
-1FD0..1FD2 ; output # [3] (á¿..á¿’) GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA
-1FD6..1FD7 ; output # [2] (á¿–..á¿—) GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI
-1FE0..1FE2 ; output # [3] (á¿ ..á¿¢) GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA
-1FE4..1FE7 ; output # [4] (ῤ..ῧ) GREEK SMALL LETTER RHO WITH PSILI..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
-1FF6 ; output # (ῶ) GREEK SMALL LETTER OMEGA WITH PERISPOMENI
-2132 ; output # (Ⅎ) TURNED CAPITAL F
-3005..3007 ; output # [3] (々..〇) IDEOGRAPHIC ITERATION MARK..IDEOGRAPHIC NUMBER ZERO
-3041..3096 ; output # [86] (ã..ã‚–) HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE
-3099..309A ; output # [2] (ã‚™..ã‚š) COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
-309D..309E ; output # [2] (ã‚..ã‚ž) HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK
-30A1..30FE ; output # [94] (ァ..ヾ) KATAKANA LETTER SMALL A..KATAKANA VOICED ITERATION MARK
-3105..312C ; output # [40] (ㄅ..ㄬ) BOPOMOFO LETTER B..BOPOMOFO LETTER GN
-31A0..31B7 ; output # [24] (ㆠ..ㆷ) BOPOMOFO LETTER BU..BOPOMOFO FINAL LETTER H
-31F0..31FF ; output # [16] (ㇰ..ㇿ) KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO
-3447 ; output # (㑇) CJK UNIFIED IDEOGRAPH-3447
-3473 ; output # (㑳) CJK UNIFIED IDEOGRAPH-3473
-34E4 ; output # (㓤) CJK UNIFIED IDEOGRAPH-34E4
-3577 ; output # (ã•·) CJK UNIFIED IDEOGRAPH-3577
-359E ; output # (ã–ž) CJK UNIFIED IDEOGRAPH-359E
-35A1 ; output # (ã–¡) CJK UNIFIED IDEOGRAPH-35A1
-35AD ; output # (ã–­) CJK UNIFIED IDEOGRAPH-35AD
-35BF ; output # (ã–¿) CJK UNIFIED IDEOGRAPH-35BF
-35CE ; output # (ã—Ž) CJK UNIFIED IDEOGRAPH-35CE
-35F3 ; output # (ã—³) CJK UNIFIED IDEOGRAPH-35F3
-35FE ; output # (ã—¾) CJK UNIFIED IDEOGRAPH-35FE
-360E ; output # (㘎) CJK UNIFIED IDEOGRAPH-360E
-361A ; output # (㘚) CJK UNIFIED IDEOGRAPH-361A
-3918 ; output # (㤘) CJK UNIFIED IDEOGRAPH-3918
-3960 ; output # (㥠) CJK UNIFIED IDEOGRAPH-3960
-396E ; output # (㥮) CJK UNIFIED IDEOGRAPH-396E
-39CF..39D0 ; output # [2] (ã§..ã§) CJK UNIFIED IDEOGRAPH-39CF..CJK UNIFIED IDEOGRAPH-39D0
-39DF ; output # (㧟) CJK UNIFIED IDEOGRAPH-39DF
-39F8 ; output # (㧸) CJK UNIFIED IDEOGRAPH-39F8
-39FE ; output # (㧾) CJK UNIFIED IDEOGRAPH-39FE
-3A18 ; output # (㨘) CJK UNIFIED IDEOGRAPH-3A18
-3A52 ; output # (ã©’) CJK UNIFIED IDEOGRAPH-3A52
-3A67 ; output # (㩧) CJK UNIFIED IDEOGRAPH-3A67
-3A73 ; output # (㩳) CJK UNIFIED IDEOGRAPH-3A73
-3B39 ; output # (㬹) CJK UNIFIED IDEOGRAPH-3B39
-3B4E ; output # (ã­Ž) CJK UNIFIED IDEOGRAPH-3B4E
-3C6E ; output # (ã±®) CJK UNIFIED IDEOGRAPH-3C6E
-3CE0 ; output # (ã³ ) CJK UNIFIED IDEOGRAPH-3CE0
-3DE7 ; output # (ã·§) CJK UNIFIED IDEOGRAPH-3DE7
-3DEB ; output # (ã·«) CJK UNIFIED IDEOGRAPH-3DEB
-3E74 ; output # (ã¹´) CJK UNIFIED IDEOGRAPH-3E74
-3ED0 ; output # (ã») CJK UNIFIED IDEOGRAPH-3ED0
-4056 ; output # (ä–) CJK UNIFIED IDEOGRAPH-4056
-4065 ; output # (ä¥) CJK UNIFIED IDEOGRAPH-4065
-406A ; output # (äª) CJK UNIFIED IDEOGRAPH-406A
-40BB ; output # (ä‚») CJK UNIFIED IDEOGRAPH-40BB
-40DF ; output # (䃟) CJK UNIFIED IDEOGRAPH-40DF
-4137 ; output # (ä„·) CJK UNIFIED IDEOGRAPH-4137
-415F ; output # (ä…Ÿ) CJK UNIFIED IDEOGRAPH-415F
-4337 ; output # (䌷) CJK UNIFIED IDEOGRAPH-4337
-43AC ; output # (䎬) CJK UNIFIED IDEOGRAPH-43AC
-43B1 ; output # (䎱) CJK UNIFIED IDEOGRAPH-43B1
-43DD ; output # (ä) CJK UNIFIED IDEOGRAPH-43DD
-44D6 ; output # (ä“–) CJK UNIFIED IDEOGRAPH-44D6
-44EA ; output # (䓪) CJK UNIFIED IDEOGRAPH-44EA
-4606 ; output # (䘆) CJK UNIFIED IDEOGRAPH-4606
-464C ; output # (䙌) CJK UNIFIED IDEOGRAPH-464C
-4661 ; output # (䙡) CJK UNIFIED IDEOGRAPH-4661
-4723 ; output # (䜣) CJK UNIFIED IDEOGRAPH-4723
-4729 ; output # (䜩) CJK UNIFIED IDEOGRAPH-4729
-477C ; output # (ä¼) CJK UNIFIED IDEOGRAPH-477C
-478D ; output # (äž) CJK UNIFIED IDEOGRAPH-478D
-47F4 ; output # (䟴) CJK UNIFIED IDEOGRAPH-47F4
-48B5 ; output # (䢵) CJK UNIFIED IDEOGRAPH-48B5
-48BC ; output # (䢼) CJK UNIFIED IDEOGRAPH-48BC
-48C5 ; output # (䣅) CJK UNIFIED IDEOGRAPH-48C5
-48D3 ; output # (䣓) CJK UNIFIED IDEOGRAPH-48D3
-4947 ; output # (䥇) CJK UNIFIED IDEOGRAPH-4947
-497A ; output # (䥺) CJK UNIFIED IDEOGRAPH-497A
-497D ; output # (䥽) CJK UNIFIED IDEOGRAPH-497D
-4982..4983 ; output # [2] (䦂..䦃) CJK UNIFIED IDEOGRAPH-4982..CJK UNIFIED IDEOGRAPH-4983
-4985..4986 ; output # [2] (䦅..䦆) CJK UNIFIED IDEOGRAPH-4985..CJK UNIFIED IDEOGRAPH-4986
-499B ; output # (䦛) CJK UNIFIED IDEOGRAPH-499B
-499F ; output # (䦟) CJK UNIFIED IDEOGRAPH-499F
-49B6..49B7 ; output # [2] (䦶..䦷) CJK UNIFIED IDEOGRAPH-49B6..CJK UNIFIED IDEOGRAPH-49B7
-49D1 ; output # (䧑) CJK UNIFIED IDEOGRAPH-49D1
-4A12 ; output # (䨒) CJK UNIFIED IDEOGRAPH-4A12
-4AB8 ; output # (䪸) CJK UNIFIED IDEOGRAPH-4AB8
-4C77 ; output # (ä±·) CJK UNIFIED IDEOGRAPH-4C77
-4C7D ; output # (ä±½) CJK UNIFIED IDEOGRAPH-4C7D
-4C81 ; output # (ä²) CJK UNIFIED IDEOGRAPH-4C81
-4C85 ; output # (ä²…) CJK UNIFIED IDEOGRAPH-4C85
-4C9F..4CA3 ; output # [5] (䲟..䲣) CJK UNIFIED IDEOGRAPH-4C9F..CJK UNIFIED IDEOGRAPH-4CA3
-4CB3 ; output # (ä²³) CJK UNIFIED IDEOGRAPH-4CB3
-4D08 ; output # (ä´ˆ) CJK UNIFIED IDEOGRAPH-4D08
-4D13..4D19 ; output # [7] (ä´“..ä´™) CJK UNIFIED IDEOGRAPH-4D13..CJK UNIFIED IDEOGRAPH-4D19
-4DAE ; output # (䶮) CJK UNIFIED IDEOGRAPH-4DAE
-4E00..9FA5 ; output # [20902] (一..龥) CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FA5
-A000..A48C ; output # [1165] (ꀀ..ꒌ) YI SYLLABLE IT..YI SYLLABLE YYR
-AC00..D7A3 ; output # [11172] (가..힣) HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
-FA0E..FA0F ; output # [2] (﨎..ï¨) CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F
-FA11 ; output # (﨑) CJK COMPATIBILITY IDEOGRAPH-FA11
-FA13..FA14 ; output # [2] (﨓..﨔) CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14
-FA1F ; output # (﨟) CJK COMPATIBILITY IDEOGRAPH-FA1F
-FA21 ; output # (﨡) CJK COMPATIBILITY IDEOGRAPH-FA21
-FA23..FA24 ; output # [2] (﨣..﨤) CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPATIBILITY IDEOGRAPH-FA24
-FA27..FA29 ; output # [3] (﨧..﨩) CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPATIBILITY IDEOGRAPH-FA29
-2070E ; output # (𠜎) CJK UNIFIED IDEOGRAPH-2070E
-20731 ; output # (𠜱) CJK UNIFIED IDEOGRAPH-20731
-20779 ; output # (ð ¹) CJK UNIFIED IDEOGRAPH-20779
-20C53 ; output # (𠱓) CJK UNIFIED IDEOGRAPH-20C53
-20C78 ; output # (𠱸) CJK UNIFIED IDEOGRAPH-20C78
-20C96 ; output # (ð ²–) CJK UNIFIED IDEOGRAPH-20C96
-20CCF ; output # (ð ³) CJK UNIFIED IDEOGRAPH-20CCF
-20CD5 ; output # (𠳕) CJK UNIFIED IDEOGRAPH-20CD5
-20D15 ; output # (ð ´•) CJK UNIFIED IDEOGRAPH-20D15
-20D7C ; output # (ð µ¼) CJK UNIFIED IDEOGRAPH-20D7C
-20D7F ; output # (𠵿) CJK UNIFIED IDEOGRAPH-20D7F
-20E0E..20E0F ; output # [2] (𠸎..ð ¸) CJK UNIFIED IDEOGRAPH-20E0E..CJK UNIFIED IDEOGRAPH-20E0F
-20E77 ; output # (ð ¹·) CJK UNIFIED IDEOGRAPH-20E77
-20E9D ; output # (ð º) CJK UNIFIED IDEOGRAPH-20E9D
-20EA2 ; output # (𠺢) CJK UNIFIED IDEOGRAPH-20EA2
-20ED7 ; output # (ð »—) CJK UNIFIED IDEOGRAPH-20ED7
-20EF9..20EFA ; output # [2] (𠻹..𠻺) CJK UNIFIED IDEOGRAPH-20EF9..CJK UNIFIED IDEOGRAPH-20EFA
-20F2D..20F2E ; output # [2] (ð ¼­..ð ¼®) CJK UNIFIED IDEOGRAPH-20F2D..CJK UNIFIED IDEOGRAPH-20F2E
-20F4C ; output # (𠽌) CJK UNIFIED IDEOGRAPH-20F4C
-20FB4 ; output # (ð ¾´) CJK UNIFIED IDEOGRAPH-20FB4
-20FBC ; output # (ð ¾¼) CJK UNIFIED IDEOGRAPH-20FBC
-20FEA ; output # (𠿪) CJK UNIFIED IDEOGRAPH-20FEA
-2105C ; output # (ð¡œ) CJK UNIFIED IDEOGRAPH-2105C
-2106F ; output # (ð¡¯) CJK UNIFIED IDEOGRAPH-2106F
-21075..21076 ; output # [2] (ð¡µ..ð¡¶) CJK UNIFIED IDEOGRAPH-21075..CJK UNIFIED IDEOGRAPH-21076
-2107B ; output # (ð¡») CJK UNIFIED IDEOGRAPH-2107B
-210C1 ; output # (ð¡ƒ) CJK UNIFIED IDEOGRAPH-210C1
-210C9 ; output # (𡃉) CJK UNIFIED IDEOGRAPH-210C9
-211D9 ; output # (𡇙) CJK UNIFIED IDEOGRAPH-211D9
-220C7 ; output # (𢃇) CJK UNIFIED IDEOGRAPH-220C7
-227B5 ; output # (𢞵) CJK UNIFIED IDEOGRAPH-227B5
-22AD5 ; output # (𢫕) CJK UNIFIED IDEOGRAPH-22AD5
-22B43 ; output # (𢭃) CJK UNIFIED IDEOGRAPH-22B43
-22BCA ; output # (𢯊) CJK UNIFIED IDEOGRAPH-22BCA
-22C51 ; output # (𢱑) CJK UNIFIED IDEOGRAPH-22C51
-22C55 ; output # (𢱕) CJK UNIFIED IDEOGRAPH-22C55
-22CC2 ; output # (𢳂) CJK UNIFIED IDEOGRAPH-22CC2
-22D08 ; output # (𢴈) CJK UNIFIED IDEOGRAPH-22D08
-22D4C ; output # (𢵌) CJK UNIFIED IDEOGRAPH-22D4C
-22D67 ; output # (𢵧) CJK UNIFIED IDEOGRAPH-22D67
-22EB3 ; output # (𢺳) CJK UNIFIED IDEOGRAPH-22EB3
-23CB7 ; output # (𣲷) CJK UNIFIED IDEOGRAPH-23CB7
-244D3 ; output # (𤓓) CJK UNIFIED IDEOGRAPH-244D3
-24DB8 ; output # (𤶸) CJK UNIFIED IDEOGRAPH-24DB8
-24DEA ; output # (𤷪) CJK UNIFIED IDEOGRAPH-24DEA
-2512B ; output # (𥄫) CJK UNIFIED IDEOGRAPH-2512B
-26258 ; output # (𦉘) CJK UNIFIED IDEOGRAPH-26258
-267CC ; output # (𦟌) CJK UNIFIED IDEOGRAPH-267CC
-269F2 ; output # (𦧲) CJK UNIFIED IDEOGRAPH-269F2
-269FA ; output # (𦧺) CJK UNIFIED IDEOGRAPH-269FA
-27A3E ; output # (𧨾) CJK UNIFIED IDEOGRAPH-27A3E
-2815D ; output # (ð¨…) CJK UNIFIED IDEOGRAPH-2815D
-28207 ; output # (𨈇) CJK UNIFIED IDEOGRAPH-28207
-282E2 ; output # (𨋢) CJK UNIFIED IDEOGRAPH-282E2
-28CCA ; output # (𨳊) CJK UNIFIED IDEOGRAPH-28CCA
-28CCD ; output # (ð¨³) CJK UNIFIED IDEOGRAPH-28CCD
-28CD2 ; output # (𨳒) CJK UNIFIED IDEOGRAPH-28CD2
-29D98 ; output # (𩶘) CJK UNIFIED IDEOGRAPH-29D98
-
-# Total code points: 37201
-
-# Not allowed at start of identifier
-
-0300..033F ; nonstarting # [64] (Ì€..Ì¿) COMBINING GRAVE ACCENT..COMBINING DOUBLE OVERLINE
-0342 ; nonstarting # (Í‚) COMBINING GREEK PERISPOMENI
-0345..034E ; nonstarting # [10] (Í…..ÍŽ) COMBINING GREEK YPOGEGRAMMENI..COMBINING UPWARDS ARROW BELOW
-0360..036F ; nonstarting # [16] (͠..ͯ) COMBINING DOUBLE TILDE..COMBINING LATIN SMALL LETTER X
-0591..05A1 ; nonstarting # [17] (Ö‘..Ö¡) HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER
-05A3..05B9 ; nonstarting # [23] (Ö£..Ö¹) HEBREW ACCENT MUNAH..HEBREW POINT HOLAM
-05BB..05BD ; nonstarting # [3] (Ö»..Ö½) HEBREW POINT QUBUTS..HEBREW POINT METEG
-05BF ; nonstarting # (Ö¿) HEBREW POINT RAFE
-05C1..05C2 ; nonstarting # [2] (×..ׂ) HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
-05C4 ; nonstarting # (ׄ) HEBREW MARK UPPER DOT
-064B..0655 ; nonstarting # [11] (Ù‹..Ù•) ARABIC FATHATAN..ARABIC HAMZA BELOW
-0670 ; nonstarting # (Ù°) ARABIC LETTER SUPERSCRIPT ALEF
-06D6..06DC ; nonstarting # [7] (ۖ..ۜ) ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN
-06DF..06E4 ; nonstarting # [6] (ÛŸ..Û¤) ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA
-06E7..06E8 ; nonstarting # [2] (Û§..Û¨) ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON
-06EA..06ED ; nonstarting # [4] (Ûª..Û­) ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM
-0711 ; nonstarting # (Ü‘) SYRIAC LETTER SUPERSCRIPT ALAPH
-0730..073F ; nonstarting # [16] (Ü°..Ü¿) SYRIAC PTHAHA ABOVE..SYRIAC RWAHA
-07A6..07B0 ; nonstarting # [11] (Þ¦..Þ°) THAANA ABAFILI..THAANA SUKUN
-0901..0903 ; nonstarting # [3] (à¤..ः) DEVANAGARI SIGN CANDRABINDU..DEVANAGARI SIGN VISARGA
-093C ; nonstarting # (़) DEVANAGARI SIGN NUKTA
-093E..094D ; nonstarting # [16] (ा..à¥) DEVANAGARI VOWEL SIGN AA..DEVANAGARI SIGN VIRAMA
-0951..0954 ; nonstarting # [4] (॑..॔) DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT
-0962..0963 ; nonstarting # [2] (ॢ..ॣ) DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL
-0981..0983 ; nonstarting # [3] (à¦..ঃ) BENGALI SIGN CANDRABINDU..BENGALI SIGN VISARGA
-09BC ; nonstarting # (়) BENGALI SIGN NUKTA
-09BE..09C4 ; nonstarting # [7] (া..ৄ) BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN VOCALIC RR
-09C7..09C8 ; nonstarting # [2] (ে..ৈ) BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
-09CB..09CD ; nonstarting # [3] (ো..à§) BENGALI VOWEL SIGN O..BENGALI SIGN VIRAMA
-09D7 ; nonstarting # (ৗ) BENGALI AU LENGTH MARK
-09E2..09E3 ; nonstarting # [2] (ৢ..ৣ) BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL
-0A02 ; nonstarting # (ਂ) GURMUKHI SIGN BINDI
-0A3C ; nonstarting # (਼) GURMUKHI SIGN NUKTA
-0A3E..0A42 ; nonstarting # [5] (ਾ..ੂ) GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN UU
-0A47..0A48 ; nonstarting # [2] (ੇ..ੈ) GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI
-0A4B..0A4D ; nonstarting # [3] (à©‹..à©) GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA
-0A70..0A71 ; nonstarting # [2] (ੰ..ੱ) GURMUKHI TIPPI..GURMUKHI ADDAK
-0A81..0A83 ; nonstarting # [3] (àª..ઃ) GUJARATI SIGN CANDRABINDU..GUJARATI SIGN VISARGA
-0ABC ; nonstarting # (઼) GUJARATI SIGN NUKTA
-0ABE..0AC5 ; nonstarting # [8] (ા..ૅ) GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN CANDRA E
-0AC7..0AC9 ; nonstarting # [3] (ે..ૉ) GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN CANDRA O
-0ACB..0ACD ; nonstarting # [3] (à«‹..à«) GUJARATI VOWEL SIGN O..GUJARATI SIGN VIRAMA
-0B01..0B03 ; nonstarting # [3] (à¬..ଃ) ORIYA SIGN CANDRABINDU..ORIYA SIGN VISARGA
-0B3C ; nonstarting # (଼) ORIYA SIGN NUKTA
-0B3E..0B43 ; nonstarting # [6] (ା..ୃ) ORIYA VOWEL SIGN AA..ORIYA VOWEL SIGN VOCALIC R
-0B47..0B48 ; nonstarting # [2] (à­‡..à­ˆ) ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
-0B4B..0B4D ; nonstarting # [3] (à­‹..à­) ORIYA VOWEL SIGN O..ORIYA SIGN VIRAMA
-0B56..0B57 ; nonstarting # [2] (à­–..à­—) ORIYA AI LENGTH MARK..ORIYA AU LENGTH MARK
-0B82 ; nonstarting # (ஂ) TAMIL SIGN ANUSVARA
-0BBE..0BC2 ; nonstarting # [5] (ா..ூ) TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN UU
-0BC6..0BC8 ; nonstarting # [3] (ெ..ை) TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
-0BCA..0BCD ; nonstarting # [4] (ொ..à¯) TAMIL VOWEL SIGN O..TAMIL SIGN VIRAMA
-0BD7 ; nonstarting # (ௗ) TAMIL AU LENGTH MARK
-0C01..0C03 ; nonstarting # [3] (à°..à°ƒ) TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
-0C3E..0C44 ; nonstarting # [7] (ా..ౄ) TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN VOCALIC RR
-0C46..0C48 ; nonstarting # [3] (ె..ై) TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
-0C4A..0C4D ; nonstarting # [4] (ొ..à±) TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
-0C55..0C56 ; nonstarting # [2] (ౕ..ౖ) TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
-0C82..0C83 ; nonstarting # [2] (ಂ..ಃ) KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
-0CBE..0CC4 ; nonstarting # [7] (ಾ..ೄ) KANNADA VOWEL SIGN AA..KANNADA VOWEL SIGN VOCALIC RR
-0CC6..0CC8 ; nonstarting # [3] (ೆ..ೈ) KANNADA VOWEL SIGN E..KANNADA VOWEL SIGN AI
-0CCA..0CCD ; nonstarting # [4] (ೊ..à³) KANNADA VOWEL SIGN O..KANNADA SIGN VIRAMA
-0CD5..0CD6 ; nonstarting # [2] (ೕ..ೖ) KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
-0D02..0D03 ; nonstarting # [2] (à´‚..à´ƒ) MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
-0D3E..0D43 ; nonstarting # [6] (ാ..ൃ) MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN VOCALIC R
-0D46..0D48 ; nonstarting # [3] (െ..ൈ) MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
-0D4A..0D4D ; nonstarting # [4] (ൊ..àµ) MALAYALAM VOWEL SIGN O..MALAYALAM SIGN VIRAMA
-0D57 ; nonstarting # (ൗ) MALAYALAM AU LENGTH MARK
-0D82..0D83 ; nonstarting # [2] (ං..ඃ) SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA
-0DCA ; nonstarting # (à·Š) SINHALA SIGN AL-LAKUNA
-0DCF..0DD4 ; nonstarting # [6] (à·..à·”) SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA
-0DD6 ; nonstarting # (à·–) SINHALA VOWEL SIGN DIGA PAA-PILLA
-0DD8..0DDF ; nonstarting # [8] (à·˜..à·Ÿ) SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA
-0DF2..0DF3 ; nonstarting # [2] (à·²..à·³) SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA
-0E31 ; nonstarting # (ั) THAI CHARACTER MAI HAN-AKAT
-0E34..0E3A ; nonstarting # [7] (ิ..ฺ) THAI CHARACTER SARA I..THAI CHARACTER PHINTHU
-0E47..0E4E ; nonstarting # [8] (็..๎) THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN
-0EB1 ; nonstarting # (ັ) LAO VOWEL SIGN MAI KAN
-0EB4..0EB9 ; nonstarting # [6] (ິ..ູ) LAO VOWEL SIGN I..LAO VOWEL SIGN UU
-0EBB..0EBC ; nonstarting # [2] (ົ..ຼ) LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO
-0EC8..0ECD ; nonstarting # [6] (່..à») LAO TONE MAI EK..LAO NIGGAHITA
-0F18..0F19 ; nonstarting # [2] (༘..༙) TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
-0F35 ; nonstarting # (༵) TIBETAN MARK NGAS BZUNG NYI ZLA
-0F37 ; nonstarting # (༷) TIBETAN MARK NGAS BZUNG SGOR RTAGS
-0F39 ; nonstarting # (༹) TIBETAN MARK TSA -PHRU
-0F3E..0F3F ; nonstarting # [2] (༾..༿) TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES
-0F71..0F72 ; nonstarting # [2] (ཱ..ི) TIBETAN VOWEL SIGN AA..TIBETAN VOWEL SIGN I
-0F74 ; nonstarting # (ུ) TIBETAN VOWEL SIGN U
-0F76 ; nonstarting # (ྲྀ) TIBETAN VOWEL SIGN VOCALIC R
-0F78 ; nonstarting # (ླྀ) TIBETAN VOWEL SIGN VOCALIC L
-0F7A..0F80 ; nonstarting # [7] (ེ..ྀ) TIBETAN VOWEL SIGN E..TIBETAN VOWEL SIGN REVERSED I
-0F82..0F84 ; nonstarting # [3] (ྂ..྄) TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA
-0F86..0F87 ; nonstarting # [2] (྆..྇) TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS
-0F90..0F97 ; nonstarting # [8] (à¾..ྗ) TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER JA
-0F99..0FBC ; nonstarting # [36] (ྙ..ྼ) TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
-0FC6 ; nonstarting # (࿆) TIBETAN SYMBOL PADMA GDAN
-102C..1032 ; nonstarting # [7] (ာ..ဲ) MYANMAR VOWEL SIGN AA..MYANMAR VOWEL SIGN AI
-1036..1039 ; nonstarting # [4] (ံ..္) MYANMAR SIGN ANUSVARA..MYANMAR SIGN VIRAMA
-1056..1059 ; nonstarting # [4] (á–..á™) MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC LL
-17B6..17D0 ; nonstarting # [27] (ា..áŸ) KHMER VOWEL SIGN AA..KHMER SIGN SAMYOK SANNYA
-17D2 ; nonstarting # (្) KHMER SIGN COENG
-18A9 ; nonstarting # (ᢩ) MONGOLIAN LETTER ALI GALI DAGALGA
-3099..309A ; nonstarting # [2] (ã‚™..ã‚š) COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
-
-# Total code points: 524
diff --git a/emacs.d/nxhtml/etc/viper-tut/0intro b/emacs.d/nxhtml/etc/viper-tut/0intro
deleted file mode 100644
index 3a37e33..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/0intro
+++ /dev/null
@@ -1,59 +0,0 @@
-Viper tutorial #0: Introduction
-
-This Viper tutorial is based on the vi tutorial VILEARN. Some things
-works differently in Emacs and corresponding parts of the tutorial has
-been changed for this. There has also been added some basic
-information about Emacs that are useful to get started if you already
-are a vi user.
-
-This tutorial is a hands-on-tutorial for Viper. If you want more
-information about Viper, please read the VIPER-MANUAL.
-
-Note that if you are using Viper you probably still want to know quite
-a bit about Emacs to use Emacs efficiently. Therefore you can also
-run the Emacs tutorial from here - with special support for
-Viper. This is part 6 below. You should run this part also to get to
-know which Emacs standard key bindings are shadowed by Viper.
-
-The tutorial consists of these parts:
-
- 0 Introduction
- (this file)
-
- 1 Basic Editing
- Covers the handful of commands required to both navigate all
- five tutorials and do basic editing.
-
- 2 Moving Efficiently
- Covers all of the cursor positioning commands. These are the
- commands used later as arguments to editing commands.
-
- 3 Cutting and Pasting
- Introduces the first compound commands, numbering, and copy
- buffers.
-
- 4 Inserting Techniques
- Continues the discussion of compound commands, while completing
- the list of insertion commands first discussed in tutorial one.
-
- 5 Tricks and Timesavers
- This is less a tutorial than a description of common vi commands
- which don't fit correctly into normal logic.
-
- 6 Emacs Tutorial for Viper Users
- Even Viper users use a lot of keys from Emacs. Therefore you can
- run the Emacs tutorial here too. It will show you which keys in
- the tutorial that are changed because you are using Viper. This
- depends of which Viper state you are in, vi state or some insert
- state. If you switch Viper state the tutorial will immediately
- show which keys are affected.
-
-
-BUGS
-Vilearn has the remark that it "Still doesn't cover variables, ex
-commands, or tags. At least one more tutorial is necessary for a
-complete introduction to vi." - I do not think you have to learn those
-parts to use Viper. There are other ways to do these things in Emacs!
-
-For more information about vilearn see the the README-FILE.
-
diff --git a/emacs.d/nxhtml/etc/viper-tut/1basics b/emacs.d/nxhtml/etc/viper-tut/1basics
deleted file mode 100644
index aea1fc5..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/1basics
+++ /dev/null
@@ -1,187 +0,0 @@
-Viper tutorial #1: The Basics
-
-This lesson lasts 10-15 minutes and teaches simple editing. Lines
-which begin with >>> mark exercises you should try. When you
-want to exit this tutorial type 'Z''Z' (type capital Z, twice).
-
-When you type commands in vi they do not appear on the screen. If the
-letters you type unexpectedly appear on the screen, press the ESC key.
-
-
-BASIC CURSOR MOVEMENT
----------------------
-To move through the tutorial use C-d (control d) and C-u (control u).
-
- C-d Move DOWN one half-screen
- (depress the control key and type d)
-
- C-u Move UP one half-screen
- (depress the control key and type u)
-
-* EMACS-NOTICE: C-u is normally used in Emacs for UNIVERSAL-ARGUMENT.
- You can in most cases use DIGIT-ARGUMENT instead.
-
->>> Now type C-d (control d) and C-u (control u) to move down and back up.
-
-When you are done reading a screen, you are expected to type C-d to move
-down to the next screen. You must remember to type C-d throughout the
-tutorial.
-
-To move the cursor line by line, or character by character, use the
-four keys 'h', 'j', 'k', and 'l'.
-
- 'h' Move left one character
- 'j' Move down one line
- 'k' Move up one line
- 'l' Move right one character
-
-You will notice that these keys are in a straight line on the
-keyboard. Study the diagram below showing the function of h, j, k, l.
-
- UP
- ....... ....... ....... .......
- : : : : : : : :
- LEFT : h : : j : : k : : l : RIGHT
- :.....: :.....: :.....: :.....:
-
- DOWN
-
->>> Now type 'j' or 'k' a few times to bring the cursor to this line.
-
->>> Try moving off the right end of a line using 'l' . Notice that
->>> vi will not allow you to move off the end of the line using 'l' .
->>> Likewise, you cannot use 'h' and 'l' on a blank line.
-
->>> Try moving past the bottom of the screen using 'j' . Notice how
->>> how the screen scrolls downward.
-
->>> Now practice using 'k' to move up, and 'h' to move left.
-
-
-DELETION
---------
-To delete characters and lines, use 'x' and 'd''d'.
-
- 'x' X-OUT one character
- 'd''d' DELETE one line
-
-To undo your changes, use 'u'.
-
- 'u' UNDO last change only
-
->>> Delete this SCRAP line. Move to this line with 'j' or 'k' , now type 'd''d' .
->>> Try undoing the deletion with 'u' .
-
->>> Move to this line and x-out the Y's with 'x' : "whY ask whY?"
-
->>> Try undoing the deletion with 'u' . Try typing 'u' several times.
->>> Notice that 'u' only undoes the last change.
-
-* EMACS-NOTICE: In Viper you can use the repeat command '.' (just a dot)
- to undo more changes. This goes in both direction, ie undoing and
- redoing. Typing just 'u' changes direction.
-
-Here are more lines on which to practice deleting and undoing (use: 'd''d' 'x' 'u' )
-
- Emacs is a nice creation. Emacs is a nice creation.
- Emacs is a nice creation. Emacs is a nice creation.
- Emacs is a nice creation. Emacs is a nice creation.
-
-
-QUIT COMMANDS
--------------
-(DO NOT QUIT the tutorial at this time.)
-
-To quit a file without saving any changes you have made (for instance,
-with the 'd''d' or 'x' commands) use :q!<RETURN> . To quit and save your
-changes, use 'Z''Z' . When you are editing your own files, you normally
-use 'Z''Z' to quit.
-
- :q!<RETURN> QUIT without saving changes
- (type a colon, then the letter q, then an
- exclamation point, and press RETURN)
-
- 'Z''Z' Exit and save any changes
- (type capital Z, twice)
-
-
-
-INSERTION
----------
-You enter insert mode with 'i' or 'o' . Anything you type during insert
-mode appears on the screen. When you are done inserting, press ESC
-to exit insert mode. Type C-[ (control [ ), if you do not have an ESC key.
-
- 'o' OPEN a line for inserting text
- 'i' INSERT starting at the cursor
-
- ESC ESCAPE from insert mode
-
-During insert mode, use your erase character (usually backspace or
-delete) to delete mistakes. The characters you delete will remain on
-the screen until you press ESC.
-
->>> Insert your name and phone number below the next blank line. To do this:
->>> Open a line below using 'o' .
->>> Type your first and last name. Press RETURN.
->>> Then type your phone number and press ESC.
->>> Use 'x' to erase part of your phone number.
-
->>> Type the date below your phone number. To do this:
->>> Open another line using 'o' .
->>> Type the date and press ESC.
-
->>> Type 'u' to undo the insertion.
-
->>> Insert a nickname between your first and last names, using 'i'. To do this:
->>> Move the cursor to the spot between your names using 'h', 'j', 'k', 'l'.
->>> Press 'i' .
->>> Type the nickname, use DELETE or BACKSPACE to erase any typos.
->>> Then press ESC.
-
-On some computers, a line may be longer than the width of the screen.
-This means that a very long line may appear to be two lines on the
-screen. This happens when you keep typing without pressing RETURN at
-the edge of the screen. To avoid any confusion when you're inserting
-text, be sure to press RETURN before reaching the right edge of the
-screen.
-
-
-SUMMARY
--------
-These are the vi commands you should know after tutorial #1:
-
- C-d Move DOWN one half-screen
- (depress the control key and type d)
-
- C-u Move UP one half-screen
- (depress the control key and type u)
-
- 'h' Move left one character
- 'j' Move down one line
- 'k' Move up one line
- 'l' Move right one character
-
- 'd''d' DELETE one line
- 'x' X-OUT one character
-
- 'u' UNDO last change
-
- :q!<RETURN> QUIT without saving changes
- (type a colon, then the letter q, then an
- exclamation point, and press RETURN)
-
- 'Z''Z' Exit and save any changes
- (type capital Z, twice)
-
- 'o' OPEN a line for inserting text
- 'i' INSERT starting at the cursor
-
- ESC ESCAPE from insert mode
-
-
-You are now prepared to do simple editing on your own files. Practice
-using vi for a few days. Then take the second vi tutorial to learn
-more powerful and useful vi commands.
-
-Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved.
diff --git a/emacs.d/nxhtml/etc/viper-tut/2moving b/emacs.d/nxhtml/etc/viper-tut/2moving
deleted file mode 100644
index 8e4148e..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/2moving
+++ /dev/null
@@ -1,269 +0,0 @@
-Viper tutorial #2: Moving Through Files Efficiently
-
-This lesson lasts 15-20 minutes. The material taught here is used in
-tutorial #3: Cutting and Pasting. Lines which begin with >>> mark
-exercises you should try. When you want to exit this tutorial type 'Z''Z'.
-
-
-WORDS
------
-There are many ways to move from one word to another. Consider these:
-
- 'w' Move to the beginning of the next WORD
- 'e' Move to the END of the next word
- 'b' Move BACK to the beginning to the previous word
-
-For 'w', 'e', and 'b', a word is delimited by any non-alphanumeric
-character. The capitalized versions, 'W', 'E', and 'B', also move from word
-to word. The difference is that for 'W', 'E', and 'B', a word is delimited
-by any blank space.
-
->>> Try out 'w', 'b', 'e', on the lines provided below.
->>> Next practice using 'B', 'W', 'b', 'E' on the lines provided below.
-
- EX-PER-IMENT on these lines;test moving back &forth.
- EX-PER-IMENT on these lines;test moving back &forth.
-
-
-ON THE LINE
------------
-You can move immediately to any point on the current line.
-
- '$' Move to the end of the line
- '^' Move to the first non-white character on the line
-
- '0' Move to the first column on the line (column zero)
- #'|' Move to an exact column on the line (column #) e.g. 5| 12|
-
->>> Experiment with '$' and '^' on the line provided below. Notice
->>> that '^' moves to the first non-white character, not the beginning.
-
- This is a PRACTICE LINE. There is white space at the front. END
-
-'0' (zero) will always take you to the far left edge of the screen.
-
-#'|' (number vertical-bar) is for moving to an explicit column on a line.
-Just type any number 1-80 and press | . For example: 5| 20| 30|
-Note that you can't move beyond the last column on a line.
-
-
-FINDING CHARACTERS
-------------------
-Often you want to move to a specific letter or character on a line.
-
- 'f' char FIND the next occurrence of char on the line
- 't' char Move 'TIL the next occurrence of char on the line
-
- 'F' char FIND the previous occurrence of char on the line
- 'T' char Move 'TIL the previous occurrence of char on the line
-
- ';' Repeat the last f, t, F, or T
- ',' Reverse the last f, t, F, or T
-
-'f' and 'F' land on the character. 't' and 'T' land next to the character.
-'f' and 't' move forward, while 'F' and 'T' move backward.
-
-If the specified character is not on the line, vi will beep.
-
->>> Move to the beginning of the line below, and try out these commands:
->>> 'f'e 'f'E ';' ';' ',' ',' 't'@ 'T'P 't'e 't'E ',' ';' ',' ';'
-
- "PRACTICE line?" "Each and Every?" "Find thE char@cter and move to it.END
-
-
-MATCHING
---------
-vi has a handy way to determine if (), {}, and [] pairs match up.
-
- '%' Move to matching () or {} or []
-
->>> On the practice lines below, move your cursor over a (,),{,},[, or ].
->>> Then type '%' .
-
- [TRY THIS. ((Whether) the pairs match up is the question.) [One]
- pair is incomplete]. Can you tell {which one? ]} END
-
-
-WINDOW POSITIONS
-----------------
-You can move the cursor to the top, middle, or bottom of the vi window.
-
- 'H' Move to the HIGHEST position in the window
- 'M' Move to the MIDDLE position in the window
- 'L' Move to the LOWEST position in the window
-
->>> Try out these commands: type H then M and L and then M again.
-
-
-MARKING LOCATIONS
------------------
-You can mark positions in the file and return to them.
-
- 'm' char MARK this location and name it char
- ''' char (quote character) return to line named char
- '''''' (quote quote) return from last movement
-
-char can be any lower case letter, a-z. A mark persists until you:
- 1) use the same char to mark another location
- or 2) delete the marked line
-
->>> Move to this line and type ma to mark it a
->>> Move to this line and type mb to mark it b
->>> Move to this line and type mz to mark it z
->>> Type 'a to return to line a
->>> Type 'b to return to line b
->>> Type 'z to return to line z
-
-Certain commands can move you large distances. These commands cause
-your last position to be remembered in the special mark named ' (quote).
-To move to this special mark, just type '' (quote quote).
-
->>> Try this: 'b to return to line b, and then '' to return here.
-
-
-GO TO A LINE
-------------
-
- 'G' GO to the last line in the file
- #'G' GO to line #. (e.g., 3G , 5G , 124G )
-
-Read these directions carefully:
->>> Type '1''G' to go to the top of the file, and then '''''' (quote quote)
->>> to return here.
->>> Now try 'G' to go to the end of the file, and then '''''' to return here.
-
-
-BLOCKS OF TEXT
---------------
-It is often convenient to move through files jumping from one block of
-text to the next. To do this use braces and parentheses:
-
- '{' (left brace) Move to the beginning of a paragraph
- '}' (right brace) Move to the end of a paragraph
-
- '(' (left paren) Move to the beginning of a sentence
- ')' (right paren) Move to the beginning of the next sentence
-
->>> Experiment with '}' and '{' on the two paragraphs provided below.
->>> Note that paragraphs are separated by a blank line.
-
- EXPERIMENT on this first paragraph. The quick brown fox jumped
- over the seven lazy dogs. The fox must have been very large to
- jump over seven dogs!
-
- EXPERIMENT on this second paragraph. The quick brown dog
- jumped over the seven lazy foxes. The dog didn't have to be nearly
- as large, since foxes aren't too big.
-
->>> Try out ')' and '(' on the two paragraphs provided above.
->>> Notice that sentences are separated by two blank spaces.
-
-C programmers find it useful to move by sections, since sections may be
-delimited by a left brace in the first column. By placing the opening
-brace of a C subroutine in the first column, you can move to the top of
-the next subroutine, using '[''[' and ']'']' .
-
- '[''[' Move to the beginning of a section
- ']'']' Move to the end of a section
-
-Note that if vi does not find a left brace at the far left, it will
-move to the top or bottom of the file.
-
->>> Now try ']'']' then ']'']' and '[''[' on the subroutines provided below:
-
-main()
-{
- helloworld();
-}
-
-helloworld()
-{
- printf( "Hello world\n" );
-}
-
-
-SEARCHING
----------
-This enables you to jump to the next occurrence of a string in a file.
-To initially find the string use:
-
- '/'string Find string looking forward
- '?'string Find string looking backward
-
-To find additional occurrences of the string type:
-
- 'n' Repeat last / or ? command
- 'N' Reverse last / or ? command
-
-vi may search past the bottom of the file and then start again at the top.
-(Or, vi may search past the top and then start again at the bottom.)
-
->>> You are going to search for a string, find the next three
->>> occurrences. Then flip directions and find the string until you
->>> return to this location. To do this:
->>> Type '/''t''h''e' then press RETURN.
->>> Type 'n' three times.
->>> Type 'N' until you return to this location.
-
-* EMACS-NOTICE: Emacs has very powerful SEARCH-COMMANDS which you may
- want to use in parallell to those above. One of the first you want
- to try is probably C-s (ISEARCH-FORWARD).
-
-
-SUMMARY
--------
-
- 'w' Move to the beginning of the next WORD
- 'e' Move to the END of the next word
- 'b' Move BACK to the beginning to the previous word
-
- '$' Move to the end of the line
- '^' Move to the first non-white character on the line
-
- '0' Move to the first column on the line (column zero)
- #'|' Move to an exact column on the line (column #) e.g. 5| 12|
-
- 'f' char FIND the next occurrence of char on the line
- 't' char Move 'TIL the next occurrence of char on the line
-
- 'F' char FIND the previous occurrence of char on the line
- 'T' char Move 'TIL the previous occurrence of char on the line
-
- ';' Repeat the last f, t, F, or T
- ',' Reverse the last f, t, F, or T
-
- '%' Show matching () or {} or []
-
- 'H' Move to the HIGHEST position in the window
- 'M' Move to the MIDDLE position in the window
- 'L' Move to the LOWEST position in the window
-
- 'm' char MARK this location and name it char
- ''' char (quote character) return to line named char
- '''''' (quote quote) return from last movement
-
- 'G' GO to the last line in the file
- #'G' GO to line #. (e.g., 3G , 5G , 175G )
-
- '{' (left brace) Move to the beginning of a paragraph
- '}' (right brace) Move to the end of a paragraph
-
- '(' (left paren) Move to the beginning of a sentence
- ')' (right paren) Move to the beginning of the next sentence
-
- '[''[' Move to the beginning of a section
- ']'']' Move to the end of a section
-
- '/'string Find string looking forward
- '?'string Find string looking backward
-
- 'n' Repeat last / or ? command
- 'N' Reverse last / or ? command
-
-You should now be able to move around files very efficiently. These
-commands are especially useful if you are using vi over a slow modem.
-Practice the material in this lesson for a few days and then take
-either the third vi tutorial to learn how to copy, cut, and paste, or
-the forth vi tutorial to learn additional insertion techniques.
-
-Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved.
diff --git a/emacs.d/nxhtml/etc/viper-tut/3cutpaste b/emacs.d/nxhtml/etc/viper-tut/3cutpaste
deleted file mode 100644
index 6d531d9..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/3cutpaste
+++ /dev/null
@@ -1,318 +0,0 @@
-Viper tutorial #3: Copying, Cutting, and Pasting
-
-This lesson lasts 15-20 minutes. This tutorial assumes full knowledge
-of tutorial #1, and familiarity with tutorial #2. Lines which begin
-with >>> mark exercises you should try.
-
-When you want to exit this tutorial type 'Z''Z' to exit and save your
-changes. Or type :q!<RETURN> to exit without saving changes.
-Remember that typing u will UNDO your last change.
-
-
-CUTTING TEXT
-------------
-The delete command can be combined with any of the movement commands
-taught throughout tutorial #2. The resulting command is of the form:
-
- 'd'movement DELETE to where the movement command specifies
-
-Consider the following examples:
-
- 'd''w' DELETE to the beginning of the next WORD
- 'd''$' DELETE to the end of the line
- 'd'')' DELETE to the beginning of the next sentence
- 'd''t'e DELETE 'TIL the next e
- 'd''d' DELETE a line (dd is a special case of the d command)
-
->>> Experiment with 'd''w' 'd''$' 'd'')' 'd''t'e 'd''d' on the paragraph provided below:
-
- PRACTICE here. Now is the time for all good users to learn the
- editor. The quick brown fox jumped over the seven lazy fish. Now
- is the time for all good users to learn the editor. The quick
- brown computer jumped over the seven lazy users. END PRACTICE
-
-* EMACS-NOTICE: In Viper you can also use 'r' and 'R' for Emacs region and
- Viper line extended region. This is very convenient together with
- CUA-MODE where the region is visible (it is usually called the
- selected text or something similar in other applications).
-
-
-PASTING TEXT
-------------
-When text is deleted it is put into a buffer which contains the most
-recently deleted text. To paste the contents of this buffer elsewhere
-in the file use the p or P command.
-
- 'P' (upper p) PUT the contents of the buffer before the cursor
- 'p' (lower p) PUT the contents of the buffer after the cursor
-
->>> Try this sequence of commands on the practice lines below:
->>> 'd''d' to delete one line
->>> 'j' to move down a line
->>> 'p' (lower p) to PUT the deleted text after the cursor
->>> '}' to move to the end of the paragraph
->>> 'P' (upper p) to PUT the deleted text before the cursor
-
- PRACTICE line. Cut and Paste this line to the bottom of the
- paragraph. Here is some filler, feel free to cut and paste the
- text in this practice region. Remember that u undoes the last
- action. END OF PRACTICE
-
->>> Try this sequence of commands at the beginning of a word:
->>> 'd''w' 'w' 'P'
-
-The fastest way to swap two letters is to type: 'x''p'
-
->>> Use xp to correct the misspelled words below:
-
- PRACTICE. Thier weird quiet recieved an inconvenient shriek.
- Thier belief is that to recieve grief from nieghbors outwieghs
- all else. Biege skies lead to wierd science. END.
-
-
-NUMBERING
----------
-Consider cutting and pasting 3 words. Based on previous exercises you
-would type 'd''w' , move to the new location, and type 'p' , and repeat
-this procedure twice more. There is an easier way to do this:
-
->>> Using the practice lines below, try the following sequence of commands:
->>> Move to the beginning of the first sentence.
->>> Type 'd''3''w' to DELETE 3 WORDS.
->>> Type 'w' to move ahead one WORD.
->>> Type 'P' (upper p) to PUT the three words before the cursor.
-
- PRACTICE Numbering vi commands is easy to do. Now is the time for
- all good users to learn the editor. The quick brown fox jumped
- over the seven lazy dogs. Numbering vi commands is easy to do.
- Now is the time for all good users to learn the editor. END PRACTICE
-
->>> Type 'd''2''d' to DELETE 2 lines, using the practice paragraph above.
->>> Move to the top of the paragraph.
->>> Type 'p' (lower p) to PUT the two lines after of the cursor.
-
-Numbering also works for movement commands.
-
->>> Now try '4''w' to move ahead 4 WORDs, on the lines provided above.
->>> Then use '3''b' to move BACK 3 words.
-
-When you type '4''w' THINK "4 words", when you type d4w think "delete 4
-words". In general, we can write
-
- #movement repeat movement # times
- d#movement DELETE to where the #movement command specifies
-
-
-COPYING TEXT
-------------
-The YANK command works just like the DELETE command, except 'y' is used
-instead of 'd' .
-
- 'y'movement YANK to where the movement command specifies
-
-YANK and DELETE are identical except that YANK only copies the specified
-text into the buffer.
-
->>> Try this sequence of commands on the practice lines below:
->>> 'y''y' to YANK a line (yy is a special case of the y command)
->>> '3''j' to move down 3 lines
->>> 'p' (lower p) to PUT the yanked text after the cursor
-
- PRACTICE line. Copy and Paste this line to the bottom of the
- paragraph. Here is some filler, feel free to copy and paste the
- text in this practice region. Remember that u undoes the last
- action. END OF PRACTICE
-
-Please note that copy, cutting, and pasting large blocks of text may
-significantly alter the tutorial file. Remember that you can always get
-a new copy of the tutorial file and that u UNDOes your last change.
-
-Here are some examples which show the similarity between y and d .
-
- 'y''w' YANK to the beginning of the next WORD
- 'y''$' YANK to the end of the line
- 'y'')' YANK to the beginning of the next sentence
- 'y''t'e YANK 'TIL the next e
- 'y''y' YANK a line
-
-Here are some more examples using commands from tutorial #2.
-
- 'y''L' YANK from here to the lowest point of the window
- 'y''/'and YANK from here to the word "and"
- 'y''2''}' YANK 2 paragraphs
- 'y''''a YANK from here to the marked line "a" (mark line first)
-
->>> Experiment with 'y''w' 'y''t'e 'y''4''w' 'y''2''}' 'y''3''y' and 'y''$' on the paragraph
->>> provided below. Copy text AND use 'p' or 'P' to paste it.
-
- PRACTICE line. Copy and Paste this line to the bottom of the
- paragraph. Here is some filler, feel free to copy and paste
- the text in this practice region. Remember that u undoes the
- last action. END OF PRACTICE
-
-
-NUMBERED BUFFERS
-----------------
-In all of the previous pasting exercises you've used the "un-named"
-buffer. The un-named buffer contains the text you most recently cut or
-copied. When you make a new cut or copy, the old contents of the
-un-named buffer are moved to one of the "numbered" buffers. The
-buffers are numbered 1-9. Each time you cut or copy text,
-
- vi saves your current cut or copy in a buffer #1
- vi saves your 2nd to last cut or copy in a buffer #2
- The cut or copy before that is saved in a buffer #3 ...
- vi saves your 8th oldest cut or copy in a buffer #8
- vi saves your 9th oldest cut or copy in a buffer #9
-
-Note that buffer #1 is the same as the un-named buffer. Here's how to
-paste from the numbered buffers:
-
- "#P (upper p) PUT contents of buffer # before the cursor
- "#p (lower p) PUT contents of buffer # after the cursor
-
-For example:
-
- "1p PUT buffer 1 after the cursor
- "7p PUT buffer 7 after the cursor
-
->>> Delete this 1st line with dd
->>> Delete this 2nd line with dd
->>> Delete this 3rd block with d2d
->>> (2nd half of block 3)
->>> Delete this 4th block with dd
->>> Now type "1p "2p "3p "4p
-
-If you are using vi and have made accidental deletions, just PUT the
-contents of each numbered buffer to recover the deleted text.
-
-
-NAMED BUFFERS
--------------
-vi maintains the un-named and numbered buffers automatically. You can
-maintain your own buffers named a-z. That is, you can cut or copy text
-into buffer x and later paste the text from buffer x.
-
- '"'aDELETE DELETE text into buffer a
- "aYANK YANK text into buffer a
- "aPUT PUT text from buffer a
-
-Note, don't actually type 'DELETE', 'YANK', or 'PUT'; type one of the
-DELETE commands, YANK commands, or PUT commands. See the examples below:
-
- "ad} DELETE paragraph into buffer a
- "by3y YANK 3 lines into buffer b
- "cy200G YANK to line 200 into buffer c
- "dp PUT buffer d after the cursor
- "zP PUT buffer z before the cursor
-
-The contents of a named buffer are lost if:
- 1) you store new text in a buffer with the same name
- or 2) you quit vi (using 'Z''Z' or :q!<RETURN> )
-
->>> Delete this START line into buffer a by typing "add
->>> Paste buffer a by typing "ap
-
->>> Delete this INTERMEDIATE line into buffer b by typing "bdd
->>> Paste buffer b by typing "bp
-
-To put new material into buffer a
->>> Delete this FINAL line into buffer a by typing "add
->>> Paste buffer a by typing "ap
-
-
-SAVING WITHOUT QUITTING
------------------------
-With ZZ you save changes and kill the current buffer. (In vi you also
-exit with 'Z''Z'.) With :w you can save and not quit vi. It is a safe
-practice to save changes to a file regularly. This reduces re-typing
-in the event your computer crashes.
-
- :w<RETURN> WRITE contents of the file (without quitting)
- (type a colon, type w , then press the RETURN key)
-
->>> Try :w now. Note the message at the bottom of the screen.
-
-
-PASTING BETWEEN FILES
----------------------
-
-* EMACS-NOTICE: In Emacs there are no problems editing several
- files. You can however do it in the more complicated vi way below if
- you really want to ;-)
-
-This is an extremely useful procedure in vi. Only one new command is
-required for pasting between files, the EDIT command
-
- :e filename<RETURN> Begin EDITing the file called "filename"
-
-The EDIT command allows you to edit another file without quitting vi.
-This is useful since named buffers are lost when you quit vi.
-
-Let's say you want to copy 6 lines from the file called "3temp" into
-this file which is named "3cutpaste":
-(Note that "3temp" has already been created for you)
-
- 1) WRITE "3cutpaste". vi will not allow :w (press RETURN)
- you to edit another file without first
- saving any changes you've made.
-
- 2) EDIT "3temp" without quitting vi. :e 3temp (press RETURN)
-
- 3) YANK 6 lines from "3temp". "ay6y
-
- 4) Return to "3cutpaste". :e 3cutpaste (press RETURN)
-
- 5) PUT from buffer a "ap
-
-Note that the un-named and numbered buffers are lost when the EDIT
-command is used. Only named buffers are preserved with EDIT.
-
->>> Follow the 5-step procedure outlined above. Don't be concerned
->>> with remembering all 5 steps, the instructions are repeated in
->>> "3temp". Paste the text from "3temp" near this line of this file,
->>> "3cutpaste".
-
-You can use this 5-step procedure on any two files, with any cutting or
-copying action (here, y6y is the example).
-
-
-SUMMARY
--------
-
- #movement repeat movement # times
- * EMACS-NOTICE: You may also use 'r' or 'R' in Viper.
-
- 'd'movement DELETE to where "movement" command specifies
- 'd'#movement DELETE to where the #movement command specifies
- (e.g. 'd''w' 'd''3''w' )
-
- 'y'movement YANK to where "movement" command specifies
- 'y'#movement YANK to where the #movement command specifies
- (e.g. 'y''w' 'y''3''w' )
-
- 'P' (upper p) PUT the contents of the buffer before the cursor
- 'p' (lower p) PUT the contents of the buffer after the cursor
-
- '"'#P (upper p) PUT contents of buffer # before the cursor
- '"'#p (lower p) PUT contents of buffer # after the cursor
- (e.g. '"''2''p' '"''7''P' )
-
- '"'aDELETE DELETE text into buffer a
- '"'aYANK YANK text into buffer a
- '"'aPUT PUT text from named buffer a
- (Note, don't actually type 'DELETE', 'YANK', or 'PUT';
- type one of the DELETE commands, YANK commands, or PUT
- commands, e.g. '"''a''d''}' '"''b''y''3''y' '"''c''y''2''0''0''G' '"''d''p' '"''z''P' )
-
- :w<RETURN> WRITE contents of the file (without quitting)
- (type a colon, type w , then press the RETURN key)
-
- :e filename<RETURN> Begin EDITing the file called "filename"
-
-
-You are now prepared to handle all cutting, copying and pasting tasks
-which may arise. If you practice what you've learned you'll find editing
-in vi to be fast and convenient.
-
-Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved.
diff --git a/emacs.d/nxhtml/etc/viper-tut/4inserting b/emacs.d/nxhtml/etc/viper-tut/4inserting
deleted file mode 100644
index ab2c6a5..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/4inserting
+++ /dev/null
@@ -1,180 +0,0 @@
-Viper tutorial #4: Insertion Techniques
-
-This lesson lasts 5-10 minutes. This tutorial assumes full knowledge
-of tutorial #1, and familiarity with tutorial #2. Lines which begin
-with >>> mark exercises you should try. When you want to exit this
-tutorial type 'Z''Z' .
-
-
-SIMPLE INSERTION
-----------------
-You spend most of your time in vi inserting text. As you might expect,
-there are several commands to begin insertion.
-
- 'o' OPEN a line below the cursor
- 'O' OPEN a line above the cursor
-
- 'i' INSERT starting before the cursor
- 'I' INSERT at the beginning of the line
-
- 'a' APPEND starting after the cursor
- 'A' APPEND at the end of the line
-
-Remember to type ESC to leave insert mode. If you don't have an ESC key
-type C-[ (control [ ).
-
- ESC ESCAPE from insert mode
-
->>> Move the cursor to this line. Type 'O' , enter your name. Press ESC.
->>> Next type 'o' , enter the date. Press ESC.
-
-Note that 'O' opens the line above and puts you in insert mode,
-while 'o' opens the line below and also puts you in insert mode.
-
->>> Type 'a' on any line above, enter your name. Press ESC. Do the
->>> same for 'A'.
-
->>> Read the following. Your goal is to take the sentence fragment below:
-
- BROWN FOX OVER THE SEVEN LAZY
-
->>> and convert it to
-
- THE QUICK BROWN FOX JUMPED OVER THE SEVEN LAZY DOGS.
-
->>> To do this type:
->>> 'I' to insert THE QUICK (then press ESC)
->>> move the cursor to after the X in FOX
->>> 'a' to insert JUMPED (then press ESC)
->>> 'A' to insert DOGS. (then press ESC)
->>> Now move to the sentence fragment and make the changes outlined above.
-
-
-JOINING LINES
--------------
-Often it is convenient to join two short lines into one line. There
-are several ways to do this. The easiest is the J command. Other
-methods will be explored in tutorial #5.
-
- 'J' JOIN two lines
-
->>> Go to the first line in the block below. Type J. Type J again.
-
- Example: NOW IS THE TIME
- the walrus said
- TO THINK OF MANY THINGS
-
-In the event that joining lines creates a line which exceeds the width
-of the screen, you can break the line by typing i and pressing RETURN.
-
-
-SUBSTITUTING TEXT
------------------
-Substituting combines the delete command and the insert command into a
-single step.
-
- #'s' SUBSTITUTE for # characters
- #'S' SUBSTITUTE for # whole lines
-
-
-In order to substitute text you have to know how much text you want to
-delete. Consider the following examples:
-
- '3''s' SUBSTITUTE the next 3 characters for what will be typed
- '7''s' SUBSTITUTE the next 7 characters for what will be typed
-
->>> Change the SAMPLE DEFINITION below. To do this:
->>> move the cursor to the T in TWO
->>> type '3's
->>> type FOUR then press ESC
-
- SAMPLE DEFINITION: A string quartet is defined to be
- a group of TWO musicians.
-
-
-REPLACING TEXT
---------------
-The 'r' and 'R' commands allow you to directly type over existing text.
-
- 'r' REPLACE character (NO need to press ESC)
- 'R' enter over-type mode
-
->>> Correct each of the TYPOs on the sample line below. To do this:
->>> move the cursor to the misspelled character
->>> type 'r'
->>> type the correct character
-
- SAMPLE: maintanence conveniance complience applience dilagent
-
->>> Use the over-type command, 'R' , on the sample line above.
->>> Type 'R' then type the name of a local restaurant. Press ESC.
-
-
-CHANGING TEXT
--------------
-The change command combines insertion, deletion, and the movement
-commands. (Recall that the movement commands were taught in tutorial
-#2.) Change is probably more useful than replace or substitute. The
-general form of the change command is:
-
- 'c'movement CHANGE to where the movement command specifies
-
-Consider the following examples:
-
- 'c''w' CHANGE to the beginning of the next WORD
- 'c''$' CHANGE to the end of the line
- 'c'')' CHANGE to the beginning of the next sentence
- 'c''t'e CHANGE 'TIL the next e
- 'c''3''w' CHANGE the next 3 WORDS
- 'c''c' CHANGE a line (cc is a special case of the c command)
- 'c''}' CHANGE to the end of the paragraph
-
->>> Follow these steps:
->>> 1. move to the desired location in the practice paragraph below
->>> 2. type 'c''w' (change to the beginning of the next WORD)
->>> 3. type your name
->>> 4. press ESC
-
- PRACTICE here. Now is the time for all good users to learn the
- editor. The quick red fox jumped over the seven lazy fish. Now
- is the time for all good users to learn the editor. The quick
- brown computer jumped over the seven lazy users. END PRACTICE
-
->>> Experiment by using a variety of options for step #2. Try
->>> out 'c''$' 'c'')' 'c''t'e 'c''3''w' 'c''c' 'c''}' on the practice paragraph above.
-
-Note that the change command follows the same pattern as the delete
-and yank commands which were explored in tutorial #3.
-
-
-SUMMARY
--------
-
- 'o' OPEN a line below the cursor
- 'O' OPEN a line above the cursor
-
- 'i' INSERT starting before the cursor
- 'I' INSERT at the beginning of the line
-
- 'a' APPEND starting after the cursor
- 'A' APPEND at the end of the line
-
- ESC ESCAPE from insert mode
-
- 'J' JOIN two lines
-
- #'s' SUBSTITUTE for # characters
- #'S' SUBSTITUTE for # whole lines
-
- 'r' REPLACE character (NO need to press ESC)
- 'R' enter over-type mode
-
- 'c'movement CHANGE to where the movement commands specifies
- (e.g. 'c''3''w' 'c''$' 'c''c' )
-
-
-These commands should improve your ability to insert text efficiently.
-The next tutorials deal with advanced commands and tricks which can
-further speed up your editing.
-
-Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved.
diff --git a/emacs.d/nxhtml/etc/viper-tut/5tricks b/emacs.d/nxhtml/etc/viper-tut/5tricks
deleted file mode 100644
index c1e414e..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/5tricks
+++ /dev/null
@@ -1,229 +0,0 @@
-Viper tutorial #5: Tricks and Timesavers
-
-This lesson lasts 10-15 minutes. You should have a strong
-understanding of tutorials #1-3 before working through these timesaving
-techniques. Lines which begin with >>> mark exercises you should
-try. When you want to exit this tutorial type 'Z''Z' .
-
-
-CASE CONVERSION
----------------
-When you want to change an upper-case character to a lower-case
-character (or lower-case to upper-case) there is a single command which
-does both:
-
- '~' (tilde) Convert case of current character
-
->>> Move the cursor to be OVER the first character in the example
->>> line below. Press '~' until you have changed the case of the
->>> entire line. ( '~' will advance to the right automatically).
-
- bOB WENT TO pARIS, fRANCE, TO SEE THE #1 CYCLING EVENT. end.
-
-Note that '~' only affects alphabetic characters.
-
-
-UNDOING
--------
-* EMACS-NOTICE: Uppercase U does the same thing as lowercase u in
- Viper so this part of the tutorial which was about U has been
- removed.
-
-
-REPEAT LAST COMMAND
--------------------
-Often you want to make the same change at multiple locations in the
-file. To help accomplish this, vi remembers your previous action.
-
- '.' (dot) repeat last change
-
->>> Go through the example below changing "FISH" to "TOAD":
->>> Go to the "F" in the first instance of "FISH"
->>> To change the word: type 'c''w' then type TOAD then press ESC
->>> Move the cursor to "F" in the second occurence of "FISH"
->>> Type '.' (dot)
->>> Move the cursor to "F" in the final occurence of "FISH"
->>> Type '.' (dot)
->>> Now move the cursor to each occurence of "CROW"; Type '.' (dot)
-
- EXAMPLE: The FISH fed the cat. The CROW fed the cat. Example
- text is FISH to make interesting. The man fed the CROW. The
- worm fed the FISH. Example text is hard to make CROW. END.
-
->>> Go through the example above deleting all occurences of "TOAD":
->>> Move to the beginning of the EXAMPLE paragraph above.
->>> Type '/''T''O''A''D' and press RETURN (recall tutorial #2)
->>> Delete the word by typing 'd''w'
->>> Type 'n' to move to the next occurence of "TOAD"
->>> Type '.' (dot) to repeat the dw command
->>> Use 'n''.' to delete the remaining "TOAD"s
-
-Note that '.' only repeats changes, not cursor movements.
-
-* EMACS-NOTICE: In Emacs '.' also repeat undo and redo.
-
-* EMACS-NOTICE: Emacs KEYBOARD-MACROS are very powerful for repeating
- whole sequences of keyboard commands.
-
-
-WINDOW ACTIONS
---------------
-You are already familiar with the C-u (depress the control key and
-type u) and C-d commands from tutorial #1.
-
- C-d Move DOWN one half-screen
- C-u Move UP one half-screen
-
-There are several related commands:
-
- C-f Move FORWARD one full-screen
- C-b Move BACKWARD one full-screen
-
- C-e Move the window down one line without moving cursor
- C-y Move the window up one line without moving cursor
-
-The C-e and C-y commands may seem obscure; however, notice that on
-the keyboard, e and y are close to d and u respectively. This
-should help you remember that C-e moves DOWN, and C-y moves UP.
-
-Recall the 'H' 'M' 'L' (HIGH MIDDLE LOW) window commands from Tutorial 2.
-Consider a scenario where you want to yank from the current line to a
-line near the top of the window. You could use C-e and C-y to
-position the text in the window before you use the yH command.
-
-The 'z' command also moves the window without moving your cursor:
-
- 'z'<RETURN> Position the current line to top of window
- 'z''.' Position the current line to middle of window
- 'z''-' Position the current line to bottom of window
-
->>> Move to this line. Type 'z' and press RETURN. Notice that
->>> this text and the cursor have moved to the top of the window.
->>> Try 'z''-' and 'z''.' also.
-
-
-FILE AND DISPLAY CONTROL
-------------------------
-
-* EMACS-NOTICE: In vi C-g shows the status of the current file, but
- C-g in Emacs in most situation stops what Emacs is doing. To get
- information about the current file you can use C-c C-g instead when
- Viper is in vi state.
-
-* EMACS-NOTICE: In vi C-l refreshes the screen, but C-l in Emacs calls
- the command recenter.
-
-
-SUSPENDING VI
--------------
-* EMACS-NOTICE: In vi C-z suspends vi. However in Viper C-z is by
- default the VIPER-TOGGLE-KEY. To suspend or iconify Emacs use C-x
- C-z.
-
-
-BANG COMMAND
-------------
-* EMACS-NOTICE: Emacs has builtin commands to sort etc.
-
-The exclamation point, '!' (aka BANG), command allows you to feed text
-to any Unix command. The output of the Unix command replaces the
-original text. Here is a useful Unix command to use from within vi:
-
- !}fmt Format the paragraph, joining and filling lines to
- produce output lines of up to 72 characters
-
->>> Move to the example paragraph below. Type !}fmt and press
->>> RETURN. Notice the paragraph will be reformatted such that
->>> the lines are of approximately equal length.
-
- EXAMPLE:
- So we grow together,
- Like to a double cherry, seeming parted,
- But yet an union in partition;
- Two lovely berries moulded on one stem;
- So, with two seeming bodies, but one heart;
- END.
-
-Another useful command is:
-
- !}sort Sort lines of a paragraph alphabetically
-
->>> Move to the example text below. Type !}sort and press RETURN.
-
- OBERON king of the fairies.
- PUCK or Robin Goodfellow.
- HERMIA daughter to Egeus, in love with Lysander.
- HELENA in love with Demetrius.
- LYSANDER in love with Hermia.
- DEMETRIUS in love with Hermia.
-
-Remember, any Unix command may be used this way.
-
-
-SHIFTING TEXT
--------------
-It is possible to shift large blocks of text right and left with the '>'
-and '<' commands.
-
- '>'movement Shift right to where the movement command specifies
- '<'movement Shift left to where the movement command specifies
-
-These commands work like the 'd' command. For example:
-
- '>''}' Shift right to the end of the paragraph
- '<''}' Shift left to the end of the paragraph
- '>''>' Shift the current line right
- '<''<' Shift the current line left
-
->>> Move the cursor to the first line of the paragraph below.
->>> Type '>''>' and '<''<' to shift the line back and forth. Next
->>> try '>''}' to shift the paragraph to the right, then '<''}' to shift
->>> it left, then type '.' until all four lines start at the left edge.
-
- THIS IS THE FIRST LINE OF EXAMPLE TEXT
- IS
- EXAMPLE
- TEXT END
-
-
-SUMMARY
--------
-
- '~' (tilde) Convert case of current character
-
- 'U' * EMACS-NOTICE: Same as lowercase u undo in Viper.
-
- '.' (dot) repeat last change
-
- C-d Move DOWN one half-screen
- (depress the control key and type d)
-
- C-u Move UP one half-screen
- (depress the control key and type u)
-
- C-f Move FORWARD one full-screen
- C-b Move BACKWARD one full-screen
-
- C-e Move the window down one line without moving cursor
- C-y Move the window up one line without moving cursor
-
- 'z'<RETURN> Position the current line to top of window
- 'z''.' Position the current line to middle of window
- 'z''-' Position the current line to bottom of window
-
- C-c C-g Show status of current file
- C-l Recenter
-
- '!'}fmt Format the paragraph, joining and filling lines to
- produce output lines of up to 72 characters
-
- '!'}sort Sort lines of a paragraph alphabetically
-
- '>'movement Shift right to where the movement command specifies
- '<'movement Shift left to where the movement command specifies
-
-
-These commands should significantly speed up your editing. Have a nice
-day. Tutorial 6 contains even more nifty commands.
-
-Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved.
diff --git a/emacs.d/nxhtml/etc/viper-tut/README b/emacs.d/nxhtml/etc/viper-tut/README
deleted file mode 100644
index dd39176..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/README
+++ /dev/null
@@ -1,49 +0,0 @@
-Viper Tutorial README
-=====================
-
-To install the Viper tutorial you must do two things:
-
-1) Put viper-tutorial.el in your Emacs load-path.
-
-2) Put the tutorial files (0intro, 1basics etc) in subdirectory to
- where you put viper-tutorial.el with the name viper-tut.
- Optionally you may put those file any where and customize the
- option viper-tut-directory.
-
-The tutorial is started by
-
- M-x viper-tutorial RET
-
-
-
-
-Viper tutorial is based on vilearn version 1.0 which was downloaded
-from http://vilearn.org.
-
-Below is the original readme from vilearn. Note that the only part
-that applies here is the copyright notice.
-
----------------------------------------------------
-This is version 1.0 of vilearn, an interactive vi tutorial.
-
-Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appears in all copies and that
-the copyright notice, this permission notice, and an explicit record of
-any local changes, appear in supporting documentation. This software
-is supplied as is without expressed or implied warranties of any kind.
-
-To install, edit the Makefile and type
-
- make install
-
-We have a mailing list, vilearn-admins@terminator.rs.itd.umich.edu. To
-be added to the list, send mail to vilearn-admins-request. The list is
-intended to discuss the tutorials, coordinate projects relating to
-them, and provide help to those who may need it.
-
-Wesley Craig & Jill Kliger
-1317 Packard Street vilearn@terminator.rs.itd.umich.edu
-Ann Arbor, MI 48104
diff --git a/emacs.d/nxhtml/etc/viper-tut/outline b/emacs.d/nxhtml/etc/viper-tut/outline
deleted file mode 100644
index 9eaa3e4..0000000
--- a/emacs.d/nxhtml/etc/viper-tut/outline
+++ /dev/null
@@ -1,131 +0,0 @@
-
-*
-* tutorial 1 FILENAME: 1basics
-* basics
-*
-
-C-d down
-C-u up
-
-h left
-j down
-k up
-l right
-
-dd delete line
-x x-out character
-
-u undo
-
-:q! force quit
-ZZ good bye
-
-o open
-i insert
-
-*
-* tutorial 2 FILENAME: 2moving
-* objects, finds & marks
-*
-
-w W word
-b B back
-e E end
-
-{ } paragraph
-( ) sentence
-[ ] sections
-
-$ end of line
-^ first non-white
-| column
-0 beginning of line
-
-f F find
-t T to
-; repeat fFtT
-, reverse fFtT
-
-G goto
-
-H high
-M middle
-L low
-
-n N next
-? / regex
-
-% match
-
-' move to marked line
-m mark
-
-
-*
-* tutorial 3 FILENAME: 3cutpaste & 3temp
-*
-* cutting, pasting, buffers, and files
-*
-
-d D deletes
-y Y yank
-p P put
-" buffer
-:e edit
-
-*
-* tutorial 4 FILENAME: 4inserting
-* insertion
-*
-
-a A append
-c C change
-i I insert
-o O open
-r R replace
-s S substitute
-
-J join
-
-*
-* tutorial 5 FILENAME: 5tricks
-* tricks
-*
-
-~ case
-
-u U undo
-
-. do again
-
-C-b back
-C-f forward
-C-e down line
-C-y up line
-z zero
-
-C-g status
-C-l refresh
-
-C-z suspend
-
-C-t pop tag proposed
-C-] follow tag proposed
-
-! command
-
-< > shift
-
-*
-* tutorial 6 PROPOSED
-* commands from hell
-*
-
-: colon commands
-Q quit
-C-r redraw
-@ execute buffer as macro
-& like :&
-
-C-t shift (insert)
-C-d unshift (insert)
diff --git a/emacs.d/nxhtml/nxhtml-base.el b/emacs.d/nxhtml/nxhtml-base.el
deleted file mode 100644
index d768a5e..0000000
--- a/emacs.d/nxhtml/nxhtml-base.el
+++ /dev/null
@@ -1,150 +0,0 @@
-;;; nxhtml-base.el --- The very, very basic vars...
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2010-01-13 Wed
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Things that always must be loaded and that are often necessary when
-;; byte compiling.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(eval-when-compile (require 'web-vcs nil t))
-(eval-when-compile (require 'flymake-js nil t))
-(eval-when-compile (require 'flymake-css nil t))
-(eval-when-compile (require 'flymake-java-1 nil t))
-
-(defconst nxhtml-menu:version "2.08")
-(setq message-log-max t)
-(setq debug-on-error t)
-
-(defconst nxhtml-install-dir
- (file-name-directory (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- "Installation directory for nXhtml.")
-
-(define-minor-mode nxhtml-autoload-web
- "If on download elisp files from web when they are needed.
-If t then during `require' nXhtml elisp files can be downloaded
-from the nXhtml repository on the web. This will currently
-download the development sources, latest version.
-
-Other files that are used by a command may also be downloaded.
-
-Note that files are not updated automatically. You have to use
-`nxhtml-update-existing-files' for that."
- :global t
- ;;:lighter (propertize " nX" 'face 'font-lock-comment-face)
- :lighter " nX"
- :group 'nxhtml)
-
-(defun nxhtml-autoload (fun src &optional docstring interactive type)
- "Generalized `autoload'. May setup autoload from the web.
-If `nxhtml-autoload-web' is t then setup autoloading from the web.
-Otherwise setup for normal local autoloading."
- (if nxhtml-autoload-web
- (progn
- ;; Do not require this until we really need it.
- (require 'web-autoload)
- (web-autoload fun src docstring interactive type))
- (let ((file src))
- (when (listp file)
- (setq file (file-name-nondirectory (nth 2 file))))
- (autoload fun file docstring interactive type))))
-
-;; Fix-me: web autoload defcustoms.
-;;
-;; I have no good idea how to fix this. It looks like I have to
-;; defadvice `custom-load-symbol'. I thought that should not be
-;; necessary since it does (require load) on line 605 but the web
-;; autoload does not start. Why? Hm, you never know since it is inside
-;; a (condition-case nil ...).
-;;
-;; Ah, found it. The require is only done if custom loads contains a
-;; symbol, not a string. So I changed this to a symbol instead in
-;; nxhtml-loaddefs.el. Maybe `load' instead of `require' should be
-;; advised?
-
-;; What a hell is this below? Have things been rewritten in custom or
-;; did I mix somethintg?
-(defun nxhtml-custom-autoload (symbol load &optional noset)
- "Like `custom-autoload', but also run :set for defcustoms etc."
- ;; Fix-me: is-boundp is currently always t because of the order in
- ;; loaddefs. Hm, so this worked just by chance...
- (let* ((is-boundp (prog1 (boundp symbol)
- (custom-autoload symbol load noset)))
- (standard (get symbol 'standard-value))
- (saved (get symbol 'saved-value))
- ;; Fix-me: property custom-set etc are not available
- (custom-set (get symbol 'custom-set))
- (custom-initialize (get symbol 'custom-initialize))
- (set (or custom-set 'custom-set-default))) ;; Fix-me: initialize
- (setq custom-set t) ;; Not available here
- (when (or custom-initialize
- (and saved
- (not (equal (car saved) (symbol-value symbol)))
- custom-set))
- (funcall set symbol (car saved))
- (custom-load-symbol symbol))))
-
-(defun flymake-init-load-flymakemsg ()
- (require 'flymakemsg))
-
-(define-minor-mode nxhtml-flymake-setup
- "Let nXhtml add some addtions to flymake.
-This adds support for CSS and JavaScript files.
-
-It also adds showing of errors in minibuffer when point is on
-them.
-
-If you turn this off you must restart Emacs for it to take
-effect."
- :group 'nxhtml
- :group 'flymake
- (when nxhtml-flymake-setup
- (flymake-js-load)
- (flymake-css-load)
- (flymake-java-1-load)
- (add-hook 'flymake-mode-hook 'flymake-init-load-flymakemsg)))
-
-
-(provide 'nxhtml-base)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-base.el ends here
diff --git a/emacs.d/nxhtml/nxhtml-loaddefs.el b/emacs.d/nxhtml/nxhtml-loaddefs.el
deleted file mode 100644
index 6ec7284..0000000
--- a/emacs.d/nxhtml/nxhtml-loaddefs.el
+++ /dev/null
@@ -1,4502 +0,0 @@
-;; Autoloads for nXthml
-;;
-;; This file should be updated by `nxhtmlmaint-get-file-autoloads',
-;; `nxhtmlmaint-get-dir-autoloads' or `nxhtmlmaint-get-all-autoloads'.
-(eval-when-compile (require 'nxhtml-base))
-(eval-when-compile (require 'web-vcs))
-
-;;;### (autoloads (html-chklnk) "../../../../../.emacs.d/nxhtml/nxhtml/html-chklnk"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-chklnk.el" (19364
-;;;;;; 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-chklnk.el
-(web-autoload-require 'html-chklnk 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-chklnk 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" loads) nil (put 'html-chklnk 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" loads))))
-
-;;;***
-
-;;;### (autoloads (html-pagetoc-rebuild-toc html-pagetoc-insert-toc
-;;;;;; html-pagetoc) "../../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc.el" (19364
-;;;;;; 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc.el
-(web-autoload-require 'html-pagetoc 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-pagetoc 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" loads) nil (put 'html-pagetoc 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" loads))))
-
-(nxhtml-autoload 'html-pagetoc-insert-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" nxhtml-install-dir) "\
-Inserts a table of contents for the current html file.
-The html header tags h1-h6 found in the file are inserted into
-this table. MIN-LEVEL and MAX-LEVEL specifies the minimum and
-maximum level of h1-h6 to include. They should be integers.
-
-\(fn &optional MIN-LEVEL MAX-LEVEL)" t nil)
-
-(nxhtml-autoload 'html-pagetoc-rebuild-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" nxhtml-install-dir) "\
-Update the table of contents inserted by `html-pagetoc-insert-toc'.
-
-\(fn)" t nil)
-
-(defconst html-pagetoc-menu-map (let ((map (make-sparse-keymap))) (define-key map [html-pagetoc-rebuild-toc] (list 'menu-item "Update Page TOC" 'html-pagetoc-rebuild-toc)) (define-key map [html-pagetoc-insert-style-guide] (list 'menu-item "Insert CSS Style for Page TOC" 'html-pagetoc-insert-style-guide)) (define-key map [html-pagetoc-insert-toc] (list 'menu-item "Insert Page TOC" 'html-pagetoc-insert-toc)) map))
-
-;;;***
-
-;;;### (autoloads (html-site-query-replace html-site-rgrep html-site-find-file
-;;;;;; html-site-dired-current html-site-set-site html-site-buffer-or-dired-file-name
-;;;;;; html-site) "../../../../../.emacs.d/nxhtml/nxhtml/html-site"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-site.el" (19364
-;;;;;; 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-site.el
-(web-autoload-require 'html-site 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-site 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-site" loads) nil (put 'html-site 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-site" loads))))
-
-(nxhtml-autoload 'html-site-buffer-or-dired-file-name `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\
-Return buffer file name or file pointed to in dired.
-
-\(fn)" nil nil)
-
-(nxhtml-autoload 'html-site-set-site `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\
-Not documented
-
-\(fn NAME)" t nil)
-
-(nxhtml-autoload 'html-site-dired-current `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\
-Open `dired' in current site top directory.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'html-site-find-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\
-Find file in current site.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'html-site-rgrep `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\
-Search current site's files with `rgrep'.
-See `rgrep' for the arguments REGEXP and FILES.
-
-\(fn REGEXP FILES)" t nil)
-
-(nxhtml-autoload 'html-site-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\
-Query replace in current site's files.
-
-\(fn FROM TO FILE-REGEXP DELIMITED)" t nil)
-
-;;;***
-
-;;;### (autoloads (html-toc) "../../../../../.emacs.d/nxhtml/nxhtml/html-toc"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-toc.el" (19364 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-toc.el
-(web-autoload-require 'html-toc 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-toc" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-toc 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-toc" loads) nil (put 'html-toc 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-toc" loads))))
-
-(defconst html-toc-menu-map (let ((map (make-sparse-keymap))) (define-key map [html-toc-browse-frames-file] (list 'menu-item "Browse Frames File" 'html-toc-browse-frames-file)) (define-key map [html-toc-write-frames-file] (list 'menu-item "Write Frames File" 'html-toc-write-frames-file)) (define-key map [html-toc-write-toc-file] (list 'menu-item "Write TOC File for Frames" 'html-toc-write-toc-file)) (define-key map [html-toc-sep1] (list 'menu-item "--")) (define-key map [html-toc-edit-pages-file] (list 'menu-item "Edit List of Pages for TOC" 'html-site-edit-pages-file)) (define-key map [html-toc-create-pages-file] (list 'menu-item "Write List of Pages for TOC" 'html-toc-create-pages-file)) map))
-
-;;;***
-
-;;;### (autoloads (html-upl-ediff-file html-upl-edit-remote-file-with-toc
-;;;;;; html-upl-edit-remote-file html-upl-upload-file html-upl-remote-dired
-;;;;;; html-upl-upload-site html-upl-upload-site-with-toc html-upl)
-;;;;;; "../../../../../.emacs.d/nxhtml/nxhtml/html-upl" "../../../../.emacs.d/nxhtml/nxhtml/html-upl.el"
-;;;;;; (19364 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-upl.el
-(web-autoload-require 'html-upl 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-upl 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-upl" loads) nil (put 'html-upl 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-upl" loads))))
-
-(nxhtml-autoload 'html-upl-upload-site-with-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'html-upl-upload-site `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'html-upl-remote-dired `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Start dired for remote directory or its parent/ancestor.
-
-\(fn DIRNAME)" t nil)
-
-(nxhtml-autoload 'html-upl-upload-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Upload a single file in a site.
-For the definition of a site see `html-site-current'.
-
-\(fn FILENAME)" t nil)
-
-(nxhtml-autoload 'html-upl-edit-remote-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'html-upl-edit-remote-file-with-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'html-upl-ediff-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\
-Run ediff on local and remote file.
-FILENAME could be either the remote or the local file.
-
-\(fn FILENAME)" t nil)
-
-;;;***
-
-;;;### (autoloads (html-wtoc) "../../../../../.emacs.d/nxhtml/nxhtml/html-wtoc"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-wtoc.el" (19364
-;;;;;; 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-wtoc.el
-(web-autoload-require 'html-wtoc 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-wtoc 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" loads) nil (put 'html-wtoc 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" loads))))
-
-;;;***
-
-;;;### (autoloads (nxhtml-features-check nxhtml-customize nxhtml)
-;;;;;; "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml" "../../../../.emacs.d/nxhtml/nxhtml/nxhtml.el"
-;;;;;; (19412 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml.el
-(web-autoload-require 'nxhtml 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'nxhtml 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/nxhtml" loads) nil (put 'nxhtml 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/nxhtml" loads))))
-
-(nxhtml-autoload 'nxhtml-customize `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml" nxhtml-install-dir) "\
-Customize nXhtml.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'nxhtml-features-check `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml" nxhtml-install-dir) "\
-Check if external modules used by nXhtml are found.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (nxhtml-report-bug) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug.el" (19278
-;;;;;; 3420))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug.el
-(web-autoload-require 'nxhtml-bug 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtml-report-bug `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug" nxhtml-install-dir) "\
-Report a bug in nXhtml.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (nxhtml-overview nxhtml-menu-mode nxhtml-browse-region
-;;;;;; nxhtml-browse-file nxhtml-edit-with-gimp) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu.el" (19412
-;;;;;; 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu.el
-(web-autoload-require 'nxhtml-menu 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtml-edit-with-gimp `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\
-Edit with GIMP buffer or file at point.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'nxhtml-browse-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\
-View file in web browser.
-
-\(fn FILE)" t nil)
-
-(nxhtml-autoload 'nxhtml-browse-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\
-View region in web browser.
-
-\(fn)" t nil)
-
-(defvar nxhtml-menu-mode nil "\
-Non-nil if Nxhtml-Menu mode is enabled.
-See the command `nxhtml-menu-mode' for a description of this minor mode.")
-
-(nxhtml-custom-autoload 'nxhtml-menu-mode '../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu nil)
-
-(nxhtml-autoload 'nxhtml-menu-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\
-Minor mode to turn on some key and menu bindings.
-See `nxhtml-mode' for more information.
-
-This minor mode adds the entry 'nXhtml' to the menu bar. This
-submenu gives easy access to most of the important features of
-nXhtml.
-
-To see an (incomplete) overview in html format do
-\\[nxhtml-overview].
-
-* Note: Please observe that when loading nXhtml some file
- associations are done, see `nxhtml-setup-file-assoc'.
-
-Here are some important features:
-
-- multiple major modes, see `define-mumamo-multi-major-mode'
-- easy uploading and viewing of files, see for example
- `html-upl-upload-file'
-
-- validation in XHTML part for php etc, see
- `nxhtml-validation-header-mode' (you probably also want to know
- about `nxhtml-toggle-visible-warnings' for this!)
-
-- converting of html to xhtml, see `tidy-buffer'
-
-Some smaller, useful, but easy-to-miss features:
-
-* Following links. The href and src attribute names are
- underlined and a special keymap is bound to
- them:\\<mlinks-mode-map>
-
- \\[mlinks-backward-link], \\[mlinks-forward-link] Move
- between underlined href/src attributes
-
- \\[mlinks-goto], Mouse-1 Follow link inside Emacs
- (if possible)
-
- It is even a little bit quicker when the links are in an active
- state (marked with the face `isearch'):\\<mlinks-active-hilight-keymap>
-
- \\[mlinks-backward-link], \\[mlinks-forward-link] Move
- between underlined href/src attributes
- \\[mlinks-goto], Mouse-1 Follow link inside Emacs (if possible)
-
- If the link is not into a file that you can edit (a mailto link
- for example) you will be prompted for an alternative action.
-
-* Creating links. To make it easier to create links to id/name
- attribute in different files there are two special
- functions:\\<nxhtml-mode-map>
-
- \\[nxhtml-save-link-to-here] copy link to id/name (you must
- be in the tag to get the link)
- \\[nxhtml-paste-link-as-a-tag] paste this as an a-tag.
-
-This minor mode also adds some bindings:
-
-\\{nxhtml-menu-mode-map}
-
----------
-* Note: Some of the features supported are optional and available
- only if other Emacs modules are found. Use
- \\[nxhtml-features-check] to get a list of these optional
- features and modules needed. You should however have no problem
- with this if you have followed the installation instructions
- for nXhtml.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'nxhtml-overview `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\
-Show a HTML page with an overview of nXhtml.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (nxhtml-validation-header-mode nxhtml-short-tag-help
-;;;;;; nxhtml-mode) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode.el" (19412
-;;;;;; 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode.el
-(web-autoload-require 'nxhtml-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(when (fboundp 'nxml-mode)
-(nxhtml-autoload 'nxhtml-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir) "\
-Major mode for editing XHTML documents.
-It is based on `nxml-mode' and adds some features that are useful
-when editing XHTML files.\\<nxhtml-mode-map>
-
-The XML menu contains functionality added by `nxml-mode' (on
-which this major mode is based). There is also a popup menu
-added to the [apps] key.
-
-The most important features are probably completion and
-validation, which is inherited from `nxml-mode' with some small
-addtions. In very many situation you can use completion. To
-access it type \\[nxml-complete]. Completion has been enhanced in
-the following way:
-
-- If region is active and visible then completion will surround the
- region with the chosen tag's start and end tag. However only the
- starting point is checked for validity. If something is wrong after
- insertion you will however immediately see it if you have validation
- on.
-- It can in some cases give assistance with attribute values.
-- Completion can be customized, see the menus XHTML - Completion:
- * You can use a menu popup style completion.
- * You can have alternatives grouped.
- * You can get a short help text shown for each alternative.
-- There does not have to be a '<' before point for tag name
- completion. (`nxml-mode' requires a '<' before point for tag name
- completion.)
-- Completes xml version and encoding.
-- Completes in an empty buffer, ie inserts a skeleton.
-
-Here are all key bindings in nxhtml-mode itself:
-
-\\{nxhtml-mode-map}
-
-Notice that other minor mode key bindings may also be active, as
-well as emulation modes. Do \\[describe-bindings] to get a list
-of all active key bindings. Also, *VERY IMPORTANT*, if mumamo is
-used in the buffer each mumamo chunk has a different major mode
-with different key bindings. You can however still see all
-bindings with \\[describe-bindings], but you have to do that with
-point in the mumamo chunk you want to know the key bindings in.
-
-\(fn)" t nil))
-
-(nxhtml-autoload 'nxhtml-short-tag-help `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir) "\
-Display description of tag TAG. If TAG is omitted, try tag at point.
-
-\(fn TAG)" t nil)
-
-(when (fboundp 'nxml-mode)
-(nxhtml-autoload 'nxhtml-validation-header-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir) "\
-If on use a Fictive XHTML Validation Header for the buffer.
-See `nxhtml-set-validation-header' for information about Fictive XHTML Validation Headers.
-
-This mode may be turned on automatically in two ways:
-- If you try to do completion of a XHTML tag or attribute then
- `nxthml-mode' may ask you if you want to turn this mode on if
- needed.
-- You can also choose to have it turned on automatically whenever
- a mumamo multi major mode is used, see
- `nxhtml-validation-header-if-mumamo' for further information.
-
-\(fn &optional ARG)" t nil))
-
-;;;***
-
-;;;### (autoloads (mako-nxhtml-mumamo-mode asp-nxhtml-mumamo-mode
-;;;;;; eruby-nxhtml-mumamo-mode jsp-nxhtml-mumamo-mode gsp-nxhtml-mumamo-mode
-;;;;;; smarty-nxhtml-mumamo-mode mjt-nxhtml-mumamo-mode genshi-nxhtml-mumamo-mode
-;;;;;; mason-nxhtml-mumamo-mode django-nxhtml-mumamo-mode embperl-nxhtml-mumamo-mode
-;;;;;; nxhtml-mumamo-mode) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el" (19390
-;;;;;; 29616))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el
-(web-autoload-require 'nxhtml-mumamo 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for (X)HTML with main mode `nxhtml-mode'.
-This covers inlined style and javascript and PHP.
-
-See also `mumamo-alt-php-tags-mode'." t)
-
-(nxhtml-autoload 'embperl-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for Embperl files with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'django-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for Django with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'mason-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for Mason using main mode `nxhtml-mode'.
-This covers inlined style and javascript." t)
-
-(nxhtml-autoload 'genshi-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for Genshi with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'mjt-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for MJT with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'smarty-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for Smarty with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'gsp-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for GSP with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'jsp-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for JSP with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'eruby-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for eRuby with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'asp-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for ASP with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'mako-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes for Mako with main mode `nxhtml-mode'.
-This also covers inlined style and javascript." t)
-
-;;;***
-
-;;;### (autoloads (nxml-where-global-mode nxml-where-mode nxml-where)
-;;;;;; "../../../../../.emacs.d/nxhtml/nxhtml/nxml-where" "../../../../.emacs.d/nxhtml/nxhtml/nxml-where.el"
-;;;;;; (19365 37362))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxml-where.el
-(web-autoload-require 'nxml-where 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxml-where" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'nxml-where 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/nxml-where" loads) nil (put 'nxml-where 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/nxml-where" loads))))
-
-(nxhtml-autoload 'nxml-where-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxml-where" nxhtml-install-dir) "\
-Shows path in mode line.
-
-\(fn &optional ARG)" t nil)
-
-(defvar nxml-where-global-mode nil "\
-Non-nil if Nxml-Where-Global mode is enabled.
-See the command `nxml-where-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `nxml-where-global-mode'.")
-
-(nxhtml-custom-autoload 'nxml-where-global-mode '../../../../../.emacs.d/nxhtml/nxhtml/nxml-where nil)
-
-(nxhtml-autoload 'nxml-where-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxml-where" nxhtml-install-dir) "\
-Toggle Nxml-Where mode in every possible buffer.
-With prefix ARG, turn Nxml-Where-Global mode on if and only if
-ARG is positive.
-Nxml-Where mode is enabled in all buffers where
-`nxml-where-turn-on-in-nxml-child' would do it.
-See `nxml-where-mode' for more information on Nxml-Where mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (rngalt-set-validation-header) "../../../../../.emacs.d/nxhtml/nxhtml/rngalt"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/rngalt.el" (19365 37362))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/rngalt.el
-(web-autoload-require 'rngalt 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/rngalt" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'rngalt-set-validation-header `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/rngalt" nxhtml-install-dir) "\
-Not documented
-
-\(fn START-OF-DOC)" nil nil)
-
-;;;***
-
-;;;### (autoloads (tidy-build-menu tidy) "../../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml.el" (19364
-;;;;;; 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml.el
-(web-autoload-require 'tidy-xhtml 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'tidy 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" loads) nil (put 'tidy 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" loads))))
-
-(nxhtml-autoload 'tidy-build-menu `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" nxhtml-install-dir) "\
-Set up the tidy menu in MAP.
-Used to set up a Tidy menu in your favourite mode.
-
-\(fn &optional MAP)" t nil)
-
-;;;***
-
-;;;### (autoloads (xhtml-help xhtml-help-show-tag-ref xhtml-help-tag-at-point
-;;;;;; xhtml-help-show-css-ref) "../../../../../.emacs.d/nxhtml/nxhtml/xhtml-help"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help.el" (19364
-;;;;;; 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/xhtml-help.el
-(web-autoload-require 'xhtml-help 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'xhtml-help-show-css-ref `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir) "\
-Show CSS reference for CSS property name at point.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'xhtml-help-tag-at-point `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir) "\
-Get xhtml tag name at or before point.
-
-\(fn)" nil nil)
-
-(nxhtml-autoload 'xhtml-help-show-tag-ref `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir) "\
-Show xhtml reference for tag name at or before point.
-
-\(fn)" t nil)
-
-(let ((loads (get 'xhtml-help 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" loads) nil (put 'xhtml-help 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" loads))))
-
-;;;***
-
-;;;### (autoloads (nxhtmlmaint-byte-uncompile-all nxhtmlmaint-byte-recompile
-;;;;;; nxhtmlmaint-start-byte-compilation) "../../../../../.emacs.d/nxhtml/nxhtmlmaint"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtmlmaint.el" (19378 49412))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtmlmaint.el
-(web-autoload-require 'nxhtmlmaint 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtmlmaint-start-byte-compilation `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir) "\
-Start byte compilation of nXhtml in new Emacs instance.
-Byte compiling in general makes elisp code run 5-10 times faster
-which is quite noticeable when you use nXhtml.
-
-This will also update the file nxhtml-loaddefs.el.
-
-You must restart Emacs to use the byte compiled files.
-
-If for some reason the byte compiled files does not work you can
-remove then with `nxhtmlmaint-byte-uncompile-all'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'nxhtmlmaint-byte-recompile `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir) "\
-Recompile or compile all nXhtml files in current Emacs.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'nxhtmlmaint-byte-uncompile-all `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir) "\
-Delete byte compiled files in nXhtml.
-This will also update the file nxhtml-loaddefs.el.
-
-See `nxhtmlmaint-start-byte-compilation' for byte compiling.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (csharp-mode csharp-mode-hook) "../../../../../.emacs.d/nxhtml/related/csharp-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/csharp-mode.el" (19412
-;;;;;; 27328))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/csharp-mode.el
-(web-autoload-require 'csharp-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/csharp-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode))
-
-(defvar csharp-mode-hook nil "\
-*Hook called by `csharp-mode'.")
-
-(nxhtml-custom-autoload 'csharp-mode-hook '../../../../../.emacs.d/nxhtml/related/csharp-mode t)
-
-(nxhtml-autoload 'csharp-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/csharp-mode" nxhtml-install-dir) "\
-Major mode for editing C# code. This mode is derived from CC Mode to
-support C#.
-
-The hook `c-mode-common-hook' is run with no args at mode
-initialization, then `csharp-mode-hook'.
-
-This mode will automatically add a regexp for Csc.exe error and warning
-messages to the `compilation-error-regexp-alist'.
-
-Key bindings:
-\\{csharp-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (django-mode) "../../../../../.emacs.d/nxhtml/related/django"
-;;;;;; "../../../../.emacs.d/nxhtml/related/django.el" (19411 8712))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/django.el
-(web-autoload-require 'django 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/django" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'django-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/django" nxhtml-install-dir) "\
-Simple Django mode for use with mumamo.
-This mode only provides syntax highlighting.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (flymake-css-load) "../../../../../.emacs.d/nxhtml/related/flymake-css"
-;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-css.el" (19292
-;;;;;; 15280))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/flymake-css.el
-(web-autoload-require 'flymake-css 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-css" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'flymake-css-load `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-css" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" nil nil)
-
-;;;***
-
-;;;### (autoloads (flymake-java-1-load) "../../../../../.emacs.d/nxhtml/related/flymake-java-1"
-;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-java-1.el" (19264
-;;;;;; 30606))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/flymake-java-1.el
-(web-autoload-require 'flymake-java-1 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-java-1" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'flymake-java-1-load `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-java-1" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" nil nil)
-
-;;;***
-
-;;;### (autoloads (flymake-js-load flymake-js) "../../../../../.emacs.d/nxhtml/related/flymake-js"
-;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-js.el" (19218
-;;;;;; 45782))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/flymake-js.el
-(web-autoload-require 'flymake-js 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-js" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'flymake-js 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/related/flymake-js" loads) nil (put 'flymake-js 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/related/flymake-js" loads))))
-
-(nxhtml-autoload 'flymake-js-load `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-js" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" nil nil)
-
-;;;***
-
-;;;### (autoloads (iss-mode) "../../../../../.emacs.d/nxhtml/related/iss-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/iss-mode.el" (19294
-;;;;;; 57644))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/iss-mode.el
-(web-autoload-require 'iss-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'iss-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mode" nxhtml-install-dir) "\
-Major mode for editing InnoSetup script files. Upon startup iss-mode-hook is run.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (iss-mumamo-mode) "../../../../../.emacs.d/nxhtml/related/iss-mumamo"
-;;;;;; "../../../../.emacs.d/nxhtml/related/iss-mumamo.el" (19294
-;;;;;; 57644))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/iss-mumamo.el
-(web-autoload-require 'iss-mumamo 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'iss-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mumamo" nxhtml-install-dir) "\
-Turn on multiple major modes Inno Setup .iss files.
-The main major mode will be `iss-mode'.
-The [code] section, if any, will be in `pascal-mode'." t)
-
-;;;***
-
-;;;### (autoloads (inferior-moz-mode moz-minor-mode) "../../../../../.emacs.d/nxhtml/related/moz"
-;;;;;; "../../../../.emacs.d/nxhtml/related/moz.el" (19048 2104))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/moz.el
-(web-autoload-require 'moz 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/moz" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'moz-minor-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/moz" nxhtml-install-dir) "\
-MozRepl minor mode for interaction with Firefox.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
-
-When this minor mode is enabled, some commands become available
-to send current code area (as understood by c-mark-function) or
-region or buffer to an inferior MozRepl process (which will be
-started as needed).
-
-The following keys are bound in this minor mode:
-
-\\{moz-minor-mode-map}
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'inferior-moz-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/moz" nxhtml-install-dir) "\
-Major mode for interacting with Firefox via MozRepl.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (global-mozadd-mirror-mode mozadd-mirror-mode global-mozadd-refresh-edited-on-save-mode
-;;;;;; mozadd-refresh-edited-on-save-mode) "../../../../../.emacs.d/nxhtml/related/mozadd"
-;;;;;; "../../../../.emacs.d/nxhtml/related/mozadd.el" (19235 5252))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/mozadd.el
-(web-autoload-require 'mozadd 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'mozadd-refresh-edited-on-save-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\
-Refresh mozadd edited file in Firefox when saving file.
-The mozadd edited file is the file in the last buffer visited in
-`mozadd-mirror-mode'.
-
-You can use this for example when you edit CSS files.
-
-The mozadd edited file must be shown in Firefox and visible.
-
-\(fn &optional ARG)" t nil)
-
-(defvar global-mozadd-refresh-edited-on-save-mode nil "\
-Non-nil if Global-Mozadd-Refresh-Edited-On-Save mode is enabled.
-See the command `global-mozadd-refresh-edited-on-save-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `global-mozadd-refresh-edited-on-save-mode'.")
-
-(nxhtml-custom-autoload 'global-mozadd-refresh-edited-on-save-mode '../../../../../.emacs.d/nxhtml/related/mozadd nil)
-
-(nxhtml-autoload 'global-mozadd-refresh-edited-on-save-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\
-Toggle Mozadd-Refresh-Edited-On-Save mode in every possible buffer.
-With prefix ARG, turn Global-Mozadd-Refresh-Edited-On-Save mode on if and only if
-ARG is positive.
-Mozadd-Refresh-Edited-On-Save mode is enabled in all buffers where
-`(lambda nil (when (or (derived-mode-p (quote css-mode)) (mozadd-html-buffer-file-p)) (mozadd-refresh-edited-on-save-mode 1)))' would do it.
-See `mozadd-refresh-edited-on-save-mode' for more information on Mozadd-Refresh-Edited-On-Save mode.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'mozadd-mirror-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\
-Mirror content of current file buffer immediately in Firefox.
-When you turn on this mode the file will be opened in Firefox.
-Every change you make in the buffer will trigger a redraw in
-Firefox - regardless of if you save the file or not.
-
-For the mirroring to work the edited file must be shown in
-Firefox and visible.
-
-If `nxml-where-mode' is on the marks will also be shown in
-Firefox as CSS outline style. You can customize the style
-through the option `mozadd-xml-path-outline-style'.
-
-See also `mozadd-refresh-edited-on-save-mode'.
-
-\(fn &optional ARG)" t nil)
-
-(defvar global-mozadd-mirror-mode nil "\
-Non-nil if Global-Mozadd-Mirror mode is enabled.
-See the command `global-mozadd-mirror-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `global-mozadd-mirror-mode'.")
-
-(nxhtml-custom-autoload 'global-mozadd-mirror-mode '../../../../../.emacs.d/nxhtml/related/mozadd nil)
-
-(nxhtml-autoload 'global-mozadd-mirror-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\
-Toggle Mozadd-Mirror mode in every possible buffer.
-With prefix ARG, turn Global-Mozadd-Mirror mode on if and only if
-ARG is positive.
-Mozadd-Mirror mode is enabled in all buffers where
-`(lambda nil (when (mozadd-html-buffer-file-p) (mozadd-mirror-mode 1)))' would do it.
-See `mozadd-mirror-mode' for more information on Mozadd-Mirror mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (php-mode php-file-patterns php) "../../../../../.emacs.d/nxhtml/related/php-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/php-mode.el" (19218
-;;;;;; 45782))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/php-mode.el
-(web-autoload-require 'php-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/php-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'php 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/related/php-mode" loads) nil (put 'php 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/related/php-mode" loads))))
-
-(defvar php-file-patterns '("\\.php[s34]?\\'" "\\.phtml\\'" "\\.inc\\'") "\
-List of file patterns for which to automatically invoke `php-mode'.")
-
-(nxhtml-custom-autoload 'php-file-patterns '../../../../../.emacs.d/nxhtml/related/php-mode nil)
-
-(nxhtml-autoload 'php-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/php-mode" nxhtml-install-dir) "\
-Major mode for editing PHP code.
-
-\\{php-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (smarty-mode smarty) "../../../../../.emacs.d/nxhtml/related/smarty-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/smarty-mode.el" (19235
-;;;;;; 5252))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/smarty-mode.el
-(web-autoload-require 'smarty-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/smarty-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'smarty 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/related/smarty-mode" loads) nil (put 'smarty 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/related/smarty-mode" loads))))
-
-(nxhtml-autoload 'smarty-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/smarty-mode" nxhtml-install-dir) "\
-Smarty Mode
-***********
-
-Smarty Mode is a GNU XEmacs major mode for editing Smarty templates.
-
-1 Introduction
-**************
-
-Smarty-Mode is a mode allowing easy edit of Smarty templates:
-highlight, templates, navigation into source files...
-
-
-
-Features (new features in bold) :
-
- * Completion
-
- * Customizable
-
- * Highlight
-
- * Menu
-
- * Stuttering
-
- * Templates
- - Built-in Functions
-
- - User Functions
-
- - Variable Modifiers
-
- - Plugin (Functions)
- * BlockRepeatPlugin
-
- * ClipCache
-
- * Smarty Formtool
-
- * Smarty Paginate
-
- * Smarty Validate
-
- - Plugin (Variable Modifiers)
- * AlternativeDateModifierPlugin
-
- * B2Smilies
-
- * BBCodePlugin
-
- - Fonctions Non-Smarty
-
-
-
-This manual describes Smarty Mode version 0.0.5.
-
-2 Installation
-**************
-
-2.1 Requirements
-================
-
-Smarty Mode is a XEmacs major mode that needs the following
-software/packages:
-
- * XEmacs (http://www.xemacs.org/).
-
- * `font-lock' mode generaly installed with XEmacs.
-
- * `assoc' mode generaly installed with XEmacs.
-
- * `easymenu' mode generaly installed with XEmacs.
-
- * `hippie-exp' mode generaly installed with XEmacs.
-
-Before continuing, you must be sure to have all this packages
-installed.
-
-2.2 Download
-============
-
-Two internet address to download Smarty Mode :
-
- * Principal: Smarty-Mode 0.0.5
- (http://deboutv.free.fr/lisp/smarty/download/smarty-0.0.5.tar.gz)
- (http://deboutv.free.fr/lisp/smarty/)
-
- * Secondary: Smarty-Mode 0.0.5
- (http://www.morinie.fr/lisp/smarty/download/smarty-0.0.5.tar.gz)
- (http://www.morinie.fr/lisp/smarty/)
-
- * Old releases: Smarty-Mode
- (http://deboutv.free.fr/lisp/smarty/download.php)
- (http://deboutv.free.fr/lisp/smarty/)
-
-2.3 Installation
-================
-
-2.3.1 Installation
-------------------
-
-To install Smarty Mode you need to choose an installation directory
-\(for example `/usr/local/share/lisp' or `c:lisp'). The administrator
-must have the write rights on this directory.
-
-With your favorite unzip software, unzip the archive in the
-installation directory.
-
-Example:
- cd /usr/local/share/lisp
- tar zxvf smarty-0.0.5.tar.gz
-Now you have a `smarty' directory in the installation directory. This
-directory contains 2 files `smarty-mode.el' and `smarty-mode.elc' and
-another directory `docs' containing the documentation.
-
-You need to configure XEmacs. open you initialization file `init.el'
-\(open the file or start XEmacs then choose the Options menu and Edit
-Init File). Add the following lines (the installation directory in
-this example is `/usr/local/share/lisp') :
-
- (setq load-path
- (append (list \"/usr/local/share/lisp/\") load-path))
- (nxhtml-autoload 'smarty-mode \"smarty-mode\" \"Smarty Mode\" t)
-
-2.3.2 Update
-------------
-
-The update is easy. You need to unzip the archive in the installation
-directory to remove the old release.
-
-Example:
- cd /usr/local/share/lisp
- rm -rf smarty
- tar zxvf smarty-0.0.5.tar.gz
-
-2.4 Invoke Smarty-Mode
-======================
-
-You have two possibilities to invoke the Smarty Mode.
-
- - Manually: At each file opening you need to launch Smarty Mode
- with the following command:
-
- `M-x smarty-mode'
-
- - Automatically: Add the following linesin your initialization
- file `init.el' :
-
- (setq auto-mode-alist
- (append
- '((\"\\.tpl$\" . smarty-mode))
- auto-mode-alist))
-
-
-3 Customization
-***************
-
-This chapter describes the differents parameters and functions that
-you can change to customize Smarty Mode. To do that, open a Smarty
-file, click on the Smarty menu and choose Options then Browse
-Options....
-
-3.1 Parameters
-==============
-
-3.1.1 Mode
-----------
-
-Smarty Mode has 2 modes allowing to simplify the writing of Smarty
-templates. You can enable/disable each mode individually.
-
-`smarty-electric-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable automatic generation of template.
- If `nil'; template generators can still be invoked through key
- bindings and menu. Is indicated in the modeline by \"/e\" after
- the mode name and can be toggled by `smarty-electric-mode'.
-
-`smarty-stutter-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable the stuttering. Is indicated in the
- modeline by \"/s\" after the mode name and can be toggled by
- `smarty-stutter-mode'.
-
-3.1.2 Menu
-----------
-
-Smarty Mode has also 1 menu that you can enable/disable. The menu
-Sources is specific to each Smarty files opened.
-
-`smarty-source-file-menu'
- Type: boolean
- Default value: `t'
- Description: If `t'; the Sources menu is enabled. This menu
- contains the list of Smarty file located in the current
- directory. The Sources menu scans the directory when a file is
- opened.
-
-3.1.3 Menu
-----------
-
-`smarty-highlight-plugin-functions'
- Type: boolean
- Default value: `t'
- Description: If `t'; the functions described in the smarty
- plugins are highlighted.
-
-3.1.4 Templates
----------------
-
-3.1.4.1 Header
-..............
-
-`smarty-file-header'
- Type: string
- Default value: `\"\"'
- Description: String or file to insert as file header. If the
- string specifies an existing file name the contents of the file
- is inserted; otherwise the string itself is inserted as file
- header.
- Type `C-j' for newlines.
- The follonwing keywords are supported:
- <filename>: replaced by the file name.
- <author>: replaced by the user name and email address.
- <login>: replaced by `user-login-name'.
- <company>: replaced by `smarty-company-name' content.
- <date>: replaced by the current date.
- <year>: replaced by the current year.
- <copyright>: replaced by `smarty-copyright-string' content.
- <cursor>: final cursor position.
-
-`smarty-file-footer'
- Type: string
- Default value: `\"\"'
- Description: String or file to insert as file footer. See
- `smarty-file-header'
-
-`smarty-company-name'
- Type: string
- Default value: `\"\"'
- Description: Name of the company to insert in file header.
-
-`smarty-copyright-string'
- Type: string
- Default value: `\"\"'
- Description: Coryright string to insert in file header.
-
-`smarty-date-format'
- Type: string
- Default value: `\"%Y-%m-%d\"'
- Description: Date format.
-
-`smarty-modify-date-prefix-string'
- Type: string
- Default value: `\"\"'
- Description: Prefix string of modification date in Smarty file
- header.
-
-`smarty-modify-date-on-saving'
- Type: bool
- Default value: `nil'
- Description: If `t'; update the modification date when the
- buffer is saved.
-
-3.1.5 Miscellaneous
--------------------
-
-`smarty-left-delimiter'
- Type: string
- Default value: `\"\"'
- Description: Left escaping delimiter for Smarty templates.
-
-`smarty-right-delimiter'
- Type: string
- Default value: `\"\"'
- Description: Right escaping delimiter for Smarty templates.
-
-`smarty-intelligent-tab'
- Type: bool
- Default value: `t'
- Description: If `t'; TAB does indentation; completion and insert
- tabulations. If `nil'; TAB does only indentation.
-
-`smarty-word-completion-in-minibuffer'
- Type: bool
- Default value: `t'
- Description: If `t'; enable completion in the minibuffer.
-
-`smarty-word-completion-case-sensitive'
- Type: bool
- Default value: `nil'
- Description: If `t'; completion is case sensitive.
-
-3.2 Functions
-=============
-
-3.2.1 Mode
-----------
-
-`smarty-electric-mode'
- Menu: Smarty -> Options -> Mode -> Electric Mode
- Keybinding: `C-c C-m C-e'
- Description: This functions is used to enable/disable the
- electric mode.
-
-`smarty-stutter-mode'
- Menu: Smarty -> Options -> Mode -> Stutter Mode
- Keybinding: `C-c C-m C-s'
- Description: This function is used to enable/disable the stutter
- mode.
-
-4 Menus
-*******
-
-There are 2 menus: Smarty and Sources. All theses menus can be
-accessed from the menubar or from the right click. This chapter
-describes each menus.
-
-4.1 Smarty
-==========
-
-This is the main menu of Smarty Mode. It allows an easy access to the
-main features of the Smarty Mode: Templates (see *Note Templates::)
-and Options (see *Note Customization::).
-
-This menu contains also 3 functions that are discussed in the next
-part.
-
-4.1.1 Functions
----------------
-
-`smarty-show-messages'
- Menu: Smarty -> Show Messages
- Keybinding: `C-c M-m'
- Description: This function opens the *Messages* buffer to
- display previous error messages.
-
-`smarty-doc-mode'
- Menu: Smarty -> Smarty Mode Documentation
- Keybinding: `C-c C-h'
- Description: This function opens the *Help* buffer and prints in
- it the Smarty Mode documentation.
-
-`smarty-version'
- Menu: Smarty -> Version
- Keybinding: `C-c C-v'
- Description: This function displays in the minibuffer the
- current Smarty Mode version with the timestamp.
-
-4.2 Sources
-===========
-
-The Sources menu shows the Smarty files in the current directory. If
-you add or delete a file in the current directory, you need to
-refresh the menu.
-
-4.2.1 Customization
--------------------
-
-`smarty-source-file-menu'
- Type: boolean
- Default value: `t'
- Description: If `t'; the Sources menu is enabled. This menu
- contains the list of Smarty file located in the current
- directory. The Sources menu scans the directory when a file is
- opened.
-
-4.2.2 Functions
----------------
-
-`smarty-add-source-files-menu'
- Menu: Sources -> *Rescan*
- Keybinding: `C-c C-s C-u'
- Description: This function is used to refresh the Sources menu.
-
-5 Stuttering
-************
-
-The stutter mode is a mode that affects a function to a key. For
-example, when you use the `ENTER' key, the associated function will
-create a new line and indent it.
-
-5.1 Customization
-=================
-
-`smarty-stutter-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable the stuttering. Is indicated in the
- modeline by \"/s\" after the mode name and can be toggled by
- `smarty-stutter-mode'.
-
-5.2 Functions
-=============
-
-`SPACE'
- If in comment, indent the comment and add new line if necessary.
- In other case, add a space.
-
-`('
- If the previous character is a `(', the `((' will be replaced by
- `['.
- If the previous character is a `[', the `[(' will be replaced by
- `{'.
- In other case, insert a `('.
-
-`)'
- If the previous character is a `)', the `))' will be replaced by
- `]'.
- If the previous character is a `]', the `])' will be replaced by
- `}'.
- In other case, insert a `)'.
-
-6 Templates
-***********
-
-In the Smarty Mode, the Smarty functions (like if, while, for, fopen,
-fclose) are predefined in functions called \"Templates\".
-
-Each template can be invoked by the function name or by using the
-<SPACE> key after the Smarty function name in the buffer (Note, using
-`M-<SPACE>' disable the template).
-
-A template can be aborted by using the `C-g' or by lefting empty the
-tempate prompt (in the minibuffer).
-
-6.1 Customization
-=================
-
-`smarty-electric-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable automatic generation of template.
- If `nil'; template generators can still be invoked through key
- bindings and menu. Is indicated in the modeline by \"/e\" after
- the mode name and can be toggled by `smarty-electric-mode'.
-
-For a complete description of the template customizable variables,
-see *Note Cu01-Pa01-Template::
-
-6.2 Functions
-=============
-
-6.2.1 Smarty Functions
-----------------------
-
-For Smarty functions, see PDF or HTML documentation.
-
-6.2.2 Non-Smarty Functions
---------------------------
-
-`smarty-template-header'
- Menu: Smarty -> Templates -> Insert Header
- Keybinding: `C-c C-t C-h'
- Description: This function is used to insert a header in the
- current buffer.
-
-`smarty-template-footer'
- Menu: Smarty -> Templates -> Insert Footer
- Keybinding: `C-c C-t C-f'
- Description: This function is used to insert a footer in the
- current buffer.
-
-`smarty-template-insert-date'
- Menu: Smarty -> Templates -> Insert Date
- Keybinding: `C-c C-t C-d i'
- Description: This function is used to insert the date in the
- current buffer.
-
-`smarty-template-modify'
- Menu: Smarty -> Templates -> Modify Date
- Keybinding: `C-c C-t C-d m'
- Description: This function is used to modify the last
- modification date in the current buffer.
-
-7 Bugs, Help
-************
-
- * To report bugs: Bugtracker
- (http://bugtracker.morinie.fr/lisp/set_project.php?project_id=2)
-
- * To obtain help you can post on the dedicated forum: Forum
- (http://forum.morinie.fr/lisp/)
-
-8 Key bindings
-**************
-
-\\{smarty-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (tt-mode) "../../../../../.emacs.d/nxhtml/related/tt-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/tt-mode.el" (18603 15794))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/tt-mode.el
-(web-autoload-require 'tt-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/tt-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'tt-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/tt-mode" nxhtml-install-dir) "\
-Major mode for editing Template Toolkit files.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (visual-basic-mode) "../../../../../.emacs.d/nxhtml/related/visual-basic-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/visual-basic-mode.el"
-;;;;;; (19235 5252))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/visual-basic-mode.el
-(web-autoload-require 'visual-basic-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/visual-basic-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'visual-basic-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/visual-basic-mode" nxhtml-install-dir) "\
-A mode for editing Microsoft Visual Basic programs.
-Features automatic indentation, font locking, keyword capitalization,
-and some minor convenience functions.
-Commands:
-\\{visual-basic-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (wikipedia-draft-buffer wikipedia-draft-page wikipedia-draft
-;;;;;; wikipedia-mode) "../../../../../.emacs.d/nxhtml/related/wikipedia-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/related/wikipedia-mode.el" (19278
-;;;;;; 3422))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/wikipedia-mode.el
-(web-autoload-require 'wikipedia-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'wikipedia-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\
-Major mode for editing wikimedia style wikis.
-Major mode for editing articles written in the markup language
-used by Wikipedia, the free on-line
-encyclopedia (see URL `http://www.wikipedia.org').
-
-There are several ways to use wikipedia-mode:
-
-- You can simply cut and paste articles between Emacs and your
- web browser's text box.
-- If you are using Firefox you can use the It's All Text add-on
- for Firefox.
-- You can use MozEx, a Mozilla/Firefox web browser extension that
- allows you to call Emacs from a text
- box (see URL `http://mozex.mozdev.org/').
-- Another way is to use the PERL script ee-helper, which allows
- you to up and download wiki texts.
-
-Wikipedia articles are usually unfilled: newline characters are not
-used for breaking paragraphs into lines. Unfortunately, Emacs does not
-handle word wrapping yet. As a workaround, wikipedia-mode turns on
-longlines-mode automatically. In case something goes wrong, the
-following commands may come in handy:
-
-\\[wikipedia-fill-article] fills the buffer.
-\\[wikipedia-unfill-article] unfills the buffer.
-Be warned that function can be dead slow, better use wikipedia-unfill-paragraph-or-region.
-\\[wikipedia-unfill-paragraph-or-region] unfills the paragraph
-\\[wikipedia-unfill-paragraph-simple] doehe same but simpler.
-
-
-
-The following commands put in markup structures.
-
-\\[wikipedia-insert-bold-italic] bold+italic
-\\[wikipedia-insert-bold] bold text
-\\[wikipedia-insert-italics] italics
-\\[wikipedia-insert-nowiki] no wiki markup
-\\[wikipedia-insert-link-wiki] inserts a link
-
-The following commands are also defined:
-\\[wikipedia-insert-user] inserts user name
-\\[wikipedia-insert-signature] inserts ~~~~
-\\[wikipedia-insert-enumerate] inserts enumerate type structures
-\\[wikipedia-insert-itemize] inserts itemize type structures
-\\[wikipedia-insert-hline] inserts a hline
-
-The draft functionality
-\\[wikipedia-draft]
-\\[wikipedia-draft-region]
-\\[wikipedia-draft-view-draft]
-\\[wikipedia-draft-page]
-\\[wikipedia-draft-buffer]
-
-Replying and sending functionality
-\\[wikipedia-reply-at-point-simple]
-\\[wikipedia-draft-reply]
-
-
-The register functionality
-\\[wikipedia-copy-page-to-register]
-\\[defun wikipedia-insert-page-to-register]
-
-
-Some simple editing commands.
-\\[wikipedia-enhance-indent]
-\\[wikipedia-yank-prefix]
-\\[wikipedia-unfill-paragraph-or-region]
-
-
-
-\\[wikipedia-terminate-paragraph] starts a new list item or paragraph in a context-aware manner.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'wikipedia-draft `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\
-Open a temporary buffer in wikipedia mode for editing an
- wikipedia draft, which an arbitrary piece of data. After
- finishing the editing either use \\[wikipedia-draft-buffer] to
- send the data into the wikipedia-draft-data-file, or send the
- buffer using `wikipedia-draft-send-to-mozex' and insert it later
- into a wikipedia article.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'wikipedia-draft-page `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'wikipedia-draft-buffer `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\
-Wikipedia-draft-buffer sends the contents of the current (temporary)
-buffer to the wikipedia-draft-buffer, see the variable
-wikipedia-draft-data-file.
-
-\(fn)" t nil)
-
-(defvar wikipedia-draft-send-archive t "\
-*Archive the reply.")
-
-;;;***
-
-;;;### (autoloads (ert-run-tests-interactively ert-deftest) "../../../../../.emacs.d/nxhtml/tests/ert"
-;;;;;; "../../../../.emacs.d/nxhtml/tests/ert.el" (19173 59742))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/tests/ert.el
-(web-autoload-require 'ert 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/ert" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'ert-deftest `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/ert" nxhtml-install-dir) "\
-Define NAME (a symbol) as a test.
-
-\(fn NAME () [:documentation DOCSTRING] [:expected-result TYPE] BODY...)" nil (quote macro))
-
-(put 'ert-deftest 'lisp-indent-function '2)
-
-(nxhtml-autoload 'ert-run-tests-interactively `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/ert" nxhtml-install-dir) "\
-Run the tests specified by SELECTOR and display the results in a buffer.
-
-\(fn SELECTOR &optional OUTPUT-BUFFER-NAME MESSAGE-FN)" t nil)
-
-;;;***
-
-;;;### (autoloads (nxhtmltest-run-Q) "../../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q"
-;;;;;; "../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q.el" (19264
-;;;;;; 40286))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q.el
-(web-autoload-require 'nxhtmltest-Q 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtmltest-run-Q `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q" nxhtml-install-dir) "\
-Run all tests defined for nXhtml in fresh Emacs.
-See `nxhtmltest-run' for more information about the tests.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (nxhtmltest-run nxhtmltest-run-indent) "../../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites"
-;;;;;; "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites.el"
-;;;;;; (19360 9896))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites.el
-(web-autoload-require 'nxhtmltest-suites 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtmltest-run-indent `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" nxhtml-install-dir) "\
-Run indentation tests.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'nxhtmltest-run `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" nxhtml-install-dir) "\
-Run all tests defined for nXhtml.
-Currently there are only tests using ert.el defined.
-
-Note that it is currently expected that the following tests will
-fail (they corresponds to known errors in nXhtml/Emacs):
-
- `nxhtml-ert-nxhtml-changes-jump-back-10549'
- `nxhtml-ert-nxhtml-changes-jump-back-7014'
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (cancel-secondary-selection set-secondary-selection
-;;;;;; anchored-transpose) "../../../../../.emacs.d/nxhtml/util/anchored-transpose"
-;;;;;; "../../../../.emacs.d/nxhtml/util/anchored-transpose.el"
-;;;;;; (19333 58526))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/anchored-transpose.el
-(web-autoload-require 'anchored-transpose 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'anchored-transpose `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir) "\
-Transpose portions of the region around an anchor phrase.
-
-`this phrase but not that word' can be transposed into
-`that word but not this phrase'
-
-I want this phrase but not that word.
- |----------------------------|. .This is the entire phrase.
- |-------|. . . . . . .This is the anchor phrase.
-
-First select the entire phrase and type \\[anchored-transpose].
-This set the secondary selection.
-
-Then select the anchor phrase and type \\[anchored-transpose]
-again. Alternatively you can do the selections like this:
-
-I want this phrase but not that word.
- |----------| |---------| Separate phrase selection.
-
-By default the anchor phrase will automatically include
-any surrounding whitespace even if you don't explicitly select
-it. Also, it won't include certain trailing punctuation. See
-`anchored-transpose-do-fuzzy' for details. A prefix arg prior to
-either selection means `no fuzzy logic, use selections
-literally'.
-
-You can select the regions to be swapped separately in any
-order.
-
-After swapping both primary and secondary selection are still
-active. They will be canceled after second next command if you
-do not swap regions again. (Second because this allow you to
-adjust the regions and try again.)
-
-You can also swap text between different buffers this way.
-
-Typing \\[anchored-transpose] with nothing selected clears any
-prior selection, ie secondary selection.
-
-\(fn BEG1 END1 FLG1 &optional BEG2 END2 FLG2 WIN2)" t nil)
-
-(nxhtml-autoload 'set-secondary-selection `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir) "\
-Set the secondary selection to the current region.
-This must be bound to a mouse drag event.
-
-\(fn BEG END)" t nil)
-
-(nxhtml-autoload 'cancel-secondary-selection `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (appmenu-mode appmenu-add appmenu) "../../../../../.emacs.d/nxhtml/util/appmenu"
-;;;;;; "../../../../.emacs.d/nxhtml/util/appmenu.el" (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/appmenu.el
-(web-autoload-require 'appmenu 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/appmenu" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'appmenu 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/appmenu" loads) nil (put 'appmenu 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/appmenu" loads))))
-
-(nxhtml-autoload 'appmenu-add `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/appmenu" nxhtml-install-dir) "\
-Add entry to `appmenu-alist'.
-Add an entry to this list with ID, PRIORITY, TEST, TITLE and
-DEFINITION as explained there.
-
-\(fn ID PRIORITY TEST TITLE DEFINITION)" nil nil)
-
-(defvar appmenu-mode nil "\
-Non-nil if Appmenu mode is enabled.
-See the command `appmenu-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `appmenu-mode'.")
-
-(nxhtml-custom-autoload 'appmenu-mode '../../../../../.emacs.d/nxhtml/util/appmenu nil)
-
-(nxhtml-autoload 'appmenu-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/appmenu" nxhtml-install-dir) "\
-Use a context sensitive popup menu.
-AppMenu (appmenu.el) is a framework for creating cooperative
-context sensitive popup menus with commands from different major
-and minor modes. Using this different modes may cooperate about
-the use of popup menus.
-
-There is also the command `appmenu-as-help' that shows the key
-bindings at current point in the help buffer.
-
-The popup menu and the help buffer version are on these keys:
-
-\\{appmenu-mode-map}
-
-The variable `appmenu-alist' is where the popup menu entries
-comes from.
-
-If there is a `keymap' property at point then relevant bindings
-from this is also shown in the popup menu.
-
-You can write functions that use whatever information you want in
-Emacs to construct these entries. Since this information is only
-collected when the popup menu is shown you do not have to care as
-much about computation time as for entries in the menu bar.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (as-external-mode as-external-for-wiki as-external-for-mail-mode
-;;;;;; as-external-for-xhtml as-external) "../../../../../.emacs.d/nxhtml/util/as-external"
-;;;;;; "../../../../.emacs.d/nxhtml/util/as-external.el" (19292
-;;;;;; 53308))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/as-external.el
-(web-autoload-require 'as-external 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'as-external 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/as-external" loads) nil (put 'as-external 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/as-external" loads))))
-
-(nxhtml-autoload 'as-external-for-xhtml `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\
-Setup for Firefox addon It's All Text to edit XHTML.
-It's All Text is a Firefox add-on for editing textareas with an
-external editor.
-See URL `https://addons.mozilla.org/en-US/firefox/addon/4125'.
-
-In this case Emacs is used to edit textarea fields on a web page.
-The text will most often be part of a web page later, like on a
-blog. Therefore turn on these:
-
-- `nxhtml-mode' since some XHTML tags may be allowed.
-- `nxhtml-validation-header-mode' since it is not a full page.
-- `wrap-to-fill-column-mode' to see what you are writing.
-- `html-write-mode' to see it even better.
-
-Also bypass the question for line end conversion when using
-emacsw32-eol.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'as-external-for-mail-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\
-Setup for Firefox addon It's All Text to edit mail.
-Set normal mail comment markers in column 1 (ie >).
-
-Set `fill-column' to 90 and enable `wrap-to-fill-column-mode' so
-that it will look similar to how it will look in the sent plain
-text mail.
-
-See also `as-external-mode'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'as-external-for-wiki `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\
-Setup for Firefox addon It's All Text to edit MediaWikis.
-
-\(fn)" t nil)
-
-(defvar as-external-mode nil "\
-Non-nil if As-External mode is enabled.
-See the command `as-external-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `as-external-mode'.")
-
-(nxhtml-custom-autoload 'as-external-mode '../../../../../.emacs.d/nxhtml/util/as-external nil)
-
-(nxhtml-autoload 'as-external-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\
-If non-nil check if Emacs is called as external editor.
-When Emacs is called as an external editor for example to edit
-text areas on a web page viewed with Firefox this library tries
-to help to setup the buffer in a useful way. It may for example
-set major and minor modes for the buffer.
-
-This can for example be useful when blogging or writing comments
-on blogs.
-
-See `as-external-alist' for more information.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (buffer-bg-set-color) "../../../../../.emacs.d/nxhtml/util/buffer-bg"
-;;;;;; "../../../../.emacs.d/nxhtml/util/buffer-bg.el" (19255 2170))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/buffer-bg.el
-(web-autoload-require 'buffer-bg 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/buffer-bg" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'buffer-bg-set-color `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/buffer-bg" nxhtml-install-dir) "\
-Add an overlay with background color COLOR to buffer BUFFER.
-If COLOR is nil remove previously added overlay.
-
-\(fn COLOR BUFFER)" t nil)
-
-;;;***
-
-;;;### (autoloads (chartg-make-chart chartg-complete) "../../../../../.emacs.d/nxhtml/util/chartg"
-;;;;;; "../../../../.emacs.d/nxhtml/util/chartg.el" (19278 19348))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/chartg.el
-(web-autoload-require 'chartg 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/chartg" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'chartg-complete `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/chartg" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'chartg-make-chart `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/chartg" nxhtml-install-dir) "\
-Try to make a new chart.
-If region is active then make a new chart from data in the
-selected region.
-
-Else if current buffer is in `chartg-mode' then do it from the
-chart specifications in this buffer. Otherwise create a new
-buffer and initialize it with `chartg-mode'.
-
-If the chart specifications are complete enough to make a chart
-then do it and show the resulting chart image. If not then tell
-user what is missing.
-
-NOTE: This is beta, no alpha code. It is not ready.
-
-Below are some examples. To test them mark an example and do
-
- M-x chartg-make-chart
-
-* Example, simple x-y chart:
-
- Output-file: \"~/temp-chart.png\"
- Size: 200 200
- Data: 3 8 5 | 10 20 30
- Type: line-chartg-xy
-
-* Example, pie:
-
- Output-file: \"~/temp-depression.png\"
- Size: 400 200
- Data:
- 2,160,000
- 3,110,000
- 1,510,000
- 73,600
- 775,000
- 726,000
- 8,180,000
- 419,000
- Type: pie-3-dimensional
- Chartg-title: \"Depression hits on Google\"
- Legends:
- \"SSRI\"
- | \"Psychotherapy\"
- | \"CBT\"
- | \"IPT\"
- | \"Psychoanalysis\"
- | \"Mindfulness\"
- | \"Meditation\"
- | \"Exercise\"
-
-
-* Example, pie:
-
- Output-file: \"~/temp-panic.png\"
- Size: 400 200
- Data:
- 979,000
- 969,000
- 500,000
- 71,900
- 193,000
- 154,000
- 2,500,000
- 9,310,000
- Type: pie-3-dimensional
- Chartg-title: \"Depression hits on Google\"
- Legends:
- \"SSRI\"
- | \"Psychotherapy\"
- | \"CBT\"
- | \"IPT\"
- | \"Psychoanalysis\"
- | \"Mindfulness\"
- | \"Meditation\"
- | \"Exercise\"
-
-
-* Example using raw:
-
- Output-file: \"~/temp-chartg-slipsen-kostar.png\"
- Size: 400 130
- Data: 300 1000 30000
- Type: bar-chartg-horizontal
- Chartg-title: \"Vad killen i slips tjänar jämfört med dig och mig\"
- Google-chartg-raw: \"&chds=0,30000&chco=00cd00|ff4500|483d8b&chxt=y,x&chxl=0:|Killen+i+slips|Partiledarna|Du+och+jag&chf=bg,s,ffd700\"
-
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (css-color-test css-color-global-mode css-color-mode
-;;;;;; css-color) "../../../../../.emacs.d/nxhtml/util/css-color"
-;;;;;; "../../../../.emacs.d/nxhtml/util/css-color.el" (19266 40216))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/css-color.el
-(web-autoload-require 'css-color 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'css-color 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/css-color" loads) nil (put 'css-color 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/css-color" loads))))
-
-(nxhtml-autoload 'css-color-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir) "\
-Show hex color literals with the given color as background.
-In this mode hexadecimal colour specifications like #6600ff are
-displayed with the specified colour as background.
-
-Certain keys are bound to special colour editing commands when
-point is at a hexadecimal colour:
-
-\\{css-color-map}
-
-\(fn &optional ARG)" t nil)
-
-(defvar css-color-global-mode nil "\
-Non-nil if Css-Color-Global mode is enabled.
-See the command `css-color-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `css-color-global-mode'.")
-
-(nxhtml-custom-autoload 'css-color-global-mode '../../../../../.emacs.d/nxhtml/util/css-color nil)
-
-(nxhtml-autoload 'css-color-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir) "\
-Toggle Css-Color mode in every possible buffer.
-With prefix ARG, turn Css-Color-Global mode on if and only if
-ARG is positive.
-Css-Color mode is enabled in all buffers where
-`css-color-turn-on-in-buffer' would do it.
-See `css-color-mode' for more information on Css-Color mode.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'css-color-test `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir) "\
-Test colors interactively.
-The colors are displayed in the echo area. You can specify the
-colors as any viable css color. Example:
-
- red
- #f00
- #0C0
- #b0ff00
- hsla(100, 50%, 25%)
- rgb(255,100,120)
-
-\(fn FG-COLOR BG-COLOR)" t nil)
-
-;;;***
-
-;;;### (autoloads (css-palette-global-mode css-palette css-palette-mode)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/css-palette" "../../../../.emacs.d/nxhtml/util/css-palette.el"
-;;;;;; (19235 5252))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/css-palette.el
-(web-autoload-require 'css-palette 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-palette" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'css-palette-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-palette" nxhtml-install-dir) "\
-Minor mode for palettes in CSS.
-
-The mode `css-palette-mode' acts on the first COLORS declaration in your
- file of the form:
-
-COLORS:
-\(
-c0 \"#6f5d25\" ;tainted sand
-c1 \"#000000\" ;Black
-c2 \"#cca42b\" ;goldenslumber
-c3 \"#6889cb\" ;far off sky
-c4 \"#fff\" ;strange aeons
-)
-
-Such declarations should appear inside a block comment, in order
- to be parsed properly by the LISP reader.
-
-Type \\[css-palette-update-all], and any occurence of
-
- color: #f55; /*[c3]*/
-
-will be updated with
-
- color: #6899cb; /*[c3]*/
-
-The following commands are available to insert key-value pairs
- and palette declarations:
- \\{css-palette-mode-map}
-
-You can extend or redefine the types of palettes by defining a
- new palette specification of the form (PATTERN REGEXP
- REF-FOLLOWS-VALUE), named according to the naming scheme
- css-palette:my-type, where
-
-PATTERN is a pattern containing two (%s) format directives which
- will be filled in with the variable and its value,
-
-REGEXP is a regular expression to match a value - variable
- pattern,
-
-and REF-FOLLOWS-VALUE defined whether or not the reference comes
- after the value. This allows for more flexibility.
-
-Note that, although the w3c spec at URL
- `http://www.w3.org/TR/CSS2/syndata.html#comments' says that
- comments \" may occur anywhere between tokens, and their
- contents have no influence on the rendering\", Internet
- Explorer does not think so. Better keep all your comments after
- a \"statement\", as per the default. This means `css-palette'
- is ill-suited for use within shorthands.
-
-See variable `css-palette:colors' for an example of a palette
- type.
-
-The extension mechanism means that palette types can be used to
- contain arbitrary key-value mappings.
-
-Besides the colors palette, css-palette defines the palette
- definition variables `css-palette:colors-outside' and
- `css-palette:files', for colors with the reference outside and
- for file url()'s respectively.
-
-You can fine-control which palette types css-palette should look
- at via the variable `css-palette-types'.
-
-\(fn &optional ARG)" t nil)
-
-(let ((loads (get 'css-palette 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/css-palette" loads) nil (put 'css-palette 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/css-palette" loads))))
-
-(defvar css-palette-global-mode nil "\
-Non-nil if Css-Palette-Global mode is enabled.
-See the command `css-palette-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `css-palette-global-mode'.")
-
-(nxhtml-custom-autoload 'css-palette-global-mode '../../../../../.emacs.d/nxhtml/util/css-palette nil)
-
-(nxhtml-autoload 'css-palette-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-palette" nxhtml-install-dir) "\
-Toggle Css-Palette mode in every possible buffer.
-With prefix ARG, turn Css-Palette-Global mode on if and only if
-ARG is positive.
-Css-Palette mode is enabled in all buffers where
-`css-palette-turn-on-in-buffer' would do it.
-See `css-palette-mode' for more information on Css-Palette mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (cusnu-export-my-skin-options customize-for-new-user)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/cus-new-user" "../../../../.emacs.d/nxhtml/util/cus-new-user.el"
-;;;;;; (19173 59742))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/cus-new-user.el
-(web-autoload-require 'cus-new-user 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/cus-new-user" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'customize-for-new-user `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/cus-new-user" nxhtml-install-dir) "\
-Show special customization page for new user.
-
-\(fn &optional NAME)" t nil)
-
-(nxhtml-autoload 'cusnu-export-my-skin-options `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/cus-new-user" nxhtml-install-dir) "\
-Export to file FILE custom options in `cusnu-my-skin-options'.
-The options is exported to elisp code that other users can run to
-set the options that you have added to `cusnu-my-skin-options'.
-
-For more information about this see `cusnu-export-cust-group'.
-
-\(fn FILE)" t nil)
-
-;;;***
-
-;;;### (autoloads (ediff-url) "../../../../../.emacs.d/nxhtml/util/ediff-url"
-;;;;;; "../../../../.emacs.d/nxhtml/util/ediff-url.el" (19362 37860))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ediff-url.el
-(web-autoload-require 'ediff-url 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ediff-url" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'ediff-url `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ediff-url" nxhtml-install-dir) "\
-Compare current buffer to a web URL using `ediff-buffers'.
-Check URL using `ediff-url-redirects' before fetching the file.
-
-This is for checking downloaded file. A the file may have a comment
-telling the download URL of thise form in the header:
-
- ;; URL: http://the-server.net/the-path/the-file.el
-
-If not the user is asked for the URL.
-
-\(fn URL)" t nil)
-
-;;;***
-
-;;;### (autoloads (ffip-find-file-in-dirtree ffip-set-current-project)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/ffip" "../../../../.emacs.d/nxhtml/util/ffip.el"
-;;;;;; (19257 29034))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ffip.el
-(web-autoload-require 'ffip 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ffip" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'ffip-set-current-project `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ffip" nxhtml-install-dir) "\
-Setup ffip project NAME with top directory ROOT of type TYPE.
-ROOT can either be just a directory or a list of directory where
-the first used just for prompting purposes and the files in the
-rest are read into the ffip project.
-
-Type is a type in `ffip-project-file-types'.
-
-\(fn NAME ROOT TYPE)" nil nil)
-
-(nxhtml-autoload 'ffip-find-file-in-dirtree `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ffip" nxhtml-install-dir) "\
-Find files in directory tree ROOT.
-
-\(fn ROOT)" t nil)
-
-;;;***
-
-;;;### (autoloads (fold-dwim-turn-on-outline-and-hide-all fold-dwim-turn-on-hs-and-hide
-;;;;;; fold-dwim-unhide-hs-and-outline fold-dwim-mode fold-dwim-toggle
-;;;;;; fold-dwim) "../../../../../.emacs.d/nxhtml/util/fold-dwim"
-;;;;;; "../../../../.emacs.d/nxhtml/util/fold-dwim.el" (19218 45782))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/fold-dwim.el
-(web-autoload-require 'fold-dwim 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'fold-dwim 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/fold-dwim" loads) nil (put 'fold-dwim 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/fold-dwim" loads))))
-
-(nxhtml-autoload 'fold-dwim-toggle `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\
-Toggle visibility or some other visual things.
-Try toggling different visual things in this order:
-
-- Images shown at point with `inlimg-mode'
-- Text at point prettified by `html-write-mode'.
-
-For the rest it unhides if possible, otherwise hides in this
-order:
-
-- `org-mode' header or something else using that outlines.
-- Maybe `fold-dwim-toggle-selective-display'.
-- `Tex-fold-mode' things.
-- In html if `outline-minor-mode' and after heading hide content.
-- `hs-minor-mode' things.
-- `outline-minor-mode' things. (Turns maybe on this.)
-
-It uses `fold-dwim-show' to show any hidden text at point; if no
-hidden fold is found, try `fold-dwim-hide' to hide the
-construction at the cursor.
-
-Note: Also first turn on `fold-dwim-mode' to get the keybinding
-for this function from it.
-
-\(fn)" t nil)
-
-(defvar fold-dwim-mode nil "\
-Non-nil if Fold-Dwim mode is enabled.
-See the command `fold-dwim-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `fold-dwim-mode'.")
-
-(nxhtml-custom-autoload 'fold-dwim-mode '../../../../../.emacs.d/nxhtml/util/fold-dwim nil)
-
-(nxhtml-autoload 'fold-dwim-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\
-Key binding for `fold-dwim-toggle'.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'fold-dwim-unhide-hs-and-outline `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\
-Unhide everything hidden by Hide/Show and Outline.
-Ie everything hidden by `hs-minor-mode' and
-`outline-minor-mode'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'fold-dwim-turn-on-hs-and-hide `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\
-Turn on minor mode `hs-minor-mode' and hide.
-If major mode is derived from `nxml-mode' call `hs-hide-block'
-else call `hs-hide-all'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'fold-dwim-turn-on-outline-and-hide-all `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\
-Turn on `outline-minor-mode' and call `hide-body'.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (foldit-global-mode foldit-mode foldit) "../../../../../.emacs.d/nxhtml/util/foldit"
-;;;;;; "../../../../.emacs.d/nxhtml/util/foldit.el" (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/foldit.el
-(web-autoload-require 'foldit 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/foldit" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'foldit 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/foldit" loads) nil (put 'foldit 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/foldit" loads))))
-
-(nxhtml-autoload 'foldit-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/foldit" nxhtml-install-dir) "\
-Minor mode providing visual aids for folding.
-Shows some hints about what you have hidden and how to reveal it.
-
-Supports `hs-minor-mode', `outline-minor-mode' and major modes
-derived from `outline-mode'.
-
-\(fn &optional ARG)" t nil)
-
-(defvar foldit-global-mode nil "\
-Non-nil if Foldit-Global mode is enabled.
-See the command `foldit-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `foldit-global-mode'.")
-
-(nxhtml-custom-autoload 'foldit-global-mode '../../../../../.emacs.d/nxhtml/util/foldit nil)
-
-(nxhtml-autoload 'foldit-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/foldit" nxhtml-install-dir) "\
-Toggle Foldit mode in every possible buffer.
-With prefix ARG, turn Foldit-Global mode on if and only if
-ARG is positive.
-Foldit mode is enabled in all buffers where
-`(lambda nil (foldit-mode 1))' would do it.
-See `foldit-mode' for more information on Foldit mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (gimpedit-can-edit gimpedit-edit-buffer gimpedit-edit-file
-;;;;;; gimpedit) "../../../../../.emacs.d/nxhtml/util/gimpedit"
-;;;;;; "../../../../.emacs.d/nxhtml/util/gimpedit.el" (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/gimpedit.el
-(web-autoload-require 'gimpedit 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'gimpedit 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/gimpedit" loads) nil (put 'gimpedit 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/gimpedit" loads))))
-
-(nxhtml-autoload 'gimpedit-edit-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir) "\
-Edit IMAGE-FILE with GIMP.
-See also `gimpedit-edit-file'.
-
-\(fn IMAGE-FILE &optional EXTRA-ARGS)" t nil)
-
-(nxhtml-autoload 'gimpedit-edit-buffer `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir) "\
-Edit image file in current buffer with GIMP.
-See also `gimpedit-edit-file'.
-
-You may also be interested in gimpedit-mode with which you can edit
-gimp files from within Emacs using GIMP's scripting
-possibilities. See
-
- URL `http://www.emacswiki.org/emacs/GimpMode'
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'gimpedit-can-edit `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir) "\
-Not documented
-
-\(fn FILE-NAME)" nil nil)
-
-;;;***
-
-;;;### (autoloads (gpl-mode) "../../../../../.emacs.d/nxhtml/util/gpl"
-;;;;;; "../../../../.emacs.d/nxhtml/util/gpl.el" (18795 30910))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/gpl.el
-(web-autoload-require 'gpl 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gpl" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'gpl-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gpl" nxhtml-install-dir) "\
-Mode for font-locking and editing color palettes of the GPL format.
-
-Such palettes are used and produced by free software applications
-such as the GIMP, Inkscape, Scribus, Agave and on-line tools such
-as http://colourlovers.com.
-
-You can also use
-URL `http://niels.kicks-ass.org/public/elisp/css-palette.el' to import
-such palette into a css-file as hexadecimal color palette.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (hfyview-frame hfyview-window hfyview-region hfyview-buffer
-;;;;;; hfyview-quick-print-in-files-menu) "../../../../../.emacs.d/nxhtml/util/hfyview"
-;;;;;; "../../../../.emacs.d/nxhtml/util/hfyview.el" (19406 19692))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/hfyview.el
-(web-autoload-require 'hfyview 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(defvar hfyview-quick-print-in-files-menu nil "\
-Add Quick print entries to File menu if non-nil.
-If you set this to nil you have to restart Emacs to get rid of
-the Quick Print entry.")
-
-(nxhtml-custom-autoload 'hfyview-quick-print-in-files-menu '../../../../../.emacs.d/nxhtml/util/hfyview nil)
-
-(nxhtml-autoload 'hfyview-buffer `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\
-Convert buffer to html preserving faces and show in web browser.
-With command prefix ARG also show html source in other window.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'hfyview-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\
-Convert region to html preserving faces and show in web browser.
-With command prefix ARG also show html source in other window.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'hfyview-window `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\
-Convert window to html preserving faces and show in web browser.
-With command prefix ARG also show html source in other window.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'hfyview-frame `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\
-Convert frame to html preserving faces and show in web browser.
-Make an XHTML view of the current Emacs frame. Put it in a buffer
-named *hfyview-frame* and show that buffer in a web browser.
-
-If WHOLE-BUFFERS is non-nil then the whole content of the buffers
-is shown in the XHTML page, otherwise just the part that is
-visible currently on the frame.
-
-If you turn on the minor mode `hfyview-frame-mode' you can also
-get the minibuffer/echo area in the output. See this mode for
-details.
-
-With command prefix also show html source in other window.
-
-\(fn WHOLE-BUFFERS)" t nil)
-
-;;;***
-
-;;;### (autoloads (hl-needed-mode hl-needed) "../../../../../.emacs.d/nxhtml/util/hl-needed"
-;;;;;; "../../../../.emacs.d/nxhtml/util/hl-needed.el" (19406 19692))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/hl-needed.el
-(web-autoload-require 'hl-needed 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hl-needed" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'hl-needed 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/hl-needed" loads) nil (put 'hl-needed 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/hl-needed" loads))))
-
-(defvar hl-needed-mode nil "\
-Non-nil if Hl-Needed mode is enabled.
-See the command `hl-needed-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `hl-needed-mode'.")
-
-(nxhtml-custom-autoload 'hl-needed-mode '../../../../../.emacs.d/nxhtml/util/hl-needed nil)
-
-(nxhtml-autoload 'hl-needed-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hl-needed" nxhtml-install-dir) "\
-Try to highlight current line and column when needed.
-This is a global minor mode. It can operate in some different
-ways:
-
-- Highlighting can be on always, see `hl-needed-always'.
-
-Or, it can be turned on depending on some conditions. In this
-case highlighting is turned off after each command and turned on
-again in the current window when either:
-
-- A new window was selected, see `hl-needed-on-new-window'.
-- A new buffer was selected, see `hl-needed-on-new-buffer'.
-- Window configuration was changed, see `hl-needed-on-config-change'.
-- Buffer was scrolled see `hl-needed-on-scrolling'.
-- A window was clicked with the mouse, see `hl-needed-on-mouse'.
-
-After this highlighting may be turned off again, normally after a
-short delay, see `hl-needed-flash'.
-
-If either highlighting was not turned on or was turned off again
-it will be turned on when
-
-- Emacs has been idle for `hl-needed-idle-time' seconds.
-
-See also `hl-needed-not-in-modes' and `hl-needed-currently-fun'.
-
-Note 1: For columns to be highlighted vline.el must be available.
-
-Note 2: This mode depends on `hl-line-mode' and `vline-mode' and
-tries to cooperate with them. If you turn on either of these that
-overrides the variables for turning on the respective
-highlighting here.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (html-write-mode html-write) "../../../../../.emacs.d/nxhtml/util/html-write"
-;;;;;; "../../../../.emacs.d/nxhtml/util/html-write.el" (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/html-write.el
-(web-autoload-require 'html-write 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/html-write" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'html-write 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/html-write" loads) nil (put 'html-write 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/html-write" loads))))
-
-(nxhtml-autoload 'html-write-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/html-write" nxhtml-install-dir) "\
-Minor mode for convenient display of some HTML tags.
-When this mode is on a tag in `html-write-tag-list' is displayed as
-the inner text of the tag with a face corresponding to the tag.
-By default for example <i>...</i> is displayed as italic and
-<a>...</a> is displayed as an underlined clickable link.
-
-Only non-nested tags are hidden. The idea is just that it should
-be easier to read and write, not that it should look as html
-rendered text.
-
-See the customization group `html-write' for more information about
-faces.
-
-The following keys are defined when you are on a tag handled by
-this minor mode:
-
-\\{html-write-keymap}
-
-IMPORTANT: Most commands you use works also on the text that is
-hidden. The movement commands is an exception, but as soon as
-you edit the buffer you may also change the hidden parts.
-
-Hint: Together with `wrap-to-fill-column-mode' this can make it
-easier to see what text you are actually writing in html parts of
-a web file.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (inlimg-toggle-slicing inlimg-toggle-display inlimg-global-mode
-;;;;;; inlimg-mode inlimg) "../../../../../.emacs.d/nxhtml/util/inlimg"
-;;;;;; "../../../../.emacs.d/nxhtml/util/inlimg.el" (19269 36610))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/inlimg.el
-(web-autoload-require 'inlimg 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'inlimg 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/inlimg" loads) nil (put 'inlimg 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/inlimg" loads))))
-
-(nxhtml-autoload 'inlimg-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\
-Display images inline.
-Search buffer for image tags. Display found images.
-
-Image tags are setup per major mode in `inlimg-mode-specs'.
-
-Images are displayed on a line below the tag referencing them.
-The whole image or a slice of it may be displayed, see
-`inlimg-slice'. Margins relative text are specified in
-`inlimg-margins'.
-
-See also the commands `inlimg-toggle-display' and
-`inlimg-toggle-slicing'.
-
-Note: This minor mode uses `font-lock-mode'.
-
-\(fn &optional ARG)" t nil)
-
-(defvar inlimg-global-mode nil "\
-Non-nil if Inlimg-Global mode is enabled.
-See the command `inlimg-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `inlimg-global-mode'.")
-
-(nxhtml-custom-autoload 'inlimg-global-mode '../../../../../.emacs.d/nxhtml/util/inlimg nil)
-
-(nxhtml-autoload 'inlimg-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\
-Toggle Inlimg mode in every possible buffer.
-With prefix ARG, turn Inlimg-Global mode on if and only if
-ARG is positive.
-Inlimg mode is enabled in all buffers where
-`inlimg--global-turn-on' would do it.
-See `inlimg-mode' for more information on Inlimg mode.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'inlimg-toggle-display `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\
-Toggle display of image at point POINT.
-See also the command `inlimg-mode'.
-
-\(fn POINT)" t nil)
-
-(nxhtml-autoload 'inlimg-toggle-slicing `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\
-Toggle slicing of image at point POINT.
-See also the command `inlimg-mode'.
-
-\(fn POINT)" t nil)
-
-;;;***
-
-;;;### (autoloads (majmodpri majmodpri-apply-priorities majmodpri-apply
-;;;;;; majmodpri-sort-lists) "../../../../../.emacs.d/nxhtml/util/majmodpri"
-;;;;;; "../../../../.emacs.d/nxhtml/util/majmodpri.el" (19407 22790))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/majmodpri.el
-(web-autoload-require 'majmodpri 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'majmodpri-sort-lists `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir) "\
-Sort the list used when selecting major mode.
-Only sort those lists choosen in `majmodpri-lists-to-sort'.
-Sort according to priorities in `majmodpri-mode-priorities'.
-Keep the old order in the list otherwise.
-
-The lists can be sorted when loading elisp libraries, see
-`majmodpri-sort-after-load'.
-
-See also `majmodpri-apply-priorities'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'majmodpri-apply `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir) "\
-Sort major mode lists and apply to existing buffers.
-Note: This function is suitable to add to
-`desktop-after-read-hook'. It will restore the multi major modes
-in buffers.
-
-\(fn)" nil nil)
-
-(nxhtml-autoload 'majmodpri-apply-priorities `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir) "\
-Apply major mode priorities.
-First run `majmodpri-sort-lists' and then if CHANGE-MODES is
-non-nil apply to existing file buffers. If interactive ask
-before applying.
-
-\(fn CHANGE-MODES)" t nil)
-
-(let ((loads (get 'majmodpri 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/majmodpri" loads) nil (put 'majmodpri 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/majmodpri" loads))))
-
-;;;***
-
-;;;### (autoloads (markchars-global-mode markchars-mode markchars)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/markchars" "../../../../.emacs.d/nxhtml/util/markchars.el"
-;;;;;; (19376 1954))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/markchars.el
-(web-autoload-require 'markchars 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/markchars" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'markchars 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/markchars" loads) nil (put 'markchars 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/markchars" loads))))
-
-(nxhtml-autoload 'markchars-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/markchars" nxhtml-install-dir) "\
-Mark special characters.
-Which characters to mark are defined by `markchars-keywords'.
-
-The default is to mark non-IDN, non-ascii chars with a magenta
-underline.
-
-For information about IDN chars see `idn-is-recommended'.
-
-If you change anything in the customization group `markchars' you
-must restart this minor mode for the changes to take effect.
-
-\(fn &optional ARG)" t nil)
-
-(defvar markchars-global-mode nil "\
-Non-nil if Markchars-Global mode is enabled.
-See the command `markchars-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `markchars-global-mode'.")
-
-(nxhtml-custom-autoload 'markchars-global-mode '../../../../../.emacs.d/nxhtml/util/markchars nil)
-
-(nxhtml-autoload 'markchars-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/markchars" nxhtml-install-dir) "\
-Toggle Markchars mode in every possible buffer.
-With prefix ARG, turn Markchars-Global mode on if and only if
-ARG is positive.
-Markchars mode is enabled in all buffers where
-`(lambda nil (markchars-mode 1))' would do it.
-See `markchars-mode' for more information on Markchars mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (mlinks-global-mode mlinks-mode mlinks) "../../../../../.emacs.d/nxhtml/util/mlinks"
-;;;;;; "../../../../.emacs.d/nxhtml/util/mlinks.el" (19364 59816))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mlinks.el
-(web-autoload-require 'mlinks 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mlinks" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'mlinks 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mlinks" loads) nil (put 'mlinks 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mlinks" loads))))
-
-(nxhtml-autoload 'mlinks-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mlinks" nxhtml-install-dir) "\
-Recognizes certain parts of a buffer as hyperlinks.
-The hyperlinks are created in different ways for different major
-modes with the help of the functions in the list
-`mlinks-mode-functions'.
-
-The hyperlinks can be hilighted when point is over them. Use
-`mlinks-toggle-hilight' to toggle this feature for the current
-buffer.
-
-All keybindings in this mode are by default done under the prefi§x
-key
-
- C-c RET
-
-which is supposed to be a kind of mnemonic for link (alluding to
-the RET key commonly used in web browser to follow a link).
-\(Unfortunately this breaks the rules in info node `Key Binding
-Conventions'.) Below are the key bindings defined by this mode:
-
-\\{mlinks-mode-map}
-
-For some major modes `mlinks-backward-link' and
-`mlinks-forward-link' will take you to the previous/next link.
-By default the link moved to will be active, see
-`mlinks-active-links'.
-
-\(fn &optional ARG)" t nil)
-
-(defvar mlinks-global-mode nil "\
-Non-nil if Mlinks-Global mode is enabled.
-See the command `mlinks-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `mlinks-global-mode'.")
-
-(nxhtml-custom-autoload 'mlinks-global-mode '../../../../../.emacs.d/nxhtml/util/mlinks nil)
-
-(nxhtml-autoload 'mlinks-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mlinks" nxhtml-install-dir) "\
-Toggle Mlinks mode in every possible buffer.
-With prefix ARG, turn Mlinks-Global mode on if and only if
-ARG is positive.
-Mlinks mode is enabled in all buffers where
-`mlinks-turn-on-in-buffer' would do it.
-See `mlinks-mode' for more information on Mlinks mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (mumamo-multi-major-modep mumamo-list-defined-multi-major-modes
-;;;;;; mumamo-mark-for-refontification mumamo-hi-lock-faces mumamo
-;;;;;; mumamo-add-to-defined-multi-major-modes define-mumamo-multi-major-mode)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/mumamo" "../../../../.emacs.d/nxhtml/util/mumamo.el"
-;;;;;; (19412 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mumamo.el
-(web-autoload-require 'mumamo 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'define-mumamo-multi-major-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\
-Define a function that turn on support for multiple major modes.
-Define a function FUN-SYM that set up to divide the current
-buffer into chunks with different major modes.
-
-The documentation string for FUN-SYM should contain the special
-documentation in the string SPEC-DOC, general documentation for
-functions of this type and information about chunks.
-
-The new function will use the definitions in CHUNKS (which is
-called a \"chunk family\") to make the dividing of the buffer.
-
-The function FUN-SYM can be used to setup a buffer instead of a
-major mode function:
-
-- The function FUN-SYM can be called instead of calling a major
- mode function when you want to use multiple major modes in a
- buffer.
-
-- The defined function can be used instead of a major mode
- function in for example `auto-mode-alist'.
-
-- As the very last thing FUN-SYM will run the hook FUN-SYM-hook,
- just as major modes do.
-
-- There is also a general hook, `mumamo-turn-on-hook', which is
- run when turning on mumamo with any of these functions. This
- is run right before the hook specific to any of the functions
- above that turns on the multiple major mode support.
-
-- The multi major mode FUN-SYM has a keymap named FUN-SYM-map.
- This overrides the major modes' keymaps since it is handled as
- a minor mode keymap.
-
-- There is also a special mumamo keymap, `mumamo-map' that is
- active in every buffer with a multi major mode. This is also
- handled as a minor mode keymap and therefor overrides the major
- modes' keymaps.
-
-- However when this support for multiple major mode is on the
- buffer is divided into chunks, each with its own major mode.
-
-- The chunks are fontified according the major mode assigned to
- them for that.
-
-- Indenting is also done according to the major mode assigned to
- them for that.
-
-- The actual major mode used in the buffer is changed to the one
- in the chunk when moving point between these chunks.
-
-- When major mode is changed the hooks for the new major mode,
- `after-change-major-mode-hook' and `change-major-mode-hook' are
- run.
-
-- There will be an alias for FUN-SYM called mumamo-alias-FUN-SYM.
- This can be used to check whic multi major modes have been
- defined.
-
-** A little bit more technical description:
-
-The dividing of a buffer into chunks is done during fontification
-by `mumamo-get-chunk-at'.
-
-The name of the function is saved in in the buffer local variable
-`mumamo-multi-major-mode' when the function is called.
-
-All functions defined by this macro is added to the list
-`mumamo-defined-multi-major-modes'.
-
-Basically Mumamo handles only major modes that uses jit-lock.
-However as a special effort also `nxml-mode' and derivatives
-thereof are handled. Since it seems impossible to me to restrict
-those major modes fontification to only a chunk without changing
-`nxml-mode' the fontification is instead done by
-`html-mode'/`sgml-mode' for chunks using `nxml-mode' and its
-derivates.
-
-CHUNKS is a list where each entry have the format
-
- (CHUNK-DEF-NAME MAIN-MAJOR-MODE SUBMODE-CHUNK-FUNCTIONS)
-
-CHUNK-DEF-NAME is the key name by which the entry is recognized.
-MAIN-MAJOR-MODE is the major mode used when there is no chunks.
-If this is nil then `major-mode' before turning on this mode will
-be used.
-
-SUBMODE-CHUNK-FUNCTIONS is a list of the functions that does the
-chunk division of the buffer. They are tried in the order they
-appear here during the chunk division process.
-
-If you want to write new functions for chunk divisions then
-please see `mumamo-find-possible-chunk'. You can perhaps also
-use `mumamo-quick-static-chunk' which is more easy-to-use
-alternative. See also the file mumamo-fun.el where there are
-many routines for chunk division.
-
-When you write those new functions you may want to use some of
-the functions for testing chunks:
-
- `mumamo-test-create-chunk-at' `mumamo-test-create-chunks-at-all'
- `mumamo-test-easy-make' `mumamo-test-fontify-region'
-
-These are in the file mumamo-test.el.
-
-\(fn FUN-SYM SPEC-DOC CHUNKS)" nil (quote macro))
-
-(nxhtml-autoload 'mumamo-add-to-defined-multi-major-modes `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\
-Not documented
-
-\(fn ENTRY)" nil nil)
-
-(let ((loads (get 'mumamo 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mumamo" loads) nil (put 'mumamo 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mumamo" loads))))
-
-(let ((loads (get 'mumamo-hi-lock-faces 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mumamo" loads) nil (put 'mumamo-hi-lock-faces 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mumamo" loads))))
-
-(nxhtml-autoload 'mumamo-mark-for-refontification `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\
-Mark region between MIN and MAX for refontification.
-
-\(fn MIN MAX)" nil nil)
-
-(nxhtml-autoload 'mumamo-list-defined-multi-major-modes `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\
-List currently defined multi major modes.
-If SHOW-DOC is non-nil show the doc strings added when defining
-them. (This is not the full doc string. To show the full doc
-string you can click on the multi major mode in the list.)
-
-If SHOW-CHUNKS is non-nil show the names of the chunk dividing
-functions each multi major mode uses.
-
-If MATCH then show only multi major modes whos names matches.
-
-\(fn SHOW-DOC SHOW-CHUNKS MATCH)" t nil)
-
-(nxhtml-autoload 'mumamo-multi-major-modep `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\
-Return t if VALUE is a multi major mode function.
-
-\(fn VALUE)" nil nil)
-
-;;;***
-
-;;;### (autoloads (python-rst-mumamo-mode latex-haskell-mumamo-mode
-;;;;;; latex-clojure-mumamo-mode markdown-html-mumamo-mode xsl-sgml-mumamo-mode
-;;;;;; xsl-nxml-mumamo-mode mako-html-mumamo-mode org-mumamo-mode
-;;;;;; asp-html-mumamo-mode noweb2-mumamo-mode mumamo-noweb2 csound-sgml-mumamo-mode
-;;;;;; laszlo-nxml-mumamo-mode metapost-mumamo-mode ruby-heredoc-mumamo-mode
-;;;;;; python-heredoc-mumamo-mode cperl-heredoc-mumamo-mode perl-heredoc-mumamo-mode
-;;;;;; php-heredoc-mumamo-mode sh-heredoc-mumamo-mode eruby-javascript-mumamo-mode
-;;;;;; eruby-html-mumamo-mode eruby-mumamo-mode jsp-html-mumamo-mode
-;;;;;; gsp-html-mumamo-mode ssjs-html-mumamo-mode smarty-html-mumamo-mode
-;;;;;; mjt-html-mumamo-mode genshi-html-mumamo-mode django-html-mumamo-mode
-;;;;;; embperl-html-mumamo-mode mason-html-mumamo-mode nxml-mumamo-mode
-;;;;;; html-mumamo-mode mumamo-define-html-file-wide-keys) "../../../../../.emacs.d/nxhtml/util/mumamo-fun"
-;;;;;; "../../../../.emacs.d/nxhtml/util/mumamo-fun.el" (19410 23172))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mumamo-fun.el
-(web-autoload-require 'mumamo-fun 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'mumamo-define-html-file-wide-keys `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Define keys in multi major mode keymap for html files.
-
-\(fn)" nil nil)
-
-(nxhtml-autoload 'html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for (X)HTML with main mode `html-mode'.
-This covers inlined style and javascript and PHP." t)
-
-(nxhtml-autoload 'nxml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for (X)HTML with main mode `nxml-mode'.
-This covers inlined style and javascript and PHP.
-
-See also `mumamo-alt-php-tags-mode'." t)
-
-(nxhtml-autoload 'mason-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Mason using main mode `html-mode'.
-This covers inlined style and javascript." t)
-
-(nxhtml-autoload 'embperl-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Embperl files with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'django-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Django with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'genshi-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Genshi with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'mjt-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for MJT with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'smarty-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Smarty with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'ssjs-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for SSJS with main mode `html-mode'.
-This covers inlined style and javascript." t)
-
-(nxhtml-autoload 'gsp-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for GSP with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'jsp-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for JSP with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'eruby-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major mode for eRuby with unspecified main mode.
-Current major-mode will be used as the main major mode." t)
-
-(nxhtml-autoload 'eruby-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for eRuby with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'eruby-javascript-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for eRuby with main mode `javascript-mode'." t)
-
-(nxhtml-autoload 'sh-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for sh heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes." t)
-
-(nxhtml-autoload 'php-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for PHP heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes." t)
-
-(nxhtml-autoload 'perl-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Perl heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes." t)
-
-(nxhtml-autoload 'cperl-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Perl heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes." t)
-
-(nxhtml-autoload 'python-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Perl heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes." t)
-
-(nxhtml-autoload 'ruby-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Ruby heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes." t)
-
-(nxhtml-autoload 'metapost-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for MetaPost." t)
-
-(nxhtml-autoload 'laszlo-nxml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for OpenLaszlo." t)
-
-(nxhtml-autoload 'csound-sgml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on mutiple major modes for CSound orc/sco Modes." t)
-
-(let ((loads (get 'mumamo-noweb2 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mumamo-fun" loads) nil (put 'mumamo-noweb2 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mumamo-fun" loads))))
-
-(nxhtml-autoload 'noweb2-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Multi major mode for noweb files." t)
-
-(nxhtml-autoload 'asp-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for ASP with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'org-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for `org-mode' files with main mode `org-mode'.
-** Note about HTML subchunks:
-Unfortunately this only allows `html-mode' (not `nxhtml-mode') in
-sub chunks." t)
-
-(nxhtml-autoload 'mako-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Mako with main mode `html-mode'.
-This also covers inlined style and javascript." t)
-
-(nxhtml-autoload 'xsl-nxml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multi major mode for XSL with main mode `nxml-mode'.
-This covers inlined style and javascript." t)
-
-(nxhtml-autoload 'xsl-sgml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multi major mode for XSL with main mode `sgml-mode'.
-This covers inlined style and javascript." t)
-
-(nxhtml-autoload 'markdown-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multi major markdown mode in buffer.
-Main major mode will be `markdown-mode'.
-Inlined html will be in `html-mode'.
-
-You need `markdown-mode' which you can download from URL
-`http://jblevins.org/projects/markdown-mode/'." t)
-
-(nxhtml-autoload 'latex-clojure-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multi major mode latex+clojure.
-Main major mode will be `latex-mode'.
-Subchunks will be in `clojure-mode'.
-
-You will need `clojure-mode' which you can download from URL
-`http://github.com/jochu/clojure-mode/tree'." t)
-
-(nxhtml-autoload 'latex-haskell-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multi major mode latex+haskell.
-Main major mode will be `latex-mode'.
-Subchunks will be in `haskell-mode'.
-
-You will need `haskell-mode' which you can download from URL
-`http://projects.haskell.org/haskellmode-emacs/'." t)
-
-(nxhtml-autoload 'python-rst-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\
-Turn on multiple major modes for Python with RestructuredText docstrings." t)
-
-;;;***
-
-;;;### (autoloads (mumamo-add-region-from-string mumamo-add-region)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/mumamo-regions" "../../../../.emacs.d/nxhtml/util/mumamo-regions.el"
-;;;;;; (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mumamo-regions.el
-(web-autoload-require 'mumamo-regions 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-regions" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'mumamo-add-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-regions" nxhtml-install-dir) "\
-Add a mumamo region from selection.
-Mumamo regions are like another layer of chunks above the normal chunks.
-They does not affect the normal chunks, but they overrides them.
-
-To create a mumamo region first select a visible region and then
-call this function.
-
-If the buffer is not in a multi major mode a temporary multi
-major mode will be created applied to the buffer first.
-To get out of this and get back to a single major mode just use
-
- M-x normal-mode
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'mumamo-add-region-from-string `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-regions" nxhtml-install-dir) "\
-Add a mumamo region from string at point.
-Works as `mumamo-add-region' but for string or comment at point.
-
-Buffer must be fontified.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (n-back-game n-back) "../../../../../.emacs.d/nxhtml/util/n-back"
-;;;;;; "../../../../.emacs.d/nxhtml/util/n-back.el" (19278 19348))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/n-back.el
-(web-autoload-require 'n-back 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/n-back" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'n-back 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/n-back" loads) nil (put 'n-back 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/n-back" loads))))
-
-(nxhtml-autoload 'n-back-game `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/n-back" nxhtml-install-dir) "\
-Emacs n-Back game.
-This game is supposed to increase your working memory and fluid
-intelligence.
-
-In this game something is shown for half a second on the screen
-and maybe a sound is played. You should then answer if parts of
-it is the same as you have seen or heard before. This is
-repeated for about 20 trials.
-
-You answer with the keys shown in the bottom window.
-
-In the easiest version of the game you should answer if you have
-just seen or heard what is shown now. By default the game gets
-harder as you play it with success. Then first the number of
-items presented in a trial grows. After that it gets harder by
-that you have to somehow remember not the last item, but the item
-before that (or even earlier). That is what \"n-Back\" stands
-for.
-
-Note that remember does not really mean remember clearly. The
-game is for training your brain getting used to keep those things
-in the working memory, maybe as a cross-modal unit. You are
-supposed to just nearly be able to do what you do in the game.
-And you are supposed to have fun, that is what your brain like.
-
-You should probably not overdue this. Half an hour a day playing
-might be an optimal time according to some people.
-
-The game is shamelessly modeled after Brain Workshop, see URL
-`http://brainworkshop.sourceforge.net/' just for the fun of
-getting it into Emacs. The game resembles but it not the same as
-that used in the report by Jaeggi mentioned at the above URL.
-
-Not all features in Brain Workshop are implemented here, but some
-new are maybe ... - and you have it available here in Emacs.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (ocr-user-mode) "../../../../../.emacs.d/nxhtml/util/ocr-user"
-;;;;;; "../../../../.emacs.d/nxhtml/util/ocr-user.el" (19290 25228))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ocr-user.el
-(web-autoload-require 'ocr-user 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ocr-user" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'ocr-user-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ocr-user" nxhtml-install-dir) "\
-Color up digits three by three.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (ourcomments-warning ourcomments-M-x-menu-mode
-;;;;;; ourcomments-paste-with-convert-mode use-custom-style info-open-file
-;;;;;; replace-read-files rdir-query-replace ldir-query-replace
-;;;;;; grep-query-replace emacs-Q-nxhtml emacs-Q emacs--no-desktop
-;;;;;; emacs--debug-init emacs-buffer-file emacs emacs-restart ourcomments-ido-ctrl-tab
-;;;;;; ourcomments-ido-buffer-raise-frame ourcomments-ido-buffer-other-frame
-;;;;;; ourcomments-ido-buffer-other-window describe-symbol describe-defstruct
-;;;;;; describe-custom-group narrow-to-comment buffer-narrowed-p
-;;;;;; describe-command ourcomments-ediff-files find-emacs-other-file
-;;;;;; ourcomments-insert-date-and-time describe-timers ourcomments-copy+paste-set-point
-;;;;;; better-fringes-mode describe-key-and-map-briefly ourcomments-move-end-of-line
-;;;;;; ourcomments-move-beginning-of-line ourcomments-mark-whole-buffer-or-field
-;;;;;; fill-dwim unfill-individual-paragraphs unfill-region unfill-paragraph
-;;;;;; define-toggle-old define-toggle popup-menu-at-point ourcomments-indirect-fun)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/ourcomments-util" "../../../../.emacs.d/nxhtml/util/ourcomments-util.el"
-;;;;;; (19412 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ourcomments-util.el
-(web-autoload-require 'ourcomments-util 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'ourcomments-indirect-fun `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Get the alias symbol for function FUN if any.
-
-\(fn FUN)" nil nil)
-
-(nxhtml-autoload 'popup-menu-at-point `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Popup the given menu at point.
-This is similar to `popup-menu' and MENU and PREFIX has the same
-meaning as there. The position for the popup is however where
-the window point is.
-
-\(fn MENU &optional PREFIX)" nil nil)
-
-(nxhtml-autoload 'define-toggle `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Declare SYMBOL as a customizable variable with a toggle function.
-The purpose of this macro is to define a defcustom and a toggle
-function suitable for use in a menu.
-
-The arguments have the same meaning as for `defcustom' with these
-restrictions:
-
-- The :type keyword cannot be used. Type is always 'boolean.
-- VALUE must be t or nil.
-
-DOC and ARGS are just passed to `defcustom'.
-
-A `defcustom' named SYMBOL with doc-string DOC and a function
-named SYMBOL-toggle is defined. The function toggles the value
-of SYMBOL. It takes no parameters.
-
-To create a menu item something similar to this can be used:
-
- (define-key map [SYMBOL]
- (list 'menu-item \"Toggle nice SYMBOL\"
- 'SYMBOL-toggle
- :button '(:toggle . SYMBOL)))
-
-\(fn SYMBOL VALUE DOC &rest ARGS)" nil (quote macro))
-
-(put 'define-toggle 'doc-string-elt '3)
-
-(nxhtml-autoload 'define-toggle-old `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Not documented
-
-\(fn SYMBOL VALUE DOC &rest ARGS)" nil (quote macro))
-
-(put 'define-toggle-old 'doc-string-elt '3)
-
-(nxhtml-autoload 'unfill-paragraph `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Unfill the current paragraph.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'unfill-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Unfill the current region.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'unfill-individual-paragraphs `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Unfill individual paragraphs in the current region.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'fill-dwim `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Fill or unfill paragraph or region.
-With prefix ARG fill only current line.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'ourcomments-mark-whole-buffer-or-field `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Mark whole buffer or editable field at point.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'ourcomments-move-beginning-of-line `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Move point to beginning of line or indentation.
-See `beginning-of-line' for ARG.
-
-If `line-move-visual' is non-nil then the visual line beginning
-is first tried.
-
-If in a widget field stay in that.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'ourcomments-move-end-of-line `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Move point to end of line or after last non blank char.
-See `end-of-line' for ARG.
-
-Similar to `ourcomments-move-beginning-of-line' but for end of
-line.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'describe-key-and-map-briefly `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Try to print names of keymap from which KEY fetch its definition.
-Look in current active keymaps and find keymap variables with the
-same value as the keymap where KEY is bound. Print a message
-with those keymap variable names. Return a list with the keymap
-variable symbols.
-
-When called interactively prompt for KEY.
-
-INSERT and UNTRANSLATED should normall be nil (and I am not sure
-what they will do ;-).
-
-\(fn &optional KEY INSERT UNTRANSLATED)" t nil)
-
-(defvar better-fringes-mode nil "\
-Non-nil if Better-Fringes mode is enabled.
-See the command `better-fringes-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `better-fringes-mode'.")
-
-(nxhtml-custom-autoload 'better-fringes-mode '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil)
-
-(nxhtml-autoload 'better-fringes-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Choose another fringe bitmap color and bottom angle.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'ourcomments-copy+paste-set-point `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Set point for copy+paste here.
-Enable temporary minor mode `ourcomments-copy+paste-mode'.
-However if point for copy+paste already is set then cancel it and
-disable the minor mode.
-
-The purpose of this command is to make it easy to grab a piece of
-text and paste it at current position. After this command you
-should select a piece of text to copy and then call the command
-`ourcomments-copy+paste'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'describe-timers `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Show timers with readable time format.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'ourcomments-insert-date-and-time `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Insert date and time.
-See option `ourcomments-insert-date-and-time' for how to
-customize it.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'find-emacs-other-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Find corresponding file to source or installed elisp file.
-If you have checked out and compiled Emacs yourself you may have
-Emacs lisp files in two places, the checked out source tree and
-the installed Emacs tree. If buffer contains an Emacs elisp file
-in one of these places then find the corresponding elisp file in
-the other place. Return the file name of this file.
-
-Rename current buffer using your `uniquify-buffer-name-style' if
-it is set.
-
-When DISPLAY-FILE is non-nil display this file in other window
-and go to the same line number as in the current buffer.
-
-\(fn DISPLAY-FILE)" t nil)
-
-(nxhtml-autoload 'ourcomments-ediff-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-In directory DEF-DIR run `ediff-files' on files FILE-A and FILE-B.
-The purpose of this function is to make it eaiser to start
-`ediff-files' from a shell through Emacs Client.
-
-This is used in EmacsW32 in the file ediff.cmd where Emacs Client
-is called like this:
-
- @%emacs_client% -e \"(setq default-directory \\\"%emacs_cd%\\\")\"
- @%emacs_client% -n -e \"(ediff-files \\\"%f1%\\\" \\\"%f2%\\\")\"
-
-It can of course be done in a similar way with other shells.
-
-\(fn DEF-DIR FILE-A FILE-B)" nil nil)
-
-(nxhtml-autoload 'describe-command `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Like `describe-function', but prompts only for interactive commands.
-
-\(fn COMMAND)" t nil)
-
-(nxhtml-autoload 'buffer-narrowed-p `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Return non-nil if the current buffer is narrowed.
-
-\(fn)" nil nil)
-
-(nxhtml-autoload 'narrow-to-comment `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'describe-custom-group `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Describe customization group SYMBOL.
-
-\(fn SYMBOL)" t nil)
-
-(nxhtml-autoload 'describe-defstruct `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Not documented
-
-\(fn SYMBOL)" t nil)
-
-(nxhtml-autoload 'describe-symbol `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Show information about SYMBOL.
-Show SYMBOL plist and whether is is a variable or/and a
-function.
-
-\(fn SYMBOL)" t nil)
-
-(nxhtml-autoload 'ourcomments-ido-buffer-other-window `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Show buffer in other window.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'ourcomments-ido-buffer-other-frame `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Show buffer in other frame.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'ourcomments-ido-buffer-raise-frame `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Raise frame showing buffer.
-
-\(fn)" t nil)
-
-(defvar ourcomments-ido-ctrl-tab nil "\
-Non-nil if Ourcomments-Ido-Ctrl-Tab mode is enabled.
-See the command `ourcomments-ido-ctrl-tab' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `ourcomments-ido-ctrl-tab'.")
-
-(nxhtml-custom-autoload 'ourcomments-ido-ctrl-tab '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil)
-
-(nxhtml-autoload 'ourcomments-ido-ctrl-tab `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Enable buffer switching using C-Tab with function `ido-mode'.
-This changes buffer switching with function `ido-mode' the
-following way:
-
-- You can use C-Tab.
-
-- You can show the selected buffer in three ways independent of
- how you entered function `ido-mode' buffer switching:
-
- * S-return: other window
- * C-return: other frame
- * M-return: raise frame
-
-Those keys are selected to at least be a little bit reminiscent
-of those in for example common web browsers.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'emacs-restart `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Restart Emacs and start `server-mode' if on before.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'emacs `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Start a new Emacs with default parameters.
-Additional ARGS are passed to the new Emacs.
-
-See also `ourcomments-started-emacs-use-output-buffer'.
-
-\(fn &rest ARGS)" t nil)
-
-(nxhtml-autoload 'emacs-buffer-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Start a new Emacs showing current buffer file.
-Go to the current line and column in that file.
-If there is no buffer file then instead start with `dired'.
-
-This calls the function `emacs' with argument --no-desktop and
-the file or a call to dired.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'emacs--debug-init `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Start a new Emacs with --debug-init parameter.
-This calls the function `emacs' with added arguments ARGS.
-
-\(fn &rest ARGS)" t nil)
-
-(nxhtml-autoload 'emacs--no-desktop `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Start a new Emacs with --no-desktop parameter.
-This calls the function `emacs' with added arguments ARGS.
-
-\(fn &rest ARGS)" t nil)
-
-(nxhtml-autoload 'emacs-Q `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Start a new Emacs with -Q parameter.
-Start new Emacs without any customization whatsoever.
-This calls the function `emacs' with added arguments ARGS.
-
-\(fn &rest ARGS)" t nil)
-
-(nxhtml-autoload 'emacs-Q-nxhtml `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Start new Emacs with -Q and load nXhtml.
-This calls the function `emacs' with added arguments ARGS.
-
-\(fn &rest ARGS)" t nil)
-
-(nxhtml-autoload 'grep-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Do `query-replace-regexp' of FROM with TO, on all files in *grep*.
-Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue].
-
-\(fn FROM TO &optional DELIMITED)" t nil)
-
-(nxhtml-autoload 'ldir-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Replace FROM with TO in FILES in directory DIR.
-This runs `query-replace-regexp' in files matching FILES in
-directory DIR.
-
-See `tags-query-replace' for DELIMETED and more information.
-
-\(fn FROM TO FILES DIR &optional DELIMITED)" t nil)
-
-(nxhtml-autoload 'rdir-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Replace FROM with TO in FILES in directory tree ROOT.
-This runs `query-replace-regexp' in files matching FILES in
-directory tree ROOT.
-
-See `tags-query-replace' for DELIMETED and more information.
-
-\(fn FROM TO FILE-REGEXP ROOT &optional DELIMITED)" t nil)
-
-(nxhtml-autoload 'replace-read-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Read files arg for replace.
-
-\(fn REGEXP &optional REPLACE)" nil nil)
-
-(nxhtml-autoload 'info-open-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Open an info file in `Info-mode'.
-
-\(fn INFO-FILE)" t nil)
-
-(nxhtml-autoload 'use-custom-style `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Setup like in `Custom-mode', but without things specific to Custom.
-
-\(fn)" nil nil)
-
-(defvar ourcomments-paste-with-convert-mode nil "\
-Non-nil if Ourcomments-Paste-With-Convert mode is enabled.
-See the command `ourcomments-paste-with-convert-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `ourcomments-paste-with-convert-mode'.")
-
-(nxhtml-custom-autoload 'ourcomments-paste-with-convert-mode '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil)
-
-(nxhtml-autoload 'ourcomments-paste-with-convert-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Pasted text may be automatically converted in this mode.
-The functions in `ourcomments-paste-with-convert-hook' are run
-after commands in `ourcomments-paste-with-convert-commands' if any
-of the functions returns non-nil that text is inserted instead of
-the original text.
-
-For exampel when this mode is on and you paste an html link in an
-`org-mode' buffer it will be directly converted to an org style
-link. (This is the default behaviour.)
-
-Tip: The Firefox plugin Copy as HTML Link is handy, see URL
- `https://addons.mozilla.org/en-US/firefox/addon/2617'.
-
-Note: This minor mode will defadvice the paste commands.
-
-\(fn &optional ARG)" t nil)
-
-(defvar ourcomments-M-x-menu-mode nil "\
-Non-nil if Ourcomments-M-X-Menu mode is enabled.
-See the command `ourcomments-M-x-menu-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `ourcomments-M-x-menu-mode'.")
-
-(nxhtml-custom-autoload 'ourcomments-M-x-menu-mode '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil)
-
-(nxhtml-autoload 'ourcomments-M-x-menu-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Add commands started from Emacs menus to M-x history.
-The purpose of this is to make it easier to redo them and easier
-to learn how to do them from the command line (which is often
-faster if you know how to do it).
-
-Only commands that are not already in M-x history are added.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'ourcomments-warning `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\
-Not documented
-
-\(fn FORMAT-STRING &rest ARGS)" nil nil)
-
-;;;***
-
-;;;### (autoloads (major-modep major-or-multi-majorp) "../../../../../.emacs.d/nxhtml/util/ourcomments-widgets"
-;;;;;; "../../../../.emacs.d/nxhtml/util/ourcomments-widgets.el"
-;;;;;; (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ourcomments-widgets.el
-(web-autoload-require 'ourcomments-widgets 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-widgets" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
- (nxhtml-autoload 'command "ourcomments-widgets")
-
-(nxhtml-autoload 'major-or-multi-majorp `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-widgets" nxhtml-install-dir) "\
-Return t if VALUE is a major or multi major mode function.
-
-\(fn VALUE)" nil nil)
-
-(nxhtml-autoload 'major-modep `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-widgets" nxhtml-install-dir) "\
-Return t if VALUE is a major mode function.
-
-\(fn VALUE)" nil nil)
- (nxhtml-autoload 'major-mode-function "ourcomments-widgets")
-
-;;;***
-
-;;;### (autoloads (pause-start-in-new-emacs pause-mode pause) "../../../../../.emacs.d/nxhtml/util/pause"
-;;;;;; "../../../../.emacs.d/nxhtml/util/pause.el" (19335 62524))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/pause.el
-(web-autoload-require 'pause 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pause" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'pause 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/pause" loads) nil (put 'pause 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/pause" loads))))
-
-(defvar pause-mode nil "\
-Non-nil if Pause mode is enabled.
-See the command `pause-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `pause-mode'.")
-
-(nxhtml-custom-autoload 'pause-mode '../../../../../.emacs.d/nxhtml/util/pause nil)
-
-(nxhtml-autoload 'pause-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pause" nxhtml-install-dir) "\
-This minor mode tries to make you take a break.
-It will jump up and temporary stop your work - even if you are
-not in Emacs. If you are in Emacs it will however try to be
-gentle and wait until you have been idle with the keyboard for a
-short while. (If you are not in Emacs it can't be gentle. How
-could it?)
-
-Then it will show you a special screen with a link to a yoga
-exercise you can do when you pause.
-
-After the pause you continue your work where you were
-interrupted.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'pause-start-in-new-emacs `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pause" nxhtml-install-dir) "\
-Start pause with interval AFTER-MINUTES in a new Emacs instance.
-The new Emacs instance will be started with -Q. However if
-`custom-file' is non-nil it will be loaded so you can still
-customize pause.
-
-One way of using this function may be to put in your .emacs
-something like
-
- ;; for just one Emacs running pause
- (when server-mode (pause-start-in-new-emacs 15))
-
-See `pause-start' for more info.
-
-\(fn AFTER-MINUTES)" t nil)
-
-;;;***
-
-;;;### (autoloads (global-pointback-mode pointback-mode) "../../../../../.emacs.d/nxhtml/util/pointback"
-;;;;;; "../../../../.emacs.d/nxhtml/util/pointback.el" (19023 47098))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/pointback.el
-(web-autoload-require 'pointback 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pointback" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'pointback-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pointback" nxhtml-install-dir) "\
-Restore previous window point when switching back to a buffer.
-
-\(fn &optional ARG)" t nil)
-
-(defvar global-pointback-mode nil "\
-Non-nil if Global-Pointback mode is enabled.
-See the command `global-pointback-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `global-pointback-mode'.")
-
-(nxhtml-custom-autoload 'global-pointback-mode '../../../../../.emacs.d/nxhtml/util/pointback nil)
-
-(nxhtml-autoload 'global-pointback-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pointback" nxhtml-install-dir) "\
-Toggle Pointback mode in every possible buffer.
-With prefix ARG, turn Global-Pointback mode on if and only if
-ARG is positive.
-Pointback mode is enabled in all buffers where
-`pointback-on' would do it.
-See `pointback-mode' for more information on Pointback mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (popcmp-completing-read popcmp-completion-style
-;;;;;; popcmp) "../../../../../.emacs.d/nxhtml/util/popcmp" "../../../../.emacs.d/nxhtml/util/popcmp.el"
-;;;;;; (19365 37362))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/popcmp.el
-(web-autoload-require 'popcmp 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/popcmp" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'popcmp 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/popcmp" loads) nil (put 'popcmp 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/popcmp" loads))))
-
-(defvar popcmp-completion-style (cond (t 'popcmp-popup)) "\
-Completion style.
-The currently available completion styles are:
-
-- popcmp-popup: Use OS popup menus (default).
-- emacs-default: Emacs default completion.
-- Company Mode completion.
-- anything: The Anything elisp lib completion style.
-
-The style of completion set here is not implemented for all
-completions. The scope varies however with which completion
-style you have choosen.
-
-For information about Company Mode and how to use it see URL
-`http://www.emacswiki.org/emacs/CompanyMode'.
-
-For information about Anything and how to use it see URL
-`http://www.emacswiki.org/emacs/Anything'.
-
-See also the options `popcmp-short-help-beside-alts' and
-`popcmp-group-alternatives' which are also availabe when popup
-completion is available.")
-
-(nxhtml-custom-autoload 'popcmp-completion-style '../../../../../.emacs.d/nxhtml/util/popcmp nil)
-
-(nxhtml-autoload 'popcmp-completing-read `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/popcmp" nxhtml-install-dir) "\
-Read a string in the minubuffer with completion, or popup a menu.
-This function can be used instead `completing-read'. The main
-purpose is to provide a popup style menu for completion when
-completion is tighed to text at point in a buffer. If a popup
-menu is used it will be shown at window point. Whether a popup
-menu or minibuffer completion is used is governed by
-`popcmp-completion-style'.
-
-The variables PROMPT, TABLE, PREDICATE, REQUIRE-MATCH,
-INITIAL-INPUT, POP-HIST, DEF and INHERIT-INPUT-METHOD all have the
-same meaning is for `completing-read'.
-
-ALT-HELP should be nil or a hash variable or an association list
-with the completion alternative as key and a short help text as
-value. You do not need to supply help text for all alternatives.
-The use of ALT-HELP is set by `popcmp-short-help-beside-alts'.
-
-ALT-SETS should be nil or an association list that has as keys
-groups and as second element an alternative that should go into
-this group.
-
-\(fn PROMPT TABLE &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT POP-HIST DEF INHERIT-INPUT-METHOD ALT-HELP ALT-SETS)" nil nil)
-
-;;;***
-
-;;;### (autoloads (rebind-keys-mode rebind) "../../../../../.emacs.d/nxhtml/util/rebind"
-;;;;;; "../../../../.emacs.d/nxhtml/util/rebind.el" (19292 15280))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/rebind.el
-(web-autoload-require 'rebind 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rebind" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'rebind 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/rebind" loads) nil (put 'rebind 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/rebind" loads))))
-
-(defvar rebind-keys-mode nil "\
-Non-nil if Rebind-Keys mode is enabled.
-See the command `rebind-keys-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `rebind-keys-mode'.")
-
-(nxhtml-custom-autoload 'rebind-keys-mode '../../../../../.emacs.d/nxhtml/util/rebind nil)
-
-(nxhtml-autoload 'rebind-keys-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rebind" nxhtml-install-dir) "\
-Rebind keys as defined in `rebind-keys'.
-The key bindings will override almost all other key bindings
-since it is put on emulation level, like for example ``cua-mode'
-and `viper-mode'.
-
-This is for using for example C-a to mark the whole buffer (or a
-field). There are some predifined keybindings for this.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (rnc-mode) "../../../../../.emacs.d/nxhtml/util/rnc-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/util/rnc-mode.el" (18775 63606))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/rnc-mode.el
-(web-autoload-require 'rnc-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rnc-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'rnc-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rnc-mode" nxhtml-install-dir) "\
-Major mode for editing RELAX NG Compact Syntax schemas.
-\\{rnc-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (search-form) "../../../../../.emacs.d/nxhtml/util/search-form"
-;;;;;; "../../../../.emacs.d/nxhtml/util/search-form.el" (19276
-;;;;;; 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/search-form.el
-(web-autoload-require 'search-form 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/search-form" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'search-form `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/search-form" nxhtml-install-dir) "\
-Display a form for search and replace.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (sex-mode sex) "../../../../../.emacs.d/nxhtml/util/sex-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/util/sex-mode.el" (19218 45784))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/sex-mode.el
-(web-autoload-require 'sex-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sex-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'sex 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/sex-mode" loads) nil (put 'sex 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/sex-mode" loads))))
-
-(defvar sex-mode nil "\
-Non-nil if Sex mode is enabled.
-See the command `sex-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `sex-mode'.")
-
-(nxhtml-custom-autoload 'sex-mode '../../../../../.emacs.d/nxhtml/util/sex-mode nil)
-
-(nxhtml-autoload 'sex-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sex-mode" nxhtml-install-dir) "\
-Open certain files in external programs.
-See `sex-get-file-open-cmd' for how to determine which files to
-open by external applications. Note that this selection is
-nearly the same as in `org-mode'. The main difference is that
-the fallback always is to open a file in Emacs. (This is
-necessary to avoid to disturb many of Emacs operations.)
-
-This affects all functions that opens files, like `find-file',
-`find-file-noselect' etc.
-
-However it does not affect files opened through Emacs client.
-
-Urls can also be handled, see `sex-handle-urls'.
-
-When opening a file with the shell a (temporary) dummy buffer is
-created in Emacs with major mode `sex-file-mode' and an external
-program is called to handle the file. How this dummy buffer is
-handled is governed by `sex-keep-dummy-buffer'.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (sml-modeline-mode sml-modeline) "../../../../../.emacs.d/nxhtml/util/sml-modeline"
-;;;;;; "../../../../.emacs.d/nxhtml/util/sml-modeline.el" (19362
-;;;;;; 52688))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/sml-modeline.el
-(web-autoload-require 'sml-modeline 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sml-modeline" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'sml-modeline 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/sml-modeline" loads) nil (put 'sml-modeline 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/sml-modeline" loads))))
-
-(defvar sml-modeline-mode nil "\
-Non-nil if Sml-Modeline mode is enabled.
-See the command `sml-modeline-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `sml-modeline-mode'.")
-
-(nxhtml-custom-autoload 'sml-modeline-mode '../../../../../.emacs.d/nxhtml/util/sml-modeline nil)
-
-(nxhtml-autoload 'sml-modeline-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sml-modeline" nxhtml-install-dir) "\
-Show buffer size and position like scrollbar in mode line.
-You can customize this minor mode, see option `sml-modeline-mode'.
-
-Note: If you turn this mode on then you probably want to turn off
-option `scroll-bar-mode'.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (tabkey2-emma-without-tabkey2 tabkey2-mode tabkey2)
-;;;;;; "../../../../../.emacs.d/nxhtml/util/tabkey2" "../../../../.emacs.d/nxhtml/util/tabkey2.el"
-;;;;;; (19278 3422))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/tabkey2.el
-(web-autoload-require 'tabkey2 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tabkey2" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'tabkey2 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/tabkey2" loads) nil (put 'tabkey2 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/tabkey2" loads))))
-
-(defvar tabkey2-mode nil "\
-Non-nil if Tabkey2 mode is enabled.
-See the command `tabkey2-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `tabkey2-mode'.")
-
-(nxhtml-custom-autoload 'tabkey2-mode '../../../../../.emacs.d/nxhtml/util/tabkey2 nil)
-
-(nxhtml-autoload 'tabkey2-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tabkey2" nxhtml-install-dir) "\
-More fun with Tab key number two (completion etc).
-This global minor mode by default binds Tab in a way that let you
-do completion with Tab in all buffers (where it is possible).
-
-The Tab key is easy to type on your keyboard. Then why not use
-it for completion, something that is very useful? Shells usually
-use Tab for completion so many are used to it. This was the idea
-of Smart Tabs and this is a generalization of that idea.
-
-However in Emacs the Tab key is usually used for indentation.
-The idea here is that if Tab has been pressed once for
-indentation, then as long as point stays further Tab keys might
-as well do completion.
-
-So you kind of do Tab-Tab for first completion (and then just
-Tab for further completions as long as point is not moved).
-
-And there is even kind of Tab-Tab-Tab completion: If completion
-fails the next completion function will be the one you try with
-next Tab. (You get some notification of this, of course.)
-
-See `tabkey2-first' for more information about usage.
-
-Note: If you do not want the Tab-Tab behaviour above, but still
-want an easy way to reach the available completion functions,
-then you can instead of turning on tabkey2-mode enter this in
-your .emacs:
-
- (global-set-key [f8] 'tabkey2-cycle-completion-functions)
-
-After hitting f8 you will then be in the same state as after the
-first in tabkey2-mode.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'tabkey2-emma-without-tabkey2 `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tabkey2" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" nil nil)
-
-;;;***
-
-;;;### (autoloads (tyda-mode) "../../../../../.emacs.d/nxhtml/util/tyda"
-;;;;;; "../../../../.emacs.d/nxhtml/util/tyda.el" (19276 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/tyda.el
-(web-autoload-require 'tyda 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tyda" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(defvar tyda-mode nil "\
-Non-nil if Tyda mode is enabled.
-See the command `tyda-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `tyda-mode'.")
-
-(nxhtml-custom-autoload 'tyda-mode '../../../../../.emacs.d/nxhtml/util/tyda nil)
-
-(nxhtml-autoload 'tyda-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tyda" nxhtml-install-dir) "\
-Minor mode for key bindings for `tyda-lookup-word'.
-It binds Alt-Mouse-1 just as the Tyda add-on does in Firefox.
-Here are all key bindings
-
-\\{tyda-mode-map}
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (udev-call-first-step) "../../../../../.emacs.d/nxhtml/util/udev"
-;;;;;; "../../../../.emacs.d/nxhtml/util/udev.el" (19412 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/udev.el
-(web-autoload-require 'udev 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'udev-call-first-step `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev" nxhtml-install-dir) "\
-Set up and call first step.
-Set up buffer LOG-BUFFER to be used for log messages and
-controling of the execution of the functions in list STEPS which
-are executed one after another.
-
-Write HEADER at the end of LOG-BUFFER.
-
-Call first step.
-
-If FINISH-FUN non-nil it should be a function. This is called
-after last step with LOG-BUFFER as parameter.
-
-\(fn LOG-BUFFER STEPS HEADER FINISH-FUN)" nil nil)
-
-;;;***
-
-;;;### (autoloads (udev-ecb-customize-startup udev-ecb-update) "../../../../../.emacs.d/nxhtml/util/udev-ecb"
-;;;;;; "../../../../.emacs.d/nxhtml/util/udev-ecb.el" (19256 9012))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/udev-ecb.el
-(web-autoload-require 'udev-ecb 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-ecb" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'udev-ecb-update `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-ecb" nxhtml-install-dir) "\
-Fetch and install ECB from the devel sources.
-To determine where to store the sources see `udev-ecb-dir'.
-For how to start ECB see `udev-ecb-load-ecb'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'udev-ecb-customize-startup `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-ecb" nxhtml-install-dir) "\
-Customize ECB dev nXhtml startup group.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (udev-rinari-update) "../../../../../.emacs.d/nxhtml/util/udev-rinari"
-;;;;;; "../../../../.emacs.d/nxhtml/util/udev-rinari.el" (19256
-;;;;;; 9012))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/udev-rinari.el
-(web-autoload-require 'udev-rinari 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-rinari" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'udev-rinari-update `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-rinari" nxhtml-install-dir) "\
-Fetch and install Rinari from the devel sources.
-To determine where to store the sources and how to start rinari
-see `udev-rinari-dir' and `udev-rinari-load-rinari'.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (viper-tutorial) "../../../../../.emacs.d/nxhtml/util/viper-tut"
-;;;;;; "../../../../.emacs.d/nxhtml/util/viper-tut.el" (19389 13794))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/viper-tut.el
-(web-autoload-require 'viper-tut 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/viper-tut" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'viper-tutorial `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/viper-tut" nxhtml-install-dir) "\
-Run a tutorial for Viper.
-
-A simple classic tutorial in 5 parts that have been used by many
-people starting to learn vi keys. You may learn enough to start
-using `viper-mode' in Emacs.
-
-Some people find that vi keys helps against repetetive strain
-injury, see URL
-
- `http://www.emacswiki.org/emacs/RepeatedStrainInjury'.
-
-Note: There might be a few clashes between vi key binding and
-Emacs standard key bindings. You will be notified about those in
-the tutorial. Even more, if your own key bindings comes in
-between you will be notified about that too.
-
-\(fn PART &optional DONT-ASK-FOR-REVERT)" t nil)
-
-;;;***
-
-;;;### (autoloads (vline-global-mode vline-mode) "../../../../../.emacs.d/nxhtml/util/vline"
-;;;;;; "../../../../.emacs.d/nxhtml/util/vline.el" (19157 2170))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/vline.el
-(web-autoload-require 'vline 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/vline" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'vline-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/vline" nxhtml-install-dir) "\
-Display vertical line mode.
-
-\(fn &optional ARG)" t nil)
-
-(defvar vline-global-mode nil "\
-Non-nil if Vline-Global mode is enabled.
-See the command `vline-global-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `vline-global-mode'.")
-
-(nxhtml-custom-autoload 'vline-global-mode '../../../../../.emacs.d/nxhtml/util/vline nil)
-
-(nxhtml-autoload 'vline-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/vline" nxhtml-install-dir) "\
-Display vertical line mode as globally.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (whelp) "../../../../../.emacs.d/nxhtml/util/whelp"
-;;;;;; "../../../../.emacs.d/nxhtml/util/whelp.el" (19278 3422))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/whelp.el
-(web-autoload-require 'whelp 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/whelp" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'whelp 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/whelp" loads) nil (put 'whelp 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/whelp" loads))))
-
-;;;***
-
-;;;### (autoloads (winsav-switch-config winsav-save-full-config winsav-save-mode
-;;;;;; winsav winsav-put-window-tree) "../../../../../.emacs.d/nxhtml/util/winsav"
-;;;;;; "../../../../.emacs.d/nxhtml/util/winsav.el" (19295 41684))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/winsav.el
-(web-autoload-require 'winsav 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'winsav-put-window-tree `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\
-Put window structure SAVED-TREE into WINDOW.
-Restore a structure SAVED-TREE returned from
-`winsav-get-window-tree' into window WINDOW.
-
-If COPY-WIN-OVL is non-nil then overlays having a 'window
-property pointing to one of the windows in SAVED-TREE where this
-window still is shown will be copied to a new overlay with
-'window property pointing to the corresponding new window.
-
-If WIN-OVL-ALL-BUFS is non-nil then all buffers will be searched
-for overlays with a 'window property of the kind above.
-
-At the very end of this function the hook `winsav-after-put' is
-run.
-
-\(fn SAVED-TREE WINDOW &optional COPY-WIN-OVL WIN-OVL-ALL-BUFS)" nil nil)
-
-(let ((loads (get 'winsav 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/winsav" loads) nil (put 'winsav 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/winsav" loads))))
-
-(defvar winsav-save-mode nil "\
-Non-nil if Winsav-Save mode is enabled.
-See the command `winsav-save-mode' for a description of this minor mode.")
-
-(nxhtml-custom-autoload 'winsav-save-mode '../../../../../.emacs.d/nxhtml/util/winsav nil)
-
-(nxhtml-autoload 'winsav-save-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\
-Toggle winsav configuration saving mode.
-With numeric ARG, turn winsav saving on if ARG is positive, off
-otherwise.
-
-When this mode is turned on, winsav configurations are saved from
-one session to another. A winsav configuration consists of
-frames, windows and visible buffers configurations plus
-optionally buffers and files managed by the functions used by
-option `desktop-save-mode'
-
-By default this is integrated with `desktop-save-mode'. If
-`desktop-save-mode' is on and `winsav-handle-also-desktop' is
-non-nil then save and restore also desktop.
-
-See the command `winsav-switch-config' for more information and
-other possibilities.
-
-Note: If you want to avoid saving when you exit just turn off
-this minor mode.
-
-For information about what is saved and restored and how to save
-and restore additional information see the function
-`winsav-save-configuration'.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'winsav-save-full-config `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\
-Saved current winsav configuration in directory DIRNAME.
-Then change to this configuration.
-
-See also `winsav-switch-config'.
-
-\(fn DIRNAME)" nil nil)
-
-(nxhtml-autoload 'winsav-switch-config `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\
-Change to winsav configuration in directory DIRNAME.
-If DIRNAME is the current winsav configuration directory then
-offer to save it or restore it from saved values.
-
-Otherwise, before switching offer to save the current winsav
-configuration. Then finally switch to the new winsav
-configuration, creating it if it does not exist.
-
-If option `desktop-save-mode' is on then buffers and files are also
-restored and saved the same way.
-
-See also option `winsav-save-mode' and command
-`winsav-tell-configuration'.
-
-\(fn DIRNAME)" t nil)
-
-;;;***
-
-;;;### (autoloads (winsav-rotate winsize-set-mode-line-colors winsize-save-window-configuration
-;;;;;; winsize-balance-siblings resize-windows) "../../../../../.emacs.d/nxhtml/util/winsize"
-;;;;;; "../../../../.emacs.d/nxhtml/util/winsize.el" (19292 53308))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/winsize.el
-(web-autoload-require 'winsize 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'resize-windows `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\
-Start window resizing.
-During resizing a window is selected. You can move its
-borders. In the default configuration the arrow keys moves the
-right or bottom border if they are there. To move the opposite
-border use S-arrowkeys.
-
-You can also do other window operations, like splitting, deleting
-and balancing the sizes. The keybindings below describes the key
-bindings during resizing:\\<winsize-keymap>
-
- `balance-windows' \\[balance-windows]
- `winsize-balance-siblings' \\[winsize-balance-siblings]
- `fit-window-to-buffer' \\[fit-window-to-buffer]
- `shrink-window-if-larger-than-buffer' \\[shrink-window-if-larger-than-buffer]
-
- `winsav-rotate' \\[winsav-rotate]
-
- `winsize-move-border-up' \\[winsize-move-border-up]
- `winsize-move-border-down' \\[winsize-move-border-down]
- `winsize-move-border-left' \\[winsize-move-border-left]
- `winsize-move-border-right' \\[winsize-move-border-right]
-
- `winsize-to-border-or-window-left' \\[winsize-to-border-or-window-left]
- `winsize-to-border-or-window-up' \\[winsize-to-border-or-window-up]
- `winsize-to-border-or-window-right' \\[winsize-to-border-or-window-right]
- `winsize-to-border-or-window-down' \\[winsize-to-border-or-window-down]
-
- Note that you can also use your normal keys for
- `forward-char', `backward-char', `next-line', `previous-line'
- and what you have on HOME and END to move in the windows. That
- might sometimes be necessary to directly select a
- window. (You may however also use `other-window' or click
- with the mouse, see below.)
-
- `delete-window' \\[delete-window]
- `delete-other-windows' \\[delete-other-windows]
- `split-window-vertically' \\[split-window-vertically]
- `split-window-horizontally' \\[split-window-horizontally]
- `other-window' \\[other-window]
-
- `winsize-save-window-configuration' \\[winsize-save-window-configuration]
- `winsize-next-window-configuration' \\[winsize-next-window-configuration]
- `winsize-previous-window-configuration' \\[winsize-previous-window-configuration]
-
- `mouse-set-point' \\[mouse-set-point]
-
- `winsize-quit' \\[winsize-quit]
- `winsize-stop-go-back' \\[winsize-stop-go-back]
- `winsize-stop' \\[winsize-stop]
- `winsize-stop-and-execute' \\[winsize-stop-and-execute]
-
- `winsize-help' \\[winsize-help]
- `describe-key' \\[describe-key]
- `describe-key-briefly' \\[describe-key-briefly]
- (All the normal help keys work, and at least those above will
- play well with resizing.)
-
-Nearly all other keys exits window resizing and they are also
-executed. However, the key sequences in `winsize-let-me-use' and
-dito for commands there are also executed without exiting
-resizing.
-
-The colors of the modelines are changed to those given in
-`winsize-mode-line-colors' to indicate that you are resizing
-windows. To make this indication more prominent the text in the
-selected window is marked with the face hold in the variable
-`winsize-selected-window-face'.
-
-The option `winsize-juris-way' decides how the borders to move
-are selected. If this option is non-nil then the right or bottom
-border are the ones that are moved with the arrow keys and the
-opposite border with shift arrow keys.
-
-If `winsize-juris-way' is nil then the following apply:
-
-As you select other borders or move to new a window the mouse
-pointer is moved inside the selected window to show which borders
-are beeing moved. The mouse jumps a little bit to make its
-position more visible. You can turn this off by customizing
-`winsize-make-mouse-prominent'.
-
-Which borders initially are choosen are controlled by the
-variable `winsize-autoselect-borders'.
-
-** Example: Border selection, movements and windows.
-
- Suppose you have a frame divided into windows like in the
- figure below. If window B is selected when you start resizing
- then (with default settings) the borders marked with 'v' and
- 'h' will be the ones that the arrow keys moves. To indicate
- this the mouse pointer is placed in the right lower corner of
- the selected window B.
-
- +----------+-----------+--------+
- | | v |
- | | v |
- | A | _B_ v |
- | | v |
- | | v |
- | | x v |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
- Now if you press M-<left> then the picture below shows what has
- happened. Note that the selected vertical border is now the one
- between A and B. The mouse pointer has moved to the
- corresponding corner in the window B, which is still selected.
-
- +----------+-----------+--------+
- | v | |
- | v | |
- | A v _B_ | |
- | v | |
- | v | |
- | v x | |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
- Press M-<left> once again. This gives this picture:
-
- +----------+-----------+--------+
- | v | |
- | v | |
- | _A_ v B | |
- | v | |
- | v | |
- | x v | |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
- Note that the window A is now selected. However there is no
- border that could be moved to the left of this window (which
- would otherwise be chosen now) so the border between A and B is
- still the one that <left> and <right> moves. The mouse has
- moved to A.
-
- If we now delete window A the new situation will look like
- this:
-
- +----------+-----------+--------+
- | | |
- | | |
- | _B_ | |
- | | |
- | | |
- | x | |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
-
-
->>>> testing stuff >>>>
-`help-mode-hook'
-`temp-buffer-show-function'
-`view-exit-action'
-<<<<<<<<<<<<<<<<<<<<<<<
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'winsize-balance-siblings `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\
-Make current window siblings the same height or width.
-It works the same way as `balance-windows', but only for the
-current window and its siblings.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'winsize-save-window-configuration `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'winsize-set-mode-line-colors `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\
-Turn mode line colors on if ON is non-nil, otherwise off.
-
-\(fn ON)" nil nil)
-
-(nxhtml-autoload 'winsav-rotate `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\
-Rotate window configuration on selected frame.
-MIRROR should be either 'mirror-left-right, 'mirror-top-bottom or
-nil. In the first case the window configuration is mirrored
-vertically and in the second case horizontally. If MIRROR is nil
-the configuration is not mirrored.
-
-If TRANSPOSE is non-nil then the window structure is transposed
-along the diagonal from top left to bottom right (in analogy with
-matrix transosition).
-
-If called interactively MIRROR will is 'mirror-left-right by
-default, but 'mirror-top-bottom if called with prefix. TRANSPOSE
-is t. This mean that the window configuration will be turned one
-quarter clockwise (or counter clockwise with prefix).
-
-\(fn MIRROR TRANSPOSE)" t nil)
-
-;;;***
-
-;;;### (autoloads (wrap-to-fill-column-mode wrap-to-fill-left-marg-modes
-;;;;;; wrap-to-fill-left-marg wrap-to-fill) "../../../../../.emacs.d/nxhtml/util/wrap-to-fill"
-;;;;;; "../../../../.emacs.d/nxhtml/util/wrap-to-fill.el" (19306
-;;;;;; 54112))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/wrap-to-fill.el
-(web-autoload-require 'wrap-to-fill 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/wrap-to-fill" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'wrap-to-fill 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/wrap-to-fill" loads) nil (put 'wrap-to-fill 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/wrap-to-fill" loads))))
-
-(defvar wrap-to-fill-left-marg nil "\
-Left margin handling for `wrap-to-fill-column-mode'.
-Used by `wrap-to-fill-column-mode'. If nil then center the
-display columns. Otherwise it should be a number which will be
-the left margin.")
-
-(nxhtml-custom-autoload 'wrap-to-fill-left-marg '../../../../../.emacs.d/nxhtml/util/wrap-to-fill t)
-
-(defvar wrap-to-fill-left-marg-modes '(text-mode fundamental-mode) "\
-Major modes where `wrap-to-fill-left-margin' may be nil.")
-
-(nxhtml-custom-autoload 'wrap-to-fill-left-marg-modes '../../../../../.emacs.d/nxhtml/util/wrap-to-fill t)
-
-(nxhtml-autoload 'wrap-to-fill-column-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/wrap-to-fill" nxhtml-install-dir) "\
-Use `fill-column' display columns in buffer windows.
-By default the display columns are centered, but see the option
-`wrap-to-fill-left-marg'.
-
-Fix-me:
-Note 1: When turning this on `visual-line-mode' is also turned on. This
-is not reset when turning off this mode.
-
-Note 2: The text properties 'wrap-prefix and 'wrap-to-fill-prefix
-is set by this mode to indent continuation lines.
-
-Key bindings added by this minor mode:
-
-\\{wrap-to-fill-column-mode-map}
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (zencoding-preview zencoding-expand-yas zencoding-mode
-;;;;;; zencoding-expand-line zencoding) "../../../../../.emacs.d/nxhtml/util/zencoding-mode"
-;;;;;; "../../../../.emacs.d/nxhtml/util/zencoding-mode.el" (19276
-;;;;;; 1446))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/zencoding-mode.el
-(web-autoload-require 'zencoding-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(let ((loads (get 'zencoding 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/zencoding-mode" loads) nil (put 'zencoding 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/zencoding-mode" loads))))
-
-(nxhtml-autoload 'zencoding-expand-line `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\
-Replace the current line's zencode expression with the corresponding expansion.
-If prefix ARG is given or region is visible call `zencoding-preview' to start an
-interactive preview.
-
-Otherwise expand line directly.
-
-For more information see `zencoding-mode'.
-
-\(fn ARG)" t nil)
-
-(nxhtml-autoload 'zencoding-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\
-Minor mode for writing HTML and CSS markup.
-With zen coding for HTML and CSS you can write a line like
-
- ul#name>li.item*2
-
-and have it expanded to
-
- <ul id=\"name\">
- <li class=\"item\"></li>
- <li class=\"item\"></li>
- </ul>
-
-This minor mode defines keys for quick access:
-
-\\{zencoding-mode-keymap}
-
-Home page URL `http://www.emacswiki.org/emacs/ZenCoding'.
-
-See also `zencoding-expand-line'.
-
-\(fn &optional ARG)" t nil)
-
-(nxhtml-autoload 'zencoding-expand-yas `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\
-Not documented
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'zencoding-preview `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\
-Expand zencode between BEG and END interactively.
-This will show a preview of the expanded zen code and you can
-accept it or skip it.
-
-\(fn BEG END)" t nil)
-
-;;;***
-
-;;;### (autoloads (web-vcs-investigate-elisp-file web-vcs-byte-compile-file
-;;;;;; web-vcs-message-with-face web-vcs-get-files-from-root web-vcs-log-edit
-;;;;;; web-vcs-default-download-directory) "../../../../../.emacs.d/nxhtml/web-vcs"
-;;;;;; "../../../../.emacs.d/nxhtml/web-vcs.el" (19412 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/web-vcs.el
-(web-autoload-require 'web-vcs 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'web-vcs-default-download-directory `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\
-Try to find a suitable place.
-Considers site-start.el, site-
-
-\(fn)" nil nil)
-
-(nxhtml-autoload 'web-vcs-log-edit `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\
-Open log file.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'web-vcs-get-files-from-root `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\
-Download a file tree from VCS system using the web interface.
-Use WEB-VCS entry in variable `web-vcs-links-regexp' to download
-files via http from URL to directory DL-DIR.
-
-Show URL first and offer to visit the page. That page will give
-you information about version control system (VCS) system used
-etc.
-
-\(fn WEB-VCS URL DL-DIR)" nil nil)
-
-(nxhtml-autoload 'web-vcs-message-with-face `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\
-Display a colored message at the bottom of the string.
-FACE is the face to use for the message.
-FORMAT-STRING and ARGS are the same as for `message'.
-
-Also put FACE on the message in *Messages* buffer.
-
-\(fn FACE FORMAT-STRING &rest ARGS)" nil nil)
-
-(nxhtml-autoload 'web-vcs-byte-compile-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\
-Byte compile FILE in a new Emacs sub process.
-EXTRA-LOAD-PATH is added to the front of `load-path' during
-compilation.
-
-FILE is set to `buffer-file-name' when called interactively.
-If LOAD
-
-\(fn FILE &optional LOAD EXTRA-LOAD-PATH COMP-DIR)" t nil)
-
-(nxhtml-autoload 'web-vcs-investigate-elisp-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\
-Not documented
-
-\(fn FILE-OR-BUFFER)" t nil)
-
-;;;***
-
-;;;### (autoloads nil nil ("../../../../.emacs.d/nxhtml/autostart.el"
-;;;;;; "../../../../.emacs.d/nxhtml/autostart22.el" "../../../../.emacs.d/nxhtml/etc/schema/schema-path-patch.el"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml-base.el" "../../../../.emacs.d/nxhtml/nxhtml-loaddefs.el"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-imenu.el" "../../../../.emacs.d/nxhtml/nxhtml/html-move.el"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-quote.el" "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-autoload.el"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-strval.el" "../../../../.emacs.d/nxhtml/nxhtml/nxhtmljs.el"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/outline-magic.el" "../../../../.emacs.d/nxhtml/nxhtml/wtest.el"
-;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-helpers.el"
-;;;;;; "../../../../.emacs.d/nxhtml/related/flymakemsg.el" "../../../../.emacs.d/nxhtml/related/flymu.el"
-;;;;;; "../../../../.emacs.d/nxhtml/related/php-imenu.el" "../../../../.emacs.d/nxhtml/tests/angus77-setup-jde.el"
-;;;;;; "../../../../.emacs.d/nxhtml/tests/emacstest-suites.el" "../../../../.emacs.d/nxhtml/tests/ert2.el"
-;;;;;; "../../../../.emacs.d/nxhtml/tests/hfy-test.el" "../../../../.emacs.d/nxhtml/tests/inemacs/bug1013.el"
-;;;;;; "../../../../.emacs.d/nxhtml/tests/mumamo-test.el" "../../../../.emacs.d/nxhtml/tests/nxhtmltest-helpers.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/appmenu-fold.el" "../../../../.emacs.d/nxhtml/util/css-simple-completion.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/custsets.el" "../../../../.emacs.d/nxhtml/util/ecb-batch-compile.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/fupd.el" "../../../../.emacs.d/nxhtml/util/idn.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/key-cat.el" "../../../../.emacs.d/nxhtml/util/mumamo-aspnet.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/mumamo-trace.el" "../../../../.emacs.d/nxhtml/util/new-key-seq-widget.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/nxml-mode-os-additions.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/org-panel.el" "../../../../.emacs.d/nxhtml/util/rxi.el"
-;;;;;; "../../../../.emacs.d/nxhtml/util/useful-commands.el" "../../../../.emacs.d/nxhtml/web-autoload.el")
-;;;;;; (19826 40509 115984))
-
-;;;***
-
-;;;### (autoloads (nxhtml-byte-recompile-file nxhtml-byte-compile-file
-;;;;;; nxhtml-get-missing-files nxhtml-update-existing-files nxhtml-setup-download-all
-;;;;;; nxhtml-setup-auto-download nxhtml-setup-install) "../../../../../.emacs.d/nxhtml/nxhtml-web-vcs"
-;;;;;; "../../../../.emacs.d/nxhtml/nxhtml-web-vcs.el" (19412 30366))
-;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml-web-vcs.el
-(web-autoload-require 'nxhtml-web-vcs 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir 'nxhtml-byte-compile-file)
-
-
-(nxhtml-autoload 'nxhtml-setup-install `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Setup and start nXhtml installation.
-
-This is for installation and updating directly from the nXhtml
-development sources.
-
-There are two different ways to install:
-
- (1) Download all at once: `nxhtml-setup-download-all'
- (2) Automatically download part by part: `nxhtml-setup-auto-download'
-
-You can convert between those ways by calling this function again.
-You can also do this by setting the option `nxhtml-autoload-web' yourself.
-
-When you have nXhtml installed you can update it:
-
- (3) Update new files in nXhtml: `nxhtml-update-existing-files'
-
-To learn more about nXhtml visit its home page at URL
-`http://www.emacswiki.com/NxhtmlMode/'.
-
-If you want to test auto download (but not use it further) there
-is a special function for that, you answer T here:
-
- (T) Test automatic download part by part: `nxhtml-setup-test-auto-download'
-
-======
-*Note*
-If you want to download a zip file with latest released version instead then
-please see URL `http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html'.
-
-\(fn WAY)" t nil)
-
-(nxhtml-autoload 'nxhtml-setup-auto-download `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Set up to autoload nXhtml files from the web.
-
-This function will download some initial files and then setup to
-download the rest when you need them.
-
-Files will be downloaded under the directory root you specify in
-DL-DIR.
-
-Note that files will not be upgraded automatically. The auto
-downloading is just for files you are missing. (This may change a
-bit in the future.) If you want to upgrade those files that you
-have downloaded you can just call `nxhtml-update-existing-files'.
-
-You can easily switch between this mode of downloading or
-downloading the whole of nXhtml by once. To switch just call the
-command `nxhtml-setup-install'.
-
-See also the command `nxhtml-setup-download-all'.
-
-Note: If your nXhtml is to old you can't use this function
- directly. You have to upgrade first, se the function
- above. Version 2.07 or above is good for this.
-
-\(fn DL-DIR)" t nil)
-
-(nxhtml-autoload 'nxhtml-setup-download-all `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Download or update all of nXhtml.
-
-You can download all if nXhtml with this command.
-
-To update existing files use `nxhtml-update-existing-files'.
-
-If you want to download only those files you are actually using
-then call `nxhtml-setup-auto-download' instead.
-
-See the command `nxhtml-setup-install' for a convenient way to
-call these commands.
-
-For more information about auto download of nXhtml files see
-`nxhtml-setup-auto-download'.
-
-\(fn DL-DIR)" t nil)
-
-(nxhtml-autoload 'nxhtml-update-existing-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Update existing nXhtml files from the development sources.
-Only files you already have will be updated.
-
-Note that this works both if you have setup nXhtml to auto
-download files as you need them or if you have downloaded all of
-nXhtml at once.
-
-For more information about installing and updating nXhtml see the
-command `nxhtml-setup-install'.
-
-\(fn)" t nil)
-
-(nxhtml-autoload 'nxhtml-get-missing-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Not documented
-
-\(fn SUB-DIR FILE-NAME-LIST)" nil nil)
-
-(nxhtml-autoload 'nxhtml-byte-compile-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Not documented
-
-\(fn FILE &optional LOAD)" nil nil)
-
-(nxhtml-autoload 'nxhtml-byte-recompile-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\
-Byte recompile FILE file if necessary.
-For more information see `nxhtml-byte-compile-file'.
-Loading is done if recompiled and LOAD is t.
-
-\(fn FILE &optional LOAD)" t nil)
-
-;;;***
diff --git a/emacs.d/nxhtml/nxhtml-web-vcs.el b/emacs.d/nxhtml/nxhtml-web-vcs.el
deleted file mode 100644
index fb0fb09..0000000
--- a/emacs.d/nxhtml/nxhtml-web-vcs.el
+++ /dev/null
@@ -1,689 +0,0 @@
-;;; nxhtml-web-vcs.el --- nXhtml things for web-vcs.el
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2010-01-13 Wed
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'nxhtml-base nil t))
-;;(eval-when-compile (require 'nxhtmlmaint nil t))
-(eval-when-compile (require 'web-vcs nil t))
-
-(defvar nxhtml-web-vcs-file (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name)
- "This file.")
-
-(defun nxhtml-require-base ()
- (require 'nxhtml-base nil t)
- (unless (featurep 'nxhtml-base)
- ;; At startup, need to load it by hand.
- (let ((load-path load-path))
- (add-to-list 'load-path (file-name-directory nxhtml-web-vcs-file))
- (require 'nxhtml-base))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Repository URL
-
-
-;;(nxhtml-default-download-directory)
-(defun nxhtml-default-download-directory ()
- (let* ((ur (expand-file-name "" "~"))
- (ur-len (length ur))
- (full (if (and (boundp 'nxhtml-install-dir)
- nxhtml-install-dir)
- nxhtml-install-dir
- (file-name-as-directory
- (expand-file-name ""
- (web-vcs-default-download-directory)))))
- (full-len (length full)))
- (if (and (> full-len ur-len)
- (string= ur (substring full 0 ur-len)))
- (concat "~" (substring full ur-len))
- full)))
-
-
-(defun nxhtml-web-vcs-read-dl-dir (prompt)
- "Return current nXhtml install dir or read dir."
- (or (and (boundp 'nxhtml-install-dir)
- nxhtml-install-dir)
- (let* ((pr (concat
- "A directory named 'nxhtml' will be created below the root you give."
- "\n"
- prompt))
- (root (read-directory-name pr (nxhtml-default-download-directory))))
- (when root
- (expand-file-name "nxhtml" root)))))
-
-;;(call-interactively 'nxhtml-setup-install)
-;; (read-key "Prompt: ")
-;; (y-or-n-p "Prompt")
-;;;###autoload
-(defun nxhtml-setup-install (way)
- "Setup and start nXhtml installation.
-
-This is for installation and updating directly from the nXhtml
-development sources.
-
-There are two different ways to install:
-
- (1) Download all at once: `nxhtml-setup-download-all'
- (2) Automatically download part by part: `nxhtml-setup-auto-download'
-
-You can convert between those ways by calling this function again.
-You can also do this by setting the option `nxhtml-autoload-web' yourself.
-
-When you have nXhtml installed you can update it:
-
- (3) Update new files in nXhtml: `nxhtml-update-existing-files'
-
-To learn more about nXhtml visit its home page at URL
-`http://www.emacswiki.com/NxhtmlMode/'.
-
-If you want to test auto download \(but not use it further) there
-is a special function for that, you answer T here:
-
- (T) Test automatic download part by part: `nxhtml-setup-test-auto-download'
-
-======
-*Note*
-If you want to download a zip file with latest released version instead then
-please see URL `http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html'."
- (interactive (let ((curr-cfg (current-window-configuration)))
- (describe-function 'nxhtml-setup-install)
- (select-window (get-buffer-window (help-buffer)))
- (delete-other-windows)
- (list
- (let* ((key nil)
- (has-nxhtml (and (boundp 'nxhtml-install-dir) nxhtml-install-dir))
- (current-way (if has-nxhtml
- (if (and (boundp 'nxhtml-autoload-web)
- nxhtml-autoload-web)
- "Your current setup is to download part by part from the web."
- "Your current setup it to download all of nXhtml at once.")
- "(You have not currently installed nXhtml.)"))
- (prompt (concat "Setup nXhtml install."
- "\n" current-way
- "\n"
- "\n(1) Download whole at once, or (2) part by part as needed"
- (if has-nxhtml "\n(3) Update your existing nXhtml" "")
- "\n(T) For temporary testing downloading part by part"
- "\n"
- "\n(? for help, q to quit): "))
- (allowed-keys (if has-nxhtml
- '(?1 ?2 ?3 ?T ?q 7)
- '(?1 ?2 ?T ?q 7)))
- (please nil))
- (while (not (member key allowed-keys))
- (if (not (member key '(??)))
- (when key
- (unless please
- (setq prompt (concat "Please answer with one of the alternatives.\n\n"
- prompt))
- (setq please t)))
- (describe-function 'nxhtml-setup-install)
- (select-window (get-buffer-window (help-buffer)))
- (delete-other-windows))
- (setq key (web-vcs-read-key prompt))
- ;;(message "key = %S" key) (sit-for 1)
- )
- (case key
- (7 (set-window-configuration curr-cfg)
- nil)
- (?1 'whole)
- (?2 'part-by-part)
- (?3 'update-existing)
- (?T 'test-part-by-part)
- )))))
- (message "")
- (case way
- (whole (call-interactively 'nxhtml-setup-download-all))
- (part-by-part (call-interactively 'nxhtml-setup-auto-download))
- (update-existing (call-interactively 'nxhtml-update-existing-files))
- (test-part-by-part (call-interactively 'nxhtml-setup-test-auto-download))
- ((eq nil way) nil)
- (t (error "Unknown way = %S" way))))
-
-(defvar nxhtml-basic-files '(
- "nxhtml-base.el"
- "nxhtml-loaddefs.el"
- "web-autoload.el"
- "etc/schema/schema-path-patch.el"
- "nxhtml/nxhtml-autoload.el"
- "autostart.el"
- ))
-
-;;;###autoload
-(defun nxhtml-setup-auto-download (dl-dir)
- "Set up to autoload nXhtml files from the web.
-
-This function will download some initial files and then setup to
-download the rest when you need them.
-
-Files will be downloaded under the directory root you specify in
-DL-DIR.
-
-Note that files will not be upgraded automatically. The auto
-downloading is just for files you are missing. (This may change a
-bit in the future.) If you want to upgrade those files that you
-have downloaded you can just call `nxhtml-update-existing-files'.
-
-You can easily switch between this mode of downloading or
-downloading the whole of nXhtml by once. To switch just call the
-command `nxhtml-setup-install'.
-
-See also the command `nxhtml-setup-download-all'.
-
-Note: If your nXhtml is to old you can't use this function
- directly. You have to upgrade first, se the function
- above. Version 2.07 or above is good for this."
- (interactive (progn
- (describe-function 'nxhtml-setup-auto-download)
- (select-window (get-buffer-window (help-buffer)))
- (delete-other-windows)
- (nxhtml-check-convert-to-part-by-part)
- (list
- (progn
- (when (and (boundp 'nxhtml-autoload-web)
- (not nxhtml-autoload-web))
- (unless (yes-or-no-p "Convert to updating nXhtml part by part? ")
- (throw 'command-level nil)))
- (nxhtml-web-vcs-read-dl-dir "Download nXhtml part by part to directory: ")))))
- (catch 'command-level
- (if (not dl-dir)
- (unless (with-no-warnings (called-interactively-p))
- (error "dl-dir should be a directory"))
- (nxhtml-check-convert-to-part-by-part)
- (when (and (boundp 'nxhtml-install-dir)
- nxhtml-install-dir)
- (unless (string= (file-truename dl-dir)
- (file-truename nxhtml-install-dir))
- (error "Download dir must be same as nxhtml-install-dir=%S" nxhtml-install-dir)))
- (let* (;; Need some files:
- (web-vcs-el-src (concat (file-name-sans-extension web-vcs-el-this) ".el"))
- (web-vcs-el (expand-file-name (file-name-nondirectory web-vcs-el-src)
- dl-dir))
- (vcs 'lp)
- (base-url (nxhtml-download-root-url nil))
- (byte-comp (if (boundp 'web-autoload-autocompile)
- web-autoload-autocompile
- t))
- (has-nxhtml (and (boundp 'nxhtml-install-dir)
- nxhtml-install-dir))
- (web-vcs-folder-cache nil))
- (setq nxhtml-install-dir dl-dir)
- (let ((root (file-name-directory dl-dir)))
- (unless (file-exists-p root)
- (unless (yes-or-no-p (format "Directory %S does not exist, create it? " root))
- (error "Aborted by user"))))
- (make-directory dl-dir t)
- (setq message-log-max t)
- (view-echo-area-messages)
- (message "")
- (message "")
- (web-vcs-message-with-face 'web-vcs-green "==== Starting nXhtml part by part state ====")
- (message "has-nxhtml=%s" has-nxhtml)
- ;; Fix-me: First copy this file and web-vcs.el to its destination:
- (unless (string= (file-truename dl-dir)
- (file-truename (file-name-directory nxhtml-web-vcs-file)))
- (dolist (f (list web-vcs-el-src nxhtml-web-vcs-file))
- (copy-file f (expand-file-name (file-name-nondirectory f) dl-dir)
- 'ok-overwrite)))
- (when byte-comp (web-vcs-byte-compile-newer-file web-vcs-el t))
- ;; Get basic file list:
- (catch 'web-autoload-comp-restart
- ;;(let ((file-mask (regexp-opt nxhtml-basic-files)))
- ;; (web-vcs-get-missing-matching-files vcs base-url dl-dir file-mask))
- (dolist (f nxhtml-basic-files)
- (web-vcs-get-missing-matching-files vcs base-url dl-dir f))
- ;; Autostart.el has not run yet, add download dir to load-path.
- (let ((load-path (cons (file-name-directory web-vcs-el) load-path)))
- (when byte-comp
- (dolist (file nxhtml-basic-files)
- (let ((el-file (expand-file-name file dl-dir)))
- (web-vcs-byte-compile-newer-file el-file nil)))))
- (let ((autostart-file (expand-file-name "autostart" dl-dir)))
- ;;(ad-deactivate 'require)
- (web-vcs-set&save-option 'nxhtml-autoload-web t)
- (web-vcs-log nil nil "* nXhtml: Download Part by Part as Needed\n")
- (load autostart-file)
- (unless (ad-is-active 'require) (ad-activate 'require))
- (web-vcs-log-save)
- (web-vcs-message-with-face 'web-vcs-green "==== Basic files for nXhtml part by part are now installed ====")
- (web-vcs-display-messages t)
- (unless has-nxhtml (nxhtml-add-loading-to-custom-file autostart-file t))))))))
-
-;;(call-interactively 'nxhtml-download)
-;;;###autoload
-(defun nxhtml-setup-download-all (dl-dir)
- "Download or update all of nXhtml.
-
-You can download all if nXhtml with this command.
-
-To update existing files use `nxhtml-update-existing-files'.
-
-If you want to download only those files you are actually using
-then call `nxhtml-setup-auto-download' instead.
-
-See the command `nxhtml-setup-install' for a convenient way to
-call these commands.
-
-For more information about auto download of nXhtml files see
-`nxhtml-setup-auto-download'."
- (interactive (progn
- (describe-function 'nxhtml-setup-auto-download)
- (select-window (get-buffer-window (help-buffer)))
- (delete-other-windows)
- ;;(nxhtml-check-convert-to-part-by-part)
- (list
- (nxhtml-web-vcs-read-dl-dir "Download whole nXhtml to directory: "))))
-
- (let ((root (file-name-directory dl-dir)))
- (unless (file-exists-p root)
- (unless (yes-or-no-p (format "Directory %S does not exist, create it? " root))
- (error "Aborted by user"))))
- (make-directory dl-dir t)
- (let ((msg (concat "Downloading nXhtml through Launchpad web interface will take rather long\n"
- "time (5-15 minutes) so you may want to do it in a separate Emacs session.\n\n"
- "Do you want to download using this Emacs session? "
- )))
- (if (not (y-or-n-p msg))
- (message "Aborted")
- (setq message-log-max t)
- (let ((do-byte (y-or-n-p "Do you want to byte compile the files after downloading? ")))
- (nxhtml-download-1 dl-dir nil do-byte)))))
-
-
-(defun nxhtml-download-1 (dl-dir revision do-byte)
- "Download nXhtml to directory DL-DIR.
-If REVISION is nil download latest revision, otherwise the
-specified one.
-
-If DO-BYTE is non-nil byte compile nXhtml after download."
- (let* ((has-nxhtml (and (boundp 'nxhtml-install-dir)
- nxhtml-install-dir))
- (base-url nxhtml-web-vcs-base-url)
- (files-url (concat base-url "files/"))
- ;;(revs-url (concat base-url "changes/"))
- (rev-part (if revision (number-to-string revision) "head%3A/"))
- (full-root-url (concat files-url rev-part))
- (web-vcs-folder-cache nil)
- (web-autoload-paranoid nil))
- ;;(nxhtml-require-base)
- (when (web-vcs-get-files-from-root 'lp full-root-url dl-dir)
- (web-vcs-display-messages t)
- (web-vcs-log nil nil "* nXhtml: Download All\n")
- (web-vcs-set&save-option 'nxhtml-autoload-web nil)
- (message "")
- (web-vcs-message-with-face 'web-vcs-green "==== Starting downloading whole nXhtml ====")
- (let ((autostart-file (expand-file-name "autostart" dl-dir)))
- (load autostart-file)
- (web-vcs-log-save)
- (web-vcs-message-with-face 'web-vcs-green "==== All files for nXhtml are now installed ====")
- (nxhtmlmaint-byte-recompile)
- (unless has-nxhtml (nxhtml-add-loading-to-custom-file autostart-file nil))))))
-
-(defun nxhtml-check-convert-to-part-by-part ()
- (when (and (boundp 'nxhtml-install-dir)
- nxhtml-install-dir)
- (unless (and (boundp 'nxhtml-autoload-web)
- nxhtml-autoload-web)
- (if (not (boundp 'nxhtml-menu:version))
- (error "nxhtml-install-dir set but no version found")
- (unless (string-match "[\.0-9]+" nxhtml-menu:version)
- (error "Can't find current version nxhtml-menu:version=%S" nxhtml-menu:version))
- (let* ((ver-str (match-string 0 nxhtml-menu:version))
- (ver-num (string-to-number ver-str)))
- (when (< ver-num 2.07)
- (web-vcs-message-with-face 'web-vcs-red "Too old nXhtml for download part by part.")
- (throw 'command-level nil)))))))
-
-
-;;(directory-files default-directory nil "\\el$")
-;;(directory-files default-directory nil "[^#~]$")
-;;;###autoload
-(defun nxhtml-update-existing-files ()
- "Update existing nXhtml files from the development sources.
-Only files you already have will be updated.
-
-Note that this works both if you have setup nXhtml to auto
-download files as you need them or if you have downloaded all of
-nXhtml at once.
-
-For more information about installing and updating nXhtml see the
-command `nxhtml-setup-install'."
- ;; Fix-me: download new files too if you are not auto downloading.
- (interactive)
- (when (y-or-n-p "Do you want to update your nXhtml files? ")
- (message "")
- (web-vcs-display-messages t)
- (web-vcs-message-with-face 'web-vcs-yellow "*\nStarting updating your nXhtml files.\n*\n")
- (message nil)
- (web-vcs-clear-folder-cache)
- (let ((vcs 'lp)
- (base-url (nxhtml-download-root-url nil))
- (dl-dir nxhtml-install-dir)
- web-vcs-folder-cache)
- (setq dl-dir (file-name-as-directory dl-dir))
- (web-vcs-update-existing-files vcs base-url dl-dir dl-dir)
- (web-vcs-clear-folder-cache))
- (display-buffer (get-buffer-create "*Compile-Log*"))
- (nxhtmlmaint-byte-recompile)
- (web-vcs-log-save)
- (web-vcs-message-with-face 'web-vcs-yellow "*\nFinished updating your nXhtml files.\n*\n")
- (message nil)))
-
-
-;;(nxhtml-maybe-download-files (expand-file-name "nxhtml/doc/img/" nxhtml-install-dir) nil)
-;;;###autoload
-(defun nxhtml-get-missing-files (sub-dir file-name-list)
- (let (file-mask
- (root-url (nxhtml-download-root-url nil))
- files-regexp
- (full-dir (expand-file-name sub-dir nxhtml-install-dir))
- miss-names)
- (if file-name-list
- (progn
- (dolist (f file-name-list)
- (let ((full-f (expand-file-name f full-dir)))
- (unless (file-exists-p full-f)
- (setq miss-names (cons f miss-names)))))
- (setq files-regexp (regexp-opt miss-names)))
- (setq files-regexp ".*"))
- ;;(unless (file-exists-p full-dir) (make-directory full-dir t))
- (setq file-mask
- (concat (file-relative-name (file-name-as-directory full-dir)
- nxhtml-install-dir)
- files-regexp))
- (let ((web-vcs-folder-cache nil))
- (web-vcs-get-missing-matching-files 'lp root-url nxhtml-install-dir
- file-mask))))
-
-;; Fix-me: Does not work, Emacs Bug
-;; Maybe use wget? http://gnuwin32.sourceforge.net/packages/wget.htm
-;; http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5103
-;; (nxhtml-get-release-revision)
-(defun nxhtml-get-release-revision ()
- "Get revision number for last release."
- (let* ((all-rev-url "http://code.launchpad.net/%7Enxhtml/nxhtml/main")
- (url-buf (url-retrieve-synchronously all-rev-url))
- (vcs-rec (or (assq 'lp web-vcs-links-regexp)
- (error "Does not know web-vcs 'lp")))
- (rel-ver-regexp (nth 6 vcs-rec))
- )
- (message "%S" url-buf)
- (with-current-buffer url-buf
- (when (re-search-forward rel-ver-regexp nil t)
- (match-string 1)))))
-
-;;;###autoload
-(defun nxhtml-byte-compile-file (file &optional load)
- (let ((extra-load-path (when nxhtml-install-dir
- (mapcar (lambda (p)
- (file-name-as-directory
- (expand-file-name p nxhtml-install-dir)))
- '("tests" "related" "nxhtml" "util" ".")))))
- ;; (message "nxhtml-byte-compile-file:extra-load-path=%s" extra-load-path)
- (web-vcs-byte-compile-file file load extra-load-path)))
-
-;; fix-me: change web-vcs-byte-compile-file instead
-;;;###autoload
-(defun nxhtml-byte-recompile-file (file &optional load)
- "Byte recompile FILE file if necessary.
-For more information see `nxhtml-byte-compile-file'.
-Loading is done if recompiled and LOAD is t."
- (interactive (list (buffer-file-name)
- t))
- (let ((elc-file (byte-compile-dest-file file)))
- (if (file-newer-than-file-p file elc-file)
- (nxhtml-byte-compile-file file load)
- (message "Byte compilation of this file is up to date."))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Add to custom file
-
-
-(defvar nxhtml-handheld-wincfg nil)
-(defun nxhtml-handheld-restore-wincg ()
- (when nxhtml-handheld-wincfg
- (set-window-configuration nxhtml-handheld-wincfg)
- (setq nxhtml-handheld-wincfg nil)))
-
-;;(nxhtml-handheld-add-loading-to-custom-file "TEST-ME")
-(defun nxhtml-handheld-add-loading-to-custom-file (file-to-load)
- (setq nxhtml-handheld-wincfg (current-window-configuration))
- (delete-other-windows)
- (let ((info-buf (get-buffer-create "Information about how to add nXhtml to (custom-file)"))
- (load-str (format "(load %S)" file-to-load)))
- (with-current-buffer info-buf
- (add-hook 'kill-buffer-hook 'nxhtml-handheld-restore-wincg nil t)
- (insert "Insert the following line to (custom-file), ie the file in the other window:\n\n")
- (let ((here (point)))
- (insert " "
- (propertize load-str 'face 'secondary-selection)
- "\n")
- (copy-region-as-kill here (point))
- (insert "\nThe line above is in the clipboard so you can just paste it where you want it.\n")
- (insert "When ready kill this buffer.")
- (goto-char here))
- (setq buffer-read-only t)
- (set-buffer-modified-p nil))
- (set-window-buffer (selected-window) info-buf)
- (find-file-other-window (custom-file))))
-
-;; (nxhtml-add-loading-to-custom-file "test-file")
-(defun nxhtml-add-loading-to-custom-file (file-to-load part-by-part)
- (message "")
- (require 'cus-edit)
- (if (not (condition-case nil (custom-file) (error nil)))
- (progn
- (message "\n\n")
- (web-vcs-message-with-face
- 'web-vcs-red
- (concat "Since you have started this Emacs session without running your init files"
- "\nthey are unknown and the installation can not add the statement below."
- "\nTo finish the setup of nXhtml you must add"
- "\n\n (load %S)"
- "\n\nto your custom-file if you have not done it yet."
- "\nYou must also customize the variable `nxhtml-autoload-web' to tell that"
- (if part-by-part
- "\nyou want to download nXhml files as you need them."
- "\nyou do not want to allow automatic downloading of nXhtml files."
- )
- "\n")
- file-to-load)
- (message "")
- (web-vcs-display-messages t))
- (let ((prompt (concat "Basic setup of nXhtml is done, but it must be loaded from (custom-file)."
- "\nShould I add loading of nXhtml to (custom-file) for you? ")))
- (if (yes-or-no-p prompt)
- (nxhtml-add-loading-to-custom-file-auto file-to-load)
- (if (yes-or-no-p "Should I guide you through how to do it? ")
- (nxhtml-handheld-add-loading-to-custom-file file-to-load)
- (web-vcs-message-with-face 'web-vcs-green
- "OK. You need to add (load %S) to your init file" file-to-load))))))
-
-;; Fix-me: really do this? Is it safe enough?
-(defun nxhtml-add-loading-to-custom-file-auto (file-to-load)
- (unless (file-name-absolute-p file-to-load)
- (error "nxhtml-add-loading-to-custom-file: Not abs file name: %S" file-to-load))
- (let ((old-buf (find-buffer-visiting (custom-file)))
- (full-to-load (expand-file-name file-to-load)))
- (with-current-buffer (or old-buf (find-file-noselect (custom-file)))
- (save-restriction
- (widen)
- (catch 'done
- (while (progn
- (while (progn (skip-chars-forward " \t\n\^l")
- (looking-at ";"))
- (forward-line 1))
- (not (eobp)))
- (let ((start (point))
- (form (read (current-buffer))))
- (when (eq (nth 0 form) 'load)
- (let* ((form-file (nth 1 form))
- (full-form-file (expand-file-name form-file)))
- (when (string= full-form-file full-to-load)
- (throw 'done nil))
- (when (and (string= (file-name-nondirectory full-form-file)
- (file-name-nondirectory full-to-load))
- (not (string= full-form-file full-to-load)))
- (if (yes-or-no-p "Replace current nXhtml loading in (custom-file)? ")
- (progn
- (goto-char start) ;; at form start now
- (forward-char (length "(load "))
- (skip-chars-forward " \t\n\^l") ;; at start of string
- (setq start (point))
- (setq form (read (current-buffer)))
- (delete-region start (point))
- (insert (format "%S" full-to-load))
- (basic-save-buffer))
- (web-vcs-message-with-face 'web-vcs-red "Can't continue then")
- (web-vcs-display-messages t)
- (throw 'command-level nil)))))))
- ;; At end of file
- (insert (format "\n(load %S)\n" file-to-load))
- (basic-save-buffer))
- (unless old-buf (kill-buffer old-buf))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;; Start Testing function
-(defun emacs-Q-no-nxhtml (&rest args)
- (let* ((old-env-load-path (getenv "EMACSLOADPATH"))
- sub-env-load-path
- (elp-list (or (when old-env-load-path
- ;;(split-string old-env-load-path ";"))
- (split-string old-env-load-path path-separator))
- load-path))
- (sub-elp-list nil)
- ret
- (this-emacs-exe (locate-file invocation-name
- (list invocation-directory)
- exec-suffixes)))
- (dolist (p elp-list)
- (when (file-exists-p p)
- (unless (string= nxhtml-install-dir p)
- (let* ((dir (file-name-directory p))
- (last (file-name-nondirectory p))
- (last-dir (file-name-nondirectory
- (directory-file-name dir))))
- (unless (and (string= "nxhtml" last-dir)
- (member last '("util" "test" "nxhtml" "related" "alt")))
- (setq sub-elp-list (cons p sub-elp-list)))))))
- ;;(setq sub-env-load-path (mapconcat 'identity (reverse sub-elp-list) ";"))
- (setq sub-env-load-path (mapconcat 'identity (reverse sub-elp-list) path-separator))
- (setenv "EMACSLOADPATH" sub-env-load-path)
- (setq ret (apply 'call-process this-emacs-exe nil 0 nil "-Q" args))
- (setenv "EMACSLOADPATH" old-env-load-path)
- ret))
-
-;; (call-interactively-p 'nxhtml-setup-test-auto-download)
-;; (nxhtml-setup-test-auto-download "c:/test2/")
-(defun nxhtml-setup-test-auto-download (test-dir)
- "Test autoload in a new emacs, started with 'emacs -Q'.
-You can choose where to download the files and just delete them
-when you have tested enough."
- (interactive (list (read-directory-name "Directory for test of auto download of nXhtml: ")))
- (let ((this-dir (file-name-directory web-vcs-el-this))
- (this-name (file-name-nondirectory web-vcs-el-this))
- that-file)
- (when (and (file-exists-p test-dir)
- (not (y-or-n-p (format "Directory %S exists, really test there? " test-dir))))
- (error "Aborted"))
- (unless (file-exists-p test-dir) (make-directory test-dir))
- (setq that-file (expand-file-name this-name test-dir))
- (when (file-exists-p that-file) (delete-file that-file))
- (copy-file web-vcs-el-this that-file)
- (emacs-Q-no-nxhtml "-l" that-file "-f" "nxhtml-setup-test-auto-download-do-it-here")))
-
-(defun nxhtml-setup-test-auto-download-do-it-here ()
- "Helper for `nxhtml-setup-test-auto-down-load'."
- (let ((this-dir (file-name-directory web-vcs-el-this)))
- (nxhtml-setup-auto-download this-dir)))
-
-(defun web-vcs-check-if-modified ()
- (let (
- (t1 (format-time-string "%Y-%m-%dT%T%z" (date-to-time "2010-01-01 18:20")))
- (t2 (format-time-string "%Y-%m-%dT%T%z" (date-to-time "Mon, 28 Dec 2009 08:57:44 GMT")))
- (url-request-extra-headers
- (list
- (cons "If-Modified-Since"
- (format-time-string
- ;;"%Y-%m-%dT%T%z"
- "%a, %e %b %Y %H:%M:%S GMT"
- (nth 5 (file-attributes "c:/test/temp.el" )))
- )))
- xb)
- (setq xb (url-retrieve-synchronously "http://www.emacswiki.org/emacs/download/anything.el"))
- (switch-to-buffer xb)
- ))
-;; (emacs-Q-no-nxhtml "web-vcs.el" "-l" "c:/test/d27/web-autostart.el")
-;; (emacs-Q-no-nxhtml "web-vcs.el" "-l" "c:/test/d27/autostart.el")
-;; (emacs-Q-no-nxhtml "web-vcs.el" "-f" "eval-buffer" "-f" "nxhtml-temp-setup-auto-download")
-;; (emacs-Q-no-nxhtml "-l" "c:/test/d27/web-vcs" "-l" "c:/test/d27/nxhtml-web-vcs" "-f" "nxhtml-temp-setup-auto-download")
-;; (emacs-Q-no-nxhtml "-l" "c:/test/d27/nxhtml-web-vcs" "-f" "nxhtml-temp-setup-auto-download")
-;; (emacs-Q-no-nxhtml "--geometry=200x50+100+100" "-l" "c:/test/d27/web-vcs" "-f" "web-vcs-nxhtml")
-(defun nxhtml-temp-setup-auto-download ()
- ;;(when (fboundp 'w32-send-sys-command) (w32-send-sys-command #xf030) (sit-for 2))
- (set-frame-size (selected-frame)
- (/ 1024 (frame-char-width))
- (/ 512 (frame-char-height))
- )
- (tool-bar-mode -1)
- (set-frame-position (selected-frame) 100 50)
- (when (y-or-n-p "Do nXhtml? ")
- (view-echo-area-messages)
- (setq truncate-lines t)
- (split-window-horizontally)
- (let ((load-path (cons default-directory load-path)))
- (require 'web-vcs))
- ;(nxhtml-setup-auto-download "c:/test/d27")
- (call-interactively 'nxhtml-setup-auto-download)
- ))
-;;;;;; End Testing function
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-(provide 'nxhtml-web-vcs)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-web-vcs.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/ChangeLog b/emacs.d/nxhtml/nxhtml/ChangeLog
deleted file mode 100644
index c24d360..0000000
--- a/emacs.d/nxhtml/nxhtml/ChangeLog
+++ /dev/null
@@ -1,17 +0,0 @@
-2006-04-26 <lennart.borgman.073@student.lu.se>
-
- * nxhtml.el (nxhtml-insert-skeleton-if-empty)
- (nxhtml-insert-frame-skeleton): New functions.
-
-2006-04-25 <lennart.borgman.073@student.lu.se>
-
- * nxhtml.el (nxhtml-coding-systems-complete)
- (nxhtml-script-url-predicate, nxhtml-script-completion-pattern)
- (nxhtml-image-url-predicate, nxhtml-image-completion-pattern)
- (nxhtml-mailto-predicate, nxhtml-predicate-error)
- (nxhtml-in-xml-attribute-value-regex)
- (nxhtml-read-mail-url-history, nxhtml-read-web-url-history)
- (nxhtml-read-url-history, nxhtml-read-url-type)
- (nxhtml-read-url-type-help, nxhtml-read-url)
- (rng-complete-attribute-value): New entries for completion.
-
diff --git a/emacs.d/nxhtml/nxhtml/doc/demo.html b/emacs.d/nxhtml/nxhtml/doc/demo.html
deleted file mode 100644
index 8696032..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/demo.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>nXhtml Short Tour</title>
- <script type="text/javascript" src="js/smoothgallery/scripts/mootools.js"></script>
- <script type="text/javascript" src="js/smoothgallery/scripts/jd.gallery.js"></script>
- <link rel="stylesheet" href="js/smoothgallery/css/layout.css" type="text/css" media="screen"/>
- <link rel="stylesheet" href="js/smoothgallery/css/jd.gallery.css" type="text/css" media="screen"/>
- <style type="text/css" media="screen">
- /* <![CDATA[ */
- #myGallery {
- width: 660px;
- height: 500px;
- }
- /* ]] */
- </style>
-
- </head>
- <body>
- <script type="text/javascript">
- function startGallery() {
- var myGallery = new gallery($('myGallery'), {
- timed: true,
- delay: 5000,
- embedLinks: false,
- showArrows: true,
- showCarousel: true,
- showInfopane: true,
- showDescription: true,
- });
- }
- window.onDomReady(startGallery);
- </script>
- <div id="myGallery"><!-- SmoothGallery -->
-
- <div class="imageElement">
- <h3>Popup completion</h3>
- <p>nXhtml can use popup style completion too (for XHTML)</p>
- <a href="#" title="open image" class="open"></a>
- <img src="img/popup-compl.png" class="full" alt="Popup completion" />
- <img src="img/popup-compl.png" class="thumbnail" alt="Popup completion (thumbnail)" />
- <div>
- <p>
- more about popup
- </p>
- <p>
- more about popup
- </p>
- </div>
- </div>
-
- <div class="imageElement">
- <h3>Emacs style completion</h3>
- <p>Emacs default style for completion uses the minibuffer and an Emacs window</p>
- <a href="#" title="open image" class="open"></a>
- <img src="img/emacs-style-completion.png" class="full" alt="Emacs style completion" />
- <img src="img/emacs-style-completion.png" class="thumbnail" alt="Emacs style completion (thumbnail)" />
- <div>du</div>
- </div>
- </div>
-
- <div id="DescriptionDiv"
- style="
- text-align: center;
- ">
- desc div
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/doc/html2xhtml.html b/emacs.d/nxhtml/nxhtml/doc/html2xhtml.html
deleted file mode 100644
index 2228c80..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/html2xhtml.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- How to Convert to XHTML
- </title>
- <link href="nxhtml.css" rel="StyleSheet" type="text/css" />
- </head>
- <body>
- <h1>
- How to Convert to XHTML
- </h1>
- <p>
- With nxhtml-mode you can edit XHTML documents, but not HTML
- dito. So what do you do with your old HTML documents? The
- answer is simple: You convert them to XHTML! There is today
- not many reasons not to convert them to XHTML. You may say
- "but what about old browsers?". Most users just do not have
- old browsers today. Old browsers are too dangerous to use on the
- Internet.
- </p>
- <p>
- You can convert the documents easily from within nxhtml-mode
- with <a href= "http://tidy.sourceforge.net/">Tidy</a>. However
- Tidy does not come with nxhtml, you have to install it yourself.
- </p>
- <p>
- When Tidy is called from Emacs you can do a whole directory tree
- at once. When a buffer is in nxhtml-mode (and tidy.el is found)
- there is an entry on the menus called <b>Tidy</b> from which you
- can access tidy and set the options for it. Note especially the
- <b>Quick Options Settings</b> where you can set options for
- converting to XHTML easily.
- </p>
-
- </body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html b/emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html
deleted file mode 100644
index 0eafb8d..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html
+++ /dev/null
@@ -1,424 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
-<style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
- --></style>
-<style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.comment-face-1419 { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.comment-face-1419 a { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.comment-delimiter-face-1418 { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.comment-delimiter-face-1418 a { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.help-argument-name-1420 { color: rgb(0, 0, 255); font-style: italic; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-size: 10pt; text-decoration: none; }
-span.help-argument-name-1420 a { color: rgb(0, 0, 255); font-style: italic; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-size: 10pt; text-decoration: underline; }
-span.button-0004 { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
-span.button-0004 a { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.completion-tooltip-face-1437 { color: rgb(0, 0, 0); background: rgb(255, 255, 255); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.completion-tooltip-face-1437 a { color: rgb(0, 0, 0); background: rgb(255, 255, 255); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.completion-dynamic-face-1436 { color: rgb(0, 0, 0); background: rgb(255, 165, 0); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.completion-dynamic-face-1436 a { color: rgb(0, 0, 0); background: rgb(255, 165, 0); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.compilation-warning-1435 { color: rgb(255, 165, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.compilation-warning-1435 a { color: rgb(255, 165, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.compilation-line-number-1434 { color: rgb(184, 134, 11); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.compilation-line-number-1434 a { color: rgb(184, 134, 11); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.compilation-info-1433 { color: rgb(0, 205, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.compilation-info-1433 a { color: rgb(0, 205, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.compilation-error-1430 { color: rgb(255, 0, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.compilation-error-1430 a { color: rgb(255, 0, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.compilation-column-number-1429 { color: rgb(34, 139, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.compilation-column-number-1429 a { color: rgb(34, 139, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.comint-highlight-prompt-1428 { color: rgb(0, 0, 139); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.comint-highlight-prompt-1428 a { color: rgb(0, 0, 139); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.button-0004 { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
-span.button-0004 a { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.default-0273 { color: rgb(250, 235, 215); font-size: 105%; text-decoration: none; }
-span.default-0273 a { color: rgb(250, 235, 215); font-size: 105%; text-decoration: underline; }
-span.default-0272 { background: rgb(250, 235, 215); font-size: 105%; text-decoration: none; }
-span.default-0272 a { background: rgb(250, 235, 215); font-size: 105%; text-decoration: underline; }
-span.default-0271 { color: rgb(250, 240, 230); font-size: 105%; text-decoration: none; }
-span.default-0271 a { color: rgb(250, 240, 230); font-size: 105%; text-decoration: underline; }
-span.default-0270 { background: rgb(250, 240, 230); font-size: 105%; text-decoration: none; }
-span.default-0270 a { background: rgb(250, 240, 230); font-size: 105%; text-decoration: underline; }
-span.default-0269 { color: rgb(253, 245, 230); font-size: 105%; text-decoration: none; }
-span.default-0269 a { color: rgb(253, 245, 230); font-size: 105%; text-decoration: underline; }
-span.default-0268 { background: rgb(253, 245, 230); font-size: 105%; text-decoration: none; }
-span.default-0268 a { background: rgb(253, 245, 230); font-size: 105%; text-decoration: underline; }
-span.default-0267 { color: rgb(255, 250, 240); font-size: 105%; text-decoration: none; }
-span.default-0267 a { color: rgb(255, 250, 240); font-size: 105%; text-decoration: underline; }
-span.default-0266 { background: rgb(255, 250, 240); font-size: 105%; text-decoration: none; }
-span.default-0266 a { background: rgb(255, 250, 240); font-size: 105%; text-decoration: underline; }
-span.default-0265 { color: rgb(220, 220, 220); font-size: 105%; text-decoration: none; }
-span.default-0265 a { color: rgb(220, 220, 220); font-size: 105%; text-decoration: underline; }
-span.default-0264 { background: rgb(220, 220, 220); font-size: 105%; text-decoration: none; }
-span.default-0264 a { background: rgb(220, 220, 220); font-size: 105%; text-decoration: underline; }
-span.default-0263 { color: rgb(245, 245, 245); font-size: 105%; text-decoration: none; }
-span.default-0263 a { color: rgb(245, 245, 245); font-size: 105%; text-decoration: underline; }
-span.default-0262 { background: rgb(245, 245, 245); font-size: 105%; text-decoration: none; }
-span.default-0262 a { background: rgb(245, 245, 245); font-size: 105%; text-decoration: underline; }
-span.default-0261 { color: rgb(248, 248, 255); font-size: 105%; text-decoration: none; }
-span.default-0261 a { color: rgb(248, 248, 255); font-size: 105%; text-decoration: underline; }
-span.default-0260 { background: rgb(248, 248, 255); font-size: 105%; text-decoration: none; }
-span.default-0260 a { background: rgb(248, 248, 255); font-size: 105%; text-decoration: underline; }
-span.default-0259 { color: rgb(255, 250, 250); font-size: 105%; text-decoration: none; }
-span.default-0259 a { color: rgb(255, 250, 250); font-size: 105%; text-decoration: underline; }
-span.default-0258 { background: rgb(255, 250, 250); font-size: 105%; text-decoration: none; }
-span.default-0258 a { background: rgb(255, 250, 250); font-size: 105%; text-decoration: underline; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.default-1432 { text-decoration: underline; color: rgb(176, 48, 96); font-weight: 700; font-size: 164%; }
-span.default-1432 a { text-decoration: underline; color: rgb(176, 48, 96); font-weight: 700; font-size: 164%; }
-span.default-1431 { color: rgb(176, 48, 96); font-weight: 700; font-size: 164%; text-decoration: none; }
-span.default-1431 a { color: rgb(176, 48, 96); font-weight: 700; font-size: 164%; text-decoration: underline; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.custom-button-0022 { border-width: 1px; border-style: outset; color: rgb(0, 0, 0); background: rgb(211, 211, 211); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.custom-button-0022 a { border-width: 1px; border-style: outset; color: rgb(0, 0, 0); background: rgb(211, 211, 211); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.bold-0248 { background: rgb(173, 255, 47); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.bold-0248 a { background: rgb(173, 255, 47); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.match-1438 { background: rgb(255, 255, 0); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.match-1438 a { background: rgb(255, 255, 0); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.underline-1413 { color: rgb(184, 134, 11); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; text-decoration: underline; font-size: 10pt; }
-span.underline-1413 a { color: rgb(184, 134, 11); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; text-decoration: underline; font-size: 10pt; }
-span.underline-0219 { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
-span.underline-0219 a { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
-span.underline-1412 { color: rgb(0, 205, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; text-decoration: underline; font-size: 10pt; }
-span.underline-1412 a { color: rgb(0, 205, 0); font-weight: 700; font-family: outline-courier new; font-stretch: normal; font-style: normal; text-decoration: underline; font-size: 10pt; }
- --></style><style type="text/css"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.default a { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.comment-face-1419 { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.comment-face-1419 a { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.comment-delimiter-face-1418 { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.comment-delimiter-face-1418 a { color: rgb(178, 34, 34); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.string-face-1441 { color: rgb(188, 143, 143); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.string-face-1441 a { color: rgb(188, 143, 143); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.match-1438 { background: rgb(255, 255, 0); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
-span.match-1438 a { background: rgb(255, 255, 0); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: underline; }
-span.keyword-face-1440 { color: rgb(160, 32, 240); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: none; }
-span.keyword-face-1440 a { color: rgb(160, 32, 240); font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; font-size: 10pt; text-decoration: underline; }
-span.underline-1439 { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
-span.underline-1439 a { text-decoration: underline; font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; }
- --></style>
- </head>
- <body style="background: #000000; color: #ff9900; padding:2em; margin:4em; margin-top:2em;">
-
-<h1>Example of htmlfontify.el output</h1>
-
-<p style="font-size: 1.3em; width: 35em;">
- The following is an example of the output you can get with htmlfontify.el.
- The version used here is shipped with <a href="nxhtml.html" style="color: #ffbb33; ">nXhtml</a>.
- (A new version from the original author is on its way.)
-</p>
-
-<table border="0" cellpadding="0" cellspacing="0" style="border: solid rgb(0, 84, 227); width:44.800000000000004em; background:white;">
-<tr>
-<td style="background-color:rgb(0, 84, 227); color:rgb(255, 255, 255);border: none; padding:4px; vertical-align: middle;"><img alt="Emacs Icon (patched)" src="img/emacsP16.png" width="16" height="16" />&nbsp;&nbsp;Emacs - Frame Dump</td>
-</tr>
-<tr>
-<td style="vertical-align:top;"><table border="0" cellpadding="0" cellspacing="0">
-<tr>
-<td style="vertical-align:top;"><table border="0" cellpadding="0" cellspacing="0">
-<tr><td style="vertical-align:top;"><div style="width:22.514999999999997em; height:15.079999999999998em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-<pre><span class="comment-delimiter-face-1418">;; </span><span class="comment-face-1419">This buffer is for notes you don't want to save, and for Lisp evaluation.
-</span><span class="comment-delimiter-face-1418">;; </span><span class="comment-face-1419">If you want to create a file, visit that file with C-x C-f,
-</span><span class="comment-delimiter-face-1418">;; </span><span class="comment-face-1419">then enter the text in that file's own buffer.
-</span>
-</pre>
-
- </div>
-<div style="width:22.515em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)-- <b>*scratch*</b> (Lisp Interaction Abbrev hs) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-<td style="vertical-align:top;"><div style="width:23.084999999999997em; height:15.079999999999998em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre>cadr is a compiled Lisp function in `<span class="button-0004">subr.el</span>'.
-(cadr <span class="help-argument-name-1420">x</span>)
-
-Return the car of the cdr of <span class="help-argument-name-1420">x</span>.
-
-<span class="button-0004">[back]</span>
-</pre>
-
- </div>
-<div style="width:23.085em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)%% <b>*Help*</b> (Help View Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-</tr>
-</table>
-</td>
-</tr>
-<tr>
-<td style="vertical-align:top;"><table border="0" cellpadding="0" cellspacing="0">
-<tr><td style="vertical-align:top;"><div style="width:22.514999999999997em; height:12.76em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre><span class="button-0004">comint-highlight-prompt</span> <span class="comint-highlight-prompt-1428">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">compilation-column-number</span> <span class="compilation-column-number-1429">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">compilation-error</span> <span class="compilation-error-1430">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">compilation-info</span> <span class="compilation-info-1433">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">compilation-line-number</span> <span class="compilation-line-number-1434">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">compilation-warning</span> <span class="compilation-warning-1435">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">completion-dynamic-face</span> <span class="completion-dynamic-face-1436">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-<span class="button-0004">completion-tooltip-face</span> <span class="completion-tooltip-face-1437">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</span>
-</pre>
-
-
-<div style="margin-top:2em; color: red; text-align: center; "> Truncated to line 11 - 19! </div>
-</div>
-<div style="width:22.515em; color:rgb(0, 0, 0); background:rgb(191, 191, 191); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)%% <b>*Faces*</b> (Help View Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-<td style="vertical-align:top;"><div style="width:23.084999999999997em; height:12.76em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre><span class="default-0258">snow </span><span class="default-0259"> snow </span>#fffafa
-<span class="default-0260">ghost white </span><span class="default-0261"> GhostWhite </span>#f8f8ff
-<span class="default-0262">white smoke </span><span class="default-0263"> WhiteSmoke </span>#f5f5f5
-<span class="default-0264">gainsboro </span><span class="default-0265"> gainsboro </span>#dcdcdc
-<span class="default-0266">floral white </span><span class="default-0267"> FloralWhite </span>#fffaf0
-<span class="default-0268">old lace </span><span class="default-0269"> OldLace </span>#fdf5e6
-<span class="default-0270">linen </span><span class="default-0271"> linen </span>#faf0e6
-<span class="default-0272">antique white </span><span class="default-0273"> AntiqueWhite </span>#faebd7
-</pre>
-
-
-<div style="margin-top:2em; color: red; text-align: center; "> Truncated to line 1 - 9! </div>
-</div>
-<div style="width:23.085em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)%% <b>*Colors*</b> (Help View Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-</tr>
-</table>
-</td>
-</tr>
-<tr>
-<td style="vertical-align:top;"><div style="width:47.025em; height:12.76em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre><span class="default-1431">________________________
-</span><span class="default-1432">Program and Value Search</span>
-
-When you use Emacs on MS Windows you sometimes want to fetch values
-and program locations from MS Windows. Many of these values are
-stored in the MS Windows Registry. Since Emacs is written to be used
-on many platforms (with the emphasis on GPL platforms) the effort to
-let Emacs read the Registry directly has not been made. Below you can
-</pre>
-
-
-<div style="margin-top:2em; color: red; text-align: center; "> Truncated to line 29 - 37! </div>
-</div>
-<div style="width:47.025em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)** <b>*Customize EmacsW32*</b> (Custom Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-</tr>
-<tr>
-<td style="vertical-align:top;"><div style="width:47.025em; height:12.76em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre> Add quick printing to File menu (htmlize-view-print-visible): <span class="bold-0248">t</span>
- Keep default print entries in File menu (w32-print-menu-show-print): <span class="bold-0248">nil</span>
- Keep default ps print entries in File menu (w32-print-menu-show-ps-print): <span class="bold-0248">nil</span>
- Use keyboard Window keys as Emacs META (w32-meta-style): <span class="bold-0248">w32-lr</span>
- Underlined accelerators in menu bar (menuacc-active): <span class="bold-0248">t</span>
- Inferior shell + path for unix style programs (w32shell-shell): <span class="bold-0248">cmd</span>
-
- <span class="custom-button-0022"> Set all to w32 style! </span> <span class="custom-button-0022"> Reset all to default! </span> <span class="custom-button-0022"> Customize EmacsW32 ... </span>
-</pre>
-
-
-<div style="margin-top:2em; color: red; text-align: center; "> Truncated to line 13 - 21! </div>
-</div>
-<div style="width:47.025em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)** <b>*Customize EmacsW32*</b> (Custom Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-</tr>
-<tr>
-<td style="vertical-align:top;"><table border="0" cellpadding="0" cellspacing="0">
-<tr><td style="vertical-align:top;"><div style="width:22.514999999999997em; height:12.76em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre>-*- mode: grep; default-directory: &quot;c:/emacs/p/070604/EmacsW32/nxml/util/&quot; -*-
-Grep started at Fri Dec 28 22:54:06
-
-grep -i -nH -e &quot;hfy-tmpfont-stack&quot; *.el
-<span class="underline-1412">htmlfontify.el</span><span class="underline-0219">:</span><span class="underline-1413">596</span><span class="underline-0219">:</span>(defvar <span class="match-1438">hfy-tmpfont-stack</span> nil
-<span class="underline-1412">htmlfontify.el</span><span class="underline-0219">:</span><span class="underline-1413">999</span><span class="underline-0219">:</span> (entry (assoc key <span class="match-1438">hfy-tmpfont-stack</span>))
-<span class="underline-1412">htmlfontify.el</span><span class="underline-0219">:</span><span class="underline-1413">1003</span><span class="underline-0219">:</span> (setq tag (format &quot;%04d&quot; (length <span class="match-1438">hfy-tmpfont-stack</span>))
-<span class="underline-1412">htmlfontify.el</span><span class="underline-0219">:</span><span class="underline-1413">1005</span><span class="underline-0219">:</span> <span class="match-1438">hfy-tmpfont-stack</span> (cons entry <span class="match-1438">hfy-tmpfont-stack</span>)))
-</pre>
-
-
-<div style="margin-top:2em; color: red; text-align: center; "> Truncated to line 1 - 9! </div>
-</div>
-<div style="width:22.515em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)%% <b>*grep*</b> (Grep Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-<td style="vertical-align:top;"><div style="width:23.084999999999997em; height:12.76em; border: 1px solid rgb(212, 208, 200); overflow:auto; padding:4px;">
-
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre><span class="underline-1439">5 matches for &quot;hfy-tmpfont-stack&quot; in buffer: htmlfontify.el
-</span> 596:(<span class="keyword-face-1440">defvar</span> <span class="match-1438">hfy-tmpfont-stack</span> nil
- 999: (entry (assoc key <span class="match-1438">hfy-tmpfont-stack</span>))
- 1003: (setq tag (format <span class="string-face-1441">&quot;%04d&quot;</span> (length <span class="match-1438">hfy-tmpfont-stack</span>))
- 1005: <span class="match-1438">hfy-tmpfont-stack</span> (cons entry <span class="match-1438">hfy-tmpfont-stack</span>)))
- 1228: <span class="comment-delimiter-face-1418">;;</span><span class="comment-face-1419">(</span><span class="match-1438">hfy-tmpfont-stack</span><span class="comment-face-1419"> nil)</span>
-</pre>
-
- </div>
-<div style="width:23.085em; color:rgb(51, 51, 51); background:rgb(229, 229, 229); white-space:pre; overflow:hidden; font-family:monospace;">-- (Unix)%% <b>*Occur*</b> (Occur Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-<tr>
-<td style="padding:1px; color:rgb(0,0,0); ">
-<span style="background:rgb(255, 215, 0); color:rgb(0,0,0); ">&nbsp;M-x </span>&nbsp;hfyview-frame</td>
-</tr>
-</table>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpg b/emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpg
deleted file mode 100644
index 694a2c5..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpg b/emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpg
deleted file mode 100644
index 269886c..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpg
deleted file mode 100644
index a736099..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpg b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpg
deleted file mode 100644
index a7352a6..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.png b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.png
deleted file mode 100644
index 8d60637..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcf b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcf
deleted file mode 100644
index 9260725..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpg b/emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpg
deleted file mode 100644
index 587113e..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/divine2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/divine2.jpg
deleted file mode 100644
index 6a8ea51..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/divine2.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/edit-part.png b/emacs.d/nxhtml/nxhtml/doc/img/edit-part.png
deleted file mode 100644
index 7c6ab2a..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/edit-part.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.png b/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.png
deleted file mode 100644
index ce30bdf..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcf b/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcf
deleted file mode 100644
index 6703882..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.png b/emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.png
deleted file mode 100644
index 0a404fb..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/emacsP.png b/emacs.d/nxhtml/nxhtml/doc/img/emacsP.png
deleted file mode 100644
index e0a5ecb..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/emacsP.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/emacsP16.png b/emacs.d/nxhtml/nxhtml/doc/img/emacsP16.png
deleted file mode 100644
index 54b597b..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/emacsP16.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/embedded-css.png b/emacs.d/nxhtml/nxhtml/doc/img/embedded-css.png
deleted file mode 100644
index 25c11d4..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/embedded-css.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.png
deleted file mode 100644
index 85b98f3..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.png b/emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.png
deleted file mode 100644
index fc1b49c..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.png b/emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.png
deleted file mode 100644
index 5e02725..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.png b/emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.png
deleted file mode 100644
index a24f0f4..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.png b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.png
deleted file mode 100644
index 5f3c757..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf
deleted file mode 100644
index 8ec9aaa..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.png b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.png
deleted file mode 100644
index c3615f3..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.png b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.png
deleted file mode 100644
index b9b0c43..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcf b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcf
deleted file mode 100644
index ce416ce..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpg b/emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpg
deleted file mode 100644
index 6bf9b57..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpg
deleted file mode 100644
index ed3ab6f..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.png b/emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.png
deleted file mode 100644
index 3b3d9f1..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.png b/emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.png
deleted file mode 100644
index a03ba4a..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/nxml-where.png b/emacs.d/nxhtml/nxhtml/doc/img/nxml-where.png
deleted file mode 100644
index 102d084..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/nxml-where.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png
deleted file mode 100644
index c204f4d..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.png
deleted file mode 100644
index cda754a..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-php.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-php.png
deleted file mode 100644
index c7664da..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/php-in-php.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.png
deleted file mode 100644
index 310d07f..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/popup-compl.png b/emacs.d/nxhtml/nxhtml/doc/img/popup-compl.png
deleted file mode 100644
index a40bd49..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/popup-compl.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpg
deleted file mode 100644
index 04d0610..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.png b/emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.png
deleted file mode 100644
index c7ea553..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.png b/emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.png
deleted file mode 100644
index b971b9d..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/region-selected.png b/emacs.d/nxhtml/nxhtml/doc/img/region-selected.png
deleted file mode 100644
index 0a2358b..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/region-selected.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg b/emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg
deleted file mode 100644
index 2689598..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.png
deleted file mode 100644
index 151681d..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png
deleted file mode 100644
index 4ae2ff8..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png
deleted file mode 100644
index c348c92..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.png
deleted file mode 100644
index 408980f..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcf b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcf
deleted file mode 100644
index d42da0b..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/validation-error.png b/emacs.d/nxhtml/nxhtml/doc/img/validation-error.png
deleted file mode 100644
index 7682642..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/validation-error.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/volga.jpg b/emacs.d/nxhtml/nxhtml/doc/img/volga.jpg
deleted file mode 100644
index c11e93c..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/volga.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.png b/emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.png
deleted file mode 100644
index 2093781..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif
deleted file mode 100644
index 316dea7..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif
deleted file mode 100644
index 24a6be1..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif
deleted file mode 100644
index 218233d..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png
deleted file mode 100644
index 61e8660..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif
deleted file mode 100644
index dc91f06..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png
deleted file mode 100644
index bbf66a1..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif
deleted file mode 100644
index 99368d6..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif
deleted file mode 100644
index d145e66..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png
deleted file mode 100644
index aebf498..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css
deleted file mode 100644
index b0d87ec..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css
+++ /dev/null
@@ -1,238 +0,0 @@
-#myGallery
-{
- width: 460px;
- height: 345px;
- z-index:5;
- display: none;
- border: 1px solid #000;
-}
-
-.jdGallery
-{
- overflow: hidden;
- position: relative;
-}
-
-.jdGallery img
-{
- border: 0;
- margin: 0;
-}
-
-.jdGallery .slideElement
-{
- width: 100%;
- height: 100%;
- background-color: #000;
- background-repeat: no-repeat;
-}
-
-.jdGallery .loadingElement
-{
- width: 100%;
- height: 100%;
- position: absolute;
- left: 0;
- top: 0;
- background-color: #000;
- background-repeat: no-repeat;
- background-position: center center;
- background-image: url('img/loading-bar-black.gif');
-}
-
-.jdGallery .slideInfoZone
-{
- position: absolute;
- z-index: 10;
- width: 100%;
- margin: 0px;
- left: 0;
- bottom: 0;
- height: 40px;
- background: #333;
- color: #fff;
- text-indent: 0;
- overflow: hidden;
-}
-
-* html .jdGallery .slideInfoZone
-{
- bottom: -1px;
-}
-
-.jdGallery .slideInfoZone h2
-{
- padding: 0;
- font-size: 80%;
- margin: 0;
- margin: 2px 5px;
- font-weight: bold;
- color: inherit;
-}
-
-.jdGallery .slideInfoZone p
-{
- padding: 0;
- font-size: 80%;
- margin: 2px 5px;
- color: #eee;
-}
-
-.jdGallery div.carouselContainer
-{
- position: absolute;
- height: 135px;
- width: 100%;
- z-index: 10;
- margin: 0px;
- left: 0;
- top: 0;
-}
-
-.jdGallery a.carouselBtn
-{
- position: absolute;
- bottom: 0;
- right: 30px;
- height: 20px;
- /*width: 100px; background: url('img/carousel_btn.gif') no-repeat;*/
- text-align: center;
- padding: 0 10px;
- font-size: 13px;
- background: #333;
- color: #fff;
- cursor: pointer;
-}
-
-.jdGallery .carousel
-{
- position: absolute;
- width: 100%;
- margin: 0px;
- left: 0;
- top: 0;
- height: 115px;
- background: #333;
- color: #fff;
- text-indent: 0;
- overflow: hidden;
-}
-
-.jdGallery .carousel .carouselWrapper
-{
- position: absolute;
- width: 100%;
- height: 78px;
- top: 10px;
- left: 0;
- overflow: hidden;
-}
-
-.jdGallery .carousel .carouselInner
-{
- position: relative;
-}
-
-.jdGallery .carousel .carouselInner .thumbnail
-{
- cursor: pointer;
- background: #000;
- background-position: center center;
- float: left;
- border: solid 1px #fff;
-}
-
-.jdGallery .carousel .label
-{
- font-size: 13px;
- position: absolute;
- bottom: 5px;
- left: 10px;
- padding: 0;
- margin: 0;
-}
-
-.jdGallery .carousel .label .number
-{
- color: #b5b5b5;
-}
-
-.jdGallery a
-{
- font-size: 100%;
- text-decoration: none;
- color: inherit;
-}
-
-.jdGallery a.right, .jdGallery a.left
-{
- position: absolute;
- height: 99%;
- width: 25%;
- cursor: pointer;
- z-index:10;
- filter:alpha(opacity=20);
- -moz-opacity:0.2;
- -khtml-opacity: 0.2;
- opacity: 0.2;
-}
-
-* html .jdGallery a.right, * html .jdGallery a.left
-{
- filter:alpha(opacity=50);
-}
-
-.jdGallery a.right:hover, .jdGallery a.left:hover
-{
- filter:alpha(opacity=80);
- -moz-opacity:0.8;
- -khtml-opacity: 0.8;
- opacity: 0.8;
-}
-
-.jdGallery a.left
-{
- left: 0;
- top: 0;
- background: url('img/fleche1.png') no-repeat center left;
-}
-
-* html .jdGallery a.left { background: url('img/fleche1.gif') no-repeat center left; }
-
-.jdGallery a.right
-{
- right: 0;
- top: 0;
- background: url('img/fleche2.png') no-repeat center right;
-}
-
-* html .jdGallery a.right { background: url('img/fleche2.gif') no-repeat center right; }
-
-.jdGallery a.open
-{
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
-}
-
-.withArrows a.open
-{
- position: absolute;
- top: 0;
- left: 25%;
- height: 99%;
- width: 50%;
- cursor: pointer;
- z-index: 10;
- background: none;
- -moz-opacity:0.8;
- -khtml-opacity: 0.8;
- opacity: 0.8;
-}
-
-.withArrows a.open:hover { background: url('img/open.png') no-repeat center center; }
-
-* html .withArrows a.open:hover { background: url('img/open.gif') no-repeat center center;
- filter:alpha(opacity=80); }
-
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css
deleted file mode 100644
index 9c807b6..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css
+++ /dev/null
@@ -1,91 +0,0 @@
-body {
- color: #ccc;
- font-family: "Trebuchet MS", "Lucida Grande", Arial, Helvetica, sans-serif;
- margin: 0 auto;
- padding: 0;
- font-size: 1.0em;
- background: #111 url('../images/bg/gradient1.gif') top left repeat-x;
-}
-
-h1
-{
- color: #fff;
- font-size: 47px;
- font-weight: bolder;
- margin: 0 40px;
- padding: 0.08em 0;
-}
-
-h1 sup
-{
- color: #ddd;
-}
-
-h1 a
-{
- color: #fff;
- text-decoration: none;
-}
-
-h1 .company, h1 a .company
-{
- color: #d01a71;
-}
-
-h2
-{
- color: #ddd;
- font-size: 2.5em;
-}
-
-h3
-{
- color: #fff;
- font-size: 1.5em;
-}
-
-h4
-{
- font-size: 1.3em;
-}
-
-.content
-{
- margin: 0 20px;
-}
-
-.content a
-{
- color: #fff;
-}
-
-
-.content p.linkage
-{
- margin-top: 2em;
- text-align: right;
- font-size: 1.7em;
- color: #ddd;
-}
-
-.content p.linkage a { color: #fff; }
-
-/*.content p.linkage a
-{
- color: #fff;
- background: url('../images/bg/biglink_off.gif') center right no-repeat;
- padding: 10px 20px;
- text-decoration: none;
-}
-
-.content p.linkage a:hover
-{
- background: url('../images/bg/biglink_on.gif') center right no-repeat;
- font-style: italic;
-}*/
-
-#myGallery
-{
- text-align: left;
- margin: 0 auto;
-}
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js
deleted file mode 100644
index af83b13..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- This file is part of JonDesign's SmoothGallery v1.0.1.
-
- JonDesign's SmoothGallery is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- JonDesign's SmoothGallery is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with JonDesign's SmoothGallery; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
- Main Developer: Jonathan Schemoul (JonDesign: http://www.jondesign.net/)
- Contributed code by:
- - Christian Ehret (bugfix)
- - Nitrix (bugfix)
- - Valerio from Mad4Milk for his great help with the carousel scrolling and many other things.
- - Archie Cowan for helping me find a bugfix on carousel inner width problem.
- Many thanks to:
- - The mootools team for the great mootools lib, and it's help and support throughout the project.
-*/
-
-
-var $removeEvents = function (object, type)
-{
- if (!object.events) return object;
- if (type){
- if (!object.events[type]) return object;
- for (var fn in object.events[type]) object.removeEvent(type, fn);
- object.events[type] = null;
- } else {
- for (var evType in object.events) object.removeEvents(evType);
- object.events = null;
- }
- return object;
-};
-
-
-// declaring the class
-var gallery = new Class({
- initialize: function(element, options) {
- this.setOptions({
- showArrows: true,
- showCarousel: true,
- showInfopane: true,
- showDescription: false,
- thumbHeight: 75,
- thumbWidth: 100,
- thumbSpacing: 10,
- embedLinks: true,
- fadeDuration: 500,
- timed: false,
- delay: 9000,
- preloader: true,
- manualData: [],
- populateData: true,
- elementSelector: "div.imageElement",
- titleSelector: "h3",
- subtitleSelector: "p",
- descriptionSelector: "div",
- linkSelector: "a.open",
- imageSelector: "img.full",
- thumbnailSelector: "img.thumbnail",
- slideInfoZoneOpacity: 0.7,
- carouselMinimizedOpacity: 0.4,
- carouselMinimizedHeight: 20,
- carouselMaximizedOpacity: 0.7,
- destroyAfterPopulate: true,
- baseClass: 'jdGallery',
- withArrowsClass: 'withArrows',
- textShowCarousel: 'Pictures',
- useThumbGenerator: false,
- thumbGenerator: 'resizer.php'
- }, options);
- this.fireEvent('onInit');
- this.currentIter = 0;
- this.lastIter = 0;
- this.maxIter = 0;
- this.galleryElement = element;
- this.galleryData = this.options.manualData;
- this.galleryInit = 1;
- this.galleryElements = Array();
- this.thumbnailElements = Array();
- this.galleryElement.addClass(this.options.baseClass);
- if (this.options.populateData)
- this.populateData();
- element.style.display="block";
-
- if (this.options.embedLinks)
- {
- this.currentLink = new Element('a').addClass('open').setProperties({
- href: '#',
- title: ''
- }).injectInside(element);
- if ((!this.options.showArrows) && (!this.options.showCarousel))
- this.galleryElement = element = this.currentLink;
- else
- this.currentLink.setStyle('display', 'none');
- }
-
- this.constructElements();
- if ((data.length>1)&&(this.options.showArrows))
- {
- var leftArrow = new Element('a').addClass('left').addEvent(
- 'click',
- this.prevItem.bind(this)
- ).injectInside(element);
- var rightArrow = new Element('a').addClass('right').addEvent(
- 'click',
- this.nextItem.bind(this)
- ).injectInside(element);
- this.galleryElement.addClass(this.options.withArrowsClass);
- }
- this.loadingElement = new Element('div').addClass('loadingElement').injectInside(element);
- if (this.options.showInfopane) this.initInfoSlideshow();
- if (this.options.showCarousel) this.initCarousel();
- this.doSlideShow(1);
- },
- populateData: function() {
- currentArrayPlace = this.galleryData.length;
- options = this.options;
- data = this.galleryData;
- this.galleryElement.getElements(options.elementSelector).each(function(el) {
- elementDict = {
- image: el.getElement(options.imageSelector).getProperty('src'),
- number: currentArrayPlace
- };
- if ((options.showInfopane) | (options.showCarousel))
- Object.extend(elementDict, {
- title: el.getElement(options.titleSelector).innerHTML,
- description: el.getElement(options.subtitleSelector).innerHTML
- });
- if ((options.showDescription))
- Object.extend(elementDict, {
- outsideDescription: el.getElement(options.descriptionSelector).innerHTML
- });
- if (options.embedLinks)
- Object.extend(elementDict, {
- link: el.getElement(options.linkSelector).href||false,
- linkTitle: el.getElement(options.linkSelector).title||false
- });
- if ((!options.useThumbGenerator) && (options.showCarousel))
- Object.extend(elementDict, {
- thumbnail: el.getElement(options.thumbnailSelector).src
- });
- else if (options.useThumbGenerator)
- Object.extend(elementDict, {
- thumbnail: 'resizer.php?imgfile=' + elementDict.image + '&max_width=' + options.thumbWidth + '&max_height=' + options.thumbHeight
- });
-
- data[currentArrayPlace] = elementDict;
- currentArrayPlace++;
- if (this.options.destroyAfterPopulate)
- el.remove();
- });
- this.galleryData = data;
- this.fireEvent('onPopulated');
- },
- constructElements: function() {
- el = this.galleryElement;
- this.maxIter = this.galleryData.length;
- var currentImg;
- for(i=0;i<this.galleryData.length;i++)
- {
- var currentImg = new Fx.Style(
- new Element('div').addClass('slideElement').setStyles({
- 'position':'absolute',
- 'left':'0px',
- 'right':'0px',
- 'margin':'0px',
- 'padding':'0px',
- 'backgroundImage':"url('" + this.galleryData[i].image + "')",
- 'backgroundPosition':"center center",
- 'opacity':'0'
- }).injectInside(el),
- 'opacity',
- {duration: this.options.fadeDuration}
- );
- this.galleryElements[parseInt(i)] = currentImg;
- }
- },
- destroySlideShow: function(element) {
- var myClassName = element.className;
- var newElement = new Element('div').addClass('myClassName');
- element.parentNode.replaceChild(newElement, element);
- },
- startSlideShow: function() {
- this.fireEvent('onStart');
- this.loadingElement.style.display = "none";
- this.lastIter = this.maxIter - 1;
- this.currentIter = 0;
- this.galleryInit = 0;
- this.galleryElements[parseInt(this.currentIter)].set(1);
- if (this.options.showInfopane)
- this.showInfoSlideShow.delay(1000, this);
- this.prepareTimer();
- if (this.options.embedLinks)
- this.makeLink(this.currentIter);
- },
- nextItem: function() {
- this.fireEvent('onNextCalled');
- this.nextIter = this.currentIter+1;
- if (this.nextIter >= this.maxIter)
- this.nextIter = 0;
- this.galleryInit = 0;
- this.goTo(this.nextIter);
- },
- prevItem: function() {
- this.fireEvent('onPreviousCalled');
- this.nextIter = this.currentIter-1;
- if (this.nextIter <= -1)
- this.nextIter = this.maxIter - 1;
- this.galleryInit = 0;
- this.goTo(this.nextIter);
- },
- goTo: function(num) {
- this.clearTimer();
- if (this.options.embedLinks)
- this.clearLink();
- if (this.options.showInfopane)
- {
- this.slideInfoZone.clearChain();
- this.hideInfoSlideShow().chain(this.changeItem.pass(num, this));
- } else
- this.changeItem.delay(500, this, num);
- if (this.options.embedLinks)
- this.makeLink(num);
- if (this.options.showDescription)
- this.showDescription(num);
- this.prepareTimer();
- /*if (this.options.showCarousel)
- this.clearThumbnailsHighlights();*/
- },
- changeItem: function(num) {
- this.fireEvent('onStartChanging');
- this.galleryInit = 0;
- if (this.currentIter != num)
- {
- for(i=0;i<this.maxIter;i++)
- {
- if ((i != this.currentIter)) this.galleryElements[i].set(0);
- }
- if (num > this.currentIter) this.galleryElements[num].custom(1);
- else
- {
- this.galleryElements[num].set(1);
- this.galleryElements[this.currentIter].custom(0);
- }
- this.currentIter = num;
- }
- this.doSlideShow.bind(this)();
- this.fireEvent('onChanged');
- },
- clearTimer: function() {
- if (this.options.timed)
- $clear(this.timer);
- },
- prepareTimer: function() {
- if (this.options.timed)
- this.timer = this.nextItem.delay(this.options.delay, this);
- },
- doSlideShow: function(position) {
- if (this.galleryInit == 1)
- {
- imgPreloader = new Image();
- imgPreloader.onload=function(){
- this.startSlideShow.delay(10, this);
- }.bind(this);
- imgPreloader.src = this.galleryData[0].image;
- } else {
- if (this.options.showInfopane)
- {
- if (this.options.showInfopane)
- {
- this.showInfoSlideShow.delay((500 + this.options.fadeDuration), this);
- } else
- if (this.options.showCarousel)
- this.centerCarouselOn(position);
- }
- }
- },
- initCarousel: function () {
- var carouselContainerElement = new Element('div').addClass('carouselContainer').injectInside(this.galleryElement);
- this.carouselContainer = new Fx.Styles(carouselContainerElement, {transition: Fx.Transitions.expoOut});
- this.carouselContainer.normalHeight = carouselContainerElement.offsetHeight;
- this.carouselContainer.set({'opacity': this.options.carouselMinimizedOpacity, 'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight)});
-
- this.carouselBtn = new Element('a').addClass('carouselBtn').setProperties({
- title: this.options.textShowCarousel
- }).setHTML(this.options.textShowCarousel).injectInside(carouselContainerElement);
-
- this.carouselBtn.addEvent(
- 'click',
- function () {
- this.carouselContainer.clearTimer();
- this.toggleCarousel();
- }.bind(this)
- );
- this.carouselActive = false;
-
- var carouselElement = new Element('div').addClass('carousel').injectInside(carouselContainerElement);
- this.carousel = new Fx.Styles(carouselElement);
-
- this.carouselLabel = new Element('p').addClass('label').injectInside(this.carousel.element);
- this.carouselWrapper = new Element('div').addClass('carouselWrapper').injectInside(this.carousel.element);
- this.carouselInner = new Element('div').addClass('carouselInner').injectInside(this.carouselWrapper);
-
- this.carouselWrapper.scroller = new Scroller(this.carouselWrapper, {
- area: 100,
- velocity: 0.2
- })
-
- this.carouselWrapper.elementScroller = new Fx.Scroll(this.carouselWrapper, {
- duration: 400,
- onStart: this.carouselWrapper.scroller.stop.bind(this.carouselWrapper.scroller),
- onComplete: this.carouselWrapper.scroller.start.bind(this.carouselWrapper.scroller)
- });
-
- this.constructThumbnails();
-
- this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing)) - this.options.thumbSpacing + this.options.thumbWidth) + "px";
- },
- toggleCarousel: function() {
- if (this.carouselActive)
- this.hideCarousel();
- else
- this.showCarousel();
- },
- showCarousel: function () {
- this.fireEvent('onShowCarousel');
- this.carouselContainer.custom({
- 'opacity': this.options.carouselMaximizedOpacity,
- 'top': 0
- }).addEvent('onComplete', function() { this.carouselActive = true; this.carouselWrapper.scroller.start(); }.bind(this));
- },
- hideCarousel: function () {
- this.fireEvent('onHideCarousel');
- this.carouselContainer.custom({
- 'opacity': this.options.carouselMinimizedOpacity,
- 'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight)
- }).addEvent('onComplete', function() { this.carouselActive = false; this.carouselWrapper.scroller.stop(); }.bind(this));
- },
- constructThumbnails: function () {
- element = this.carouselInner;
- for(i=0;i<this.galleryData.length;i++)
- {
- var currentImg = new Fx.Style(new Element ('div').addClass("thumbnail").setStyles({
- backgroundImage: "url('" + this.galleryData[i].thumbnail + "')",
- backgroundPosition: "center center",
- backgroundRepeat: 'no-repeat',
- marginLeft: this.options.thumbSpacing + "px",
- width: this.options.thumbWidth + "px",
- height: this.options.thumbHeight + "px"
- }).injectInside(element), "opacity", {duration: 200}).set(0.2);
- currentImg.element.addEvents({
- 'mouseover': function (myself) {
- myself.clearTimer();
- myself.custom(0.99);
- $(this.carouselLabel).setHTML('<span class="number">' + (myself.relatedImage.number + 1) + "/" + this.maxIter + ":</span> " + myself.relatedImage.title);
- }.pass(currentImg, this),
- 'mouseout': function (myself) {
- myself.clearTimer();
- myself.custom(0.2);
- }.pass(currentImg, this),
- 'click': function (myself) {
- this.goTo(myself.relatedImage.number);
- }.pass(currentImg, this)
- });
-
- currentImg.relatedImage = this.galleryData[i];
- this.thumbnailElements[parseInt(i)] = currentImg;
- }
- },
- clearThumbnailsHighlights: function()
- {
- for(i=0;i<this.galleryData.length;i++)
- {
- this.thumbnailElements[i].clearTimer();
- this.thumbnailElements[i].custom(0.2);
- }
- },
- centerCarouselOn: function(num) {
- var carouselElement = this.thumbnailElements[num];
- var position = carouselElement.element.offsetLeft + (carouselElement.element.offsetWidth / 2);
- var carouselWidth = this.carouselWrapper.offsetWidth;
- var carouselInnerWidth = this.carouselInner.offsetWidth;
- var diffWidth = carouselWidth / 2;
- var scrollPos = position-diffWidth;
- this.carouselWrapper.elementScroller.scrollTo(scrollPos,0);
- },
- initInfoSlideshow: function() {
- /*if (this.slideInfoZone.element)
- this.slideInfoZone.element.remove();*/
- this.slideInfoZone = new Fx.Styles(new Element('div').addClass('slideInfoZone').injectInside($(this.galleryElement))).set({'opacity':0});
- var slideInfoZoneTitle = new Element('h2').injectInside(this.slideInfoZone.element);
- var slideInfoZoneDescription = new Element('p').injectInside(this.slideInfoZone.element);
- this.slideInfoZone.normalHeight = this.slideInfoZone.element.offsetHeight;
- this.slideInfoZone.element.setStyle('opacity',0);
- },
- changeInfoSlideShow: function()
- {
- this.hideInfoSlideShow.delay(10, this);
- this.showInfoSlideShow.delay(500, this);
- },
- showInfoSlideShow: function() {
- this.fireEvent('onShowInfopane');
- this.slideInfoZone.clearTimer();
- element = this.slideInfoZone.element;
- element.getElement('h2').setHTML(this.galleryData[this.currentIter].title);
- element.getElement('p').setHTML(this.galleryData[this.currentIter].description);
- this.slideInfoZone.custom({'opacity': [0, this.options.slideInfoZoneOpacity], 'height': [0, this.slideInfoZone.normalHeight]});
- if (this.options.showCarousel)
- this.slideInfoZone.chain(this.centerCarouselOn.pass(this.currentIter, this));
- return this.slideInfoZone;
- },
- hideInfoSlideShow: function() {
- this.fireEvent('onHideInfopane');
- this.slideInfoZone.clearTimer();
- this.slideInfoZone.custom({'opacity': 0, 'height': 0});
- return this.slideInfoZone;
- },
- makeLink: function(num) {
- this.currentLink.setProperties({
- href: this.galleryData[num].link,
- title: this.galleryData[num].linkTitle
- })
- if (!((this.options.embedLinks) && (!this.options.showArrows) && (!this.options.showCarousel)))
- this.currentLink.setStyle('display', 'block');
- },
- showDescription: function(num) {
- var descObj = document.getElementById('DescriptionDiv');
- if (descObj)
- descObj.setHTML(this.galleryData[num].outsideDescription);
- },
- clearLink: function() {
- this.currentLink.setProperties({href: '', title: ''});
- if (!((this.options.embedLinks) && (!this.options.showArrows) && (!this.options.showCarousel)))
- this.currentLink.setStyle('display', 'none');
- }
-});
-gallery.implement(new Events);
-gallery.implement(new Options);
-
-/* All code copyright 2006 Jonathan Schemoul */
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.js b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.js
deleted file mode 100644
index eb6402a..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.js
+++ /dev/null
@@ -1,2 +0,0 @@
-//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('k 11=f(1S){k 4s=f(){j(9.1e&&Y[0]!=\'7h\')h 9.1e.2m(9,Y);Q h 9};I(k n W 9)4s[n]=9[n];4s.U=1S;h 4s};11.1G=f(){};11.U={N:f(1S){k 4r=M 9(\'7h\');k 7g=f(2s,2f){j(!2s.2m||!2f.2m)h T;h f(){9.1t=2s;h 2f.2m(9,Y)}};I(k n W 1S){k 2s=4r[n];k 2f=1S[n];j(2s&&2s!=2f)2f=7g(2s,2f)||2f;4r[n]=2f}h M 11(4r)},1T:f(1S){I(k n W 1S)9.U[n]=1S[n]}};1H.N=f(){k R=Y;R=(R[1])?[R[0],R[1]]:[9,R[0]];I(k n W R[1])R[0][n]=R[1][n];h R[0]};1H.5p=f(){I(k i=0;i<Y.14;i++)Y[i].N=11.U.1T};M 1H.5p(59,1r,5e,76,11);j(5r 2I==\'3z\'){k 2I=11.1G;2I.U={}}f $q(u){j(u===1K||u===3z)h T;k q=5r u;j(q==\'5o\'){j(u 4m 2I)h\'r\';j(u 4m 1r)h\'1R\';j(u.9Y){2c(u.6x){1c 1:h\'r\';1c 3:h u.9X.15(\'\\\\S\')?\'9W\':\'4f\'}}}h q};f $2B(u){h!!(u||u===0)};f $9V(u,7f){h($q(u))?u:7f};f $7e(3o,1B){h G.9U(G.7e()*(1B-3o+1)+3o)};f $3Q(1f){9T(1f);9S(1f);h 1K};j(12.9R)12.3w=12[12.9Q?\'9P\':\'53\']=1g;Q j(L.6J&&!L.9O&&!9N.9M)12.3W=1g;Q j(L.9L!=1K)12.5m=1g;1r.U.4q=1r.U.4q||f(O,J){I(k i=0;i<9.14;i++)O.1i(J,9[i],i,9)};1r.U.4X=1r.U.4X||f(O,J){k 5u=[];I(k i=0;i<9.14;i++)5u[i]=O.1i(J,9[i],i,9);h 5u};1r.U.7d=1r.U.7d||f(O,J){I(k i=0;i<9.14;i++){j(!O.1i(J,9[i],i,9))h T}h 1g};1r.U.7c=1r.U.7c||f(O,J){I(k i=0;i<9.14;i++){j(O.1i(J,9[i],i,9))h 1g}h T};1r.U.4g=1r.U.4g||f(3a,F){F=F||0;j(F<0)F=G.1B(0,9.14+F);34(F<9.14){j(9[F]===3a)h F;F++}h-1};1r.N({1o:1r.U.4q,54:f(){k 36=[];I(k i=0;i<9.14;i++)36[i]=9[i];h 36},3Z:f(3a){k i=0;34(i<9.14){j(9[i]==3a)9.47(i,1);Q i++}h 9},15:f(3a,F){h 9.4g(3a,F)!=-1},N:f(36){I(k i=0;i<36.14;i++)9.18(36[i]);h 9},9K:f(1u){k u={},14=G.3o(9.14,1u.14);I(k i=0;i<14;i++)u[1u[i]]=9[i];h u}});f $A(1R){h 1r.U.54.1i(1R)};f $1o(7b,O,J){h 1r.U.4q.1i(7b,O,J)};5e.N({15:f(7a,79){h M 9J(7a,79).15(9)},2C:f(){h 5s(9)},74:f(){h 3t(9)},5n:f(){h 9.35(/-\\D/g,f(28){h 28.5t(1).78()})},6O:f(){h 9.35(/\\w[A-Z]/g,f(28){h(28.5t(0)+\'-\'+28.5t(1).3G())})},9I:f(){h 9.3G().35(/\\b[a-z]/g,f(28){h 28.78()})},77:f(){h 9.35(/^\\s+|\\s+$/g,\'\')},45:f(){h 9.35(/\\s{2,}/g,\' \').77()},3I:f(1R){k 1l=9.28(/\\d{1,3}/g);h(1l)?1l.3I(1R):T},3s:f(1R){k 2J=9.28(\'^#?(\\\\w{1,2})(\\\\w{1,2})(\\\\w{1,2})$\');h(2J)?2J.3s(1R):T}});1r.N({3I:f(1R){j(9.14<3)h T;j(9[3]&&9[3]==0)h\'9H\';k 2J=[];I(k i=0;i<3;i++){k 4p=(9[i]-0).9G(16);2J.18(4p.14==1?\'0\'+4p:4p)}h 1R?2J:\'#\'+2J.3r(\'\')},3s:f(1R){j(9.14!=4)h T;k 1l=[];I(k i=1;i<4;i++){j(9[i].14==1)9[i]+=9[i];1l.18(5s(9[i],16))}h 1R?1l:\'1l(\'+1l.3r(\',\')+\')\'}});76.N({2C:f(){h 5s(9)},74:f(){h 3t(9)}});59.N({2e:f(m){k O=9;m=1H.N({\'J\':O,\'o\':T,\'Y\':1K,\'2d\':T,\'2k\':T,\'4o\':T},m||{});j(m.Y!=1K&&5r m.Y!=\'3z\'&&!(m.Y 4m 1r))m.Y=[m.Y];h f(o){k R=m.Y||Y;j(m.o){o=(m.o===1g)?o||12.o:M m.o(o);R=[o].9F(R)}k 2t=f(){h O.2m(m.J,R)};j(m.2d)h 9E(2t,m.2d);j(m.2k)h 9D(2t,m.2k);j(m.4o){6g{k 5q=2t()}6f(73){5q=73}9C{h 5q}}Q h 2t()}},9B:f(R,J){h 9.2e({\'Y\':R,\'J\':J})},4o:f(R,J){h 9.2e({\'Y\':R,\'J\':J,\'4o\':1g})()},J:f(J,R){h 9.2e({\'J\':J,\'Y\':R})},9A:f(J,R){h 9.2e({\'J\':J,\'o\':1g,\'Y\':R})},2d:f(4n,J,R){h 9.2e({\'2d\':4n,\'J\':J,\'Y\':R})()},2k:f(4n,J,R){h 9.2e({\'2k\':4n,\'J\':J,\'Y\':R})()}});k 1b=M 11({1e:f(l){j($q(l)==\'4j\')l=L.6H(l);h $(l)}});f $(l){j(!l)h T;j(l.72||[12,L].15(l))h l;j($q(l)==\'4j\')l=L.44(l);j($q(l)!=\'r\')h T;j([\'5o\',\'9z\'].15(l.41.3G())||l.N)h l;l.72=1g;31.6z(l);l.N=1H.N;j(!(l 4m 2I))l.N(1b.U);h l};k 1N=M 11({});M 1H.5p(1N);L.2G=L.56;f $$(){j(!Y)h T;j(Y.14==1){j(!Y[0])h T;j(Y[0].71)h Y[0]}k 1w=[];$1o(Y,f(1v){2c($q(1v)){1c\'r\':1w.18($(1v));1P;1c\'4j\':1v=L.2G(1v);6F:j(1v.14){$1o(1v,f(l){j($(l))1w.18(l)})}}});1w.71=1g;h 1H.N(1w,M 1N)};1N.3T=f(n){h f(){k R=Y;k 3J=[];k 1w=1g;$1o(9,f(l){k 2t=l[n].2m(l,R);j($q(2t)!=\'r\')1w=T;3J.18(2t)});j(1w)3J=$$(3J);h 3J}};1b.N=f(1S){I(k n W 1S){2I.U[n]=1S[n];1b.U[n]=1S[n];1N.U[n]=1N.3T(n)}};1b.N({4l:f(l,70){l=$(l)||M 1b(l);2c(70){1c"6Y":$(l.26).6Z(9,l);1P;1c"6X":j(!l.5k())$(l.26).4k(9);Q $(l.26).6Z(9,l.5k());1P;1c"6W":l.4k(9)}h 9},9y:f(l){h 9.4l(l,\'6Y\')},5K:f(l){h 9.4l(l,\'6X\')},9x:f(l){h 9.4l(l,\'6W\')},5J:f(l){9.4k($(l)||M 1b(l));h 9},3Z:f(){9.26.9w(9);h 9},9v:f(6V){k l=9.9u(6V!==T);h $(l)},6G:f(l){l=$(l)||M 1b(l);9.26.9t(l,9);h l},9s:f(33){j(12.3w){2c(9.3C()){1c\'1h\':9.9r.6S=33;h 9;1c\'52\':9.4d(\'33\',33);h 9}}9.4k(L.9q(33));h 9},3A:f(1d){h 9.1d.15(\'(?:^|\\\\s+)\'+1d+\'(?:\\\\s+|$)\')},6T:f(1d){j(!9.3A(1d))9.1d=(9.1d+\' \'+1d).45();h 9},6U:f(1d){j(9.3A(1d))9.1d=9.1d.35(1d,\'\').45();h 9},9p:f(1d){h 9.3A(1d)?9.6U(1d):9.6T(1d)},1F:f(n,K){j(n==\'1Y\')9.6R(3t(K));Q 9.1h[n.5n()]=(K.18)?K.3I():K;h 9},6I:f(1L){2c($q(1L)){1c\'5o\':I(k n W 1L)9.1F(n,1L[n]);1P;1c\'4j\':j(12.3w)9.6S=1L;Q 9.6E(\'1h\',1L)}h 9},6R:f(1Y){j(1Y==0){j(9.1h.4i!="3S")9.1h.4i="3S"}Q{j(9.1h.4i!="6Q")9.1h.4i="6Q"}j(!9.4h||!9.4h.9o)9.1h.9n=1;j(12.3w)9.1h.3D="3x(1Y="+1Y*3g+")";9.1h.1Y=9.1Y=1Y;h 9},1W:f(n){n=n.5n();k 1h=9.1h[n]||T;j(!$2B(1h)){j(n==\'1Y\')h $2B(9.1Y)?9.1Y:1;j([\'2n\',\'9m\'].15(n)){h[9.1W(n+\'-2w\')||0,9.1W(n+\'-5a\')||0,9.1W(n+\'-6B\')||0,9.1W(n+\'-2i\')||0].3r(\' \')}j(L.6P)1h=L.6P.9l(9,1K).9k(n.6O());Q j(9.4h)1h=9.4h[n]}h(1h&&n.15(\'1A\',\'i\')&&1h.15(\'1l\'))?1h.3I():1h},1a:f(q,O){9.V=9.V||{};9.V[q]=9.V[q]||{\'1u\':[],\'1z\':[]};j(!9.V[q].1u.15(O)){9.V[q].1u.18(O);j(9.6N){9.6N((q==\'2M\'&&12.5m)?\'5f\':q,O,T)}Q{O=O.J(9);9.9j(\'58\'+q,O);9.V[q].1z.18(O)}}h 9},9i:f(1L){j(1L){I(k q W 1L)9.1a(q,1L[q])}h 9},1E:f(q,O){j(9.V&&9.V[q]){k 1D=9.V[q].1u.4g(O);j(1D==-1)h 9;k 1O=9.V[q].1u.47(1D,1)[0];j(9.6M){9.6M((q==\'2M\'&&12.5m)?\'5f\':q,1O,T)}Q{9.9h(\'58\'+q,9.V[q].1z.47(1D,1)[0])}}h 9},5h:f(q){j(9.V){j(q){j(9.V[q]){9.V[q].1u.1o(f(O){9.1E(q,O)},9);9.V[q]=1K}}Q{I(k 6L W 9.V)9.5h(6L);9.V=1K}}h 9},1x:f(q,R){j(9.V&&9.V[q]){R=R||[];j($q(R)!=\'1R\')R=[R];9.V[q].1u.1o(f(O){O.2m(9,R)},9)}},5j:f(5l){k l=9[5l+\'6K\'];34($q(l)==\'4f\')l=l[5l+\'6K\'];h $(l)},9g:f(){h 9.5j(\'2s\')},5k:f(){h 9.5j(\'9f\')},9e:f(){k l=9.9d;34($q(l)==\'4f\')l=l.9c;h $(l)},9b:f(){k l=9.9a;34($q(l)==\'4f\')l=l.99;h $(l)},98:f(){h $(9.26)},97:f(){h $$(9.6J)},4d:f(n,K){2c(n){1c\'6C\':9.1d=K;1P;1c\'1h\':9.6I(K);1P;1c\'24\':j(12.53){k l=$(L.6H(\'<\'+9.3C()+\' 24="\'+K+\'" />\'));$1o(9.96,f(4e){j(4e.24!=\'24\')l.4d(4e.24,4e.K)});j(9.26)9.6G(l);h l}6F:9.6E(n,K)}h 9},95:f(1L){I(k n W 1L)9.4d(n,1L[n]);h 9},94:f(6D){9.93=6D;h 9},92:f(n){h(n==\'6C\')?9.1d:9.6k(n)},3C:f(){h 9.41.3G()},2O:f(){k l=9,4c=0,4b=0;91{4c+=l.4c||0;4b+=l.4b||0;l=l.90}34(l);h{\'x\':4c,\'y\':4b}},2a:f(x,y){9.3U=x;9.3V=y},3P:f(){h{\'1V\':{\'x\':9.3U,\'y\':9.3V},\'2A\':{\'x\':9.2x,\'y\':9.2v},\'3O\':{\'x\':9.68,\'y\':9.69}}},4D:f(){h 9.2O().y},4F:f(){h 9.2O().x},8Z:f(){k 5i=9.2O();k u={\'3j\':9.2x,\'3i\':9.2v,\'2i\':5i.x,\'2w\':5i.y};u.5a=u.2i+u.3j;u.6B=u.2w+u.3i;h u},2F:f(){2c(9.3C()){1c\'2U\':j(9.6A!=-1)h 9.m[9.6A].K;1P;1c\'8Y\':j(!(9.8X&&[\'8W\',\'8V\'].15(9.q))&&![\'3S\',\'33\',\'8U\'].15(9.q))1P;1c\'8T\':h 9.K}h T}});k 8S=12;12.1a=L.1a=1b.U.1a;12.1E=L.1E=1b.U.1E;k 31={1w:[],6z:f(r){31.1w.18(r)},5g:f(){12.1E(\'6y\',31.5g);31.1w.1o(f(l){l.5h();I(k p W 1b.U)2I[p]=12[p]=L[p]=l[p]=1K;l.N=1K})}};12.1a(\'6y\',31.5g);k 3F=M 11({1e:f(o){9.o=o||12.o;9.q=9.o.q;9.3H=9.o.3H||9.o.8R;j(9.3H.6x==3)9.3H=9.3H.26;9.8Q=9.o.8P;9.8O=9.o.8N;9.8M=9.o.8L;9.8K=9.o.8J;j([\'5f\',\'2M\'].15(9.q)){9.3f=9.o.6w?(9.o.6w/ (12.51 ? -6v : 6v)) : -(9.o.8I || 0) /3}Q j(9.q.15(\'1O\')){9.5d=9.o.6r||9.o.8H;I(k 24 W 3F.1u){j(3F.1u[24]==9.5d)k 6u=24}9.1O=6u||5e.8G(9.5d).3G()}Q j(9.q.15(\'2l\')||9.q==\'8F\'){9.1y={\'x\':9.o.5c||9.o.6t+L.2r.3U,\'y\':9.o.5b||9.o.6s+L.2r.3V};9.5y={\'x\':9.o.5c?9.o.5c-12.66:9.o.6t,\'y\':9.o.5b?9.o.5b-12.67:9.o.6s};9.8E=(9.o.6r==3)||(9.o.8D==2);2c(9.q){1c\'8C\':9.4a=9.o.4a||9.o.8B;1P;1c\'8A\':9.4a=9.o.4a||9.o.5L}}},1s:f(){9.49();9.48();h 9},49:f(){j(9.o.49)9.o.49();Q 9.o.8z=1g;h 9},48:f(){j(9.o.48)9.o.48();Q 9.o.8y=T;h 9}});3F.1u={\'8x\':13,\'8w\':38,\'8v\':40,\'2i\':37,\'5a\':39,\'8u\':27,\'8t\':32,\'8s\':8,\'8r\':46};59.N({2y:f(J,R){h 9.2e({\'J\':J,\'Y\':R,\'o\':3F})}});k 5S=M 11({8q:f(O){9.2H=9.2H||[];9.2H.18(O);h 9},5Z:f(){j(9.2H&&9.2H.14)9.2H.47(0,1)[0].2d(10,9)},8p:f(){9.2H=[]}});k 3c=M 11({1a:f(q,O){j(O!=11.1G){9.V=9.V||{};9.V[q]=9.V[q]||[];j(!9.V[q].15(O))9.V[q].18(O)}h 9},1x:f(q,R,2d){j(9.V&&9.V[q]){9.V[q].1o(f(O){O.2e({\'J\':9,\'2d\':2d,\'Y\':R})()},9)}h 9},1E:f(q,O){j(9.V&&9.V[q])9.V[q].3Z(O);h 9}});k 3b=M 11({2N:f(6q,m){9.m=1H.N(6q,m);j(9.1a){I(k 3E W 9.m){j(($q(9.m[3E])==\'f\')&&3E.15(\'^58[A-Z]\'))9.1a(3E,9.m[3E])}}h 9}});f $E(1v,3D){h($(3D)||L).42(1v)};f $8o(1v,3D){h($(3D)||L).2G(1v)};1b.N({3B:f(1v){k 1Q=[];1v.45().4Y(\' \').1o(f(43,i){k 1q=43.28(\'^(\\\\w*|\\\\*)(?:#([\\\\6p-]+)|\\\\.([\\\\6p-]+))?(?:\\\\[["\\\']?(\\\\w+)["\\\']?(?:([\\\\*\\\\^\\\\$]?=)["\\\']?(\\\\w*)["\\\']?)?\\\\])?$\');j(!1q)h;1q[1]=1q[1]||\'*\';j(i==0){j(1q[2]){k l=9.44(1q[2]);j(!l||((1q[1]!=\'*\')&&(1b.U.3C.1i(l)!=1q[1])))h;1Q=[l]}Q{1Q=$A(9.56(1q[1]))}}Q{1Q=1N.U.6m.1i(1Q,1q[1]);j(1q[2])1Q=1N.U.6o.1i(1Q,1q[2])}j(1q[3])1Q=1N.U.6n.1i(1Q,1q[3]);j(1q[4])1Q=1N.U.6l.1i(1Q,1q[4],1q[6],1q[5])},9);h $$(1Q)},44:f(2Z){k l=L.44(2Z);j(!l)h T;I(k 1t=l.26;1t!=9;1t=1t.26){j(!1t)h T}h l},42:f(1v){h 9.2G(1v)[0]},2G:f(1v){k 57=[];1v.4Y(\',\').1o(f(43){57.N(9.3B(43))},9);h $$(57)}});L.N=1H.N;L.N({8n:f(1d){h L.3B(\'.\'+1d)},42:1b.U.42,3B:1b.U.3B,2G:1b.U.2G});1N.N({6o:f(2Z,8m){k 1p=[];9.1o(f(l){j(l.2Z==2Z)1p.18(l)});h 1p},6n:f(1d){k 1p=[];9.1o(f(l){j(1b.U.3A.1i(l,1d))1p.18(l)});h 1p},6m:f(41){k 1p=[];9.1o(f(l){1p.N(l.56(41))});h 1p},6l:f(24,K,55){k 1p=[];9.1o(f(l){k 30=l.6k(24);j(!30)h 1p;j(!55)h 1p.18(l);2c(55){1c\'*=\':j(30.15(K))1p.18(l);1P;1c\'=\':j(30==K)1p.18(l);1P;1c\'^=\':j(30.15(\'^\'+K))1p.18(l);1P;1c\'$=\':j(30.15(K+\'$\'))1p.18(l)}h 1p});h 1p}});k 6j=M 11({14:0,1e:f(u){9.u={};I(k n W u){9.u[n]=u[n];9.14++}},8l:f(1O){h 9.u[1O]},1U:f(1O,K){j(K==1K)h T;j(9.u[1O]==3z)9.14++;9.u[1O]=K;h 9},3Z:f(1O){j(9.u[1O]==3z)h T;k u={};9.14--;I(k n W 9.u){j(n!=1O)u[n]=9.u[n]}9.u=u;h 9},1o:f(O,J){I(k n W 9.u)O.1i(J||9,n,9.u[n])},N:f(u){9.1e(1H.N(9.u,u));h 9},1G:f(){h(9.14==0)},1u:f(){k 1u=[];I(k n W 9.u)1u.18(n);h 1u},1z:f(){k 1z=[];I(k n W 9.u)1z.18(9.u[n]);h 1z}});f $H(u){h M 6j(u)};k 2q=M 11({1e:f(1A){j(1A.6i&&1A.6h)h 1A;k 1l=(1A.18)?1A:1A.3s(1g);h 1H.N(1l,2q.U)},6i:f(){k 3y=$A(Y);k 3x=50;j($q(3y[3y.14-1])==\'5N\')3x=3y.8k();k 1l=9.54();3y.1o(f(1A){1A=M 2q(1A);I(k i=0;i<3;i++)1l[i]=G.3e((1l[i]/ 3g * (3g - 3x)) + (1A[i] /3g*3x))});h M 2q(1l)},6h:f(){k 1l=[];I(k i=0;i<3;i++)1l.18(8j-9[i]);h M 2q(1l)}});f $C(1A){h M 2q(1A)};12.N=1H.N;12.N({8i:f(){j(9.53)6g{L.8h("8g",T,1g)}6f(e){}},1a:f(q,O){j(q==\'3u\'){j(9.3Y)O();Q j(!9.V||!9.V.3u){k 3v=f(){j(9.3Y)h;9.3Y=1g;j(9.1f)9.1f=$3Q(9.1f);1b.U.1x.1i(9,\'3u\');9.V.3u=1K}.J(9);j(L.3X&&9.3W){9.1f=f(){j([\'3Y\',\'6d\'].15(L.3X))3v()}.2k(50)}Q j(L.3X&&9.3w){L.8f("<52 2Z=6e 8e 8d=8c:8b(0)><\\/52>");$(\'6e\').8a=f(){j(9.3X==\'6d\')3v()}}Q{9.1a("89",3v);L.1a("88",3v)}}}1b.U.1a.1i(9,q,O);h 9},87:f(6c){h 9.1a(\'3u\',6c)}});12.N({63:f(){j(9.3W||9.51)h 9.86;Q h L.2r.6b||L.4N.6b},62:f(){j(9.3W||9.51)h 9.85;h L.2r.6a||L.4N.6a},60:f(){h L.2r.69},61:f(){h L.2r.68},64:f(){h 9.67||L.2r.3V},65:f(){h 9.66||L.2r.3U},3P:f(){h{\'1V\':{\'x\':9.65(),\'y\':9.64()},\'2A\':{\'x\':9.63(),\'y\':9.62()},\'3O\':{\'x\':9.61(),\'y\':9.60()}}},2O:f(){h{\'x\':0,\'y\':0}}});k X={};X.1C=M 11({2j:f(){h{2K:11.1G,2g:11.1G,5T:11.1G,5Y:X.2Q.4U,4Z:84,1J:\'4I\',2T:1g,5U:50}},1e:f(m){9.r=9.r||1K;9.2N(9.2j(),m);j(9.m.1e)9.m.1e.1i(9)},19:f(){k 2Y=M 5W().5V();j(2Y<9.2Y+9.m.4Z){9.5X=2Y-9.2Y;9.2E();9.2o()}Q{9.1s(1g);9.P=9.B;9.2o();9.1x(\'2g\',9.r,10);9.5Z()}},1U:f(B){9.P=B;9.2o();h 9},2E:f(){9.P=9.2D(9.F,9.B)},2D:f(F,B){h 9.m.5Y(9.5X,F,(B-F),9.m.4Z)},1m:f(F,B){j(!9.m.2T)9.1s();Q j(9.1f)h 9;9.F=F;9.B=B;9.2Y=M 5W().5V();9.1f=9.19.2k(G.3e(83/9.m.5U),9);9.1x(\'2K\',9.r);h 9},1s:f(2h){j(!9.1f)h 9;9.1f=$3Q(9.1f);j(!2h)9.1x(\'5T\',9.r);h 9},82:f(F,B){h 9.1m(F,B)},81:f(2h){h 9.1s(2h)}});X.1C.1T(M 5S);X.1C.1T(M 3c);X.1C.1T(M 3b);X.2Q={5F:f(t,b,c,d){h c*t/d+b},4U:f(t,b,c,d){h-c/2*(G.4T(G.1X*t/d)-1)+b}};X.23={2U:f(n,B){j(n.15(\'1A\',\'i\'))h 9.2q;j(B.15&&B.15(\' \'))h 9.3T;h 9.5R},1M:f(l,n,2X){j(!2X.18)2X=[2X];k F=2X[0],B=2X[1];j(!B&&B!=0){B=F;F=l.1W(n)}k 17=9.2U(n,B);h{F:17.1M(F),B:17.1M(B),17:17}}};X.23.5R={1M:f(K){h 3t(K)},2V:f(F,B,2W){h 2W.2D(F,B)},2F:f(K,1J){h K+1J}};X.23.3T={1M:f(K){h K.18?K:K.4Y(\' \').4X(f(v){h 3t(v)})},2V:f(F,B,2W){k P=[];I(k i=0;i<F.14;i++)P[i]=2W.2D(F[i],B[i]);h P},2F:f(K,1J){h K.3r(1J+\' \')+1J}};X.23.2q={1M:f(K){h K.18?K:K.3s(1g)},2V:f(F,B,2W){k P=[];I(k i=0;i<F.14;i++)P[i]=G.3e(2W.2D(F[i],B[i]));h P},2F:f(K){h\'1l(\'+K.3r(\',\')+\')\'}};X.5Q=X.1C.N({1e:f(l,n,m){9.r=$(l);9.n=n;9.1t(m)},5I:f(){h 9.1U(0)},2E:f(){9.P=9.17.2V(9.F,9.B,9)},1U:f(B){9.17=X.23.2U(9.n,B);h 9.1t(9.17.1M(B))},1m:f(F,B){j(9.1f&&9.m.2T)h 9;k 1n=X.23.1M(9.r,9.n,[F,B]);9.17=1n.17;h 9.1t(1n.F,1n.B)},2o:f(){9.r.1F(9.n,9.17.2F(9.P,9.m.1J))}});1b.N({80:f(n,m){h M X.5Q(9,n,m)}});X.5P=X.1C.N({1e:f(l,m){9.r=$(l);9.1t(m)},2E:f(){I(k p W 9.F)9.P[p]=9.17[p].2V(9.F[p],9.B[p],9)},1U:f(B){k 1n={};9.17={};I(k p W B){9.17[p]=X.23.2U(p,B[p]);1n[p]=9.17[p].1M(B[p])}h 9.1t(1n)},1m:f(u){j(9.1f&&9.m.2T)h 9;9.P={};9.17={};k F={},B={};I(k p W u){k 1n=X.23.1M(9.r,p,u[p]);F[p]=1n.F;B[p]=1n.B;9.17[p]=1n.17}h 9.1t(F,B)},2o:f(){I(k p W 9.P)9.r.1F(p,9.17[p].2F(9.P[p],9.m.1J))}});1b.N({7Z:f(m){h M X.5P(9,m)}});X.1N=X.1C.N({1e:f(1w,m){9.1w=$$(1w);9.1t(m)},2E:f(){I(k i W 9.F){k 3q=9.F[i],2p=9.B[i],2b=9.17[i],3p=9.P[i]={};I(k p W 3q)3p[p]=2b[p].2V(3q[p],2p[p],9)}},1U:f(B){k 1n={};9.17={};I(k i W B){k 2p=B[i],2b=9.17[i]={},5O=1n[i]={};I(k p W 2p){2b[p]=X.23.2U(p,2p[p]);5O[p]=2b[p].1M(2p[p])}}h 9.1t(1n)},1m:f(u){j(9.1f&&9.m.2T)h 9;9.P={};9.17={};k F={},B={};I(k i W u){k 4W=u[i],3q=F[i]={},2p=B[i]={},2b=9.17[i]={};I(k p W 4W){k 1n=X.23.1M(9.1w[i],p,4W[p]);3q[p]=1n.F;2p[p]=1n.B;2b[p]=1n.17}}h 9.1t(F,B)},2o:f(){I(k i W 9.P){k 3p=9.P[i],2b=9.17[i];I(k p W 3p)9.1w[i].1F(p,2b[p].2F(3p[p],9.m.1J))}}});X.7Y=X.1C.N({1e:f(r,m){9.P=[];9.r=$(r);9.1a(\'2K\',f(){9.r.1a(\'2M\',9.1s.J(9,T))}.J(9));9.1E(\'2g\',f(){9.r.1E(\'2M\',9.1s.J(9,T))}.J(9));9.1t(m)},2E:f(){I(k i=0;i<2;i++)9.P[i]=9.2D(9.F[i],9.B[i])},2a:f(x,y){j(9.1f&&9.m.2T)h 9;k l=9.r.3P();k 1z={\'x\':x,\'y\':y};I(k z W l.2A){k 1B=l.3O[z]-l.2A[z];j($2B(1z[z]))1z[z]=($q(1z[z])==\'5N\')?G.1B(G.3o(1z[z],1B),0):1B;Q 1z[z]=l.1V[z]}h 9.1m([l.1V.x,l.1V.y],[1z.x,1z.y])},7X:f(){h 9.2a(T,0)},7W:f(){h 9.2a(T,\'5M\')},7V:f(){h 9.2a(0,T)},7U:f(){h 9.2a(\'5M\',T)},5L:f(l){h 9.2a($(l).4F(),$(l).4D())},2o:f(){9.r.2a(9.P[0],9.P[1])}});X.7T=X.1C.N({1e:f(l,m){9.r=$(l).1F(\'2n\',0);9.2R=M 1b(\'7S\').5K(9.r).1F(\'7R\',\'3S\').5J(9.r);9.2N({\'1k\':\'4E\'},m);9.P=[];9.1t(9.m)},2E:f(){I(k i=0;i<2;i++)9.P[i]=9.2D(9.F[i],9.B[i])},4E:f(){9.2n=\'2w\';9.4V=\'3i\';9.2S=9.r.2v;h[9.r.1W(\'2n-2w\').2C(),9.2R.1W(\'3i\').2C()]},4G:f(){9.2n=\'2i\';9.4V=\'3j\';9.2S=9.r.2x;h[9.r.1W(\'2n-2i\').2C(),9.2R.1W(\'3j\').2C()]},5H:f(1k){h 9.1m(9[1k||9.m.1k](),[0,9.2S])},5G:f(1k){h 9.1m(9[1k||9.m.1k](),[-9.2S,0])},5I:f(1k){9[1k||9.m.1k]();h 9.1U([-9.2S,0])},7Q:f(1k){9[1k||9.m.1k]();h 9.1U([0,9.2S])},7P:f(1k){j(9.2R.2v==0||9.2R.2x==0)h 9.5H(1k);Q h 9.5G(1k)},2o:f(){9.r.1F(\'2n-\'+9.2n,9.P[0]+9.m.1J);9.2R.1F(9.4V,9.P[1]+9.m.1J)}});X.2Q={5F:f(t,b,c,d){h c*t/d+b},7O:f(t,b,c,d){h c*(t/=d)*t+b},7N:f(t,b,c,d){h-c*(t/=d)*(t-2)+b},7M:f(t,b,c,d){j((t/=d/2)<1)h c/2*t*t+b;h-c/2*((--t)*(t-2)-1)+b},7L:f(t,b,c,d){h c*(t/=d)*t*t+b},7K:f(t,b,c,d){h c*((t=t/d-1)*t*t+1)+b},7J:f(t,b,c,d){j((t/=d/2)<1)h c/2*t*t*t+b;h c/2*((t-=2)*t*t+2)+b},7I:f(t,b,c,d){h c*(t/=d)*t*t*t+b},7H:f(t,b,c,d){h-c*((t=t/d-1)*t*t*t-1)+b},7G:f(t,b,c,d){j((t/=d/2)<1)h c/2*t*t*t*t+b;h-c/2*((t-=2)*t*t*t-2)+b},7F:f(t,b,c,d){h c*(t/=d)*t*t*t*t+b},7E:f(t,b,c,d){h c*((t=t/d-1)*t*t*t*t+1)+b},7D:f(t,b,c,d){j((t/=d/2)<1)h c/2*t*t*t*t*t+b;h c/2*((t-=2)*t*t*t*t+2)+b},7C:f(t,b,c,d){h-c*G.4T(t/d*(G.1X/2))+c+b},7B:f(t,b,c,d){h c*G.3n(t/d*(G.1X/2))+b},4U:f(t,b,c,d){h-c/2*(G.4T(G.1X*t/d)-1)+b},7A:f(t,b,c,d){h(t==0)?b:c*G.22(2,10*(t/d-1))+b},7z:f(t,b,c,d){h(t==d)?b+c:c*(-G.22(2,-10*t/d)+1)+b},7y:f(t,b,c,d){j(t==0)h b;j(t==d)h b+c;j((t/=d/2)<1)h c/2*G.22(2,10*(t-1))+b;h c/2*(-G.22(2,-10*--t)+2)+b},7x:f(t,b,c,d){h-c*(G.3m(1-(t/=d)*t)-1)+b},7w:f(t,b,c,d){h c*G.3m(1-(t=t/d-1)*t)+b},7v:f(t,b,c,d){j((t/=d/2)<1)h-c/2*(G.3m(1-t*t)-1)+b;h c/2*(G.3m(1-(t-=2)*t)+1)+b},7u:f(t,b,c,d,a,p){j(t==0)h b;j((t/=d)==1)h b+c;j(!p)p=d*.3;j(!a)a=1;j(a<G.4S(c)){a=c;k s=p/4}Q k s=p/(2*G.1X)*G.4R(c/a);h-(a*G.22(2,10*(t-=1))*G.3n((t*d-s)*(2*G.1X)/p))+b},7t:f(t,b,c,d,a,p){j(t==0)h b;j((t/=d)==1)h b+c;j(!p)p=d*.3;j(!a)a=1;j(a<G.4S(c)){a=c;k s=p/4}Q k s=p/(2*G.1X)*G.4R(c/a);h a*G.22(2,-10*t)*G.3n((t*d-s)*(2*G.1X)/p)+c+b},7s:f(t,b,c,d,a,p){j(t==0)h b;j((t/=d/2)==2)h b+c;j(!p)p=d*(.3*1.5);j(!a)a=1;j(a<G.4S(c)){a=c;k s=p/4}Q k s=p/(2*G.1X)*G.4R(c/a);j(t<1)h-.5*(a*G.22(2,10*(t-=1))*G.3n((t*d-s)*(2*G.1X)/p))+b;h a*G.22(2,-10*(t-=1))*G.3n((t*d-s)*(2*G.1X)/p)*.5+c+b},7r:f(t,b,c,d,s){j(!s)s=1.4Q;h c*(t/=d)*t*((s+1)*t-s)+b},7q:f(t,b,c,d,s){j(!s)s=1.4Q;h c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},7p:f(t,b,c,d,s){j(!s)s=1.4Q;j((t/=d/2)<1)h c/2*(t*t*(((s*=(1.5E))+1)*t-s))+b;h c/2*((t-=2)*t*(((s*=(1.5E))+1)*t+s)+2)+b},5D:f(t,b,c,d){h c-X.2Q.4P(d-t,0,c,d)+b},4P:f(t,b,c,d){j((t/=d)<(1/2.75)){h c*(7.3R*t*t)+b}Q j(t<(2/2.75)){h c*(7.3R*(t-=(1.5/2.75))*t+.75)+b}Q j(t<(2.5/2.75)){h c*(7.3R*(t-=(2.25/2.75))*t+.7o)+b}Q{h c*(7.3R*(t-=(2.7n/2.75))*t+.7m)+b}},7l:f(t,b,c,d){j(t<d/2)h X.2Q.5D(t*2,0,c,d)*.5+b;h X.2Q.4P(t*2-d,0,c,d)*.5+c*.5+b}};k 2L={};2L.1C=M 11({2j:f(){h{3k:T,1J:\'4I\',2K:11.1G,2g:11.1G,5B:11.1G,4A:11.1G,1j:T,2u:{x:\'2i\',y:\'2w\'},3N:6}},1e:f(l,m){9.2N(9.2j(),m);9.r=$(l);9.3k=$(9.m.3k)||9.r;9.2l={\'P\':{},\'1D\':{}};9.K={\'1m\':{},\'P\':{}};9.1I={\'1m\':9.1m.2y(9)};9.3k.1a(\'4H\',9.1I.1m);j(9.m.1e)9.m.1e.1i(9)},1m:f(o){9.2l.1m=o.1y;k 1j=9.m.1j;9.1j={\'x\':[],\'y\':[]};I(k z W 9.m.2u){9.K.P[z]=9.r.1W(9.m.2u[z]).2C();9.2l.1D[z]=o.1y[z]-9.K.P[z];j(1j&&1j[z]){I(k i=0;i<2;i++){j($2B(1j[z][i]))9.1j[z][i]=1j[z][i].2m?1j[z][i].1i(9):1j[z][i]}}}9.1I.29=9.29.2y(9);9.1I.3l=9.3l.2y(9);9.1I.1s=9.1s.J(9);L.1a(\'2P\',9.m.3N?9.1I.3l:9.1I.29);L.1a(\'5A\',9.1I.1s);9.1x(\'2K\',9.r);o.1s()},3l:f(o){k 5C=G.3e(G.3m(G.22(o.1y.x-9.2l.1m.x,2)+G.22(o.1y.y-9.2l.1m.y,2)));j(5C>9.m.3N){L.1E(\'2P\',9.1I.3l);L.1a(\'2P\',9.1I.29);9.29(o);9.1x(\'5B\',9.r)}o.1s()},29:f(o){9.4O=T;9.2l.P=o.1y;I(k z W 9.m.2u){9.K.P[z]=o.1y[z]-9.2l.1D[z];j(9.1j[z]){j($2B(9.1j[z][1])&&(9.K.P[z]>9.1j[z][1])){9.K.P[z]=9.1j[z][1];9.4O=1g}Q j($2B(9.1j[z][0])&&(9.K.P[z]<9.1j[z][0])){9.K.P[z]=9.1j[z][0];9.4O=1g}}9.r.1F(9.m.2u[z],9.K.P[z]+9.m.1J)}9.1x(\'4A\',9.r);o.1s()},7k:f(){9.3k.1E(\'4H\',9.1I.1m)},1s:f(){L.1E(\'2P\',9.1I.29);L.1E(\'5A\',9.1I.1s);9.1x(\'2g\',9.r)}});2L.1C.1T(M 3c);2L.1C.1T(M 3b);1b.N({7j:f(m){h M 2L.1C(9,1H.N(m||{},{2u:{x:\'3j\',y:\'3i\'}}))}});k 4J=M 11({2j:f(){h{3h:20,4K:1,3K:f(x,y){9.r.2a(x,y)}}},1e:f(r,m){9.2N(9.2j(),m);9.r=$(r);9.4M=([12,L].15(r))?$(L.4N):9.r},1m:f(){9.4L=9.5z.2y(9);9.4M.1a(\'2P\',9.4L)},1s:f(){9.4M.1E(\'2P\',9.4L);9.1f=$3Q(9.1f)},5z:f(o){9.1y=(9.r==12)?o.5y:o.1y;j(!9.1f)9.1f=9.1V.2k(50,9)},1V:f(){k l=9.r.3P();k 1D=9.r.2O();k 2z={\'x\':0,\'y\':0};I(k z W 9.1y){j(9.1y[z]<(9.m.3h+1D[z])&&l.1V[z]!=0)2z[z]=(9.1y[z]-9.m.3h-1D[z])*9.m.4K;Q j(9.1y[z]+9.m.3h>(l.2A[z]+1D[z])&&l.1V[z]+l.2A[z]!=l.3O[z])2z[z]=(9.1y[z]-l.2A[z]+9.m.3h-1D[z])*9.m.4K}j(2z.y||2z.x)9.1x(\'3K\',[l.1V.x+2z.x,l.1V.y+2z.y])}});4J.1T(M 3c);4J.1T(M 3b);k 4t=M 11({2j:f(){h{3K:11.1G,2g:11.1G,4x:f(1D){9.21.1F(9.p,1D+\'4I\')},3d:3g,1k:\'4G\',3f:T}},1e:f(l,21,m){9.r=$(l);9.21=$(21);9.2N(9.2j(),m);9.4w=-1;9.4v=-1;9.19=-1;9.r.1a(\'4H\',9.5w.2y(9));j(9.m.3f)9.r.1a(\'2M\',9.5x.2y(9));j(9.m.1k==\'4G\'){9.z=\'x\';9.p=\'2i\';9.1B=9.r.2x-9.21.2x;9.4y=9.21.2x/2;9.4z=9.r.4F.J(9.r)}Q j(9.m.1k==\'4E\'){9.z=\'y\';9.p=\'2w\';9.1B=9.r.2v-9.21.2v;9.4y=9.21.2v/2;9.4z=9.r.4D.J(9.r)}9.21.1F(\'1Z\',\'7i\').1F(9.p,0);k 4B={},4C={};4C[9.z]=[0,9.1B];4B[9.z]=9.p;9.29=M 2L.1C(9.21,{1j:4C,3N:0,2u:4B,2K:f(){9.3M()}.J(9),4A:f(){9.3M()}.J(9),2g:f(){9.3M();9.2h()}.J(9)});j(9.m.1e)9.m.1e.1i(9)},1U:f(19){j(19>9.m.3d)19=9.m.3d;Q j(19<0)19=0;9.19=19;9.3L();9.2h();9.1x(\'4x\',9.5v(9.19)+\'\');h 9},5x:f(o){j(o.3f<0)9.1U(9.19+1);Q j(o.3f>0)9.1U(9.19-1);o.1s()},5w:f(o){k 1Z=o.1y[9.z]-9.4z()-9.4y;j(1Z>9.1B)1Z=9.1B;Q j(1Z<0)1Z=0;9.19=9.4u(1Z);9.3L();9.2h();9.1x(\'4x\',1Z+\'\')},3M:f(){9.19=9.4u(9.29.K.P[9.z]);9.3L()},3L:f(){j(9.4w!=9.19){9.4w=9.19;9.1x(\'3K\',9.19)}},2h:f(){j(9.4v!==9.19){9.4v=9.19;9.1x(\'2g\',9.19+\'\')}},4u:f(1Z){h G.3e(1Z/9.1B*9.m.3d)},5v:f(19){h(9.1B)*19/9.m.3d}});4t.1T(M 3c);4t.1T(M 3b);',62,619,'|||||||||this||||||function||return||if|var|el|options|property|event||type|element|||obj|||||||to||||from|Math||for|bind|value|document|new|extend|fn|now|else|args||false|prototype|events|in|Fx|arguments|||Class|window||length|test||css|push|step|addEvent|Element|case|className|initialize|timer|true|style|call|limit|mode|rgb|start|parsed|each|found|param|Array|stop|parent|keys|selector|elements|fireEvent|page|values|color|max|Base|pos|removeEvent|setStyle|empty|Object|bound|unit|null|source|parse|Elements|key|break|filters|array|properties|implement|set|scroll|getStyle|PI|opacity|position||knob|pow|CSS|name||parentNode||match|drag|scrollTo|iCss|switch|delay|create|current|onComplete|end|left|getOptions|periodical|mouse|apply|margin|increase|iTo|Color|documentElement|previous|returns|modifiers|offsetHeight|top|offsetWidth|bindWithEvent|change|size|chk|toInt|compute|setNow|getValue|getElementsBySelector|chains|HTMLElement|hex|onStart|Drag|mousewheel|setOptions|getOffsets|mousemove|Transitions|wrapper|offset|wait|select|getNow|fx|fromTo|time|id|att|Garbage||text|while|replace|newArray||||item|Options|Events|steps|round|wheel|100|area|height|width|handle|checkAndDrag|sqrt|sin|min|iNow|iFrom|join|hexToRgb|parseFloat|domready|domReady|ie|alpha|colors|undefined|hasClass|getElements|getTag|filter|option|Event|toLowerCase|target|rgbToHex|items|onChange|checkStep|draggedKnob|snap|scrollSize|getSize|clear|5625|hidden|Multi|scrollLeft|scrollTop|khtml|readyState|loaded|remove||tagName|getElement|sel|getElementById|clean||splice|preventDefault|stopPropagation|relatedTarget|offsetTop|offsetLeft|setProperty|attribute|whitespace|indexOf|currentStyle|visibility|string|appendChild|inject|instanceof|ms|attempt|bit|forEach|pr0t0typ3|klass|Slider|toStep|previousEnd|previousChange|onTick|half|getPos|onDrag|modSlide|limSlide|getTop|vertical|getLeft|horizontal|mousedown|px|Scroller|velocity|coord|mousemover|body|out|bounceOut|70158|asin|abs|cos|sineInOut|layout|iProps|map|split|duration||opera|script|ie6|copy|operator|getElementsByTagName|els|on|Function|right|pageY|pageX|code|String|DOMMouseScroll|trash|removeEvents|offs|getBrother|getNext|what|gecko|camelCase|object|Native|result|typeof|parseInt|charAt|results|toPosition|clickedElement|scrolledElement|client|getCoords|mouseup|onSnap|distance|bounceIn|525|linear|slideOut|slideIn|hide|adopt|injectAfter|toElement|full|number|iParsed|Styles|Style|Single|Chain|onCancel|fps|getTime|Date|cTime|transition|callChain|getScrollHeight|getScrollWidth|getHeight|getWidth|getScrollTop|getScrollLeft|pageXOffset|pageYOffset|scrollWidth|scrollHeight|clientHeight|clientWidth|init|complete|ie_ready|catch|try|invert|mix|Hash|getAttribute|filterByAttribute|filterByTagName|filterByClassName|filterById|w_|defaults|which|clientY|clientX|special|120|wheelDelta|nodeType|unload|collect|selectedIndex|bottom|class|html|setAttribute|default|replaceWith|createElement|setStyles|childNodes|Sibling|evType|removeEventListener|addEventListener|hyphenate|defaultView|visible|setOpacity|cssText|addClass|removeClass|contents|inside|after|before|insertBefore|where|_elements_extended_|_element_extended_|err|toFloat||Number|trim|toUpperCase|params|regex|iterable|some|every|random|picked|parentize|noinit|relative|makeResizable|detach|bounceInOut|984375|625|9375|backInOut|backOut|backIn|elasticInOut|elasticOut|elasticIn|circInOut|circOut|circIn|expoInOut|expoOut|expoIn|sineOut|sineIn|quintInOut|quintOut|quintIn|quartInOut|quartOut|quartIn|cubicInOut|cubicOut|cubicIn|quadInOut|quadOut|quadIn|toggle|show|overflow|div|Slide|toRight|toLeft|toBottom|toTop|Scroll|effects|effect|clearTimer|custom|1000|500|innerHeight|innerWidth|onDomReady|DOMContentLoaded|load|onreadystatechange|void|javascript|src|defer|write|BackgroundImageCache|execCommand|disableImageCache|255|pop|get|tag|getElementsByClassName|ES|clearChain|chain|delete|backspace|space|esc|down|up|enter|returnValue|cancelBubble|mouseout|fromElement|mouseover|button|rightClick|click|fromCharCode|keyCode|detail|metaKey|meta|altKey|alt|ctrlKey|control|shiftKey|shift|srcElement|Window|textarea|password|radio|checkbox|checked|input|getPosition|offsetParent|do|getProperty|innerHTML|setHTML|setProperties|attributes|getChildren|getParent|previousSibling|lastChild|getLast|nextSibling|firstChild|getFirst|next|getPrevious|detachEvent|addEvents|attachEvent|getPropertyValue|getComputedStyle|padding|zoom|hasLayout|toggleClass|createTextNode|styleSheet|appendText|replaceChild|cloneNode|clone|removeChild|injectInside|injectBefore|embed|bindAsEventListener|pass|finally|setInterval|setTimeout|concat|toString|transparent|capitalize|RegExp|associate|getBoxObjectFor|taintEnabled|navigator|all|ie7|XMLHttpRequest|ActiveXObject|clearInterval|clearTimeout|floor|pick|textnode|nodeValue|nodeName'.split('|'),0,{}))
diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js
deleted file mode 100644
index d0ef7e8..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js
+++ /dev/null
@@ -1,4078 +0,0 @@
-/*
-Script: Moo.js
- My Object Oriented javascript.
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-
-Credits:
- - Class is slightly based on Base.js <http://dean.edwards.name/weblog/2006/03/base/> (c) 2006 Dean Edwards, License <http://creativecommons.org/licenses/LGPL/2.1/>
- - Some functions are based on those found in prototype.js <http://prototype.conio.net/> (c) 2005 Sam Stephenson sam [at] conio [dot] net, MIT-style license
- - Documentation by Aaron Newton (aaron.newton [at] cnet [dot] com) and Valerio Proietti.
-*/
-
-/*
-Class: Class
- The base class object of the <http://mootools.net> framework.
-
-Arguments:
- properties - the collection of properties that apply to the class. Creates a new class, its initialize method will fire upon class instantiation.
-
-Example:
- (start code)
- var Cat = new Class({
- initialize: function(name){
- this.name = name;
- }
- });
- var myCat = new Cat('Micia');
- alert myCat.name; //alerts 'Micia'
- (end)
-*/
-
-var Class = function(properties){
- var klass = function(){
- if (this.initialize && arguments[0] != 'noinit') return this.initialize.apply(this, arguments);
- else return this;
- };
- for (var property in this) klass[property] = this[property];
- klass.prototype = properties;
- return klass;
-};
-
-/*
-Property: empty
- Returns an empty function
-*/
-
-Class.empty = function(){};
-
-Class.prototype = {
-
- /*
- Property: extend
- Returns the copy of the Class extended with the passed in properties.
-
- Arguments:
- properties - the properties to add to the base class in this new Class.
-
- Example:
- (start code)
- var Animal = new Class({
- initialize: function(age){
- this.age = age;
- }
- });
- var Cat = Animal.extend({
- initialize: function(name, age){
- this.parent(age); //will call the previous initialize;
- this.name = name;
- }
- });
- var myCat = new Cat('Micia', 20);
- alert myCat.name; //alerts 'Micia'
- alert myCat.age; //alerts 20
- (end)
- */
-
- extend: function(properties){
- var pr0t0typ3 = new this('noinit');
-
- var parentize = function(previous, current){
- if (!previous.apply || !current.apply) return false;
- return function(){
- this.parent = previous;
- return current.apply(this, arguments);
- };
- };
-
- for (var property in properties){
- var previous = pr0t0typ3[property];
- var current = properties[property];
- if (previous && previous != current) current = parentize(previous, current) || current;
- pr0t0typ3[property] = current;
- }
- return new Class(pr0t0typ3);
- },
-
- /*
- Property: implement
- Implements the passed in properties to the base Class prototypes, altering the base class, unlike <Class.extend>.
-
- Arguments:
- properties - the properties to add to the base class.
-
- Example:
- (start code)
- var Animal = new Class({
- initialize: function(age){
- this.age = age;
- }
- });
- Animal.implement({
- setName: function(name){
- this.name = name
- }
- });
- var myAnimal = new Animal(20);
- myAnimal.setName('Micia');
- alert(myAnimal.name); //alerts 'Micia'
- (end)
- */
-
- implement: function(properties){
- for (var property in properties) this.prototype[property] = properties[property];
- }
-
-};
-
-/* Section: Object related Functions */
-
-/*
-Function: Object.extend
- Copies all the properties from the second passed object to the first passed Object.
- If you do myWhatever.extend = Object.extend the first parameter will become myWhatever, and your extend function will only need one parameter.
-
-Example:
- (start code)
- var firstOb = {
- 'name': 'John',
- 'lastName': 'Doe'
- };
- var secondOb = {
- 'age': '20',
- 'sex': 'male',
- 'lastName': 'Dorian'
- };
- Object.extend(firstOb, secondOb);
- //firstOb will become:
- {
- 'name': 'John',
- 'lastName': 'Dorian',
- 'age': '20',
- 'sex': 'male'
- };
- (end)
-
-Returns:
- The first object, extended.
-*/
-
-Object.extend = function(){
- var args = arguments;
- args = (args[1]) ? [args[0], args[1]] : [this, args[0]];
- for (var property in args[1]) args[0][property] = args[1][property];
- return args[0];
-};
-
-/*
-Function: Object.Native
- Will add a .extend method to the objects passed as a parameter, equivalent to <Class.implement>
-
-Arguments:
- a number of classes/native javascript objects
-
-*/
-
-Object.Native = function(){
- for (var i = 0; i < arguments.length; i++) arguments[i].extend = Class.prototype.implement;
-};
-
-new Object.Native(Function, Array, String, Number, Class);
-
-/*
-Script: Utility.js
- Contains Utility functions
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-//htmlelement mapping
-
-if (typeof HTMLElement == 'undefined'){
- var HTMLElement = Class.empty;
- HTMLElement.prototype = {};
-}
-
-/*
-Function: $type
- Returns the type of object that matches the element passed in.
-
-Arguments:
- obj - the object to inspect.
-
-Example:
- >var myString = 'hello';
- >$type(myString); //returns "string"
-
-Returns:
- 'element' - if obj is a DOM element node
- 'textnode' - if obj is a DOM text node
- 'whitespace' - if obj is a DOM whitespace node
- 'array' - if obj is an array
- 'object' - if obj is an object
- 'string' - if obj is a string
- 'number' - if obj is a number
- 'boolean' - if obj is a boolean
- 'function' - if obj is a function
- false - (boolean) if the object is not defined or none of the above.
-*/
-
-function $type(obj){
- if (obj === null || obj === undefined) return false;
- var type = typeof obj;
- if (type == 'object'){
- if (obj instanceof HTMLElement) return 'element';
- if (obj instanceof Array) return 'array';
- if (obj.nodeName){
- switch (obj.nodeType){
- case 1: return 'element';
- case 3: return obj.nodeValue.test('\\S') ? 'textnode' : 'whitespace';
- }
- }
- }
- return type;
-};
-
-/*
-Function: $chk
- Returns true if the passed in value/object exists or is 0, otherwise returns false.
- Useful to accept zeroes.
-*/
-
-function $chk(obj){
- return !!(obj || obj === 0);
-};
-
-/*
-Function: $pick
- Returns the first object if defined, otherwise returns the second.
-*/
-
-function $pick(obj, picked){
- return ($type(obj)) ? obj : picked;
-};
-
-/*
-Function: $random
- Returns a random integer number between the two passed in values.
-
-Arguments:
- min - integer, the minimum value (inclusive).
- max - integer, the maximum value (inclusive).
-
-Returns:
- a random integer between min and max.
-*/
-
-function $random(min, max){
- return Math.floor(Math.random() * (max - min + 1) + min);
-};
-
-/*
-Function: $clear
- clears a timeout or an Interval.
-
-Returns:
- null
-
-Arguments:
- timer - the setInterval or setTimeout to clear.
-
-Example:
- >var myTimer = myFunction.delay(5000); //wait 5 seconds and execute my function.
- >myTimer = $clear(myTimer); //nevermind
-
-See also:
- <Function.delay>, <Function.periodical>
-*/
-
-function $clear(timer){
- clearTimeout(timer);
- clearInterval(timer);
- return null;
-};
-
-/* Section: Browser Detection */
-
-/*
-Properties:
- window.ie - will be set to true if the current browser is internet explorer (any).
- window.ie6 - will be set to true if the current browser is internet explorer 6.
- window.ie7 - will be set to true if the current browser is internet explorer 7.
- window.khtml - will be set to true if the current browser is Safari/Konqueror.
- window.gecko - will be set to true if the current browser is Mozilla/Gecko.
-*/
-
-if (window.ActiveXObject) window.ie = window[window.XMLHttpRequest ? 'ie7' : 'ie6'] = true;
-else if (document.childNodes && !document.all && !navigator.taintEnabled) window.khtml = true;
-else if (document.getBoxObjectFor != null) window.gecko = true;
-
-/*
-Script: Array.js
- Contains Array prototypes and the function <$A>;
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Array
- A collection of The Array Object prototype methods.
-*/
-
-//emulated methods
-
-/*
-Property: forEach
- Iterates through an array; This method is only available for browsers without native *forEach* support.
- For more info see <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:forEach>
-*/
-
-Array.prototype.forEach = Array.prototype.forEach || function(fn, bind){
- for (var i = 0; i < this.length; i++) fn.call(bind, this[i], i, this);
-};
-
-/*
-Property: map
- This method is provided only for browsers without native *map* support.
- For more info see <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map>
-*/
-
-Array.prototype.map = Array.prototype.map || function(fn, bind){
- var results = [];
- for (var i = 0; i < this.length; i++) results[i] = fn.call(bind, this[i], i, this);
- return results;
-};
-
-/*
-Property: every
- This method is provided only for browsers without native *every* support.
- For more info see <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every>
-*/
-
-Array.prototype.every = Array.prototype.every || function(fn, bind){
- for (var i = 0; i < this.length; i++){
- if (!fn.call(bind, this[i], i, this)) return false;
- }
- return true;
-};
-
-/*
-Property: some
- This method is provided only for browsers without native *some* support.
- For more info see <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some>
-*/
-
-Array.prototype.some = Array.prototype.some || function(fn, bind){
- for (var i = 0; i < this.length; i++){
- if (fn.call(bind, this[i], i, this)) return true;
- }
- return false;
-};
-
-/*
-Property: indexOf
- This method is provided only for browsers without native *indexOf* support.
- For more info see <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf>
-*/
-
-Array.prototype.indexOf = Array.prototype.indexOf || function(item, from){
- from = from || 0;
- if (from < 0) from = Math.max(0, this.length + from);
- while (from < this.length){
- if(this[from] === item) return from;
- from++;
- }
- return -1;
-};
-
-//custom methods
-
-Array.extend({
-
- /*
- Property: each
- Same as <Array.forEach>.
-
- Arguments:
- fn - the function to execute with each item in the array
- bind - optional, the object that the "this" of the function will refer to.
-
- Example:
- >var Animals = ['Cat', 'Dog', 'Coala'];
- >Animals.forEach(function(animal){
- > document.write(animal)
- >});
- */
-
- each: Array.prototype.forEach,
-
- /*
- Property: copy
- Copy the array and returns it.
-
- Returns:
- an Array
-
- Example:
- >var letters = ["a","b","c"];
- >var copy = ["a","b","c"].copy();
- */
-
- copy: function(){
- var newArray = [];
- for (var i = 0; i < this.length; i++) newArray[i] = this[i];
- return newArray;
- },
-
- /*
- Property: remove
- Removes all occurrences of an item from the array.
-
- Arguments:
- item - the item to remove
-
- Returns:
- the Array with all occurrences of the item removed.
-
- Example:
- >["1","2","3","2"].remove("2") // ["1","3"];
- */
-
- remove: function(item){
- var i = 0;
- while (i < this.length){
- if (this[i] == item) this.splice(i, 1);
- else i++;
- }
- return this;
- },
-
- /*
- Property: test
- Tests an array for the presence of an item.
-
- Arguments:
- item - the item to search for in the array.
- from - optional, the index at which to begin the search, default is 0. If negative, it is taken as the offset from the end of the array.
-
- Returns:
- true - the item was found
- false - it wasn't
-
- Example:
- >["a","b","c"].test("a"); // true
- >["a","b","c"].test("d"); // false
- */
-
- test: function(item, from){
- return this.indexOf(item, from) != -1;
- },
-
- /*
- Property: extend
- Extends an array with another
-
- Arguments:
- newArray - the array to extend ours with
-
- Example:
- >var Animals = ['Cat', 'Dog', 'Coala'];
- >Animals.extend(['Lizard']);
- >//Animals is now: ['Cat', 'Dog', 'Coala', 'Lizard'];
- */
-
- extend: function(newArray){
- for (var i = 0; i < newArray.length; i++) this.push(newArray[i]);
- return this;
- },
-
- /*
- Property: associate
- Creates an object with key-value pairs based on the array of keywords passed in
- and the current content of the array.
-
- Arguments:
- keys - the array of keywords.
-
- Example:
- (start code)
- var Animals = ['Cat', 'Dog', 'Coala', 'Lizard'];
- var Speech = ['Miao', 'Bau', 'Fruuu', 'Mute'];
- var Speeches = Animals.associate(speech);
- //Speeches['Miao'] is now Cat.
- //Speeches['Bau'] is now Dog.
- //...
- (end)
- */
-
- associate: function(keys){
- var obj = {}, length = Math.min(this.length, keys.length);
- for (var i = 0; i < length; i++) obj[keys[i]] = this[i];
- return obj;
- }
-
-});
-
-/* Section: Utility Functions */
-
-/*
-Function: $A()
- Same as <Array.copy>, but as function.
- Useful to apply Array prototypes to iterable objects, as a collection of DOM elements or the arguments object.
-
-Example:
- (start code)
- function myFunction(){
- $A(arguments).each(argument, function(){
- alert(argument);
- });
- };
- //the above will alert all the arguments passed to the function myFunction.
- (end)
-*/
-
-function $A(array){
- return Array.prototype.copy.call(array);
-};
-
-/*
-Function: $each
- use to iterate through iterables that are not regular arrays, such as builtin getElementsByTagName calls, or arguments of a function.
-
-Arguments:
- iterable - an iterable element.
- function - function to apply to the iterable.
- bind - optional, the 'this' of the function will refer to this object.
-*/
-
-function $each(iterable, fn, bind){
- return Array.prototype.forEach.call(iterable, fn, bind);
-};
-
-/*
-Script: String.js
- Contains String prototypes and Number prototypes.
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: String
- A collection of The String Object prototype methods.
-*/
-
-String.extend({
-
- /*
- Property: test
- Tests a string with a regular expression.
-
- Arguments:
- regex - the regular expression you want to match the string with
- params - optional, any parameters you want to pass to the regex ('g' has no effect)
-
- Returns:
- true if a match for the regular expression is found in the string, false if not.
- See <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:RegExp:test>
-
- Example:
- >"I like cookies".test("cookie"); // returns true
- >"I like cookies".test("COOKIE", "i") // ignore case, returns true
- >"I like cookies".test("cake"); // returns false
- */
-
- test: function(regex, params){
- return new RegExp(regex, params).test(this);
- },
-
- /*
- Property: toInt
- parses a string to an integer.
-
- Returns:
- either an int or "NaN" if the string is not a number.
-
- Example:
- >var value = "10px".toInt(); // value is 10
- */
-
- toInt: function(){
- return parseInt(this);
- },
-
- toFloat: function(){
- return parseFloat(this);
- },
-
- /*
- Property: camelCase
- Converts a hiphenated string to a camelcase string.
-
- Example:
- >"I-like-cookies".camelCase(); //"ILikeCookies"
-
- Returns:
- the camel cased string
- */
-
- camelCase: function(){
- return this.replace(/-\D/g, function(match){
- return match.charAt(1).toUpperCase();
- });
- },
-
- /*
- Property: hyphenate
- Converts a camelCased string to a hyphen-ated string.
-
- Example:
- >"ILikeCookies".hyphenate(); //"I-like-cookies"
- */
-
- hyphenate: function(){
- return this.replace(/\w[A-Z]/g, function(match){
- return (match.charAt(0)+'-'+match.charAt(1).toLowerCase());
- });
- },
-
- /*
- Property: capitalize
- Converts the first letter in each word of a string to Uppercase.
-
- Example:
- >"i like cookies".capitalize(); //"I Like Cookies"
-
- Returns:
- the capitalized string
- */
-
- capitalize: function(){
- return this.toLowerCase().replace(/\b[a-z]/g, function(match){
- return match.toUpperCase();
- });
- },
-
- /*
- Property: trim
- Trims the leading and trailing spaces off a string.
-
- Example:
- >" i like cookies ".trim() //"i like cookies"
-
- Returns:
- the trimmed string
- */
-
- trim: function(){
- return this.replace(/^\s+|\s+$/g, '');
- },
-
- /*
- Property: clean
- trims (<String.trim>) a string AND removes all the double spaces in a string.
-
- Returns:
- the cleaned string
-
- Example:
- >" i like cookies \n\n".clean() //"i like cookies"
- */
-
- clean: function(){
- return this.replace(/\s{2,}/g, ' ').trim();
- },
-
- /*
- Property: rgbToHex
- Converts an RGB value to hexidecimal. The string must be in the format of "rgb(255, 255, 255)" or "rgba(255, 255, 255, 1)";
-
- Arguments:
- array - boolean value, defaults to false. Use true if you want the array ['FF', '33', '00'] as output instead of #FF3300
-
- Returns:
- hex string or array. returns transparent if the fourth value of rgba in input string is 0,
-
- Example:
- >"rgb(17,34,51)".rgbToHex(); //"#112233"
- >"rgba(17,34,51,0)".rgbToHex(); //"transparent"
- >"rgb(17,34,51)".rgbToHex(true); //[11,22,33]
- */
-
- rgbToHex: function(array){
- var rgb = this.match(/\d{1,3}/g);
- return (rgb) ? rgb.rgbToHex(array) : false;
- },
-
- /*
- Property: hexToRgb
- Converts a hexidecimal color value to RGB. Input string must be the hex color value (with or without the hash). Also accepts triplets ('333');
-
- Arguments:
- array - boolean value, defaults to false. Use true if you want the array ['255', '255', '255'] as output instead of "rgb(255,255,255)";
-
- Returns:
- rgb string or array.
-
- Example:
- >"#112233".hexToRgb(); //"rgb(17,34,51)"
- >"#112233".hexToRgb(true); //[17,34,51]
- */
-
- hexToRgb: function(array){
- var hex = this.match('^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$');
- return (hex) ? hex.hexToRgb(array) : false;
- }
-
-});
-
-Array.extend({
-
- rgbToHex: function(array){
- if (this.length < 3) return false;
- if (this[3] && this[3] == 0) return 'transparent';
- var hex = [];
- for (var i = 0; i < 3; i++){
- var bit = (this[i]-0).toString(16);
- hex.push(bit.length == 1 ? '0'+bit : bit);
- }
- return array ? hex : '#'+hex.join('');
- },
-
- hexToRgb: function(array){
- if (this.length != 4) return false;
- var rgb = [];
- for (var i = 1; i < 4; i++){
- if (this[i].length == 1) this[i] += this[i];
- rgb.push(parseInt(this[i], 16));
- }
- return array ? rgb : 'rgb('+rgb.join(',')+')';
- }
-
-});
-
-/*
-Class: Number
- contains the internal method toInt.
-*/
-
-Number.extend({
-
- /*
- Property: toInt
- Returns this number; useful because toInt must work on both Strings and Numbers.
- */
-
- toInt: function(){
- return parseInt(this);
- },
-
- toFloat: function(){
- return parseFloat(this);
- }
-
-});
-
-/*
-Script: Function.js
- Contains Function prototypes and utility functions .
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-
-Credits:
- - Some functions are inspired by those found in prototype.js <http://prototype.conio.net/> (c) 2005 Sam Stephenson sam [at] conio [dot] net, MIT-style license
-*/
-
-/*
-Class: Function
- A collection of The Function Object prototype methods.
-*/
-
-Function.extend({
-
- create: function(options){
- var fn = this;
- options = Object.extend({
- 'bind': fn,
- 'event': false,
- 'arguments': null,
- 'delay': false,
- 'periodical': false,
- 'attempt': false
- }, options || {});
- if (options.arguments != null && typeof options.arguments != 'undefined' && !(options.arguments instanceof Array))
- options.arguments = [options.arguments];
- return function(event){
- var args = options.arguments || arguments;
- if (options.event){
- event = (options.event === true) ? event || window.event : new options.event(event);
- args = [event].concat(args);
- }
- var returns = function(){
- return fn.apply(options.bind, args);
- };
- if (options.delay) return setTimeout(returns, options.delay);
- if (options.periodical) return setInterval(returns, options.periodical);
- if (options.attempt){
- try {
- var result = returns();
- } catch(err){
- result = err;
- } finally {
- return result;
- }
- } else return returns();
- };
- },
-
- /*
- Property: pass
- Shortcut to create closures with arguments and bind.
-
- Returns:
- a function.
-
- Arguments:
- args - the arguments passed. must be an array if arguments > 1
- bind - optional, the object that the "this" of the function will refer to.
-
- Example:
- >myFunction.pass([arg1, arg2], myElement);
- */
-
- pass: function(args, bind){
- return this.create({'arguments': args, 'bind': bind});
- },
-
- /*
- Property: attempt
- Tries to execute the function, returns either the function results or the error.
-
- Arguments:
- args - the arguments passed. must be an array if arguments > 1
- bind - optional, the object that the "this" of the function will refer to.
-
- Example:
- >myFunction.attempt([arg1, arg2], myElement);
- */
-
- attempt: function(args, bind){
- return this.create({'arguments': args, 'bind': bind, 'attempt': true})();
- },
-
- /*
- Property: bind
- method to easily create closures with "this" altered.
-
- Arguments:
- bind - optional, the object that the "this" of the function will refer to.
- args - optional, the arguments passed. must be an array if arguments > 1
-
- Returns:
- a function.
-
- Example:
- >function myFunction(){
- > this.setStyle('color', 'red');
- > // note that 'this' here refers to myFunction, not an element
- > // we'll need to bind this function to the element we want to alter
- >};
- >var myBoundFunction = myFunction.bind(myElement);
- >myBoundFunction(); // this will make the element myElement red.
- */
-
- bind: function(bind, args){
- return this.create({'bind': bind, 'arguments': args});
- },
-
- /*
- Property: bindAsEventListener
- cross browser method to pass event firer
-
- Arguments:
- bind - optional, the object that the "this" of the function will refer to.
- args - optional, the arguments passed. must be an array if arguments > 1
-
- Returns:
- a function with the parameter bind as its "this" and as a pre-passed argument event or window.event, depending on the browser.
-
- Example:
- >function myFunction(event){
- > alert(event.clientx) //returns the coordinates of the mouse..
- >};
- >myElement.onclick = myFunction.bindAsEventListener(myElement);
- */
-
- bindAsEventListener: function(bind, args){
- return this.create({'bind': bind, 'event': true, 'arguments': args});
- },
-
- /*
- Property: delay
- Delays the execution of a function by a specified duration.
-
- Arguments:
- ms - the duration to wait in milliseconds
- bind - optional, the object that the "this" of the function will refer to.
- args - optional, the arguments passed. must be an array if arguments > 1
-
- Example:
- >myFunction.delay(50, myElement) //wait 50 milliseconds, then call myFunction and bind myElement to it
- >(function(){alert('one second later...')}).delay(1000); //wait a second and alert
- */
-
- delay: function(ms, bind, args){
- return this.create({'delay': ms, 'bind': bind, 'arguments': args})();
- },
-
- /*
- Property: periodical
- Executes a function in the specified intervals of time
-
- Arguments:
- ms - the duration of the intervals between executions.
- bind - optional, the object that the "this" of the function will refer to.
- args - optional, the arguments passed. must be an array if arguments > 1
- */
-
- periodical: function(ms, bind, args){
- return this.create({'periodical': ms, 'bind': bind, 'arguments': args})();
- }
-
-});
-
-/*
-Script: Element.js
- Contains useful Element prototypes, to be used with the dollar function <$>.
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-
-Credits:
- - Some functions are inspired by those found in prototype.js <http://prototype.conio.net/> (c) 2005 Sam Stephenson sam [at] conio [dot] net, MIT-style license
-*/
-
-/*
-Class: Element
- Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>.
-*/
-
-var Element = new Class({
-
- /*
- Property: initialize
- Creates a new element of the type passed in.
-
- Arguments:
- el - the tag name for the element you wish to create.
-
- Example:
- >var div = new Element('div');
- */
-
- initialize: function(el){
- if ($type(el) == 'string') el = document.createElement(el);
- return $(el);
- }
-
-});
-
-/*
-Function: $()
- returns the element passed in with all the Element prototypes applied.
-
-Arguments:
- el - a reference to an actual element or a string representing the id of an element
-
-Example:
- >$('myElement') // gets a DOM element by id with all the Element prototypes applied.
- >var div = document.getElementById('myElement');
- >$(div) //returns an Element also with all the mootools extentions applied.
-
- You'll use this when you aren't sure if a variable is an actual element or an id, as
- well as just shorthand for document.getElementById().
-
-Returns:
- a DOM element or false (if no id was found).
-
-Note:
- you need to call $ on an element only once to get all the prototypes.
- But its no harm to call it multiple times, as it will detect if it has been already extended.
-*/
-
-function $(el){
- if (!el) return false;
- if (el._element_extended_ || [window, document].test(el)) return el;
- if ($type(el) == 'string') el = document.getElementById(el);
- if ($type(el) != 'element') return false;
- if (['object', 'embed'].test(el.tagName.toLowerCase()) || el.extend) return el;
- el._element_extended_ = true;
- Garbage.collect(el);
- el.extend = Object.extend;
- if (!(el instanceof HTMLElement)) el.extend(Element.prototype);
- return el;
-};
-
-//elements class
-
-var Elements = new Class({});
-
-new Object.Native(Elements);
-
-document.getElementsBySelector = document.getElementsByTagName;
-
-/*
-Function: $$()
- Selects, and extends DOM elements.
-
-Arguments:
- HTMLCollection(document.getElementsByTagName, element.childNodes), an array of elements, a string.
-
-Note:
- if you loaded <Dom.js>, $$ will also accept CSS Selectors.
-
-Example:
- >$$('a') //an array of all anchor tags on the page
- >$$('a', 'b') //an array of all anchor and bold tags on the page
- >$$('#myElement') //array containing only the element with id = myElement. (only with <Dom.js>)
- >$$('#myElement a.myClass') //an array of all anchor tags with the class "myClass" within the DOM element with id "myElement" (only with <Dom.js>)
-
-Returns:
- array - array of all the dom elements matched
-*/
-
-function $$(){
- if (!arguments) return false;
- if (arguments.length == 1){
- if (!arguments[0]) return false;
- if (arguments[0]._elements_extended_) return arguments[0];
- }
- var elements = [];
- $each(arguments, function(selector){
- switch ($type(selector)){
- case 'element': elements.push($(selector)); break;
- case 'string': selector = document.getElementsBySelector(selector);
- default:
- if (selector.length){
- $each(selector, function(el){
- if ($(el)) elements.push(el);
- });
- }
- }
- });
- elements._elements_extended_ = true;
- return Object.extend(elements, new Elements);
-};
-
-Elements.Multi = function(property){
- return function(){
- var args = arguments;
- var items = [];
- var elements = true;
- $each(this, function(el){
- var returns = el[property].apply(el, args);
- if ($type(returns) != 'element') elements = false;
- items.push(returns);
- });
- if (elements) items = $$(items);
- return items;
- };
-};
-
-Element.extend = function(properties){
- for (var property in properties){
- HTMLElement.prototype[property] = properties[property];
- Element.prototype[property] = properties[property];
- Elements.prototype[property] = Elements.Multi(property);
- }
-};
-
-Element.extend({
-
- inject: function(el, where){
- el = $(el) || new Element(el);
- switch (where){
- case "before": $(el.parentNode).insertBefore(this, el); break;
- case "after":
- if (!el.getNext()) $(el.parentNode).appendChild(this);
- else $(el.parentNode).insertBefore(this, el.getNext());
- break;
- case "inside": el.appendChild(this);
- }
- return this;
- },
-
- /*
- Property: injectBefore
- Inserts the Element before the passed element.
-
- Parameteres:
- el - a string representing the element to be injected in (myElementId, or div), or an element reference.
- If you pass div or another tag, the element will be created.
-
- Example:
- >html:
- ><div id="myElement"></div>
- ><div id="mySecondElement"></div>
- >js:
- >$('mySecondElement').injectBefore('myElement');
- >resulting html:
- ><div id="mySecondElement"></div>
- ><div id="myElement"></div>
-
- */
-
- injectBefore: function(el){
- return this.inject(el, 'before');
- },
-
- /*
- Property: injectAfter
- Same as <Element.injectBefore>, but inserts the element after.
- */
-
- injectAfter: function(el){
- return this.inject(el, 'after');
- },
-
- /*
- Property: injectInside
- Same as <Element.injectBefore>, but inserts the element inside.
- */
-
- injectInside: function(el){
- return this.inject(el, 'inside');
- },
-
- /*
- Property: adopt
- Inserts the passed element inside the Element. Works as <Element.injectInside> but in reverse.
-
- Parameteres:
- el - a string representing the element to be injected in (myElementId, or div), or an element reference.
- If you pass div or another tag, the element will be created.
- */
-
- adopt: function(el){
- this.appendChild($(el) || new Element(el));
- return this;
- },
-
- /*
- Property: remove
- Removes the Element from the DOM.
-
- Example:
- >$('myElement').remove() //bye bye
- */
-
- remove: function(){
- this.parentNode.removeChild(this);
- return this;
- },
-
- /*
- Property: clone
- Clones the Element and returns the cloned one.
-
- Returns:
- the cloned element
-
- Example:
- >var clone = $('myElement').clone().injectAfter('myElement');
- >//clones the Element and append the clone after the Element.
- */
-
- clone: function(contents){
- var el = this.cloneNode(contents !== false);
- return $(el);
- },
-
- /*
- Property: replaceWith
- Replaces the Element with an element passed.
-
- Parameteres:
- el - a string representing the element to be injected in (myElementId, or div), or an element reference.
- If you pass div or another tag, the element will be created.
-
- Returns:
- the passed in element
-
- Example:
- >$('myOldElement').replaceWith($('myNewElement')); //$('myOldElement') is gone, and $('myNewElement') is in its place.
- */
-
- replaceWith: function(el){
- el = $(el) || new Element(el);
- this.parentNode.replaceChild(el, this);
- return el;
- },
-
- /*
- Property: appendText
- Appends text node to a DOM element.
-
- Arguments:
- text - the text to append.
-
- Example:
- ><div id="myElement">hey</div>
- >$('myElement').appendText(' howdy'); //myElement innerHTML is now "hey howdy"
- */
-
- appendText: function(text){
- if (window.ie){
- switch(this.getTag()){
- case 'style': this.styleSheet.cssText = text; return this;
- case 'script': this.setProperty('text', text); return this;
- }
- }
- this.appendChild(document.createTextNode(text));
- return this;
- },
-
- /*
- Property: hasClass
- Tests the Element to see if it has the passed in className.
-
- Returns:
- true - the Element has the class
- false - it doesn't
-
- Arguments:
- className - the class name to test.
-
- Example:
- ><div id="myElement" class="testClass"></div>
- >$('myElement').hasClass('testClass'); //returns true
- */
-
- hasClass: function(className){
- return this.className.test('(?:^|\\s+)' + className + '(?:\\s+|$)');
- },
-
- /*
- Property: addClass
- Adds the passed in class to the Element, if the element doesnt already have it.
-
- Arguments:
- className - the class name to add
-
- Example:
- ><div id="myElement" class="testClass"></div>
- >$('myElement').addClass('newClass'); //<div id="myElement" class="testClass newClass"></div>
- */
-
- addClass: function(className){
- if (!this.hasClass(className)) this.className = (this.className+' '+className).clean();
- return this;
- },
-
- /*
- Property: removeClass
- works like <Element.addClass>, but removes the class from the element.
- */
-
- removeClass: function(className){
- if (this.hasClass(className)) this.className = this.className.replace(className, '').clean();
- return this;
- },
-
- /*
- Property: toggleClass
- Adds or removes the passed in class name to the element, depending on if it's present or not.
-
- Arguments:
- className - the class to add or remove
-
- Example:
- ><div id="myElement" class="myClass"></div>
- >$('myElement').toggleClass('myClass');
- ><div id="myElement" class=""></div>
- >$('myElement').toggleClass('myClass');
- ><div id="myElement" class="myClass"></div>
- */
-
- toggleClass: function(className){
- return this.hasClass(className) ? this.removeClass(className) : this.addClass(className);
- },
-
- /*
- Property: setStyle
- Sets a css property to the Element.
-
- Arguments:
- property - the property to set
- value - the value to which to set it
-
- Example:
- >$('myElement').setStyle('width', '300px'); //the width is now 300px
- */
-
- setStyle: function(property, value){
- if (property == 'opacity') this.setOpacity(parseFloat(value));
- else this.style[property.camelCase()] = (value.push) ? value.rgbToHex() : value;
- return this;
- },
-
- /*
- Property: setStyles
- Applies a collection of styles to the Element.
-
- Arguments:
- source - an object or string containing all the styles to apply
-
- Examples:
- >$('myElement').setStyles({
- > border: '1px solid #000',
- > width: '300px',
- > height: '400px'
- >});
-
- OR
-
- >$('myElement').setStyle('border: 1px solid #000; width: 300px; height: 400px;');
- */
-
- setStyles: function(source){
- switch ($type(source)){
- case 'object':
- for (var property in source) this.setStyle(property, source[property]);
- break;
- case 'string':
- if (window.ie) this.cssText = source;
- else this.setAttribute('style', source);
- }
- return this;
- },
-
- /*
- Property: setOpacity
- Sets the opacity of the Element, and sets also visibility == "hidden" if opacity == 0, and visibility = "visible" if opacity == 1.
-
- Arguments:
- opacity - Accepts numbers from 0 to 1.
-
- Example:
- >$('myElement').setOpacity(0.5) //make it 50% transparent
- */
-
- setOpacity: function(opacity){
- if (opacity == 0){
- if(this.style.visibility != "hidden") this.style.visibility = "hidden";
- } else {
- if(this.style.visibility != "visible") this.style.visibility = "visible";
- }
- if (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1;
- if (window.ie) this.style.filter = "alpha(opacity=" + opacity*100 + ")";
- this.style.opacity = this.opacity = opacity;
- return this;
- },
-
- /*
- Property: getStyle
- Returns the style of the Element given the property passed in.
-
- Arguments:
- property - the css style property you want to retrieve
-
- Example:
- >$('myElement').getStyle('width'); //returns "400px"
- >//but you can also use
- >$('myElement').getStyle('width').toInt(); //returns "400"
-
- Returns:
- the style as a string
- */
-
- getStyle: function(property){
- property = property.camelCase();
- var style = this.style[property] || false;
- if (!$chk(style)){
- if (property == 'opacity') return $chk(this.opacity) ? this.opacity : 1;
- if (['margin', 'padding'].test(property)){
- return [this.getStyle(property+'-top') || 0, this.getStyle(property+'-right') || 0,
- this.getStyle(property+'-bottom') || 0, this.getStyle(property+'-left') || 0].join(' ');
- }
- if (document.defaultView) style = document.defaultView.getComputedStyle(this, null).getPropertyValue(property.hyphenate());
- else if (this.currentStyle) style = this.currentStyle[property];
- }
- return (style && property.test('color', 'i') && style.test('rgb')) ? style.rgbToHex() : style;
- },
-
- /*
- Property: addEvent
- Attaches an event listener to a DOM element.
-
- Arguments:
- type - the event to monitor ('click', 'load', etc) without the prefix 'on'.
- fn - the function to execute
-
- Example:
- >$('myElement').addEvent('click', function(){alert('clicked!')});
- */
-
- addEvent: function(type, fn){
- this.events = this.events || {};
- this.events[type] = this.events[type] || {'keys': [], 'values': []};
- if (!this.events[type].keys.test(fn)){
- this.events[type].keys.push(fn);
- if (this.addEventListener){
- this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false);
- } else {
- fn = fn.bind(this);
- this.attachEvent('on'+type, fn);
- this.events[type].values.push(fn);
- }
- }
- return this;
- },
-
- addEvents: function(source){
- if (source){
- for (var type in source) this.addEvent(type, source[type]);
- }
- return this;
- },
-
- /*
- Property: removeEvent
- Works as Element.addEvent, but instead removes the previously added event listener.
- */
-
- removeEvent: function(type, fn){
- if (this.events && this.events[type]){
- var pos = this.events[type].keys.indexOf(fn);
- if (pos == -1) return this;
- var key = this.events[type].keys.splice(pos,1)[0];
- if (this.removeEventListener){
- this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false);
- } else {
- this.detachEvent('on'+type, this.events[type].values.splice(pos,1)[0]);
- }
- }
- return this;
- },
-
- /*
- Property: removeEvents
- removes all events of a certain type from an element. if no argument is passed in, removes all events.
- */
-
- removeEvents: function(type){
- if (this.events){
- if (type){
- if (this.events[type]){
- this.events[type].keys.each(function(fn){
- this.removeEvent(type, fn);
- }, this);
- this.events[type] = null;
- }
- } else {
- for (var evType in this.events) this.removeEvents(evType);
- this.events = null;
- }
- }
- return this;
- },
-
- /*
- Property: fireEvent
- executes all events of the specified type present in the element.
- */
-
- fireEvent: function(type, args){
- if (this.events && this.events[type]){
- args = args || [];
- if ($type(args) != 'array') args = [args];
- this.events[type].keys.each(function(fn){
- fn.apply(this, args);
- }, this);
- }
- },
-
- getBrother: function(what){
- var el = this[what+'Sibling'];
- while ($type(el) == 'whitespace') el = el[what+'Sibling'];
- return $(el);
- },
-
- /*
- Property: getPrevious
- Returns the previousSibling of the Element, excluding text nodes.
-
- Example:
- >$('myElement').getPrevious(); //get the previous DOM element from myElement
-
- Returns:
- the sibling element or undefined if none found.
- */
-
- getPrevious: function(){
- return this.getBrother('previous');
- },
-
- /*
- Property: getNext
- Works as Element.getPrevious, but tries to find the nextSibling.
- */
-
- getNext: function(){
- return this.getBrother('next');
- },
-
- /*
- Property: getFirst
- Works as <Element.getPrevious>, but tries to find the firstChild.
- */
-
- getFirst: function(){
- var el = this.firstChild;
- while ($type(el) == 'whitespace') el = el.nextSibling;
- return $(el);
- },
-
- /*
- Property: getLast
- Works as <Element.getPrevious>, but tries to find the lastChild.
- */
-
- getLast: function(){
- var el = this.lastChild;
- while ($type(el) == 'whitespace') el = el.previousSibling;
- return $(el);
- },
-
- /*
- Property: getParent
- returns the $(element.parentNode)
- */
-
- getParent: function(){
- return $(this.parentNode);
- },
-
- /*
- Property: getChildren
- returns all the $(element.childNodes), excluding text nodes. Returns as <Elements>.
- */
-
- getChildren: function(){
- return $$(this.childNodes);
- },
-
- /*
- Property: setProperty
- Sets an attribute for the Element.
-
- Arguments:
- property - the property to assign the value passed in
- value - the value to assign to the property passed in
-
- Example:
- >$('myImage').setProperty('src', 'whatever.gif'); //myImage now points to whatever.gif for its source
- */
-
- setProperty: function(property, value){
- switch (property){
- case 'class': this.className = value; break;
- case 'style': this.setStyles(value); break;
- case 'name': if (window.ie6){
- var el = $(document.createElement('<'+this.getTag()+' name="'+value+'" />'));
- $each(this.attributes, function(attribute){
- if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value);
- });
- if (this.parentNode) this.replaceWith(el);
- return el;
- }
- default: this.setAttribute(property, value);
- }
- return this;
- },
-
- /*
- Property: setProperties
- Sets numerous attributes for the Element.
-
- Arguments:
- source - an object with key/value pairs.
-
- Example:
- >$('myElement').setProperties({
- > src: 'whatever.gif',
- > alt: 'whatever dude'
- >});
- ><img src="whatever.gif" alt="whatever dude">
- */
-
- setProperties: function(source){
- for (var property in source) this.setProperty(property, source[property]);
- return this;
- },
-
- /*
- Property: setHTML
- Sets the innerHTML of the Element.
-
- Arguments:
- html - the new innerHTML for the element.
-
- Example:
- >$('myElement').setHTML(newHTML) //the innerHTML of myElement is now = newHTML
- */
-
- setHTML: function(html){
- this.innerHTML = html;
- return this;
- },
-
- /*
- Property: getProperty
- Gets the an attribute of the Element.
-
- Arguments:
- property - the attribute to retrieve
-
- Example:
- >$('myImage').getProperty('src') // returns whatever.gif
-
- Returns:
- the value, or an empty string
- */
-
- getProperty: function(property){
- return (property == 'class') ? this.className : this.getAttribute(property);
- },
-
- /*
- Property: getTag
- Returns the tagName of the element in lower case.
-
- Example:
- >$('myImage').getTag() // returns 'img'
-
- Returns:
- The tag name in lower case
- */
-
- getTag: function(){
- return this.tagName.toLowerCase();
- },
-
- getOffsets: function(){
- var el = this, offsetLeft = 0, offsetTop = 0;
- do {
- offsetLeft += el.offsetLeft || 0;
- offsetTop += el.offsetTop || 0;
- el = el.offsetParent;
- } while (el);
- return {'x': offsetLeft, 'y': offsetTop};
- },
-
- /*
- Property: scrollTo
- scrolls the element to the specified coordinated (if the element has an overflow)
-
- Arguments:
- x - the x coordinate
- y - the y coordinate
-
- Example:
- >$('myElement').scrollTo(0, 100)
- */
-
- scrollTo: function(x, y){
- this.scrollLeft = x;
- this.scrollTop = y;
- },
-
- /*
- Property: getSize
- return an Object representing the size/scroll values of the element.
-
- Example:
- (start code)
- $('myElement').getSize();
- (end)
-
- Returns:
- (start code)
- {
- 'scroll': {'x': 100, 'y': 100},
- 'size': {'x': 200, 'y': 400},
- 'scrollSize': {'x': 300, 'y': 500}
- }
- (end)
- */
-
- getSize: function(){
- return {
- 'scroll': {'x': this.scrollLeft, 'y': this.scrollTop},
- 'size': {'x': this.offsetWidth, 'y': this.offsetHeight},
- 'scrollSize': {'x': this.scrollWidth, 'y': this.scrollHeight}
- };
- },
-
- /*
- Property: getTop
- Returns the distance from the top of the window to the Element.
- */
-
- getTop: function(){
- return this.getOffsets().y;
- },
-
- /*
- Property: getLeft
- Returns the distance from the left of the window to the Element.
- */
-
- getLeft: function(){
- return this.getOffsets().x;
- },
-
- /*
- Property: getPosition
- Returns an object with width, height, left, right, top, and bottom, representing the values of the Element
-
- Example:
- (start code)
- var myValues = $('myElement').getPosition();
- (end)
-
- Returns:
- (start code)
- {
- width: 200,
- height: 300,
- left: 100,
- top: 50,
- right: 300,
- bottom: 350
- }
- (end)
- */
-
- getPosition: function(){
- var offs = this.getOffsets();
- var obj = {
- 'width': this.offsetWidth,
- 'height': this.offsetHeight,
- 'left': offs.x,
- 'top': offs.y
- };
- obj.right = obj.left + obj.width;
- obj.bottom = obj.top + obj.height;
- return obj;
- },
-
- /*
- Property: getValue
- Returns the value of the Element, if its tag is textarea, select or input. no multiple select support.
- */
-
- getValue: function(){
- switch (this.getTag()){
- case 'select': if (this.selectedIndex != -1) return this.options[this.selectedIndex].value; break;
- case 'input': if (!(this.checked && ['checkbox', 'radio'].test(this.type)) && !['hidden', 'text', 'password'].test(this.type)) break;
- case 'textarea': return this.value;
- }
- return false;
- }
-
-});
-
-var Window = window;
-
-window.addEvent = document.addEvent = Element.prototype.addEvent;
-window.removeEvent = document.removeEvent = Element.prototype.removeEvent;
-
-var Garbage = {
-
- elements: [],
-
- collect: function(element){
- Garbage.elements.push(element);
- },
-
- trash: function(){
- window.removeEvent('unload', Garbage.trash);
- Garbage.elements.each(function(el){
- el.removeEvents();
- for (var p in Element.prototype) HTMLElement[p] = window[p] = document[p] = el[p] = null;
- el.extend = null;
- });
- }
-
-};
-
-window.addEvent('unload', Garbage.trash);
-
-/*
-Script: Event.js
- Event class
-
-Author:
- Valerio Proietti, <http://mad4milk.net>, Michael Jackson, <http://ajaxon.com/michael>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Event
- Cross browser methods to manage events.
-
-Arguments:
- event - the event
-
-Properties:
- shift - true if the user pressed the shift
- control - true if the user pressed the control
- alt - true if the user pressed the alt
- meta - true if the user pressed the meta key
- code - the keycode of the key pressed
- page.x - the x position of the mouse, relative to the full window
- page.y - the y position of the mouse, relative to the full window
- client.x - the x position of the mouse, relative to the viewport
- client.y - the y position of the mouse, relative to the viewport
- key - the key pressed as a lowercase string. key also returns 'enter', 'up', 'down', 'left', 'right', 'space', 'backspace', 'delete', 'esc'. Handy for these special keys.
- target - the event target
- relatedTarget - the event related target
-
-Example:
- (start code)
- $('myLink').onkeydown = function(event){
- var event = new Event(event);
- //event is now the Event class.
- alert(event.key); //returns the lowercase letter pressed
- alert(event.shift); //returns true if the key pressed is shift
- if (event.key == 's' && event.control) alert('document saved');
- };
- (end)
-*/
-
-var Event = new Class({
-
- initialize: function(event){
- this.event = event || window.event;
- this.type = this.event.type;
- this.target = this.event.target || this.event.srcElement;
- if (this.target.nodeType == 3) this.target = this.target.parentNode; // Safari
- this.shift = this.event.shiftKey;
- this.control = this.event.ctrlKey;
- this.alt = this.event.altKey;
- this.meta = this.event.metaKey;
- if (['DOMMouseScroll', 'mousewheel'].test(this.type)){
- this.wheel = this.event.wheelDelta ? (this.event.wheelDelta / (window.opera ? -120 : 120)) : -(this.event.detail || 0) / 3;
- } else if (this.type.test('key')){
- this.code = this.event.which || this.event.keyCode;
- for (var name in Event.keys){
- if (Event.keys[name] == this.code) var special = name;
- }
- this.key = special || String.fromCharCode(this.code).toLowerCase();
-
- } else if (this.type.test('mouse') || this.type == 'click'){
- this.page = {
- 'x': this.event.pageX || this.event.clientX + document.documentElement.scrollLeft,
- 'y': this.event.pageY || this.event.clientY + document.documentElement.scrollTop
- };
- this.client = {
- 'x': this.event.pageX ? this.event.pageX - window.pageXOffset : this.event.clientX,
- 'y': this.event.pageY ? this.event.pageY - window.pageYOffset : this.event.clientY
- };
- this.rightClick = (this.event.which == 3) || (this.event.button == 2);
- switch (this.type){
- case 'mouseover': this.relatedTarget = this.event.relatedTarget || this.event.fromElement; break;
- case 'mouseout': this.relatedTarget = this.event.relatedTarget || this.event.toElement;
- }
- }
- },
-
- /*
- Property: stop
- cross browser method to stop an event
- */
-
- stop: function() {
- this.stopPropagation();
- this.preventDefault();
- return this;
- },
-
- /*
- Property: stopPropagation
- cross browser method to stop the propagation of an event
- */
-
- stopPropagation: function(){
- if (this.event.stopPropagation) this.event.stopPropagation();
- else this.event.cancelBubble = true;
- return this;
- },
-
- /*
- Property: preventDefault
- cross browser method to prevent the default action of the event
- */
-
- preventDefault: function(){
- if (this.event.preventDefault) this.event.preventDefault();
- else this.event.returnValue = false;
- return this;
- }
-
-});
-
-Event.keys = {
- 'enter': 13,
- 'up': 38,
- 'down': 40,
- 'left': 37,
- 'right': 39,
- 'esc': 27,
- 'space': 32,
- 'backspace': 8,
- 'delete': 46
-};
-
-Function.extend({
-
- /*
- Property: bindWithEvent
- automatically passes mootools Event Class.
-
- Arguments:
- bind - optional, the object that the "this" of the function will refer to.
-
- Returns:
- a function with the parameter bind as its "this" and as a pre-passed argument event or window.event, depending on the browser.
-
- Example:
- >function myFunction(event){
- > alert(event.clientx) //returns the coordinates of the mouse..
- >};
- >myElement.onclick = myFunction.bindWithEvent(myElement);
- */
-
- bindWithEvent: function(bind, args){
- return this.create({'bind': bind, 'arguments': args, 'event': Event});
- }
-
-});
-
-
-/*
-Script: Common.js
- Contains common implementations for custom classes. In Mootools is implemented in <Ajax> and <Fx>.
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Chain
- An "Utility" Class. Its methods can be implemented with <Class.implement> into any <Class>.
- Currently implemented in <Fx> and <Ajax>. In <Fx> for example, is used to execute a list of function, one after another, once the effect is completed.
- The functions will not be fired all togheter, but one every completion, to create custom complex animations.
-
-Example:
- (start code)
- var myFx = new Fx.Style('element', 'opacity');
-
- myFx.start(1,0).chain(function(){
- myFx.start(0,1);
- }).chain(function(){
- myFx.start(1,0);
- }).chain(function(){
- myFx.start(0,1);
- });
- //the element will appear and disappear three times
- (end)
-*/
-
-var Chain = new Class({
-
- /*
- Property: chain
- adds a function to the Chain instance stack.
-
- Arguments:
- fn - the function to append.
- */
-
- chain: function(fn){
- this.chains = this.chains || [];
- this.chains.push(fn);
- return this;
- },
-
- /*
- Property: callChain
- Executes the first function of the Chain instance stack, then removes it. The first function will then become the second.
- */
-
- callChain: function(){
- if (this.chains && this.chains.length) this.chains.splice(0, 1)[0].delay(10, this);
- },
-
- /*
- Property: clearChain
- Clears the stack of a Chain instance.
- */
-
- clearChain: function(){
- this.chains = [];
- }
-
-});
-
-/*
-Class: Events
- An "Utility" Class. Its methods can be implemented with <Class.implement> into any <Class>.
- In <Fx> Class, for example, is used to give the possibility add any number of functions to the Effects events, like onComplete, onStart, onCancel
-
-Example:
- (start code)
- var myFx = new Fx.Style('element', 'opacity').addEvent('onComplete', function(){
- alert('the effect is completed');
- }).addEvent('onComplete', function(){
- alert('I told you the effect is completed');
- });
-
- myFx.start(0,1);
- //upon completion it will display the 2 alerts, in order.
- (end)
-*/
-
-var Events = new Class({
-
- /*
- Property: addEvent
- adds an event to the stack of events of the Class instance.
- */
-
- addEvent: function(type, fn){
- if (fn != Class.empty){
- this.events = this.events || {};
- this.events[type] = this.events[type] || [];
- if (!this.events[type].test(fn)) this.events[type].push(fn);
- }
- return this;
- },
-
- /*
- Property: fireEvent
- fires all events of the specified type in the Class instance.
- */
-
- fireEvent: function(type, args, delay){
- if (this.events && this.events[type]){
- this.events[type].each(function(fn){
- fn.create({'bind': this, 'delay': delay, 'arguments': args})();
- }, this);
- }
- return this;
- },
-
- /*
- Property: removeEvent
- removes an event from the stack of events of the Class instance.
- */
-
- removeEvent: function(type, fn){
- if (this.events && this.events[type]) this.events[type].remove(fn);
- return this;
- }
-
-});
-
-/*
-Class: Options
- An "Utility" Class. Its methods can be implemented with <Class.implement> into any <Class>.
- Used to automate the options settings, also adding Class <Events> when the option begins with on.
-*/
-
-var Options = new Class({
-
- /*
- Property: setOptions
- sets this.options
-
- Arguments:
- defaults - the default set of options
- options - the user entered options. can be empty too.
-
- Note:
- if your Class has <Events> implemented, every option beginning with on, followed by a capital letter (onComplete) becomes an Class instance event.
- */
-
- setOptions: function(defaults, options){
- this.options = Object.extend(defaults, options);
- if (this.addEvent){
- for (var option in this.options){
- if (($type(this.options[option]) == 'function') && option.test('^on[A-Z]')) this.addEvent(option, this.options[option]);
- }
- }
- return this;
- }
-
-});
-
-/*
-Script: Dom.js
- Css Query related function and <Element> extensions
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/* Section: Utility Functions */
-
-/*
-Function: $E
- Selects a single (i.e. the first found) Element based on the selector passed in and an optional filter element.
-
-Arguments:
- selector - the css selector to match
- filter - optional; a DOM element to limit the scope of the selector match; defaults to document.
-
-Example:
- >$E('a', 'myElement') //find the first anchor tag inside the DOM element with id 'myElement'
-
-Returns:
- a DOM element - the first element that matches the selector
-*/
-
-function $E(selector, filter){
- return ($(filter) || document).getElement(selector);
-};
-
-/*
-Function: $ES
- Returns a collection of Elements that match the selector passed in limited to the scope of the optional filter.
- See Also: <Element.getElements> for an alternate syntax.
-
-Returns:
- an array of dom elements that match the selector within the filter
-
-Arguments:
- selector - css selector to match
- filter - optional; a DOM element to limit the scope of the selector match; defaults to document.
-
-Examples:
- >$ES("a") //gets all the anchor tags; synonymous with $$("a")
- >$ES('a','myElement') //get all the anchor tags within $('myElement')
-*/
-
-function $ES(selector, filter){
- return ($(filter) || document).getElementsBySelector(selector);
-};
-
-/*
-Class: Element
- Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>.
-*/
-
-Element.extend({
-
- /*
- Property: getElements
- Gets all the elements within an element that match the given (single) selector.
-
- Arguments:
- selector - the css selector to match
-
- Example:
- >$('myElement').getElements('a'); // get all anchors within myElement
-
- Credits:
- Say thanks to Christophe Beyls <http://digitalia.be> for the new regular expression that rules getElements, a big step forward in terms of speed.
- */
-
- getElements: function(selector){
- var filters = [];
- selector.clean().split(' ').each(function(sel, i){
- var param = sel.match('^(\\w*|\\*)(?:#([\\w_-]+)|\\.([\\w_-]+))?(?:\\[["\']?(\\w+)["\']?(?:([\\*\\^\\$]?=)["\']?(\\w*)["\']?)?\\])?$');
- //PARAM ARRAY: 0 = full string: 1 = tag; 2 = id; 3 = class; 4 = attribute; 5 = operator; 6 = value;
- if (!param) return;
- param[1] = param[1] || '*';
- if (i == 0){
- if (param[2]){
- var el = this.getElementById(param[2]);
- if (!el || ((param[1] != '*') && (Element.prototype.getTag.call(el) != param[1]))) return;
- filters = [el];
- } else {
- filters = $A(this.getElementsByTagName(param[1]));
- }
- } else {
- filters = Elements.prototype.filterByTagName.call(filters, param[1]);
- if (param[2]) filters = Elements.prototype.filterById.call(filters, param[2]);
- }
- if (param[3]) filters = Elements.prototype.filterByClassName.call(filters, param[3]);
- if (param[4]) filters = Elements.prototype.filterByAttribute.call(filters, param[4], param[6], param[5]);
- }, this);
- return $$(filters);
- },
-
- /*
- Property: getElementById
- Targets an element with the specified id found inside the Element. Does not overwrite document.getElementById.
-
- Arguments:
- id - the id of the element to find.
- */
-
- getElementById: function(id){
- var el = document.getElementById(id);
- if (!el) return false;
- for (var parent = el.parentNode; parent != this; parent = parent.parentNode){
- if (!parent) return false;
- }
- return el;
- },
-
- /*
- Property: getElement
- Same as <Element.getElements>, but returns only the first. Alternate syntax for <$E>, where filter is the Element.
- */
-
- getElement: function(selector){
- return this.getElementsBySelector(selector)[0];
- },
-
- /*
- Property: getElementsBySelector
- Same as <Element.getElements>, but allows for comma separated selectors, as in css. Alternate syntax for <$$>, where filter is the Element.
-
- */
-
- getElementsBySelector: function(selector){
- var els = [];
- selector.split(',').each(function(sel){
- els.extend(this.getElements(sel));
- }, this);
- return $$(els);
- }
-
-});
-
-document.extend = Object.extend;
-
-/* Section: document related functions */
-
-document.extend({
- /*
- Function: document.getElementsByClassName
- Returns all the elements that match a specific class name.
- Here for compatibility purposes. can also be written: document.getElements('.className'), or $$('.className')
- */
-
- getElementsByClassName: function(className){
- return document.getElements('.'+className);
- },
- getElement: Element.prototype.getElement,
- getElements: Element.prototype.getElements,
- getElementsBySelector: Element.prototype.getElementsBySelector
-
-});
-
-/*
-Class: Elements
- Methods for dom queries arrays, as <$$>.
-*/
-
-Elements.extend({
-
- //internal methods
-
- filterById: function(id, tag){
- var found = [];
- this.each(function(el){
- if (el.id == id) found.push(el);
- });
- return found;
- },
-
- filterByClassName: function(className){
- var found = [];
- this.each(function(el){
- if (Element.prototype.hasClass.call(el, className)) found.push(el);
- });
- return found;
- },
-
- filterByTagName: function(tagName){
- var found = [];
- this.each(function(el){
- found.extend(el.getElementsByTagName(tagName));
- });
- return found;
- },
-
- filterByAttribute: function(name, value, operator){
- var found = [];
- this.each(function(el){
- var att = el.getAttribute(name);
- if (!att) return found;
- if (!operator) return found.push(el);
-
- switch (operator){
- case '*=': if (att.test(value)) found.push(el); break;
- case '=': if (att == value) found.push(el); break;
- case '^=': if (att.test('^'+value)) found.push(el); break;
- case '$=': if (att.test(value+'$')) found.push(el);
- }
- return found;
- });
- return found;
- }
-
-});
-
-/*
-Script: Hash.js
- Contains the class Hash.
-
-Author:
- Christophe Beyls <http://digitalia.be>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Hash
- It wraps an object that it uses internally as a map. The user must use put(), get(), and remove() to add/change, retrieve and remove values, it must not access the internal object directly. With this implementation, null values are not allowed.
-
-Example:
- (start code)
- var hash = new Hash({a: 'hi', b: 'world', c: 'howdy'});
- hash.remove('b'); // b is removed.
- hash.set('c', 'hello');
- hash.get('c'); // returns 'hello'
- hash.length // returns 2 (a and b)
- (end)
-*/
-
-var Hash = new Class({
-
- length: 0,
-
- initialize: function(obj) {
- this.obj = {};
- for (var property in obj) {
- this.obj[property] = obj[property];
- this.length++;
- }
- },
-
- get: function(key) {
- return this.obj[key];
- },
-
- set: function(key, value) {
- if (value == null) return false;
- if (this.obj[key] == undefined) this.length++;
- this.obj[key] = value;
- return this;
- },
-
- remove: function(key) {
- if (this.obj[key] == undefined) return false;
- var obj = {};
- this.length--;
- for (var property in this.obj){
- if (property != key) obj[property] = this.obj[property];
- }
- this.obj = obj;
- return this;
- },
-
- each: function(fn, bind) {
- for (var property in this.obj) fn.call(bind || this, property, this.obj[property]);
- },
-
- extend: function(obj){
- this.initialize(Object.extend(this.obj, obj));
- return this;
- },
-
- empty: function() {
- return (this.length == 0);
- },
-
- keys: function() {
- var keys = [];
- for (var property in this.obj) keys.push(property);
- return keys;
- },
-
- values: function() {
- var values = [];
- for (var property in this.obj) values.push(this.obj[property]);
- return values;
- }
-
-});
-
-/*
-Function: $H
- Shortcut to create an Hash from an Object.
-*/
-
-function $H(obj) {
- return new Hash(obj);
-};
-
-/*
-Script: Color.js
- Contains the Color class.
-
-Author:
- Michael Jackson <http://ajaxon.com/michael>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Color
- Creates a new Color Object, which is an array with some color specific methods.
-
-Example:
- (start code)
- var black = new Color('#000');
- var purple = new Color([255,0,255]);
- // mix black with white and purple, each time at 10% of the new color
- var darkpurple = black.mix('#fff', purple, 10);
- $('myDiv').setStyle('background-color', darkpurple);
- (end)
-*/
-
-var Color = new Class({
-
- initialize: function(color){
- if (color.mix && color.invert) return color;
- var rgb = (color.push) ? color : color.hexToRgb(true);
- return Object.extend(rgb, Color.prototype);
- },
-
- mix: function(){
- var colors = $A(arguments);
- var alpha = 50;
- if ($type(colors[colors.length-1]) == 'number') alpha = colors.pop();
- var rgb = this.copy();
- colors.each(function(color){
- color = new Color(color);
- for (var i = 0; i < 3; i++) rgb[i] = Math.round((rgb[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha));
- });
- return new Color(rgb);
- },
-
- invert: function(){
- var rgb = [];
- for (var i = 0; i < 3; i++) rgb.push(255 - this[i]);
- return new Color(rgb);
- }
-
-});
-
-function $C(color){
- return new Color(color);
-};
-
-/*
-Script: Window.Base.js
- Contains Window.onDomReady and Window.disableImageCache
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Window
- Cross browser methods to get the window size, onDomReady method.
-*/
-
-window.extend = Object.extend;
-
-window.extend({
-
- /*
- Function: window.disableImageCache
- Disables background image chache for internex explorer, to prevent flickering.
- To be called if you have effects with background images, and they flicker.
-
- Example:
- Window.disableImageCache();
- */
-
- disableImageCache: function(){
- if (this.ie6) try {document.execCommand("BackgroundImageCache", false, true);} catch (e){};
- },
-
- addEvent: function(type, fn){
- if (type == 'domready'){
- if (this.loaded) fn();
- else if (!this.events || !this.events.domready){
- var domReady = function(){
- if (this.loaded) return;
- this.loaded = true;
- if (this.timer) this.timer = $clear(this.timer);
- Element.prototype.fireEvent.call(this, 'domready');
- this.events.domready = null;
- }.bind(this);
- if (document.readyState && this.khtml){ //safari and konqueror
- this.timer = function(){
- if (['loaded','complete'].test(document.readyState)) domReady();
- }.periodical(50);
- }
- else if (document.readyState && this.ie){ //ie
- document.write("<script id=ie_ready defer src=javascript:void(0)><\/script>");
- $('ie_ready').onreadystatechange = function(){
- if (this.readyState == 'complete') domReady();
- };
- } else { //others
- this.addEvent("load", domReady);
- document.addEvent("DOMContentLoaded", domReady);
- }
- }
- }
- Element.prototype.addEvent.call(this, type, fn);
- return this;
- },
-
- /*
- Function: window.onDomReady
- Executes the passed in function when the DOM is ready (when the document tree has loaded, not waiting for images).
- Same as window.addEvent('domready', init);
-
- Credits:
- (c) Dean Edwards/Matthias Miller/John Resig, remastered for mootools. Later touched up by Christophe Beyls <http://digitalia.be>.
-
- Arguments:
- init - the function to execute when the DOM is ready
-
- Example:
- > window.addEvent('domready', function(){alert('the dom is ready')});
- */
-
- onDomReady: function(init){
- return this.addEvent('domready', init);
- }
-
-});
-
-/*
-Script: Window.Size.js
- Window cross-browser dimensions methods.
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: window
- Cross browser methods to get the window size, onDomReady method.
-*/
-
-window.extend({
-
- /*
- Property: getWidth
- Returns an integer representing the width of the browser.
- */
-
- getWidth: function(){
- if (this.khtml || this.opera) return this.innerWidth;
- else return document.documentElement.clientWidth || document.body.clientWidth;
- },
-
- /*
- Property: getHeight
- Returns an integer representing the height of the browser.
- */
-
- getHeight: function(){
- if (this.khtml || this.opera) return this.innerHeight;
- return document.documentElement.clientHeight || document.body.clientHeight;
- },
-
- /*
- Property: getScrollHeight
- Returns an integer representing the scrollHeight of the window.
-
- See Also:
- <http://developer.mozilla.org/en/docs/DOM:element.scrollHeight>
- */
-
- getScrollHeight: function(){
- return document.documentElement.scrollHeight;
- },
-
- /*
- Property: getScrollWidth
- Returns an integer representing the scrollWidth of the window.
-
- See Also:
- <http://developer.mozilla.org/en/docs/DOM:element.scrollWidth>
- */
-
- getScrollWidth: function(){
- return document.documentElement.scrollWidth;
- },
-
- /*
- Property: getScrollTop
- Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top).
-
- See Also:
- <http://developer.mozilla.org/en/docs/DOM:element.scrollTop>
- */
-
- getScrollTop: function(){
- return this.pageYOffset || document.documentElement.scrollTop;
- },
-
- /*
- Property: getScrollLeft
- Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left).
-
- See Also:
- <http://developer.mozilla.org/en/docs/DOM:element.scrollLeft>
- */
-
- getScrollLeft: function(){
- return this.pageXOffset || document.documentElement.scrollLeft;
- },
-
- /*
- Property: getSize
- Same as <Element.getSize>
- */
-
- getSize: function(){
- return {
- 'scroll': {'x': this.getScrollLeft(), 'y': this.getScrollTop()},
- 'size': {'x': this.getWidth(), 'y': this.getHeight()},
- 'scrollSize': {'x': this.getScrollWidth(), 'y': this.getScrollHeight()}
- };
- },
-
- //ignore
- getOffsets: function(){return {'x': 0, 'y': 0}}
-
-});
-
-/*
-Script: Fx.Base.js
- Contains <Fx.Base> and two Transitions.
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-var Fx = {};
-
-/*
-Class: Fx.Base
- Base class for the Mootools Effects (Moo.Fx) library.
-
-Options:
- onStart - the function to execute as the effect begins; nothing (<Class.empty>) by default.
- onComplete - the function to execute after the effect has processed; nothing (<Class.empty>) by default.
- transition - the equation to use for the effect see <Fx.Transitions>; default is <Fx.Transitions.sineInOut>
- duration - the duration of the effect in ms; 500 is the default.
- unit - the unit is 'px' by default (other values include things like 'em' for fonts or '%').
- wait - boolean: to wait or not to wait for a current transition to end before running another of the same instance. defaults to true.
- fps - the frames per second for the transition; default is 30
-*/
-
-Fx.Base = new Class({
-
- getOptions: function(){
- return {
- onStart: Class.empty,
- onComplete: Class.empty,
- onCancel: Class.empty,
- transition: Fx.Transitions.sineInOut,
- duration: 500,
- unit: 'px',
- wait: true,
- fps: 50
- };
- },
-
- initialize: function(options){
- this.element = this.element || null;
- this.setOptions(this.getOptions(), options);
- if (this.options.initialize) this.options.initialize.call(this);
- },
-
- step: function(){
- var time = new Date().getTime();
- if (time < this.time + this.options.duration){
- this.cTime = time - this.time;
- this.setNow();
- this.increase();
- } else {
- this.stop(true);
- this.now = this.to;
- this.increase();
- this.fireEvent('onComplete', this.element, 10);
- this.callChain();
- }
- },
-
- /*
- Property: set
- Immediately sets the value with no transition.
-
- Arguments:
- to - the point to jump to
-
- Example:
- >var myFx = new Fx.Style('myElement', 'opacity').set(0); //will make it immediately transparent
- */
-
- set: function(to){
- this.now = to;
- this.increase();
- return this;
- },
-
- setNow: function(){
- this.now = this.compute(this.from, this.to);
- },
-
- compute: function(from, to){
- return this.options.transition(this.cTime, from, (to - from), this.options.duration);
- },
-
- /*
- Property: start
- Executes an effect from one position to the other.
-
- Arguments:
- from - integer: staring value
- to - integer: the ending value
-
- Examples:
- >var myFx = new Fx.Style('myElement', 'opacity').start(0,1); //display a transition from transparent to opaque.
- */
-
- start: function(from, to){
- if (!this.options.wait) this.stop();
- else if (this.timer) return this;
- this.from = from;
- this.to = to;
- this.time = new Date().getTime();
- this.timer = this.step.periodical(Math.round(1000/this.options.fps), this);
- this.fireEvent('onStart', this.element);
- return this;
- },
-
- /*
- Property: stop
- Stops the transition.
- */
-
- stop: function(end){
- if (!this.timer) return this;
- this.timer = $clear(this.timer);
- if (!end) this.fireEvent('onCancel', this.element);
- return this;
- },
-
- //compat
- custom: function(from, to){return this.start(from, to)},
- clearTimer: function(end){return this.stop(end)}
-
-});
-
-Fx.Base.implement(new Chain);
-Fx.Base.implement(new Events);
-Fx.Base.implement(new Options);
-
-/*
-Class: Fx.Transitions
- A collection of transition equations for use with the <Fx> Class.
-
-See Also:
- <Fxtransitions.js> for a whole bunch of transitions.
-
-Credits:
- Easing Equations, (c) 2003 Robert Penner (http://www.robertpenner.com/easing/), Open Source BSD License.
-*/
-
-Fx.Transitions = {
-
- /* Property: linear */
- linear: function(t, b, c, d){
- return c*t/d + b;
- },
-
- /* Property: sineInOut */
- sineInOut: function(t, b, c, d){
- return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
- }
-
-};
-
-/*
-Script: Fx.CSS.js
- Css parsing class for effects. Required by <Fx.Style>, <Fx.Styles>, <Fx.Elements>. No documentation needed, as its used internally.
-
-Author:
- Christophe Beyls, <http://www.digitalia.be>,
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-Fx.CSS = {
-
- select: function(property, to){
- if (property.test('color', 'i')) return this.Color;
- if (to.test && to.test(' ')) return this.Multi;
- return this.Single;
- },
-
- parse: function(el, property, fromTo){
- if (!fromTo.push) fromTo = [fromTo];
- var from = fromTo[0], to = fromTo[1];
- if (!to && to != 0){
- to = from;
- from = el.getStyle(property);
- }
- var css = this.select(property, to);
- return {from: css.parse(from), to: css.parse(to), css: css};
- }
-
-};
-
-Fx.CSS.Single = {
-
- parse: function(value){
- return parseFloat(value);
- },
-
- getNow: function(from, to, fx){
- return fx.compute(from, to);
- },
-
- getValue: function(value, unit){
- return value+unit;
- }
-
-};
-
-Fx.CSS.Multi = {
-
- parse: function(value){
- return value.push ? value : value.split(' ').map(function(v){
- return parseFloat(v);
- });
- },
-
- getNow: function(from, to, fx){
- var now = [];
- for (var i = 0; i < from.length; i++) now[i] = fx.compute(from[i], to[i]);
- return now;
- },
-
- getValue: function(value, unit){
- return value.join(unit+' ')+unit;
- }
-
-};
-
-Fx.CSS.Color = {
-
- parse: function(value){
- return value.push ? value : value.hexToRgb(true);
- },
-
- getNow: function(from, to, fx){
- var now = [];
- for (var i = 0; i < from.length; i++) now[i] = Math.round(fx.compute(from[i], to[i]));
- return now;
- },
-
- getValue: function(value){
- return 'rgb('+value.join(',')+')';
- }
-
-};
-
-/*
-Script: Fx.Style.js
- Contains <Fx.Style>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Fx.Style
- The Style effect; Extends <Fx.Base>, inherits all its properties. Used to transition any css property from one value to another. Includes colors.
- Colors must be in hex format.
-
-Arguments:
- el - the $(element) to apply the style transition to
- property - the property to transition
- options - the Fx.Base options (see: <Fx.Base>)
-
-Example:
- >var marginChange = new Fx.Style('myElement', 'margin-top', {duration:500});
- >marginChange.start(10, 100);
-*/
-
-Fx.Style = Fx.Base.extend({
-
- initialize: function(el, property, options){
- this.element = $(el);
- this.property = property;
- this.parent(options);
- },
-
- /*
- Property: hide
- Same as <Fx.Base.set>(0)
- */
-
- hide: function(){
- return this.set(0);
- },
-
- setNow: function(){
- this.now = this.css.getNow(this.from, this.to, this);
- },
-
- set: function(to){
- this.css = Fx.CSS.select(this.property, to);
- return this.parent(this.css.parse(to));
- },
-
- /*
- Property: start
- displays the transition to the value/values passed in
-
- Example:
- (start code)
- var var marginChange = new Fx.Style('myElement', 'margin-top', {duration:500});
- marginChange.start(10); //tries to read current margin top value and goes from current to 10
- (end)
- */
-
- start: function(from, to){
- if (this.timer && this.options.wait) return this;
- var parsed = Fx.CSS.parse(this.element, this.property, [from, to]);
- this.css = parsed.css;
- return this.parent(parsed.from, parsed.to);
- },
-
- increase: function(){
- this.element.setStyle(this.property, this.css.getValue(this.now, this.options.unit));
- }
-
-});
-
-/*
-Class: Element
- Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>.
-*/
-
-Element.extend({
-
- /*
- Property: effect
- Applies an <Fx.Style> to the Element; This a shortcut for <Fx.Style>.
-
- Example:
- >var myEffect = $('myElement').effect('height', {duration: 1000, transition: Fx.Transitions.linear});
- >myEffect.start(10, 100);
- */
-
- effect: function(property, options){
- return new Fx.Style(this, property, options);
- }
-
-});
-
-/*
-Script: Fx.Styles.js
- Contains <Fx.Styles>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Fx.Styles
- Allows you to animate multiple css properties at once; Extends <Fx.Base>, inherits all its properties. Includes colors.
- Colors must be in hex format.
-
-Arguments:
- el - the $(element) to apply the styles transition to
- options - the fx options (see: <Fx.Base>)
-
-Example:
- (start code)
- var myEffects = new Fx.Styles('myElement', {duration: 1000, transition: Fx.Transitions.linear});
-
- //height from 10 to 100 and width from 900 to 300
- myEffects.start({
- 'height': [10, 100],
- 'width': [900, 300]
- });
-
- //or height from current height to 100 and width from current width to 300
- myEffects.start({
- 'height': 100,
- 'width': 300
- });
- (end)
-*/
-
-Fx.Styles = Fx.Base.extend({
-
- initialize: function(el, options){
- this.element = $(el);
- this.parent(options);
- },
-
- setNow: function(){
- for (var p in this.from) this.now[p] = this.css[p].getNow(this.from[p], this.to[p], this);
- },
-
- set: function(to){
- var parsed = {};
- this.css = {};
- for (var p in to){
- this.css[p] = Fx.CSS.select(p, to[p]);
- parsed[p] = this.css[p].parse(to[p]);
- }
- return this.parent(parsed);
- },
-
- /*
- Property: start
- The function you'll actually use to execute a transition.
-
- Arguments:
- an object
-
- Example:
- see <Fx.Styles>
- */
-
- start: function(obj){
- if (this.timer && this.options.wait) return this;
- this.now = {};
- this.css = {};
- var from = {}, to = {};
- for (var p in obj){
- var parsed = Fx.CSS.parse(this.element, p, obj[p]);
- from[p] = parsed.from;
- to[p] = parsed.to;
- this.css[p] = parsed.css;
- }
- return this.parent(from, to);
- },
-
- increase: function(){
- for (var p in this.now) this.element.setStyle(p, this.css[p].getValue(this.now[p], this.options.unit));
- }
-
-});
-
-/*
-Class: Element
- Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>.
-*/
-
-Element.extend({
-
- /*
- Property: effects
- Applies an <Fx.Styles> to the Element; This a shortcut for <Fx.Styles>.
-
- Example:
- >var myEffects = $(myElement).effects({duration: 1000, transition: Fx.Transitions.sineInOut});
- >myEffects.start({'height': [10, 100], 'width': [900, 300]});
- */
-
- effects: function(options){
- return new Fx.Styles(this, options);
- }
-
-});
-
-/*
-Script: Fx.Elements.js
- Contains <Fx.Elements>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Fx.Elements
- Fx.Elements allows you to apply any number of styles transitions to a selection of elements. Includes colors (must be in hex format).
-
-Arguments:
- elements - a collection of elements the effects will be applied to.
- options - same as <Fx.Base> options.
-*/
-
-Fx.Elements = Fx.Base.extend({
-
- initialize: function(elements, options){
- this.elements = $$(elements);
- this.parent(options);
- },
-
- setNow: function(){
- for (var i in this.from){
- var iFrom = this.from[i], iTo = this.to[i], iCss = this.css[i], iNow = this.now[i] = {};
- for (var p in iFrom) iNow[p] = iCss[p].getNow(iFrom[p], iTo[p], this);
- }
- },
-
- set: function(to){
- var parsed = {};
- this.css = {};
- for (var i in to){
- var iTo = to[i], iCss = this.css[i] = {}, iParsed = parsed[i] = {};
- for (var p in iTo){
- iCss[p] = Fx.CSS.select(p, iTo[p]);
- iParsed[p] = iCss[p].parse(iTo[p]);
- }
- }
- return this.parent(parsed);
- },
-
- /*
- Property: start
- Applies the passed in style transitions to each object named (see example). Each item in the collection is refered to as a numerical string ("1" for instance). The first item is "0", the second "1", etc.
-
- Example:
- (start code)
- var myElementsEffects = new Fx.Elements($$('a'));
- myElementsEffects.start({
- '0': { //let's change the first element's opacity and width
- 'opacity': [0,1],
- 'width': [100,200]
- },
- '1': { //and the second one's opacity
- 'opacity': [0.2, 0.5]
- }
- });
- (end)
- */
-
- start: function(obj){
- if (this.timer && this.options.wait) return this;
- this.now = {};
- this.css = {};
- var from = {}, to = {};
- for (var i in obj){
- var iProps = obj[i], iFrom = from[i] = {}, iTo = to[i] = {}, iCss = this.css[i] = {};
- for (var p in iProps){
- var parsed = Fx.CSS.parse(this.elements[i], p, iProps[p]);
- iFrom[p] = parsed.from;
- iTo[p] = parsed.to;
- iCss[p] = parsed.css;
- }
- }
- return this.parent(from, to);
- },
-
- increase: function(){
- for (var i in this.now){
- var iNow = this.now[i], iCss = this.css[i];
- for (var p in iNow) this.elements[i].setStyle(p, iCss[p].getValue(iNow[p], this.options.unit));
- }
- }
-
-});
-
-/*
-Script: Fx.Scroll.js
- Contains <Fx.Scroll>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Fx.Scroll
- Scroll any element with an overflow, including the window element.
-
-Arguments:
- element - the element to scroll
- options - same as <Fx.Base> options.
-*/
-
-Fx.Scroll = Fx.Base.extend({
-
- initialize: function(element, options){
- this.now = [];
- this.element = $(element);
- this.addEvent('onStart', function(){
- this.element.addEvent('mousewheel', this.stop.bind(this, false));
- }.bind(this));
- this.removeEvent('onComplete', function(){
- this.element.removeEvent('mousewheel', this.stop.bind(this, false));
- }.bind(this));
- this.parent(options);
- },
-
- setNow: function(){
- for (var i = 0; i < 2; i++) this.now[i] = this.compute(this.from[i], this.to[i]);
- },
-
- /*
- Property: scrollTo
- Scrolls the chosen element to the x/y coordinates.
-
- Arguments:
- x - the x coordinate to scroll the element to
- y - the y coordinate to scroll the element to
- */
-
- scrollTo: function(x, y){
- if (this.timer && this.options.wait) return this;
- var el = this.element.getSize();
- var values = {'x': x, 'y': y};
- for (var z in el.size){
- var max = el.scrollSize[z] - el.size[z];
- if ($chk(values[z])) values[z] = ($type(values[z]) == 'number') ? Math.max(Math.min(values[z], max), 0) : max;
- else values[z] = el.scroll[z];
- }
- return this.start([el.scroll.x, el.scroll.y], [values.x, values.y]);
- },
-
- /*
- Property: toTop
- Scrolls the chosen element to its maximum top.
- */
-
- toTop: function(){
- return this.scrollTo(false, 0);
- },
-
- /*
- Property: toBottom
- Scrolls the chosen element to its maximum bottom.
- */
-
- toBottom: function(){
- return this.scrollTo(false, 'full');
- },
-
- /*
- Property: toLeft
- Scrolls the chosen element to its maximum left.
- */
-
- toLeft: function(){
- return this.scrollTo(0, false);
- },
-
- /*
- Property: toRight
- Scrolls the chosen element to its maximum right.
- */
-
- toRight: function(){
- return this.scrollTo('full', false);
- },
-
- /*
- Property: toElement
- Scrolls the specified element to the position the passed in element is found. Only usable if the chosen element is == window.
-
- Arguments:
- el - the $(element) to scroll the window to
- */
-
- toElement: function(el){
- return this.scrollTo($(el).getLeft(), $(el).getTop());
- },
-
- increase: function(){
- this.element.scrollTo(this.now[0], this.now[1]);
- }
-
-});
-
-/*
-Script: Fx.Slide.js
- Contains <Fx.Slide>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Fx.Slide
- The slide effect; slides an element in horizontally or vertically, the contents will fold inside. Extends <Fx.Base>, inherits all its properties.
-
-Note:
- This effect works on any block element, but the element *cannot be positioned*; no margins or absolute positions. To position the element, put it inside another element (a wrapper div, for instance) and position that instead.
-
-Options:
- mode - set it to vertical or horizontal. Defaults to vertical.
- and all the <Fx.Base> options
-
-Example:
- (start code)
- var mySlider = new Fx.Slide('myElement', {duration: 500});
- mySlider.toggle() //toggle the slider up and down.
- (end)
-*/
-
-Fx.Slide = Fx.Base.extend({
-
- initialize: function(el, options){
- this.element = $(el).setStyle('margin', 0);
- this.wrapper = new Element('div').injectAfter(this.element).setStyle('overflow', 'hidden').adopt(this.element);
- this.setOptions({'mode': 'vertical'}, options);
- this.now = [];
- this.parent(this.options);
- },
-
- setNow: function(){
- for (var i = 0; i < 2; i++) this.now[i] = this.compute(this.from[i], this.to[i]);
- },
-
- vertical: function(){
- this.margin = 'top';
- this.layout = 'height';
- this.offset = this.element.offsetHeight;
- return [this.element.getStyle('margin-top').toInt(), this.wrapper.getStyle('height').toInt()];
- },
-
- horizontal: function(){
- this.margin = 'left';
- this.layout = 'width';
- this.offset = this.element.offsetWidth;
- return [this.element.getStyle('margin-left').toInt(), this.wrapper.getStyle('width').toInt()];
- },
-
- /*
- Property: slideIn
- slides the elements in view horizontally or vertically, depending on the mode parameter or options.mode.
- */
-
- slideIn: function(mode){
- return this.start(this[mode || this.options.mode](), [0, this.offset]);
- },
-
- /*
- Property: slideOut
- slides the elements out of the view horizontally or vertically, depending on the mode parameter or options.mode.
- */
-
- slideOut: function(mode){
- return this.start(this[mode || this.options.mode](), [-this.offset, 0]);
- },
-
- /*
- Property: hide
- Hides the element without a transition.
- */
-
- hide: function(mode){
- this[mode || this.options.mode]();
- return this.set([-this.offset, 0]);
- },
-
- /*
- Property: show
- Shows the element without a transition.
- */
-
- show: function(mode){
- this[mode || this.options.mode]();
- return this.set([0, this.offset]);
- },
-
- /*
- Property: toggle
- Slides in or Out the element, depending on its state
- */
-
- toggle: function(mode){
- if (this.wrapper.offsetHeight == 0 || this.wrapper.offsetWidth == 0) return this.slideIn(mode);
- else return this.slideOut(mode);
- },
-
- increase: function(){
- this.element.setStyle('margin-'+this.margin, this.now[0]+this.options.unit);
- this.wrapper.setStyle(this.layout, this.now[1]+this.options.unit);
- }
-
-});
-
-/*
-Script: Fx.Transitions.js
- Cool transitions, to be used with all the effects.
-
-Author:
- Robert Penner, <http://www.robertpenner.com/easing/>, modified to be used with mootools.
-
-License:
- Easing Equations v1.5, (c) 2003 Robert Penner, all rights reserved. Open Source BSD License.
-*/
-
-/*
-Class: Fx.Transitions
- A collection of tweaning transitions for use with the <Fx.Base> classes.
-*/
-
-Fx.Transitions = {
-
- /* Property: linear */
- linear: function(t, b, c, d){
- return c*t/d + b;
- },
-
- /* Property: quadIn */
- quadIn: function(t, b, c, d){
- return c*(t/=d)*t + b;
- },
-
- /* Property: quatOut */
- quadOut: function(t, b, c, d){
- return -c *(t/=d)*(t-2) + b;
- },
-
- /* Property: quadInOut */
- quadInOut: function(t, b, c, d){
- if ((t/=d/2) < 1) return c/2*t*t + b;
- return -c/2 * ((--t)*(t-2) - 1) + b;
- },
-
- /* Property: cubicIn */
- cubicIn: function(t, b, c, d){
- return c*(t/=d)*t*t + b;
- },
-
- /* Property: cubicOut */
- cubicOut: function(t, b, c, d){
- return c*((t=t/d-1)*t*t + 1) + b;
- },
-
- /* Property: cubicInOut */
- cubicInOut: function(t, b, c, d){
- if ((t/=d/2) < 1) return c/2*t*t*t + b;
- return c/2*((t-=2)*t*t + 2) + b;
- },
-
- /* Property: quartIn */
- quartIn: function(t, b, c, d){
- return c*(t/=d)*t*t*t + b;
- },
-
- /* Property: quartOut */
- quartOut: function(t, b, c, d){
- return -c * ((t=t/d-1)*t*t*t - 1) + b;
- },
-
- /* Property: quartInOut */
- quartInOut: function(t, b, c, d){
- if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
- return -c/2 * ((t-=2)*t*t*t - 2) + b;
- },
-
- /* Property: quintIn */
- quintIn: function(t, b, c, d){
- return c*(t/=d)*t*t*t*t + b;
- },
-
- /* Property: quintOut */
- quintOut: function(t, b, c, d){
- return c*((t=t/d-1)*t*t*t*t + 1) + b;
- },
-
- /* Property: quintInOut */
- quintInOut: function(t, b, c, d){
- if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
- return c/2*((t-=2)*t*t*t*t + 2) + b;
- },
-
- /* Property: sineIn */
- sineIn: function(t, b, c, d){
- return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
- },
-
- /* Property: sineOut */
- sineOut: function(t, b, c, d){
- return c * Math.sin(t/d * (Math.PI/2)) + b;
- },
-
- /* Property: sineInOut */
- sineInOut: function(t, b, c, d){
- return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
- },
-
- /* Property: expoIn */
- expoIn: function(t, b, c, d){
- return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
- },
-
- /* Property: expoOut */
- expoOut: function(t, b, c, d){
- return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
- },
-
- /* Property: expoInOut */
- expoInOut: function(t, b, c, d){
- if (t==0) return b;
- if (t==d) return b+c;
- if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
- return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
- },
-
- /* Property: circIn */
- circIn: function(t, b, c, d){
- return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
- },
-
- /* Property: circOut */
- circOut: function(t, b, c, d){
- return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
- },
-
- /* Property: circInOut */
- circInOut: function(t, b, c, d){
- if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
- return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
- },
-
- /* Property: elasticIn */
- elasticIn: function(t, b, c, d, a, p){
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (!a) a = 1;
- if (a < Math.abs(c)){ a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin(c/a);
- return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- },
-
- /* Property: elasticOut */
- elasticOut: function(t, b, c, d, a, p){
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (!a) a = 1;
- if (a < Math.abs(c)){ a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin(c/a);
- return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
- },
-
- /* Property: elasticInOut */
- elasticInOut: function(t, b, c, d, a, p){
- if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (!a) a = 1;
- if (a < Math.abs(c)){ a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin(c/a);
- if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
- },
-
- /* Property: backIn */
- backIn: function(t, b, c, d, s){
- if (!s) s = 1.70158;
- return c*(t/=d)*t*((s+1)*t - s) + b;
- },
-
- /* Property: backOut */
- backOut: function(t, b, c, d, s){
- if (!s) s = 1.70158;
- return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
- },
-
- /* Property: backInOut */
- backInOut: function(t, b, c, d, s){
- if (!s) s = 1.70158;
- if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
- return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
- },
-
- /* Property: bounceIn */
- bounceIn: function(t, b, c, d){
- return c - Fx.Transitions.bounceOut (d-t, 0, c, d) + b;
- },
-
- /* Property: bounceOut */
- bounceOut: function(t, b, c, d){
- if ((t/=d) < (1/2.75)){
- return c*(7.5625*t*t) + b;
- } else if (t < (2/2.75)){
- return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
- } else if (t < (2.5/2.75)){
- return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
- } else {
- return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
- }
- },
-
- /* Property: bounceInOut */
- bounceInOut: function(t, b, c, d){
- if (t < d/2) return Fx.Transitions.bounceIn(t*2, 0, c, d) * .5 + b;
- return Fx.Transitions.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b;
- }
-
-};
-
-/*
-Script: Drag.Base.js
- Contains <Drag.Base>, <Element.makeResizable>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-var Drag = {};
-
-/*
-Class: Drag.Base
- Modify two css properties of an element based on the position of the mouse.
-
-Arguments:
- el - the $(element) to apply the transformations to.
- options - optional. The options object.
-
-Options:
- handle - the $(element) to act as the handle for the draggable element. defaults to the $(element) itself.
- modifiers - an object. see Modifiers Below.
- onStart - optional, function to execute when the user starts to drag (on mousedown);
- onComplete - optional, function to execute when the user completes the drag.
- onDrag - optional, function to execute at every step of the drag
- limit - an object, see Limit below.
- snap - optional, the distance you have to drag before the element starts to respond to the drag. defaults to false
-
- modifiers:
- x - string, the style you want to modify when the mouse moves in an horizontal direction. defaults to 'left'
- y - string, the style you want to modify when the mouse moves in a vertical direction. defaults to 'top'
-
- limit:
- x - array with start and end limit relative to modifiers.x
- y - array with start and end limit relative to modifiers.y
-*/
-
-Drag.Base = new Class({
-
- getOptions: function(){
- return {
- handle: false,
- unit: 'px',
- onStart: Class.empty,
- onComplete: Class.empty,
- onSnap: Class.empty,
- onDrag: Class.empty,
- limit: false,
- modifiers: {x: 'left', y: 'top'},
- snap: 6
- };
- },
-
- initialize: function(el, options){
- this.setOptions(this.getOptions(), options);
- this.element = $(el);
- this.handle = $(this.options.handle) || this.element;
- this.mouse = {'now': {}, 'pos': {}};
- this.value = {'start': {}, 'now': {}};
- this.bound = {'start': this.start.bindWithEvent(this)};
- this.handle.addEvent('mousedown', this.bound.start);
- if (this.options.initialize) this.options.initialize.call(this);
- },
-
- start: function(event){
- this.mouse.start = event.page;
- var limit = this.options.limit;
- this.limit = {'x': [], 'y': []};
- for (var z in this.options.modifiers){
- this.value.now[z] = this.element.getStyle(this.options.modifiers[z]).toInt();
- this.mouse.pos[z] = event.page[z] - this.value.now[z];
- if (limit && limit[z]){
- for (var i = 0; i < 2; i++){
- if ($chk(limit[z][i])) this.limit[z][i] = limit[z][i].apply ? limit[z][i].call(this) : limit[z][i];
- }
- }
- }
- this.bound.drag = this.drag.bindWithEvent(this);
- this.bound.checkAndDrag = this.checkAndDrag.bindWithEvent(this);
- this.bound.stop = this.stop.bind(this);
- document.addEvent('mousemove', this.options.snap ? this.bound.checkAndDrag : this.bound.drag);
- document.addEvent('mouseup', this.bound.stop);
- this.fireEvent('onStart', this.element);
- event.stop();
- },
-
- checkAndDrag: function(event){
- var distance = Math.round(Math.sqrt(Math.pow(event.page.x - this.mouse.start.x, 2) + Math.pow(event.page.y - this.mouse.start.y, 2)));
- if (distance > this.options.snap){
- document.removeEvent('mousemove', this.bound.checkAndDrag);
- document.addEvent('mousemove', this.bound.drag);
- this.drag(event);
- this.fireEvent('onSnap', this.element);
- }
- event.stop();
- },
-
- drag: function(event){
- this.out = false;
- this.mouse.now = event.page;
- for (var z in this.options.modifiers){
- this.value.now[z] = event.page[z] - this.mouse.pos[z];
- if (this.limit[z]){
- if ($chk(this.limit[z][1]) && (this.value.now[z] > this.limit[z][1])){
- this.value.now[z] = this.limit[z][1];
- this.out = true;
- } else if ($chk(this.limit[z][0]) && (this.value.now[z] < this.limit[z][0])){
- this.value.now[z] = this.limit[z][0];
- this.out = true;
- }
- }
- this.element.setStyle(this.options.modifiers[z], this.value.now[z] + this.options.unit);
- }
- this.fireEvent('onDrag', this.element);
- event.stop();
- },
-
- detach: function(){
- this.handle.removeEvent('mousedown', this.bound.start);
- },
-
- stop: function(){
- document.removeEvent('mousemove', this.bound.drag);
- document.removeEvent('mouseup', this.bound.stop);
- this.fireEvent('onComplete', this.element);
- }
-
-});
-
-Drag.Base.implement(new Events);
-Drag.Base.implement(new Options);
-
-/*
-Class: Element
- Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>.
-*/
-
-Element.extend({
-
- /*
- Property: makeResizable
- Makes an element resizable (by dragging) with the supplied options.
-
- Arguments:
- options - see <Drag.Base> for acceptable options.
- */
-
- makeResizable: function(options){
- return new Drag.Base(this, Object.extend(options || {}, {modifiers: {x: 'width', y: 'height'}}));
- }
-
-});
-
-/*
-Script: Scroller.js
- Contains the <Scroller>.
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Scroller
- The Scroller is a class to scroll any element with an overflow (including the window) when the mouse cursor reaches certain buondaries of that element.
- You must call its start method to start listening to mouse movements.
-
-Arguments:
- element - required, the element to scroll.
- options - optional, see options below, and <Fx.Base> options.
-
-Options:
- area - integer, the necessary boundaries to make the element scroll.
- velocity - integer, velocity ratio, the modifier for the window scrolling speed.
- onChange - optionally, when the mouse reaches some boundaries, you can choose to alter some other values, instead of the scrolling offsets.
- Automatically passes as parameters x and y values.
-*/
-
-var Scroller = new Class({
-
- getOptions: function(){
- return {
- area: 20,
- velocity: 1,
- onChange: function(x, y){
- this.element.scrollTo(x, y);
- }
- };
- },
-
- initialize: function(element, options){
- this.setOptions(this.getOptions(), options);
- this.element = $(element);
- this.mousemover = ([window, document].test(element)) ? $(document.body) : this.element;
- },
-
- /*
- Property: start
- The scroller starts listening to mouse movements.
- */
-
- start: function(){
- this.coord = this.getCoords.bindWithEvent(this);
- this.mousemover.addEvent('mousemove', this.coord);
- },
-
- /*
- Property: stop
- The scroller stops listening to mouse movements.
- */
-
- stop: function(){
- this.mousemover.removeEvent('mousemove', this.coord);
- this.timer = $clear(this.timer);
- },
-
- getCoords: function(event){
- this.page = (this.element == window) ? event.client : event.page;
- if (!this.timer) this.timer = this.scroll.periodical(50, this);
- },
-
- scroll: function(){
- var el = this.element.getSize();
- var pos = this.element.getOffsets();
-
- var change = {'x': 0, 'y': 0};
- for (var z in this.page){
- if (this.page[z] < (this.options.area + pos[z]) && el.scroll[z] != 0)
- change[z] = (this.page[z] - this.options.area - pos[z]) * this.options.velocity;
- else if (this.page[z] + this.options.area > (el.size[z] + pos[z]) && el.scroll[z] + el.size[z] != el.scrollSize[z])
- change[z] = (this.page[z] - el.size[z] + this.options.area - pos[z]) * this.options.velocity;
- }
- if (change.y || change.x) this.fireEvent('onChange', [el.scroll.x + change.x, el.scroll.y + change.y]);
- }
-
-});
-
-Scroller.implement(new Events);
-Scroller.implement(new Options);
-
-/*
-Script: Slider.js
- Contains <Slider>
-
-Author:
- Valerio Proietti, <http://mad4milk.net>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Slider
- Creates a slider with two elements: a knob and a container. Returns the values.
-
-Arguments:
- element - the knob container
- knob - the handle
- options - see Options below
-
-Options:
- onChange - a function to fire when the value changes.
- onComplete - a function to fire when you're done dragging.
- onTick - optionally, you can alter the onTick behavior, for example displaying an effect of the knob moving to the desired position.
- Passes as parameter the new position.
- steps - the number of steps for your slider.
- mode - either 'horizontal' or 'vertical'. defaults to horizontal.
- wheel - experimental! Also use the mouse wheel to control the slider. defaults to false.
-*/
-
-var Slider = new Class({
-
- getOptions: function(){
- return {
- onChange: Class.empty,
- onComplete: Class.empty,
- onTick: function(pos){
- this.knob.setStyle(this.p, pos+'px');
- },
- steps: 100,
- mode: 'horizontal',
- wheel: false
- };
- },
-
- initialize: function(el, knob, options){
- this.element = $(el);
- this.knob = $(knob);
- this.setOptions(this.getOptions(), options);
-
- this.previousChange = -1;
- this.previousEnd = -1;
- this.step = -1;
-
- this.element.addEvent('mousedown', this.clickedElement.bindWithEvent(this));
-
- if (this.options.wheel) this.element.addEvent('mousewheel', this.scrolledElement.bindWithEvent(this));
-
- if (this.options.mode == 'horizontal'){
- this.z = 'x'; this.p = 'left';
- this.max = this.element.offsetWidth-this.knob.offsetWidth;
- this.half = this.knob.offsetWidth/2;
- this.getPos = this.element.getLeft.bind(this.element);
- } else if (this.options.mode == 'vertical'){
- this.z = 'y'; this.p = 'top';
- this.max = this.element.offsetHeight-this.knob.offsetHeight;
- this.half = this.knob.offsetHeight/2;
- this.getPos = this.element.getTop.bind(this.element);
- }
-
- this.knob.setStyle('position', 'relative').setStyle(this.p, 0);
-
- var modSlide = {}, limSlide = {};
-
- limSlide[this.z] = [0, this.max];
- modSlide[this.z] = this.p;
-
- this.drag = new Drag.Base(this.knob, {
- limit: limSlide,
- snap: 0,
- modifiers: modSlide,
- onStart: function(){
- this.draggedKnob();
- }.bind(this),
- onDrag: function(){
- this.draggedKnob();
- }.bind(this),
- onComplete: function(){
- this.draggedKnob();
- this.end();
- }.bind(this)
- });
- if (this.options.initialize) this.options.initialize.call(this);
- },
-
- /*
- Property: set
- The slider will get the step you pass.
-
- Arguments:
- step - one integer
- */
-
- set: function(step){
- if (step > this.options.steps) step = this.options.steps;
- else if (step < 0) step = 0;
- this.step = step;
- this.checkStep();
- this.end();
- this.fireEvent('onTick', this.toPosition(this.step)+'');
- return this;
- },
-
- scrolledElement: function(event){
- if (event.wheel < 0) this.set(this.step + 1);
- else if (event.wheel > 0) this.set(this.step - 1);
- event.stop();
- },
-
- clickedElement: function(event){
- var position = event.page[this.z] - this.getPos() - this.half;
- if (position > this.max) position = this.max;
- else if (position < 0) position = 0;
- this.step = this.toStep(position);
- this.checkStep();
- this.end();
- this.fireEvent('onTick', position+'');
- },
-
- draggedKnob: function(){
- this.step = this.toStep(this.drag.value.now[this.z]);
- this.checkStep();
- },
-
- checkStep: function(){
- if (this.previousChange != this.step){
- this.previousChange = this.step;
- this.fireEvent('onChange', this.step);
- }
- },
-
- end: function(){
- if (this.previousEnd !== this.step){
- this.previousEnd = this.step;
- this.fireEvent('onComplete', this.step+'');
- }
- },
-
- toStep: function(position){
- return Math.round(position/this.max*this.options.steps);
- },
-
- toPosition: function(step){
- return (this.max)*step/this.options.steps;
- }
-
-});
-
-Slider.implement(new Events);
-Slider.implement(new Options); \ No newline at end of file
diff --git a/emacs.d/nxhtml/nxhtml/doc/nxhtml-changes.html b/emacs.d/nxhtml/nxhtml/doc/nxhtml-changes.html
deleted file mode 100644
index 81339df..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/nxhtml-changes.html
+++ /dev/null
@@ -1,3395 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News and Notes about nXhtml</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
- <style type="text/css">
-#nxhtml-home a {
- /* Image */
- display: block;
- background: transparent url("img/getitbuttons.png") 0 0 no-repeat;
- overflow: hidden;
- width: 200px;
- xheight: 35px;
- /* Text placement and size, etc */
- text-align: center;
- padding-top: 11px;
- font-size: 12px;
- padding-bottom: 9px;
- text-decoration: none;
- white-space: nowrap;
- margin: 0;
- border: none;
-}
-#nxhtml-home a:hover {
- background-position: 0 -35px;
- color: yellow;
-}
-.bugfix {
- background-color: #ffd700;
-}
-
-</style>
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home"><a href='nxhtml.html'>To nXhtml main page</a></p>
-
- <h1>News and Notes about nXhtml</h1>
-
- <dl>
-
- <dt id="state-of-the-art" style="margin-top:1em;
- background-color: #66cd5c;
- background-color: #96cd5c;
- padding: 0.5em;
- ">The State of the Art</dt>
- <dd style="background-color: #f9e529; padding: 0.5em">
- <p>
- I believe now that MuMaMo (the multi major mode support)
- is fairly stable. It is now possible to have chunks in
- chunks and it is reasonably fast.
- </p>
- <p>
- The major mode than once gave the name to this package
- for web devoloping, nxhtml-mode, has long been stable.
- There are a lot of other minor things in this package.
- Of course everything is not perfect. Bug report and
- taking part in the development is very welcome. Go to
- the project page on Launchpad if you want to join!
- </p>
- <p>
- If you want to know how it works, install and test. It
- will not harm, everything is autoloaded so it will not
- slow down your Emacs - eh, a tiny little bit perhaps if
- you really use it, but then you will also get the
- benefits of it.
- </p>
- <p>
- If you want to know current bug status go to Launchpad!
- </p>
- </dd>
-
- <dt id="hadron-bugs" style="margin-top:1em;">Thanks for testing!</dt>
- <dd>
- <p>
- I want to thanks the testers and bug reporters (who have
- been many now), especially to my first testers Hadron
- Quark and Eric Lilja, for helping me by testing and
- pointing out bugs and weaknesses, most of them related
- to editing of PHP.
- </p>
- <p>
- Without testers all kind of problems I just can't
- imagine myself would still be there in nXhtml. For
- example Hadron told me once that he got the error
- <i>(wrong-type-argument stringp nil)</i>. Eh, I replied, are
- you sure. Yes he was. I tried the same file as him. No
- error.
- </p>
- <p>
- The error happened during fontification so the error
- message above was all we had. A real black box for
- me. Or perhaps black magic? After much confusion and
- some hard work we finally found out what it was and I
- implemented a better way to catch such errors. If Hadron
- would have given up the problem would still have been
- there. Some problems are just impossible to solve
- without good cooperation. So, again, thanks Hadron.
- </p>
- <p>
- BTW, I will perhaps add some even better way to Emacs to
- catch these errors so other can benefit from our
- insights too, but that requires some time and effort
- which I can't afford right now.
- </p>
- <p>
- If is now a bit more easy to take care of errors since
- there is a good bug database for nXhtml at Launchpad.
- </p>
- </dd>
-
- <dt id="underline-bug" style="margin-top:1em;">Long Red Underlines</dt>
- <dd>
- <p>
- Because of a bug in Emacs 22.1 you can sometimes (at the
- end of a line) get long red lines instead of just a
- single underlined character. Many users (me included)
- find this quite a bit disturbing. I have therefore added
- a command to quickly hide/show the underlines. This is
- on <em>C-c C-w</em> (nxhtml-toggle-visible-warnings, key
- binding changed to <em>C-c _</em> in later versions of
- nXhtml).
- </p>
- <p>
- This is particular useful for example in the case where
- you edit a PHP file and are bound to get a lot of XHTML
- validation errors.
- </p>
- </dd>
-
- <dt id="php-attribute-values" style="margin-top:1em;">Attribute values computed by PHP</dt>
- <dd>
- <p>
- If you want to have attribute values computed by PHP
- here is a way how to structure that to avoid breaking
- completion and validation in the XHTML part unnessecary:
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&lt;?php foo(&quot;bar&quot;);?&gt;&quot;/&gt;
- </p>
- <p>
- Unfortunately that still breaks XHTML validation since
- &lt; is not allowed in strings. In the long run I
- believe the XML validator has to be broken up so that it
- avoids parsing the string here (in PHP files).
- </p>
- <p>
- For now I have implemented a workaround.
- If you are using constructs like those above then turn on <em>mumamo-alt-php-tags-mode</em>.
- This will temporarily replace the above with
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;(?php foo(&quot;bar&quot;);?)&quot;/&gt;
- </p>
- <p>
- However on the screen you will still see the original
- string and when writing to file the correct characters
- will be used.
- </p>
- </dd>
-
- <dt id="pi-note" style="margin-top:1em;">A note for PHP and its cousins</dt>
- <dd>
- <p>
- The rules for a process instruction in XML, like &lt;?php
- ... ?&gt; says that the text can contain any text except
- <em>?&gt;</em>. So if you want to output that string
- from PHP then break it up so it does not look as ?&gt; in
- the source file.
- </p>
- <p>
- It might be good to break up the beginning part of the
- process instructions too. And please note that to use
- XHTML validation or completion you should avoid using
- &lt; in strings, since it is not allowed there.
- </p>
- </dd>
-
- <dt id="mmm-compat" style="margin-top:1em;">Why the chunks are not compatible with mmm</dt>
- <dd>
- <p>
- Some people have asked why the way to specify chunks in
- mumamo-mode is not compatible with the old mmm-mode. The
- answer is that I was not sure that the way used in
- mmm-mode for specifying the chunks was flexible enough.
- </p>
- <p>
- Some people have also wondered why MuMaMo does not find
- chunks just as simple as multi-mode does. The answer is
- it did from the beginning. However that way (looking
- around current point) is not stable enough. Multi major
- modes are a bit different in this respect than normal
- major modes. More things can go wrong when you are
- guessing.
- </p>
- </dd>
-
- </dl>
-
- <h1 id="change-history">nXhtml Changes</h1>
-
- <div>
- <a href="#v0.89">v0.89</a>
- <a href="#v0.90">v0.90</a>
- <a href="#v0.91">v0.91</a>
- <a href="#v0.92">v0.92</a>
- <a href="#v0.93">v0.93</a>
- <a href="#v0.94">v0.94</a>
- <a href="#v0.95">v0.95</a>
- <a href="#v0.96">v0.96</a>
- <a href="#v0.97">v0.97</a>
- <a href="#v0.98">v0.98</a>
- <a href="#v0.99">v0.99</a>
- <a href="#v1.00">v1.00</a>
- <a href="#v1.01">v1.01</a>
- <a href="#v1.02">v1.02</a>
- <a href="#v1.03">v1.03</a>
- <a href="#v1.04">v1.04</a>
- <a href="#v1.10">v1.10</a>
- <a href="#v1.11">v1.11</a>
- <a href="#v1.12">v1.12</a>
- <a href="#v1.13">v1.13</a>
- <a href="#v1.14">v1.14</a>
- <a href="#v1.15">v1.15</a>
- <a href="#v1.16">v1.16</a>
- <a href="#v1.17">v1.17</a>
- <a href="#v1.18">v1.18</a>
- <a href="#v1.19">v1.19</a>
- <a href="#v1.20">v1.20</a>
- <a href="#v1.21">v1.21</a>
- <a href="#v1.22">v1.22</a>
- <a href="#v1.23">v1.23</a>
- <a href="#v1.24">v1.24</a>
- <a href="#v1.25">v1.25</a>
- <a href="#v1.26">v1.26</a>
- <a href="#v1.27">v1.27</a>
- <a href="#v1.28">v1.28</a>
- <a href="#v1.29">v1.29</a>
- <a href="#v1.30">v1.30</a>
- <a href="#v1.31">v1.31</a>
- <a href="#v1.32">v1.32</a>
- <a href="#v1.33">v1.33</a>
- <a href="#v1.34">v1.34</a>
- <a href="#v1.35">v1.35</a>
- <a href="#v1.36">v1.36</a>
- <a href="#v1.37">v1.37</a>
- <a href="#v1.38">v1.38</a>
- <a href="#v1.39">v1.39</a>
- <a href="#v1.40">v1.40</a>
- <a href="#v1.41">v1.41</a>
- <a href="#v1.42">v1.42</a>
- <a href="#v1.43">v1.43</a>
- <a href="#v1.44">v1.44</a>
- <a href="#v1.45">v1.45</a>
- <a href="#v1.46">v1.46</a>
- <a href="#v1.47">v1.47</a>
- <a href="#v1.48">v1.48</a>
- <a href="#v1.49">v1.49</a>
- <a href="#v1.50">v1.50</a>
- <a href="#v1.51">v1.51</a>
- <a href="#v1.52">v1.52</a>
- <a href="#v1.53">v1.53</a>
- <a href="#v1.54">v1.54</a>
- <a href="#v1.55">v1.56</a>
- <a href="#v1.56">v1.56</a>
- <a href="#v1.57">v1.57</a>
- <a href="#v1.58">v1.58</a>
- <a href="#v1.59">v1.59</a>
- <a href="#v1.60">v1.60</a>
- <a href="#v1.61">v1.61</a>
- <a href="#v1.62">v1.62</a>
- <a href="#v1.63">v1.63</a>
- <a href="#v1.64">v1.64</a>
- <a href="#v1.65">v1.65</a>
- <a href="#v1.66">v1.66</a>
- <a href="#v1.67">v1.67</a>
- <a href="#v1.68">v1.68</a>
- <a href="#v1.69">v1.69</a>
- <a href="#v1.70">v1.70</a>
- <a href="#v1.71">v1.71</a>
- <a href="#v1.72">v1.72</a>
- <a href="#v1.73">v1.73</a>
- <a href="#v1.74">v1.74</a>
- <a href="#v1.75">v1.75</a>
- <a href="#v1.76">v1.76</a>
- <a href="#v1.77">v1.77</a>
- <a href="#v1.78">v1.78</a>
- <a href="#v1.79">v1.79</a>
- <a href="#v1.80">v1.80</a>
- <a href="#v1.81">v1.81</a>
- <a href="#v1.82">v1.82</a>
- <a href="#v1.83">v1.83</a>
- <a href="#v1.84">v1.84</a>
- <a href="#v1.85">v1.85</a>
- <a href="#v1.86">v1.86</a>
- <a href="#v1.87">v1.87</a>
- <a href="#v1.88">v1.88</a>
- <a href="#v1.89">v1.89</a>
- <a href="#v1.90">v1.90</a>
- <a href="#v1.91">v1.91</a>
- <a href="#v1.92">v1.92</a>
- <a href="#v1.93">v1.93</a>
- <a href="#v1.94">v1.94</a>
- <a href="#v1.95">v1.95</a>
- <a href="#v1.96">v1.96</a>
- <a href="#v1.97">v1.97</a>
- <a href="#v1.98">v1.98</a>
- <a href="#v1.99">v1.99</a>
- <a href="#v2.00">v2.00</a>
- <a href="#v2.01">v2.01</a>
- <a href="#v2.02">v2.02</a>
- <a href="#v2.03">v2.03</a>
- <a href="#v2.04">v2.04</a>
- <a href="#v2.05">v2.05</a>
- <a href="#v2.06">v2.06</a>
- <a href="#v2.07">v2.07</a>
- <a href="#v2.08">v2.08</a>
- </div>
-
- <dl>
- <dt id="v0.89">0.89</dt>
- <dd>
- <ul>
- <li>
- Corrected autostart for nXhtml when not used together with EmacsW32.
- </li>
- </ul>
- </dd>
- <dt id="v0.90">0.90</dt>
- <dd>
- <ul>
- <li>
- Improved display of XML path.
- </li>
- <li>
- Discontinued xmple-mode.
- </li>
- <li>
- New major modes nxhtml-part-mode/nxml-part-mode replaces
- minor mode xmlpe-mode. (While moving the code to
- nxhtml-part.el I also fixed a bug in Xmple minor mode that
- made Emacs take 99% of the CPU.)
- </li>
- </ul>
- </dd>
- <dt id="v0.91">0.91</dt>
- <dd>
- <ul>
- <li>
- Fixed some calls to perl which prevented uploading of
- a site of you did not have perl in the same location
- as me.
- </li>
- <li>
- Glued together things so that editing PHP files works
- as I intended. (This means that Emacs switches between
- php-mode and nxhtml-part-mode automatically when
- moving point. And that you can use completion.)
- </li>
- <li>
- Starting working on the documentation for nXhtml.
- New layout to the documentation files.
- Examples with images.
- </li>
- </ul>
- </dd>
- <dt id="v0.92">0.92</dt>
- <dd>
- <ul>
- <li>
- Fixes to make the switching between php and xhtml
- style editing work better.
- </li>
- </ul>
- </dd>
- <dt id="v0.93">0.93</dt>
- <dd>
- <ul>
- <li>
- Better error handling when switching to editing
- embedded JavaScript and CSS.
- </li>
- <li>
- Removed PHP spec from embedded switching since they
- interfered with the automatic switching between php
- and xhtml.
- </li>
- <li>
- Gives an error message if web host is not defined in
- site when trying to use View Uploaded File and
- cousins.
- </li>
- <li>
- Gives a ready message when finished uploading a single
- file.
- </li>
- <li>
- When using Mode Switching at &lt;? ... ?&gt; mode
- switching could occur in wrong buffer. Fixed together
- with some other buffer problems.
- </li>
- </ul>
- </dd>
- <dt id="v0.94">0.94</dt>
- <dd>
- <ul>
- <li>
- Add http://www.w3.org/ to the help sites for CSS.
- </li>
- <li>
- Included a CSS mode.
- </li>
- <li>
- Added a menu entry for bug reporting.
- </li>
- <li>
- Renamed menu bar entry from XHTML to nXhtml for clarity.
- (But nXml menu bar entry is still called XML.)
- </li>
- <li>
- Added work around for globalized minor modes in the
- cases of MLinks, XML Path and mode switching at &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt id="v0.95">0.95</dt>
- <dd>
- <ul>
- <li>
- Added workaround for the problem with the first
- keyboard key after automatically switching of mode at
- &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt id="v0.96">0.96</dt>
- <dd>
- <ul>
- <li>
- Added support for multiple major modes with mumamo.el.
- </li>
- <li>
- More conventient handling of links. They can now be
- opened in the same window, 'other window' or in a new
- frame.
- </li>
- </ul>
- </dd>
- <dt id="v0.97">0.97</dt>
- <dd>
- <ul>
- <li>
- Schema was not setup after starting new page so
- completion did not work. Fixed.
- </li>
- <li>
- Added http://xhtml.com/ to help sites for XHTML.
- </li>
- <li>
- Added the concept of <em>fictive XML validation
- headers</em>. These are just text parsed by the nXml
- validation parser to get a start state before starting
- parsing a buffer. This allows the use of the nXml
- completion in buffers where there are no XML header.
- Such a header is often lacking for example in PHP code
- since the XHTML header is often generated dynamically.
- </li>
- <li>
- Because of the change above <em>nxhtml-part-mode</em>
- is no longer needed and is therefore declared
- obsolete.
- </li>
- <li>
- Corrected a bug in mlinks.el that prevented opening an
- HTML link in a other window or a new frame.
- </li>
- <li>
- Added support for JSP, eRuby and some support for perl
- in mumamo.el.
- </li>
- </ul>
- </dd>
- <dt id="v0.98">0.98</dt>
- <dd>
- <ul>
- <li>
- Mumamo was not found when nXhtml was installed with
- just the zip file. Corrected. (nXhtml is also
- installed when you install EmacsW32.)
- </li>
- <li>
- Enhancement to mumamo error handling when a bad mode
- specifier for an embedded mode is found.
- </li>
- <li>
- Introduced a bug for empty XHTML documents in
- 0.97. Corrected.
- </li>
- <li>
- Corrected a bug for chunks 1 character long.
- </li>
- <li>
- There is what I consider is a bug in Emacs 22.1 in the
- handling of global minor mode that are not distributed
- with Emacs. If they are turned on by customization,
- but loaded after Emacs have loaded the customizations
- (usually in .emacs) then they are not turned on
- correctly. Added work-around for this.
- </li>
- <li>
- <em>Fictive XHTML Validation Header</em>:
- <ul>
- <li>
- <em>Fictive XHTML Validation Header</em> state was not saved when moving between chunks. Fixed.
- </li>
- <li>
- Tried to make the concept of <em>Fictive XHTML Validation Header</em>
- more clear. Added this visually to the buffer.
- </li>
- <li>
- <em>Fictive XHTML Validation Headers</em> can now be turned on
- automatically based on file name.
- </li>
- </ul>
- </li>
- <li>
- <em>nXhtml menu:</em>
- <ul>
- <li>
- Reorganized the nXhtml menu.
- </li>
- <li>
- Added <em>customization</em> groups for help libraries to nXhtml.
- </li>
- <li>
- Added an entry for customization of nXhtml to the menus.
- </li>
- <li>
- Added <em>Tidy</em> to the menus again.
- </li>
- </ul>
- </li>
- <li>
- Corrected bug in <em>XML Path</em> (nxml-where) for single tags.
- Other small fixes to nxhtml-where.
- </li>
- <li>
- Documentation enhancements.
- Added <em>The Quick Guide</em>.
- </li>
- </ul>
- </dd>
- <dt id="v0.99">0.99</dt>
- <dd>
- <ul>
- <li>
- Fixed a serious bug in the cooperation between nxhtml-mode and mumamo-mode.
- </li>
- <li>
- Turn on mumamo-mode by file name (mumamo-global-mode).
- </li>
- <li>
- Fictive XHTML Validation Header:
- <ul>
- <li>
- The Fictive XHTML Validation Header state were not saved when changing major mode in MuMaMo. Corrected.
- </li>
- <li>
- Added more alternatives to the Fictive XHTML Validation Header list.
- This should make it easier to use completion with for example PHP.
- </li>
- <li>
- Added default value for the Fictive XHTML Validation Header.
- </li>
- <li>
- Tried to make the use of Fictive XHTML Validation Header more automatic and therefore useful.
- Also tried to make it play better with setting schema file.
- (There is no need normally to set schema file by hand.)
- </li>
- <li>
- To turn this on by default customize nxhtml-global-validation-header-mode.
- </li>
- </ul>
- </li>
- <li>
- Possible to hide validation warnings without turning
- on validation (which would make completion in the
- XHTML part impossible).
- </li>
- <li>
- Some fixes to php-mode:
- <ul>
- <li>Using the character # for comments now works for most cases.</li>
- <li>Now uses the fontification faces in a more standard way which calms down the look.</li>
- <li>Initialization bug fixes.</li>
- <li>Renamed php-mode-user-hook to php-mode-hook to follow standard.</li>
- </ul>
- </li>
- <li>
- Indentation fixes:
- <ul>
- <li>
- Various corrections to indentation in mumamo.
- </li>
- <li>
- Added the possibility to use TAB to indent regions
- (indent-region-mode).
- </li>
- <li>
- Warn about bad indentation in mixed PHP/HTML code
- when using php-mode only.
- </li>
- </ul>
- </li>
- <li>
- Fontification now fontifies all text first in main
- major mode and thereafter applies submodes. (This
- avoids some problems with around a submode chunk.)
- </li>
- <li>
- Reorganized the nXhtml menu:
- <ul>
- <li>
- There is now a minor mode for the nXhtml
- menu. This makes it possible to easier use common
- features when in buffers not in nxhtml-mode.
- </li>
- <li>
- The nXhtml menu does not disappear when moving
- into a chunk where the major mode is not
- nxhtml-mode. The changes also makes it easy to
- access uploading functions functions etc from
- other modes than nxhtml-mode since the
- <em>nXhtml</em> may also be shown in them.
- </li>
- <li>
- The nXhtml menu can be turned on globally by default.
- Customize nxhtml-menu-mode for that.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.00">1.00</dt>
- <dd>
- <ul>
- <li>
- Reached version number 1.00 - which you maybe believe
- means the bugs should be gone? Sorry, it is just that
- I ran out of version numbers. However it looks like
- much fewer bugs at least.
- </li>
- <li>
- Fixed problems mostly related to global turn on of different features in nXhtml.
- </li>
- <li>
- Small fixes to indentation.
- <ul>
- <li>
- nxhtml-mode could get confused by php tags.
- </li>
- <li>
- nxhtml-mode did not indent &lt;!DOCTYPE in a sensible way.
- </li>
- <li>
- Electric keys now works in embedded php when using mumamo-mode.
- </li>
- </ul>
- </li>
- <li>
- Tidy was very misbehaving since the output buffer was
- not erased between different files. But I have got no
- bug reports on this.
- </li>
- <li>
- Fixed a bug in validation that should up when using muamo-mode.
- </li>
- <li>
- Fixed bug in &lt;script ...&gt; and &lt;style ...&gt; chunk dividing.
- </li>
- <li>
- Added support for OpenLaszlo.
- </li>
- <li>
- Corrections to mlinks-mode (visible mostly as links in
- XHTML buffers):
- <ul>
- <li>
- Links disappeared when a new file was
- opened. Corrected.
- </li>
- <li>
- Links were not correctly updated at changes in the
- buffer when mumamo-mode was used. Fixed.
- </li>
- </ul>
- </li>
- <li>
- The welcome message for nXhtml could be shown too
- early sometimes when loading, before nXhtml actually
- knew if it should be shown or not. Tried to fix it.
- </li>
- </ul>
- </dd>
- <dt id="v1.01">1.01</dt>
- <dd>
- <ul>
- <li>
- Reported wrong version number for nXhtml in the menus. Fixed.
- </li>
- <li>
- <em>If you use the zip file to install nXhtml please
- notice that it has now a top level nxml.</em> Sorry for not
- having zipped it like that before!
- </li>
- <li>
- The url links in <em>Welcome to nXhtml</em> was a bit
- incorrect and did not work on all OS:es. Fixed.
- </li>
- <li>
- Added customization of popup completion to the 'nxhtml
- customization group so they are easier to find.
- </li>
- <li>
- MuMaMo
- <ul>
- <li>
- Struggled a bit with the load sequences of the elisp
- libraries used by nXhtml when using MuMaMo.
- </li>
- <li>
- Tried to get the global turn on of mumam-mode to work
- in all cases.
- </li>
- <li>
- The screen was blinking when changing overlays after
- changes in the buffer. Tried to fix this.
- </li>
- <li>
- Minor fixes do syntax highlighting, like taking care of single ':s.
- </li>
- <li>
- Fixes to the support for JSP and eRuby.
- </li>
- <li>
- Made the support for perl here documents a bit better.
- Large perl documents are however still quite slow when
- using mumamo-mode. I do not know the reason yet.
- </li>
- <li>
- Refontification could miss some parts when buffer
- changes caused chunk division changes. Complex,
- tried to fix it, but I am a bit unsure that it
- always works.
- </li>
- <li>
- Cleaned up mumamo.el a bit.
- </li>
- <li>
- Rewrote mumamo-test.el and functions called from it in
- mumamo.el a bit to make tracebacks from errors more
- useful. Changed keybindings in mumamo-test.el from
- global to a minor mode <em>mumamo-test-mode</em>.
- Renamed mumamo-notest.el to mumamo-test.el. Added it
- to the zipped distribution of nXhtml.
- </li>
- </ul>
- </li>
- <li>
- Fixed a bug related to links and buffer changes.
- </li>
- </ul>
- </dd>
- <dt id="v1.02">1.02</dt>
- <dd>
- <ul>
- <li>
- Fixed a refontification bug that occured after changes.
- </li>
- </ul>
- </dd>
- <dt id="v1.03">1.03</dt>
- <dd>
- <ul>
- <li>
- Added the possibility to call GIMP.
- </li>
- <li>
- Reworked the messages for fontification errors to try
- to catch an error that shows up sometimes. Tried to
- avoid disturbing normal use in spite of that error.
- </li>
- <li>
- Reverted to using a short delay before switching major
- mode when moving between buffers.
- </li>
- </ul>
- </dd>
- <dt id="v1.04">1.04</dt>
- <dd id="v1.04-dd">
- <ul>
- <li>
- Enhanced the documentation for nXhtml. Starting from
- <i>C-h f nxhtml-mode</i> it should now be easier to
- get an overview.
- </li>
- <li>
- Bug fixes etc:
- <ul id="v1.04-bugs">
- <li>
- Completion on an empty page gave a faulty frameset page. Fixed.
- </li>
- <li>
- Insert end tag did not work with a fictive
- validation header. Fixed.
- </li>
- <li>
- Insert end tag when all preceding tags where
- closed gave a strange error message. Fixed.
- </li>
- <li>
- Changed some key bindings to comply with
- <i>(info "(elisp) Key Binding Conventions")</i>
- </li>
- <li>
- Completion in empty buffers with a completion
- header did not work. Fixed.
- </li>
- <li id="mumamo-bugs">
- Multiple major modes:
- <ul>
- <li>
- Fixed a bug that prevented mumamo-global-mode from
- beeing turned on in a file opened in
- fundamental-mode.
- </li>
- <li>
- Better error tracing for some functions,
- including the call of major mode functions.
- </li>
- <li>
- Position was garbled when a ;-char was inserted in php-mode chunk. Fixed.
- </li>
- <li>
- A bad check for if mlinks-mode where available was fixed.
- </li>
- <li>
- Some bugs concerning turning off mumamo-mode was fixed.
- </li>
- <li>
- Fixed a bug in <i>perl here doc</i> chunks. Suddenly the
- problem with slowness when using mumamo-mode in
- perl buffers seems gone. (Note quite sure, but I
- can't see any problems now.)
- </li>
- <li>
- Fixed a bug in mumamo-mode when current buffer was
- switched before the major mode had been set from
- the current chunk.
- </li>
- <li>
- Fixed a long standing bug in php fontification of
- strings and comments.
- </li>
- <li>
- Fixed a bug where <i>sgml-xml-mode</i> was not defined.
- </li>
- <li>
- Fixed a bug related to get-text-property which
- gives an error when buffer is narrowed.
- </li>
- <li>
- Tried to refontify things outside of a narrowed part. Fixed.
- </li>
- <li>
- Too little where refontified after changes. I hope I have fixed this.
- </li>
- </ul>
- </li>
- <li>
- Fictive XHTML Validation Header:
- <ul id="v1.04-fic-bugs">
- <li>
- View File did not work correctly when a fictive
- XHTML validation header was used. Corrected.
- </li>
- <li>
- Fictive XHTML validation headers are no longer
- turned on by default in any buffers.
- </li>
- </ul>
- </li>
- <li>
- Indentation:
- <ul>
- <li>
- Tried to fix a problem when using
- newline-and-indent. When this was in a mode
- derived from C the indentation sometimes became 0.
- </li>
- <li>
- Speeded up the indentation of regions a bit when
- using <i>mumamo-mode</i>.
- </li>
- <li>
- Indentation: TAB now only indents a region if it
- is visibly marked (see transient-mark-mode and
- cua-mode).
- </li>
- <li>
- Simplified the indentation code.
- </li>
- </ul>
- </li>
- <li>
- Fixed a problem where string fontification got out
- of phase so that wrong parts of buffer could be
- fontified as a string.
- </li>
- <li>
- Added a workaround for <a
- href="#php-attribute-values">Attribute values
- computed by PHP</a>
- </li>
- <li>
- Added .nosearch to subdirectories with no elisp files.
- </li>
- <li>
- Fixed incorrect checks for mlinks-mode in menu building.
- </li>
- <li>
- File extensions where used in a case sensitive way
- in some places. Fixed.
- </li>
- <li>
- appmenu: Worked only in html files. Fixed.
- </li>
- <li>
- html-site: Fixed the error <em>Error
- (html-site-current): Can't find site:
- your-site-name</em>.
- </li>
- <li>
- Fixed a problem with longlines-mode in the support
- for Firefox add-on It's All Text. (Note however
- that there are some bugs in longlines-mode
- itself.) Rewrote the support to be more
- general. It is now in the file as-external.el, see
- this file.
- </li>
- <li>
- Fixed an encoding problem in
- <i>tidy-buffer</i>. Output from tidy was not read
- using the same coding system as tidy was using.
- </li>
- <li>
- Fixed some problems with face definitions, possibly bugs (not sure).
- </li>
- <li>
- Made the fontification faster when using mumamo-mode.
- (It is still slower than single mode fontification of course.)
- </li>
- <li>
- nxml-where.el: Made it aware of mumamo.el.
- </li>
- </ul>
- </li>
- <li>
- Menu changes:
- <ul>
- <li>
- Completion menu: Renamed to <i>Completion and
- Validation</i> menu and reorganized a little bit to
- make it more clear.
- </li>
- <li>
- Renamed <i>view</i> to <i>browse</i> since this is
- the normal emacs name for showing files in a web
- browser. Also made corresponding changes to
- function names. Put back the possibility to view
- only the region in a web browser.
- </li>
- </ul>
- </li>
- <li>
- Uploading:
- <ul>
- <li>
- Added remote dired to the menus.
- </li>
- <li>
- Fixed problems with file names starting with ~.
- </li>
- <li>
- Fixed more problems with file names with spaces.
- </li>
- </ul>
- </li>
- <li>
- nxml-where:
- <ul>
- <li>
- nxml-where now uses a timeout for more smooth performance.
- </li>
- <li>
- nxml-where can now recognizes both id and name attribute.
- </li>
- <li>
- Hyphens are now accepted in tag names.
- </li>
- </ul>
- </li>
- <li>
- Ruby
- <ul>
- <li>
- Multiple major mode turned on by default for .rhtml files when this mode is global.
- </li>
- <li>
- Multiple major mode is no longer turned on when rub-mode is turned on.
- </li>
- </ul>
- </li>
- <li>
- Added support for switching major mode dependent on if
- Emacs was called as an external editor. This makes it
- possible for example to switch to relevant major and
- minor modes when Firefox add-on It's All Text.
- </li>
- <li>
- Added the possibility to easily view the output of scripts on the server (if they require no parameters).
- You can now do that from the nXhtml menu.
- Previously only html files on the server could be viewed that way.
- Image files can also be viewed this way.
- </li>
- <li>
- Filling:
- <ul>
- <li>
- Added functions for unfilling.
- </li>
- <li>
- Added keybindings and menu entries for longlines-mode, fill-paragraph and unfill-paragraph.
- </li>
- </ul>
- </li>
- <li>
- Quoting:
- Added HTML quoting of &amp; and &lt; in text areas. Bound to C-c C-q.
- </li>
- <li>
- Images:
- <ul>
- <li>
- Added image-mode to those that are encompassed by nxhtml-global-minor-mode so that images can be uploaded more easily.
- </li>
- <li>
- Added <em>edit with GIMP</em> and <em>upload</em> to the popup menu for links.
- This avoids the need to load the linked files in Emacs first.
- </li>
- </ul>
- </li>
- <li>
- Added <em>nxml-untag-element</em>.
- </li>
- <li>
- Added a modified version of wikipedia-mode.el. Seems likely to be useful if you are doing web editing.
- </li>
- <li>
- Added html-imenu.el
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Removed the lighter <i>"MuMaMo"</i> for
- mumamo-mode. Instead the active major mode now has
- <b>"/m"</b> appended to mode-name (that is what you see
- in the mode line).
- </li>
- <li>
- The normal way to turn on <i>mumamo-mode</i> has
- changed. There are now functions that you can use
- in <i>auto-mode-alist</i> to directly set up the
- buffer for mumamo-mode. The available functions
- are in the
- variable <i>mumamo-defined-turn-on-functions</i>.
- <p>
- You are not supposed to call mumamo-mode
- yourself any more and mumamo-global-mode is
- gone. So is also mumamo-chunk-family-by-mode and
- mumamo-filenames-list. The functionality those
- gave are all replaced by the new functions for
- turning on mumamo mode.
- </p>
- </li>
- <li>
- Added support for buffer local values in
- hooks. This is necessary for example to support
- minor modes that are meant to be buffer local but
- not major mode specific. Instructions for authors
- of this kind of minor modes are in the file
- mumamo.el.
- </li>
- <li>
- Added support for Django.
- </li>
- <li>
- Added support for Embperl.
- </li>
- <li>
- Added support for PHP Smarty. The <i>{literal}
- ... {/literal}</i> construct is not supported.
- This mean that you can not use &lt;style ..&gt; or &lt;script ..&gt;.
- </li>
- <li>
- Added support for imenu for the main major mode.
- Turned on this by default in nxhtml-mode.
- </li>
- <li>
- Made the temporary replacement of the
- attr="&lt;?php ... ?&gt;" a bit better. They are
- now more visible and also still mumamo chunks
- during the temporary replacement.
- </li>
- <li>
- Added support for <i>flymake-mode</i>.
- Maybe add support for checking chunks?
- </li>
- <li>
- Printing: Added htmlfontify.el and
- hfyview.el. These makes if possible to print a
- buffer fontified with <i>mumamo-mode</i> on in
- colors (through your web browser). There is an
- example of the capabilities of htmlfontify <a
- href="htmlfontify-example.html">here</a> (made
- with a little function in hfyview.el).
- </li>
- </ul>
- </li>
- <li>
- PHP:
- <ul>
- <li>
- Did a first merge with Aaron Hawleys fixes for php-mode.el.
- </li>
- </ul>
- </li>
- <li>
- CSS: Upgraded to Stefan's latest css-mode.el.
- </li>
- <li>
- Fictive XHTML Validation Headers: Changed the way they
- are turned on. They may now be turned on when
- mumamo-mode is turned on.
- </li>
- <li>
- Some users want to use their own patched version of nXml. Next version of Emacs will come with nXml. Therefore, the loading routine for nXhtml now checks if nXml is is already loaded. Thanks to Eric Lilja for testing this. Eric also made me aware of that if nXhtml was placed in the site-lisp directory tree then things did not work as I expected. I think I have corrected that by placing a <i>.nosearch</i> file at the top of the nxml tree in nXhtml.
- </li>
- <li>
- Restructured the directories. Moved some files out of
- the <i>nxhtml</i> subdir. Some of them went into the
- <i>util</i> subdir (those are written by me) and some
- to the new subdir <i>related</i> (those that are
- inherited from others, maybe changed by me - most
- often to work with mumamo-mode).
- </li>
- <li>
- Changed all licenses to be GNU GPL.
- </li>
- <li>
- Additions to tidy support: It is now possible to use
- the tidy support to tidy the XHTML part of php etc.
- (Thanks to Hadron for this suggestion.)
- </li>
- <li>
- Added <i>winsize.el</i> which allows interactive resizing of
- windows. Also added <i>winsav.el</i> which adds the
- capability to rotate window configurations and also to
- save window configuration to file.
- </li>
- <li>
- Made nXhtml work with CVS Emacs 23.0.50.1.
- </li>
- <li>
- Added freemind.el to the parcel. After all FreeMind
- supports web publishing too so why not have the Emacs
- support here ...
- </li>
- </ul>
- </dd>
- <dt id="v1.10">1.10</dt>
- <dd id="v1.10-dd">
- Just jumped the version number for the new release of
- nXhtml. There are really significant changes in this
- release, not only minor bug fixes.
- </dd>
- <dt id="v1.11">1.11</dt>
- <dd id="v1.11-dd">
- Minor bug fixes to completion. Added fictive validation
- header to completion alternatives when buffer is empty and
- mumamo is used.
- </dd>
- <dt id="v1.12">1.12</dt>
- <dd id="v1.12-dd">
- <ul>
- <li>
- Fixed a bug in image link insertion in nxhtml-mode, thanks Niels Giesen!
- </li>
- <li>
- Restructured, reordered and documented mumamo.el. It is now two
- separate files, mumamo.el and mumamo-fun.el.
- </li>
- <li>
- Added move by chunk to the nXhtml menu.
- </li>
- </ul>
- </dd>
- <dt id="v1.13">1.13</dt>
- <dd id="v1.13-dd">
- <ul>
- <li>
- Better handling of the case when no validation header
- is needed and the user tries to turn it on.
- </li>
- <li>
- Added .phtml as php file.
- </li>
- </ul>
- </dd>
- <dt id="v1.14">1.14</dt>
- <dd id="v1.14-dd">
- <ul>
- <li>
- Completion of links in XHTML was broken. Fixed, thanks
- to Niels Giesen.
- </li>
- </ul>
- </dd>
- <dt id="v1.15">1.15</dt>
- <dd id="v1.15-dd">
- <ul>
- <li>
- Added `mumamo-map' keymap.
- </li>
- <li>
- Added a keymap to all multi major modes.
- </li>
- <li>
- Some more refinement to fictive validation headers.
- </li>
- </ul>
- </dd>
- <dt id="v1.16">1.16</dt>
- <dd id="v1.16-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Changes to indentation:
- <ul>
- <li>
- Removed indent-region-mode since that
- functionality is now in indent-for-tab-command in
- Emacs 22.
- </li>
- <li>
- Removed some code that checked if indentation was 0.
- </li>
- <li>
- Added indent-for-tab-command to mumamo-map.
- </li>
- </ul>
- </li>
- <li>
- Reordering and renaming:
- <ul>
- <li>
- Reordered and move some functions in mumamo.el et al.
- Added new file nxhtml-mumamo.el.
- </li>
- <li>
- Renamed <i>define-mumamo-turn-on</i> to
- <i>define-mumamo-multi-major-mode</i>.
- </li>
- <li>
- Removed the ending <i>-turn-on</i> from the
- functions defined by the macro above.
- </li>
- <li>
- Introduced <i>multi major mode</i> as a name for
- the functions defined by the macro above. Those
- works in many respects like major mode functions,
- but they support multiple major modes in a buffer.
- </li>
- </ul>
- </li>
- <li>
- Added support for noweb as multiple major mode.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.17">1.17</dt>
- <dd id="v1.17-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support for flyspell.
- </li>
- </ul>
- </li>
- <li>
- Bug fixes to the version of find-recursive.el that
- ships with nXhtml. Thanks to Cezar Halmagean.
- </li>
- <li>
- Added tabkey2.el which tries to make it easy to use
- the Tab key for completion. (You must load it and turn
- on tabkey2-mode to use it.)
- </li>
- <li>
- Folding:
- <ul>
- <li>
- Added <i>nxhtml-heading-element-name-regexp</i> as
- default for nxml style folding.
- </li>
- <li>
- Some changes to fold-dwim.el.
- </li>
- </ul>
- </li>
- <li>
- AppMenu:
- <ul>
- <li>
- Simplified: Removed the possibility to
- automatically show minor and major mode menus.
- There is now only one list, <i>appmenu-alist</i>.
- </li>
- <li>
- Added menu item <i>At Current Point</i> for
- bindings found in character and overlay keymaps at
- point. Those you always forget.
- </li>
- </ul>
- </li>
- <li>
- Physical line:
- <ul>
- <li>
- Added physical-line.el to nXhtml.
- </li>
- <li>
- Added new functions to move to beginning and end
- of line to ourcomments-util.el that supports
- physical-line.el.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.18">1.18</dt>
- <dd id="v1.18-dd">
- <ul>
- <li>
- Better Tab completion in tabkey2.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.19">1.19</dt>
- <dd id="v1.19-dd">
- <ul>
- <li>
- Even better Tab completion in tabkey2.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.20">1.20</dt>
- <dd id="v1.20-dd">
- <ul>
- <li>
- Once again even better Tab completion in tabkey2.el.
- </li>
- <li>
- Fixed bug in hiding of validation errors (they could
- disappear totally).
- </li>
- <li>
- Cleaned up menus in nXhtml.
- </li>
- </ul>
- </dd>
- <dt id="v1.21">1.21</dt>
- <dd id="v1.21-dd">
- <ul>
- <li>
- Added a bit support for dired (upload, browse, browse
- remote).
- </li>
- <li>
- Fixed some strange menu problems (i hope).
- </li>
- </ul>
- </dd>
- <dt id="v1.22">1.22</dt>
- <dd id="v1.22-dd">
- <ul>
- <li>
- Bug fix.
- </li>
- </ul>
- </dd>
- <dt id="v1.23">1.23</dt>
- <dd id="v1.23-dd">
- <ul>
- <li>
- Bug fix.
- </li>
- </ul>
- </dd>
- <dt id="v1.24">1.24</dt>
- <dd id="v1.24-dd">
- <ul>
- <li>
- Tried again to make hexcolor-mode more readable.
- </li>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support for <i>hi-lock-mode</i>. At present
- it might however be very puzzling. The hilight
- added by hi-lock-mode may be hidden by the
- overlays used by mumamo. Tip: you can always use
- the face <span
- style="font-size:1.5em;">hi-black-hb</span>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.25">1.25</dt>
- <dd id="v1.25-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Handle hi-lock-mode in a more general way
- using <i>font-lock-mode-hook</i>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.26">1.26</dt>
- <dd id="v1.26-dd">
- <ul>
- <li>
- nxhtml-mode:
- <ul>
- <li>
- Removed the indent line patch for nxml-mode.
- </li>
- <li>
- Better test for empty page during completion.
- </li>
- </ul>
- </li>
- <li>
- tabkey2-mode:
- <ul>
- <li>
- A lot of improvements.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.27">1.27</dt>
- <dd id="v1.27-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Worked with bugs in mumamo.el that was due to bad
- handling of syntax-ppss et el. Looks like most of
- them are fixed.
- </li>
- <li>
- Fixed documentation and reordered code in mumamo.el and mumamo-fun.el.
- </li>
- <li>
- Changed javascript.el indentation to make it work with
- mumamo.el.
- </li>
- <li>
- Introduced the function <i>mumamo-make-variable-buffer-permanent</i> as an aid for minor mode authors.
- </li>
- <li>
- Fixed quite a few indentation bugs.
- There was one bug that could make Emacs loop after indentation.
- </li>
- </ul>
- </li>
- <li>
- nxml-where, mlinks
- <ul>
- <li>
- Fixed bugs with left over idle timers when buffer
- had been killed (nxml-where.el, mlinks.el).
- </li>
- </ul>
- </li>
- <li>
- html-site
- <ul>
- <li>
- Fixed a bug in html-site when comparing file
- names. File names where not made unique before
- comparision.
- </li>
- </ul>
- </li>
- <li>
- Tabkey2
- <ul>
- <li>
- Fixed tabkey2 bugs.
- </li>
- </ul>
- </li>
- <li>
- freemind.el
- <ul>
- <li>
- Fixed a problem in freemind-to-org-mode that
- caused the error "wrong-type-argument string: nil"
- in string-match("\\(?:^--org-mode: WHOLE FILE$\\)"
- nil).
- </li>
- </ul>
- </li>
- <li>
- Made nXhtml menu available in sub-chunks.
- </li>
- <li>
- Included a slightly changed version of Steve Yegge's js2.el + js2-fl-mode.el from 2008-04-24 with support for jit-lock-mode. This support has some flaws and maybe js2 is not ready for use, I am not sure. However if you want to use this instead of Karl Landströms javascript-mode then please customize <i>mumamo-major-modes</i>.
- </li>
- </ul>
- </dd>
- <dt id="v1.28">1.28</dt>
- <dd id="v1.28-dd">
- <ul>
- <li>
- New version with mostly minor bug fixes from 1.27.
- Unfortunately I put out 1.27 a bit too early.
- Please upgrade.
- </li>
- </ul>
- </dd>
- <dt id="v1.29">1.29</dt>
- <dd id="v1.29-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- Fixed a bug causing emacs to loop when &lt;?&gt;
- was encountered in an html style buffer.
- </li>
- <li>
- Fixed some problems with &lt;? and ?&gt; in
- strings in html style buffers.
- </li>
- <li>
- Tried to avoid chunk dividers in strings and comments. (There are still some bugs there.)
- </li>
- <li>
- Fixed an error that prevented byte compiling nxhtml-mumamo.el.
- (Thanks Christoph Conrad.)
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.30">1.30</dt>
- <dd id="v1.30-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support to handle specific rng
- schemacs. With the help of this Genshi and MJT
- templating languages are now handled.
- </li>
- <li>
- Let the rng schema file name survive mumamo major
- mode changes.
- </li>
- <li>
- Added support for to let nxml-mode skip chunks it
- can not parse. (This requires a patch to
- rng-valid.el too which is not included, but which
- I hope can go into Emacs soon.)
- </li>
- <li>
- Chunk dividers can now be a part on their own. (Ie
- there will be no parsing or syntax highlighting of
- them by the chunk major mode. This is optional and
- specified for each chunk types.)
- </li>
- <li>
- Added support for Genshi and MJT. These multi
- major modes support completion and error checking
- in the XML/XHTML part according to their DTD
- (which has some additions to the XHTML DTD).
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.31">1.31</dt>
- <dd id="v1.31-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed a bug that caused multi major modes to loop sometimes.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.32">1.32</dt>
- <dd id="v1.32-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed a bug in syntax-ppss advice.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.33">1.33</dt>
- <dd id="v1.33-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed another bug in syntax-ppss advice.
- </li>
- <li>
- Added support for <i>fill-forward-paragraph-function</i>.
- </li>
- <li>
- Made <i>longlines-mode</i> survive major mode changes in mumamo buffers.
- </li>
- <li>
- Fixed a bug that made Emacs loop when it found
- &lt;??&gt; in for example nxhtml-mumamo.
- </li>
- <li>
- Made it usable with Emacs 22 again.
- </li>
- <li>
- Moved some changes from rng-valid.el to
- mumamo.el. This makes it possible to let nxml-mode
- (and derivates) jump over parts when parsing the
- buffer even if not using the patched version of
- Emacs+EmacsW32.
- </li>
- </ul>
- </li>
- <li>
- nxhtml:
- <ul>
- <li>
- Added command to add CSS rollover images.
- </li>
- </ul>
- </li>
- <li>
- mlinks:
- <ul>
- <li>
- Tried to fix the error <i>invalid-read-syntax &quot;]
- in a list&quot;</i> when loading <i>mlinks.el</i>
- reported by some Asian users.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.34">1.34</dt>
- <dd id="v1.34-dd">
- <ul>
- <li>
- <span style="font-size: 1.2em; color: red ()"
- >Changed top directory name from nxml to nxhtml</span>
- <p>
- This will of course case some problems if you do not
- notice it when you upgrade nXhtml. If you are using
- EmacsW32 and upgrade nXhtml you should change the
- file <i>emacsw32.el</i>.
- </p>
- <p>
- The reason for this change is that nXml will soon
- normally not be part of nXhtml so keeping the old
- top directory name would be confusing.
- </p>
- </li>
- <li>
- Added a test suite. See the file <i>nxml/tests/test-Q.el</i>.
- </li>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed indentation when the whole line is a sub chunk.
- </li>
- <li>
- Tried a bit more to stop nxml from parsing non-xml
- mode chunks. Because of this php support was
- changed a bit (for the better I hope).
- </li>
- </ul>
- </li>
- <li>
- GIMP:
- <ul>
- <li>
- Registry value location for GIMP had changed.
- </li>
- </ul>
- </li>
- <li>
- nXhtml:
- <ul>
- <li>
- Added support for <a href="http://hyperstruct.net/projects/mozlab">MozLab</a>. If you install MozLab in Firefox then you can directly use it from javascript mode without any additional setup.
- </li>
- <li>
- Added <a href="http://www.oak.homeunix.org/~marcel/blog/articles/2008/07/18/nested-imenu-for-php">php-imenu.el</a>.
- </li>
- <li>
- Fixed a bug where I inadvertently
- added <i>../../lisp</i> to load-path.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.35">1.35</dt>
- <dd id="v1.35-dd">
- <ul>
- <li>
- Fixed a small bug in sex-mode.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.36">1.36</dt>
- <dd id="v1.36-dd">
- <ul>
- <li>
- Added the function <i>emacs-Q-nxhtml</i> for easier
- testing. It does the equivalent of <i>emacs -Q --load
- PATH-TO/nxhtml/autostart.el</i>.
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Forgot to return php-mode in php short tags. Fixed.
- </li>
- <li>
- Borders where not correctly calculated with php short tags. Fixed.
- </li>
- <li>
- Subchunks not parseable by nxml-mode where marked as parseable. Fixed.
- </li>
- <li>
- Debug messages from mumamo where not silenced.
- </li>
- <li>
- Forgot font-lock-syntactic-keywords. This showed up in
- bad fontification for strings sometimes. Fixed.
- </li>
- <li>
- To fontify keywords font-lock-syntactically-fontified
- must be set in each chunk. Fixed.
- </li>
- <li>
- Find a way to at least temporarily work around the
- problem with the last &quote; char in
- syntax=&quote;...&quote; that could be seen in
- large XHTML files, for example this file. The
- drawback with the work around is that it bypasses
- the cache for syntax-ppss, but this happens only
- in multi major mode buffers and I notice no
- performance problems here.
- </li>
- <li>
- Fixed a number of problems with the defadvice for the syntax functions.
- (I am afraid there are more left.)
- </li>
- <li>
- Took a new grab on the indentation problems.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.37">1.37</dt>
- <dd id="v1.37-dd">
- <ul>
- <li>
- The command <i>emacs-Q-nxhtml</i> and cousins did not
- work on all platform. Tried to fix it.
- </li>
- <li>
- Got a report that editing Django was to slow. Tried to fix this.
- </li>
- <li>
- Added a test to the unit test suite that test
- scrolling and jumping.
- </li>
- </ul>
- </dd>
- <dt id="v1.38">1.38</dt>
- <dd id="v1.38-dd">
- <ul>
- <li>
- Added a workaround that removes validation error marking in non-xhtml chunks.
- </li>
- </ul>
- </dd>
- <dt id="v1.39">1.39</dt>
- <dd id="v1.39-dd">
- <ul>
- <li>
- Multi major modes where not allowed in defcustoms
- nxhtml-magic-mode-alist and
- nxhtml-auto-mode-alist. Fixed.
- </li>
- <li>
- Added tests for the use of the lists above.
- </li>
- <li>
- Fixed some bugs that could make a buffer became
- modified due to mumamo fontification actions.
- </li>
- <li>
- The rnc files for mjt and genshi had include path that
- did not work if you where using the nxml-mode that
- comes with nXhtml. Fixed. (Thanks for pointing this
- out, Bryan.)
- </li>
- <li>
- Now trying to keep the launchpad bazaar repository in
- sync.
- </li>
- </ul>
- </dd>
- <dt id="v1.40">1.40</dt>
- <dd id="v1.40-dd">
- <ul>
- <li>
- tabkey2-mode
- <ul>
- <li>
- Some small changes: support for eshell
- and better information about completion commands
- alternative key bindings.
- </li>
- </ul>
- </li>
- <li>
- php-mode
- <ul>
- <li>
- It turned out that my patched php-mode asked in
- every buffer to turn on mumamo. Changed it to
- once for every Emacs invocation instead.
- </li>
- <li>
- In addition to this it did not turn on mumamo
- multi major support if the user wanted it ;-)
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.41">1.41</dt>
- <dd id="v1.41-dd">
- <ul>
- <li>
- There was an error that prevented loading of nXhtml
- with Emacs 22. (This was before opening any file.)
- </li>
- <li>
- Fixed a problem in startup order for ido-mode and nXhtml.
- (This could lead to that ido-mode was reset from 'both to 'buffer.)
- </li>
- </ul>
- </dd>
- <dt id="v1.42">1.42</dt>
- <dd id="v1.42-dd">
- <ul>
- <li>
- Fixed a bug concerning style=&quote;...&quote; and similar constructs.
- </li>
- </ul>
- </dd>
- <dt id="v1.43">1.43</dt>
- <dd id="v1.43-dd">
- <ul>
- <li>
- Added file ffip.el for finding files in projects.
- </li>
- <li>
- Added command <i>html-site-find-file</i>.
- </li>
- <li>
- Added aliases for all multi major modes.
- The alias looks like <i>mumamo-alias-MULTI_MAJOR_MODE</i>.
- Their purpose is to make it easier to find a multi major mode.
- </li>
- <li>
- Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/258169">https://bugs.launchpad.net/nxhtml/+bug/258169</a>.
- </li>
- </ul>
- </dd>
- <dt id="v1.44">1.44</dt>
- <dd id="v1.44-dd">
- <ul>
- <li>
- Fixed an error in chunk dividing.
- </li>
- <li>
- Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/258097">https://bugs.launchpad.net/nxhtml/+bug/258097</a>.
- </li>
- </ul>
- </dd>
- <dt id="v1.45">1.45</dt>
- <dd id="v1.45-dd">
- <ul>
- <li>
- Fixed bug reporting instructions to point to Launchpad.
- </li>
- </ul>
- </dd>
- <dt id="v1.46">1.46</dt>
- <dd id="v1.46-dd">
- <ul>
- <li>
- Cleaned up and fixed bugs in the help routines.
- </li>
- </ul>
- </dd>
- <dt id="v1.47">1.47</dt>
- <dd id="v1.47-dd">
- <ul>
- <li>
- Made tabkey2-mode aware of this-command.
- </li>
- </ul>
- </dd>
- <dt id="v1.48">1.48</dt>
- <dd id="v1.48-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- Added jde-mode as first choice if major mode file spec is java-mode.
- </li>
- <li>
- Fixed a bug concerning buffer local variables saving.
- </li>
- <li>
- Fixed a bug that occured when autoloading major mode failed.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.49">1.49</dt>
- <dd id="v1.49-dd">
- <ul>
- <li>
- Added a CEDET loader which can fetch CVS version of CEDET.
- </li>
- </ul>
- </dd>
- <dt id="v1.50">1.50</dt>
- <dd id="v1.50-dd">
- <ul>
- <li>
- Added a Rinari loader which can fetch SVN version of Rinari and ruby-mode.
- </li>
- </ul>
- </dd>
- <dt id="v1.51">1.51</dt>
- <dd id="v1.51-dd">
- <ul>
- <li>
- Fixed a regression bug in MuMaMo. If a major mode was
- not defined Emacs could hang badly.
- </li>
- <li>
- Added an ECB loader which can fetch CVS version of ECB.
- </li>
- <li>
- Enhancements to the routines for fetching and setting
- up CEDET, ECT and Rinari.
- </li>
- </ul>
- </dd>
- <dt id="v1.52">1.52</dt>
- <dd id="v1.52-dd">
- <ul>
- <li>
- Added a tool to give major modes priority when
- choosing a major mode for a buffer.
- </li>
- </ul>
- </dd>
- <dt id="v1.53">1.53</dt>
- <dd id="v1.53-dd">
- <ul>
- <li>
- Quick fix for left-over which made it impossible to
- edit php files in version 1.52. If you are using
- version 1.52 you may for the moment just add (require
- 'fmode) to your .emacs after loading nXhtml.
- </li>
- </ul>
- </dd>
- <dt id="v1.54">1.54</dt>
- <dd id="v1.54-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- Added better error handling for problems such as
- those that occured in version 1.52 with php-mode.
- </li>
- <li>
- There was a bug when changing from a mumamo multi
- major mode.
- </li>
- <li>
- Tried to fix <a href="https://answers.launchpad.net/nxhtml/+question/43320">question 43320</a>.
- </li>
- </ul>
- </li>
- <li>
- php-mode:
- <ul>
- <li>
- Made the indentation check up to date with current
- MuMaMo.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.55">1.55</dt>
- <dd id="v1.55-dd">
- <ul>
- <li>
- Tried to fix https://answers.launchpad.net/nxhtml/+question/43320 again.
- </li>
- <li>
- Better test of when to end tabkey2-mode completion function state.
- </li>
- </ul>
- </dd>
- <dt id="v1.56">1.56</dt>
- <dd id="v1.56-dd">
- <ul>
- <li>
- Allowed both single and double quotes in mlinks for html files.
- </li>
- <li>
- Added initial support for Mako template language.
- (There is no support for the tags yet, like in
- Genshi. Additions are welcome!)
- </li>
- </ul>
- </dd>
- <dt id="v1.57">1.57</dt>
- <dd id="v1.57-dd">
- <ul>
- <li>
- Fixed another part of question 43320 (see above) regarding php indentation.
- </li>
- </ul>
- </dd>
- <dt id="v1.58">1.58</dt>
- <dd id="v1.58-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- The change of major mode when moving between
- chunks could occur in the wrong buffer because I
- had misunderstood how with-selected-window
- works. Fixed.
- </li>
- <li>
- Added ${...} python chunks to Mako (ie mako-html-mumamo).
- </li>
- <li>
- Added mako-nxhtml-mumamo.
- </li>
- </ul>
- </li>
- <li>
- Appmenu:
- <ul>
- <li>
- Fixed problem with point keymap.
- </li>
- </ul>
- </li>
- <li>
- Php:
- <ul>
- <li>
- Fixed <a href="https://answers.launchpad.net/nxhtml/+question/44504">https://answers.launchpad.net/nxhtml/+question/44504</a>.
- </li>
- <li>
- Fixed a typo regarding indentation check.
- </li>
- </ul>
- </li>
- <li>
- Tabkey2:
- <ul>
- <li>
- Better support for YASnippet.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.59">1.59</dt>
- <dd id="v1.59-dd">
- <ul>
- <li>
- Fixed a bug that was revealed by the better support for YASnippet.
- </li>
- </ul>
- </dd>
- <dt id="v1.60">1.60</dt>
- <dd id="v1.60-dd">
- <ul>
- <li>
- Bug fixes:
- <ul>
- <li>
- Fix some bugs in Tidy XHTML support.
- </li>
- <li>
- Also Some small improvements to Tidy GUI.
- </li>
- <li>
- Added a test case for bug
- https://bugs.launchpad.net/nxhtml/+bug/271497 (which I
- can't reproduce).
- </li>
- <li>
- Bug fixes to ffip.el
- </li>
- <li>
- Added fix for <a href="http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1013"
- >Emacs bug 1013</a>.
- </li>
- <li>
- Fixed some minor bugs in as-external.el.
- </li>
- <li>
- New handling of minor modes (buffer local variables).
- I hope this should fix the problem reported in
- <a href="https://bugs.launchpad.net/bugs/272526">nXhtml bug 272526: Imenu on menubar doesn't work after switching modes</a>.
- </li>
- <li>
- Fixed a bug that could make buffer marked as modified
- during fontification.
- </li>
- <li>
- Changed <i>php-mode</i> binding for TAB to follow Emacs normal standard.
- </li>
- <li>
- Fixed a bug that sometimes caused rng-validate-mode to be
- turned on in wrong buffer when setting xhtml fictive
- validation header.
- </li>
- </ul>
- </li>
- <li>
- Finished a replacement for the usual help command on
- [f1 ?c]. This will in addition to the command show the
- keymap. To use it add
- <i>(global-set-key [f1 ?c] 'find-keymap-binding-key)</i> to your .emacs.
- </li>
- <li>
- Let tabkey2-mode first look for [tab] and then [?\t].
- </li>
- <li>
- Added an <a href="http://ourcomments.org/Emacs/nXhtml/tut/tutorials.html"
- >nXhtml tutorial page</a> with video tutorials.
- </li>
- <li>
- After question
- <a href="https://answers.launchpad.net/nxhtml/+question/45721"
- >nXhtml question 45721</a>
- there was a short discussion on Emacs Devel where I
- was convinced to change the name convention for multi
- major modes. They are now supposed to end
- in <i>-mumamo-mode</i> (instead of the old <i>-mumamo</i>).
- </li>
- <li>
- Added <i>ourcomments-ediff-files</i> to start ediff
- from a shell with Emacs Client.
- </li>
- <li>
- Took a look at autoloading. nXhtml now uses
- autoloading in many more cases and loads much faster.
- </li>
- <li>
- Added new general functions for search and replace:
- <i>grep-query-replace</i>, <i>ldir-query-replace</i> and
- <i>rdir-query-replace</i>. Also added similar
- functions to search and replace in a site (they are in
- the nXhtml menu).
- </li>
- <li>
- Added <i>better-fringes-mode</i> for my personal preferences
- for fringe symbols ...
- </li>
- <li>
- Enhancement for (X)HTML editing:
- <ul>
- <li>
- Added a minimal one-line display version of fictive
- validation headers and made it the default.
- </li>
- <li>
- Some enhancements to <i>nxml-where-mode</i>.
- </li>
- <li>
- Display of images inline. Can be used in different major modes/files.
- </li>
- <li>
- Added the minor mode <i>wrap-to-fill-column-mode</i> and
- replaced longlines-mode in the Tools menu with this.
- </li>
- <li>
- Added the minor mode <i>html-write-mode</i> that can hide
- some simple tags and just show the inner html with a
- user defined face. This is meant to make it easier to
- write html files.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.61">1.61</dt>
- <dd id="v1.61-dd">
- <ul>
- <li>
- Bug fixes in html-write-mode and as-external.el.
- </li>
- <li>
- Removed left over autoloads (maybe there was a problem with ruby-mode, not sure).
- </li>
- <li>
- Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/290364">290364</a>,
- see below about MuMaMo important changes.
- </li>
- <li>Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/272526">272526</a>.</li>
- <li>Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/292393">292393</a>.</li>
- <li>Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/300946">300946</a>.</li>
- <li>Fixed bug <a href="https://bugs.launchpad.net/nxhtml/+bug/304569">304569</a>.</li>
- <li>
- Added some support for editing gmail messages in
- as-external.el (to be used with It's All Text for
- Firefox).
- </li>
- <li>
- Some changes to face handling in Emacs had made htmlfontify.el fail.
- Some changes in CSS handling in Firefox and IE made hfyview.el fail even more.
- Tried to fix this.
- </li>
- <li>
- Updated vline.el
- </li>
- <li>
- Aaron Hawley merged in some changes he made to php-mode.el. Thanks Aaron!
- Now nXhtml uses a slightly modified version of php-mode 1.5.0 is used
- </li>
- <li>
- <b>MuMaMo important changes</b>
- <p>
- Unfortunately the chunk dividing routines in
- mumamo.el can loop, see bug 290364 above. The
- reason is that I tried to find chunks at current
- point in a buffer without looking through the buffer
- from the beginning. Fontification works this way in
- Emacs. It is a heuristic that sometimes fails
- however, but the consequences are merely just local
- errors in fontification.
- </p>
- <p>
- Chunk dividing must be more stable since it has a
- global impact on the files fontification. It
- therefore have to be done from the beginning of the
- buffer - just like a parser reading the file will
- do.
- </p>
- <p>
- I have done first part of this rewrite and I hope
- chunk dividing can not loop any more. Chunk dividing
- is now always done from the beginning. However the
- routines actually finding the chunks still looks
- both upwards and downwards. I will try to remove
- this unnecessary complexity later.
- </p>
- </li>
- </ul>
- </dd>
- <dt id="v1.62">1.62</dt>
- <dd id="v1.62-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- Fixed bugs in chunk creation that caused args out
- of range at buffer end.
- </li>
- </ul>
- </li>
- <li>
- Autoloading caused wrong libraries to load (for
- example javascript from mozdev). Fixed.
- </li>
- </ul>
- </dd>
- <dt id="v1.63">1.63</dt>
- <dd id="v1.63-dd">
- <ul>
- <li>
- Removed find-recursive.el since there is no use for it
- any more and it interferes with emacs-rails. (It was
- initally a bug fixs for emacs-rails.)
- </li>
- <li>
- Fixed bugs in <i>html-write-mode</i>.
- </li>
- <li>
- Used the new routines for finding chunks also during
- xml validation and syntax-ppss.
- </li>
- </ul>
- </dd>
- <dt id="v1.64">1.64</dt>
- <dd id="v1.64-dd">
- <ul>
- <li>
- MuMaMo: nxml was not turned off properly when
- switching from a multi major mode that used nxml-mode
- or nxhtml-mode. Fixed. This was especially troublesome
- for Emacs 22 users where multi major modes based on
- nxhtml-mode does not always work.
- </li>
- <li>
- Majmodpri.el: Added a defcustom to give multi major
- modes based on nxhtm-mode or nxml-mode lower
- priority. This is on by default in Emacs 22.
- </li>
- </ul>
- </dd>
- <dt id="v1.65">1.65</dt>
- <dd id="v1.65-dd">
- <ul>
- <li>Fixed a bug in nxml-where.el.</li>
- <li>
- Fixed a minor bug in majmodpri.el. It did not work if
- magic-mode-alist contained anonymous functions.
- (Thanks from Niels Giesen.)
- </li>
- <li>
- Fixed a bug in pause.el and added some mindfulness to it.
- </li>
- <li>
- Adjusted <i>ourcomments-move-beginning-of-line</i> (and dito
- for end) to the new <i>line-move-visual</i> in Emacs 23.
- Moved physical-line.el to <i>old</i> subdir since it is now
- obsolete.
- </li>
- <li>
- Made it possible to byte compile nXhtml.
- <p>
- To do that use
- <i>M-x nxhtmlmaint-start-byte-compilation</i>.
- </p>
- <p>
- A lot of code changes to make byte compilation
- possible without a lot of warnings. Most changes
- where just moving code around, but some where bug
- fixes.
- </p>
- </li>
- </ul>
- </dd>
- <dt id="v1.66">1.66</dt>
- <dd id="v1.66-dd">
- <ul>
- <li>
- Further work on byte compiling.
- </li>
- <li>
- Tried to fix some problem with defadvice in
- ourcomments-util.el.
- </li>
- <li>
- Tried to finish the command <i>M-x search-form</i>.
- </li>
- <li>
- When no chunk is found (border case) then set the
- major mode to the main major mode for the current
- multi major mode.
- </li>
- </ul>
- </dd>
- <dt id="v1.67">1.67</dt>
- <dd id="v1.67-dd">
- <ul>
- <li>
- Removed css.el since it is in Emacs 22.2 and later.
- </li>
- </ul>
- </dd>
- <dt id="v1.68">1.68</dt>
- <dd id="v1.68-dd">
- <ul>
- <li>
- Fixed bugs related to byte compilation. This should
- now work for both Emacs 22 and 23. Also added a menu
- entry for byte compilation.
- </li>
- <li>
- Removed nXml from the distribution to make it
- smaller. nXml comes with Emacs 23 (not yet released of
- course). For Emacs 22 users see EmacsWiki about where
- to get nXml.
- <p>
- Adding nXml to Emacs 22 startup should be done by
- using the file <i>nxhtml/autostart22.el</i>.
- </p>
- <p>
- NOTE 1: if you want to use <i>nxhtml-mode</i> in
- multi major modes in Emacs 22 (not recommended) you
- must also customize <i>majmodpri-no-nxml</i>.
- </p>
- <p>
- NOTE 2: The major mode <i>nxhtml-mode</i> as a
- major-mode works however very well also in Emacs 22.
- </p>
- </li>
- </ul>
- </dd>
- <dt id="v1.69">1.69</dt>
- <dd id="v1.69-dd">
- <ul>
- <li>
- Chunks were unnecessary deleted and recreated after a
- change even if all changes where within one
- chunk. This could make editing very slow. Fixed.
- </li>
- <li>
- Search for rng-auto.el in path. (Emacs 22 only.)
- </li>
- </ul>
- </dd>
- <dt id="v1.70">1.70</dt>
- <dd id="v1.70-dd">
- <ul>
- <li>
- Validation could not be turned on in multi major
- modes. Fixed.
- </li>
- </ul>
- </dd>
- <dt id="v1.71">1.71</dt>
- <dd id="v1.71-dd">
- <ul>
- <li>
- Fixed the problem that showed up in the file
- nxhtml/tests/in/kubica-freezing-i.html which could
- make Emacs freeze.
- </li>
- </ul>
- </dd>
- <dt id="v1.72">1.72</dt>
- <dd id="v1.72-dd">
- <ul>
- <li>
- Somehow I dropped this: Search for rng-auto.el in
- path. (Emacs 22 only.) Don't ask me how. Fixed again.
- </li>
- </ul>
- </dd>
- <dt id="v1.73">1.73</dt>
- <dd id="v1.73-dd">
- <ul>
- <li>
- Worked a bit more on byte compilation and elisp
- libraries loading. If you byte compile nXhtml it will
- now load very few modules by default. It loads more
- modules if you don't.
- </li>
- <li>
- Added chart.el, a small elisp library to create charts.
- This works by calling google charts library.
- Chart.el is a bit beta, eh alpha, but still useful I believe.
- </li>
- </ul>
- </dd>
- <dt id="v1.74">1.74</dt>
- <dd id="v1.74-dd">
- <ul>
- <li>
- Found and fixed a bug in <em>fictive XML validation
- headers</em>. This bug depended on the load order of
- libraries.
- </li>
- <li>
- Fixed a small bug in <i>nxml-where-mode</i>.
- </li>
- </ul>
- </dd>
- <dt id="v1.75">1.75</dt>
- <dd id="v1.75-dd">
- <ul>
- <li>
- Included css-color.el, css-palette.el and gpl.el from Niels Giesen.
- (This replaces hexcolor.el which is no longer in nXhtml.)
- </li>
- </ul>
- </dd>
- <dt id="v1.76">1.76 -- Released 2009-02-26</dt>
- <dd id="v1.76-dd">
- <ul>
- <li>
- <span class="bugfix">Fixed a long standing bug in XML validation.</span> (I had
- forgot to set the defadvice return value in defadvice
- rng-set-initial-state in rngalt.el - I wonder why I
- did not get any bug reports about this...)
- </li>
- <li>
- <span class="bugfix">css-color.el: bug fix for mIxEd case color names.</span>
- </li>
- <li>
- <span class="bugfix">freemind.el: bug fixes.</span>
- </li>
- </ul>
- </dd>
- <dt id="v1.77">1.77 -- Never released!</dt>
- <dd id="v1.77-dd">
- <ul>
- <li>
- <span class="bugfix">Fixed numerous bugs</span>, please
- see <a href="https://bugs.launchpad.net/nxhtml/">nXhtml bug tracker</a>
- and dito <a href="https://answers.launchpad.net/nxhtml">question and answers</a>.
- </li>
- <li>
- Added some missing autoloads.
- </li>
- <li>
- <span class="bugfix">Tried to fix some smaller troubles with Viper when
- changing chunk.</span>
- </li>
- <li>
- <span class="bugfix">Menus for Tidy were broken. Fixed.</span>
- </li>
- <li>
- Added a test that the <i>nxml-mode libraries included
- in Emacs</i> are used and not the old ones. (If I
- understand it correctly this might have been a problem
- for Debian/Ubuntu Emacs 23 snap-shots users where the
- old nxml-mode has been a left over from earlier
- snap-shots where it was needed.)
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Chunks are now always created from top to bottom.
- This should make chunk creation more stable.
- It also opens up for chunks in chunks in the future.
- (The code still needs work...)
- </li>
- </ul>
- </li>
- <li>
- majmodpri.el:
- <ul>
- <li>
- To restore multi major modes in files loaded by
- desktop-save-mode the new
- function <i>majmodpri-apply</i> can be added
- to <i>desktop-after-read-hook</i>.
- </li>
- <li>
- New default for <i>majmodpri-sort-after-load</i>:
- Sort after loading certain features/libraries that
- are known to change <i>auto-mode-alist</i> and
- apply to current buffer. This new default should
- hopefully make major mode selection less
- confusing.
- </li>
- </ul>
- </li>
- <li>
- winsav.el:
- <ul>
- <li>
- Added save and restore between Emacs sessions for frame configuration.
- I am not sure how this works with special frames yet, but I have tested this with oneonone.el and it seems to work.
- Dedicated windows should also work.
- </li>
- <li>
- Added saving and restoring of named frame configurations.
- </li>
- </ul>
- </li>
- <li>
- javascript.el:
- <ul>
- <li>
- Updated to Karl's newest version (and added my additions).
- </li>
- </ul>
- </li>
- <li>
- Added library usb-setup.el that might help a bit with
- using Emacs from an USB stick.
- </li>
- <li>
- Updated smarty-mode.el to the latest version.
- </li>
- <li>
- <img alt="Happy brain" src="img/fun-brain-2.png" width="131" height="119" />
- Added an n-back game for your brain (and mine).
- Just do <b>M-x n-back-game</b> to start it.
- </li>
- </ul>
- </dd>
- <dt id="v1.78">1.78 -- Released 2009-05-28</dt>
- <dd id="v1.78-dd">
- <ul>
- <li>
- <span class="bugfix">nXhtml version 1.78 is the
- release of the previous beta</span> (which had number
- 1.77 and existed in many versions).
- </li>
- </ul>
- </dd>
- <dt id="v1.79">1.79</dt>
- <dd id="v1.79-dd">
- <ul>
- <li>
- Added a function to simplify adding for example font
- lock keywords for major modes used in multi major
- mode: <i>mumamo-refresh-multi-font-lock</i>.
- </li>
- </ul>
- </dd>
- <dt id="v1.80">1.80 -- Released 2009-06-02</dt>
- <dd id="v1.80-dd">
- <ul>
- <li>
- <span class="bugfix">Fixed a (rather serious) bug and cleaned up.</span>
- </li>
- <li>
- Added mumamo regions. Mumamo regions are temporary
- mumamo chunks that you set up by selecting a region
- and telling you want that in a new major mode. To use
- this feature look in the nXhtml menu under <i>Chunks -
- Region Chunks</i>.
- </li>
- </ul>
- </dd>
- <dt id="v1.81">1.81 -- Released 2009-06-19</dt>
- <dd id="v1.81-dd">
- <ul>
- <li>
- Added the minor mode <i>mumamo-alt-php-tags-mode</i>
- that lets you work more easily with &lt;?php tags in
- strings while you are still able to use XHTML
- completion. (I added something looking rather similare
- earlier, but removed it again because of difficulties
- with undo. They are now fixed in Emacs and this should
- be safe.)
- </li>
- <li>
- Added support for hi-lock, but please be aware that
- chunk overlays hides background marking that hi-lock
- does... - so you must use marking that changes
- foreground part of face.
- </li>
- </ul>
- </dd>
- <dt id="v1.82">1.82 -- Released 2009-06-23</dt>
- <dd id="v1.82-dd">
- <ul>
- <li>
- <span class="bugfix">Find and fixed some bugs when
- I tried to fix bug 388729.</span> Not sure I fixed that
- bug though.
- </li>
- </ul>
- </dd>
- <dt id="v1.83">1.83 -- Released 2009-06-24</dt>
- <dd id="v1.83-dd">
- <ul>
- <li>
- <span class="bugfix">Fontification disappeared for example in *grep* buffer. Fixed.</span>
- </li>
- </ul>
- </dd>
- <dt id="v1.84">1.84 -- Released 2009-06-30</dt>
- <dd id="v1.84-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">Worked around bug in Emacs
- 22.3 where c-after-change was left in
- after-change-functions.</span> (This makes no
- difference in Emacs 23.)
- </li>
- <li>
- <span class="bugfix">Fixed a bug that occured
- after deletion of whole chunks.</span>
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.85">1.85 -- Released 2009-07-04</dt>
- <dd id="v1.85-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">Corrected various mostly
- minor bugs</span>, like indent-line-function which
- where globally set to
- mumamo-indent-line. Corrected.
- </li>
- <li>
- <span class="bugfix">Forgot to finish the implementation of support for
- font-lock-add-keywords. Done.</span>
- </li>
- <li>
- Added some faces hi-mumamo-* to use with hi-lock,
- but unfortunately they are not very
- visible. Suggestions are welcome.
- </li>
- </ul>
- </li>
- <li>
- CEDET and ECB:
- <ul>
- <li>
- <span class="bugfix">Made the routines for fetching and installing CEDET and ECB
- from the development sources work again.</span>
- </li>
- <li>
- Added support for ECB in <i>winsav-save-mode</i>. Though I suspect it need some rework...
- </li>
- </ul>
- </li>
- <li>
- Added pointback.el, found on EmacsWiki. This is just
- so missing in Emacs...
- </li>
- </ul>
- </dd>
- <dt id="v1.86">1.86 -- Released 2009-07-05</dt>
- <dd id="v1.86-dd">
- <ul>
- <li>
- Made the fetching and installing of CEDET and ECB a
- bit better.
- </li>
- </ul>
- </dd>
- <dt id="v1.87">1.87 -- Released 2009-07-08</dt>
- <dd id="v1.87-dd">
- <ul>
- <li>
- Some enhancements to winsav.el and menuacc.el.
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Added heredoc for some modes. They are currently
- kind of hidden since they are only available in
- multiple major modes that offer just heredocs.
- The implemented heredoc multi major modes are
-
- sh-mumamo-heredoc-mode,
- php-mumamo-heredoc-mode,
- perl-mumamo-heredoc-mode,
- cperl-mumamo-heredoc-mode,
- python-mumamo-heredoc-mode and
- ruby-mumamo-heredoc-mode.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.88">1.88 -- Never released, only betas</dt>
- <dd id="v1.88-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">
- Background colors could not be removed by
- setting <i>mumamo-background-coloring</i>.
- Fixed, but please notice that this variable now
- is a number.
- </span>
- </li>
- <li>
- <span class="bugfix">Support for chunks in chunks.</span>
- </li>
- <li>
- <span class="bugfix">Removed string-match-p which does not exist in Emacs 22.</span>
- </li>
- <li>
- <span class="bugfix">
- mumamo-alt-php-tags-mode hardly survived major mode
- changes. Rescued.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Added possibility to display chunk info in
- window margins as an alternative/addon to
- colored chunks.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Fixed a bug in n-back.el that prevented the game to be used on Emacs 22.
- </span>
- </li>
- </ul>
- </li>
- <li>
- Bug fixes and changes to udev for CEDET and ECB. (Udev
- is a little utility to fetch and install dev sources.)
- <ul>
- <li>
- <span class="bugfix">
- Changed default directory for installing CEDET and
- ECB to be under <i>~/.emacs.d/udev/</i>.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Several bug fixes for udev.
- It should now work again (it did not if you compiled nXhtml).
- </span>
- </li>
- </ul>
- </li>
- <li>
- Added support for <a href="http://www.emacswiki.org/emacs/CompanyMode">Company Mode</a> style completion. Temporary included a copy of Company Mode with bug fixes and changes needed for nXhtml and Viper. It also include a lot of other small features (which I hope can be included in Company Mode). On of these is integration with <a href="http://www.emacswiki.org/emacs/PredictiveMode">Predictive Mode</a>. (You have to get Predictive Mode yourself. If you want to install it on MS Windows I recommend using the latest version of Cygwin. A smaller change to the Makefile is required, there is one absolute path you probably want to remove.)
- <p class="bugfix">
- Note: I thought that I should make Company Mode the default completion style. However there are still some problem so I kept the old default completion style.
- </p>
- </li>
- <li>
- TabKey2:
- <ul>
- <li>
- Added support for Company Mode.
- </li>
- <li>
- Made completion only occur at word ends.
- </li>
- </ul>
- </li>
- <li>
- Added support for <a href="http://www.emacswiki.org/emacs/Anything">anything style completion</a> in XHTML completion.
- </li>
- <li>
- Added support in inlimg-mode to show images in org-mode. (Also made inlimg-mode use font lock which makes it more reliable.)
- </li>
- <li>
- Included espresso-mode (with some possible bug fixes). Not yet the default for Javascript.
- </li>
- <li>
- <p class="bugfix">
- Added simple functions for mirroring html files in
- Firefox as typing. This works - at least for small
- files. There is also support for automatic update
- of Firefox when saving CSS files.
- </p>
- <p>
- This is a simple framework for communicating with
- MozRepl which enqueues requests, waiting for
- response prompt before sending next requests.
- <span class="bugfix">Maybe this can be used to make
- some more efficient routines than those I have
- written here. Any takers?</span>
- </p>
- <p>
- For larger files (like this one) this version is
- rather slow since it always changes the whole DOM.
- </p>
- </li>
- <li>
- <span class="bugfix">
- Rewrote <i>nxml-where-mode</i> to be more efficient and
- fixed some minor bugs. It can now also be used with
- MozRepl to track position in file.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Made <i>winsav-save-mode</i> remember maximized state and forget about empty non-file buffers.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Added workaround for <a href="http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4015">Emacs bug 4015 on w32</a>.
- </span>
- </li>
- <li>
- Added <i>ourcomments-M-x-menu-mode</i> which <a
- href="http://lists.gnu.org/archive/html/emacs-devel/2009-07/msg01025.html">adds menu commands to M-x history</a>.
- </li>
- </ul>
- </dd>
- <dt id="v1.89">1.89 -- Released 2009-08-04</dt>
- <dd id="v1.89-dd">
- <ul>
- <li>
- The release version of all the fixes in beta 1.88.
- </li>
- </ul>
- </dd>
- <dt id="v1.90">1.90 -- Released 2009-08-04</dt>
- <dd id="v1.90-dd">
- <ul>
- <li>
- <span class="bugfix">
- Made wrap-to-fill-column-mode cooperate a bit with
- mumamo-margin-info-mode.
- </span>
- </li>
- <li>
- Made an inventory of utilities in nXhtml and made some
- of them more visible in the menus.
- </li>
- </ul>
- </dd>
- <dt id="v1.91">1.91 -- Released 2009-08-04</dt>
- <dd id="v1.91-dd">
- <ul>
- <li>
- <span class="bugfix">
- Mumamo bug fix for bug reported on Emacs wiki today. Inline scripts end tag could not be in column one if previous line had a // style js comment.
- </span>
- </li>
- </ul>
- </dd>
- <dt id="v1.92">1.92 -- Released 2009-08-04</dt>
- <dd id="v1.92-dd">
- <ul>
- <li>
- <span class="bugfix">
- An Emacs bug that sometimes prevent changing local keymap in a timer hit us. Made a workaround.
- </span>
- </li>
- </ul>
- </dd>
- <dt id="v1.93">1.93 -- Released 2009-08-04</dt>
- <dd id="v1.93-dd">
- <ul>
- <li>
- <span class="bugfix">
- Minor bug in menus gave major problem. Fixed - I hope.
- </span>
- </li>
- </ul>
- </dd>
- <dt id="v1.94">1.94 -- Never released, only betas</dt>
- <dd id="v1.94-dd">
- <ul>
- <li>
- MuMaMo
- <ul>
- <li>
- <span class="bugfix">
- Hopefully MuMaMo is now fully transfered to the new way of finding the major mode chunks. Chunks in chunks should now work (except for lurking bugs of course...). Tried to fix indentation.
- </span>
- </li>
- </ul>
- </li>
- <li>
- <span class="bugfix">
- <i>wrap-to-fill-column-mode</i> calculated window width wrongly so that the displayed wrapping was not consistent with what fill-paragraph would give. Corrected together with some other bugs in it.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Fixed an indentation bug in php-mode I introduced when I fixed another indentation bug for heredoc endings.
- </span>
- </li>
- <li>
- <span class="bugfix">
- A bug in <i>ourcomments-M-x-menu-mode</i> made Emacs client fail. Fixed.
- </span>
- </li>
- <li>
- <span class="bugfix">
- The version of company-mode include in nXhtml has some changes. It turns out that these probably gives some problems with company-mode support for etags. The version of company-mode in nXhtml is therefore not autoloaded any more.
- </span>
- </li>
- <li>
- Improved external editing of web mail.
- </li>
- <li>
- Removed <i>js2-mode</i> (and my attempts to make it work with mumamo) since it is now part of Emacs devel sources. Since js2-mode does not use font-lock its integration with mumamo have to wait until it does that.
- </li>
- <li>
- Reworked <b>folding</b> a bit so it is more useful.
- There is a new minor mode, <i>foldit-mode</i>, that shows better markers for folding. There is a new entry in the <i>nXhtml / Tools</i> menu for folding. <i>fold-dwim-toggle</i> now alwo toggles images and <i>html-write-mode</i> things. In html it first checks for headers then does tag block style visibility toggling.
- </li>
- <li>
- Updated <i>vline.el</i>.
- </li>
- <li>
- Removed fmode.el since it is not needed any more when majmodpri.el does the job.
- </li>
- <li>
- Removed routines to fetch/load CEDET since CEDET is now part of devel sources of Emacs.
- </li>
- </ul>
- </dd>
- <dt id="v1.95">1.95</dt>
- <dd id="v1.95-dd">
- <ul>
- <li>
- First release after all 1.94 betas.
- </li>
- </ul>
- </dd>
- <dt id="v1.96">1.96</dt>
- <dd id="v1.96-dd">
- <ul>
- <li>
- <span class="bugfix">
- Problem creating autoload file in latest dev version of Emacs. Fixed.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Fixed typo in wrap-to-fill.el.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Autoloaded <i>buffer-narrowed-p</i>.
- </span>
- </li>
- </ul>
- </dd>
- <dt id="v1.97">1.97</dt>
- <dd id="v1.97-dd">
- <ul>
- <li>
- <span class="bugfix">
- Problem with customize-option because widgets where not loaded. Rearranged code to bit to fix this.
- </span>
- </li>
- <li>
- Added support for Groovy from
- <a href="http://tiagocury.blogspot.com/2009/10/gsp-groovy-server-pages-support-for.html">Tiago Cury</a>.
- </li>
- </ul>
- </dd>
- <dt id="v1.98">1.98</dt>
- <dd id="v1.98-dd">
- <ul>
- <li>
- <span class="bugfix">
- Added support for PHP nowdocs.
- </span>
- </li>
- <li>
- Freemind.el: Added support for <i>org-odd-levels-only</i>.
- </li>
- </ul>
- </dd>
- <dt id="v1.99">1.99</dt>
- <dd id="v1.99-dd">
- <ul>
- <li>
- Converted line endings from CRLF to LF.
- </li>
- </ul>
- </dd>
- <dt id="v2.00">2.00</dt>
- <dd id="v2.00-dd">
- <p>
- 2.00 does not stand for something very exciting, it is just a consecutive number. But - I do believe this is a rather mature version of nXhtml.
- </p>
- <ul>
- <li>
- MuMaMo
- <ul>
- <li>
- <span class="bugfix">
- Fixed some indentation bugs.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Added multi major mode local sub chunk dividing inheriting.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Made MuMaMo avoid closing org-mode nodes
- </span>
- when moving between sub chunks in org files.
- </li>
- <li>
- <span class="bugfix">
- Introduced per main major local variables.
- </span>
- First use is for buffer-invisibility-spec. This can only be set in the main major mode now. (Or rather, it will be reset to what was last set in main major mode when you move between chunks.) This is the most reasonable way I believe, since it may otherwise change when moving between chunks and the new chunk's major mode is called.
- </li>
- <li>
- Added support for Mason.
- </li>
- </ul>
- </li>
- <li>
- <span class="bugfix">Renamed gimp.el to gimpedit.el</span> and made it open GIMP on other platforms than w32 too. (Symbols in the files are renamed too.) Skipped compatibility with old GIMP versions.
- </li>
- <li>
- <span class="bugfix">Renamed freemind.el to org-freemind.el</span> so that it can be included among the org files.
- Also added support for #+BEGIN_HTML when exporting to freemind.
- </li>
- </ul>
- </dd>
- <dt id="v2.01">2.01</dt>
- <dd id="v2.01-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">
- Major mode was not always switched when moving fast between chunks. Fixed.
- </span>
- </li>
- <li>
- Made desktop recognize multi major modes.
- </li>
- </ul>
- </li>
- <li>
- <span class="bugfix">
- org-freemind.el was broken. Sorry.
- </span>
- </li>
- <li>
- Fixed a bug in wrap-to-fill-column-mode.
- </li>
- <li>
- Enhanced support for smarty template language.
- </li>
- <li>
- Mlinks mode used one timer per buffer. Converted to one global timer => much faster. (This actually slowed down Emacs screen update before.)
- </li>
- </ul>
- </dd>
- <dt id="v2.02">2.02</dt>
- <dd id="v2.02-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">
- Support for #+BEGIN_SRC ... #+END_SRC etc in org-mode.
- </span>
- </li>
- <li>
- <span class="bugfix">
- Bug fix for the case &lt;script ...&gt;//&lt;!-- --&gt;
- </span>
- </li>
- <li>
- <span class="bugfix">
- Fixed support for ASP again.
- </span>
- </li>
- <li>
- Added support for XSL with embedded CSS and Javascript, see <i>xsl-nxml-mumamo-mode</i>.
- </li>
- <li>
- Added support for SSJS (Server Side Javascript)
- </li>
- <li>
- Changed to using nxhtml-mode for indentation when chunk major is htm-mode. Added <i>mumamo-indent-major-to-use</i> to control this.
- </li>
- <li>
- Turned off nxml-mode validation during indentation of regions.
- </li>
- <li>
- Updated htmlfontify.el.
- </li>
- <li>
- Included <a href="http://www.emacswiki.org/emacs/ZenCoding">zencoding-mode.el</a>.
- </li>
- <li>
- Finally got around to implement a <b>C-a</b> that just selects a widget field in a Custom buffer, not the whole buffer. See <i>rebind-keys-mode</i>.
- </li>
- </ul>
- </li>
- <li>
- Added wrap-to-fill-column-global-mode.
- </li>
- <li>
- Removed org-freemind.el (formerly freemind.el) since it is now part of Emacs CVS repository and you can get it there.
- </li>
- <li>
- <span class="bugfix">
- Added flymake support for CSS and javascript with detailed instructions of how to install needed support.
- </span>
- </li>
- </ul>
- </dd>
- <dt id="v2.03">2.03</dt>
- <dd id="v2.03-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">
- Made the new JavaScript mode that is included in Emacs work within chunks.
- </span>
- </li>
- </ul>
- </li>
- <li>
- Removed the JavaScript modes that were distributed with nXhtml. If you are not using CVS Emacs please get js.el from there.
- </li>
- <li>
- <span class="bugfix">
- Made <i>majmodpri-no-nxml</i> work a bit better.
- </span>
- </li>
- <li>
- Put <i>rebind-keys-mode</i> on the menu so it can be found.
- </li>
- </ul>
- </dd>
- <dt id="v2.04">2.04</dt>
- <dd id="v2.04-dd">
- <ul>
- <li>
- <span class="bugfix">
- Added web install and update of nXhtml.
- </span>
- You can find this in the nXhtml menu.
- If you do not have this in your nXhtml yet, or have not installed nXhtml please see the instructions on EmacsWiki.
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- <span class="bugfix">
- Fixed some problems with temporary chunks.
- </span>
- </li>
- <li>
- Added support for html chunks in markdown files with new multi major mode <i>markdown-html-mumamo-mode</i>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v2.05">2.05</dt>
- <dd id="v2.05-dd">
- <ul>
- <li>
- <span class="bugfix">
- Fixed a problem in flymake-css.el with loading newst-backend.el (which provides the wrong feature).
- </span>
- </li>
- </ul>
- </dd>
- <dt id="v2.06">2.06 - never released</dt>
- <dd id="v2.06-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- Skipped fontification during indentation. (This was troublesome since major mode may have to be changed during indentation.)
- </li>
- <li>
- Included iss-mode and iss-mumamo-mode for editing of Inno Setup scripts.
- </li>
- <li>
- <span class="bugfix">
- Comments in eRuby &lt;%# .. %&gt; did not work. Fixed.
- </span>
- </li>
- </ul>
- </li>
- <li>
- Included better support for Java in flymake. It will can now recognize makefiles, ant and single java files and try to DTRT.
- </li>
- </ul>
- </dd>
- <dt id="v2.07">2.07 - never released</dt>
- <dd id="v2.07-dd">
- <p>
- This version was never released, but was available as beta for testing (and use). During this beta I tried to finish the rewriting of the rewriting of the chunk dividing routines. (Those needed simplification. Initially I believed that chunks with different major could be created starting from anywhere in the file. This was complex and indeed a bad idea since the chunk dividing markers depends on the content of the file from the top.)
- </p>
- <p>
- A lot of bugs where fixed during this and new things were added. Some things were removed. But there is no good logg of this anywhere because I did not have time to update that. Sorry. But if you are interested you can have a look at the bug database at Launchpad.
- </p>
- </dd>
- <dt id="v2.08">2.08 - released 2010-04-25</dt>
- <dd id="v2.08-dd">
- <p>
- This is the first released version since version 2.05 (which was released in Dec 2009).
- </p>
- <p>
- One noticeable thing is that the menus were restructered to make it easier to find things. You can find some of the new things there. Most of the rest are internal changes and bug fixes.
- </p>
- </dd>
- </dl>
- </div>
-
- <hr class="footer"/>
- <p class="footer">
- <span id="latest">Copyright &copy; <!-- this year -->2009<!-- end this year --> OurComments.org</span>
- </p>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/doc/nxhtml.css b/emacs.d/nxhtml/nxhtml/doc/nxhtml.css
deleted file mode 100644
index eea8750..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/nxhtml.css
+++ /dev/null
@@ -1,171 +0,0 @@
-@import url(td_oc.css);
-
-hr {
- margin-top: 4em;
-}
-body {
- margin-top: 0.5em;
- background-color: #ffe4b5;
- background-color: #ffffdf;
- margin-left: 5%;
- margin-right: 5%;
-}
-body, td {
- font-size: 0.9em;
- font-family: Arial, sans-serif;
-}
-h1, h2, h3 {
- color: #556b2f;
-}
-em {
- color: maroon;
- font-style: normal;
-}
-
-a {
- color: maroon;
-}
-a.nonexistent {
- font-weight: bold;
- background-color: #F8F8F8;
- color: #FF2222;
-}
-
-a.nonexistent:visited {
- background-color: #F8F8F8;
- color: #FF2222;
-}
-
-a.dl {
- font-weight: 400;
- background-color: #e0ff6e
-}
-
-strong { font-weight: bold; }
-
-ul { list-style-type: disc }
-
-dl.contents { margin-top: 0; }
-dt.contents { margin-bottom: 0; }
-
-
-p.verse {
- white-space: pre;
- margin-left: 5%;
-}
-
-pre {
- white-space: pre;
- /* monospace does not work in Firefox 0.9.2 font-family: monospace; */
- margin-left: 0em;
- margin-bottom: 0em;
-}
-
-dl.bolddt dt { font-weight: bold; }
-
-dt {
- font-weight: bold;
-}
-dd {
- margin-bottom: 0.7em;
-}
-hr {
- width: 100%;
-}
-hr.divider {
- height: 0.7em;
- background-color: maroon;
- width: 67%;
-}
-#FEAT li {
- margin-bottom: 0.7em;
-}
-
-#PAGETOC {
- float: left;
- background-color: #df7;
- background-color: #edef87;
- margin-right: 2em;
- margin-bottom: 2em;
- margin-top: 0em;
- -moz-border-radius: 1em;
-}
-#PAGETOC td {
- padding: 0.8em;
- padding-right: 1.1em;
- //font-size: 0.8em; /* For IE only */
-}
-#PAGETOC strong {
- color: #6b8e23;
- display: block;
- margin-bottom: 0.5em;
-}
-#PAGETOC ul li a {
- color: maroon;
-}
-#PAGETOC a:hover { background-color: yellow; }
-#PAGETOC ul {
- list-style-type: none;
- margin:0;
- padding-left: 1.5em;
-}
-#PAGETOC ul li {
- font-weight: bold;
-}
-#PAGETOC ul li ul { }
-#PAGETOC ul li ul li { font-weight: normal;}
-#PAGETOC .liul {
- //display:inline; /* For IE only */
-}
-#emacswikibar {
- background-color:#ef4;
- background-color: #edef87;
- text-align:center;
- margin-top:0em;
- padding:0.4em;
-}
-#imgwikiguide {
- background-color:#cef;
- padding:2em;
- -moz-border-radius: 2em;
-}
-
-#download a {
- border: groove;
- font-size: 1.5em;
- padding: 0.6em;
- background-color: #556b2f;
- color: #ce6;
- -moz-border-radius: 1em;
-}
-#download a:hover {
- color: #BF0;
- background-color: black;
- text-decoration: underline;
-}
-#emacsw32dl {
- width:20em;
- border-style:solid;
- border-color:#556b2f;
- padding:0.7em;
- -moz-border-radius: 1em;
-}
-
-#my-elisp {
- background-color: #fff;
- padding: 2em;
- border-style: solid;
- -moz-border-radius: 1em;
-}
-#my-elisp dl {
- margin-left: 2em;
-}
-
-#keybnotationdiv {
- border-width:1px;
- border-style:solid;
- border-color:#556b2f;
- padding:0.7em;
- padding-left:1.5em;
- -moz-border-radius: 1em;
-}
diff --git a/emacs.d/nxhtml/nxhtml/doc/nxhtml.html b/emacs.d/nxhtml/nxhtml/doc/nxhtml.html
deleted file mode 100644
index 01d761d..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/nxhtml.html
+++ /dev/null
@@ -1,987 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>nXhtml - an Emacs mode for Web Development</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
- <style type="text/css">
- #special {
- background-color: red;
- }
- </style>
-<style type="text/css">
-
-
-#getit {
- max-width: 800px;
-}
-
-#getit span { display: none; }
-/* This seems to be impossible with CSS2 since the containing block
- can not be floated. Why did they design it that way?
-#getit, #getit dl { display: block; }
-#getit a:hover span {
- display: block;
- position: absolute;
- left: 200;
- top: 0;
-}
-*/
-
-#getit a {
- /* Image */
- display: block;
- background: transparent url("img/getitbuttons.png") 0 0 no-repeat;
- overflow: hidden;
- width: 200px;
- /* Text placement and size, etc */
- text-align: center;
- padding-top: 11px;
- font-size: 12px;
- font-weight: 600;
- padding-bottom: 9px;
- text-decoration: none;
- white-space: nowrap;
- border: none;
-}
-#getit dt {
- display: block;
- padding: 0;
- margin: 0;
- float: left;
- letter-spacing: 0;
-}
-#getit a:hover {
- background-position: 0 -35px;
- color: yellow;
-}
-
-#useit {
- position: absolute;
- top: 150px;
- left: 100px;
- width: 85px;
- z-index: 100;
- border: none;
- font-size: 9px;
-}
-/* I can't get rid of the underline. Firefox bug or my bug? */
-#useit a { text-decoration: none; }
-#useit img {
- text-decoration: none;
- overflow: hidden;
- border: solid 2px #990033;
-}
-div#useit { text-decoration: none; }
-#useit img:hover {
- background: url("img/use-nXhtml-trans2.png") 0 0 no-repeat;
-}
-
-#quicklnk a {
- color: #cd3700;
- font-weight: bold;
- font-size: 1.2em;
-}
-#quicklnk a:hover {
- background-color: yellow;
-}
-
-</style>
- </head>
- <body>
- <div id="useit">
- <!-- title is for Firefox -->
- <a href="http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html"
- title="Get nXhtml for Emacs"
- ><img alt="Get nXhtml for Emacs" src="img/use-nXhtml-trans2.png" width="78" height="29" /></a>
- Above is a little banner you can put on your site if you want to.
- </div>
-
- <div id="container">
- <div id="hdr">
- <br />
- <span style="color:#FF0;font-size:14px; font-weight: 600;"> <i>&nbsp;Enjoying editing web files!</i> </span>
- <br />
- </div>
-
- <div id="lftcol">
- <!-- Table of contents BEGIN -->
- <!-- Table of contents min=2 max=3 -->
- <table id="PAGETOC"><tr><td>
- <span class="tochead">On THIS Page:</span>
- <ul>
- <li><a href="#summary">Introduction to nXhtml</a></li>
- <li class="liul"><ul>
- <li><a href="#featsum">Features</a></li>
- <li><a href="#qg">The Quick Guide</a></li>
- <li><a href="#toolset">What you may use more</a></li>
- </ul></li>
- <li><a href="#completion">Completion</a></li>
- <li class="liul"><ul>
- <li><a href="#complex-compl">More Helpful Completion</a></li>
- <li><a href="#ask-compl">But How Do I Ask nXhtml for Alternatives?</a></li>
- <li><a href="#region-compl">The Region and Completion</a></li>
- <li><a href="#errors">And if I Do Not Follow the Advices?</a></li>
- </ul></li>
- <li><a href="#xmlpath">Where am I? - XML Path</a></li>
- <li><a href="#sites">Why it is Useful that nXhtml has Sites</a></li>
- <li><a href="#mlinks">Why the Links Look Like Links</a></li>
- <li><a href="#tocs">Did You Notice the Table of Contents at the Top?</a></li>
- <li><a href="#tidy">But I Can't Use this Cause my Files are HTML</a></li>
- <li><a href="#php">And what about Multiple Modes like PHP?</a></li>
- <li class="liul"><ul>
- <li><a href="#dtd-needed">But I Have no DTD Links in my PHP Files?</a></li>
- <li><a href="#multi-colors">Why Are Colors Different in Multiple Modes?</a></li>
- <li><a href="#part2">More Multiple Modes</a></li>
- <li><a href="#tips-multi">Tips When Using Multiple Modes</a></li>
- </ul></li>
- <li><a href="#file-assoc">File Associations within Emacs</a></li>
- <li><a href="#bloggin">Not for Me, I Am Only Blogging</a></li>
- <li><a href="#bloggin">And Other Goodies...</a></li>
- </ul>
- </td></tr></table>
- <!-- END of Table of contents -->
- </div>
-
- <div id="getit">
- <dl>
- <dt>
- <a href="http://ourcomments.org/Emacs/nXhtml/tut/tutorials.html" title="Tutorials">Tutorials</a>
- </dt>
- <dt>
- <a href="https://answers.launchpad.net/nxhtml/+faqs" title="nXhtml FAQ">nXhtml FAQ</a>
- </dt>
- <dt>
- <a href="nxhtml-changes.html">News about nXhtml
- <span>Details</span></a>
- </dt>
- <dt>
- <a href="http://www.emacswiki.org/cgi-bin/wiki/NxhtmlMode"
- >nXhtml page at EmacsWiki</a>
- </dt>
- <dt>
- <a id="download" href="http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl">Download nXhtml</a>
- </dt>
- <dt>
- <a href="https://launchpad.net/nxhtml" title="Bazaar repository">nXhtml at Launchpad</a>
- </dt>
- </dl>
- </div>
-
- <div id="rgtcol">
- <h1 id="mainheader">nXhtml - Emacs Utilities for Web Development</h1>
-
- <h2 id="summary">Introduction to nXhtml</h2>
- <p>
- nXhtml is an addon to Emacs for editing XHTML, PHP and similar things. It is not
- very well-known, but it looks like at least <a
- href="http://drewyates.net/nxml-nxhmtl-emacs-mode-for-ruby-on-rails-rhtml">Drew
- Yates</a> has found it useful:
- </p>
- <blockquote>
- <p style="font-style:italic">
- nXML mode and the subsequent nXHTML mode for emacs are godsends ...
- </p>
- </blockquote>
- <p>
- And that was before I fixed all the bugs ...
- </p>
-
- <h3 id="featsum">Features</h3>
- <p>
- One of the main parts of nXhtml is nxhtml-mode, a GNU <a
- href="http://en.wikipedia.org/wiki/Emacs">Emacs</a> major
- mode that builds on <a
- href="http://www.thaiopensource.com/nxml-mode/">nxml-mode</a>.
- It knows about XHTML syntax and can check this as
- you type. It can also tell you what tags and attributes you
- can use at a certain point and help you insert them.
- </p>
- <p>
- That feature, which we call <a
- href="#completion">completion</a>, is one of the main
- features of this mode. Another important feature is the
- ability to mix several languages in one buffer and get the
- correct syntax highlighting and indentation for each of
- them.
- </p>
- <p>
- In nXhtml this is combined with other features to make it
- more easy to edit web sites (mostly XHTML based but there is
- support for things like PHP too). Here is a list of important features:
- </p>
- <ul id="sum-ul">
- <li>
- Completion and syntax checking for XHTML.
- <ul>
- <li> Some helpful extensions when completing certain tags (like the &lt;a ...> tag for example).</li>
- <li> When region is visible tag completion will surround the region with the start tag and end tag.</li>
- </ul>
- </li>
- <li>
- Multiple major modes, which means it can handle for example PHP, JSP, eRuby and Django while allowing XHTML completion.
- (Notice however that not all major modes you may need for this comes with nXhtml.)
- </li>
- <li>
- Link handling:
- <ul>
- <li> Easier insertion of tags with links.</li>
- <li> Following links to edit or view.</li>
- <li> Moving between links.</li>
- <li> Moving files and automatically update affected links.</li>
- <li> Copy link to id location and paste it back as a relative link.</li>
- <li> Link checking in current site (local links only)</li>
- </ul>
- </li>
- <li>
- The concept of a site. This is used in many places. A
- site is here a directory tree with additional properties, like
- remote ftp and http addresses. A directory could belong to
- many sites.
- </li>
- <li>
- Make a remote copy of site:
- <ul>
- <li> Uploading of single files</li>
- <li> Uploading of whole or part of site</li>
- <li> Editing of remote files.</li>
- <li> Ediff of local vs remote file.</li>
- <li> Easy viewing of local and remote files in web browser.</li>
- </ul>
- </li>
- <li>
- Table of contents
- <ul>
- <li>Creating table of contents for a page.</li>
- <li>Creating table of contents for a site.</li>
- <li>
- Merging of pages and table of contents for a site (see
- example, notice that the table of content easily can be
- navigated using the keyboard).
- </li>
- </ul>
- </li>
- <li> Support for folding.</li>
- <li> Using <a href="http://www.w3.org/People/Raggett/tidy/">Tidy</a> to convert HTML to XHTML.</li>
- <li> Help for XHTML tags and CSS attributes.</li>
- <li> Edit a fragment of an XHTML file (for blogging for example).</li>
- <li> ... and more of course ...</li>
- <!-- <li> Adding a popup menu to [apps] to access these features.</li> -->
- </ul>
-
- <h3 id="qg">The Quick Guide</h3>
- <p>
- Below are some short notes to get you started using nXhtml.
- (Maybe you should start by taking a look at the
- <a href="http://ourcomments.org/Emacs/nXhtml/tut/tutorials.html" title="Tutorials">Tutorials</a>?)
- </p>
- <dl>
- <dt>GNU Emacs 22 or later</dt>
- <dd>
- <p>
- You need GNU Emacs 22 (which was released 2007-06-02) or later.
- </p>
- </dd>
- <dt>Installation</dt>
- <dd>
- <ul>
- <li>
- Download nXhtml as a zip file <a href="http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl">here</a>
- or download
- <a href="http://ourcomments.org/Emacs/EmacsW32.html">EmacsW32</a>.
- </li>
- <li>
- If you got nXhtml with <a
- href="http://ourcomments.org/Emacs/EmacsW32.html">EmacsW32</a>
- you should use the menus <em>Options - Customize
- EmacsW32</em> and there just set <em>nxhtml-load</em>.
- </li>
- <li>
- If you downloaded the zip file with nXhtml then unzip it anywhere and
- then follow the instructions in
- <em>nxhtml/README.txt</em>.
- </li>
- </ul>
- <p>
- After this files with extensions for example .html will open in nxhtml-mode.
- </p>
- <p>
- To make nXhtml run faster you can also byte compile the files.
- You do that with <i>M-x nxhtmlmaint-start-byte-compilation</i>.
- </p>
- </dd>
-
- <dt id="nxhtml-menu">The nXhtml Menu</dt>
- <dd>
- <p>
- To reach many of the features in nXhtml you can use the
- <b>nXhtml menu</b>. If you do not see that when in a buffer
- then you can always do <em>M-x nxhtml-minor-mode</em> which
- will turn it on (or off) for that buffer.
- </p>
- <p>
- But please notice also the <b>XML menu</b> which
- contains the nXml menu! (Remember that nXhtml is based
- on nXml.) When you are using nxhtml-mode this menu is
- visible when you are in the XHTML parts of a buffer.
- </p>
- </dd>
-
- <!-- <dt id="turn-on-some">Turn on Some Things</dt> -->
- <!-- <dd> -->
- <!-- <p> -->
- <!-- There is a good chance that you want to turn on some -->
- <!-- things that makes nXhtml work more automatic. They are -->
- <!-- in the <a href="#nxhtml-menu">nXhtml menu</a> for -->
- <!-- turning them on temporarily. Later, when you have -->
- <!-- tested, you may want to turn them on permanently, which -->
- <!-- you can do from the menus by choosing <em>nXhtml - -->
- <!-- nXhtml Help and Setup - Quick Customize nXhtml</em>. -->
- <!-- </p> -->
- <!-- </dd> -->
-
- <dt>XHTML Completion and Validation</dt>
- <dd>
- <p>
- nXhtml knows a good deal about XHTML tags and attributes when you are using <em>nxhtml-mode</em>.
- It can assist you in different ways:
- </p>
- <ul>
- <li>
- Completion
- </li>
- <li>
- Validation
- </li>
- </ul>
- <p>
- <b>Completion</b> means that you ask Emacs to give you choices to complete what you are currently writing.
- For example you may have written &lt;b and want to know what tags beginning this way can actually be used at that place in the document.
- You ask Emacs in nxhtml-mode this by calling the function nxml-complete.
- This is normally bound to M-Tab.
- </p>
- <p>
- On some systems, for example MS Windows with an
- unpatched Emacs this is inconvenient and clashes with
- Alt-Tab that the window manager uses. There is however a
- little utility that comes with nXhtml that let you use
- just Tab for completion, <i>tabkey2-mode</i>. Turn this on with
- </p>
- <p style="padding-left:2em;">
- M-x tabkey2-mode
- </p>
- <p>
- After this the first Tab press will still do
- indentation, but the second can do completion.
- </p>
- <p>
- <b>Validation</b> means checking that what you have
- written in nxhtml-mode follows the XHTML specifications.
- If it does not there will be a red underline at the
- places where something is wrong. To see what is wrong
- move to this (for example with C-c C-n). A message in
- the minibuffer will tell you the error.
- </p>
- <p>
- Notice that the modeline also tells if the document is
- valid. Most of the times it will however say
- <em>Invalid</em> maybe just because you are editing and have
- not yet finished.
- </p>
- <p>
- For files mixing XHTML with codes, like PHP, you can use
- something I call <a href="#dtd-needed">Fictive XHTML
- Validation Headers</a>. That allows you to use XHTML
- completion even if those files does not have the XHTML
- headers needed.
- </p>
- </dd>
- <dt>Multiple Major Modes</dt>
- <dd>
- <p>
- nXhtml can automatically divide the buffer into chunks
- with relevant different major modes (i e languages, like
- PHP, XHTML etc). This is useful for editing PHP,
- JSP, eRuby, Django and similar. See <a href="#php">And
- what about Multiple Modes like PHP?</a> for more information.
- </p>
- </dd>
- <dt>Links</dt>
- <dd>
- <p>
- The links you put in your XHTML documents actually works
- like links with nxhtml-mode too. To follow a link you
- can use <em>C-c RET RET</em>. (There are other
- possibilities too, they all begin with <em>C-c RET</em>.)
- </p>
- </dd>
- <dt>Sites and Uploading</dt>
- <dd>
- <p>
- If you want to upload your XHTML files, image files etc
- you can do that from within Emacs. There are entries
- for this in the <a href="#nxhtml-menu">nXhtml menu</a>.
- </p>
- </dd>
- <dt>Keyboard shortcuts (aka keybindings in Emacs)</dt>
- <dd>
- <p>
- When you start to use a new program you often wonder
- about which keybindings there are to use. If you have
- not used Emacs before you may feel quite lost because
- you have looked in all documentation and you have not
- seen any list of keybindings.
- </p>
- <p>
- Well, that is how it often is in Emacs. Get use to it ...
- </p>
- <p>
- But do not panic. Because there is help, probably even
- better than you are used to - in Emacs dynamic help
- system. A help system that change if you for example add
- a keybinding yourself. Try the command <i>C-h b</i> (or <i>F1
- b</i>). This list all the keybindings (in their priority
- order) that are active where you are in Emacs.
- </p>
- <p>
- You can also try <i>C-h m</i> which gives information about
- minor modes and the current major mode. There is
- sometimes information about the keybindings there too.
- </p>
- </dd>
- <dt>Some More You Can Do ...</dt>
- <dd>
- <p>
- See <a href="#summary">Introduction</a> above.
- Look into the <a href="#nxhtml-menu">nXhtml menu</a>.
- And then of course learn some of all the things you can do using the power of Emacs.
- </p>
- </dd>
- </dl>
- <p>
- </p>
- <h3 id="toolset">What you may use more</h3>
- <p>
- If find it very conventient to combine nXhtml with Firefox
- add-on Firebug. I think Firebug is very handy for finding CSS
- problem.
- </p>
- <p>
- <a href="http://www.spreadfirefox.com/node&id=0&t=306"><img border="0"
- alt="Firefox 3" title="Firefox 3"
- src="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png"/></a>
-
- <a href="http://www.getfirebug.com/?link=2" title="Firebug
- is a free web development tool for
- Firefox"><img src="http://www.getfirebug.com/images/firebug2.png"
- border="0" alt="Firebug - Web Development Evolved"/></a>
- </p>
- <p>
- And of course, another good resource is Russ Weakley's <a
- href="http://css.maxdesign.com.au/">CSS-based tutorials</a>.
- Russ co-chairs the <a
- href="http://webstandardsgroup.org/">Web Standards Group</a>
- and seems to know this well.
- </p>
- <p>
- I am sure you know about it, but just in case, here is WDG's
- <a href="http://htmlhelp.com/design/accessibility/">Guide to Accessibility</a>
- and their
- <a href="http://htmlhelp.com/design/accessibility/tips.html">Accessibility Tips</a>.
- </p>
-
- <h2 id="completion">Completion</h2>
- <div align="right">
- <img align="right"
- src="img/popup-compl.png"
- alt="Popup menu style completion"
- title="Popup menu style completion"
- style="border: thin dotted #00ff00;
- margin-left: 2em;
- margin-top: 0em;
- margin-bottom: 1em;"
- width="371" height="483" />
- </div>
- <p>
- Completion in nXhtml Mode lets you ask Emacs <i>"What can I
- type here?"</i>. The most important part, the content, can
- Emacs not help you with yet. However when it comes to XHTML and
- such things that you really want to get past as easy as
- possible, then nXhtml mode can assist you.
- </p>
- <p>
- Perhaps you wonder with <i>"With what?"</i> Well, completion
- works like this: You position point in your XHML file where you
- want to write. Now you ask nXhtml what XHTML code you can
- write there. nXhtml may answer that it can't help you, that
- happens in some cases.
- </p>
- <p>
- But most often nXhtml can help you. It knows about tags and
- where they fit, and it knows about tag attributes. When nXhtml
- can helpt you it will give you choices you can select from. It
- may display the choices in a popup menu like in the pictures to
- the left, or it may use something like the picture below shows.
- It is actually exactly the same question that is asked in these
- two cases. You decide by <i>customizing</i> nXhtml mode in Emacs which
- way it should display the choices. The way below is the
- standard Emacs way to do display choices. It is fast once you know it, but
- the popup menus are of course more familiar to computer users
- today.
- </p>
- <img alt="Emacs style completion" src="img/emacs-style-completion.png" width="456" height="406"
- />
- <p>
- That far nXhtml can take you because it knows the DTD for XHTML.
- (You may wonder about different versions of XHTML, more about that later.)
- </p>
-
- <h3 id="complex-compl">More Helpful Completion</h3>
- <p>
- For certain attributes nXhtml knows their values because the DTD just allows certain values.
- For some other attribute values for which nXhtml can know little
- from the DTD alone, like links (src and href attributes) nXhtml
- can also be helpful. If you want a link to a file, for example,
- nXhtml lets you browse for the file and then inserts a relative
- link to it. It can also look for anchors (ie <b>id</b> attributes).
- </p>
- <p>
- In some cases nXhtml knows more about a tag.
- From the DTD it knows that an <b>&lt;img></b> tag should have a <b>src</b> attribute with a value that points to an image.
- Therefor it prompts you for the value of the src attribute.
- It is the same with the <b>alt</b> attribute that is required.
- It even gets the height and width of an image on file if it can and inserts the attributes in the &lt;img> tag.
- </p>
- <p>
- Well, it is better that you test (and perhaps give some feedback?).
- </p>
- <p>
- Normally nXhtml does not care that much. It just tells you that
- you when you have broken the DTD rules. If however you want
- nXhtml to do less or more of this kind then you can change the
- variable <b>nxhtml-complete-tag-do-also</b> - but that requires
- that you knows Emacs lisp. If you do write something useful for
- this, please tell me.
- </p>
-
- <h3 id="ask-compl">But How Do I Ask nXhtml for Alternatives?</h3>
- <p>
- Oh, I nearly forgot. Do you wonder how to ask nXhtml in Emacs for completion alternatives?
- That is a nice question to answer.
- You give a certain command to Emacs to ask for this.
- That can be done by either:
- </p>
- <ul>
- <li>Type <i>M-Tab</i></li>
- <li>Do it from the <a href="#nxhtml-menu">nXhtml menu</a>: <i>nXhtml - Completion - Complete tag, attributes etc</i></li>
- <li>Or more explicit with a command: <i>M-x nxml-complete</i></li>
- </ul>
- <p>
- You can change <i>M-Tab</i> to whatever you want. What it
- means? Ah, yes, it means <i>"hold down the Meta key and press
- Tab"</i>. That is Emacs jargon and you have to know which key
- is the Meta key of course. I actually use the left Windows key
- on my keyboard for Meta. See <a
- href="http://ourcomments.org/Emacs/EmacsW32.html">EmacsW32 home
- page</a> for some information about this if you are on MS
- Windows.
- </p>
-
- <h3 id="region-compl">The Region and Completion</h3>
- <p>
- This is a small but useful thing (and I added it because some people liked it, it
- was not my own idea): If some text is selected (in Emacs jargon
- "if region is active and hilighted") and you use completion to
- insert a tag then the <em>region will be surrounded by that tag</em>.
- If region is active like here:
- </p>
- <img alt="Region is selected" src="img/region-selected.png" width="584" height="50"
- style="border: thin dotted #00ff00;
- vertical-align: top;
- margin-bottom: 1em;" />
- <p>
- And you then ask for completion:
- </p>
- <img alt="Ask for tag" src="img/region-selected-completion.png" width="584" height="393"
- style="border: thin dotted #00ff00;
- vertical-align: top;
- margin-bottom: 1em;" />
- <p>
- The result will be that your choice (<em>em</em> here) will surround the region you had selected:
- </p>
- <img alt="After completion" src="img/region-selected-after.png" width="584" height="61"
- style="border: thin dotted #00ff00;
- vertical-align: top;
- margin-bottom: 1em;" />
- <p>
- Eh? Ah, yes, you are right. I happened to choose the wrong picture for the result. Sorry.
- </p>
-
- <h3 id="errors">And if I Do Not Follow the Advices?</h3>
- <p>
- nXhtml gives you advices about how to handle the XHTML tags, but
- it does not force you to follow them. You can write whatever
- you want, but nXhtml anyway observes what you are doing and
- checks the XHTML code. If you do not follow the DTD rules
- nXhtml will silently warn you with a red underline, like here
- (where I have written <i>image</i> instead of <i>img</i>):
- </p>
- <img alt="Validation error marking" src="img/validation-error.png" width="375" height="50"
- style="border: thin dotted #00ff00;"
- />
- <p>
- (Oh, geeh. Firefox took that before, but not now ...)
- </p>
-
- <h2 id="xmlpath" style="clear:both">Where am I? - XML Path</h2>
-
- <p>
- If you have for example &lt;div> tags to separate things or long
- list you may wonder in which of those you are. Nxml Mode can
- show this. Look in the menus <i>XHTML - XML Path</i> to turn it
- on. Here is what it looks like. There is header with the label <i>Path:</i> which here shows that we are in a list with id="sum-ul".
- Note also the yellow color of the tag we are in. The whole path up to the top is colored this way.
- </p>
- <img alt="Showing XML Path" src="img/nxml-where.png" width="456" height="262" />
- <p>
- A little tip: I found this very useful when I looked at different CSS designs.
- </p>
-
- <h2 id="sites">Why it is Useful that nXhtml has Sites</h2>
- <p>
- I am writing this in nXhtml mode in Emacs. Just after I had
- written a piece or added an image on my pc I update the web
- pages on http://OurComments.org/. I do that very easily because
- of the concept of a site.
- </p>
- <p>
- A <b>site in nXhtml</b> is in its simplest form just a local directory tree.
- And that is given a name.
- In my case I have given it the name <i>nxhtml-doc</i> just to remember what it is about.
- </p>
- <p>
- To that site I have also added information about uploading and
- and the http address of the uploaded files. Now if I add an
- image to the site on my pc all I have to do to upload it to the
- web site is to open the image in Emacs (yes that is possible,
- Emacs knows about the most common image formats) and then just from the menus choose
- <i>Web Site - File Transfer - Upload Single File</i>.
- That is all.
- </p>
- <p>
- And then I can (from the XHTML file I am editing) use the
- command <i>XHTML - File Transfer - View Uploaded File</i> to
- check that the web page is ok.
- </p>
-
- <h2 id="mlinks">Why the Links Look Like Links</h2>
- <p>
- As soon as you open an XHTML file in nXhtml mode you will notice that the links you enter looks like links.
- They are underlined and blue like in a web browser.
- You may think that that is kind of nice, but why do they look like that?
- </p>
- <p>
- It is just because they are links. You access them a little bit
- different in a web browser, just so that it does not interfere
- with editing. And because you may want to do different things
- with them. Take a look at the picture below. I have positioned
- point to a link and then pressed tha App key on my keyboard.
- That pops up a menu where I can see what I can do with the link:
- </p>
- <img alt="Link with popup menu" src="img/links-appmenu.png" width="529" height="189"
- style="border: thin dotted #00ff00;"
- />
- <p>
- As you can see I can copy the link (maybe not that useful
- often). I can open it - and that means edit the linked file in
- Emacs. That is useful. And then I can view the linked file in a
- web browser. Can be useful too.
- </p>
- <p>
- And then I can move between the links.
- </p>
- <p>
- All this is useful, at least for me. But there are some more
- things, in the menus <i>XHTML - Links</i>. Check them out, you
- may like them. They may save you time.
- </p>
-
- <h2 id="tocs">Did You Notice the Table of Contents at the Top?</h2>
- <p>
- Well, you should notice not because it exactly is the worlds
- most pretty table of content. But because it is there. And I
- did not write it. nXhtml mode wrote it for me.
- </p>
- <p>
- How it works? Just put <b>id</b> attributes on your header tags
- (h1-h6). Then position point where you want the table of
- contents. Tell nXhtml mode to write it by using the menus
- <i>XHTML - Table of Contents</i>.
- </p>
- <p>
- When you want to change it just ask nXhtml mode to rewrite it.
- </p>
- <p>
- And you can make it more pretty if you are good at CSS.
- </p>
-
- <h2 id="tidy">But I Can't Use this Cause my Files are HTML</h2>
- <p>
- That is a problem of course. You need to convert them to XHTML
- because that is what the browsers and all other tools are best
- at today.
- </p>
- <p>
- But don't worry. Didn't I tell you that nXhtml knows about <a
- href="http://tidy.sourceforge.net/">Tidy For XHTML</a>? (It
- even comes together with nXhtml if you get it with EmacsW32.)
- </p>
- <p>
- Tidy can convert your HTML files to XHTML.
- Just open a file in nXhtml mode then use the <i>Tidy</i>
- menu and choose what you want to do there.
- </p>
- <p>
- If you do it file-by-file you can compare the "tidied" XHTML
- version of the file and your old version side by side (using
- Emacs Ediff command actually - an interactive way to compare).
- You can also tidy a whole directory tree at once.
- </p>
-
- <h2 id="php">And what about Multiple Modes like PHP?</h2>
- <p>
- nXhtml mode can handle multiple modes in a buffer. The
- benefits of nXml style completion can still be used. This
- can even be done when there is no header in the file that
- tells what DTD to use for the completion.
- </p>
- <p>
- Mumamo, which is part of nXhtml, implements what it
- calls <i>multi major modes</i> for handling multiple major
- modes in a buffer. Instead of turning on a major mode for a
- buffer you turn on a multi major mode and Mumamo will handle
- the rest. Multi major modes has names like nxhtml-mumamo,
- html-mumamo, django-nxhtml-mumamo etc.
- </p>
- <p>
- When point is in a PHP part then the major mode is switched
- to php-mode, with all that means. Here you can see how that
- looks:
- </p>
- <img alt="In PHP part" src="img/php-in-nxhtml.png" width="448" height="294" />
- <p>
- If you move the point outside of those &lt;?php ... ?&gt; areas
- then the mode is automatically switched to nxhtml-mode
- instead. Now you can use the power of nxhtml-mode and
- do for example completion, like here:
- </p>
- <img alt="In XHTML part" src="img/php-in-nxhtml-2.png" width="450" height="294" />
- <p>
- The switching is done with a short delay so that it does not
- interfere with your normal editing. That's it. (But maybe
- there should be a better php-mode? Does someone has any
- better than the one that comes with nXhtml now?)
- </p>
-
- <h3 id="dtd-needed">But I Have no DTD Links in my PHP Files?</h3>
- <p>
- Ah, yes. Good question. You are right. nXhtml mode needs a
- DTD to be able to help you with XHTML and completion. I
- thought it was impossible for a normal human to get that
- working.
- </p>
- <p>
- But it turned out to be surpricingly simple and it works
- quite nicely now. The first time you do completion of XHTML
- code in a buffer where you do not have the needed XHTML
- headers nXhtml mode will ask you for what it calls a
- <em>fictive XHTML validation header</em>. After that completion
- should work as usual. A fictive XHTML validation header in nXhtml
- mode is something that is used in the background for
- validation. It is not inserted in the buffer, but may be shown on the screen like this:
- </p>
- <img alt="fictive XHTML validation header" src="img/xml-validation-header.png" width="448" height="374" />
- <p>
- nXhtml does its best to guess what fictive XHTML Validation Header
- the buffer needs, but if the default fictive XHTML validation header
- does not fit you can customize the choices.
- </p>
- <p>
- Note: Do not try to set the XML schema directly when the XHTML
- headers are missing in the buffer. Use a fictive XHTML
- validation header instead.
- </p>
-
- <h3 id="multi-colors">Why Are Colors Different in Multiple Modes?</h3>
- <p>
- It has been necessary to replace the nxml-mode style
- fontification with the sgml-mode style. All other features
- of nXml/nXhtml modes should still work however.
- In all other cases the normal fontification colors are used.
- </p>
- <p>
- Or perhaps you mean the background colors? These are just a
- visual aid about the dividing into chunks with different
- major modes and they can be turned off. Do <em>M-x
- customize-group RET mumamo RET</em>.
- </p>
-
- <h3 id="part2">More Multiple Modes</h3>
- <p>
- nXhtml mode handles for example embedded style sheets the
- same way as it handles PHP chunks:
- </p>
- <!--
- <img alt="CSS embedded in XHTML" src="img/embedded-xhtml.png" width="448" height="294" />
- -->
- <img alt="CSS embedded in XHTML" src="img/style-in-nxhtml.png" width="448" height="278" />
- <p>
- Currently it can handle PHP, CSS, JavaScript, eRuby, JSP and
- some other minor cases. If you can program in elisp it is
- not a very big deal adding support for other embedded
- languages. (I do not use all the languages above myself so
- please give me feedback if there is something you think
- could be done better.)
- </p>
- <p>
- Please notice also that each major mode handles completion
- in its own ways. The popup style completion is currently
- only used by nXhtml mode, not the other major modes even if
- they are on the same page.
- </p>
- <p>
- The use of multi major modes is not constrained to nXhtml.
- You can use that when editing other files too. To see what
- multi major modes are currently defined in your Emacs
- session see the
- variable <i>mumamo-defined-turn-on-functions</i>.
- </p>
-
- <h3 id="tips-multi">Tips When Using Multiple Modes</h3>
- <p>
- The routines dividing into chunks with different major modes is not that very supersmart.
- They do not know much about the languages of the major modes.
- So if you write something like this:
- </p>
- <pre>
- &lt;?php
- echo '&lt;'?xml version="1.0" encoding="utf-8"?'>';
- ?&gt;
- </pre>
- <p>
- it will get very, very confused. If you are not fond of that
- you better write it like this instead:
- </p>
- <pre>
- &lt;?php
- echo '&lt;'; echo '?xml version="1.0" encoding="utf-8"?'; echo '>';
- ?&gt;
- </pre>
- <p>
- For a similar problem <a href="nxhtml-changes.html#php-attribute-values">attribute values computed by PHP</a>.
- </p>
- <p>
- When editing PHP sometimes the validation of the XHTML part
- gets quite upset. You may even think that it is unuseful
- (since trying to complete gives you nothing), but it is not.
- Here is what you can do:
- </p>
- <ul>
- <li>
- Turn on <em>Fictive XHTML Validation Header</em> from
- menus. (In <em>nXhtml - Completion</em>.) That will try
- to guess a how to start validation. It shows a fictive
- header at the top of the buffer to show you what is goind
- on (nothing is inserted in the buffer).
- </li>
- <li>
- If you do not think the red underlines you get are very
- pretty then you can hide them. Use the menus again,
- <em>Hide Validation Errors</em>.
- </li>
- </ul>
- <p>
- And maybe you do not think the background colors when using
- Multiple Major Modes is very smart? Then just go ahead and
- remove them. Customize.
- <em>M-x customize-group RET mumamo RET</em>.
- </p>
-
- <h2 id="file-assoc">File Associations within Emacs</h2>
- <p>
- Some file associations are changed within Emacs to get
- multiple modes to work without requiring the user to do
- anything. Good for a new user I guess, but I understand
- that old Emacs users may want more control over this. If
- you are one of them then please look in
- <em>nxhtml-autoload.el</em> which is where the associations
- are made.
- </p>
-
- <h2 id="bloggin">Not for Me, I Am Only Blogging</h2>
- <p>
- Not for you?
- Ah, wait a minute.
- Blogging, that is exactly one of the things that I myself use this for.
- </p>
- <p>
- When you blog you only write part of an XHTML page, so you
- may think that all the nicities of nXhtml mode like
- validation and completion does not work. They do. (If you
- wonder how, then please read <a href="#dtd-needed">But I
- Have No DTD Links In My PHP Files</a>. Though you do not
- have to read this to start using nXhtml for writing blog
- texts and comments.)
- </p>
- <p>
- The setup for blogging is simple
- </p>
- <ol>
- <li>
- <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> - which you of course already use ...
- </li>
- <li>
- The <a href="https://addons.mozilla.org/en-US/firefox/addon/4125">It's All Text</a> add-on to Firefox.
- It should use Emacs client:
- <p>
- <img alt="It's All Text preferences" src="img/itsalltext-pref.png" width="371" height="352" />
- </p>
- </li>
- <li>
- And finally: Customize the little elisp library that comes with nXhtml:
- <p style="padding-left:2em; font-size: 1em; font-weight: 600;">
- M-x customize-group RET as-external RET
- </p>
- You just need to turn <i>as-external</i> on there.
- </li>
- </ol>
- <p>
- With this setup you just press F2 in any text area in
- Firefox and then you got the text to edit in Emacs - using
- nXhtml for completion etc. Finish and save with <b>C-x
- #</b>.
- </p>
-
-<!-- <img alt="Edit part of an XHTML file" src="img/edit-part.png" width="448" height="390" /> -->
-
- <h2 id="bloggin">And Other Goodies...</h2>
- <p>
- There are a lot of other things in the package too, please
- see the nXhtml menu in Emacs. You can for example find a
- n-back-game (if you do not know what it is now, do not
- worry, just try it and you will learn - and understand why I
- put it there).
- </p>
- </div>
-
- <hr align="left" class="footer" />
- <p class="footer">
- Copyright &copy; 2008 OurComments.org
- <br style="margin:0; padding:0; line-height: 0;" />
- Design thanks to <a href="http://www.oswd.org/">OSWD</a>
- <br />
- </p>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/grapes.css b/emacs.d/nxhtml/nxhtml/doc/wd/grapes/grapes.css
deleted file mode 100644
index c325dfd..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/grapes.css
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Grapes, web template for business or for fun */
-/* By Dave Reeder, www.davereederdesign.com */
-
-body {margin: 0; padding: 0; background: #213205}
-
-* {margin: 0; padding: 0; border: 0; font-family: Arial, Helvetica, sans-serif}
-
-
-/*----------------------------------------------Basic styles------------------------------------------------*/
-
-h1, h2, h3, h4 {font-family: Georgia, Georgia, serif; margin: 15px 0 0 5px; color: #fff; font-weight: normal; text-decoration: none}
-h1 em, h2 em, h3 em, h4 em {font-family: Georgia, Georgia, serif; font-weight: normal} /* italic words in titles */
-
-h1 {position: absolute; right: 0px; top: 30px; font-size: 2.25em; letter-spacing: 0.1em; line-height: 1.00em; padding-right: 10px; border-right: 15px solid #fff}
-h1:first-letter {font-family: Georgia, Georgia, serif; font-size: 2.25em} /* styles the first letter of the main title to make it large */
-
-p#tagline {position: absolute; right: 0px; top: 125px; font-style: italic; color: #648D20; font-size: 0.90em} /* sits under main title */
-
-h2 {font-size: 1.30em; letter-spacing: 0.05em}
-
-p, ul, ol {margin: 10px 10px 0 7px; font-size: 0.70em; line-height: 1.60em; color: #000; letter-spacing: 0.05em}
-
-code {font-family: monospace; font-size: 1.20em; color: #E20000}
-
-p span {font-size: 1.50em; font-weight: bold} /* shouting words */
-
-a:link, a:visited {color: #792533; font-weight: bold; text-decoration: none; border-bottom: 1px solid #792533}
-a:hover, a:active {color: #fff; border-color: #fff}
-
-ul {list-style: inside square} /* general lists */
-
-acronym {font-weight: bold; border-bottom: 1px dashed #000; cursor: help}
-
-
-/*-----------------------------------------------Layout DIVS------------------------------------------------*/
-
-#container { /* keeps everything together */
-position: relative;
-margin: 0 auto;
-width: 620px;
-background: url(images/bkgrnd.gif) 0 0 repeat-y #CCCC33; /* Important image, do not remove */
-overflow: hidden
-}
-
-#hdr { /* div containing h1, nav and grapes image */
-float: left;
-width: 620px;
-height: 200px;
-background: url(images/grapes.jpg) 0 0 no-repeat #CCCC33 /* Image of Grapes */
-}
-
-#lftcol { /* left column */
-position: absolute;
-left: 0px;
-top: 200px;
-margin-left: 50px; /* leave this so that background image lines up with edge of this div */
-width: 200px;
-background: transparent;
-overflow: hidden
-}
-
-#rgtcol {float: right; width: 370px; padding-bottom: 30px; background: transparent; overflow: hidden} /* right column */
-
-#bttmbar {float: right; text-align: center; font-size: 0.70em; height: 4em; line-height: 4em; width: 570px; background: #CCCC33; border-top: 1px solid #D9D93C}
-
-#quote { /* Quote box in left column */
- float: left;
- margin: 10px 0 20px 10px;
- padding: 10px 0;
- width: 170px;
- text-align: center;
- background: url(images/quote.gif) no-repeat 0 0
-}
-
-#quote p {color: #444; font-size: 0.80em; font-weight: bold; line-height: 2.00em} /* Quote box text */
-
-
-/*---------------------------------------------Main Navigation-----------------------------------------------*/
-
-ul#nav { /* navigation list */
- margin: 53px 0 20px 0; /* the 53px is where the nav begins (margin top) */
- padding: 0;
- list-style: none inside
-}
-
-ul#nav li {float: left; display: block}
-
-ul#nav li a {
- width: 170px;
- margin: 3px 0 0 0; /* a little top margin */
- border: 0;
- border-left: 10px solid #CCCC33;
- padding: 10px 5px;
- font-family: Georgia, Georgia, serif;
- font-weight: normal;
- text-decoration: none;
- display: block;
- color: #450F1F;
- background: #D9D93C
-}
-
-ul#nav li a#current {border-color: #fff} /* current page, move id in the xhtml when creating a new page */
-
-ul#nav li a:hover {background: #9EA219; color: #fff}
-
-
- \ No newline at end of file
diff --git a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/bkgrnd.gif b/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/bkgrnd.gif
deleted file mode 100644
index cdec922..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/bkgrnd.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/grapes.jpg b/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/grapes.jpg
deleted file mode 100644
index 21d98f5..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/grapes.jpg
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/quote.gif b/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/quote.gif
deleted file mode 100644
index ed81a24..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/images/quote.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/index.html b/emacs.d/nxhtml/nxhtml/doc/wd/grapes/index.html
deleted file mode 100644
index 3fd0fe3..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html>
-<head>
-<title>Grapes</title>
-<link rel="stylesheet" type="text/css" href="grapes.css" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<meta name="author" content="Your name here" />
-<meta name="Copyright" content="Copyright (c) Your copyright here 2005" />
-</head>
-<body>
-<div id="container">
-<div id="hdr">
-<h1>grapes</h1>
-<p id="tagline">fruit, wine &amp; web design</p>
-</div>
-
-<div id="lftcol">
- <ul id="nav">
- <li><a href="" id="current">Introduction</a></li>
- <li><a href="">Our Wines</a></li>
- <li><a href="">Important Grapes</a></li>
- <li><a href="">Contact Us</a></li>
- <li><a href="">Links</a></li>
- </ul>
-
-<div id="quote">
-<p><em>A great source for information...</em></p>
-</div>
-
-<h3>More stuff</h3>
- <ul>
- <li><a href="http://validator.w3.org/check?uri=referer">Validate XHTML</a></li>
- <li><a href="http://jigsaw.w3.org/css-validator/check/referer">Validate CSS</a></li>
- <li><a href="http://www.davereederdesign.com/">Authors Website</a></li>
- <li><a href="http://www.oswd.org/">OSWD</a></li>
- </ul>
-
-</div>
-
-
-
-<div id="rgtcol">
-<h2>Introduction</h2>
-<p>Hello and welcome to my latest template called &quot;Grapes&quot;.
-<br />
-&quot;Grapes&quot; is an Open Source web template which means it can be used without the need to ask permission and you have full rights to use and adapt its images. For more of my work, please see my website which can be found <a href="http://www.davereederdesign.com/">here.</a>
-</p>
-<p>
-I wanted to create a fairly simple yet attractive template which can be used for food or wine related websites, although it can easily be adapted for other uses too.
-</p>
-
-
-<h2>But is it <em>easy</em> to Use?</h2>
-<p>&quot;Grapes&quot; should be quite easy to use as I have added plenty of comments and tried to make the <acronym title="Cascading Style Sheet">CSS</acronym> as neat and organised as possible.
-</p>
-<p>There are also plenty of styles for other tags, including:</p>
-
-<p><code>Text using the code tag, this is ideal for showing code on a page.</code></p>
-
-<p><acronym title="acronym text">acronym text</acronym></p>
-
-<p><strong>strong or bold text</strong></p>
-
-<p><em>em or italic text</em></p>
-
-<p>This is a paragraph of normal text that contains <span>span</span> tags with a class set to <span>special</span>. This means all the <span>big words</span> in this paragraph are words that are placed between opening and closing <span>span</span> tags. These span tags can be used to add meaning to a block of text or to <span>shout out</span> when needed.</p>
-</div>
-
-<div id="bttmbar">Copyright &copy; Your Copyright Info</div>
-
-
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/nxhtml-grapes.css b/emacs.d/nxhtml/nxhtml/doc/wd/grapes/nxhtml-grapes.css
deleted file mode 100644
index a241c1e..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/wd/grapes/nxhtml-grapes.css
+++ /dev/null
@@ -1,252 +0,0 @@
-/* Grapes, web template for business or for fun */
-/* By Dave Reeder, www.davereederdesign.com */
-
-body {margin: 0; padding: 0; background: #213205}
-
-/* * {margin: 0; padding: 0; border: 0; font-family: Arial, Helvetica, sans-serif} */
-* {font-family: Arial, Helvetica, sans-serif}
-
-/*----------------------------------------------Basic styles------------------------------------------------*/
-
-h1, h2, h3, h4 {font-family: Georgia, Georgia, serif; margin: 15px 0 0 5px; color: #fff; font-weight: normal; text-decoration: none}
-h1 em, h2 em, h3 em, h4 em {font-family: Georgia, Georgia, serif; font-weight: normal} /* italic words in titles */
-
-h1 {xposition: absolute; right: 0px; top: 30px; font-size: 2.25em; letter-spacing: 0.1em; line-height: 1.00em; padding-right: 10px; border-right: 15px solid #fff}
-h1:first-letter {font-family: Georgia, Georgia, serif; font-size: 2.25em} /* styles the first letter of the main title to make it large */
-
-p#tagline {position: absolute; right: 0px; top: 125px; font-style: italic; color: #648D20; font-size: 0.90em} /* sits under main title */
-
-h2 {font-size: 1.40em; letter-spacing: 0.05em}
-h3 {font-size: 1.00em; letter-spacing: 0.05em}
-
-p {
-/* margin: 10px 10px 0 7px; */
-}
-p, ul, ol {
- font-size: 0.75em; xline-height: 1.60em; color: #000; letter-spacing: 0.05em
-}
-dt {font-size: 0.9em;}
-ul li ul {font-size: 1em;}
-ul li ul {
- margin-bottom: 0;
- margin-top: 0;
-}
-
-code {font-family: monospace; font-size: 1.20em; color: #E20000}
-
-/* p span {font-size: 1.50em; font-weight: bold} /\* shouting words *\/ */
-
-a:link, a:visited {
- color: #792533;
- /* font-weight: bold; */
- /* I can see why a border-bottom was used, but I do not have time to
- fix it now */
- /* text-decoration: none; */
- /* border-bottom: 1px solid #792533; */
-}
-a:hover, a:active {color: #fff; border-color: #fff}
-
-#getit a {
- text-decoration: none;
-}
-#getit a:visited {
- color: #792533;
-}
-#getit a:hover, #getit a:active {
- color: red;
-}
-#nxhtml-home a:hover, #nxhtml-home a:active {
- color: red;
-}
-#nxhtml-home {
- margin-bottom:3em;
- background-color:white;
- padding: 0.5em;
-}
-
-nul {list-style: inside square} /* general lists */
-nul ul {list-style: inside circle} /* general lists */
-
-acronym {font-weight: bold; border-bottom: 1px dashed #000; cursor: help}
-
-p, li, dt, dd {
- margin-right: 1em;
-}
-dt {
- margin-top: 1em;
- margin-bottom: 0.5em;
-}
-li ul li {
- margin-right: 0;
-}
-table, td {
- margin: 0;
- padding: 0;
- cell-padding: 0;
- //font-size:0.9em;
-}
-
-li p {
- font-size: 1em;
-}
-
-/*-----------------------------------------------Layout DIVS------------------------------------------------*/
-
-#xgetit {
- font-size: 0.6em;
- float: left;
- width: 20em;
- background: white;
- text-decoration: none;
- padding: 0.5em;
- padding-left: 1em;
- margin-left: 1em;
- margin-top: 1em;
-}
-/* * { text-decoration: none; } */
-#container { /* keeps everything together */
- position: absolute;
- margin: 0 auto;
- margin-top: 0;
- /* width: 620px; */
- margin-right: 17%;
- background: url(images/bkgrnd.gif) 0 0 repeat-y #CCCC33; /* Important image, do not remove */
- xoverflow: hidden;
-}
-
-#hdr { /* div containing h1, nav and grapes image */
- float: left;
- width: 260px;
- height: 250px;
- background: url(images/grapes.jpg) 0 0 no-repeat #CCCC33 /* Image of Grapes */
-}
-
-#xmainhdr {
- xfloat: right;
- width: 100px;
- height: 100px;
-}
-
-#lftcol table li a {
- /* text-decoration: none; */
-}
-#lftcol { /* left column */
- /* position: absolute; */
- float: right;
- /* left: 0px; */
- /* top: 200px; */
- /* margin-left: 50px; /* leave this so that background image lines up with edge of this div */
- margin-bottom: 50px; /* Quck fix for img menu */
- margin-right: 1em;
- background: transparent;
-}
-
-#rgtcol {
- xfloat: left;
- clear: both;
- margin-left: 100px;
- max-width: 600px;
- padding-bottom: 30px; background: transparent; xoverflow: hidden; /* right column */
-}
-
-.footer {
- float: left;
- width: 19em;
- clear: both;
-}
-hr.footer {
- width: 19em;
- float: left;
- text-align: left;
- margin-bottom: 0;
- margin-left: 0;
- padding-left: 0;
-}
-p.footer {
- margin-left: 1em;
- margin-right: 1em;
- color: #564;
- //font-size: 0.8em;
- //padding: 0;
- //margin-bottom: 1em;
- //padding-bottom: 1em;
-}
-
-#bttmbar {float: right; text-align: center; font-size: 0.70em; height: 4em; line-height: 4em; width: 570px; background: #CCCC33; border-top: 1px solid #D9D93C}
-
-#quote { /* Quote box in left column */
- float: left;
- margin: 10px 0 20px 10px;
- padding: 10px 0;
- width: 170px;
- text-align: center;
- background: url(images/quote.gif) no-repeat 0 0
-}
-
-#quote p {color: #444; font-size: 0.80em; font-weight: bold; line-height: 2.00em} /* Quote box text */
-
-
-/*---------------------------------------------Main Navigation-----------------------------------------------*/
-
-ul#nav { /* navigation list */
- margin: 53px 0 20px 0; /* the 53px is where the nav begins (margin top) */
- padding: 0;
- list-style: none inside
-}
-
-ul#nav li {float: left; display: block}
-
-ul#nav li a {
- width: 170px;
- margin: 3px 0 0 0; /* a little top margin */
- border: 0;
- border-left: 10px solid #CCCC33;
- padding: 10px 5px;
- font-family: Georgia, Georgia, serif;
- font-weight: normal;
- text-decoration: none;
- display: block;
- color: #450F1F;
- background: #D9D93C
-}
-
-ul#nav li a#current {border-color: #fff} /* current page, move id in the xhtml when creating a new page */
-
-ul#nav li a:hover {background: #9EA219; color: #fff}
-
-#PAGETOC {
- float: left;
-}
-#PAGETOC * {
- font-size: 12px;
-}
-#PAGETOC ul {
- margin: 0;
- margin-top: 1em;
- padding: 0;
-}
-#PAGETOC li {
- font-size: 1em;
- list-style-type: none;
- margin: 0em;
-}
-#PAGETOC ul li ul {
- padding-left: 1.5em;
- margin: 0em;
-}
-#PAGETOC li, #PAGETOC li ul li {
- font-weight: bold;
- display: block;
-}
-#PAGETOC li ul li {
- font-weight: 500;
-}
-
-#PAGETOC .tochead {
- font-size: 10px;
- background-color: #c0ff3e;
- background-color: #9acd32;
- background-color: #b3ee3a;
- padding: 4px;
-}
-
diff --git a/emacs.d/nxhtml/nxhtml/doc/working-demo.html b/emacs.d/nxhtml/nxhtml/doc/working-demo.html
deleted file mode 100644
index 0752f85..0000000
--- a/emacs.d/nxhtml/nxhtml/doc/working-demo.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Something</title>
- <script type="text/javascript" src="js/smoothgallery/scripts/mootools.uncompressed.js"></script>
- <script type="text/javascript" src="js/smoothgallery/scripts/jd.gallery.js"></script>
- <link rel="stylesheet" href="js/smoothgallery/css/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />
- </head>
- <body>
- <h1>My 1st demo</h1>
- <script type="text/javascript">
- function startGallery() {
- var myGallery = new gallery($('myGallery'), {
- timed: true,
- delay: 9000,
- embedLinks: false,
- showArrows: true,
- showCarousel: false,
- showInfopane: true,
- });
- }
- window.onDomReady(startGallery);
- </script>
-
- <div class="content">
- <div id="myGallery">
- <div class="imageElement">
- <h3>Popup completion</h3>
- <p>
- popup stlye completion
- popup stlye completion
- popup stlye completion
- popup stlye completion
- popup stlye completion
- popup stlye completion
- popup stlye completion
- popup stlye completion
- popup stlye completion
- </p>
- <img src="img/popup-compl.png" class="full" />
- </div>
- <div class="imageElement">
- <h3>Emacs style completion</h3>
- <p> emacs stlye completion </p>
- <a href="#" title="open image" class="open"></a>
- <img src="img/emacs-style-completion.png" class="full" />
- <img src="ximages/brugges2006/1-mini.jpg" class="thumbnail" />
- </div>
- <div class="imageElement">
- <h3>Edit part</h3>
- <p> edit part </p>
- <a href="#" title="open image" class="open"></a>
- <img src="img/edit-part.png" class="full" />
- <img src="ximages/brugges2006/1-mini.jpg" class="thumbnail" />
- </div>
- </div>
- </body>
- </html>
diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk.el b/emacs.d/nxhtml/nxhtml/html-chklnk.el
deleted file mode 100644
index 6fdbb49..0000000
--- a/emacs.d/nxhtml/nxhtml/html-chklnk.el
+++ /dev/null
@@ -1,168 +0,0 @@
-;;; html-chklnk.el --- Check links in local HTML sites
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Wed Mar 15 14:46:17 2006
-(defconst html-chklnk:version "0.2") ;; Version:
-;; Last-Updated: Tue Apr 10 04:12:32 2007 (7200 +0200)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (add-to-list 'load-path default-directory load-path))
-(eval-when-compile
- (when (> emacs-major-version 22)
- (let* ((load-path load-path)
- (this-file (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- (this-dir (file-name-directory this-file)))
- (add-to-list 'load-path (expand-file-name "../../lisp" this-dir))
- (require 'w32shell nil t))))
-
-
-(eval-when-compile (require 'html-site nil t))
-(require 'compile)
-
-;;;###autoload
-(defgroup html-chklnk nil
- "Customization group for html-chklnk."
- :group 'nxhtml)
-
-(defcustom html-chklnk-dir
- (file-name-as-directory
- (expand-file-name
- "html-chklnk"
- (file-name-directory
- (if load-file-name load-file-name buffer-file-name))))
-
- "Directory where the tools needed are located.
-"
- :type 'directory
- :group 'html-chklnk)
-
-(defun html-chklnk-check-site-links (start-file)
- "Check local file web site links.
-Currently only internal links are checked."
- (interactive
- (progn
- (html-site-current-ensure-site-defined)
- (if (y-or-n-p "Start from a given file and check links from there? ")
- (let* ((default-start (if (html-site-current-contains buffer-file-name)
- buffer-file-name
- (car (directory-files (html-site-current-site-dir)
- nil
- "\\.html?$"))))
- (start-file
- (read-file-name "Start checking from file: "
- (html-site-current-site-dir)
- nil
- nil
- default-start)))
- (unless (html-site-dir-contains (html-site-current-site-dir) start-file)
- (error "File %s is not in the site %s" start-file html-site-current))
- (list start-file))
- (list nil))))
- (let* ((default-directory html-chklnk-dir)
- (compile-cmd (concat "perl link_checker.pl "
- "--site="
- ;;(html-chklnk-convert-file-name
- (html-site-current-site-dir)
- ;;)
- (if start-file
- (concat " --start="
- ;;(html-chklnk-convert-file-name
- start-file
- ;;)
- )
- "")))
- (compilation-buffer-name-function
- '(lambda (dummy) (concat "** Checking links in site "
- html-site-current " **")))
- (compilation-scroll-output t)
- (compilation-error-regexp-alist-alist
- '(
- (html-chklnk
- "^\\(.*\\)\\s-+at line \\([0-9]+\\):"
- 1 ;; file
- 2 ;; line
- )))
- (compilation-error-regexp-alist '(html-chklnk))
- ;;(shell-file-name "cmd")
- ;;(explicit-shell-file-name "cmd")
- ;;(shell (concat exec-directory "cmdproxy.exe"))
- ;;(old-w32shell nil)
- )
- ;; There are trouble with perl paths
-;; (when (featurep 'w32shell)
-;; (when w32shell-current-shell-path
-;; (setq old-w32shell w32shell-current-shell-path)
-;; (w32shell-set-shell "cmd")))
- ;;(message "uses-cygwin=%s" uses-cygwin)(sit-for 8)
-
- (if (fboundp 'w32shell-save-shell)
- (w32shell-save-shell
- "cmd"
- (compile compile-cmd))
- (compile compile-cmd))
-
-;; (when old-w32shell
-;; (cond ((string= old-w32shell w32shell-cygwin-bin)
-;; (w32shell-set-shell "cygwin"))
-;; ((string= old-w32shell w32shell-msys-bin)
-;; (w32shell-set-shell "msys"))))
- ))
-
-(defun html-chklnk-convert-file-name (filename)
- (let ((uses-cygwin (and (featurep 'w32shell)
- (string= w32shell-current-shell-path
- w32shell-cygwin-bin)))
- (case-fold-search t)
- )
- (save-match-data
- (if (and uses-cygwin
- (string-match "^\\([a-z]\\):" filename))
- (concat "/cygdrive/" (match-string 1 filename)
- (substring filename 2))
- filename))))
-
-
-
-
-(provide 'html-chklnk)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-chklnk.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm
deleted file mode 100644
index 14b0ccb..0000000
--- a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm
+++ /dev/null
@@ -1,774 +0,0 @@
-### File: LinkWalker.pm
-### Author: Lennart Borgman
-### All rights reserved
-
-##########################################################
-### UserAgent module
-##########################################################
-package LWP::WalkerUA;
-require LWP::UserAgent;
-@ISA = qw(LWP::UserAgent);
-
-### Mirror to another file (why???)
-sub mirror
-{
- my($self, $url, $file, $mirr_tmp) = @_;
- die "no mirr_tmp" unless defined $mirr_tmp;
-
- LWP::Debug::trace('()');
- my $request = new HTTP::Request('GET', $url);
-
- if (-e $file) {
- my($mtime) = (stat($file))[9];
- if($mtime) {
- $request->header('If-Modified-Since' =>
- HTTP::Date::time2str($mtime));
- }
- }
- my $tmpfile = "$file-$$";
-
- my $response = $self->request($request, $tmpfile);
- if ($response->is_success) {
-
- my $file_length = (stat($tmpfile))[7];
- my($content_length) = $response->header('Content-length');
-
- if (defined $content_length and $file_length < $content_length) {
- unlink($tmpfile);
- die "Transfer truncated: " .
- "only $file_length out of $content_length bytes received\n";
- } elsif (defined $content_length and $file_length > $content_length) {
- unlink($tmpfile);
- die "Content-length mismatch: " .
- "expected $content_length bytes, got $file_length\n";
- } else {
- # OK
- if (-e $mirr_tmp) {
- # Some dosish systems fail to rename if the target exists
- chmod 0777, $mirr_tmp;
- unlink $mirr_tmp;
- }
- rename($tmpfile, $mirr_tmp) or
- die "Cannot rename '$tmpfile' to '$mirr_tmp': $!\n";
-
- if (my $lm = $response->last_modified) {
- # make sure the file has the same last modification time
- utime $lm, $lm, $mirr_tmp;
- }
- }
- } else {
- unlink($tmpfile);
- }
- return $response;
-}
-
-
-##########################################################
-### Parser module
-##########################################################
-package HTML::WalkerParser;
-require HTML::ParserTagEnd;
-@ISA = qw(HTML::ParserTagEnd);
-use strict;
-use vars qw(%LINK_ELEMENT);
-
-# Elements that might contain links and the name of the link attribute
-%LINK_ELEMENT =
-(
- body => 'background',
- base => 'href',
- a => 'href',
- img => [qw(src lowsrc usemap)], # 'lowsrc' is a Netscape invention
- form => 'action',
- input => 'src',
-'link' => 'href', # need quoting since link is a perl builtin
- frame => 'src',
- applet => [qw(codebase code)],
- area => 'href',
- iframe => 'src', # Netscape 2.0 extention
- embed => 'src', # used in Netscape 2.0 for Shockwave and things like that
-);
-
-my %LINKATTRIBS = (
- "href" => 1,
- "src" => 1,
- "action" => 1,
- "background" => 1,
- "usemap" => 1,
- "code" => 1,
- "codebase" => 1,
- "lowsrc" => 1,
- );
-my %MAYBECONT = (
- a => 'href',
- area => 'href',
- form => 'action',
- frame => 'src',
- iframe => 'src',
- );
-
-sub maybecont($$) {
- my $tag = shift;
- my $att = shift;
- return unless exists $MAYBECONT{$tag};
- return ($MAYBECONT{$tag} eq $att);
-}
-
-sub new {
- my($class, $parsed_fh) = @_;
- my $self = $class->SUPER::new;
- $self->{parsed_fh} = $parsed_fh;
- $self;
-}
-
-
-
-
-
-
-
-##########################################################
-### Walker module
-##########################################################
-package HTML::LinkWalker;
-use strict;
-
-use IO::File;
-use File::Copy qw();
-use File::Path qw();
-use PathSubs qw();
-use HTML::Entities;
-use FindBin qw();
-
-
-##########################################################
-### Globals
-##########################################################
-my $ua;
-my $m_ua_personality = "LinkWalker/0.9";
-my %m_is_outside;
-my %m_is_container;
-my $m_bOnlyCont;
-my @m_sLinkRoots;
-my $m_subReport;
-my $m_subAction;
-my $m_subMirrorAction;
-
-
-#############################
-### Collecting info
-#############################
-my %m_CheckedLinks;
-my %m_MissedLinks;
-
-sub tell_bad_link($$$$$) {
- my $what = shift;
- my $file = shift;
- my $lnum = shift;
- my $link = shift;
- my $line = shift;
- $file = "START" unless defined $file;
- $lnum = "(start)" unless defined $lnum;
- my $longMsg = "<<$what>>";
- my $shortMsg = $what;
- if (defined $link) {
- my @lines = split("\\s+", $line);
- my $disp_line = join("\n\t\t ", @lines);
- $longMsg .= ",\n\t\tlink=$link\n\t\t$disp_line";
- }
- my @msg = ($shortMsg, $longMsg);
- $m_CheckedLinks{$file}->{ERR}->{$lnum} = \@msg;
- &$m_subReport("\t* Error * " . $what . "\n");
-} # tell_bad_link
-
-
-#############################
-### Helpers
-#############################
-
-sub get_contenttype($) {
- my $response = shift;
- my @rh = $response->header("Content-Type");
- for my $r (@rh) {
- my $c = $r;
- if ((my $iPos = index($r, ";")) > -1) {
- $c = substr($r, 0, $iPos);
- }
- return $c;
- }
-}
-sub is_linked_contenttype($) {
- my $response = shift;
- return (get_contenttype($response) eq "text/html");
-}
-
-sub ending_is_container($) {
- my $link_addr = shift;
- $link_addr =~ s!#.*$!!;
- $link_addr =~ s!\?.*$!!;
- return (($link_addr =~ m!\.s?html?$!i) ? 1 : 0);
-}
-
-my $m_sMirrorRoot;
-my $m_bMirror = 1;
-
-sub mk_mirror_name($) {
- my $orig_name = shift;
- $orig_name =~ tr!\\!/!;
- my $mirr_name = $orig_name;
- my ($orig_host) = ($orig_name =~ m!(^https?://[^/]*)!i);
- if (defined $orig_host) {
- my $host = $orig_host;
- $host =~ tr!:!_!;
- $host =~ tr!/!_!;
- $mirr_name =~ s!^$orig_host!$host!;
- if (substr($mirr_name, -1) eq "/") { $mirr_name .= "default.html"; }
- } else {
- die "Can't find host in $orig_name\n";
- }
- my $mirr_full = sMirrorRoot() . $mirr_name;
- if (!$m_bMirror) {
- my $sExt = $mirr_name; $sExt =~ s!.*\.([^\.]*$)!$1!;
- $mirr_full = sMirrorRoot() . "temp.$sExt";
- }
- my $mirr_fold = $mirr_full;
- $mirr_fold =~ s![^/]*$!!;
- File::Path::mkpath($mirr_fold, 0, 0777);
- return $mirr_full;
-}
-
-#############################
-### Checks
-#############################
-sub is_outside($) {
- my $uq_link_addr = shift;
- if (!exists $m_is_outside{$uq_link_addr}) {
- $m_is_outside{$uq_link_addr} = test_is_outside($uq_link_addr, \@m_sLinkRoots);
- }
- return $m_is_outside{$uq_link_addr};
-}
-sub set_is_container($$) {
- my $uq_link_addr = shift;
- return if exists $m_is_container{$uq_link_addr};
- $m_is_container{$uq_link_addr} = shift;
-}
-sub is_outside_container($) {
- my $uq_link_addr = shift;
- if (exists $m_is_container{$uq_link_addr}) {
- if ($m_is_container{$uq_link_addr}) {
- return is_outside($uq_link_addr);
- }
- }
-}
-sub test_is_outside($$) {
- my $uq_link_addr = shift;
- my $link_roots = shift;
- if (defined $link_roots) {
- my $in_roots;
- for my $link_root (@$link_roots) {
- if (substr($uq_link_addr, 0, length($link_root)) eq $link_root) {
- return 0;
- }
- }
- return 1;
- }
-} # is_outside
-
-
-
-##########################################################
-### Parsing
-##########################################################
-
-
-### Parser subs
-sub HTML::WalkerParser::declaration {
- my($self, $decl) = @_;
- return unless defined $self->{parsed_fh};
- my $fh = $self->{parsed_fh};
- print $fh "<!" . $decl . ">";
-}
-my $m_start_cb;
-sub HTML::WalkerParser::start {
- my($self, $tag, $attr, $ended) = @_;
- &$m_start_cb($tag, $attr);
- return unless defined $self->{parsed_fh};
- my $t = "<$tag";
- for my $k (keys %$attr) {
- my $encoded = encode_entities($$attr{$k});
- $t .= qq( $k="$encoded");
- }
- if ($ended) {
- $t .= " />";
- } else {
- $t .= ">";
- }
- my $fh = $self->{parsed_fh};
- print $fh $t;
-}
-sub HTML::WalkerParser::end {
- my ($self, $tag) = @_;
- return unless defined $self->{parsed_fh};
- my $fh = $self->{parsed_fh};
- print $fh "</" . $tag . ">";
-}
-sub HTML::WalkerParser::text {
- my ($self, $txt) = @_;
- return unless defined $self->{parsed_fh};
- my $fh = $self->{parsed_fh};
- print $fh $txt;
-}
-sub HTML::WalkerParser::comment {
- my($self, $comment) = @_;
- return unless defined $self->{parsed_fh};
- my $fh = $self->{parsed_fh};
- print $fh "<!--" . $comment . "-->";
-}
-
-
-
-
-### Main parsing routine
-
-sub parse_file($$$$$$$$$) {
- my ($file_name, $parsed_fh, $uq_link_addr, $link_roots,
- $ref_links, $ref_anchs, $ref_lines, $ref_tagname, $ref_attname) = @_;
- my $fh;
- if (-d $file_name) {
- $file_name = PathSubs::uniq_dir($file_name) . "default.html";
- $uq_link_addr .= "/" unless substr($uq_link_addr, -1) eq "/";
- $uq_link_addr .= "default.html";
- &$m_subReport("dir => $file_name\n");
- }
- $fh = new IO::File($file_name);
- die "Can't read $file_name: $!\n" unless defined $fh;
- my $base_href;
- my $n;
- my $line;
- my $uq_link_fold = $uq_link_addr; $uq_link_fold =~ s![^/]*$!!;
-
- my $start_cb =
- sub {
- my ($tag, $attr_hash) = @_;
- for my $k (keys %$attr_hash) {
- if (($k eq "id") || ($k eq "name")) {
- my $v = $$attr_hash{$k};
- $$ref_anchs{$v} = $n;
- $$ref_lines{$n} = $line;
- } elsif (exists $LINKATTRIBS{$k}) {
- my $v = $$attr_hash{$k};
- next if $v =~ m!^javascript:!;
- next if $v =~ m!^ftp://!;
- next if $v =~ m!^mailto://!;
- if ($tag eq "base") { $base_href = $v if $k eq "href"; next; }
- my $v_abs; my $v_rel;
- my $v_is_abs = PathSubs::is_abs_path($v);
- if ($v_is_abs) {
- $v_abs = $v;
- $v_rel = PathSubs::mk_relative_link($uq_link_addr, $v_abs);
- } else {
- $v_rel = $v;
- if (defined $base_href) {
- $v_abs = PathSubs::mk_abs_link($base_href, $v);
- } else {
- if (substr($v_rel, 0, 1) ne "#") {
- $v_abs = $uq_link_fold . $v_rel;
- } else {
- $v_abs = $uq_link_addr . $v_rel;
- }
- $v_abs = PathSubs::resolve_dotdot($v_abs);
- }
- }
- next if exists $m_CheckedLinks{$v_abs};
- if (is_outside($v_abs)) {
- if (!$v_is_abs) {
- if (ending_is_container($v_abs)) {
- $m_CheckedLinks{$v_abs} = {};
- tell_bad_link("Outside relative link ($v_rel)",
- $uq_link_addr, $n, $v, $line);
- }
- }
- ### Skip outside absolute links
- ### Could be things like banners etc...
- next;
- }
- $$ref_links{$v_rel} = $n;
- $$ref_lines{$n} = $line;
- if (substr($v_rel, 0, 1) ne "#") {
- my $v_rel_name = $v_rel;
- $v_rel_name =~ s!#.*$!!;
- $v_rel_name =~ s!\?.*$!!;
- $$ref_tagname{$v_rel_name} = $tag;
- $$ref_attname{$v_rel_name} = $k;
- }
- if ($v_is_abs && ($v_rel ne $v)) { $$attr_hash{$k} = $v_rel; }
- }
- }
- }; # $start_cb
-
- $m_start_cb = $start_cb;
- my $p = HTML::WalkerParser->new($parsed_fh);
- while ($line = <$fh>) {
- $n++;
- $p->parse($line);
- }
- $fh->close();
-} # parse_file
-
-
-
-##########################################################
-### Do the walk...
-##########################################################
-sub walk_link($$;$$$$) {
- die "$#_" unless ($#_ == 1 || $#_ == 5);
- my $link_fold = shift;
- my $link_file = shift;
- my $parent_url = shift;
- my $parent_lnum = shift;
- my $parent_link = shift;
- my $parent_line = shift;
-
- my $link_addr = $link_fold . $link_file;
- my $uq_link_addr;
- my $is_file = ($link_addr !~ m!^https?://!i);
- if ($is_file) {
- $uq_link_addr = PathSubs::uniq_file($link_addr);
- } else {
- $uq_link_addr = PathSubs::resolve_dotdot($link_addr);
- }
- return if exists $m_CheckedLinks{$uq_link_addr};
- return if exists $m_MissedLinks{$uq_link_addr};
- $m_CheckedLinks{$uq_link_addr} = {};
- my $link_is_container = ending_is_container($uq_link_addr);
- if ($link_is_container) {
- set_is_container($uq_link_addr, 1);
- return if is_outside($uq_link_addr);
- } else {
- return if $m_bOnlyCont;
- }
- my $response;
- my $contenttype;
- my $bDoRewrite;
- my $file_name;
- if ($is_file) {
- if (!-r $uq_link_addr) {
- tell_bad_link("Can't read file ($uq_link_addr)",
- $parent_url, $parent_lnum, $parent_link, $parent_line);
- $m_MissedLinks{$uq_link_addr} = 1;
- return;
- }
- $file_name = $uq_link_addr;
- } else {
- $file_name = mk_mirror_name($uq_link_addr);
- if (!defined $ua) {
- $ua = new LWP::UserAgent;
- $ua->agent($m_ua_personality);
- #$ua->delay(0.1);
- }
- if ($m_bMirror) {
- $response = $ua->mirror($uq_link_addr, $file_name);
- &$m_subMirrorAction($uq_link_addr, $file_name, $response);
- } else {
- my $request = new HTTP::Request('GET', $uq_link_addr);
- $response = $ua->request($request, $file_name);
- }
- #dump_response($response); exit;
- if ($response->code != 304) {
- if (!$response->is_success) {
- tell_bad_link($response->status_line . " ($uq_link_addr)",
- $parent_url, $parent_lnum, $parent_link, $parent_line);
- $m_MissedLinks{$uq_link_addr} = 1;
- return;
- }
- $bDoRewrite = $m_bMirror;
- $contenttype = get_contenttype($response);
- $link_is_container = is_linked_contenttype($response);
- }
- if ($uq_link_addr ne $response->base) {
- if ($m_bMirror) {
- my $base_file = mk_mirror_name($response->base);
- if (!File::Copy::copy($file_name, $base_file)) {
- die "Can't copy($file_name, $base_file): $!\n";
- }
- if (my $lm = $response->last_modified) { utime $lm, $lm, $base_file; }
- $file_name = $base_file;
- }
- $uq_link_addr = $response->base;
- }
- }
- ### Test again, could be new info from net!
- if ($link_is_container) {
- set_is_container($uq_link_addr, 1);
- return if is_outside($uq_link_addr);
- } else {
- return if $m_bOnlyCont;
- return;
- }
- &$m_subReport("$uq_link_addr ...");
-
- my %links;
- my %anchs;
- my %lines;
- my %tagname;
- my %attname;
- my $parsed_fh;
- my $parsed_file;
- my $file_to_parse = $file_name;
- if ($bDoRewrite) {
- $parsed_file = $file_to_parse . "-p$$";
- &$m_subReport(" <<GET");
- $parsed_fh = new IO::File("> $parsed_file");
- die "Can't create $parsed_file: $!\n" unless defined $parsed_fh;
- print $parsed_fh "<!-- parsed version -->\n";
- }
- &$m_subReport("\n");
- parse_file($file_to_parse, $parsed_fh, $uq_link_addr,
- \@m_sLinkRoots,
- \%links, \%anchs, \%lines, \%tagname, \%attname);
- if (defined $parsed_fh) {
- $parsed_fh->close();
- if (-e $file_name) { unlink $file_name or die "Can't unlink $file_name: $!"; }
- rename($parsed_file, $file_name) or die "Can't rename($parsed_file, $file_name): $!\n";
- if (my $lm = $response->last_modified) { utime $lm, $lm, $file_name; }
- }
- ### Now we know...
- if ($link_is_container) { return if is_outside($uq_link_addr); }
-
- $m_CheckedLinks{$uq_link_addr}->{ANC} = \%anchs;
- my $file_dir;
- if ($is_file) {
- $file_dir = $uq_link_addr;
- $file_dir =~ s![^/]*$!!;
- #chdir $file_dir;
- }
- my $container_folder = $uq_link_addr; $container_folder =~ s![^/]*$!!;
- &$m_subAction($uq_link_addr, $file_name, $contenttype);
- for my $link (sort keys %links) {
- # Next line is for onclick lines in prepared docs
- next if ($link eq "#");
- my $lnum = $links{$link};
- my $line = $lines{$lnum};
- if ($link eq "") {
- tell_bad_link("Empty link", $uq_link_addr, $lnum, $link, $line);
- next;
- }
- if ($link =~ m!(.*)\?!) { $link = $1; }
- my $anchor;
- if ($link =~ m!(.*)#(.*)!) { $link = $1; $anchor = $2; }
- if ($link eq "") {
- if (!exists $anchs{$anchor}) {
- tell_bad_link("Anchor not found ($anchor)", $uq_link_addr, $lnum, $link, $line);
- }
- next;
- }
- my $sub_fold;
- my $sub_file;
- my $uq_sublink;
- if ($link =~ m!^https?://!i) {
- $sub_fold = "";
- $sub_file = $link;
- $uq_sublink = $link;
- } else {
- $sub_file = $link;
- if ($is_file) {
- $sub_fold = $file_dir;
- $uq_sublink = PathSubs::uniq_file($sub_fold . $sub_file);
- } else {
- $sub_fold = $container_folder;
- $uq_sublink = $sub_fold . $sub_file;
- }
- }
- next if (exists $m_CheckedLinks{$uq_sublink});
- if (defined $anchor) {
- $m_CheckedLinks{$uq_link_addr}->{EXTANC}->{$uq_sublink} =
- { ANC=> $anchor, LINE=>$line, LNUM=>$lnum};
- }
- if ($m_bOnlyCont) {
- die "link=$link\tattr=$tagname{$link}\n" unless exists $tagname{$link};
- next unless maybecont($tagname{$link}, $attname{$link});
- }
- if (is_outside($uq_link_addr)) {
- if (maybecont($tagname{$link}, $attname{$link}) ) {
- next;
- }
- }
- walk_link($sub_fold, $sub_file, $uq_link_addr, $lnum, $link, $line);
- }
-} # walk_link
-
-
-
-
-############################################
-### Some more checks!
-############################################
-sub check_external_anchors() {
- &$m_subReport("\nChecking external anchors...\n");
- for my $f (sort keys %m_CheckedLinks) {
- my $fnode = $m_CheckedLinks{$f};
- if (exists ${$fnode}{"EXTANC"}) {
- my $extanc_hash = ${$fnode}{"EXTANC"};
- for my $fx (keys %$extanc_hash) {
- next unless (exists $m_CheckedLinks{$fx});
- my $ea_hash = ${$extanc_hash}{$fx};
- my $ea = ${$ea_hash}{ANC};
- my $fxnode = $m_CheckedLinks{$fx};
- my $fx_anc_hash = ${$fxnode}{"ANC"};
- if (!exists ${$fx_anc_hash}{$ea}) {
- my $line = ${$ea_hash}{LINE};
- my $lnum = ${$ea_hash}{LNUM};
- &$m_subReport("From $f\n");
- tell_bad_link("Ext anchor not found ($fx#$ea)",
- $f, $lnum, "$fx#$ea", $line);
- }
- }
- }
- }
-} # check_external_anchors
-
-
-
-#############################
-### Reporting
-#############################
-sub report_errors($$) {
- my $bSum = shift;
- my $bDet = shift;
- my $errors_reported;
- my $errors_found;
- for my $f (sort keys %m_CheckedLinks) {
- my $fnode = $m_CheckedLinks{$f};
- if (exists ${$fnode}{ERR}) {
- $errors_found = 1;
- last unless $bSum;
- if (!defined $errors_reported) {
- $errors_reported = 1;
- &$m_subReport("\n\n*********** Summary ERRORS and WARNINGS **********\n");
- }
- &$m_subReport("$f\n");
- my $err_hash = ${$fnode}{ERR};
- for my $e (sort keys %$err_hash) {
- my $refE = ${$err_hash}{$e};
- &$m_subReport("\t" . ${$refE}[0] . "\n");
- }
- }
- }
- undef $errors_reported;
- if ($bDet) {
- for my $f (sort keys %m_CheckedLinks) {
- my $fnode = $m_CheckedLinks{$f};
- if (exists ${$fnode}{ERR}) {
- if (!defined $errors_reported) {
- $errors_reported = 1;
- &$m_subReport("\n\n*********** Detailed ERRORS and WARNINGS **********\n");
- }
- &$m_subReport("$f\n");
- my $err_hash = ${$fnode}{ERR};
- for my $e (sort keys %$err_hash) {
- my $refE = ${$err_hash}{$e};
- &$m_subReport("\tat line $e: " . ${$refE}[1] . "\n");
- }
- }
- }
- }
- if ($errors_found) {
- die "\n*** There where errors ***\n";
- } else {
- &$m_subReport("No errors found\n");
- }
-} # report_errors
-
-sub dump_response($) {
- my $response = shift;
- &$m_subReport( $response->code . " " . $response->message . "\n");
- &$m_subReport( "****************************************\n");
- #&$m_subReport( $response->request . "\n");
- #&$m_subReport( "****************************************\n");
- #&$m_subReport( $response->previous . "\n");
- #&$m_subReport( "****************************************\n");
- &$m_subReport( " i=" . $response->is_info .
- ", s=" . $response->is_success .
- ", r=" . $response->is_redirect .
- ", e=" . $response->is_error . "\n");
- &$m_subReport( "****************************************\n");
- &$m_subReport( "content: " . $response->content . "\n");
- &$m_subReport( "****************************************\n");
- &$m_subReport( "base: " . $response->base . "\n");
- &$m_subReport( "****************************************\n");
- &$m_subReport( $response->as_string);
- &$m_subReport( "****************************************\n");
- &$m_subReport( $response->current_age . "\n");
- &$m_subReport( "****************************************\n");
- my @rh = $response->header("Content-Type");
- for my $r (@rh) { &$m_subReport( "ct: $r\n"); }
- &$m_subReport( "****************************************\n");
-} # dump_response
-
-
-#############################
-### Parameters
-#############################
-sub sMirrorRoot() {
- my $val = shift;
- $m_sMirrorRoot = PathSubs::get_temp_path() . "LinkWalker/" unless defined $m_sMirrorRoot;
- my $old = $m_sMirrorRoot;
- $m_sMirrorRoot = PathSubs::uniq_dir($val) if defined $val;
- return $old;
-}
-sub bMirror(;$) {
- my $val = shift;
- my $old = $m_bMirror;
- $m_bMirror = $val if defined $val;
- $old;
-}
-
-sub subReporter(;$) {
- my $val = shift;
- my $old = $m_subReport;
- $m_subReport = $val if defined $val;
- $old
-}
-sub subAction(;$) {
- my $val = shift;
- my $old = $m_subAction;
- $m_subAction = $val if defined $val;
- $old
-}
-sub bOnlyCont(;$) {
- my $val = shift;
- my $old = $m_bOnlyCont;
- $m_bOnlyCont = $val if defined $val;
- $old
-}
-sub ua_personality(;$) {
- my $val = shift;
- my $old = $m_ua_personality;
- $m_ua_personality = $val if defined $val;
- $old
-}
-
-sub clear_roots() { @m_sLinkRoots = (); }
-sub get_roots() { return \@m_sLinkRoots; }
-sub add_root($) { push @m_sLinkRoots, shift; }
-sub add_files_root($) {
- my $file = shift;
- my $default_root;
- my ($host) = ($file =~ m!(^https?://[^/]*)!i);
- if (defined $host) {
- $default_root = $file;
- } else {
- die "Can't find $file\n" unless -e $file;
- $default_root = PathSubs::uniq_file($file);
- }
- $default_root =~ s![^/]*$!!;
- add_root($default_root);
-}
-
-### Default actions
-sub default_sub {}
-$m_subReport = \&default_sub;
-$m_subAction = \&default_sub;
-$m_subMirrorAction = \&default_sub;
-
-1;
diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm
deleted file mode 100644
index 32407d6..0000000
--- a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm
+++ /dev/null
@@ -1,448 +0,0 @@
-package HTML::ParserTagEnd;
-
-# Author address: <gisle@aas.no>
-### Modified for <tag />, Lennart
-
-use strict;
-use HTML::Entities ();
-
-use vars qw($VERSION);
-$VERSION = "2.23"; # $Date: 1999/06/09 10:27:16 $
-
-
-sub new
-{
- my $class = shift;
- my $self = bless { '_buf' => '',
- '_strict_comment' => 0,
- }, $class;
- $self;
-}
-
-
-# A little note about the observed Netscape behaviour:
-#
-# It parse <xmp> in the depreceated 'literal' mode, i.e. no tags are
-# recognized until a </xmp> is found.
-#
-# <listing> is parsed like <pre>, i.e. tags are recognized. <listing>
-# are presentend in smaller font than <pre>
-#
-# Netscape does not parse this comment correctly (it terminates the comment
-# too early):
-#
-# <! -- comment -- --> more comment -->
-#
-# Netscape ignores '<!--' and '-->' within the <SCRIPT> and <STYLE> tag.
-# This is used as a trick to make non-script-aware browsers ignore
-# the scripts.
-
-
-sub parse
-{
- my $self = shift;
- my $buf = \ $self->{'_buf'};
- unless (defined $_[0]) {
- # signals EOF (assume rest is plain text)
- $self->text($$buf) if length $$buf;
- $$buf = '';
- return $self;
- }
- $$buf .= $_[0];
- my $netscape_comment = !$self->{'_strict_comment'};
-
- # Parse html text in $$buf. The strategy is to remove complete
- # tokens from the beginning of $$buf until we can't deside whether
- # it is a token or not, or the $$buf is empty.
-
- TOKEN:
- while (1) {
-
- # First we try to pull off any plain text (anything before a "<" char)
- if ($$buf =~ s|^([^<]+)||) {
- if (length $$buf) {
- $self->text($1);
- } else {
- my $text = $1;
- # At the end of the buffer, we should not parse white space
- # but leave it for parsing on the next round.
- if ($text =~ s|(\s+)$||) {
- $$buf = $1;
- # Same treatment for chopped up entites and words.
- # We must wait until we have it all.
- } elsif ($text =~ s|(\s*\S+)$||) {
- $$buf = $1;
- };
- $self->text($text) if length $text;
- last TOKEN;
- }
-
- # Netscapes buggy comments are easy to handle
- } elsif ($netscape_comment && $$buf =~ m|^<!\s*--|) {
- if ($$buf =~ s|^<!\s*--(.*?)--\s*>||s) {
- $self->comment($1);
- } else {
- last TOKEN; # must wait until we see the end of it
- }
-
- # Then, markup declarations (usually either <!DOCTYPE...> or a comment)
- } elsif ($$buf =~ s|^(<!)||) {
- my $eaten = $1;
- my $text = '';
- my @com = (); # keeps comments until we have seen the end
- # Eat text and beginning of comment
- while ($$buf =~ s|^(([^>]*?)--)||) {
- $eaten .= $1;
- $text .= $2;
- # Look for end of comment
- if ($$buf =~ s|^((.*?)--)||s) {
- $eaten .= $1;
- push(@com, $2);
- } else {
- # Need more data to get all comment text.
- $$buf = $eaten . $$buf;
- last TOKEN;
- }
- }
- # Can we finish the tag
- if ($$buf =~ s|^([^>]*)>||) {
- $text .= $1;
- $self->declaration($text) if $text =~ /\S/;
- # then tell about all the comments we found
- for (@com) { $self->comment($_); }
- } else {
- $$buf = $eaten . $$buf; # must start with it all next time
- last TOKEN;
- }
-
- # Should we look for 'processing instructions' <? ...> ??
- #} elsif ($$buf =~ s|<\?||) {
- # ...
-
- # Then, look for a end tag
- } elsif ($$buf =~ s|^</||) {
- # end tag
- if ($$buf =~ s|^([a-zA-Z][a-zA-Z0-9\.\-]*)(\s*>)||) {
- $self->end(lc($1), "</$1$2");
- } elsif ($$buf =~ m|^[a-zA-Z]*[a-zA-Z0-9\.\-]*\s*$|) {
- $$buf = "</" . $$buf; # need more data to be sure
- last TOKEN;
- } else {
- # it is plain text after all
- $self->text("</");
- }
-
- # Then, finally we look for a start tag
- } elsif ($$buf =~ s|^(<([a-zA-Z]+)>)||) {
- # special case plain start tags for slight speed-up (2.5%)
- ### mod Lennart
- $self->start(lc($2), {}, 0, [], $1);
-
- } elsif ($$buf =~ s|^<||) {
- # start tag
- my $eaten = '<';
-
- # This first thing we must find is a tag name. RFC1866 says:
- # A name consists of a letter followed by letters,
- # digits, periods, or hyphens. The length of a name is
- # limited to 72 characters by the `NAMELEN' parameter in
- # the SGML declaration for HTML, 9.5, "SGML Declaration
- # for HTML". In a start-tag, the element name must
- # immediately follow the tag open delimiter `<'.
- if ($$buf =~ s|^(([a-zA-Z][a-zA-Z0-9\.\-]*)\s*)||) {
- $eaten .= $1;
- my $tag = lc $2;
- my %attr;
- my @attrseq;
-
- # Then we would like to find some attributes
- #
- # Arrgh!! Since stupid Netscape violates RCF1866 by
- # using "_" in attribute names (like "ADD_DATE") of
- # their bookmarks.html, we allow this too.
- while ($$buf =~ s|^(([a-zA-Z][a-zA-Z0-9\.\-_]*)\s*)||) {
- $eaten .= $1;
- my $attr = lc $2;
- my $val;
- # The attribute might take an optional value (first we
- # check for an unquoted value)
- if ($$buf =~ s|(^=\s*([^\"\'>\s][^>\s]*)\s*)||) {
- $eaten .= $1;
- $val = $2;
- HTML::Entities::decode($val);
- # or quoted by " or '
- } elsif ($$buf =~ s|(^=\s*([\"\'])(.*?)\2\s*)||s) {
- $eaten .= $1;
- $val = $3;
- HTML::Entities::decode($val);
- # truncated just after the '=' or inside the attribute
- } elsif ($$buf =~ m|^(=\s*)$| or
- $$buf =~ m|^(=\s*[\"\'].*)|s) {
- $$buf = "$eaten$1";
- last TOKEN;
- } else {
- # assume attribute with implicit value
- $val = $attr;
- }
- $attr{$attr} = $val;
- push(@attrseq, $attr);
- }
-
- # At the end there should be a closing ">"
-### Modified for <tag />, Lennart
- if ($$buf =~ s|^/>||) {
- $self->start($tag, \%attr, 1, \@attrseq, "$eaten>");
- } elsif ($$buf =~ s|^>||) {
- #if ($$buf =~ s|^>||) {
- $self->start($tag, \%attr, 0, \@attrseq, "$eaten>");
- } elsif (length $$buf) {
- # Not a conforming start tag, regard it as normal text
- $self->text($eaten);
- } else {
- $$buf = $eaten; # need more data to know
- last TOKEN;
- }
-
- } elsif (length $$buf) {
- $self->text($eaten);
- } else {
- $$buf = $eaten . $$buf; # need more data to parse
- last TOKEN;
- }
-
- } else {
- #die if length($$buf); # This should never happen
- last TOKEN; # The buffer should be empty now
- }
- }
-
- $self;
-}
-
-
-sub eof
-{
- shift->parse(undef);
-}
-
-
-sub parse_file
-{
- my($self, $file) = @_;
- no strict 'refs'; # so that a symbol ref as $file works
- local(*F);
- unless (ref($file) || $file =~ /^\*[\w:]+$/) {
- # Assume $file is a filename
- open(F, $file) || die "Can't open $file: $!";
- $file = \*F;
- }
- my $chunk = '';
- while(read($file, $chunk, 512)) {
- $self->parse($chunk);
- }
- close($file);
- $self->eof;
-}
-
-
-sub strict_comment
-{
- my $self = shift;
- my $old = $self->{'_strict_comment'};
- $self->{'_strict_comment'} = shift if @_;
- return $old;
-}
-
-
-sub netscape_buggy_comment # legacy
-{
- my $self = shift;
- my $old = !$self->strict_comment;
- $self->strict_comment(!shift) if @_;
- return $old;
-}
-
-
-sub text
-{
- # my($self, $text) = @_;
-}
-
-sub declaration
-{
- # my($self, $decl) = @_;
-}
-
-sub comment
-{
- # my($self, $comment) = @_;
-}
-
-sub start
-{
-die "hie";
- # my($self, $tag, $attr, $attrseq, $origtext) = @_;
- # $attr is reference to a HASH, $attrseq is reference to an ARRAY
-}
-
-sub end
-{
- # my($self, $tag, $origtext) = @_;
-}
-
-1;
-
-
-__END__
-
-
-=head1 NAME
-
-HTML::Parser - SGML parser class
-
-=head1 SYNOPSIS
-
- require HTML::Parser;
- $p = HTML::Parser->new; # should really a be subclass
- $p->parse($chunk1);
- $p->parse($chunk2);
- #...
- $p->eof; # signal end of document
-
- # Parse directly from file
- $p->parse_file("foo.html");
- # or
- open(F, "foo.html") || die;
- $p->parse_file(\*F);
-
-=head1 DESCRIPTION
-
-The C<HTML::Parser> will tokenize an HTML document when the parse()
-method is called by invoking various callback methods. The document to
-be parsed can be supplied in arbitrary chunks.
-
-The external interface the an I<HTML::Parser> is:
-
-=over 4
-
-=item $p = HTML::Parser->new
-
-The object constructor takes no arguments.
-
-=item $p->parse( $string );
-
-Parse the $string as an HTML document. Can be called multiple times.
-The return value is a reference to the parser object.
-
-=item $p->eof
-
-Signals end of document. Call eof() to flush any remaining buffered
-text. The return value is a reference to the parser object.
-
-=item $p->parse_file( $file );
-
-This method can be called to parse text from a file. The argument can
-be a filename or an already opened file handle. The return value from
-parse_file() is a reference to the parser object.
-
-=item $p->strict_comment( [$bool] )
-
-By default we parse comments similar to how the popular browsers (like
-Netscape and MSIE) do it. This means that comments will always be
-terminated by the first occurrence of "-->". This is not correct
-according to the "official" HTML standards. The official behaviour
-can be enabled by calling the strict_comment() method with a TRUE
-argument.
-
-The return value from strict_comment() is the old attribute value.
-
-=back
-
-
-
-In order to make the parser do anything interesting, you must make a
-subclass where you override one or more of the following methods as
-appropriate:
-
-=over 4
-
-=item $self->declaration($decl)
-
-This method is called when a I<markup declaration> has been
-recognized. For typical HTML documents, the only declaration you are
-likely to find is <!DOCTYPE ...>. The initial "<!" and ending ">" is
-not part of the string passed as argument. Comments are removed and
-entities will B<not> be expanded.
-
-=item $self->start($tag, $attr, $attrseq, $origtext)
-
-This method is called when a complete start tag has been recognized.
-The first argument is the tag name (in lower case) and the second
-argument is a reference to a hash that contain all attributes found
-within the start tag. The attribute keys are converted to lower case.
-Entities found in the attribute values are already expanded. The
-third argument is a reference to an array with the lower case
-attribute keys in the original order. The fourth argument is the
-original HTML text.
-
-
-=item $self->end($tag, $origtext)
-
-This method is called when an end tag has been recognized. The
-first argument is the lower case tag name, the second the original
-HTML text of the tag.
-
-=item $self->text($text)
-
-This method is called when plain text in the document is recognized.
-The text is passed on unmodified and might contain multiple lines.
-Note that for efficiency reasons entities in the text are B<not>
-expanded. You should call HTML::Entities::decode($text) before you
-process the text any further.
-
-A sequence of text in the HTML document can be broken between several
-invocations of $self->text. The parser will make sure that it does
-not break a word or a sequence of spaces between two invocations of
-$self->text().
-
-=item $self->comment($comment)
-
-This method is called as comments are recognized. The leading and
-trailing "--" sequences have been stripped off the comment text.
-
-=back
-
-The default implementation of these methods do nothing, i.e., the
-tokens are just ignored.
-
-There is really nothing in the basic parser that is HTML specific, so
-it is likely that the parser can parse other kinds of SGML documents.
-SGML has many obscure features (not implemented by this module) that
-prevent us from renaming this module as C<SGML::Parser>.
-
-=head1 EFFICIENCY
-
-The parser is fairly inefficient if the chunks passed to $p->parse()
-are too big. The reason is probably that perl ends up with a lot of
-character copying when tokens are removed from the beginning of the
-strings. A chunk size of about 256-512 bytes was optimal in a test I
-made with some real world HTML documents. (The parser was about 3
-times slower with a chunk size of 20K).
-
-=head1 SEE ALSO
-
-L<HTML::Entities>, L<HTML::TokeParser>, L<HTML::Filter>,
-L<HTML::HeadParser>, L<HTML::LinkExtor>
-
-L<HTML::TreeBuilder> (part of the I<HTML-Tree> distribution)
-
-=head1 COPYRIGHT
-
-Copyright 1996-1999 Gisle Aas. All rights reserved.
-
-This library is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-=cut
-
-
diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/datadir.txt b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/datadir.txt
deleted file mode 100644
index 1ba751d..0000000
--- a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/datadir.txt
+++ /dev/null
@@ -1 +0,0 @@
-C:/TEMP/i2data
diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/PathSubs.pm b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/PathSubs.pm
deleted file mode 100644
index e95b8d5..0000000
--- a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/PathSubs.pm
+++ /dev/null
@@ -1,207 +0,0 @@
-# Copyright 2006 Lennart Borgman, http://OurComments.org/. All rights
-# reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
-
-package PathSubs;
-
-#####################################################
-### This package contains general path handling
-### routines and some win32 specific dito.
-### The latter should ev be moved to a new module!
-#####################################################
-use strict;
-
-use File::Spec;
-
-### Absolute path names
-
-sub is_abs_path ($) {
- my $path = shift;
- return 0 if $path eq "";
- return 1 if File::Spec->file_name_is_absolute($path);
- #return 1 if substr($path, 1, 1) eq ":"; # MSWin32
- #return 1 if substr($path, 0, 1) eq "/";
- return 1 if $path =~ /^https?:/i;
- return 1 if $path =~ /^file:/i;
- return 1 if $path =~ /^javascript:/i;
- return 1 if $path =~ /^mailto:/i;
-}
-sub is_abs_netpath($) {
- my $path = shift;
- return 1 if $path =~ /^https?:/i;
- # New
- return 1 if $path =~ /^ftp:/i;
- return 1 if $path =~ /^mailto:/i;
-}
-
-
-sub uniq_file($) {
- my $fname = shift;
- $fname =~ s!^\s+|\s+$!!g;
- return "" if ($fname eq "");
- $fname = File::Spec->rel2abs($fname);
- if (!File::Spec->file_name_is_absolute($fname)) {
- die "File name is not absolute: $fname";
- }
- #print STDERR "uniq_file($fname)\n";
- $fname =~ tr!\\!/!;
- if (-e $fname) {
- #print STDERR "exists $fname\n";
- ### There is an error in 522, compensate for this!
- #die substr($fname, -1);
- if (substr($fname, -1) eq "/") { chop $fname; }
- #print STDERR "exists $fname\n";
- ### Translate ..
- if (substr($fname, 1, 1) eq ":") {
- my $ffname = Win32::GetFullPathName($fname);
- ### Get case
- my $lfname = Win32::GetLongPathName($ffname);
- #print STDERR "lexists $lfname\n";
- $fname = $lfname if ($lfname ne "");
- }
- } else {
- #print STDERR "NOT exists $fname\n";
- if (substr($fname, -1) eq "/") { chop $fname; }
- my $head = "";
- if (substr($fname, 0, 2) eq "//") {
- $head = "//";
- $fname = substr($fname, 2);
- }
- my @fname = split("/", $fname);
- my $tail = pop @fname;
- $fname = uniq_dir($head . join("/", @fname)) . $tail;
- }
- if (substr($fname, 1, 1) eq ":") {
- $fname = uc(substr($fname, 0, 1)) . substr($fname, 1);
- #print STDERR "fname $fname\n";
- }
- $fname =~ tr!\\!/!;
- #print STDERR "fname ($fname)\n";
- return $fname;
-}
-sub uniq_dir($) {
- my $dir = shift;
- my $uq_dir = uniq_file($dir);
- if (substr($uq_dir, -1) ne "/") { $uq_dir .= "/"; }
- return $uq_dir;
-}
-
-
-
-### Relative paths
-sub _get_link_root($) {
- my $lnk = shift;
- if ($lnk =~ m!^(/|ftp://[^/]*|https?://[^/]*|[a-z]:/)!i) {
- return $1;
- } else {
- return "";
- }
-}
-
-sub resolve_dotdot($) {
- my $orig_url = shift;
- my $root = _get_link_root($orig_url);
- return $orig_url if length($root) == length($orig_url);
- my $url = substr($orig_url, length($root));
- if (substr($root, -1) eq "/") {
- chop $root;
- $url = "/$url";
- }
- #die "$root\n$url";
- my $iPosSearch = 2;
- #print "url=$url\n";
- while ((my $iPos = index($url, "/../", $iPosSearch)) > -1) {
- my $sLeft = substr($url, 0, $iPos);
- if (substr($sLeft, -2) eq "..") {
- $iPosSearch += 3;
- next;
- }
- my $sRight = substr($url, $iPos+3);
- #print "url=$url\n";
- #print "iPos=$iPos\n";
- #print "sLeft=$sLeft\n";
- $sLeft =~ s!/[^/]*$!!;
- #print "sLeft=$sLeft\n";
- #print "sRight=$sRight\n";
- $url = $sLeft . $sRight;
- #print "\t***url=$url\n";
- #print "url=$url\n";
- }
- if (index($url, "../") > -1) {
- return $orig_url;
- }
- return $root . $url;
-}
-
-sub mk_relative_link($$;$) {
- my $from = shift;
- my $to = shift;
- my $norm = shift;
- if ($norm) {
- $from = uniq_file($from);
- $to = uniq_file($to);
- }
- if (-e $from) {
- $from = uniq_file($from);
- } else {
- $from = resolve_dotdot($from);
- }
- if (-e $to) {
- $to = uniq_file($to);
- } else {
- $to = resolve_dotdot($to);
- }
- my $root_from = _get_link_root($from);
- my $root_to = _get_link_root($to );
- if ($root_from ne $root_to) {
- return $to;
- }
- my @from = split "/", $from;
- my @to = split "/", $to;
- while (@to) {
- last if ($to[0] ne $from[0]);
- shift @to;
- shift @from;
- }
- if (@to == 1 && @from == 1) {
- if (length($to[0]) > length($from[0])) {
- if (substr($to[0], 0, length($from[0])+1) eq ($from[0] . "#")) {
- return substr($to[0], length($from[0]));
- }
- }
- }
- my $rl;
- for (1..$#from) { $rl .= "../"; }
- $rl .= join("/", @to);
-
- return $rl;
-}
-
-
-
-sub mk_absolute_link($$) {
- my $from = shift;
- my $rel_to = shift;
- my $abs = $from;
- $abs =~ s![^/]*$!!;
- $abs .= $rel_to;
- if (!is_abs_netpath($abs)) { $abs = uniq_file($abs); }
- $abs;
-}
-
-
-1;
diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/link_checker.pl b/emacs.d/nxhtml/nxhtml/html-chklnk/link_checker.pl
deleted file mode 100644
index 0925b1c..0000000
--- a/emacs.d/nxhtml/nxhtml/html-chklnk/link_checker.pl
+++ /dev/null
@@ -1,328 +0,0 @@
-#! perl
-
-# Copyright 2006, 2007 Lennart Borgman, http://OurComments.org/. All
-# rights reserved.
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-use strict;
-use warnings;
-
-use IO::File;
-use File::Spec;
-use File::Find;
-
-sub check_file($);
-
-#############################
-### Collecting info
-#############################
-my $m_site_dir; # Site root directory (every file should be in this)
-my %m_CheckedFiles;
-my %m_FilesToCheck;
-my %m_MissedFiles;
-my $m_errors_found;
-
-sub tell_bad_link($$$$$) {
- my $what = shift;
- my $file = shift;
- my $lnum = shift;
- my $link = shift;
- my $line = shift;
- $line =~ s/^\s+|\s+$//g;
- $m_CheckedFiles{$file}->{"ERR"}->{$lnum} = "$what\n Link: \"$link\"\n";
- #$line";
-}
-
-#############################
-### Helpers
-#############################
-sub add_file_to_check($) {
- $m_FilesToCheck{File::Spec->canonpath(shift)} = 1;
-}
-# sub full_uq_file($) {
-# my $file = shift;
-# my $full_file = $file;
-# if (! File::Spec->file_name_is_absolute($full_file)) {
-# #$full_file = Win32::GetFullPathName($file);
-# $full_file = File::Spec->rel2abs($full_file, $m_site_dir);
-# }
-# if (($^O eq "MSWin32") || ($^O eq "cygwin")) {
-# $full_file =~ tr!A-Z!a-z!;
-# }
-# #print "ull_uq_file: full_file=$file\n";
-# return $full_file;
-# }
-
-#############################
-### Checks
-#############################
-sub check_next_file() {
- if (scalar(keys %m_FilesToCheck) > 0) {
- my @FilesToCheck = sort keys %m_FilesToCheck;
- my $next_file = $FilesToCheck[0];
- delete $m_FilesToCheck{$next_file};
- check_file($next_file);
- }
-}
-sub not_a_local_file($) {
- my $url = shift;
- (
- $url =~ m!^javascript:!
- ||
- $url =~ m!^mailto:!
- ||
- $url =~ m!^[a-z]+://!
- );
-}
-
-sub check_file($) {
- my $fname = shift;
- if (! File::Spec->file_name_is_absolute($fname)) {
- die "check_file: File is not abs: $fname";
- }
- my $only_name = (File::Spec->splitpath($fname))[2];
- print "Checking $fname ... ";
- sleep 0.5;
- $m_CheckedFiles{$fname} = {};
- my %links;
- my %anchs;
- my %lines;
- my $fh = new IO::File($fname);
- die "Can't read $fname: $!\n" unless defined $fh;
- my $whole;
- my $n;
- my $found_errors = 0;
- while (my $line = <$fh>) {
- $n++;
- chomp $line;
- $whole = $line;
- while ($whole =~ m!(?:\s|^)id="(.*?)"!g) {
- $anchs{$1} = $n;
- $lines{$n} = $line;
- }
- while ($whole =~ m!(?:\s|^)name="(.*?)"!g) {
- $anchs{$1} = $n;
- $lines{$n} = $line;
- }
- while ($whole =~ m!(?:\s|^)href="(.*?)"!g) {
- my $l = $1;
- next if not_a_local_file($l);
- if ($l =~ m!^#!) {
- $l = $only_name . $l;
- }
- $links{$l} = $n;
- $lines{$n} = $line;
- }
- while ($whole =~ m!(?:\s|^)src="(.*?)"!g) {
- my $l = $1; $l =~ tr!A-Z!a-z!;
- $links{$l} = $n;
- $lines{$n} = $line;
- }
- }
- $fh->close();
- $m_CheckedFiles{$fname}->{ANC} = \%anchs;
- my ($fv, $fd, $ff) = File::Spec->splitpath($fname);
- my $fdir = File::Spec->catpath($fv, $fd, "");
- for my $link (sort keys %links) {
- # Next line is for onclick lines
- next if ($link eq "#");
- my $lnum = $links{$link};
- my $line = $lines{$lnum};
- if ($link eq "") {
- tell_bad_link("empty link", $fname, $lnum, $link, $line);
- $found_errors = 1;
- next;
- }
- if ($link =~ m!(.*)\?!) { $link = $1; }
- my $anchor;
- if ($link =~ m!(.*)#(.*)!) { $link = $1; $anchor = $2; }
- if ($link eq "") {
- if (!exists $anchs{$anchor}) {
- tell_bad_link("bad internal anchor ref ($anchor)", $fname, $lnum, $link, $line);
- $found_errors = 1;
- }
- next;
- }
- $link =~ m!([^\.]*)$!;
- my $link_file_type = $1;
- my $subfile = $link;
- if (!File::Spec->file_name_is_absolute($subfile)) {
- $subfile = File::Spec->catpath($fv, $fd, $link);
- }
- $subfile = File::Spec->canonpath($subfile);
- die "Contained .." if $subfile =~ m/\.\./;
- next if (exists $m_MissedFiles{$subfile});
- if (! -r $subfile) {
- tell_bad_link("Can't read linked file: $!", $fname, $lnum, $link, $line);
- $found_errors = 1;
- $m_MissedFiles{$subfile} = 1;
- next;
- }
- next unless $link_file_type =~ m!^html?$!i;
- if (defined $anchor) {
- $m_CheckedFiles{$fname}->{EXTANC}->{$subfile} =
- { ANC=> $anchor, LINE=>$line, LNUM=>$lnum};
- }
- next if (exists $m_CheckedFiles{$subfile});
- #check_file($subfile);
- my $rel_root = File::Spec->abs2rel($subfile, $m_site_dir);
- if (substr($rel_root, 0, 2) eq "..") {
- tell_bad_link("Reference to file outside site", $fname, $lnum, $link, $line);
- $found_errors = 1;
- } else {
- #$m_FilesToCheck{$subfile} = 1;
- add_file_to_check($subfile);
- }
- }
- if ($found_errors) {
- print "Errors found\n";
- } else {
- print "Ok\n";
- }
- sleep 0.5;
- check_next_file();
-} # check_file
-
-
-sub check_external_anchors() {
- for my $f (sort keys %m_CheckedFiles) {
- my $fnode = $m_CheckedFiles{$f};
- if (exists ${$fnode}{"EXTANC"}) {
- my $extanc_hash = ${$fnode}{"EXTANC"};
- for my $fx (keys %$extanc_hash) {
- next unless (exists $m_CheckedFiles{$fx});
- my $ea_hash = ${$extanc_hash}{$fx};
- my $ea = ${$ea_hash}{ANC};
- my $fxnode = $m_CheckedFiles{$fx};
- my $fx_anc_hash = ${$fxnode}{"ANC"};
- if (!exists ${$fx_anc_hash}{$ea}) {
- my $line = ${$ea_hash}{LINE};
- my $lnum = ${$ea_hash}{LNUM};
- tell_bad_link("Hash not found", $f, $lnum, "$fx#$ea", $line);
- }
- }
- }
- }
-} # check_external_anchors
-
-
-
-#############################
-### Reporting
-#############################
-sub report_errors() {
- for my $f (sort keys %m_CheckedFiles) {
- my $fnode = $m_CheckedFiles{$f};
- if (exists ${$fnode}{"ERR"}) {
- if (!defined $m_errors_found) {
- $m_errors_found = 1;
- print "\n\n*********** Error details: **********\n";
- sleep 0.5;
- }
- #print "\n$f";
- my $err_hash = ${$fnode}{"ERR"};
- for my $e (sort keys %$err_hash) {
- print "\n$f";
- print " at line $e:\n " . ${$err_hash}{$e} . "\n";
- sleep 0.5;
- }
- }
- }
- if ($m_errors_found) {
- die "\n*** There where errors ***\n";
- } else {
- print "Everything that was checked is ok\n";
- }
-} # report_errors
-
-#############################
-### Help
-#############################
-sub usage() {
- die "Usage: $0 --site=SITE-DIR --start=START-FILE\n";
-}
-
-#############################
-### Parameters
-#############################
-#my $m_start_file; # File to start checking in
-sub get_params() {
- usage() unless $#ARGV > -1;
- for (my $i = 0; $i <= $#ARGV; $i++) {
- my ($k, $v) = ($ARGV[$i] =~ m!-?-?(.*?)=(.*)!);
- if ($k eq "site") {
- $m_site_dir = $v;
- } elsif( $k eq "start") {
- #$m_FilesToCheck{$v} = 1;
- add_file_to_check($v);
- } else {
- print STDERR "Unknown parameter: $ARGV[$i]\n";
- usage();
- }
- }
- foreach my $key (keys %m_FilesToCheck) {
- die "Can't find $key\n" unless -e $key;
- }
- if (! $m_site_dir) {
- print STDERR "No site directory given\n";
- usage();
- }
- die "Can't find $m_site_dir\n" unless -d $m_site_dir;
- if ((scalar keys %m_FilesToCheck) == 0) {
- my $add_files =
- sub {
- return unless m/.html?$/i;
- return if -d $_;
- #$m_FilesToCheck{$File::Find::name} = 1;
- add_file_to_check($File::Find::name);
- };
- File::Find::find($add_files, $m_site_dir);
- }
-}
-
-sub check_canonpath() {
- my $testpath = "/test/../some.txt";
- if ($testpath eq File::Spec->canonpath($testpath)) {
- my $errmsg = <<_BADCANON_
-
-** Fatal Error:
-
- File::Spec->canonpath does not clean up path.
-
- If you are doing this from Emacs with html-chklnk-check-site-links
- it may be because you are using Cygwin as your shell. You can cure
- this in the following ways:
-
- 1) Use w32shell.el - this will temporary switch to "cmd" as shell.
- 2) Use the default shell on w32.
-
-_BADCANON_
-;
-
- die $errmsg;
- }
-}
-
-#############################
-### Main
-#############################
-
-check_canonpath();
-
-$| = 1; # flush or blush!
-
-print "\n";
-get_params();
-
-check_next_file();
-check_external_anchors();
-report_errors();
diff --git a/emacs.d/nxhtml/nxhtml/html-imenu.el b/emacs.d/nxhtml/nxhtml/html-imenu.el
deleted file mode 100644
index 2df1760..0000000
--- a/emacs.d/nxhtml/nxhtml/html-imenu.el
+++ /dev/null
@@ -1,101 +0,0 @@
-;;; html-imenu --- imneu suport for html modes
-;;
-;; This is a slightly modified version of
-;; html-helper-imenu.el. This version comes with nXhtml.
-(defconst html-imenu:version "0.9") ;;Version:
-;; Last-Updated: 2008-09-30T19:22:05+0200 Tue
-;;
-;; ~/share/emacs/pkg/html/html-helper-imenu.el ---
-;;
-;; $Id: html-helper-imenu.el,v 1.11 2004/03/23 07:39:37 harley Exp $
-;;
-
-;; Author: Harley Gorrell <harley@panix.com>
-;; URL: http://www.mahalito.net/~harley/elisp/html-helper-imenu.el
-;; License: GPL v2
-;; Keywords: html-helper, imenu, html, table of contents
-
-;;; Commentary:
-;; * Adds an indented table of contents to the menubar
-;; * The regexp only matches headers on a single line
-;; and well formed tags. (Which is pretty common.)
-;;
-;; Put somthing like the following in your .emacs:
-;; (autoload 'html-helper-imenu-setup "html-helper-imenu")
-;; (add-hook 'html-helper-mode-hook 'html-helper-imenu-setup)
-;;
-;; While this was originaly written for html-helper,
-;; It will work with sgml-mode and others.
-;;
-;; http://www.santafe.edu/~nelson/hhm-beta/html-helper-mode.el
-
-;;; History:
-;;
-;; 1998-06-25 : added regexp
-;; 2003-03-18 : updated contact info
-;; 2004-03-22 : minor clean up
-;; 2007-11-23 : changed setup function to do nothing if done already
-
-;;; Code:
-
-(eval-when-compile (require 'imenu))
-
-(defvar html-imenu-title "Index"
- "*Title of the menu which will be added to the menubar.")
-
-(defvar html-imenu-regexp
- "\\s-*<h\\([1-9]\\)[^\n<>]*>\\(<[^\n<>]*>\\)*\\s-*\\([^\n<>]*\\)"
- "*A regular expression matching a head line to be added to the menu.
-The first `match-string' should be a number from 1-9.
-The second `match-string' matches extra tags and is ignored.
-The third `match-string' will be the used in the menu.")
-
-;; Make an index for imenu
-(defun html-imenu-index ()
- "Return an table of contents for an html buffer for use with Imenu."
- (let ((space ?\ ) ; a char
- (toc-index '())
- toc-str)
- (save-excursion
- (goto-char (point-min))
- (save-match-data
- (while (re-search-forward html-imenu-regexp nil t)
- (setq toc-str
- (concat
- (make-string
- (* 6 (- (string-to-number (match-string 1)) 1))
- space)
- (match-string 3)))
- (beginning-of-line)
- (setq toc-index (cons (cons toc-str (point)) toc-index))
- (end-of-line))))
- (nreverse toc-index)))
-
-(defun html-imenu-setup ()
- "Setup the variables to support imenu."
- (interactive)
- ;; Fix-me: It looks like this function has to be called every time
- ;; switching to some html mode in mumamo. Values are "survived" by
- ;; mumamo, but the menu item disappears.
- ;;(message "html-imenu-setup imenu-create-index-function =%s" imenu-create-index-function)
- (unless nil ;(eq imenu-create-index-function 'html-imenu-index)
- (setq imenu-create-index-function 'html-imenu-index)
- (set (make-local-variable 'imenu-sort-function) nil) ; sorting the menu defeats the purpose
- (imenu-add-to-menubar html-imenu-title)
- ;; Run an update to make it easier to access the menubar
- ;;(run-with-idle-timer 5 nil 'html-imenu-update-menubar (current-buffer))
- ))
-
-(defun html-imenu-update-menubar (buffer)
- (condition-case err
- (html-imenu-update-menubar-1 buffer)
- (error (message "html-imenu-update-menubar error: %s" err))))
-
-(defun html-imenu-update-menubar-1 (buffer)
- (with-current-buffer buffer
- (message "HTML Imenu: update menubar...")
- (imenu-update-menubar)
- (message "")))
-
-(provide 'html-imenu)
-;;; html-imenu ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-move.el b/emacs.d/nxhtml/nxhtml/html-move.el
deleted file mode 100644
index 4fadf71..0000000
--- a/emacs.d/nxhtml/nxhtml/html-move.el
+++ /dev/null
@@ -1,251 +0,0 @@
-;;; html-move.el --- Move a file in a local file web site.
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Thu Jan 12 08:11:30 2006
-(defconst html-move:version "0.31") ;; Version:
-;; Last-Updated: Tue Feb 20 23:59:43 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;DO NOT USE YET!
-;;
-;; Functions for moving a file in a local file web site. Moves the
-;; file and fixes the local affected links after the move.
-;;
-;; To use this file you may in your .emacs put
-;;
-;; (require 'html-move)
-;;
-;; Call the function `html-move-buffer-file' to move a file.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (add-to-list 'load-path default-directory load-path))
-(eval-when-compile (require 'html-site nil t))
-(require 'url-parse)
-
-(defun html-move-make-new-url (old-url from-dir to-dir)
- "Make new relative url.
-If OLD-URL is an absolute path then return it. Otherwise OLD-URL
-is assumed to be relative FROM-DIR. Return a new url relative
-TO-DIR that gives the same absolute path."
- (if (or (file-name-absolute-p old-url)
- (char-equal ?# (string-to-char old-url))
- (let ((urlobj (url-generic-parse-url old-url)))
- (url-host urlobj)))
- (progn
- nil)
- (let* (
- (relative-path (file-relative-name from-dir to-dir))
- (new-abs-url (expand-file-name (concat relative-path old-url) to-dir))
- (new-url (file-relative-name new-abs-url to-dir)))
- new-url)))
-
-
-(defun html-move-in-dir-tree (file tree)
- (let ((rel-path (file-relative-name file tree)))
- (or (string= "." rel-path)
- (not (string= ".." (substring rel-path 0 2))))))
-
-(defun html-move-buffer-file (to)
- "Move current buffer file to another directory and/or name.
-Correct the affected relative links in the moved file and the
-links to the file moved in the directory tree
-`html-site-current-site-dir'."
- ;;(interactive "GMove to: ")
- (interactive
- (let* ((use-dialog-box nil)
- (name (read-file-name "Move to (directory or file name): "
- ))
- )
- (list (expand-file-name name))))
- (html-site-current-ensure-site-defined)
- (let ((from (buffer-file-name))
- (site-directory (html-site-current-site-dir)))
- (unless from
- (error "No buffer file name, can't move file!"))
- (let* ((from-dir (file-name-directory from))
- (from-ext (file-name-extension from))
- to-dir
- to-ext
- new-name
- new-file
- new-buffer
- relative-path)
- (unless (html-move-in-dir-tree from-dir site-directory)
- (error "Buffer file is not in site directory tree"))
- (if (file-directory-p to)
- (progn
- (setq to-dir to)
- (setq new-name (file-name-nondirectory from))
- )
- (setq to-ext (file-name-extension to))
- (unless (string= to-ext from-ext)
- (if (not to-ext)
- (error "Can't find directory %s (or missing extension?)" to)
- (error "Move must not change file extension")))
- (setq to-dir (file-name-directory to))
- (unless (file-directory-p to-dir)
- (if (file-exists-p to-dir)
- (error "Not a directory: %s" to-dir)
- (error "Can't find directory %s" to-dir)))
- (setq new-name (file-name-nondirectory to))
- )
-
- (unless (html-move-in-dir-tree to-dir site-directory)
- (error "Target is not in site directory tree"))
-
-
- (setq relative-path (file-relative-name to-dir from-dir))
- (when (file-name-absolute-p relative-path)
- (error "Can't make a relative path from %s to %s" from to))
- (setq new-file (expand-file-name new-name to))
- (let ((moved-buffer (current-buffer))
- (moved-contents (buffer-substring-no-properties
- (point-min)
- (point-max))))
- (when (file-exists-p new-file)
- (error "File already exists: %s" new-file))
- ;; Open in new location
- (find-file new-file)
- (setq new-buffer (current-buffer))
- (erase-buffer)
- (insert moved-contents)
- (goto-char (point-min))
- (while (re-search-forward "\\(?:href\\|src\\)\\s-*=\\s-*\"\\([^\"]*\\)\"" nil t)
- (let ((old-url (match-string 1))
- (new-url))
- (unless (or (> 11 (length old-url))
- (string= "javascript:"
- (downcase (substring old-url 0 11))))
- (setq new-url (html-move-make-new-url old-url from-dir to-dir))
- (when new-url
- (replace-match new-url t t nil 1)))))
- (save-buffer)
- (html-move-fix-site-backlinks from to-dir from-dir)
- ;; Make backup at current location of "from" file
- (with-current-buffer moved-buffer
- (set-buffer-modified-p t)
- (save-buffer))
- (kill-buffer moved-buffer)
- ;; Delete moved
- (delete-file from))
- (set-buffer new-buffer)
- (goto-char (point-min))
- (lwarn '(html-move) :warning "Moved to %s" new-file)
- )))
-
-(defun html-move-fix-site-backlinks (to-moved-file to-dir from-dir)
- "Fix all links back to TO-MOVED-FILE.
-This is called by `html-move-buffer-file' to fix all links back
-to the moved file. TO-MOVED-FILE is the old location of the
-moved file. FROM-DIR is the old directory and TO-DIR the target
-directory for the move."
- (html-move-fix-all-backlinks to-moved-file (html-site-current-site-dir) to-dir from-dir)
- (when (html-move-fix-page-list to-moved-file to-dir from-dir)
- (message "Page list for site TOC changed. You need to update TOC.")
- (lwarn '(html-move-fix-site-backlinks) :warning "Page list for site TOC changed. You need to update TOC.")
- ))
-
-(defun html-move-fix-all-backlinks (to-moved-file for-dir to-dir from-dir)
- ;;(message "for-dir=%s" for-dir);(sit-for 2)
- (let ((html-files (directory-files for-dir t ".*\\.html?$"))
- (sub-dirs (directory-files-and-attributes for-dir t)))
- (dolist (html-file html-files)
- (html-move-fix-backlinks to-moved-file html-file to-dir from-dir))
- (dolist (sub-entry sub-dirs)
- (let* ((sub-dir (car sub-entry))
- (sub-name (file-name-nondirectory sub-dir)))
- (when (and (eq t (car (cdr sub-entry)))
- (not (string= "." sub-name))
- (not (string= ".." sub-name)))
- (html-move-fix-all-backlinks to-moved-file sub-dir to-dir from-dir))))))
-
-(defun html-move-fix-backlinks (to-moved-file for-file to-dir from-dir)
- (when (file-exists-p for-file)
- (let ((old-file-buffer (get-file-buffer for-file))
- (buffer (find-file-noselect for-file)))
- (with-current-buffer buffer
- (goto-char (point-min))
- (while
- (re-search-forward
- "\\(?:href\\|src\\)\\s-*=\\s-*\"\\([^#\"]*\\)\\(?:#[^\"]*\\|\\)\""
- nil t)
- (let* ((old-url (match-string 1))
- (old-absolute-url (expand-file-name
- old-url
- (file-name-directory for-file)))
- new-url)
- (when (string= old-absolute-url to-moved-file)
- (setq new-url (html-move-make-new-url old-url to-dir from-dir))
- ;;(message "new-backlink=%s" new-url);(sit-for 2)
- (replace-match new-url t t nil 1)
- )))
- (save-buffer)
- (unless old-file-buffer
- (kill-this-buffer))))))
-
-(defun html-move-fix-page-list (to-moved-file to-dir from-dir)
- (let ((for-file (html-site-current-page-list))
- some-change)
- (when (file-exists-p for-file)
- (let ((old-file-buffer (get-file-buffer for-file))
- (buffer (find-file-noselect for-file)))
- (with-current-buffer buffer
- (goto-char (point-min))
- (while
- (re-search-forward
- ;;"\\(?:href\\|src\\)\\s-*=\\s-*\"\\([^#\"]*\\)\\(?:#[^\"]*\\|\\)\""
- "\\s-+###\\s-+\\([^#]*?\\)\\(?:#[^#]*\\|\\)[:space:]*$"
- nil t)
- (let* ((old-url (match-string 1))
- (old-absolute-url (expand-file-name
- old-url
- (file-name-directory for-file)))
- new-url)
- (when (string= old-absolute-url to-moved-file)
- (setq new-url (html-move-make-new-url old-url to-dir from-dir))
- ;;(message "new-backlink=%s" new-url);(sit-for 2)
- (replace-match new-url t t nil 1)
- (setq some-change t)
- )))
- (save-buffer)
- (unless old-file-buffer
- (kill-this-buffer)))))
- some-change))
-
-(provide 'html-move)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-move.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-pagetoc.el b/emacs.d/nxhtml/nxhtml/html-pagetoc.el
deleted file mode 100644
index adcdcb7..0000000
--- a/emacs.d/nxhtml/nxhtml/html-pagetoc.el
+++ /dev/null
@@ -1,336 +0,0 @@
-;;; html-pagetoc.el --- Insert/rebuild table of contents for html page
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2005-08-03
-;; Last-Updated: Sat Apr 21 14:11:13 2007 (7200 +0200)
-(defconst html-pagetoc:version "0.85") ;; Version:
-;; Keywords: tools hypermedia html
-;; Features that might be required by this library:
-;;
-;; None
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This file is not part of Emacs
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
-
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-
-;; html-pagetoc.el has functions for building (and rebuilding) a
-;; simple table of contents for a single html file. It is supposed to
-;; be a quick tool for this. The table of contents are made from the
-;; header tags (H1, H2, H3 etc). If you have ID attributes on the
-;; header the table of contents will have links to those. Otherwise it
-;; is just text.
-
-;; To use this module put it in emacs load-path and enter the line
-;; below in your .emacs:
-;;
-;; (require 'html-pagetoc)
-;;
-;; When editing a html file put your cursor where you want the table
-;; of contents and do M-x html-pagetoc-insert-toc.
-;;
-;; To rebuild the table of contents use M-x html-pagetoc-rebuild-toc.
-;; If you want to add styles to it you can use M-x
-;; html-pagetoc-insert-style-guide.
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(define-key global-map [f2] 'eval-buffer)
-;;(define-key global-map [f3] 'html-pagetoc-insert-toc)
-
-;;;###autoload
-(defgroup html-pagetoc nil
- "Html page local table of contents settings"
- :group 'nxhtml
- :group 'hypermedia)
-
-(defcustom html-pagetoc-tocheads
- '(
- ("" . "On THIS Page:")
- )
- "Head titles for table of contents.
-The titles are put above the table of contents.
-
-The value of this variable should be a list of cons cells where
-the car is a regexp to match against file names and the cdr is
-the head title to use. The first match in the list is used. If
-there is no match then no head title is inserted."
- :type '(repeat (cons regexp string))
- :group 'html-pagetoc)
-
-(defcustom html-pagetoc-min 1
- "Default for min header level"
- :type 'integer
- :group 'html-pagetoc)
-(make-variable-buffer-local 'html-pagetoc-min)
-
-(defcustom html-pagetoc-max 3
- "Default for max header level"
- :type 'integer
- :group 'html-pagetoc)
-(make-variable-buffer-local 'html-pagetoc-max)
-
-(defconst html-pagetoc-begin-cmnt "<!-- Table of contents BEGIN -->\n")
-(defconst html-pagetoc-end-cmnt "<!-- END of Table of contents -->\n")
-(defconst html-pagetoc-maxmin-cmnt "<!-- Table of contents min=%s max=%s -->\n")
-
-;;(defconst html-pagetoc-buffers nil)
-
-(defun html-pagetoc-get-title (filename)
- "Find the head title for filename.
-See `html-pagetoc-tocheads'."
- (when filename
- (let ((ths html-pagetoc-tocheads)
- th
- re
- header)
- (while (and ths (not header))
- (setq th (car ths))
- (setq ths (cdr ths))
- (setq re (car th))
- (when (string-match re filename)
- (setq header (cdr th))))
- header)))
-
-;;;###autoload
-(defun html-pagetoc-insert-toc (&optional min-level max-level)
- "Inserts a table of contents for the current html file.
-The html header tags h1-h6 found in the file are inserted into
-this table. MIN-LEVEL and MAX-LEVEL specifies the minimum and
-maximum level of h1-h6 to include. They should be integers."
- (interactive (let* ((maxstr)
- (max 0)
- (min 1)
- (prmax (format "Max header level (%s): " html-pagetoc-max))
- (prmax2 (concat "Please give an integer 1-5. " prmax))
- (prmin "Include header level 1? ")
- )
- (while (= max 0)
- (setq maxstr (read-string prmax))
- (if (equal maxstr "")
- (setq max html-pagetoc-max)
- (when (not (string-match "\\." maxstr))
- (setq max (string-to-number maxstr)) ))
- (when (> max 5) (setq max 0))
- (when (< max 0) (setq max 0))
- (setq prmax prmax2) )
- (when (> max 1)
- (when (not (y-or-n-p prmin)) (setq min 2)))
- (list min max)))
-
- (let* ((curr-buffer (current-buffer))
- (header (html-pagetoc-get-title (buffer-file-name)))
- (toc-buffer (get-buffer-create "*html-pagetoc*"))
- (toc)
- (buffer-val (cons (buffer-file-name) (list min-level max-level)))
- )
- (setq html-pagetoc-min min-level)
- (setq html-pagetoc-max max-level)
- (with-current-buffer toc-buffer (erase-buffer))
- (with-temp-buffer
- (insert-buffer-substring curr-buffer)
- ;;(replace-regexp "<!--.*?-->" "")
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "<!--.*?-->" nil t)
- (replace-match "" nil nil))
- (goto-char (point-min))
- (let ((b (current-buffer))
- (standard-output toc-buffer)
- (level (- min-level 1))
- (skip-level (- min-level 1))
- (prev-level)
- )
- (princ html-pagetoc-begin-cmnt)
- (princ (format
- html-pagetoc-maxmin-cmnt
- min-level
- max-level))
- (princ "<table id=\"PAGETOC\"><tr><td>\n")
- (when header
- (princ "<span class=\"tochead\">")
- (princ header)
- (princ "</span>\n"))
- (while (re-search-forward
- (concat "\\(?:<h\\([1-9]\\)\\([^>]*\\)>\\(.*?\\)</h[1-9]>"
- "\\|"
- "<!--\\(?:.\\|\n\\)-->\\)")
- nil t)
- (let ((m0 (match-string 0))
- (m1 (match-string 1))
- (m2 (match-string 2))
- (title (match-string 3))
- (id)
- (new-level)
- )
- (unless (not m1)
- (setq new-level (string-to-number m1))
- (when (and (<= new-level max-level) (<= min-level new-level))
- (setq prev-level level)
- (setq level new-level)
- (while (< prev-level level)
- (princ (make-string (* (- prev-level skip-level) 4) 32))
- ;; class liul is a fix for a problem in IE
- (when (> prev-level (- min-level 1)) (princ "<li class=\"liul\">"))
- (princ "<ul>\n")
- (setq prev-level (+ prev-level 1)))
- (while (> prev-level level)
- (princ (make-string (* (- prev-level skip-level) 4) 32))
- (princ "</ul></li>\n")(setq prev-level (- prev-level 1)))
- (when (nth 3 (match-data t))
- (when (string-match "id=\"\\([^\"]*\\)\"" m2)
- (setq id (substring m2 (match-beginning 1) (match-end 1)))))
- (princ (make-string (* (- level skip-level) 4) 32))
- (princ "<li>")
- (if id
- (princ (format "<a href=\"#%s\">%s</a>" id title))
- (princ title))
- (princ "</li>\n")
- ))))
- (while (> level (- min-level 1))
- (setq level (- level 1))
- (princ (concat (make-string (* (- level skip-level) 4) 32) "</ul>"))
- (when (> level (- min-level 1)) (princ "</li>"))
- (princ "\n"))
- (princ "</td></tr></table>\n")
- (princ html-pagetoc-end-cmnt)
- (with-current-buffer toc-buffer
- (setq toc (buffer-string)))
- )
- ) ; save-excursion
- ) ; with-temp-buffer
- (when toc
- (when (re-search-forward "<body.*?>" nil t)
- (forward-line))
- (set-mark (point))
- (insert toc)
- (let ((start (copy-marker (region-beginning)))
- (end (copy-marker (region-end))))
- (indent-region (region-beginning) (region-end) nil)
- (set-mark start)
- (goto-char end))
- (setq deactivate-mark nil)
- (message "Toc created"))
- )
- )
-
-(defun html-pagetoc-insert-style-guide ()
- "Inserts a style tag for toc inserted by `html-pagetoc-insert-toc'.
-This can be used as a guide for creating your own style sheet for
-the table of contents."
- (interactive)
- (goto-char (point-min))
- (unless (re-search-forward "^\\s-*</head>")
- (error "%s" "Can not find ^\\s-*</head>"))
- (beginning-of-line)
- (set-mark (point))
- (insert "\n")
- (insert "<!-- Style for the table of contents. -->\n")
- (insert "<style type=\"text/css\">\n")
- (insert "#PAGETOC {\n")
- (insert " background-color: #df7;\n")
- (insert " padding: 0.5em;\n")
- (insert "}\n")
- ;;(insert "#PAGETOC strong { color: #ac4; }\n")
- (insert "#PAGETOC a { color: maroon; display: block; }\n")
- (insert "#PAGETOC a:hover { background-color: yellow; }\n")
- (insert "#PAGETOC ul {\n")
- (insert " list-style-type: none;\n")
- (insert " margin-left: 0;\n")
- (insert " padding-left: 1.5em;\n")
- (insert "}\n")
- (insert "#PAGETOC ul li { font-weight: bold; }\n")
- (insert "#PAGETOC ul li ul { }\n")
- (insert "#PAGETOC ul li ul li { font-weight: normal;}\n")
- (insert "#PAGETOC .liul {\n")
- (insert " //display:inline; /* IE fix */\n")
- (insert "}\n")
- (insert "#PAGETOC .tochead {\n")
- (insert " font-weight: bold;\n")
- (insert " margin-bottom: 0.5em;\n")
- (insert "}\n")
- (insert "</style>\n")
- (insert "\n")
- (let ((start (copy-marker (region-beginning)))
- (end (copy-marker (region-end))))
- (indent-region (region-beginning) (region-end) nil)
- (set-mark start)
- (goto-char end))
- (setq deactivate-mark nil)
- (message "Please edit the style guide!")
- )
-
-;;;###autoload
-(defun html-pagetoc-rebuild-toc ()
- "Update the table of contents inserted by `html-pagetoc-insert-toc'."
- (interactive)
- (let* (;;(old-val (assoc (buffer-file-name) html-pagetoc-buffers))
- ;;(old-min (nth 1 old-val))
- ;;(old-max (nth 2 old-val))
- (old-min html-pagetoc-min)
- (old-max html-pagetoc-max)
- )
- (goto-char (point-min))
- (if (not (search-forward html-pagetoc-begin-cmnt nil t))
- (when (y-or-n-p "Could not find table of contents. Insert one here? ")
- (html-pagetoc-insert-toc))
- (backward-char 4)
- (beginning-of-line)
- (let ((minmax-patt (format html-pagetoc-maxmin-cmnt "\\([[:alnum:]]+\\)" "\\([[:alnum:]]+\\)")))
- (save-excursion
- (when (search-forward-regexp minmax-patt nil t)
- (setq old-min (string-to-number (match-string 1)))
- (setq old-max (string-to-number (match-string 2))))))
- (let ((start-toc (point)))
- (when (search-forward html-pagetoc-end-cmnt)
- (beginning-of-line)
- (let ((end-toc (point)))
- (set-mark start-toc)
- (goto-char end-toc)
- (when (y-or-n-p "Rebuild this TOC? ")
- ;;(unless old-min (setq old-min 1))
- (setq old-min (eval-minibuffer "Min TOC level: " (format "%s" old-min)))
- ;;(unless old-max (setq old-max 3))
- (setq old-max (eval-minibuffer "Max TOC level: " (format "%s" old-max)))
- (delete-region start-toc end-toc)
- (html-pagetoc-insert-toc old-min old-max ))))))))
-
-;;;###autoload
-(defconst html-pagetoc-menu-map
- (let ((map (make-sparse-keymap)))
- (define-key map [html-pagetoc-rebuild-toc]
- (list 'menu-item "Update Page TOC" 'html-pagetoc-rebuild-toc))
- (define-key map [html-pagetoc-insert-style-guide]
- (list 'menu-item "Insert CSS Style for Page TOC" 'html-pagetoc-insert-style-guide))
- (define-key map [html-pagetoc-insert-toc]
- (list 'menu-item "Insert Page TOC" 'html-pagetoc-insert-toc))
- map))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;; Ready:
-(provide 'html-pagetoc)
-
-;;; html-pagetoc.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-quote.el b/emacs.d/nxhtml/nxhtml/html-quote.el
deleted file mode 100644
index 4605a4f..0000000
--- a/emacs.d/nxhtml/nxhtml/html-quote.el
+++ /dev/null
@@ -1,71 +0,0 @@
-;;; html-quote.el --- Simple quoting of html characters
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sun Dec 30 12:55:38 2007
-;; Version:
-;; Last-Updated: Sun Dec 30 12:59:43 2007 (3600 +0100)
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Just simple quoting of & < > etc
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-
-(defcustom html-quote-html '((?< . "&lt;")
- (?& . "&amp;"))
- "*Alist of char -> entity mappings used to make the text html-safe."
- :group 'html-qoute
- :type '(alist :key-type character
- :value-type string))
-
-
-(defun html-quote-html-char (char)
- "Return CHAR as string if safe, otherwise its html entity."
- (or (cdr (assoc char html-quote-html))
- (char-to-string char)))
-
-(defun html-quote-html-string (str)
- "Return html escaped STR."
- (mapconcat 'html-quote-html-char
- (append str nil)
- ""))
-
-;; (html-quote-html-string "is & < s")
-
-(provide 'html-quote)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-quote.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-site.el b/emacs.d/nxhtml/nxhtml/html-site.el
deleted file mode 100644
index 64238fc..0000000
--- a/emacs.d/nxhtml/nxhtml/html-site.el
+++ /dev/null
@@ -1,801 +0,0 @@
-;;; html-site.el --- Keeping (X)HTML files together
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Wed Mar 01 17:25:52 2006
-(defconst html-site:version "0.3");; Version:
-;; Last-Updated: 2008-03-22T03:32:06+0100 Sat
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `cl', `html-site', `html-upl', `ietf-drums', `mail-parse',
-;; `mail-prsvr', `mailcap', `mm-util', `qp', `rfc2045', `rfc2047',
-;; `rfc2231', `time-date', `timer', `timezone', `tls', `url',
-;; `url-auth', `url-c', `url-cookie', `url-expand', `url-gw',
-;; `url-history', `url-http', `url-methods', `url-parse',
-;; `url-privacy', `url-proxy', `url-util', `url-vars'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; TODO: maybe use browse-url-filename-alist
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'compile))
-(eval-when-compile (require 'dired))
-(eval-when-compile (require 'ffip nil t))
-(eval-when-compile (require 'grep))
-(eval-when-compile (require 'ourcomments-util nil t))
-(eval-when-compile (require 'url-parse))
-;;(defvar html-site-list) ;; Silence compiler
-;;(defvar html-site-current) ;; Silence compiler
-
-;;;###autoload
-(defgroup html-site nil
- "Customization group for html-site."
- :group 'nxhtml)
-
-;; Fix-me: Rewrite using directory variables
-(defcustom html-site-list nil
- "Known site directories and corresponding attributes.
-Each element in the list is a list containing:
-
-* Name for the site.
-* Site root directory.
-* Page list file - Pages for table of contents (TOC). Usually
- initially built from the site directory by
- `html-toc-create-pages-file'.
-* Frames file.
-* TOC file for the frames file.
-* Output directory - where to put the merged TOC and site
- pages.
-* Output template file - html template for merging. See `html-wtoc-dir'
- for examples.
-* Function for additional tasks - for example copying images, style
- sheets, scripts etc.
---
-"
- :type '(repeat
- (list
- (string :tag "*** Site name ***")
- (directory :tag "Site root directory")
- (file :tag "Page list file")
- (file :tag "Frames file")
- (file :tag "Contents file for frames")
- (directory :tag "Output directory for pages with TOC" :help-echo "Where to put the merged files")
- (file :tag "Template file for pages with TOC" :help-echo "HTML template for merging")
- (choice :tag "Extra function for pages with TOC"
- (const nil :tag "Default function")
- (function)
- )
- (string :tag "Ftp host address")
- (string :tag "Ftp user")
- (string :tag "Ftp password")
- (string :tag "Ftp directory root")
- (string :tag "Ftp directory root for pages with TOC")
- (string :tag "Web host address")
- (string :tag "Web directory root")
- (string :tag "Web directory root for pages with TOC")
- ))
- :set (lambda (symbol value)
- ;;(message "sym=%s, value=%s" symbol value)
- (set-default symbol value)
- (when (featurep 'html-site)
- (let ((ok t))
- (dolist (e value)
- (let (
- (name (elt e 0))
- (site-dir (elt e 1))
- (pag-file (elt e 2))
- (frm-file (elt e 3))
- (toc-file (elt e 4))
- (out-dir (elt e 5))
- (tpl-file (elt e 6))
- (fun (elt e 7))
- (ftp-host (elt e 8))
- (ftp-user (elt e 9))
- (ftp-pw (elt e 10))
- (ftp-dir (elt e 11))
- (ftp-wtoc-dir (elt e 12))
- (web-host (elt e 13))
- (web-dir (elt e 14))
- (web-wtoc-dir (elt e 15))
- )
- (unless (not (string= "" name))
- (html-site-lwarn '(html-site-list) :error "Empty site name"))
- (if (not (file-directory-p site-dir))
- (progn
- (html-site-lwarn '(html-site-list) :error "Site directory for %s not found: %s" name site-dir)
- (setq ok nil))
- (unless (file-exists-p pag-file)
- (html-site-lwarn '(html-site-list) :warning "Pages list file for %s does not exist: %s" name pag-file))
- (unless (file-exists-p tpl-file)
- (html-site-lwarn '(html-site-list) :warning "Template file for %s does not exist: %s" name tpl-file)))
- (when (< 0 (length out-dir))
- (html-site-chk-wtocdir out-dir site-dir))
- (when fun
- (unless (functionp fun)
- (html-site-lwarn '(html-site-list) :error "Site %s - Unknown function: %s" name fun)
- (setq ok nil)
- ))
- ))
- )))
- :group 'html-site)
-
-(defcustom html-site-current ""
- "Current site name.
-Use the entry with this name in `html-site-list'."
- :set (lambda (symbol value)
- ;;(message "sym=%s, value=%s" symbol value)
- (set-default symbol value)
- (when (featurep 'html-site)
- (or (when (= 0 (length value))
- (message "html-site-current (information): No current site set"))
- (let ((site-names))
- (dolist (m html-site-list)
- (setq site-names (cons (elt m 0) site-names)))
- (or
- (unless (member value site-names)
- (html-site-lwarn '(html-site-current) :error "Can't find site: %s" value))
- (let ((site-dir (html-site-site-dir value)))
- (unless (file-directory-p site-dir)
- (html-site-lwarn '(html-site-current) :error "Can't find site directory: %s" value))))))))
- :type 'string
- :set-after '(html-site-list)
- :group 'html-site)
-
-(defun html-site-looks-like-local-url (file)
- "Return t if this looks like a local file something url."
- (require 'url-parse)
- (let ((url-type (url-type (url-generic-parse-url file))))
- (not
- (and url-type
- ;; Test if it really is an url, the is 1 for w32 drive
- ;; letters
- (or (not (memq system-type '(ms-dos windows-nt)))
- (< 1 (length url-type)))))))
-
-(when nil
- (assert (not (html-site-looks-like-local-url "http://www.some.where/")))
- (assert (html-site-looks-like-local-url "/unix/file"))
- (when (memq system-type '(windows-nt))
- (assert (html-site-looks-like-local-url "c:/w32/file"))))
-
-(defun html-site-dir-contains (dir file)
- ;;(when (= ?~ (string-to-char file)) (setq file (expand-file-name file)))
- ;;
- ;; It is not possible to unconditionally expand the file name here
- ;; since url file names can be involved.
- ;; (url-type (url-generic-parse-url "c:/some/file.txt"))
- (let* ((file-is-local (html-site-looks-like-local-url file))
- (dir-is-local (html-site-looks-like-local-url dir))
- (file-is-dir (and file-is-local
- (file-directory-p file)))
- (true-f (if file-is-local
- (if file-is-dir
- (file-name-as-directory
- (file-truename
- (expand-file-name file)))
- (file-truename
- (expand-file-name file)))
- file))
- ;; (file-name-as-directory (expand-file-name "~/"))
- (true-d (if dir-is-local
- (file-name-as-directory
- (file-truename
- (expand-file-name dir)))
- (if (eq ?/ (car (reverse (append dir nil))))
- dir
- (concat dir "/")))))
- (assert (eq file-is-local dir-is-local))
- (if (< (length true-d) (length true-f))
- (string= true-d
- (substring true-f 0 (length true-d)))
- (when file-is-dir
- (string= true-d true-f)))))
-
-(defun html-site-lwarn (warn-type level format-string &rest args)
- (apply 'message (concat "%s:" format-string) warn-type args)
- (apply 'lwarn warn-type level args))
-
-(defun html-site-chk-wtocdir (out-dir site-dir)
- (or
- (unless (file-name-absolute-p out-dir)
- (html-site-lwarn '(html-site) :error "Output directory is not absolute: %s" out-dir))
- (if (file-exists-p out-dir)
- (unless (file-directory-p out-dir)
- (html-site-lwarn '(html-site) :error "File %s for output exists but is not a directory" out-dir))
- (unless (string= out-dir (file-name-as-directory out-dir))
- (html-site-lwarn '(html-site) :error "File name could not be a directory: %s" out-dir)))
- (when (html-site-dir-contains out-dir site-dir)
- (html-site-lwarn '(html-site) :error "Ouput directory for pages with TOC must not contain site dir."))
- (when (html-site-dir-contains site-dir out-dir)
- (html-site-lwarn '(html-site) :error "Site dir must not contain ouput directory for pages with TOC."))))
-
-
-;;;###autoload
-(defun html-site-buffer-or-dired-file-name ()
- "Return buffer file name or file pointed to in dired."
- (if (derived-mode-p 'dired-mode)
- (dired-get-file-for-visit)
- buffer-file-name))
-
-;;;###autoload
-(defun html-site-set-site (name)
- (interactive
- (let ((site-names)
- (must-contain (when (boundp 'must-contain) must-contain))
- (file (html-site-buffer-or-dired-file-name))
- (use-dialog-box nil))
- (unless (< 0 (length html-site-list))
- (error "No sites defined yet"))
- (when (and file
- ;;(string-match "ml" (symbol-name major-mode))
- )
- (when (or must-contain
- (y-or-n-p "Should site contain current file? "))
- (setq must-contain file)))
- (dolist (m html-site-list)
- (let* ((name (elt m 0))
- (dir (html-site-site-dir name)))
- (when (or (not must-contain)
- (html-site-dir-contains dir file))
- (setq site-names (cons name site-names)))))
- (unless site-names
- (when must-contain
- (error "No sites contains %s" must-contain)))
- (list (when site-names
- (let ((prompt (if (< 0 (length html-site-current))
- (concat "Current site is \""
- html-site-current
- "\". "
- (if must-contain
- "New site containing file: "
- "New site's name: "))
- (if must-contain
- "Site containing file: "
- "Site name: "))))
- (completing-read prompt site-names nil t nil 'site-names))))))
- (unless (or (string= name "")
- (string= name html-site-current))
- (setq html-site-current name)
- (customize-save-variable 'html-site-current html-site-current)))
-
-;;;###autoload
-(defun html-site-dired-current ()
- "Open `dired' in current site top directory."
- (interactive)
- (dired (html-site-current-site-dir)))
-
-;;;###autoload
-(defun html-site-find-file ()
- "Find file in current site."
- (interactive)
- ;;(require 'ffip)
- (ffip-set-current-project html-site-current
- (html-site-current-site-dir)
- 'nxhtml)
- (call-interactively 'ffip-find-file-in-project))
-
-;;;###autoload
-(defun html-site-rgrep (regexp files)
- "Search current site's files with `rgrep'.
-See `rgrep' for the arguments REGEXP and FILES."
- (interactive
- (progn
- (grep-compute-defaults)
- (let* ((regexp (grep-read-regexp))
- (files (grep-read-files regexp)))
- (list regexp files))))
- ;; fix-me: ask for site
- ;;(when (called-interactively-p) )
- (rgrep regexp files (html-site-current-site-dir)))
-
-;;;###autoload
-(defun html-site-query-replace (from to file-regexp delimited)
- "Query replace in current site's files."
- (interactive
- (let ((parameters (dir-replace-read-parameters t t)))
- ;; Delete element 3
- ;;(length parameters)
- (setcdr (nthcdr 2 parameters) (nthcdr 4 parameters))
- ;;(length parameters)
- parameters))
- ;; fix-me: ask for site
- ;;(when (called-interactively-p) )
- (rdir-query-replace from to file-regexp
- ;;root
- (html-site-current-site-dir)
- delimited)
- )
-
-(defun html-site-ensure-site-defined (site-name)
- (unless html-site-list
- (error "No sites defined. Please customize `html-site-list'."))
- (unless (file-directory-p (html-site-site-dir site-name))
- (error "Local file web site directory does not exists: %s"
- (html-site-site-dir site-name))))
-(defun html-site-current-ensure-site-defined ()
- (unless (and (< 0 (length html-site-current))
- (assoc html-site-current html-site-list))
- (error "No current site set"))
- (html-site-ensure-site-defined html-site-current))
-
-(defun html-site-remote-contains (site-name url with-toc)
- (html-site-dir-contains (html-site-remote-root site-name with-toc) url))
-(defun html-site-current-remote-contains (url with-toc)
- (html-site-remote-contains html-site-current url with-toc))
-
-(defun html-site-ensure-file-in-site (site-name file-name &optional no-error)
- (html-site-ensure-site-defined site-name)
- (if (html-site-contains site-name file-name)
- t
- (if no-error
- nil
- (error "This file is not in site %s" site-name))))
-(defun html-site-current-ensure-file-in-site (file-name)
- ;;(html-site-ensure-file-in-site html-site-current file-name))
- (let ((in-site (html-site-ensure-file-in-site html-site-current
- file-name t)))
- (while (not in-site)
- (if (not (y-or-n-p
- (format "This file is not in site %s, change site? "
- html-site-current)))
- (error "This file is not in site %s" html-site-current)
- (let ((must-contain t))
- (call-interactively 'html-site-set-site))
- (setq in-site (html-site-ensure-file-in-site html-site-current
- file-name t))))))
-
-(defun html-site-ensure-buffer-in-site (site-name)
- (unless buffer-file-name
- (error "This buffer is not visiting a file"))
- (html-site-ensure-file-in-site site-name buffer-file-name))
-(defun html-site-current-ensure-buffer-in-site ()
- (html-site-ensure-buffer-in-site html-site-current))
-
-
-(defun html-site-site-dir (site-name)
- (file-name-as-directory
- (nth 1 (assoc site-name html-site-list))))
-(defun html-site-current-site-dir () (html-site-site-dir html-site-current))
-
-(defun html-site-contains (site-name file)
- (html-site-dir-contains (html-site-site-dir site-name) file))
-(defun html-site-current-contains (file)
- (html-site-contains html-site-current file))
-
-(defun html-site-page-list (site-name)
- (let ((page-list (nth 2 (assoc site-name html-site-list))))
- (when (< 0 (length page-list))
- page-list)))
-
-(defun html-site-current-page-list () (html-site-page-list html-site-current))
-
-(defun html-site-frames-file (site-name)
- (nth 3 (assoc site-name html-site-list)))
-(defun html-site-current-frames-file () (html-site-frames-file html-site-current))
-
-(defun html-site-toc-file (site-name)
- (nth 4 (assoc site-name html-site-list)))
-(defun html-site-current-toc-file () (html-site-toc-file html-site-current))
-
-(defun html-site-merge-dir (site-name)
- (let ((dir (nth 5 (assoc site-name html-site-list))))
- (when (< 0 (length dir))
- dir)))
-(defun html-site-current-merge-dir () (html-site-merge-dir html-site-current))
-
-(defun html-site-merge-template (site-name)
- (nth 6 (assoc site-name html-site-list)))
-(defun html-site-current-merge-template () (html-site-merge-template html-site-current))
-
-(defun html-site-extra-fun (site-name)
- (nth 7 (assoc site-name html-site-list)))
-(defun html-site-current-extra-fun () (html-site-extra-fun html-site-current))
-
-(defun html-site-ftp-host (site-name)
- (nth 8 (assoc site-name html-site-list)))
-(defun html-site-current-ftp-host () (html-site-ftp-host html-site-current))
-
-(defun html-site-ftp-user (site-name)
- (nth 9 (assoc site-name html-site-list)))
-(defun html-site-current-ftp-user () (html-site-ftp-user html-site-current))
-
-(defun html-site-ftp-password (site-name)
- (nth 10 (assoc site-name html-site-list)))
-(defun html-site-current-ftp-password () (html-site-ftp-password html-site-current))
-
-(defun html-site-ftp-dir (site-name)
- (nth 11 (assoc site-name html-site-list)))
-(defun html-site-current-ftp-dir () (html-site-ftp-dir html-site-current))
-
-(defun html-site-ftp-wtoc-dir (site-name)
- (nth 12 (assoc site-name html-site-list)))
-(defun html-site-current-ftp-wtoc-dir () (html-site-ftp-wtoc-dir html-site-current))
-
-(defun html-site-web-host (site-name)
- (nth 13 (assoc site-name html-site-list)))
-(defun html-site-current-web-host () (html-site-web-host html-site-current))
-
-(defun html-site-web-dir (site-name)
- (nth 14 (assoc site-name html-site-list)))
-(defun html-site-current-web-dir () (html-site-web-dir html-site-current))
-
-(defun html-site-web-wtoc-dir (site-name)
- (nth 15 (assoc site-name html-site-list)))
-(defun html-site-current-web-wtoc-dir () (html-site-web-wtoc-dir html-site-current))
-
-(defun html-site-web-full (site-name with-toc)
- (let ((host (html-site-web-host site-name)))
- (unless (and host
- (< 0 (length host)))
- (error "Web site host not known for %s" site-name))
- (save-match-data
- (unless (string-match "^https?://" host)
- (setq host (concat "http://" host))))
- (concat host
- (if with-toc
- (html-site-web-wtoc-dir site-name)
- (html-site-web-dir site-name)))))
-(defun html-site-current-web-full (with-toc)
- (html-site-web-full html-site-current with-toc))
-
-(defvar html-site-ftp-temporary-passwords nil)
-(defun html-site-get-ftp-pw ()
- (let ((pw (html-site-current-ftp-password)))
- (unless (< 0 (length pw))
- (let* ((user-site (concat (html-site-current-ftp-user)
- "@"
- (html-site-current-ftp-host)))
- (site-pw (assoc user-site html-site-ftp-temporary-passwords)))
- (if site-pw
- (setq pw (cdr site-pw))
- (setq pw (read-string
- (concat "Ftp password for "
- (html-site-current-ftp-user)
- " at "
- (html-site-current-ftp-host)
- " : ")))
- (setq html-site-ftp-temporary-passwords
- (cons
- (cons user-site pw)
- html-site-ftp-temporary-passwords)))))
- pw))
-
-
-
-
-
-(defun html-site-path-in-mirror (site-root path-in-site mirror-root)
- (assert (html-site-dir-contains site-root path-in-site) t)
- (let ((rel-path (file-relative-name path-in-site site-root)))
- (if (string= rel-path ".")
- (directory-file-name mirror-root)
- (concat (file-name-as-directory mirror-root) rel-path))))
-
-;; Some checks to see if html-site-path-in-mirror works:
-(when nil
- (require 'cl)
- ;; Try to make a non-existent directory name to work around Emacs
- ;; bug (which was fixed today in CVS):
- (let ((local-file "/temp814354/in/hej.html")
- (local-dir "/temp814354"))
- (when (memq system-type '(ms-dos windows-nt))
- (setq local-file (concat "c:" local-file))
- (setq local-dir (concat "c:" local-dir )))
- (assert (string=
- "http://some.site/tempmirror/in/hej.html"
- (html-site-path-in-mirror local-dir
- local-file
- "http://some.site/tempmirror"))
- t)
- (assert (string=
- local-file
- (html-site-path-in-mirror "http://some.site/tempmirror"
- "http://some.site/tempmirror/in/hej.html"
- local-dir))
- t)
- (assert (string=
- "in/hej.html"
- (file-relative-name "http:/temp/in/hej.html" "http:/temp"))
- t)
- ))
-
-
-(defun html-site-local-to-web (site-name local-file with-toc)
- (html-site-ensure-file-in-site site-name local-file)
- (html-site-path-in-mirror (html-site-site-dir site-name)
- local-file
- (html-site-web-full site-name with-toc)))
-(defun html-site-current-local-to-web (local-file with-toc)
- (html-site-local-to-web html-site-current local-file with-toc))
-
-(defun html-site-remote-root (site-name with-toc)
- (concat "/ftp:"
- (html-site-ftp-user site-name)
- "@" (html-site-ftp-host site-name)
- ":"
- (if with-toc
- (html-site-ftp-wtoc-dir site-name)
- (html-site-ftp-dir site-name))))
-(defun html-site-current-remote-root (with-toc)
- (html-site-remote-root html-site-current with-toc))
-
-(defun html-site-local-to-remote (site-name local-file with-toc)
- (html-site-ensure-file-in-site site-name local-file)
- (html-site-path-in-mirror (html-site-site-dir site-name)
- local-file
- (html-site-remote-root site-name with-toc)))
-(defun html-site-current-local-to-remote (local-file with-toc)
- (html-site-local-to-remote html-site-current local-file with-toc))
-
-(defun html-site-remote-to-local (site-name remote-file with-toc)
- ;;(html-site-ensure-file-in-site remote-file)
- ;; Fix-me above
- (html-site-path-in-mirror (html-site-remote-root site-name with-toc)
- remote-file
- (html-site-site-dir site-name)))
-(defun html-site-current-remote-to-local (remote-file with-toc)
- (html-site-remote-to-local html-site-current remote-file with-toc))
-
-
-(defvar html-site-files-re "\.x?html?$")
-
-(defun html-site-edit-pages-file ()
- "Edit the list of pages to be used for table of contents."
- (interactive)
- (html-site-current-ensure-site-defined)
- (find-file (html-site-current-page-list))
- )
-
-(defun html-site-get-sub-files (dir file-patt)
- (let ((sub-files)
- (sub-dirs)
- (dir-files (directory-files dir t "^[^.]")))
- (dolist (f dir-files)
- (if (file-directory-p f)
- (add-to-list 'sub-dirs f)
- (when (string-match file-patt f)
- (add-to-list 'sub-files f))))
- (dolist (sub-dir sub-dirs)
- (setq sub-files (append sub-files (html-site-get-sub-files sub-dir file-patt)))
- )
- sub-files))
-
-(defun html-site-file-is-local (filename)
- "Return t if FILENAME is a local file name.
-No check is done that the file exists."
- ;;(find-file-name-handler "/ftp:c:/eclean/" 'file-exists-p)
- (null (find-file-name-handler filename 'file-exists-p)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Put subprocess here at the moment ...
-
-(defconst noshell-procbuf-name "*Noshell process buffer*")
-
-(defvar noshell-proc-name nil)
-(defun noshell-procbuf-setup (procbuf-name)
- (unless procbuf-name
- (setq procbuf-name noshell-procbuf-name))
- (with-current-buffer (get-buffer-create procbuf-name)
- (unless (get-buffer-window (current-buffer))
- (when (one-window-p) (split-window))
- (let ((cb (current-buffer)))
- (set-window-buffer (other-window 1) cb)))
- ;;(setq buffer-read-only t)
- (noshell-process-mode)
- (compilation-minor-mode 1)
-;; (let ((inhibit-read-only t)
-;; (output-buffer (current-buffer)))
-;; (goto-char (point-max))
-;; (setq noshell-proc-name name)
-;; (let ((s (concat
-;; "\n\n\n>>>>>>>>>>>>>>>>>> Starting "
-;; noshell-proc-name "\n")))
-;; (put-text-property 0 (length s)
-;; 'face (list 'bold '(:foreground "green"))
-;; s)
-;; (insert s)))
- (sit-for 0.01) ;; Display update
- (current-buffer)))
-
-(defun noshell-procbuf-teardown (proc)
- (with-current-buffer (process-buffer proc)
- (goto-char (point-max))
- (let ((inhibit-read-only t)
- (s (concat
- "<<<<<<<<<<<<<<<<<<< Finished OK: "
- noshell-proc-name "\n")))
- (put-text-property 0 (length s)
- 'face (list 'bold '(:foreground "green"))
- s)
- (insert s))))
-
-(defun noshell-procbuf-run (buffer prog &rest args)
- (with-current-buffer buffer
- (let ((inhibit-read-only t)
- (proc nil)
- )
- (unwind-protect
- (progn
- (setq proc (apply 'start-process "myproc" (current-buffer) prog args))
- )
- )
- (save-excursion
- (unless proc
- (let ((s "\n\n<<<<<<<<<<<<< There was a process starting error!"))
- (put-text-property 0 (length s)
- 'face (list 'bold '(:foreground "red"))
- s)
- (insert s))
- (error "Subprocess terminated with error status")))
- (set-process-sentinel proc 'noshell-sentinel)
- proc)
- )
- )
-(defun noshell-sentinel (process event)
- (with-current-buffer (process-buffer process)
- (let ((inhibit-read-only t))
- ;;(insert (format "Process: %s recieved %s\n" process event))
- (cond ((string-match "abnormally" event)
- (let ((s (concat "\n<<<<<< Error: "
- (substring event 0 -1)
- " <<<<<<<<<")))
- (put-text-property 0 (length s)
- 'face (list 'bold '(:foreground "red"))
- s)
- (insert s)))
- ((string-match "finished" event)
- (noshell-procbuf-teardown process))
- (t
- (insert event))))))
-
-(defun noshell-procbuf-syncrun (prog &rest args)
- (with-current-buffer (get-buffer noshell-procbuf-name)
- (let ((inhibit-read-only t)
- (sts nil))
- (unwind-protect
- (progn
- ;;(setq sts (apply 'call-process prog nil (current-buffer) t args))
- (setq sts (apply 'call-process prog nil (list (current-buffer) t) t args))
- )
- )
- (save-excursion
- (unless (= 0 sts)
- (let ((s (format "\n\n<<<<<<<<<<<<< There was a process error: %s" sts)))
- (put-text-property 0 (length s)
- 'face (list 'bold '(:foreground "red"))
- s)
- (insert s))
- (error "Subprocess terminated with error status")))
- )
- )
- )
-
-(defvar noshell-process-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c)(control ?k)] 'noshell-kill-subprocess)
- (define-key map [(control ?g)] 'noshell-quit)
- map))
-
-(define-derived-mode noshell-process-mode fundamental-mode "Subprocess"
- nil
- (setq buffer-read-only t)
- (buffer-disable-undo (current-buffer)))
-
-(defun noshell-quit ()
- (interactive)
- (noshell-kill-subprocess)
- (keyboard-quit))
-
-(defun noshell-kill-subprocess ()
- (interactive)
- (when (eq major-mode 'noshell-process-mode)
- (if (get-buffer-process (current-buffer))
- (interrupt-process (get-buffer-process (current-buffer)))
- (error "The subprocess is not running"))))
-
-
-
-;; Provide here to be able to load the files in any order
-(provide 'html-site)
-
-(eval-when-compile (require 'html-upl nil t))
-
-(defvar html-site-mode-menu-map
- (let ((map (make-sparse-keymap "html-site-mode-menu-map")))
-
- (when (featurep 'html-upl)
- (let ((upl-map (make-sparse-keymap)))
- (define-key map [html-site-upl-map]
- (list 'menu-item "File Transfer" upl-map))
- ;;(define-key upl-map [html-site-upl-edit-remote-wtoc]
- ;; (list 'menu-item "Edit Remote File With TOC" 'html-upl-edit-remote-file-with-toc))
- (define-key upl-map [html-site-upl-edit-remote]
- (list 'menu-item "Edit Remote File" 'html-upl-edit-remote-file))
- (define-key upl-map [html-site-upl-ediff-buffer]
- (list 'menu-item "Ediff Remote/Local Files" 'html-upl-ediff-file))
- (define-key upl-map [html-site-upl-sep] (list 'menu-item "--"))
- (define-key upl-map [html-site-upl-upload-site-with-toc]
- (list 'menu-item "Upload Site with TOC" 'html-upl-upload-site-with-toc))
- (define-key upl-map [html-site-upl-upload-site]
- (list 'menu-item "Upload Site" 'html-upl-upload-site))
- (define-key upl-map [html-site-upl-upload-file]
- (list 'menu-item "Upload Single File" 'html-upl-upload-file))
- ))
-
- (let ((site-map (make-sparse-keymap)))
- (define-key map [html-site-site-map]
- (list 'menu-item "Site" site-map))
- (define-key site-map [html-site-customize-site-list]
- (list 'menu-item "Edit Sites" (lambda () (interactive)
- (customize-option 'html-site-list))))
- (define-key site-map [html-site-set-site]
- (list 'menu-item "Set Current Site" 'html-site-set-site))
- )
-
- map))
-
-
-(defvar html-site-mode-map
- (let ((map (make-sparse-keymap )))
- (define-key map [menu-bar html-site-mode]
- (list 'menu-item "Web Site" html-site-mode-menu-map))
- map))
-
-(define-minor-mode html-site-mode
- "Adds a menu for easy access of setting site, uploading etc."
- :init-value nil
- :lighter nil
- :keymap html-site-mode-map
- :group 'html-site)
-
-(defvar html-site-mode-off-list
- '(nxhtml-mode))
-
-(define-global-minor-mode html-site-global-mode html-site-mode
- (lambda ()
- (html-site-mode 1)
- (when t ;buffer-file-name
- (unless (memq major-mode html-site-mode-off-list)
- (html-site-mode 1))))
- :group 'html-site)
-;; The problem with global minor modes:
-(when (and html-site-global-mode
- (not (boundp 'define-global-minor-mode-bug)))
- (html-site-global-mode 1))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-site.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-toc.el b/emacs.d/nxhtml/nxhtml/html-toc.el
deleted file mode 100644
index 866b43f..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc.el
+++ /dev/null
@@ -1,363 +0,0 @@
-;;; html-toc.el --- Building and updating TOC for a site
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Wed Feb 01 14:40:13 2006
-(defconst html-toc:version "0.4");; Version:
-;; Last-Updated: Tue Apr 10 04:09:29 2007 (7200 +0200)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Create table of contents for a static web site. See
-;; `html-toc-write-toc-file' and `html-toc-write-frames-file' for
-;; more info.
-;;
-;; To use this you can add (require 'html-toc) to your .emacs.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (add-to-list 'load-path default-directory load-path))
-(eval-when-compile (require 'fupd nil t))
-;;(require 'html-move)
-(eval-when-compile (require 'html-site nil t))
-;;(require 'dom)
-(require 'xml)
-
-(defconst html-toc-mark-begin "<!-- html-toc START -->")
-(defconst html-toc-mark-middle "<!-- html-toc MIDDLE -->")
-(defconst html-toc-mark-end "<!-- html-toc END -->")
-
-(defun html-toc-create-pages-file ()
- "Write a list of pages to be used for table of contents.
-Return the file name."
- (interactive)
- (html-site-current-ensure-site-defined)
- (let* (
- (site-dir (html-site-current-site-dir))
- (page-file (html-site-current-page-list))
- (page-file-dir (file-name-directory page-file))
- (page-file-exists (file-exists-p page-file))
- (sub-files (html-site-get-sub-files
- site-dir
- html-site-files-re))
- (pages-text)
- )
- (setq sub-files
- (sort (mapcar (lambda (full-file)
- (assert (file-exists-p full-file))
- (file-relative-name full-file page-file-dir))
- sub-files)
- 'string<))
- ;;(setq sub-files (delete html-toc-file-default-name sub-files))
- (with-temp-buffer
- (let ((this-level)
- (dir-title)
- (title)
- (full-file))
- (dolist (file sub-files)
- (setq full-file (expand-file-name file page-file-dir))
- (setq dir-title (file-name-nondirectory
- (substring (file-name-directory full-file) 0 -1)))
- (setq title (html-toc-get-title full-file))
- (setq this-level 0)
- (mapc (lambda (c) (when (eq c ?/) (setq this-level (1+ this-level)))) file)
- (insert (format "%s ### %s ### %s\n" this-level title file))))
- (setq pages-text (buffer-string)))
- (with-current-buffer (find-file page-file)
- (if (string= pages-text (buffer-string))
- (message "List of pages is already the default list")
- (if (= 0 (length (buffer-string)))
- (progn
- (insert pages-text)
- (save-buffer)
- )
- (if (y-or-n-p "Replace old list of pages? ")
- (progn
- (erase-buffer)
- (insert pages-text)
- (save-buffer)
- )
- (message "Keeping old list of pages.")))))
- page-file))
-(defun html-toc-dir ()
- (let* ((this-file (if load-file-name
- load-file-name
- buffer-file-name))
- (this-dir (file-name-directory this-file))
- )
- (expand-file-name "html-toc" this-dir)))
-
-;;;###autoload
-(defgroup html-toc nil
- "Customization group for html-toc."
- :group 'nxhtml)
-
-(defcustom html-toc-template-file
- (expand-file-name "html-toc-template.html" (html-toc-dir))
- "Template file for table of contents file."
- :type 'file
- :group 'html-toc)
-
-
-(defun html-toc-write-toc-file ()
- "Write a table of contents for a web site.
-Build the table of content from the information in
-`html-site-current-page-list'. Write it to the file
-`html-site-current-toc-file' and return that file name.
-
-When viewed in a browser the table of contents can be
-expanded/collapsed (if JavaScript is allowed)."
- (interactive)
- (html-site-current-ensure-site-defined)
- (let* ((toc-file (html-site-current-toc-file))
- (page-file (html-site-current-page-list))
- page-lines
- toc)
- (unless (< 0 (length toc-file))
- (error "There is no name for the table of content file in site \"%s\""
- html-site-current))
- (unless (< 0 (length page-file))
- (error "There is no name for the pages file in site \"%s\""
- html-site-current))
- (with-temp-buffer
- (insert-file-contents page-file)
- (goto-char (point-min))
- (while (not (eobp))
- (let* ((line (buffer-substring (point) (line-end-position)))
- (line-parts (split-string line "\\s-+###\\s-+")))
- (setq page-lines (cons line-parts page-lines)))
- (forward-line)))
- (setq page-lines (reverse page-lines))
- (with-temp-buffer
- (html-toc-insert-toc page-lines toc-file)
- (setq toc (buffer-substring-no-properties (point-min) (point-max))))
- (with-current-buffer (find-file-noselect toc-file)
- (erase-buffer)
- (insert-file-contents-literally html-toc-template-file)
- (let (toc-start)
- (while (search-forward "%%TOC%%" nil t)
- (unless toc-start
- (setq toc-start (match-beginning 0)))
- (replace-match toc t t))
- (forward-line) ;; for indentation
- (indent-region toc-start (point-marker)))
- (goto-char (point-min))
- (save-buffer))
- toc-file))
-
-
-(defun html-toc-insert-toc (page-lines toc-file)
- (let* ((curr-level)
- (min-level 100)
- div-levels
- (site-directory (html-site-current-site-dir))
- (toc-rel-file (file-relative-name toc-file site-directory)))
- (dolist (line page-lines)
- (let ((level (string-to-number (nth 0 line))))
- (when (< level min-level)
- (setq min-level level))))
- (setq curr-level min-level)
- (while page-lines
- (let* ((line (car page-lines))
- (file (nth 2 line))
- (title (nth 1 line))
- (this-level (string-to-number (nth 0 line)))
- (next-level (progn
- ;; Note:
- (setq page-lines (cdr page-lines))
- (let ((next-line (car page-lines)))
- (when next-line
- (string-to-number (nth 0 next-line))))))
- (full-file (expand-file-name file site-directory))
- (dir-title (file-name-nondirectory
- (substring (file-name-directory full-file) 0 -1))))
- ;;(insert "<!-- " (format "%s, %s, %s" curr-level this-level div-levels) " -->\n")
- ;; Don't insert a link to the toc file
- (unless (string= toc-rel-file file)
- ;; If there are childs then insert a <div> before them. Save
- ;; the level so we can close the div-tag later.
- (when (< curr-level this-level)
- ;; Save level so we can find the end of the <div>.
- (setq div-levels (cons this-level div-levels))
- (insert "<div class=\"html-toc-childs\">\n"))
- ;; Close div-tags if this level is lower when the previous.
- (when (> curr-level this-level)
- (while (and div-levels
- (> (car div-levels) this-level))
- (insert "</div>\n")
- (setq div-levels (cdr div-levels))))
- (setq curr-level this-level)
- (insert "<div class=\"html-toc-link\">"
- "<span style=\"display:table-cell; width:15em; background-color:yellow;\">"
- "<a style=\"padding-left:" (number-to-string (1+ (- curr-level min-level))) "em;\" "
- (format "href=\"%s\">%s</a>" file title)
- "</span>")
- (when (and next-level (> next-level this-level))
- (insert "<span onclick=\"html_toc_hs(this)\" class=\"html-toc-hs\""
- " style=\"display:table-cell; background-color:white;\">HS</span>"))
- (insert "</div>"
- "\n")
- )))
- (while div-levels
- (insert "</div>\n")
- (setq div-levels (cdr div-levels)))))
-
-(defun html-toc-get-title (file)
- (save-excursion
- (with-temp-buffer
- (insert-file-contents file nil 0 1000)
- (goto-char (point-min))
- (when (search-forward-regexp "<title>\\(.*\\)</title>" nil t)
- (match-string 1)))))
-
-(defun html-toc-parse-toc (toc-str)
- (let ((nodes))
- (with-temp-buffer
- (insert toc-str)
- (setq nodes (xml-parse-region (point-min) (point-max))))
- ))
-
-(defun html-toc-get-hrefs (nodes)
- (let ((atags (html-toc-get-atags nodes)))
- (mapcar (lambda (atag)
- (xml-get-attribute atag 'href))
- atags)))
-(defun html-toc-get-atags (nodes)
- (let ((atags))
- (dolist (node nodes)
- (when (listp node)
- (setq atags (append atags (xml-get-children node 'a)))
- (setq atags (append atags (html-toc-get-atags (xml-node-children node))))))
- atags))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Frames and viewing
-(defcustom html-toc-frames-default-name "html-toc-frames.html"
- "Default file name sans directory for frames file."
- :type 'string
- :group 'html-toc)
-
-(defvar html-toc-frames-contents
- "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title>Frames for html-toc</title>
- </head>
- <frameset cols=\"20%, 80%\">
- <frame name=\"html-toc-TOC\" src=\"%%TOCFILE%%\"/>
- <frame name=\"html-toc-Document\" />
- <noframes>
- <body>
- Html frame support required
- </body>
- </noframes>
- </frameset>
-</html>
-")
-
-(defun html-toc-browse-frames-file ()
- "View frames file written by `html-toc-write-frames-file'."
- (interactive)
- (html-site-current-ensure-site-defined)
- (let ((frames-file (html-site-current-frames-file)))
- (unless (< 0 (length frames-file))
- (error "There is no frames file set for site \"%s\"" html-site-current))
- ;;(message "frames-file=%s" frames-file)(sit-for 4)
- (unless (file-exists-p frames-file)
- (html-toc-write-frames-file))
- (browse-url-of-file frames-file)))
-
-;; (defun html-toc-frames-file-name ()
-;; "Return name of file written by `html-toc-write-frames-file'."
-;; (html-toc-get-site)
-;; (expand-file-name html-toc-frames-default-name html-move-site-directory))
-
-(defun html-toc-write-frames-file ()
- "Write a frames file.
-This frames file should load the table of contents build by
-`html-toc-write-toc-file' in one frame and shows the documents in
-another.
-
-The contents of the frames file is defined by
-`html-toc-frames-contents'.
-
-Returns the file name of the written or existing frames file.
-
-You may also want to look at `html-wtoc-write-pages-with-toc'."
- (interactive)
- ;;(html-toc-get-site)
- (html-site-current-ensure-site-defined)
- (let* ((frames-file (html-site-current-frames-file))
- (frames-cont html-toc-frames-contents)
- (toc-file (html-toc-write-toc-file))
- toc-file-relative)
- (when toc-file
- (setq toc-file-relative (file-relative-name
- toc-file
- (file-name-directory frames-file)))
- (save-match-data
- (unless (string-match "%%TOCFILE%%" frames-cont)
- (error "Can't find %%TOCFILE%% in html-toc-frames-contents"))
- (setq frames-cont (replace-match toc-file-relative t t frames-cont)))
- (with-current-buffer (find-file-noselect frames-file)
- (erase-buffer)
- (insert frames-cont)
- (save-buffer))
- frames-file)))
-
-;;;###autoload
-(defconst html-toc-menu-map
- (let ((map (make-sparse-keymap)))
- (define-key map [html-toc-browse-frames-file]
- (list 'menu-item "Browse Frames File" 'html-toc-browse-frames-file))
- (define-key map [html-toc-write-frames-file]
- (list 'menu-item "Write Frames File" 'html-toc-write-frames-file))
- (define-key map [html-toc-write-toc-file]
- (list 'menu-item "Write TOC File for Frames" 'html-toc-write-toc-file))
- (define-key map [html-toc-sep1] (list 'menu-item "--"))
- (define-key map [html-toc-edit-pages-file]
- (list 'menu-item "Edit List of Pages for TOC" 'html-site-edit-pages-file))
- (define-key map [html-toc-create-pages-file]
- (list 'menu-item "Write List of Pages for TOC" 'html-toc-create-pages-file))
- map))
-
-
-
-(provide 'html-toc)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-toc.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc-template.html b/emacs.d/nxhtml/nxhtml/html-toc/html-toc-template.html
deleted file mode 100644
index 5db41da..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc-template.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>HEAD</title>
- <link rel="stylesheet" href="html-toc/html-toc.css" type="text/css" />
- <link rel="stylesheet" href="html-toc/html-toc-template.css" type="text/css" />
- <script type="text/javascript" src="html-toc/html-toc.js"></script>
- <script type="text/javascript" src="html-toc/html-toc-template.js"></script>
- <script type="text/javascript">
- var my_old_onload = window.onload;
- function my_onload() {
- HTML_WTOC_NS.onload_actions(%%PNUM%%);
- if (undefined != my_old_onload) { my_old_onload(); }
- }
- window.onload = my_onload;
- </script>
- </head>
- <body>
-
-
- <table summary="Page columns" cellspacing="0" border="0" cellpadding="0" xwidth="100%" >
- <tr valign="top">
- <td id="html-wtoc-id-toccol" class="html-wtoc-contcol">
- <table summary="Contents column" id="html-wtoc-id-toc" class="html-wtoc-contcol"
- cellspacing="0" border="1" cellpadding="0" width="100%">
- <tr valign="top">
- <td colspan="2" height="50" >
- <table summary="Logo" id="html-wtoc-id-logo">
- <tr>
- <td align="right" valign="bottom" >
- <a href="http://www.OurComments.org/Emacs/EmacsW32.html"
- ><img src="img/gnu-m-x-160.png" width="80" height="80"
- alt="Go to EmacsW32 Home Page"
- title="Go to EmacsW32 Home Page"
- onmouseover="transLbi(this, false);"
- onmouseout ="transLbi(this, true);"
- style="
- margin-top:10px;
- padding-left:20px;
- padding-right:20px;
- padding-top:10px;
- padding-bottom:10px;
- "
- border="0"
- /></a>
- </td>
- </tr>
- </table>
- </td>
- </tr><tr valign="top">
- <td >
- <table border="1">
- <tr>
- <td>%%TOC%%</td>
- </tr>
- <tr>
- <td id="nxhtml-link">
- <br />
- Built using Emacs
- <br />
- with nxhtml from
- <br />
- <a href="http://ourcomments.org/Emacs/Emacs.html"
- target="_blank">ourcomments.org</a>
- </td>
- </tr>
- </table>
- </td>
- </tr><tr>
- <td colspan="2" style="background-color:red;">
- &nbsp;
- </td>
- </tr>
- </table>
- <table summary="Ensure table width"
- cellspacing="0" id="html-wtoc-id-tocwidth"><tr><td></td></tr></table>
- </td>
-
- </tr>
- </table>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css
deleted file mode 100644
index a6ffabb..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Main structures >>>>>>>>>>>>>>> */
-.html-wtoc-maintop {
- font-size: 1px;
- font-size: 1em;
- margin-top: 0em;
- margin-bottom: 0em;
-/* background-color:green; */
-}
-.html-wtoc-main {
-}
-
-td.html-wtoc-vdivline {
- //background-color: #8be;
- width: 0px;
-}
-
-.html-wtoc-search-form {
- margin-bottom: 0.1em;
-}
-.html-wtoc-search {
- font-size: 0.8em;
- color: green;
-}
-.html-wtoc-search a {
- color: green;
-}
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-
-
-/* Table of content >>>>>>>>>>>>>> */
-
-#html-wtoc-id-hidetoc {
- height: 20px;
- border-bottom: 2px inset #ddf;
- border-color: #dff;
-}
-
-#html-wtoc-id-tocdiv {
- width: 2.5em;
- //background-color: #eff;
-}
-#html-wtoc-id-logo {
- width: 100%;
- height: 120px;
- padding: 0em;
- margin: 0em;
- border: 0em;
-}
-#html-wtoc-id-toc {
-}
-#html-wtoc-id-tocwidth {
- width: 18em;
- height: 0em;
- padding: 0em;
- margin: 0em;
- border: 0em;
- line-height: 0em;
-/* background-color: red; */
-}
-#html-wtoc-id-toccol {
- width: 18em;
-}
-
-.html-wtoc-contcol {
- background-color: #dFEfff;
- background-color: #dFEfff;
- background-color: #cd950c;
- background-color: #eead0e;
-}
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-
-
-/* Buttons etc >>>>>>>>>>>>>>> */
-.html-wtoc-button {
- font-size: 0.75em;
- font-size: 8pt;
- color: #5A5D00;
- background-color: #9cf;
- background-color: #bcee68;
- background-color: #a2cd5a;
- padding: 0.2em;
- Border-Width: 2px;
- Border-Style: outset;
- text-align: center;
- border-color: #ddf;
-}
-a.html-wtoc-button {
- text-decoration: none;
- color: #5A5D00;
-}
-a.html-wtoc-button:hover {
- text-decoration:none;
- background-color: #6af;
- color:#340;
-}
-
-a.html-wtoc-buttonimg img {
- width: 16px;
- height: 16px;
- padding: 4px;
- border: 8px;
-}
-a.html-wtoc-buttonimg {
- border:2px;
- margin:2px;
- margin-left:2px;
- margin-right:2px;
-}
-a.html-wtoc-buttonimg {
- font-size:1px;
-}
-a.html-wtoc-buttonimg:hover {
- margin: 6px;
- margin-left:0px;
- margin-right:0px;
- border-color: #ddf;
- border-width: 2px;
- border-style: outset;
- background-color: #595C00;
- background-color: #bef;
- background-color: #b9ffb9;
-}
-
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-#nxhtml-link {
- font-size: 0.7em;
- text-align: center;
- padding-top: 2em;
- padding: 1em;
-}
-
-.copyright {
- color : #872;
-}
-
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css
deleted file mode 100644
index a12cb65..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css
+++ /dev/null
@@ -1,84 +0,0 @@
-body {
- margin: 0;
-}
-td {
- font-size: 1em;
-}
-
-/* Added by html-wtoc.pl >>>>>>>>>>>>> */
-.html-wtoc-mark {
-/* background-color: #9cf; */
-/* background-color: #bcee68; */
-/* background-color: #a2cd5a; */
- width: 20px;
- padding: 0;
- border: 0;
- text-align: center;
-}
-.html-wtoc-contline {
- width: 100%;
-}
-
-.html-wtoc-margin {
- width: 0.6em;
-}
-.html-wtoc-contents {
- font-size: 0.9em;
- padding: 1em;
- background-color: #9cf;
- background-color: #a2cd5a;
- background-color: #efffcf;
- background-color: #ffffdf;
- -moz-border-radius-topleft: 2em;
-}
-.html-wtoc-contents td {
-/* background-color: #9cf; */
-/* background-color: #bcee68; */
-/* background-color: #a2cd5a; */
-}
-.html-wtoc-contents-a {
- text-decoration: none;
- color: #595C00;
-/* background-color: #9cf; */
-/* background-color: #bcee68; */
-/* background-color: #a2cd5a; */
- border: 1px #9cf solid;
- border: 1px #a2cd5a solid;
- border: 1px #ffffc0 solid;
- padding-left: 0.25em;
- padding-right: 0;
- margin: 1px;
- display: block;
-}
-.html-wtoc-contents a:hover {
- text-decoration: none;
- background-color: #b9ffb9;
- border: 1px #6b8e23 solid;
-}
-.html-wtoc-currcont {
- background-color: #738600;
- color: #ffff2f;
- background-color: #535600;
- border: 1px #6b8e23 inset;
- padding-left: 0.25em;
- padding-right: 0;
- margin: 1px;
- display: block;
-}
-a.html-wtoc-currcont {
- text-decoration: none;
-}
-a.html-wtoc-currcont:hover {
- background-color: #738600;
- background-color: #536600;
- background-color: #434620;
-}
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-
-
-
-
-
-
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js
deleted file mode 100644
index 7f22db7..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js
+++ /dev/null
@@ -1,361 +0,0 @@
-
-// © Copyright 2006 Lennart Borgman, http://www.OurComments.org/. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 3, or (at
-// your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; see the file COPYING. If not, write to
-// the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-// Floor, Boston, MA 02110-1301, USA.
-
-
-var HTML_WTOC_NS_sCurrTocId;
-
-
-HTML_WTOC_NS = {
-
- /////////////////////////////
- //// Basic event functions
- /////////////////////////////
-
- getEventObject : function (ev) {
- var o;
- if (window.event)
- o = window.event.srcElement;
- else if (null != ev)
- o = ( ev.target );
- return o;
- },
- getEvent : function (ev) {
- if (window.event) {
- return window.event;
- } else if (null != ev) {
- return ev;
- }
- },
-
- eventStopPropagation : function (e) {
- if (e.stopPropagation)
- e.stopPropagation();
- else
- e.cancelBubble=true;
- },
-
- eventPreventDefault : function (e) {
- if (e.preventDefault)
- e.preventDefault();
- else
- e.returnValue=false;
- },
-
- /////////////////////////////
- //// TOC hide
- /////////////////////////////
-
- show_content : function (on) {
- var toc = document.getElementById("html-wtoc-id-toccol").style;
- var tdv = document.getElementById("html-wtoc-id-tocdiv").style;
- var shw = document.getElementById("html-wtoc-id-showtoc").style;
- var hid = document.getElementById("html-wtoc-id-hidetoc").style;
- if (on) {
- toc.display = "";
- tdv.display = "";
- shw.display = "none";
- hid.display = "";
- HTML_WTOC_NS.focus_page_link(0);
- } else {
- toc.display = "none";
- tdv.display = "none";
- shw.display = "";
- hid.display = "none";
- }
- },
-
-
-
-
-
- /////////////////////////////
- //// Open-Close
- /////////////////////////////
- onblur_action : function(ev) {
- HTML_WTOC_NS_sCurrTocId = null;
- },
- onfocus_action : function(ev) {
- var o = HTML_WTOC_NS.getEventObject(ev);
- if (!o) return;
-
- HTML_WTOC_NS_sCurrTocId = o.id;
- },
- onclick_action : function(ev) {
- var o = HTML_WTOC_NS.getEventObject(ev);
- var e = HTML_WTOC_NS.getEvent(ev);
- if (13 == e.keyCode) return true;
- if (!o) return true;
- if ("IMG" == o.tagName) o = o.parentNode;
- var iId = HTML_WTOC_NS.getIdnumFromId(o.id);
- var sChildId = "toc_child_"+iId;
- var sOldCurrTocId = HTML_WTOC_NS_sCurrTocId;
- HTML_WTOC_NS.toggle_open(sChildId, o);
- HTML_WTOC_NS_sCurrTocId = sOldCurrTocId;
- return false;
- },
-
- toggle_open : function (id, parent) {
- var child = document.getElementById(id).style;
- var sInner = parent.innerHTML;
- var re = new RegExp("[^/]*\.gif", "i");
- if ("none" == child.display) {
- child.display = "";
- parent.innerHTML = sInner.replace(re, "down.gif")+"";
- } else {
- child.display = "none";
- parent.innerHTML = sInner.replace(re, "right.gif")+"";
- }
- },
-
-
-
- /////////////////////////////
- //// Load
- /////////////////////////////
-
- onload_actions : function (iPageNum) {
- document.body.onkeydown = HTML_WTOC_NS.onkeydown_action;
- document.body.onmouseover = HTML_WTOC_NS.onmouseover_action;
- var aATags = document.getElementsByTagName("a");
- for(var i = 0; i < aATags.length; i++) {
- var o = aATags[i];
- if (null != HTML_WTOC_NS.getIdnumFromId(o.id)) {
- o.onfocus = HTML_WTOC_NS.onfocus_action;
- o.onblur = HTML_WTOC_NS.onblur_action;
- if (o.id.substr(0, 12) == "opener_text_") {
- o.onclick = HTML_WTOC_NS.onclick_action;
- o.title = "Open/Close";
- } else if (o.id.substr(0, 7) == "opener_") {
- o.onclick = HTML_WTOC_NS.onclick_action;
- o.className = "html-wtoc-mark";
- o.title = "Open/Close";
- }
- }
- }
- HTML_WTOC_NS.focus_page_link(iPageNum);
- },
- focus_page_link : function (iPageNum) {
- // Element might be hidden
- try {
- document.getElementById("toc_link_"+iPageNum).focus();
- } catch (exc) {
- }
- },
-
-
-
-
-
-
-
- /////////////////////
- //// Mouse
- /////////////////////
-
- onmouseover_action : function (ev) {
- if (null == HTML_WTOC_NS_sCurrTocId) return true;
- var o = HTML_WTOC_NS.getEventObject(ev);
- var iId = HTML_WTOC_NS.getIdnumFromId(o.id);
- if (null == iId) return true;
- o.focus();
- },
-
-
-
- /////////////////////
- //// Key
- /////////////////////
-
- onkeydown_action: function (ev) {
- var keyDown = 40;
- var keyUp = 38;
- var keyLeft = 37;
- var keyRight = 39;
- var keyReturn = 13;
- var keyF2 = 113;
- var keyInsert = 45;
- // Opera
- var keyOperaDown = 57386;
- var keyOperaUp = 57385;
- var keyOperaLeft = 57387;
- var keyOperaRight = 57388;
- var keyOperaF2 = 57346;
- var keyOperaInsert = 57394;
-
- var SwitchKey = keyInsert;
- var SwitchKeyOpera = keyOperaInsert;
-
- var bUp;
- var e = HTML_WTOC_NS.getEvent(ev);
- if (null == HTML_WTOC_NS_sCurrTocId) {
- switch (e.keyCode) {
- case SwitchKey:
- case SwitchKeyOpera:
- HTML_WTOC_NS.focus_page_link(0);
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- }
- return true;
- }
- switch (e.keyCode) {
- case keyLeft:
- case keyOperaLeft:
- case keyRight:
- case keyOperaRight:
- HTML_WTOC_NS.handle_leftright_keys(e);
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- case keyDown:
- case keyOperaDown:
- bUp = false;
- break;
- case keyUp:
- case keyOperaUp:
- bUp = true;
- break;
- case SwitchKey:
- case SwitchKeyOpera:
- if (null != HTML_WTOC_NS_sCurrTocId) {
- var o = document.getElementById(HTML_WTOC_NS_sCurrTocId);
- if (o) o.blur();
- HTML_WTOC_NS_sCurrTocId = null;
- }
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- default:
- //alert(e.keyCode);
- return true;
- }
- var oOpener;
- oOpener = HTML_WTOC_NS.getNextVisOpener(HTML_WTOC_NS_sCurrTocId, bUp);
- oOpener.focus();
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- },
-
- handle_leftright_keys: function (e) {
- var keyLeft = 37;
- var keyRight = 39;
- var keyOperaLeft = 57387;
- var keyOperaRight = 57388;
- var iId = HTML_WTOC_NS.getIdnumFromId(HTML_WTOC_NS_sCurrTocId);
- if (null == iId) return;
- var sId = "opener_" + iId;
- var oOpener = document.getElementById(sId);
- var sId = HTML_WTOC_NS_sCurrTocId; // It will be cleared before getNextVis
-
- var bOpenAction;
- var bOpened;
- var bUp;
- var oChild = document.getElementById("toc_child_"+iId);
- if (null == oChild) {
- } else {
- bOpened = (oChild.style.display != "none");
- }
- switch (e.keyCode) {
- case keyLeft:
- case keyOperaLeft:
- bUp = true;
- bOpenAction = (null != bOpened) && (bOpened);
- break;
- case keyRight:
- case keyOperaRight:
- bUp = false;
- bOpenAction = (null != bOpened) && (!bOpened);
- break;
- default:
- alert("bad key handling...");
- }
- if (bOpenAction) {
- oOpener.click();
- HTML_WTOC_NS_sCurrTocId = sId;
- } else {
- var oPrev = HTML_WTOC_NS.getNextVisOpener(sId, bUp);
- oPrev.focus();
- }
- },
-
-
-
-
-
-
- //////////////////////
- //// Util
- //////////////////////
- getNameFromId: function (sId) {
- var re = new RegExp("(.*?_)(\\d+)", "i");
- if (!re.test(sId)) return null;
- var iId = sId.replace(re, "$1");
- return iId;
- },
- getIdnumFromId: function (sId) {
- var re = new RegExp("(.*?_)(\\d+)", "i");
- if (!re.test(sId)) return null;
- var iId = sId.replace(re, "$2");
- return iId;
- },
-
-
- getNextVisOpener: function (sId, bUp, bTrace) {
- if (bTrace) alert("getNextVisOpener("+sId+","+bUp+")");
- var iId = HTML_WTOC_NS.getIdnumFromId(sId);
- if (null == iId) {
- alert("getNextVisOpener err iId==null");
- return;
- }
- var sIdName = HTML_WTOC_NS.getNameFromId(sId);
- if (null == sIdName) {
- alert("getNextVisOpener err sIdName==null");
- return;
- }
- var oOpener;
- var iLoop = -2;
- while (oOpener == null) {
- if (bTrace) alert(iId);
- if (iLoop++ > iMaxChildNum) { alert("Child num error"); return; }
- if (!bUp) {
- iId++;
- } else {
- iId--;
- }
- if (iId > iMaxChildNum) { iId = 0; }
- if (iId < 0) { iId = iMaxChildNum; }
- var s = sIdName+iId;
- oOpener = document.getElementById(s);
- if (oOpener != null) {
- if (bTrace) alert(oOpener.offsetLeft);
- if (oOpener.style.display == "none") { // All
- oOpener = null;
- } else if (oOpener.offsetLeft < 0) { // IE
- oOpener = null;
- } else if (0 == oOpener.scrollWidth) { // Opera
- oOpener = null;
- }
- }
- }
- return oOpener;
- }
-
-
-
-}; //HTML_WTOC_NS
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gif
deleted file mode 100644
index 0869f9f..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gif
deleted file mode 100644
index 30d6ecf..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gif
deleted file mode 100644
index 1c94b60..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.png b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.png
deleted file mode 100644
index 5254ef1..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcf b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcf
deleted file mode 100644
index f2ce5ce..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gif
deleted file mode 100644
index 9908895..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gif
deleted file mode 100644
index 4c1bca4..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gif
deleted file mode 100644
index e824f5b..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gif
deleted file mode 100644
index 2400cf1..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gif
deleted file mode 100644
index 9f58dfd..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gif
deleted file mode 100644
index 7bd2e7d..0000000
--- a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-upl.el b/emacs.d/nxhtml/nxhtml/html-upl.el
deleted file mode 100644
index 1ce2e98..0000000
--- a/emacs.d/nxhtml/nxhtml/html-upl.el
+++ /dev/null
@@ -1,329 +0,0 @@
-;;; html-upl.el --- Uploading of web sites
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Mon Mar 06 19:09:19 2006
-(defconst html-upl:version "0.3") ;; Version:
-;; Last-Updated: 2008-03-22T01:23:01+0100 Sat
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `cl', `html-site', `html-upl', `mail-prsvr', `mm-util', `timer',
-;; `url-c', `url-parse', `url-vars'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-(eval-when-compile (add-to-list 'load-path default-directory load-path))
-(eval-when-compile (require 'html-site nil t))
-
-;;;###autoload
-(defgroup html-upl nil
- "Customization group for html-upl."
- :group 'nxhtml)
-
-(defcustom html-upl-dir
- (file-name-as-directory
- (expand-file-name
- "html-upl"
- (file-name-directory
- (if load-file-name load-file-name buffer-file-name))))
-
- "Directory where the tools needed are located.
-The tools for html-upl includes:
-
-- ftpsync.pl
-"
- :type 'directory
- :group 'html-upl)
-
-(defun html-upl-browse-remote ()
- (interactive)
- (let ((url (html-site-local-to-web html-site-current
- ;;buffer-file-name
- (html-site-buffer-or-dired-file-name)
- nil)))
- (browse-url url)))
-(defun html-upl-browse-remote-with-toc ()
- (interactive)
- (let ((url (html-site-local-to-web html-site-current
- ;;buffer-file-name
- (html-site-buffer-or-dired-file-name)
- t)))
- (browse-url url)))
-(defun html-upl-browse-remote-frames ()
- (interactive)
- (let ((url (html-site-local-to-web (html-site-current-frames-file)
- ;;buffer-file-name
- (html-site-buffer-or-dired-file-name)
- nil)))
- (browse-url url)))
-
-;;;###autoload
-(defun html-upl-upload-site-with-toc ()
- (interactive)
- (html-upl-upload-site1 t))
-
-;;;###autoload
-(defun html-upl-upload-site ()
- (interactive)
- (html-upl-upload-site1 nil))
-(defun html-upl-upload-site1(with-toc)
- (html-site-current-ensure-site-defined)
- (html-upl-ensure-site-has-host)
- (let ((local-dir (if with-toc
- (html-site-current-merge-dir)
- (html-site-current-site-dir)))
- (ftp-host (html-site-current-ftp-host))
- (ftp-user (html-site-current-ftp-user))
- (ftp-pw (html-site-current-ftp-password))
- (ftp-dir (if with-toc
- (html-site-current-ftp-wtoc-dir)
- (html-site-current-ftp-dir)))
- (ftpsync-pl (expand-file-name "ftpsync.pl" html-upl-dir))
- )
- (unless (< 0 (length ftp-host))
- (error "Ftp host not defined"))
- (unless (< 0 (length ftp-user))
- (error "Ftp user not defined"))
- (unless (< 0 (length ftp-dir))
- (if with-toc
- (error "Ftp remote directory for pages with TOC not defined")
- (error "Ftp remote directory not defined")))
- (unless (< 0 (length ftp-pw))
- (setq ftp-pw (html-site-get-ftp-pw)))
- (let* (
- (buffer (noshell-procbuf-setup "subprocess for upload"))
- (remote-url (concat "ftp://" ftp-user ":" ftp-pw "@" ftp-host ftp-dir))
- (opt (list
- "-v"
- "-p"
- local-dir
- remote-url)))
- (apply 'noshell-procbuf-run
- buffer
- "perl" "-w"
- ftpsync-pl
- opt
- ))))
-
-(defun html-upl-ensure-site-has-host ()
- (let ((host (html-site-current-ftp-host)))
- (unless (and host (< 0 (length host)))
- (error "Site %s has no ftp host defined" html-site-current))))
-
-;;;###autoload
-(defun html-upl-remote-dired (dirname)
- "Start dired for remote directory or its parent/ancestor."
- (interactive (list
- (read-directory-name "Local directory: " nil nil t)))
- (html-site-current-ensure-file-in-site dirname)
- (html-upl-ensure-site-has-host)
- (let* ((local-dir dirname)
- (remote-dir (html-site-current-local-to-remote local-dir nil))
- to-parent
- res
- msg)
- (while (not res)
- (condition-case err
- (progn
- (dired remote-dir)
- (setq res t))
- (error ;;(lwarn 't :warning "err=%s" err)
- (setq msg (error-message-string err))))
- ;; It does not look like we always get an error. Check where we are:
- (when res
- (unless (string= default-directory remote-dir)
- (setq res nil)
- (setq msg "")))
- (unless res
- ;; 450 Requested file action not taken File unavailable (e.g. file busy).
- ;; 550 Requested action not taken File unavailable (e.g. file not found, no access).
- (if (or (string= msg "")
- (save-match-data (string-match " \\(?:550\\|450\\) " msg)))
- (progn
- (if (not to-parent)
- (setq to-parent (concat
- (file-name-nondirectory remote-dir)
- "/.."))
- (setq to-parent (concat
- (file-name-nondirectory remote-dir)
- "/"
- to-parent "/..")))
- ;;(setq local-dir (directory-file-name (file-name-directory (directory-file-name local-dir))))
- ;;(html-site-current-ensure-file-in-site local-dir)
- ;;(setq remote-dir (html-site-current-local-to-remote local-dir nil))
- (setq remote-dir (directory-file-name (file-name-directory remote-dir)))
- )
- (setq res msg))))
- (if (stringp res)
- (error "%s" msg)
- (when to-parent
- (message "Remote dir not found, showing ancestor %s" to-parent)))))
-
-;;;###autoload
-(defun html-upl-upload-file (filename)
- "Upload a single file in a site.
-For the definition of a site see `html-site-current'."
- (interactive (list
- (let ((use-dialog-box nil)
- (f (file-relative-name
- ;;(if (derived-mode-p 'dired-mode) (dired-get-file-for-visit) buffer-file-name)
- (html-site-buffer-or-dired-file-name)
- )))
- (read-file-name "File: " nil nil t f))
- ))
- (html-site-current-ensure-file-in-site filename)
- (html-upl-ensure-site-has-host)
- (let* ((buffer (get-file-buffer filename))
- (remote-file (html-site-current-local-to-remote filename nil))
- (remote-buffer (get-file-buffer remote-file))
- (local-file filename))
- (when (or (not buffer-file-name)
- (not (buffer-modified-p buffer))
- (and
- (y-or-n-p (format "Buffer %s is modified. Save buffer and copy? "
- (buffer-name buffer)))
- (with-current-buffer buffer
- (save-buffer)
- (not (buffer-modified-p)))))
- (when (= ?~ (string-to-char local-file))
- (setq local-file (expand-file-name local-file)))
- (when (and (fboundp 'w32-short-file-name)
- (string-match " " local-file))
- (setq local-file (w32-short-file-name local-file)))
- (copy-file local-file
- ;;(html-site-current-local-to-remote filename nil)
- remote-file
- 0)
- (when remote-buffer
- (with-current-buffer remote-buffer
- (revert-buffer nil t t)))
- (message "Upload ready")
- )))
-
-;;;###autoload
-(defun html-upl-edit-remote-file ()
- (interactive)
- (html-upl-edit-remote-file1 nil))
-
-;;;###autoload
-(defun html-upl-edit-remote-file-with-toc ()
- (interactive)
- (html-upl-edit-remote-file1 t))
-
-(defun html-upl-edit-remote-file1(with-toc)
- (html-site-current-ensure-buffer-in-site)
- (html-upl-ensure-site-has-host)
- (let* ((remote-root (concat "/ftp:"
- (html-site-current-ftp-user)
- "@" (html-site-current-ftp-host)
- ":"
- (if with-toc
- (html-site-current-ftp-wtoc-dir)
- (html-site-current-ftp-dir))))
-;; (remote-file (html-site-path-in-mirror (html-site-current-site-dir)
-;; buffer-file-name
-;; remote-root))
- (remote-file (html-site-current-local-to-remote buffer-file-name nil))
- )
- (find-file remote-file)))
-
-;;;###autoload
-(defun html-upl-ediff-file (filename)
- "Run ediff on local and remote file.
-FILENAME could be either the remote or the local file."
- ;;(interactive "fFile (local or remote): ")
- (interactive (list
- (or (html-site-buffer-or-dired-file-name)
- (read-file-name "File: "))))
- (html-upl-ensure-site-has-host)
- (let* ((is-local (html-site-file-is-local filename))
- remote-name
- local-name)
- (if is-local
- (progn
- (html-site-current-ensure-file-in-site filename)
- (setq remote-name (html-site-current-local-to-remote filename nil))
- (setq local-name filename))
- (setq local-name (html-site-current-remote-to-local filename nil))
- (html-site-current-ensure-file-in-site local-name)
- (setq remote-name filename))
- (let ((local-buf (find-file local-name))
- (remote-buf (find-file remote-name)))
- (ediff-buffers local-buf remote-buf))))
-
-;;(defun html-site-buffer-or-dired-file-name ()
-;; (defun html-upl-ediff-buffer ()
-;; "Run ediff on local and remote buffer file.
-;; The current buffer must contain either the local or the remote file."
-;; (interactive)
-;; (html-upl-ediff-file (buffer-file-name)))
-
-(provide 'html-upl)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-upl.el ends here
-
-;; (defun html-site-local-to-remote-path (local-file protocol with-toc)
-;; (let ((remote-dir (if (eq protocol 'ftp)
-;; (if with-toc
-;; (html-site-current-ftp-wtoc-dir)
-;; (html-site-current-ftp-dir))
-;; (if with-toc
-;; (html-site-current-web-wtoc-dir)
-;; (html-site-current-web-dir)))))
-;; (html-site-path-in-mirror
-;; (html-site-current-site-dir) local-file remote-dir)))
-
-;; (defun html-site-local-to-web (local-file with-toc)
-;; (let ((web-file (html-site-local-to-remote-path local-file 'http with-toc))
-;; (web-host (html-site-current-web-host)))
-;; (save-match-data
-;; (unless (string-match "^https?://" web-host)
-;; (setq web-host (concat "http://" web-host))))
-;; (when (string= "/" (substring web-host -1))
-;; (setq web-host (substring web-host 0 -1)))
-;; (concat web-host web-file)
-;; ))
-;;
-;;; Use tramp-tramp-file-p instead:
-;; (defun html-upl-file-name-is-local (file-name)
-;; "Return nil unless FILE-NAME is a Tramp file name."
-;; (save-match-data
-;; (not (string-match "^/[a-z]+:" file-name))))
-
-;; (defun html-upl-remote-to-local (remote-file)
-;; (let ((remote-site-dir (html-site-current-web-dir)))
-;; (unless (html-site-dir-contains remote-site-dir remote-file)
-;; (error "")))
-;; )
-
diff --git a/emacs.d/nxhtml/nxhtml/html-upl/COPYING b/emacs.d/nxhtml/nxhtml/html-upl/COPYING
deleted file mode 100644
index 5b6e7c6..0000000
--- a/emacs.d/nxhtml/nxhtml/html-upl/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/emacs.d/nxhtml/nxhtml/html-upl/Changes b/emacs.d/nxhtml/nxhtml/html-upl/Changes
deleted file mode 100644
index 0bfd93c..0000000
--- a/emacs.d/nxhtml/nxhtml/html-upl/Changes
+++ /dev/null
@@ -1,115 +0,0 @@
-
-1.26 => 1.27 (2004-08-23)
-=========================
-
- * Proposed and partially provided by Samuel Marshall <sam@leafdigital.com>
- * enhanced timezone handling, should be perfect now
- * new option -c, like -i but then asks interactively to let do it
- * if FTP user/password are set to ?, they are asked for interactively
-
-
-1.25 => 1.26 (2004-03-31)
-=========================
-
- * fixed "dangerous" algorithm of synchronization direction
-
-
-1.24 => 1.25 (2004-03-20)
-=========================
-
- * fixed some 1.24 bugs
- * clock offset computation now more resistant against very slow connections
- * clock offset computation disabled for GET mode, so mirroring of foreign
- stuff is now possible again
- * default localdir of . disabled, therefore
- * using . as localdir parameter does not cause a parsing error any more
- * replaced damn indentation tabs in sourcecode by appropriate number of
- spaces, so code is readable independent of tab settings
- * enabled handling of ftpdir /
- * handling of relative ftpdir corrected
-
-
-1.23 => 1.24 (2003-10-11)
-=========================
-
- By Michiel Steltman <Msteltman@disway.nl>
-
- * handle files with blanks etc in names
- * clock offset remote-local to reduce unnecessary transfers
- * error handling
-
-
-1.22 => 1.23 (2003-09-28)
-=========================
-
- * New parameter timeout
-
-
-1.21 => 1.22 (2003-03-24)
-=========================
-
- * Now cuts of / at directory spec's end, to avoid pwd() being different
- from target of cwd() (which lead to unneccesarry abortions)
-
-
-1.20 => 1.21 (2003-03-24)
-=========================
-
- * version information in sourcefile and output of -h command
-
-
-1.11 => 1.20 (2003-03-22)
-=========================
-
- * generally, most foreseeable problems are beeing checked, in particular:
-
- - unability to connect to FTP server
- - unability to login into FTP server
- - unability to change to local or remote base directory
- - unability to change to remote subdirectory
- - unability to create local or remote subdirectory
- - unability to remove local or remote subdirectory
- - unability to put or get a file within 3 trials
-
- All these errors (except the last one) leads to immediate abortion.
-
-
-1.10 => 1.11 (2002-05-10)
-=========================
-
- * Some optical corrections concerning output
-
- * Files are now automatically re-transferred until the size on both ends
- matches
-
- * -? now corrrectly recognized
-
-
-1.00 => 1.10 (2001-10-28)
-=========================
-
- * config file support
- This is mportant to avoid putting ftp passwords in the process list!
-
- * much more informative standard and verbose/debug output, including kind
- of a advance information
-
- * better FTP-URL parsing supporting such without user/password
-
- * much better default values, e.g. ftp://ftp:anonymous@localhost/., ...
-
- * softlinks are now detected (locally and remote) and treated somewhat
- correctly, i.e. they are ignored correctly ;-))
-
-
-
-=> 1.00 (2001-10-26)
-====================
-
-* 1.0 created 2001-10-20 23:10 by Christoph Lechleitner <lech@ibcl.at>
-
-Quite good for a 5 hour hack, isn't it?
-O.K., I have already written similar programs for local file systems
-in Pascal for DOS, Win3x and OS/2, and in VisualBasic for Win95b.
-
-
diff --git a/emacs.d/nxhtml/nxhtml/html-upl/README b/emacs.d/nxhtml/nxhtml/html-upl/README
deleted file mode 100644
index 3f9f505..0000000
--- a/emacs.d/nxhtml/nxhtml/html-upl/README
+++ /dev/null
@@ -1,111 +0,0 @@
-# README file for ftpsync.pl
-
-
-Contents:
-=========
-
-- Overview
-- Why use ftpsync.pl instead of mirror, sitecopy, ...?
-- Requirements/Restrictions
-- Bug reports, Contact
-- License
-- Updates
-
-
-Overview:
----------
-
-ftpsync.pl synchronizes a local directory tree and a remote FTP directory tree.
-
-It was initally written to automize web publishing, but might be useful for
-some other purposes, like mirroring not-too-large public sites, data
-replication, and more.
-
-Call "ftpsync.pl -h" to get a short parameter explanation.
-
-
-Why use ftpsync.pl instead of mirror, sitecopy, ...?
-----------------------------------------------------
-
-Yes, there are similar projects, so some comments on them:
-
-Compared to mirror, ftpsync.pl is capable of PUTing, not only GETing stuff
-(Don't blame me if mirror is able to PUT, I could'nt find a way).
-
-Compared to sitecopy, ftpsync.pl has no problems, if the remote site has been
-changed since its last run by other tools and activites. Unless network
-problems or bugs occur, ftpsync.pl does a reliable synchronization.
-
-Compared to both, ftpsync.pl is very lightweight ;-))
-
-
-Requirements / Restrictions:
-----------------------------
-
-- Perl 5.6+
- ftpsync.pl was initially developed on Perl 5.6.0-81 on SuSE Linux 7.2,
- older Perl 5.x version might work. Test reports welcome at ftpsync@ibcl.at!
-
-- File::Find, IO::Handle
- IMHO parts of the basic perl package.
-
-- Net::FTP
- Part of the perl-libnet package.
-
-- UNIX like operating systems on local system
- Porting to DOS based systems should be easily done by changing the
- directory separator.
-
-- Perhaps, the script does not work with all FTP servers
- It is beeing tested only against UNIX based FTP servers.
-
-
-Bug-Reports, Contact:
----------------------
-
-Besides ftpsync.sourceforge.net, ftpsync@ibcl.at is a good target for comments
-of any kind.
-
-
-License:
---------
-
-FTPSync.pl is GNU/GPL software and eMail ware.
-
-
-FTPSync.pl as GNU/GPL software:
--------------------------------
-
-FTPSync.pl (ftpsync.pl) is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-See attached file COPYING.
-
-
-FTPSync.pl as eMail ware:
--------------------------
-
-FTPSync.pl is also eMail-Ware, which means that the initial author
-(Christoph Lechleitner) would like to get an eMail (to ftpsync@ibcl.at),
-- if anyone uses the script on production level,
-- if anyone distributes or advertises it in any way,
-- if anyone starts to (try to) improve it.
-
-
-Updates
--------
-
-The software and updates should be available from
-http://ftpsync.sourceforge.net/
-http://www.ibcl.at/ossw/FTPSync
diff --git a/emacs.d/nxhtml/nxhtml/html-upl/TODO b/emacs.d/nxhtml/nxhtml/html-upl/TODO
deleted file mode 100644
index 923583d..0000000
--- a/emacs.d/nxhtml/nxhtml/html-upl/TODO
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Nothing as of now.
diff --git a/emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl b/emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl
deleted file mode 100644
index 729d964..0000000
--- a/emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl
+++ /dev/null
@@ -1,700 +0,0 @@
-#!/usr/bin/perl
-#
-# ftpsync.pl
-#
-# See attached README file for any details, or call
-# ftpsync.pl -h
-# for quick start.
-#
-# LICENSE
-#
-# FTPSync.pl (ftpsync) is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# FTPSync.pl (ftpsync) is also eMail-Ware, which means that the initial author
-# (Christoph Lechleitner) would like to get an eMail at ftpsync@ibcl.at, if
-# - if anyone uses the script on production level,
-# - if anyone distributes or advertises it in any way,
-# - if anyone starts to (try to) improve it.
-#
-#
-################################################################################
-
-#
-# Options etc.
-#
-#print "Starting imports.\n"; # For major problem debugging
-printf STDERR "argv=@ARGV\n";
-
-use File::Find;
-use File::Listing;
-use Net::FTP;
-use strict;
-# flushing ...
-use IO::Handle;
-STDOUT->autoflush(1);
-STDERR->autoflush(1);
-
-sub dosync();
-sub print_syntax();
-sub print_options();
-sub buildremotetree();
-sub buildlocaltree();
-sub listremotedirs();
-sub parseRemoteURL();
-
-# Option Variables
-#print "Defining variables.\n"; # For major problem debugging
-# meta
-my $returncode=0;
-my $configfile=$ENV{"HOME"}."/.ftpsync";
-# basics
-my $localdir="";
-my $remoteURL="";
-my $syncdirection="";
-my $ftpuser="ftp";
-my $ftppasswd="anonymous";
-my $ftpserver="localhost";
-my $ftpdir="";
-my $ftptimeout=120;
-my $syncoff=0;
-# verbosity
-my $doverbose=1;
-my $dodebug=0;
-my $doquiet=0;
-my $doinfoonly=0;
-my $infotext="";
-my $docheckfirst=0;
-
-# Read command line options/parameters
-#print "Reading command line options.\n"; # For major problem debugging
-my $curopt;
-my @cloptions=();
-for $curopt (@ARGV) {
- if ($curopt =~ /^cfg=/) {
- $configfile=$';
- if (! -r $configfile) { print "Config file does not exist: ".$configfile."\n"; $returncode+=1; }
- } else {
- push @cloptions, $curopt;
- }
-}
-
-# Read Config File, if given
-my @cfgfoptions=();
-if ($configfile ne "") {
- if (-r $configfile) {
- #print "Reading config file.\n"; # For major problem debugging
- open (CONFIGFILE,"<$configfile");
- while (<CONFIGFILE>) {
- $_ =~ s/([ \n\r]*$|\.\.|#.*$)//gs;
- if ($_ eq "") { next; }
- if ( ($_ =~ /[^=]+=[^=]+/) || ($_ =~ /^-[a-zA-Z]+$/) ) { push @cfgfoptions, $_; }
- }
- close (CONFIGFILE);
- } # else { print "Config file does not exist.\n"; } # For major problem debugging
-} # else { print "No config file to read.\n"; } # For major problem debugging
-
-# Parse Options/Parameters
-print "Parsing all options.\n"; # For major problem debugging
-my $noofopts=0;
-for $curopt (@cfgfoptions, @cloptions) {
- if ($curopt =~ /^-[a-zA-Z]/) {
- my $i;
- for ($i=1; $i<length($curopt); $i++) {
- my $curoptchar=substr($curopt,$i,1);
- $noofopts++;
- if ($curoptchar =~ /[cC]/) { $docheckfirst=1; }
- elsif ($curoptchar =~ /[dD]/) { $dodebug=1; $doverbose=1; $doquiet=0; }
- elsif ($curoptchar =~ /[gG]/) { $syncdirection="get"; }
- elsif ($curoptchar =~ /[hH?]/) { print_syntax(); exit 0; }
- elsif ($curoptchar =~ /[iI]/) { $doinfoonly=1; }
- elsif ($curoptchar =~ /[pP]/) { $syncdirection="put"; }
- elsif ($curoptchar =~ /[qQ]/) { $dodebug=0; $doverbose=0; $doquiet=1; }
- elsif ($curoptchar =~ /[vV]/) { $doverbose++; }
- else { print "ERROR: Unknown option: \"-".$curoptchar."\"\n"; $returncode+=1; }
- }
- }
- elsif ($curopt =~ /^ftp:\/\/(([^@\/\\\:]+)(:([^@\/\\\:]+))?@)?([a-zA-Z01-9\.]+)\/(.*)/) {
- $remoteURL = $curopt;
- parseRemoteURL();
- if ( $syncdirection eq "" )
- { $syncdirection="get"; }
- }
- elsif ($curopt =~ /^[a-z]+=.+/) {
- my ($fname, $fvalue) = split /=/, $curopt, 2;
- if ($fname eq "cfg") { next; }
- elsif ($fname eq "ftpdir") { $ftpdir =$fvalue;
- if ($ftpdir ne "/") { $ftpdir=~s/\/$//; }
- if ( $syncdirection eq "" ) { $syncdirection="get"; }
- }
- elsif ($fname =~ m/ftppass(w(or)?d)?/i)
- { $ftppasswd=$fvalue;
- if ( $syncdirection eq "" ) { $syncdirection="get"; }
- }
- elsif ($fname eq "ftpserver") { $ftpserver =$fvalue;
- if ( $syncdirection eq "" ) { $syncdirection="get"; }
- }
- elsif ($fname eq "ftpuser") { $ftpuser =$fvalue;
- if ( $syncdirection eq "" ) { $syncdirection="get"; }
- }
- elsif ($fname eq "localdir") { $localdir =$fvalue; $localdir=~s/\/$//;
- if ( $syncdirection eq "" ) { $syncdirection="put"; }
- }
- elsif ($fname eq "timeout") { if ($fvalue>0) { $ftptimeout =$fvalue; } }
- }
- else {
- if ($localdir eq "") {
- $localdir = $curopt;
- if ( $syncdirection eq "" )
- { $syncdirection="put"; }
- } else {
- print "ERROR: Unknown parameter: \"".$curopt."\"\n"; $returncode+=1
- }
- }
-}
-if ($noofopts == 0) { print_syntax(); exit 0; }
-
-if($ftpuser eq "?") { print "User: "; $ftpuser=<STDIN>; chomp($ftpuser); }
-if($ftppasswd eq "?") { print "Password: "; $ftppasswd=<STDIN>; chomp($ftppasswd); }
-
-if ($dodebug) { print_options(); }
-# check options
-if ( ($localdir eq "") || (! -d $localdir) )
-{ print "ERROR: Local directory does not exist: ".$localdir."\n"; $returncode+=1; }
-#if ($localdir eq "") { print "ERROR: No localdir given.\n"; $returncode+=1; }
-#if ( ($remoteURL eq "") { print "ERROR: No remoteURL given.\n"; $returncode+=1; }
-if ($ftpserver eq "") { print "ERROR: No FTP server given.\n"; $returncode+=1; }
-if ($ftpdir eq "") { print "ERROR: No FTP directory given.\n"; $returncode+=1; }
-if ($ftpuser eq "") { print "ERROR: No FTP user given.\n"; $returncode+=1; }
-if ($ftppasswd eq "") { print "ERROR: No FTP password given.\n"; $returncode+=1; }
-if ($returncode > 0) { die "Aborting due to missing or wrong options! Call ftpsync -? for more information.\n"; }
-
-
-#print "Exiting.\n"; exit 0;
-
-if ($dodebug) { print "\nFind out if ftp server is online & accessible.\n"; }
-my $doftpdebug=($doverbose > 2);
-my $ftpc = Net::FTP->new($ftpserver,Debug=>$doftpdebug,Timeout=>$ftptimeout) || die "Could not connect to $ftpserver\n";
-if ($dodebug) { print "Logging in as $ftpuser with password $ftppasswd.\n" }
-$ftpc->login($ftpuser,$ftppasswd) || die "Could not login to $ftpserver as $ftpuser\n";
-my $ftpdefdir=$ftpc->pwd();
-if ($dodebug) { print "Remote directory is now ".$ftpdefdir."\n"; }
-if ($ftpdir !~ /^\//) # insert remote login directory into relative ftpdir specification
-{ if ($ftpdefdir eq "/")
- { $ftpdir = $ftpdefdir . $ftpdir; }
- else
- { $ftpdir = $ftpdefdir . "/" . $ftpdir; }
- if (!$doquiet)
- { print "Absolute remote directory is $ftpdir\n"; }
-}
-if (substr($ftpdir, -1) eq "/") {
- if (!$doquiet)
- { print " Remote directory ends in /, removing this\n"; }
- chop($ftpdir);
-}
-if ($dodebug) { print "Changing to remote directory $ftpdir.\n" }
-$ftpc->binary()
- or die "Cannot set binary mode :\n\t" . $ftpc->message;
-$ftpc->cwd($ftpdir)
- or die "Cannot cwd to $ftpdir :\n\t" . $ftpc->message;
-if ($ftpc->pwd() ne $ftpdir) {
- my $pwd = $ftpc->pwd();
- die "Could not change to remote base directory $ftpdir (at $pwd)\n"; }
-if ($dodebug) { print "Remote directory is now ".$ftpc->pwd()."\n"; }
-
-if (! $doquiet) { print "\nDetermine s offset.\n"; }
-if ($syncdirection eq "put") { clocksync($ftpc,"syncfile"); }
-
-# local & remote tree vars
-#chdir $localdir;
-my $ldl=length($localdir) + 1;
-#my $ldl=length($localdir);
-my %localfiledates=();
-my %localfilesizes=();
-my %localdirs=();
-my %locallinks=();
-
-my %remotefilesizes=();
-my %remotefiledates=();
-my %remotedirs=();
-my %remotelinks=();
-my $curremotesubdir="";
-
-# Build local & remote tree
-if (! $doquiet) { print "\nBuilding local file tree.\n"; }
-buildlocaltree();
-if (! $doquiet) { print "\nBuilding remote file tree.\n"; }
-buildremotetree();
-listremotedirs();
-#if ($dodebug) { print "Quitting FTP connection.\n" }
-#$ftpc->quit();
-
-#print "Exiting.\n"; exit 0;
-
-# Work ...
-if ($doinfoonly) { $docheckfirst=0; }
-if ($docheckfirst)
-{ print "Simulating synchronization.\n";
- $doinfoonly=1;
- dosync();
- $doinfoonly=0;
- print "\nOK to really update files? (y/n) [n] ";
- my $yn=<STDIN>;
- if ($yn =~ /^y/i)
- { print "OK, going to do it.\n";
- }
- else
- { print "OK, exiting without actions.\n";
- exit 1;
- }
-}
-if ($doinfoonly) { print "\nSimulating synchronization.\n"; }
-elsif (! $doquiet) { print "\nStarting synchronization.\n"; }
-dosync();
-
-if (!$doquiet) { print "Done.\n"; }
-
-if ($dodebug) { print "Quitting FTP connection.\n" }
-$ftpc->quit();
-
-exit 0;
-
-
-
-#
-# Subs
-#
-
-sub buildlocaltree() {
- find (\&noticelocalfile, $localdir."/");
- sub noticelocalfile {
- if ($ldl > length($File::Find::name)) { return; }
- #printf "name=%s, length(name)=%d, ldl=$ldl\n", $File::Find::name, length($File::Find::name);
- my $relfilename=substr($File::Find::name,$ldl);
- if (length($relfilename) == 0) { return; }
- if (-d $_) {
- if ($dodebug) { print "Directory: ".$File::Find::name."\n"; }
- elsif (! $doquiet) { print ":"; }
- $localdirs{$relfilename}="$relfilename";
- }
- elsif (-f $_) {
- #my @curfilestat=lstat $File::Find::name;
- my @curfilestat=lstat $_;
- my $curfilesize=$curfilestat[7];
- my $curfilemdt=$curfilestat[9];
- if ($dodebug) { print "File: ".$File::Find::name."\n";
- print "Modified ".$curfilemdt."\nSize ".$curfilesize." bytes\n"; }
- elsif (! $doquiet) { print "."; }
- $localfiledates{$relfilename}=$curfilemdt;
- $localfilesizes{$relfilename}=$curfilesize;
- }
- elsif (-l $_) {
- if ($dodebug) { print "Link: ".$File::Find::name."\n"; }
- elsif (! $doquiet) { print ","; }
- $locallinks{$relfilename}="$relfilename";
- } else {
- #print "u ".$File::Find::name."\n";
- if (! $doquiet) { print "Ignoring file of unknown type: ".$File::Find::name."\n"; }
- }
- #if (! ($doquiet || $dodebug)) { print "\n"; }
- #print "File mode is ".@curfilestat[2]."\n";
- }
- if ($dodebug) {
- print "Local dirs (relative to ".$localdir."/):\n";
- my $curlocaldir="";
- foreach $curlocaldir (keys(%localdirs))
- { print $curlocaldir."/\n"; }
- print "Local files (relative to ".$localdir."/):\n";
- my $curlocalfile="";
- foreach $curlocalfile (keys(%localfiledates))
- { print $curlocalfile."\n"; }
- }
-}
-
-
-sub buildremotetree() {
- my @currecursedirs=();
- #$ftpc->ls()
- # or die $ftpc->message . "\nCannot ls remote dir " . $ftpc->pwd();
- my @rfl = $ftpc->dir();
- # or @rfl=(); # we have to survive empty remote directories !!!
- my $currf="";
- my $curyear = (gmtime(time))[5] + 1900;
- my %monthtonr=();
- $monthtonr{"Jan"}=1; $monthtonr{"Feb"}=2; $monthtonr{"Mar"}=3; $monthtonr{"Apr"}=4; $monthtonr{"May"}=5; $monthtonr{"Jun"}=6;
- $monthtonr{"Jul"}=7; $monthtonr{"Aug"}=8; $monthtonr{"Sep"}=9; $monthtonr{"Oct"}=10; $monthtonr{"Nov"}=11; $monthtonr{"Dec"}=12;
- if ($dodebug) { print "Remote pwd is ".$ftpc->pwd()."\nDIRing.\n"; }
- my $curlsline;
- foreach $curlsline (parse_dir(\@rfl)) {
- my ($cfname,$cftype,$cfsize,$cftime,$mode)=@$curlsline;
- #if ($dodebug) { print "Analysing remote file/dir ".$currf."\n" };
- if ( $cftype ) {
- if ($cfname eq ".") { next; }
- if ($cfname eq "..") { next; }
- if (substr($cftype,0,1) eq 'l') { # link, rest of string = linkto
- my $curnrl;
- if ($curremotesubdir eq "") { $curnrl = $cfname; }
- else { $curnrl = $curremotesubdir."/".$cfname; }
- $remotelinks{$curnrl}=$cfname;
- if ($dodebug) { print "Link: ".$curnrl." -> ".$cfname."\n"; }
- }
- elsif ($cftype eq 'd') {
- my $curnewrsd;
- if ($curremotesubdir eq "") { $curnewrsd = $cfname; }
- else { $curnewrsd = $curremotesubdir."/".$cfname; }
- $remotedirs{$curnewrsd}=$curnewrsd;
- if ($dodebug) { print "Directory: ".$curnewrsd."\n"; }
- elsif (! $doquiet) { print ":"; }
- push @currecursedirs, $cfname;
- }
- elsif ($cftype eq 'f') { #plain file
- my $curnewrf;
- if ($curremotesubdir eq "") { $curnewrf = $cfname; }
- else { $curnewrf = $curremotesubdir."/".$cfname; }
- #$remotefiledates{$curnewrf}=$cftime;
- $remotefiledates{$curnewrf}=$ftpc->mdtm($cfname)+$syncoff;
- if ($remotefiledates{$curnewrf} le 0) { die "Timeout detecting modification time of $curnewrf\n"; }
- $remotefilesizes{$curnewrf}=$cfsize;
- if ($remotefilesizes{$curnewrf} lt 0) { die "Timeout detecting size of $curnewrf\n"; }
- if ($dodebug) { print "File: ".$curnewrf."\n"; }
- elsif (! $doquiet) { print "."; }
- }
- elsif (! $doquiet) { print "Unkown file: $curlsline\n"; }
- }
- elsif ($dodebug) { print "Ignoring.\n"; }
- }
- #recurse
- my $currecurseddir;
- foreach $currecurseddir (@currecursedirs)
- { my $oldcurremotesubdir;
- $oldcurremotesubdir=$curremotesubdir;
- if ($curremotesubdir eq "") { $curremotesubdir = $currecurseddir; }
- else { $curremotesubdir .= "/".$currecurseddir; }
- my $curcwddir="";
- if ($ftpdir eq "/")
- { $curcwddir=$ftpdir.$curremotesubdir; }
- else
- { $curcwddir=$ftpdir."/".$curremotesubdir; }
- if ($dodebug) { print "Change dir: ".$curcwddir."\n"; }
- $ftpc->cwd($curcwddir)
- or die "Cannot cwd to $curcwddir :\n\t" . $ftpc->message ;
- if ($ftpc->pwd() ne $curcwddir) {
- die "Could not cwd to $curcwddir :\n\t" . $ftpc->message ; }
- if (! $doquiet) { print "\n"; }
- buildremotetree();
- $ftpc->cdup();
- $curremotesubdir = $oldcurremotesubdir;
- }
-}
-
-
-# Synchronize clocks.
-sub clocksync {
- my $conn = shift @_;
- my $fn = shift @_;
- my $fndidexist=1;
-
- if(! -f $fn) {
- open(SF, ">$fn") or die "Cannot create $fn for time sync option";
- close(SF);
- $fndidexist=0;
- }
- -z $fn or
- die "File $fn for time sync must be empty.";
- my $putsyncok=1;
- $conn->put($fn) or $putsyncok=0;
- if (!$putsyncok)
- { unlink($fn); # cleanup!
- die "Cannot send timesync file $fn";
- }
-
- my $now_here1 = time();
- my $now_there = $conn->mdtm($fn) or
- die "Cannot get write time of timesync file $fn";
- my $now_here2 = time();
-
- if ($now_here2 < $now_there) # remote is in the future
- { $syncoff=($now_there - $now_here1);
- $syncoff -= $syncoff % 60;
- $syncoff = 0-$syncoff;
- }
- else
- #if ($now_here1 > $now_there) # remote is the past # or equal
- { $syncoff=($now_here2 - $now_there);
- $syncoff -= $syncoff % 60;
- }
-
- $conn->delete($fn);
-
- my $hrs = int(abs($syncoff)/3600);
- my $mins = int(abs($syncoff)/60) - $hrs*60;
- my $secs = abs($syncoff) - $hrs*3600 - $mins*60;
- if (! $doquiet) {
- printf("Clock sync offset: %d:%02d:%02d\n", $hrs, $mins, $secs);
- }
- unlink ($fn) unless $fndidexist;
-}
-
-
-sub dosync()
-{
- chdir $localdir || die "Could not change to local base directory $localdir\n";
- if ($syncdirection eq "put") {
- # create dirs missing at the target
- if ($doinfoonly) { print "\nWould create new remote directories.\n"; }
- elsif (! $doquiet) { print "\nCreating new remote directories.\n"; }
- my $curlocaldir;
- foreach $curlocaldir (sort { return length($a) <=> length($b); } keys(%localdirs))
- { if (! exists $remotedirs{$curlocaldir})
- { if ($doinfoonly) { print $curlocaldir."\n"; next; }
- if ($doverbose) { print $curlocaldir."\n"; }
- elsif (! $doquiet) { print "d"; }
- if ($ftpc->mkdir($curlocaldir) ne $curlocaldir) { die "Could not create remote subdirectory $curlocaldir\n"; }
- }
- }
- # copy files missing or too old at the target, synchronize timestamp _after_ copying
- if ($doinfoonly) { print "\nWould copy new(er) local files.\n"; }
- elsif (! $doquiet) { print "\nCopying new(er) local files.\n"; }
- my $curlocalfile;
- foreach $curlocalfile (sort { return length($b) <=> length($a); } keys(%localfiledates))
- { my $dorefresh=0;
- if (! exists $remotefiledates{$curlocalfile}) {
- $dorefresh=1;
- $infotext="New: ".$curlocalfile." (".$localfilesizes{$curlocalfile}." bytes)\n";
- if ($doinfoonly) { print $infotext; next; }
- elsif ($doverbose) { print $infotext; }
- elsif (! $doquiet) { print "n"; }
- }
- elsif ($remotefiledates{$curlocalfile} < $localfiledates{$curlocalfile}) {
- $dorefresh=1;
- $infotext="Newer: ".$curlocalfile." (".$localfilesizes{$curlocalfile}." bytes, ".$localfiledates{$curlocalfile}." versus ".$remotefiledates{$curlocalfile}.")\n";
- if ($doinfoonly) { print $infotext; next; }
- if ($doverbose) { print $infotext; }
- elsif (! $doquiet) { print "u"; }
- }
- elsif ($remotefilesizes{$curlocalfile} != $localfilesizes{$curlocalfile}) {
- $dorefresh=1;
- $infotext="Changed (different sized): ".$curlocalfile." (".$localfilesizes{$curlocalfile}." versus ".$remotefilesizes{$curlocalfile}." bytes)\n";
- if ($doinfoonly) { print $infotext; next; }
- if ($doverbose) { print $infotext; }
- elsif (! $doquiet) { print "u"; }
- }
- if (! $dorefresh) { next; }
- if ($dodebug) { print "Really PUTting file ".$curlocalfile."\n"; }
- if ($ftpc->put($curlocalfile, $curlocalfile) ne $curlocalfile)
- { print STDERR "Could not put localfile $curlocalfile\n"; }
- my $retries = 3;
- while ( ($ftpc->size($curlocalfile) != (lstat $curlocalfile)[7]) and ($retries-- > 0) )
- { if (! $doquiet) { print "Re-Transfering $curlocalfile\n"; }
- if ($ftpc->put($curlocalfile, $curlocalfile) ne $curlocalfile)
- { print STDERR "Could not re-put localfile $curlocalfile\n"; }
- }
- my $newremotemdt=$ftpc->mdtm($curlocalfile)+$syncoff;
- utime ($newremotemdt, $newremotemdt, $curlocalfile);
- }
- # delete files too much at the target
- if ($doinfoonly) { print "\nWould delete obsolete remote files.\n"; }
- elsif (! $doquiet) { print "\nDeleting obsolete remote files.\n"; }
- my $curremotefile;
- foreach $curremotefile (keys(%remotefiledates))
- { if (not exists $localfiledates{$curremotefile})
- { if ($doinfoonly) { print $curremotefile."\n"; next; }
- if ($doverbose) { print $curremotefile."\n"; }
- elsif (! $doquiet) { print "r"; }
- if ($ftpc->delete($curremotefile) ne 1) { die "Could not delete remote file $curremotefile\n"; }
- }
- }
- # delete dirs too much at the target
- if ($doinfoonly) { print "\nWould delete obsolete remote directories.\n"; }
- elsif (! $doquiet) { print "\nDeleting obsolete remote directories.\n"; }
- my $curremotedir;
- foreach $curremotedir (sort { return length($b) <=> length($a); } keys(%remotedirs))
- { if (! exists $localdirs{$curremotedir})
- { if ($doinfoonly) { print $curremotedir."\n"; next; }
- if ($doverbose) { print $curremotedir."\n"; }
- elsif (! $doquiet) { print "R"; }
- if ($ftpc->rmdir($curremotedir) ne 1) { die "Could not remove remote subdirectory $curremotedir\n"; }
- }
- }
- } else { # $syncdirection eq "GET"
- # create dirs missing at the target
- if ($doinfoonly) { print "\nWould create new local directories.\n"; }
- elsif (! $doquiet) { print "\nCreating new local directories.\n"; }
- my $curremotedir;
- foreach $curremotedir (sort { return length($a) <=> length($b); } keys(%remotedirs))
- { if (! exists $localdirs{$curremotedir})
- { if ($doinfoonly) { print $curremotedir."\n"; next; }
- if ($doverbose) { print $curremotedir."\n"; }
- elsif (! $doquiet) { print "d"; }
- mkdir($curremotedir) || die "Could not create local subdirectory $curremotedir\n";
- }
- }
- # copy files missing or too old at the target, synchronize timestamp _after_ copying
- if ($doinfoonly) { print "\nWould copy new(er) remote files.\n"; }
- elsif (! $doquiet) { print "\nCopying new(er) remote files.\n"; }
- my $curremotefile;
- foreach $curremotefile (sort { return length($b) <=> length($a); } keys(%remotefiledates))
- { my $dorefresh=0;
- if (! exists $localfiledates{$curremotefile}) {
- $dorefresh=1;
- $infotext="New: ".$curremotefile." (".$remotefilesizes{$curremotefile}." bytes)\n";
- if ($doinfoonly) { print $infotext; next; }
- if ($doverbose) { print $infotext; }
- elsif (! $doquiet) { print "n"; }
- }
- elsif ($remotefiledates{$curremotefile} > $localfiledates{$curremotefile}) {
- $dorefresh=1;
- $infotext="Newer: ".$curremotefile." (".$remotefilesizes{$curremotefile}." bytes, ".$remotefiledates{$curremotefile}." versus ".$localfiledates{$curremotefile}.")\n";
- if ($doinfoonly) { print $infotext; next; }
- if ($doverbose) { print $infotext; }
- elsif (! $doquiet) { print "u"; }
- }
- elsif ($remotefilesizes{$curremotefile} != $localfilesizes{$curremotefile}) {
- $dorefresh=1;
- $infotext="Changed (different sized): ".$curremotefile." (".$remotefilesizes{$curremotefile}." bytes)\n";
- if ($doinfoonly) { print $infotext; next; }
- if ($doverbose) { print $infotext; }
- elsif (! $doquiet) { print "c"; }
- }
- if (! $dorefresh) { next; }
- if ($dodebug) { print "Really GETting file ".$curremotefile."\n"; }
- my $rc=$ftpc->get($curremotefile, $curremotefile);
- if ( ($rc eq undef) or ($rc ne $curremotefile) )
- { print STDERR "Could not get file ".$curremotefile."\n"; }
- my $retries=3;
- while ( ($ftpc->size($curremotefile) != (lstat $curremotefile)[7]) and ($retries-- > 0) )
- { if (! $doquiet) { print "Re-Transfering $curremotefile\n"; }
- if ( ($rc eq undef) or ($rc ne $curremotefile) )
- { print STDERR "Could not get file ".$curremotefile."\n"; }
- }
- my $newlocalmdt=$remotefiledates{$curremotefile};
- utime ($newlocalmdt, $newlocalmdt, $curremotefile);
- }
- # delete files too much at the target
- if ($doinfoonly) { print "\nWould delete obsolete local files.\n"; }
- elsif (! $doquiet) { print "\nDeleting obsolete local files.\n"; }
- my $curlocalfile;
- foreach $curlocalfile (sort { return length($b) <=> length($a); } keys(%localfiledates))
- { if (not exists $remotefiledates{$curlocalfile})
- { if ($doinfoonly) { print $curlocalfile."\n"; next; }
- if ($doverbose) { print $curlocalfile."\n"; }
- elsif (! $doquiet) { print "r"; }
- if (unlink($curlocalfile) ne 1) { die "Could not remove local file $curlocalfile\n"; }
- }
- }
- # delete dirs too much at the target
- if ($doinfoonly) { print "\nWould delete obsolete local directories.\n"; }
- elsif (! $doquiet) { print "\nDeleting obsolete local directories.\n"; }
- my $curlocaldir;
- foreach $curlocaldir (keys(%localdirs))
- { if (! exists $remotedirs{$curlocaldir})
- { if ($doinfoonly) { print $curlocaldir."\n"; next; }
- if ($doverbose) { print $curlocaldir."\n"; }
- elsif (! $doquiet) { print "d"; }
- rmdir($curlocaldir) || die "Could not remove local subdirectory $curlocaldir\n";
- }
- }
- }
-}
-
-
-sub listremotedirs() {
- if ($dodebug) {
- print "Remote dirs (relative to ".$ftpdir."):\n";
- my $curremotedir="";
- foreach $curremotedir (keys(%remotedirs))
- { print $curremotedir."/\n"; }
- print "Remote files (relative to ".$ftpdir."):\n";
- my $curremotefile="";
- foreach $curremotefile (keys(%remotefiledates))
- { print $curremotefile."\n"; }
- print "Remote links (relative to ".$ftpdir."):\n";
- my $curremotelink="";
- foreach $curremotelink (keys(%remotelinks))
- { print $curremotelink." -> ".$remotelinks{$curremotelink}."\n"; }
- }
-}
-sub parseRemoteURL() {
- if ($remoteURL =~ /^ftp:\/\/(([^@\/\\\:]+)(:([^@\/\\\:]+))?@)?([a-zA-Z01-9\.]+)\/(.*)/) {
- #print "DEBUG: parsing ".$remoteURL."\n";
- #print "match 1 = ".$1."\n";
- #print "match 2 = ".$2."\n";
- #print "match 3 = ".$3."\n";
- #print "match 4 = ".$4."\n";
- #print "match 5 = ".$5."\n";
- #print "match 6 = ".$6."\n";
- #print "match 7 = ".$7."\n";
- if (length($2) > 0) { $ftpuser=$2; }
- if (length($4) > 0) { $ftppasswd=$4; }
- $ftpserver=$5;
- $ftpdir=$6;
- #if ($ftpdir eq "") { $ftpdir="/"; }
- }
-}
-
-
-sub print_syntax() {
- print "\n";
- print "FTPSync.pl 1.27 (2004-08-23)\n";
- print "\n";
- print " ftpsync [ options ] [ localdir remoteURL ]\n";
- print " ftpsync [ options ] [ remoteURL localdir ]\n";
- print " options = [-dgpqv] [ cfg|ftpuser|ftppasswd|ftpserver|ftpdir=value ... ] \n";
- print " localdir local directory, defaults to \".\".\n";
- print " ftpURL full FTP URL, scheme\n";
- print ' ftp://[ftpuser[:ftppasswd]@]ftpserver/ftpdir'."\n";
- print " ftpdir is relative, so double / for absolute paths as well as /\n";
- print " -c | -C like -i, but then prompts whether to actually do work\n";
- print " -d | -D turns debug output (including verbose output) on\n";
- print " -g | -G forces sync direction to GET (remote to local)\n";
- print " -h | -H turns debugging on\n";
- print " -i | -I forces info mode, only telling what would be done\n";
- print " -p | -P forces sync direction to PUT (local to remote)\n";
- print " -q | -Q turnes quiet operation on\n";
- print " -v | -V turnes verbose output on\n";
- print " cfg= read parameters and options from file defined by value.\n";
- print " ftpserver= defines the FTP server, defaults to \"localhost\".\n";
- print " ftpdir= defines the FTP directory, defaults to \".\" (/wo '\"') \n";
- print " ftpuser= defines the FTP user, defaults to \"ftp\".\n";
- print " ftppasswd= defines the FTP password, defaults to \"anonymous\".\n";
- print "\n";
- print " Later mentioned options and parameters overwrite those mentioned earlier.\n";
- print " Command line options and parameters overwrite those in the config file.\n";
- print " Don't use '\"', although mentioned default values might motiviate you to.\n";
- print "\n";
-}
-
-
-sub print_options() {
- print "\nPrinting options:\n";
- # meta
- print "returncode = ", $returncode , "\n";
- print "configfile = ", $configfile , "\n";
- # basiscs
- print "syncdirection = ", $syncdirection , "\n";
- print "localdir = ", $localdir , "\n";
- # FTP stuff
- print "remoteURL = ", $remoteURL , "\n";
- print "ftpuser = ", $ftpuser , "\n";
- print "ftppasswd = ", $ftppasswd , "\n";
- print "ftpserver = ", $ftpserver , "\n";
- print "ftpdir = ", $ftpdir , "\n";
- # verbsityosity
- print "doverbose = ", $doverbose , "\n";
- print "dodebug = ", $dodebug , "\n";
- print "doquiet = ", $doquiet , "\n";
- #
- print "doinfoonly = ", $doinfoonly , "\n";
- print "\n";
-}
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc.el b/emacs.d/nxhtml/nxhtml/html-wtoc.el
deleted file mode 100644
index 94533da..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc.el
+++ /dev/null
@@ -1,200 +0,0 @@
-;;; html-wtoc.el --- Creating pages with site TOC
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sat Feb 11 00:06:14 2006
-(defconst html-wtoc:version "0.2") ;; Version:
-;; Last-Updated: Sun Nov 04 21:49:34 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (add-to-list 'load-path default-directory load-path))
-(eval-when-compile (require 'html-site nil t))
-
-;;;###autoload
-(defgroup html-wtoc nil
- "Customization group for html-wtoc."
- :group 'nxhtml)
-
-(defcustom html-wtoc-dir
- (file-name-as-directory
- (expand-file-name
- "html-wtoc"
- (file-name-directory
- (if load-file-name load-file-name buffer-file-name))))
-
- "Directory where the tools needed are located.
-The tools for html-wtoc includes:
-
-- html-wtoc.pl
-- html-wtoc.js
-- html-wtoc.css
-- html-wtoc-template.htm
-- html-wtoc-template.js
-- html-wtoc-template.css
-- img/
-
-"
- :type 'directory
- :group 'html-wtoc)
-
-;; (defun html-wtoc-get-parsed-html-toc ()
-;; (save-excursion
-;; (let ((toc-file (html-toc-file)))
-;; (unless (file-exists-p toc-file)
-;; (html-toc-write-toc-file))
-;; (with-current-buffer (find-file-noselect toc-file)
-;; (goto-char (point-min))
-;; (let ((toc-begin (search-forward html-toc-mark-begin nil t))
-;; (toc-middle (search-forward html-toc-mark-middle nil t))
-;; toc-parsed)
-;; (unless (and toc-begin toc-middle)
-;; (error "Can't find table of contents in %s" toc-file))
-;; (setq toc-parsed (html-toc-parse-toc
-;; (buffer-substring-no-properties
-;; toc-begin toc-middle))))))))
-
-;; (defun html-wtoc-get-atags (parsed-ul level)
-;; (assert (eq 'ul (car parsed-ul)))
-;; (let (atags)
-;; (dolist (l parsed-ul)
-;; (when (and (listp l)
-;; (eq 'li (car l)))
-;; (dolist (ll l)
-;; (when (listp ll)
-;; (when (eq 'a (car ll))
-;; (setq atags
-;; (cons
-;; (list level
-;; (caddr ll)
-;; (cdaadr ll))
-;; atags)))
-;; (when (eq 'ul (car ll))
-;; (let ((subs (html-wtoc-get-atags ll (1+ level))))
-;; (dolist (s subs)
-;; (setq atags (cons s atags)))))))))
-;; (reverse atags)))
-
-;; (defcustom html-wtoc-pages-default-name "html-wtoc-pages.txt"
-;; "Default file name sans directory for list of pages file.
-;; This file is located in the same directory as `html-toc-file'."
-;; :type 'string)
-
-;; (defun html-wtoc-pages-file ()
-;; (expand-file-name html-wtoc-pages-default-name
-;; (file-name-directory (html-toc-file))))
-
-(defun html-wtoc-browse-page-with-toc ()
- (interactive)
- (unless buffer-file-name
- (error "This buffer is not visiting a file"))
- (html-site-current-ensure-site-defined)
- (let ((merge-dir (html-site-current-merge-dir))
- merged-file
- (in-site (html-site-dir-contains
- (html-site-current-site-dir)
- buffer-file-name)))
- (unless merge-dir
- (error "There is no output dir for pages with TOC defined for the site %s"
- html-site-current))
- (unless in-site
- (error "This buffer's file is not in %s" (html-site-current-site-dir)))
- (setq merged-file
- (expand-file-name
- (file-relative-name buffer-file-name
- (html-site-current-site-dir))
- (html-site-current-merge-dir)))
- (unless (file-exists-p merged-file)
- (error "The file %s does not yet exist.\nPlease do use `html-wtoc-write-merged' to create it."
- merged-file))
- (browse-url-of-file merged-file)))
-
-
-(defun html-wtoc-write-pages-with-toc (allow-overwrite)
- "Merge the TOC with the pages.
-
-If an entry with the name MERGE-NAME exists in `html-wtoc-merges'
-then this is chosen. Otherwise a new entry is created and added
-to `html-wtoc-merges'. The entry has all necessary information to
-do the merge.
-
-If `html-move-site-directory' has a non-nil value then the list
-of completions when prompting for MERGE-NAME contains only those
-merge names from `html-wtoc-merges' where the site directory has
-the same value. Otherwise the completion list contains all merge
-names and `html-move-site-directory' will be set to the chosen
-merge's site directory.
-
-The merging of the pages and the table of contents is done in a
-subprocess using a Perl script named html-wtoc.pl the directory
-`html-wtoc-dir'.
-"
- (interactive (list (y-or-n-p "Allow overwrite? ")))
- (html-site-current-ensure-site-defined)
- (let ((pag-file (html-site-current-page-list))
- (out-dir (html-site-current-merge-dir))
- (tpl-file (html-site-current-merge-template))
- (html-wtoc-pl (expand-file-name "html-wtoc.pl" html-wtoc-dir))
- )
- (unless (< 0 (length pag-file))
- (error "Page list file not defined for site %s" html-site-current))
- (unless (file-exists-p pag-file)
- (error "Can't find page file for site %s.\nHave you done M-x html-toc-create-pages-file?"
- html-site-current))
- (unless (< 0 (length tpl-file))
- ;;(error "Template file not defined for site %s.\nPlease use customize to add this in `html-site-list'." html-site-current)
- (setq tpl-file (expand-file-name "html-wtoc-template.html" html-wtoc-dir))
- )
- (let (
- (buffer (noshell-procbuf-setup "*Merging pages and TOC*"))
- (opt (list
- (concat "pages=" pag-file)
- (concat "outroot=" out-dir)
- (concat "template=" tpl-file))))
- (when allow-overwrite
- (setq opt (cons "update=1" opt)))
- (apply 'noshell-procbuf-run
- buffer
- "perl" "-w"
- html-wtoc-pl "merge"
- opt
- ))))
-
-(provide 'html-wtoc)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-wtoc.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm b/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm
deleted file mode 100644
index e95b8d5..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm
+++ /dev/null
@@ -1,207 +0,0 @@
-# Copyright 2006 Lennart Borgman, http://OurComments.org/. All rights
-# reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
-
-package PathSubs;
-
-#####################################################
-### This package contains general path handling
-### routines and some win32 specific dito.
-### The latter should ev be moved to a new module!
-#####################################################
-use strict;
-
-use File::Spec;
-
-### Absolute path names
-
-sub is_abs_path ($) {
- my $path = shift;
- return 0 if $path eq "";
- return 1 if File::Spec->file_name_is_absolute($path);
- #return 1 if substr($path, 1, 1) eq ":"; # MSWin32
- #return 1 if substr($path, 0, 1) eq "/";
- return 1 if $path =~ /^https?:/i;
- return 1 if $path =~ /^file:/i;
- return 1 if $path =~ /^javascript:/i;
- return 1 if $path =~ /^mailto:/i;
-}
-sub is_abs_netpath($) {
- my $path = shift;
- return 1 if $path =~ /^https?:/i;
- # New
- return 1 if $path =~ /^ftp:/i;
- return 1 if $path =~ /^mailto:/i;
-}
-
-
-sub uniq_file($) {
- my $fname = shift;
- $fname =~ s!^\s+|\s+$!!g;
- return "" if ($fname eq "");
- $fname = File::Spec->rel2abs($fname);
- if (!File::Spec->file_name_is_absolute($fname)) {
- die "File name is not absolute: $fname";
- }
- #print STDERR "uniq_file($fname)\n";
- $fname =~ tr!\\!/!;
- if (-e $fname) {
- #print STDERR "exists $fname\n";
- ### There is an error in 522, compensate for this!
- #die substr($fname, -1);
- if (substr($fname, -1) eq "/") { chop $fname; }
- #print STDERR "exists $fname\n";
- ### Translate ..
- if (substr($fname, 1, 1) eq ":") {
- my $ffname = Win32::GetFullPathName($fname);
- ### Get case
- my $lfname = Win32::GetLongPathName($ffname);
- #print STDERR "lexists $lfname\n";
- $fname = $lfname if ($lfname ne "");
- }
- } else {
- #print STDERR "NOT exists $fname\n";
- if (substr($fname, -1) eq "/") { chop $fname; }
- my $head = "";
- if (substr($fname, 0, 2) eq "//") {
- $head = "//";
- $fname = substr($fname, 2);
- }
- my @fname = split("/", $fname);
- my $tail = pop @fname;
- $fname = uniq_dir($head . join("/", @fname)) . $tail;
- }
- if (substr($fname, 1, 1) eq ":") {
- $fname = uc(substr($fname, 0, 1)) . substr($fname, 1);
- #print STDERR "fname $fname\n";
- }
- $fname =~ tr!\\!/!;
- #print STDERR "fname ($fname)\n";
- return $fname;
-}
-sub uniq_dir($) {
- my $dir = shift;
- my $uq_dir = uniq_file($dir);
- if (substr($uq_dir, -1) ne "/") { $uq_dir .= "/"; }
- return $uq_dir;
-}
-
-
-
-### Relative paths
-sub _get_link_root($) {
- my $lnk = shift;
- if ($lnk =~ m!^(/|ftp://[^/]*|https?://[^/]*|[a-z]:/)!i) {
- return $1;
- } else {
- return "";
- }
-}
-
-sub resolve_dotdot($) {
- my $orig_url = shift;
- my $root = _get_link_root($orig_url);
- return $orig_url if length($root) == length($orig_url);
- my $url = substr($orig_url, length($root));
- if (substr($root, -1) eq "/") {
- chop $root;
- $url = "/$url";
- }
- #die "$root\n$url";
- my $iPosSearch = 2;
- #print "url=$url\n";
- while ((my $iPos = index($url, "/../", $iPosSearch)) > -1) {
- my $sLeft = substr($url, 0, $iPos);
- if (substr($sLeft, -2) eq "..") {
- $iPosSearch += 3;
- next;
- }
- my $sRight = substr($url, $iPos+3);
- #print "url=$url\n";
- #print "iPos=$iPos\n";
- #print "sLeft=$sLeft\n";
- $sLeft =~ s!/[^/]*$!!;
- #print "sLeft=$sLeft\n";
- #print "sRight=$sRight\n";
- $url = $sLeft . $sRight;
- #print "\t***url=$url\n";
- #print "url=$url\n";
- }
- if (index($url, "../") > -1) {
- return $orig_url;
- }
- return $root . $url;
-}
-
-sub mk_relative_link($$;$) {
- my $from = shift;
- my $to = shift;
- my $norm = shift;
- if ($norm) {
- $from = uniq_file($from);
- $to = uniq_file($to);
- }
- if (-e $from) {
- $from = uniq_file($from);
- } else {
- $from = resolve_dotdot($from);
- }
- if (-e $to) {
- $to = uniq_file($to);
- } else {
- $to = resolve_dotdot($to);
- }
- my $root_from = _get_link_root($from);
- my $root_to = _get_link_root($to );
- if ($root_from ne $root_to) {
- return $to;
- }
- my @from = split "/", $from;
- my @to = split "/", $to;
- while (@to) {
- last if ($to[0] ne $from[0]);
- shift @to;
- shift @from;
- }
- if (@to == 1 && @from == 1) {
- if (length($to[0]) > length($from[0])) {
- if (substr($to[0], 0, length($from[0])+1) eq ($from[0] . "#")) {
- return substr($to[0], length($from[0]));
- }
- }
- }
- my $rl;
- for (1..$#from) { $rl .= "../"; }
- $rl .= join("/", @to);
-
- return $rl;
-}
-
-
-
-sub mk_absolute_link($$) {
- my $from = shift;
- my $rel_to = shift;
- my $abs = $from;
- $abs =~ s![^/]*$!!;
- $abs .= $rel_to;
- if (!is_abs_netpath($abs)) { $abs = uniq_file($abs); }
- $abs;
-}
-
-
-1;
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm b/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm
deleted file mode 100644
index ecdfd53..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 2006 Lennart Borgman, http://OurComments.org/. All rights
-# reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
-
-
-package html_tags;
-use strict;
-
-use vars qw($AUTOLOAD);
-
-sub _make_attributes {
- my($self,$attr) = @_;
- return () unless $attr && ref($attr) && ref($attr) eq 'HASH';
- my(@att);
- foreach (keys %{$attr}) {
- my($key) = $_;
- $key=~s/^\-//; # get rid of initial - if present
- #$key=~tr/a-z_/A-Z-/; # parameters are upper case, use dashes
- $key=~tr/A-Z_/a-z-/; # parameters are lower case in XHTML
- push(@att,defined($attr->{$_}) ? qq/$key="$attr->{$_}"/ : qq/$key/);
- }
- return @att;
-}
-
-sub _tag {
- my $tag_name = shift;
- my $part = shift;
- my($attr) = '';
- if (ref($_[0]) && ref($_[0]) eq 'HASH') {
- my(@attr) = html_tags::_make_attributes( '',shift() );
- $attr = " @attr" if @attr;
- }
- #return "<$tag_name$attr />" unless @_;
- return "<$tag_name$attr />" if $part == 1;
- return "<$tag_name$attr>" if $part == 2;
- my($tag,$untag) = ("<$tag_name$attr\n>","</$tag_name\n>");
- my @result = map { "$tag$_$untag" } (ref($_[0]) eq 'ARRAY') ? @{$_[0]} : "@_";
- return $result[0] if $part == 1;
- return "@result";
-}
-
-sub _mk_tag_sub($$) {
- my $name = shift;
- my $package = shift;
- my $caller = caller;
- my $sep = ($name =~ s/^\*//);
- my $lc_name = lc $name;
- my $code =
- ($lc_name =~ m/^(?:br|hr|input|img)$/ ?
- "sub $package\:\:$name(;\$\$) { return $caller\:\:_tag('$lc_name',1,\@_); }\n"
- :
- "sub $package\:\:$name(\$;\$) { return $caller\:\:_tag('$lc_name',0,\@_); }\n"
- );
- if ($sep) {
- if ($lc_name eq "html") {
- $code .= "sub $package\:\:start_$name(\$;\$\$)
- {return $caller\:\:_start_html(\@_);}\n";
- $code .= "sub $package\:\:end_$name {return $caller\:\:_end_html();}\n";
- } else {
- $code .= "sub $package\:\:start_$name(;\$\$)
- {return $caller\:\:_tag('$lc_name',1,\@_);}\n";
- $code .= "sub $package\:\:end_$name {'</$lc_name>';}\n";
- }
- }
- $code;
-}
-sub _start_html {
- my $title = shift;
- my $head_tags = shift;
- my $body_attr = shift;
- # compensate for perl laziness... (will not detect undef sub)
- $head_tags = $head_tags . _tag("title", 0, $title);
- my $start =
- _tag("html", 2) .
- _tag("head", 0, $head_tags) .
- _tag("body", 2, $body_attr);
-}
-sub _end_html {
- return '</body></html>';
-}
-
-sub header(@) {
- my @lines = @_;
- my $header;
- my $type;
- while (@lines) {
- my $key = shift @lines; my $value = shift @lines;
- $header .= "$key: $value\n";
- $type = $value if $key =~ m/content-type/i;
- }
- $header .= "Content-type: text/html\n" unless defined $type;
- $header .= "\n";
-}
-sub import {
- shift;
- my %exported;
- $exported{$_}++ for (@_);
- my $caller = caller;
- my $to_eval = "package $caller;\n";
- for my $name (keys %exported) {
- die "Will not redefine $caller\:\:$name" if $caller->can($name);
- my $func;
- if ($name eq "header") {
- $func = "sub header { html_tags::header(); }";
- }
- $func = _mk_tag_sub($name, $caller) unless defined $func;
- $to_eval .= "$func\n";
- }
- eval $to_eval;
- die $@ if $@;
-}
-
-1;
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css
deleted file mode 100644
index a6ffabb..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Main structures >>>>>>>>>>>>>>> */
-.html-wtoc-maintop {
- font-size: 1px;
- font-size: 1em;
- margin-top: 0em;
- margin-bottom: 0em;
-/* background-color:green; */
-}
-.html-wtoc-main {
-}
-
-td.html-wtoc-vdivline {
- //background-color: #8be;
- width: 0px;
-}
-
-.html-wtoc-search-form {
- margin-bottom: 0.1em;
-}
-.html-wtoc-search {
- font-size: 0.8em;
- color: green;
-}
-.html-wtoc-search a {
- color: green;
-}
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-
-
-/* Table of content >>>>>>>>>>>>>> */
-
-#html-wtoc-id-hidetoc {
- height: 20px;
- border-bottom: 2px inset #ddf;
- border-color: #dff;
-}
-
-#html-wtoc-id-tocdiv {
- width: 2.5em;
- //background-color: #eff;
-}
-#html-wtoc-id-logo {
- width: 100%;
- height: 120px;
- padding: 0em;
- margin: 0em;
- border: 0em;
-}
-#html-wtoc-id-toc {
-}
-#html-wtoc-id-tocwidth {
- width: 18em;
- height: 0em;
- padding: 0em;
- margin: 0em;
- border: 0em;
- line-height: 0em;
-/* background-color: red; */
-}
-#html-wtoc-id-toccol {
- width: 18em;
-}
-
-.html-wtoc-contcol {
- background-color: #dFEfff;
- background-color: #dFEfff;
- background-color: #cd950c;
- background-color: #eead0e;
-}
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-
-
-/* Buttons etc >>>>>>>>>>>>>>> */
-.html-wtoc-button {
- font-size: 0.75em;
- font-size: 8pt;
- color: #5A5D00;
- background-color: #9cf;
- background-color: #bcee68;
- background-color: #a2cd5a;
- padding: 0.2em;
- Border-Width: 2px;
- Border-Style: outset;
- text-align: center;
- border-color: #ddf;
-}
-a.html-wtoc-button {
- text-decoration: none;
- color: #5A5D00;
-}
-a.html-wtoc-button:hover {
- text-decoration:none;
- background-color: #6af;
- color:#340;
-}
-
-a.html-wtoc-buttonimg img {
- width: 16px;
- height: 16px;
- padding: 4px;
- border: 8px;
-}
-a.html-wtoc-buttonimg {
- border:2px;
- margin:2px;
- margin-left:2px;
- margin-right:2px;
-}
-a.html-wtoc-buttonimg {
- font-size:1px;
-}
-a.html-wtoc-buttonimg:hover {
- margin: 6px;
- margin-left:0px;
- margin-right:0px;
- border-color: #ddf;
- border-width: 2px;
- border-style: outset;
- background-color: #595C00;
- background-color: #bef;
- background-color: #b9ffb9;
-}
-
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-#nxhtml-link {
- font-size: 0.7em;
- text-align: center;
- padding-top: 2em;
- padding: 1em;
-}
-
-.copyright {
- color : #872;
-}
-
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html
deleted file mode 100644
index 440ece7..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>HEAD</title>
- <link rel="stylesheet" href="html-wtoc.css" type="text/css" />
- <link rel="stylesheet" href="html-wtoc-template.css" type="text/css" />
- <script type="text/javascript" src="html-wtoc.js"></script>
- <script type="text/javascript" src="html-wtoc-template.js"></script>
- <script type="text/javascript">
- var my_old_onload = window.onload;
- function my_onload() {
- HTML_WTOC_NS.onload_actions(%%PNUM%%);
- if (undefined != my_old_onload) { my_old_onload(); }
- }
- window.onload = my_onload;
- </script>
-
- </head>
-<body>
-
-
-
-
- <table summary="Page columns" cellspacing="0" border="0" cellpadding="0" width="100%" >
- <tr valign="top">
- <td id="html-wtoc-id-toccol" class="html-wtoc-contcol">
- <table summary="Contents column" id="html-wtoc-id-toc" class="html-wtoc-contcol"
- cellspacing="0" border="0" cellpadding="0" width="100%">
- <tr valign="top">
- <td colspan="2" height="50" >
- <table summary="Contents displaying buttons" id="html-wtoc-id-hidetoc"
- border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td width="70%">
- <a href="javascript:HTML_WTOC_NS.show_content(0); void(0);"
- class="html-wtoc-buttonimg"
- ><img src="img/showCont.gif"
- alt="Show table of content"
- border="0" /></a>
-
- <a style="display:none;"
- href="javascript:toggle_toc_nailing()"
- class="html-wtoc-buttonimg"
- ><img id="html-wtoc-id-nailimg"
- src="img/freeCont.gif"
- alt="Let table of content move with page"
- border="0" /></a>
-
- </td>
- </tr>
- </table>
- <table summary="Logo" id="html-wtoc-id-logo">
- <tr>
- <td align="right" valign="bottom" >
- <a href="http://www.OurComments.org/Emacs/EmacsW32.html"
- ><img src="img/gnu-m-x-160.png" width="80" height="80"
- alt="Go to EmacsW32 Home Page"
- title="Go to EmacsW32 Home Page"
- onmouseover="transLbi(this, false);"
- onmouseout ="transLbi(this, true);"
- style="
- margin-top:10px;
- padding-left:20px;
- padding-right:20px;
- padding-top:10px;
- padding-bottom:10px;
- "
- border="0"
- /></a>
- </td>
- </tr>
- </table>
- </td>
- </tr><tr valign="top">
- <td >
- <table>
- <tr>
- <td>%%TOC%%</td>
- </tr>
- <tr>
- <td id="nxhtml-link">
- <br />
- Built using Emacs
- <br />
- with nxhtml from
- <br />
- <a href="http://ourcomments.org/Emacs/Emacs.html"
- target="_blank">ourcomments.org</a>
- </td>
- </tr>
- </table>
- </td>
- <td class="html-wtoc-vdivline" width="1"></td>
- </tr><tr>
- <td colspan="2">
- </td>
- </tr>
- </table>
- <table summary="Ensure table width"
- cellspacing="0" id="html-wtoc-id-tocwidth"><tr><td></td></tr></table>
- </td>
- <td id="html-wtoc-id-tocdiv" ></td>
- <td align="left" >
- <table summary="Right column outermost"
- cellspacing="0" border="0" cellpadding="0" width="100%">
- <tr valign="top">
- <td >&nbsp;&nbsp;&nbsp;</td>
- <td align="left" class="html-wtoc-main">
- <p class="html-wtoc-maintop">
- <a href="javascript:HTML_WTOC_NS.show_content(1); void(0);"
- id="html-wtoc-id-showtoc" style="display:none;"
- class="html-wtoc-buttonimg"
- ><img src="img/hideCont.gif"
- alt="Hide table of content"
- border="0"
- /></a>
- &nbsp;
- </p>
- %%PAGE%%
- <p>&nbsp;</p>
- <!--
- <hr style="clear:both" width="50%" class="copyright" />
- <span class="copyright"
- >
- &copy; Copyright 2006 OurComments.org,
- <a href="http://www.OurComments.org/" target="_blank"
- class="copyright"
- >http://www.OurComments.org/</a>.
- All rights reserved.
- </span>
- -->
- <br />
- <br />
- </td>
- <td width="10">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css
deleted file mode 100644
index a12cb65..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css
+++ /dev/null
@@ -1,84 +0,0 @@
-body {
- margin: 0;
-}
-td {
- font-size: 1em;
-}
-
-/* Added by html-wtoc.pl >>>>>>>>>>>>> */
-.html-wtoc-mark {
-/* background-color: #9cf; */
-/* background-color: #bcee68; */
-/* background-color: #a2cd5a; */
- width: 20px;
- padding: 0;
- border: 0;
- text-align: center;
-}
-.html-wtoc-contline {
- width: 100%;
-}
-
-.html-wtoc-margin {
- width: 0.6em;
-}
-.html-wtoc-contents {
- font-size: 0.9em;
- padding: 1em;
- background-color: #9cf;
- background-color: #a2cd5a;
- background-color: #efffcf;
- background-color: #ffffdf;
- -moz-border-radius-topleft: 2em;
-}
-.html-wtoc-contents td {
-/* background-color: #9cf; */
-/* background-color: #bcee68; */
-/* background-color: #a2cd5a; */
-}
-.html-wtoc-contents-a {
- text-decoration: none;
- color: #595C00;
-/* background-color: #9cf; */
-/* background-color: #bcee68; */
-/* background-color: #a2cd5a; */
- border: 1px #9cf solid;
- border: 1px #a2cd5a solid;
- border: 1px #ffffc0 solid;
- padding-left: 0.25em;
- padding-right: 0;
- margin: 1px;
- display: block;
-}
-.html-wtoc-contents a:hover {
- text-decoration: none;
- background-color: #b9ffb9;
- border: 1px #6b8e23 solid;
-}
-.html-wtoc-currcont {
- background-color: #738600;
- color: #ffff2f;
- background-color: #535600;
- border: 1px #6b8e23 inset;
- padding-left: 0.25em;
- padding-right: 0;
- margin: 1px;
- display: block;
-}
-a.html-wtoc-currcont {
- text-decoration: none;
-}
-a.html-wtoc-currcont:hover {
- background-color: #738600;
- background-color: #536600;
- background-color: #434620;
-}
-/* <<<<<<<<<<<<<<<<<<< */
-
-
-
-
-
-
-
-
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js
deleted file mode 100644
index 7f22db7..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js
+++ /dev/null
@@ -1,361 +0,0 @@
-
-// © Copyright 2006 Lennart Borgman, http://www.OurComments.org/. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 3, or (at
-// your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; see the file COPYING. If not, write to
-// the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-// Floor, Boston, MA 02110-1301, USA.
-
-
-var HTML_WTOC_NS_sCurrTocId;
-
-
-HTML_WTOC_NS = {
-
- /////////////////////////////
- //// Basic event functions
- /////////////////////////////
-
- getEventObject : function (ev) {
- var o;
- if (window.event)
- o = window.event.srcElement;
- else if (null != ev)
- o = ( ev.target );
- return o;
- },
- getEvent : function (ev) {
- if (window.event) {
- return window.event;
- } else if (null != ev) {
- return ev;
- }
- },
-
- eventStopPropagation : function (e) {
- if (e.stopPropagation)
- e.stopPropagation();
- else
- e.cancelBubble=true;
- },
-
- eventPreventDefault : function (e) {
- if (e.preventDefault)
- e.preventDefault();
- else
- e.returnValue=false;
- },
-
- /////////////////////////////
- //// TOC hide
- /////////////////////////////
-
- show_content : function (on) {
- var toc = document.getElementById("html-wtoc-id-toccol").style;
- var tdv = document.getElementById("html-wtoc-id-tocdiv").style;
- var shw = document.getElementById("html-wtoc-id-showtoc").style;
- var hid = document.getElementById("html-wtoc-id-hidetoc").style;
- if (on) {
- toc.display = "";
- tdv.display = "";
- shw.display = "none";
- hid.display = "";
- HTML_WTOC_NS.focus_page_link(0);
- } else {
- toc.display = "none";
- tdv.display = "none";
- shw.display = "";
- hid.display = "none";
- }
- },
-
-
-
-
-
- /////////////////////////////
- //// Open-Close
- /////////////////////////////
- onblur_action : function(ev) {
- HTML_WTOC_NS_sCurrTocId = null;
- },
- onfocus_action : function(ev) {
- var o = HTML_WTOC_NS.getEventObject(ev);
- if (!o) return;
-
- HTML_WTOC_NS_sCurrTocId = o.id;
- },
- onclick_action : function(ev) {
- var o = HTML_WTOC_NS.getEventObject(ev);
- var e = HTML_WTOC_NS.getEvent(ev);
- if (13 == e.keyCode) return true;
- if (!o) return true;
- if ("IMG" == o.tagName) o = o.parentNode;
- var iId = HTML_WTOC_NS.getIdnumFromId(o.id);
- var sChildId = "toc_child_"+iId;
- var sOldCurrTocId = HTML_WTOC_NS_sCurrTocId;
- HTML_WTOC_NS.toggle_open(sChildId, o);
- HTML_WTOC_NS_sCurrTocId = sOldCurrTocId;
- return false;
- },
-
- toggle_open : function (id, parent) {
- var child = document.getElementById(id).style;
- var sInner = parent.innerHTML;
- var re = new RegExp("[^/]*\.gif", "i");
- if ("none" == child.display) {
- child.display = "";
- parent.innerHTML = sInner.replace(re, "down.gif")+"";
- } else {
- child.display = "none";
- parent.innerHTML = sInner.replace(re, "right.gif")+"";
- }
- },
-
-
-
- /////////////////////////////
- //// Load
- /////////////////////////////
-
- onload_actions : function (iPageNum) {
- document.body.onkeydown = HTML_WTOC_NS.onkeydown_action;
- document.body.onmouseover = HTML_WTOC_NS.onmouseover_action;
- var aATags = document.getElementsByTagName("a");
- for(var i = 0; i < aATags.length; i++) {
- var o = aATags[i];
- if (null != HTML_WTOC_NS.getIdnumFromId(o.id)) {
- o.onfocus = HTML_WTOC_NS.onfocus_action;
- o.onblur = HTML_WTOC_NS.onblur_action;
- if (o.id.substr(0, 12) == "opener_text_") {
- o.onclick = HTML_WTOC_NS.onclick_action;
- o.title = "Open/Close";
- } else if (o.id.substr(0, 7) == "opener_") {
- o.onclick = HTML_WTOC_NS.onclick_action;
- o.className = "html-wtoc-mark";
- o.title = "Open/Close";
- }
- }
- }
- HTML_WTOC_NS.focus_page_link(iPageNum);
- },
- focus_page_link : function (iPageNum) {
- // Element might be hidden
- try {
- document.getElementById("toc_link_"+iPageNum).focus();
- } catch (exc) {
- }
- },
-
-
-
-
-
-
-
- /////////////////////
- //// Mouse
- /////////////////////
-
- onmouseover_action : function (ev) {
- if (null == HTML_WTOC_NS_sCurrTocId) return true;
- var o = HTML_WTOC_NS.getEventObject(ev);
- var iId = HTML_WTOC_NS.getIdnumFromId(o.id);
- if (null == iId) return true;
- o.focus();
- },
-
-
-
- /////////////////////
- //// Key
- /////////////////////
-
- onkeydown_action: function (ev) {
- var keyDown = 40;
- var keyUp = 38;
- var keyLeft = 37;
- var keyRight = 39;
- var keyReturn = 13;
- var keyF2 = 113;
- var keyInsert = 45;
- // Opera
- var keyOperaDown = 57386;
- var keyOperaUp = 57385;
- var keyOperaLeft = 57387;
- var keyOperaRight = 57388;
- var keyOperaF2 = 57346;
- var keyOperaInsert = 57394;
-
- var SwitchKey = keyInsert;
- var SwitchKeyOpera = keyOperaInsert;
-
- var bUp;
- var e = HTML_WTOC_NS.getEvent(ev);
- if (null == HTML_WTOC_NS_sCurrTocId) {
- switch (e.keyCode) {
- case SwitchKey:
- case SwitchKeyOpera:
- HTML_WTOC_NS.focus_page_link(0);
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- }
- return true;
- }
- switch (e.keyCode) {
- case keyLeft:
- case keyOperaLeft:
- case keyRight:
- case keyOperaRight:
- HTML_WTOC_NS.handle_leftright_keys(e);
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- case keyDown:
- case keyOperaDown:
- bUp = false;
- break;
- case keyUp:
- case keyOperaUp:
- bUp = true;
- break;
- case SwitchKey:
- case SwitchKeyOpera:
- if (null != HTML_WTOC_NS_sCurrTocId) {
- var o = document.getElementById(HTML_WTOC_NS_sCurrTocId);
- if (o) o.blur();
- HTML_WTOC_NS_sCurrTocId = null;
- }
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- default:
- //alert(e.keyCode);
- return true;
- }
- var oOpener;
- oOpener = HTML_WTOC_NS.getNextVisOpener(HTML_WTOC_NS_sCurrTocId, bUp);
- oOpener.focus();
- HTML_WTOC_NS.eventStopPropagation(e);
- HTML_WTOC_NS.eventPreventDefault(e);
- return false;
- },
-
- handle_leftright_keys: function (e) {
- var keyLeft = 37;
- var keyRight = 39;
- var keyOperaLeft = 57387;
- var keyOperaRight = 57388;
- var iId = HTML_WTOC_NS.getIdnumFromId(HTML_WTOC_NS_sCurrTocId);
- if (null == iId) return;
- var sId = "opener_" + iId;
- var oOpener = document.getElementById(sId);
- var sId = HTML_WTOC_NS_sCurrTocId; // It will be cleared before getNextVis
-
- var bOpenAction;
- var bOpened;
- var bUp;
- var oChild = document.getElementById("toc_child_"+iId);
- if (null == oChild) {
- } else {
- bOpened = (oChild.style.display != "none");
- }
- switch (e.keyCode) {
- case keyLeft:
- case keyOperaLeft:
- bUp = true;
- bOpenAction = (null != bOpened) && (bOpened);
- break;
- case keyRight:
- case keyOperaRight:
- bUp = false;
- bOpenAction = (null != bOpened) && (!bOpened);
- break;
- default:
- alert("bad key handling...");
- }
- if (bOpenAction) {
- oOpener.click();
- HTML_WTOC_NS_sCurrTocId = sId;
- } else {
- var oPrev = HTML_WTOC_NS.getNextVisOpener(sId, bUp);
- oPrev.focus();
- }
- },
-
-
-
-
-
-
- //////////////////////
- //// Util
- //////////////////////
- getNameFromId: function (sId) {
- var re = new RegExp("(.*?_)(\\d+)", "i");
- if (!re.test(sId)) return null;
- var iId = sId.replace(re, "$1");
- return iId;
- },
- getIdnumFromId: function (sId) {
- var re = new RegExp("(.*?_)(\\d+)", "i");
- if (!re.test(sId)) return null;
- var iId = sId.replace(re, "$2");
- return iId;
- },
-
-
- getNextVisOpener: function (sId, bUp, bTrace) {
- if (bTrace) alert("getNextVisOpener("+sId+","+bUp+")");
- var iId = HTML_WTOC_NS.getIdnumFromId(sId);
- if (null == iId) {
- alert("getNextVisOpener err iId==null");
- return;
- }
- var sIdName = HTML_WTOC_NS.getNameFromId(sId);
- if (null == sIdName) {
- alert("getNextVisOpener err sIdName==null");
- return;
- }
- var oOpener;
- var iLoop = -2;
- while (oOpener == null) {
- if (bTrace) alert(iId);
- if (iLoop++ > iMaxChildNum) { alert("Child num error"); return; }
- if (!bUp) {
- iId++;
- } else {
- iId--;
- }
- if (iId > iMaxChildNum) { iId = 0; }
- if (iId < 0) { iId = iMaxChildNum; }
- var s = sIdName+iId;
- oOpener = document.getElementById(s);
- if (oOpener != null) {
- if (bTrace) alert(oOpener.offsetLeft);
- if (oOpener.style.display == "none") { // All
- oOpener = null;
- } else if (oOpener.offsetLeft < 0) { // IE
- oOpener = null;
- } else if (0 == oOpener.scrollWidth) { // Opera
- oOpener = null;
- }
- }
- }
- return oOpener;
- }
-
-
-
-}; //HTML_WTOC_NS
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl
deleted file mode 100644
index 56c0e21..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl
+++ /dev/null
@@ -1,1395 +0,0 @@
-#! perl
-
-# Copyright 2006, 2007 Lennart Borgman, http://OurComments.org/. All
-# rights reserved.
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-use strict;
-use File::Copy;
-use File::Spec;
-#use File::Path qw();
-use File::Path;
-use File::Find qw();
-use FindBin;
-
-use lib "$FindBin::Bin/PerlLib";
-use PathSubs qw();
-use html_tags qw(
-*html header
-div
-table Tr td
-p hr br
-a span img b
-);
-
-### Script start parameters
-my $m_param_action;
-my $m_param_files = 1;
-my $m_param_pnum = 0;
-my $m_param_single = 0;
-my $m_param_Template;
-my $m_param_InPages;
-my $m_param_OutRoot;
-my @m_param_InRoot;
-my $m_param_Overwrite;
-
-### Globals
-my $m_iAlwaysOpenedLevel = 0;
-my $m_sCommonIn;
-my $m_sInPagesFolder;
-my $m_sTemplateFolder;
-my $m_sStartTemplate;
-my $m_sBodyTemplate;
-#my $m_sEndTemplate;
-my $m_bBorders = 0;
-my @pages;
-my %page_num;
-my %js_show_page;
-my $m_TemplateTime;
-my $m_InPagesTime;
-my %m_linked_files;
-
-sub get_params();
-sub get_template();
-sub read_page_list($);
-sub find_pages($$);
-sub write_pages();
-sub send_page();
-sub find_template_files();
-sub find_linked_from_pages();
-sub copy_wtoc_files();
-sub copy_linked_files();
-
-#push @pages, [$ind, $tit, $full_fil, $anc, $hrf, $trg, $tip];
-sub IND { 0 }
-sub TIT { 1 }
-sub FULL_FIL { 2 }
-sub ANC { 3 }
-sub HRF { 4 }
-sub TRG { 5 }
-sub TIP { 6 }
-
-##########################################################
-### Main
-##########################################################
-print "\n";
-get_params();
-if ($m_param_action eq "FIND") {
- find_pages(\@m_param_InRoot, $m_param_InPages);
-} elsif($m_param_action eq "MERGE") {
- get_template();
- read_page_list($m_param_InPages);
- find_template_files();
- copy_wtoc_files();
- if ($m_param_files) {
- write_pages();
- } else {
- send_page();
- }
- find_linked_from_pages();
- copy_linked_files();
-} elsif($m_param_action eq "TOC") {
-}
-exit;
-
-sub copy_if_newer_or_overwrite($$) {
- my $in_file = shift;
- my $out = shift;
- my $out_file = $out;
- if (-d $out) {
- my ($in_v, $in_d, $in_f) = File::Spec->splitpath( $in_file );
- my ($out_v,$out_d,$out_f) = File::Spec->splitpath( $out, 1 );
- $out_file = File::Spec->catpath( $out_v, $out_d, $in_f );
- }
- my $should_write = 1;
- if (-e $out_file) {
- if ($m_param_Overwrite) {
- my $in_mdt = (stat $in_file)[9];
- my $outmdt = (stat $out_file)[9];
- if (($outmdt > $in_mdt)) {
- $should_write = 0;
- }
- } else {
- $should_write = 0;
- }
- }
- if ($should_write) {
- if (!File::Copy::syscopy($in_file, $out_file)) {
- die "syscopy($in_file, $out_file): $!";
- } else {
- print " $in_file => $out_file\n";
- }
- }
-} # copy_if_newer_or_overwrite
-
-sub copy_wtoc_files() {
- print "\n**** Copy html-wtoc files\n";
- mkdir $m_param_OutRoot, 0777;
- my $css_file = $FindBin::Bin . "/html-wtoc.css";
- copy_if_newer_or_overwrite($css_file, $m_param_OutRoot);
- my $js_file = $FindBin::Bin . "/html-wtoc.js";
- copy_if_newer_or_overwrite($js_file, $m_param_OutRoot);
- my $OutRootImg = $m_param_OutRoot . "img/";
- mkpath($OutRootImg);
- my $imgsrc = $FindBin::Bin . "/img/";
- opendir(IMGDIR, $imgsrc) or die "Can't opendir $imgsrc: $!";
- while (my $imgfile = readdir(IMGDIR)) {
- my $outimg = $OutRootImg . $imgfile;
- $imgfile = $imgsrc . $imgfile;
- #print STDERR ">>>$imgfile\n";
- if (-f $imgfile) {
- copy_if_newer_or_overwrite($imgfile, $outimg);
- }
- }
- closedir(IMGDIR);
-} # copy_wtoc_files
-
-sub add_to_linked_files($$) {
- my $from_file = shift;
- my $to_file = shift;
- if (exists $m_linked_files{$to_file}) {
- my $old_from = $m_linked_files{$to_file};
- unless ($old_from eq $from_file) {
- die "Both $from_file and $old_from should be copied to $to_file";
- }
- }
- $m_linked_files{$to_file} = $from_file;
-} # add_to_linked_files
-
-sub copy_linked_files() {
- print "\n**** Copy linked files\n";
- my %pages;
- for my $pnum (0..$#pages) {
- $pages{ full_in_name($pnum) } = 1;
- }
- for my $to_file (keys %m_linked_files) {
- my $from_file = $m_linked_files{$to_file};
- unless (exists $pages{$from_file}) {
- if (-e $from_file) {
- mkpath4file($to_file);
- copy_if_newer_or_overwrite($from_file, $to_file);
- }
- }
- }
-} # copy_linked_files
-
-sub find_linked_files($;$) {
- my $in_file = shift;
- my $out_file = shift;
- $out_file = in2out($in_file) unless ($out_file);
- my $whole = get_file($in_file);
- while ($whole =~ m!(?:\s|^)(?:href|src)="(.*?)"!gis) {
- my $l = $1;
- next unless $l =~ m!\.(?:css|js|jpg|jpeg|gif|png)$!;
- if (!File::Spec->file_name_is_absolute($l)) {
- next if $l =~ m!^javascript:!;
- next if $l =~ m!^http://!;
- next if $l =~ m!^ftp://!;
- next if $l =~ m!^mailto:!;
- }
- my $rel_l = $l;
- my $full_in = $l;
- if (File::Spec->file_name_is_absolute($l)) {
- $rel_l = PathSubs::mk_relative_link($in_file, $l);
- } else {
- $full_in = PathSubs::mk_absolute_link($in_file, $l);
- }
- my $full_out = PathSubs::mk_absolute_link($out_file, $rel_l);
- add_to_linked_files($full_in, $full_out);
- }
-} # find_linked_files
-
-sub find_template_files() {
- print "\n**** Find files referenced in template file\n";
- my $in_file = $m_param_Template;
- my $out_file = $m_param_OutRoot . "dummy.htm";
- find_linked_files($in_file, $out_file);
-}
-sub find_linked_from_pages() {
- for my $pnum (0..$#pages) {
- next unless defined $pages[$pnum][FULL_FIL];
- next unless $pages[$pnum][FULL_FIL] ne "";
- next if defined $pages[$pnum][TRG];
- find_linked_files( full_in_name($pnum) );
- }
-}
-
-sub should_write_merged($$) {
- my $pnum = shift;
- my $out_file = shift;
- my $should_write = 1;
- if (-e $out_file) {
- if ($m_param_Overwrite) {
- my $srcmdt = page_src_time($pnum);
- my $outmdt = (stat $out_file)[9];
- if (($outmdt > $srcmdt)
- && ($outmdt > $m_TemplateTime)
- && ($outmdt > $m_InPagesTime)) {
- $should_write = 0;
- }
- } else {
- $should_write = 0;
- }
- }
- return $should_write;
-}
-sub write_pages() {
- #print STDERR "*** param_OutRoot=$m_param_OutRoot\n";
- if ($m_param_single) {
- my $out_file = $m_param_OutRoot . "single_$m_param_pnum.html";
- if (should_write_merged($m_param_pnum, $out_file)) {
- my $page = create_single_page($m_param_pnum);
- $page = shrink($page);
- create_file_and_path($out_file, $page);
- }
- } else {
- my $iPages = 0;
- print "\n*** Creating pages:\n";
- for my $pnum (0..$#pages) {
- next unless defined $pages[$pnum][FULL_FIL];
- next unless $pages[$pnum][FULL_FIL] ne "";
- next if defined $pages[$pnum][TRG];
- $iPages++;
- my $out_file = full_out_name($pnum);
- if (should_write_merged($pnum, $out_file)) {
- my $page = create_page($pnum);
- next unless $page;
- print " Creating page $iPages: " . full_in_name($pnum) . "\n";
- $page = shrink($page);
- print "\t=> $out_file\n";
- create_file_and_path($out_file, $page);
- }
- }
- }
-} # write_pages
-
-sub send_page() {
- my $page = ($m_param_single ?
- create_single_page($m_param_pnum)
- :
- create_page($m_param_pnum) );
- print $page;
-} # send_page
-
-##########################################################
-### Params
-##########################################################
-sub die_usage() {
- my $sScript = $0;
- $sScript =~ tr!\\!/!;
- $sScript =~ s!.*/(.*)!$1!;
- die qq(Usage:
- Making preliminary file list:
- $sScript find in="in-dir" pages="pages-file" [overwrite=1]
-
- Merging pages and table of contents:
- $sScript merge pages="pages-file" outroot="out-dir" template="template-file" [overwrite=1]
-
- \n);
-}
-#use Getopt::Long;
-sub get_params() {
- $| = 1;
- for my $arg (@ARGV) { print " "; print $arg; } print "\n\n";
- die_usage() unless $#ARGV > 0;
- $m_param_action = $ARGV[0];
- $m_param_action =~ tr/a-z/A-Z/;
- #push @m_param_InRoot, $FindBin::Bin . "/doc/";
- #$m_param_OutRoot = $FindBin::Bin . "/tmp/";
- #$m_param_Template = $FindBin::Bin . "/doc/home_template.htm";
- #$m_param_InPages = $FindBin::Bin . "/doc/toc_pages.txt";
- for (my $i = 1; $i <= $#ARGV; $i++) {
- my ($k, $v) = ($ARGV[$i] =~ m!(.*?)=(.*)!);
- $v =~ tr!\\!/!;
- if ($k eq "in") {
- $v = PathSubs::uniq_file($v);
- $v .= "/" unless substr($v, -1) eq "/";
- push @m_param_InRoot, $v;
- } elsif( $k eq "outroot") {
- $v = PathSubs::uniq_dir($v);
- $v .= "/" unless substr($v, -1) eq "/";
- $m_param_OutRoot = $v;
- } elsif( $k eq "pages") {
- $v = PathSubs::uniq_file($v);
- $m_param_InPages = $v;
- } elsif( $k eq "template") {
- $v = PathSubs::uniq_file($v);
- $m_param_Template = $v;
- } elsif( $k eq "overwrite" ) {
- $m_param_Overwrite = $v;
- } elsif( $k eq "openedlevel" ) {
- $m_iAlwaysOpenedLevel = $v * 1;
- } else {
- die "Unknown parameter: $ARGV[$i]\n";
- }
- }
- if($m_param_action eq "FIND") {
- if ($#m_param_InRoot < 0) { die_usage(); }
- if (! defined $m_param_InPages) { die_usage(); }
- } elsif($m_param_action eq "MERGE") {
- if (! defined $m_param_InPages) { die_usage(); }
- if (! defined $m_param_OutRoot) { die_usage(); }
- if (! defined $m_param_Template) { die_usage(); }
- $m_sTemplateFolder = $m_param_Template;
- $m_sTemplateFolder =~ s![^/]*$!!;
- } else {
- die_usage();
- }
-
- $m_sInPagesFolder = $m_param_InPages;
- $m_sInPagesFolder =~ s![^/]*$!!;
- print "Parameters:\n";
- print " " . $m_param_action . "\n";
- print " pages=" . $m_param_InPages . "\n";
- print " outroot=" . $m_param_OutRoot . "\n";
- print " template=" . $m_param_Template . "\n";
- if (defined $m_param_Overwrite) {
- print " overwrite=" . $m_param_Overwrite . "\n";
- }
- #if ($#m_param_InRoot == -1) { push @m_param_InRoot,$m_sInPagesFolder; }
-}
-
-sub get_template() {
- my $sTemplate = get_file($m_param_Template, 1);
- $m_TemplateTime = (stat $m_param_Template)[9];
- $m_InPagesTime = (stat $m_param_InPages)[9];
- $sTemplate =~ s/<!--.*?-->//gs;
- if ( $sTemplate =~ m!(.*?<body.*?>)(.*)</body>!si ) {
- $m_sStartTemplate = $1;
- $m_sBodyTemplate = $2;
- #$m_sEndTemplate = $3;
- } else {
- die "Can't find body of template\n";
- }
-} # get_template
-
-sub read_page_list($) {
- my $sPagesFile = shift;
- my @in_files;
- open(P,$sPagesFile) or die "Can't open toc list file $sPagesFile: $!\n";
- while (my $sLine = <P>) {
- chomp $sLine;
- $sLine =~ s/^\s+|\s+$//g;
- next if $sLine eq "";
- next if substr($sLine, 0, 1) eq ";";
- #print STDERR "$sLine\n";
- my ($ind, $tit, $ref, $tip, $trg, $ico)
- = map { s/^\s+|\s+$//g; $_; } split("###", $sLine);
- #warn "trg=$trg\n" if defined $trg;
- my ($fil, $anc) = ("", "");
- my $hrf = "";
- my $full_fil = "";
- #$ref = "" unless defined $ref;
- #print STDERR "ref=$ref\n";
- if (defined $ref) {
- if (defined $trg) { undef $trg unless $trg ne ""; }
- if ((defined $trg) || ($ref =~ m/https?:/i)) {
- $hrf = $ref;
- } else {
- ($fil, $anc) = split('#', $ref);
- if ($ind >= 0) {
- if (File::Spec->file_name_is_absolute($fil)) {
- $full_fil = $fil;
- } else {
- $full_fil = PathSubs::uniq_file($m_sInPagesFolder . $fil);
- }
- }
- }
- }
- if ((!$tip) && ($full_fil ne "")) {
- $tip = get_title($full_fil);
- }
- push @pages, [$ind, $tit, $full_fil, $anc, $hrf, $trg, $tip];
- push @in_files, $full_fil if !defined $trg;
- }
- close P;
- $m_sCommonIn = get_common_root(\@in_files). "/";
-} # read_page_list
-
-
-
-sub get_common_root($) {
- my $psRoots = shift;
- my @sCommon;
- for my $s (@$psRoots) {
- my $full_s = PathSubs::uniq_file($s);
- my @full_s = split("/", $full_s);
- if ($#sCommon == -1) {
- @sCommon = @full_s;
- } else {
- my $iMax = $#sCommon; if ($#full_s < $iMax) { $iMax = $#full_s; }
- for (my $i = 0; $i <= $iMax; $i++) {
- if ($sCommon[$i] ne $full_s[$i]) {
- #print STDERR "$i: $sCommon[$i] != $full_s[$i]\n";
- @sCommon = @sCommon[0..$i-1];
- last;
- }
- }
- }
- }
- my $sCommon = join("/", @sCommon);
- return $sCommon;
-} # get_common_root
-
-
-sub find_pages($$) {
- my $pasInRoot = shift;
- my $sOutFile = shift;
- if (!$m_param_Overwrite) {
- die "Don't want to overwrite existing output file $sOutFile!\n" if -e $sOutFile;
- }
- my $root_level;
- my $sList;
- my $handle_file =
- sub {
- return unless m/.html?/i;
- return if -d $_;
- my $fname = PathSubs::uniq_file($_);
- die "Can't read $fname\n" unless -r $_;
- my $title = get_title($_);
- my $level = $fname =~ tr!/!!;
- $level -= $root_level;
- my $rel_fname = PathSubs::mk_relative_link($sOutFile, $fname);
- $sList .= "$level ### $title ### $rel_fname\n";
- };
- for my $sInRoot (@$pasInRoot) {
- $sInRoot = PathSubs::uniq_file($sInRoot);
- chop($sInRoot) if (substr($sInRoot, -1) eq "/");
- $root_level = $sInRoot =~ tr!/!!;
- File::Find::find($handle_file, $sInRoot);
- }
- create_file($sOutFile, $sList);
-} # find_pages
-
-
-##########################################################
-### File - page helpers
-##########################################################
-
-sub file_name($) {
- my $num = shift;
- return $pages[$num][FULL_FIL];
-}
-sub file_anchor($) {
- my $num = shift;
- return $pages[$num][ANC];
-}
-sub file_href($) {
- my $num = shift;
- #die $pages[$num][HRF] if defined $pages[$num][HRF];
- return $pages[$num][HRF];
-}
-sub file_target($) {
- my $num = shift;
- return $pages[$num][TRG];
-}
-sub file_title($) {
- my $num = shift;
- return $pages[$num][TIT];
-}
-sub file_tip($) {
- my $num = shift;
- return $pages[$num][TIP];
-}
-sub full_in_name($) {
- my $num = shift;
- my $name = file_name($num);
- return $name;
-}
-sub full_out_href($) {
- my $num = shift;
- my $anchor = file_anchor($num);
- my $full_href = full_out_name($num);
- warn "full_href is null" unless $full_href;
- if ((defined $anchor) && ($anchor ne "")) { $full_href .= "#" . $anchor; }
- return $full_href;
-}
-sub full_out_name($) {
- my $num = shift;
- my $in_name = file_name($num);
- return unless $in_name;
- my $anchor = file_anchor($num);
- #$m_param_OutRoot . $name;
- $anchor = "";
- my $name = substr($in_name, length($m_sCommonIn));
- if ($anchor) {
- my $base;
- my $ext;
- for (my $i = length($name);$i>0;$i--) {
- if (substr($name, $i, 1) eq ".") {
- $base = substr($name, 0, $i-1);
- $ext = substr($name, $i);
- $name = $base . "_sharp_" . $anchor . $ext;
- last;
- }
- }
- }
- $m_param_OutRoot . $name;
-}
-sub replace_name_link($) {
- my $page = shift;
- for my $k (keys %page_num) {
- my $num = $page_num{$k};
- my $href = ($m_param_single ? "javascript:ShowPage($num)" : file_name($num));
- $page =~ s!%%$k%%!$href!gs;
- }
- return $page;
-}
-
-##########################################################
-### File name helpers
-##########################################################
-sub in2out($) {
- my $in_name = shift;
- die "in2out: File name is not abs: $in_name" unless File::Spec->file_name_is_absolute($in_name);
- my $name = substr($in_name, length($m_sCommonIn));
- $m_param_OutRoot . $name;
-}
-
-##########################################################
-### File reading/writing
-##########################################################
-
-sub mkpath4file($) {
- my $file = shift;
- my $path = $file;
- $path =~ s|[^/]*$||;
- File::Path::mkpath($path);
-}
-sub create_file($$) {
- my ($out_file, $page) = @_;
- if (!$m_param_Overwrite) {
- if (-e $out_file) { die "Will not overwrite $out_file\n"; }
- }
- open(OUT, ">$out_file") or die "Can't create $out_file: $!";
- print OUT $page;
- close OUT;
- chmod 0111|((stat $out_file)[2]&07777), $out_file
-}
-sub create_file_and_path($$) {
- my ($out_file, $page) = @_;
- mkpath4file($out_file);
- create_file($out_file, $page);
-}
-
-
-sub get_file($$) {
- my ($file, $need) = @_;
- if (open(FL, $file)) {
- local $/;
- my $whole = <FL>;
- close FL;
- return $whole;
- } else {
- my $err = $!;
- die "Can't open $file: $err\n" if $need;
- return "";
- }
-}
-
-sub get_title($) {
- my $file = shift;
- open(H, $file) or die "Can't open and get title from $file: $!";
- while (my $line = <H>) {
- if ($line =~ m!<title>(.*?)</title>!i) { close H; return $1; }
- }
- close H;
-}
-
-
-
-##########################################################
-### Html parsing etc
-##########################################################
-
-sub get_head_from_file($) {
- my $fname = shift;
- my $err;
- my $head = get_head(get_file($fname, 1), \$err);
- die "\n\n$fname\n\t" . $err if defined $err;
- return $head;
-}
-# BUG: These actually requires parsing of the file, but it does not
-# seem very important:
-sub get_head($$) {
- my $html = shift;
- my $perr = shift;
- return "" unless $html;
- $html =~ s/<!--.*?-->//g;
- if ($html =~ m!<head.*?>(.*)</head>!is) {
- return $1;
- }
- $$perr = "Can't find <head>-tag in $html\n";
-}
-sub get_body($) {
- my $html = shift;
- return "" unless $html;
- $html =~ s/<!--.*?-->//gs;
- if ($html =~ m!<body[^>]*>(.*)</body>!is) {
- return $1;
- }
- die "Can't find <body>-tag in $html\n";
-}
-
-sub shrink($) {
- my $str = shift;
- my $out_str = "";
- my @str = split("\n", $str);
- my $in_pre = 0;
- for my $s (@str) {
- if ($s =~ m!<pre>!i) { $in_pre = 1; }
- if ($s =~ m!</pre>!i) { $in_pre = 0; }
- $s =~ s!^(\s*)!! unless $in_pre;
- $out_str .= $s . "\n";
- }
- return $out_str;
- $str =~ s!^(\s*)!!gm;
- $str;
-}
-
-
-##########################################################
-### Making what we see
-##########################################################
-
-sub mk_search() {
- return "" if ! $m_param_single;
- return qq[
- <a href="javascript:show_search()" xstyle="font-size: 8pt"
- title="Show Search Form"
- ><img src="img/search.gif" border="$m_bBorders" align="left"></a>
- <a href="javascript:show_search()" xstyle="font-size: 8pt"
- title="Show Search Form"
- class="html-wtoc-search"
- >Sök</a>
- ];
-}
-sub mk_main_table($$$$$) {
- my $left = shift;
- my $main = shift;
- my $srch_table = shift;
- my $sFile = shift;
- my $pNum = shift;
- my $search_tr = "";
- if ($m_param_single) {
- $search_tr =
- Tr(
- td("&nbsp;&nbsp;")
- . td({-valign=>'bottom', }, mk_search(), ) )
- }
- my $cont_table =
- table(
- { -border=>"$m_bBorders", -cellpadding=>0, -cellspacing=>0,
- -width=>"100%",
- -id=>"html-wtoc-contents",
- #-style=>"display:",
- -summary=>"Table of contents",
- },
- Tr(
- #td("&nbsp;&nbsp;")
- td({-class=>"html-wtoc-margin"})
- . td({-valign=>'top'}, $left) )
- . $search_tr
- )
- ;
- my $page = $m_sBodyTemplate;
- $page = replace_template_links($m_sBodyTemplate, $sFile);
- $page =~ s!%%TOC%%!$cont_table!;
- $page =~ s!%%PAGE%%!$main!;
- return $page;
-} # mk_main_table
-
-
-sub find_ind_level_prev($) {
- my $lThis = shift;
- for (my $i = $lThis - 1; $i > 0; $i--) {
- my $ind_lev = $pages[$i][IND];
- if ($ind_lev < 50) { return $ind_lev; }
- }
- return undef;
-}
-sub find_ind_level_next($) {
- my $lThis = shift;
- #print "find_ind_level_next($lThis)";
- #print ", ";
- #print file_title($lThis);
- #print "\n";
- #for (my $i = $lThis; $i < $#pages; $i++) {
- for (my $i = $lThis + 1; $i <= $#pages; $i++) {
- my $ind_lev = $pages[$i][IND];
- if ($ind_lev < 50) { return $ind_lev; }
- }
- return undef;
-}
-
-
-
-
-
-
-
-
-sub mk_opener_elem($$$) {
- my $iPi = shift;
- my $sHref = shift;
- my $bOpened = shift;
- my $Aattrib =
- {
- -id =>"opener_$iPi",
- };
- if ($sHref) { $$Aattrib{href} = $sHref; }
- my $sImg;
- my $sAlt;
- if ($bOpened) {
- $sImg = "down";
- $sAlt = "Close";
- } else {
- $sImg = "right";
- $sAlt = "Open";
- }
- return
- a(
- $Aattrib,
- img({
- -src=>"img/$sImg.gif",
- -alt=>$sAlt,
- -border=>0,
- -width=>12,
- -height=>12,
- },
- ),
- );
-} # mk_opener_elem
-
-sub mk_content($) {
- my $pnum = shift;
- if (!$pages[$pnum]) {
- return br();
- }
- my $cont;
- my @father;
- my @child_trace;
- my $this_indent = $pages[$pnum][IND];
- my $this_file = $pages[$pnum][FULL_FIL];
- if ($this_indent == -2) {
- return "";
- }
- my $this_href = full_out_name($pnum);
- #my $anchor = file_anchor($pnum);
- #if (defined $anchor) { $this_href .= "#" . $anchor; }
- my @size;
- $size[0] = "1em";
- $size[1] = "0.8em";
- $size[2] = "0.8em";
-
-
-
- ### Open all main level nodes
- my @opened; # rename to visible!!!!!
- for my $pi (0..$#pages) {
- my $indent = $pages[$pi][IND];
- if ($indent <= $m_iAlwaysOpenedLevel) {
- $opened[$pi] = 1;
- } else {
- $opened[$pi] = 0; # more simple to handle
- }
- }
-
-
-
- ### Open ancestors and older sisters (if not a standalone node)
- my $pnum_indent = $pages[$pnum][IND];
- my $high_open = $pnum_indent;
- my $standalone_open = 10;
- if ($high_open < $standalone_open) { ### Not a standalone node
- for (my $pi = $pnum; $pi >= 0; $pi--) {
- my $pi_indent = $pages[$pi][IND];
- if ($high_open >= $pi_indent) {
- $opened[$pi] = 1;
- $high_open = $pi_indent;
- for (my $ps = $pi+1; $ps <= $#pages; $ps++) {
- my $ps_indent = $pages[$ps][IND];
- last if $ps_indent < $pi_indent;
- $opened[$ps] = 1 if $ps_indent == $pi_indent;
- }
- }
- last if $pi_indent == 0;
- }
- }
-
-
-
-
- ### Open direct childs and younger sisters
- my $maybe_child = 1;
- my $more_sisters = 1;
- my $max_open_indent = $pnum_indent;
- for my $pi ($pnum+1..$#pages) {
- my $pi_indent = $pages[$pi][IND];
- if ($pi_indent <= $max_open_indent) { $maybe_child = 0; }
- if ($pi_indent < $pnum_indent) { $more_sisters = 0; }
- if ($pi_indent == $pnum_indent) {
- if ($more_sisters) { $opened[$pi] = 1; }
- $maybe_child = 0;
- } elsif ($pi_indent == $pnum_indent+1) {
- if ($maybe_child) { $opened[$pi] = 1; }
- }
- }
- #exit if $pnum == 3;
-
-
-
-
- ### Open all in the same file (necessary for non-JavaScript)
- for my $pi (0..$#pages) {
- my $file = $pages[$pi][FULL_FIL];
- #printf STDERR "file - open=(%s)\n", $file;
- #if ($file eq $this_file) {
- if ($file eq $this_file) {
- $opened[$pi] = 1;
- }
- if ($file eq "") {
- if ($pi < $#pages) {
- if ($pages[$pi][IND] < $pages[$pi+1][IND]) {
- $opened[$pi+1] = 1;
- }
- }
- }
- if ($pages[$pi][IND] > 10) {
- $opened[$pi] = 0;
- #print ">>>>>>>>\$opened[$pi] = 0;\n";
- }
- #print STDERR "+++++++++\$opened[$pi] = $opened[$pi]\n";
- }
-
-
-
-
- ### Make the actual contents
- my $tooltip;
- my $child_id;
- for my $pi (0..$#pages) {
-# if (!$pages[$pi][FULL_FIL] && !$pages[$pi][HRF]) {
-# my $txt = file_title($pi); #$pages[$pi][TIT];
-# $txt = qq(</p><hr width="50%" align="left" /><p style='margin-top:0'>) if $txt eq "-";
-# $cont .= $txt;
-# $cont .= br();
-# next;
-# }
- my $txt = file_title($pi); #$pages[$pi][TIT];
- if ($txt eq "-") {
- $txt = qq(</p><hr width="50%" align="left" /><p style='margin-top:0'>);
- $cont .= $txt;
- $cont .= br();
- next;
- }
- #if ($pages[$pi][TRG]) {
- # next;
- #}
- #next if ! defined $opened[$pi];
- #next if ! $opened[$pi];
- my $ind_lev = $pages[$pi][IND];
- next if $ind_lev > 50;
- my $ind_lev_next = find_ind_level_next($pi);
- #my $ind_lev_prev = find_ind_level_prev($pi);
-
- my $this_entry = "";
-
- ### Child id from previous row
- if (defined $child_id) {
- my $display = "";
- if (!$opened[$pi]) {
- $display = qq(style="display:none");
- } else {
- }
- $this_entry .= "\n<div id=\"$child_id\" $display>\n";
- undef $child_id;
- }
- my $opener_elem = ""; #qq(<img src="img/blank12.gif" width=12 height=12 alt=" ">);
- my $childs_are_visible = ($pi == $pnum);
- if ($pi < $#pages) {
- if ($pages[$pi][IND] < $pages[$pi+1][IND]) {
- if ($opened[$pi+1]) { $childs_are_visible = 1; }
- }
- }
- #if ($pages[$pi][IND] < $m_iAlwaysOpenedLevel) { $childs_are_visible = 1; }
-
- my $file_href;
- my $target;
- my $href;
- my $href_self;
- my $target_attrib;
- my $title = file_title($pi);
- my $file_name = file_name($pi);
- if ($title) {
- $file_href = file_href($pi); # || "";
- $target = file_target($pi);
- $href =
- ($file_name ?
- ($m_param_files ?
- ($m_param_single ? "JavaScript:ShowPage($pi);" :
- ($file_href ne ""? $file_href
- :
- PathSubs::mk_relative_link($this_href, full_out_href($pi))))
- :
- ($m_param_single ? "JavaScript:ShowPage($pi)" : "?pnum=$pi")
- )
- :
- (File::Spec->splitpath($this_href))[2]);
- if ($pi == $pnum) {
- $href_self = $this_href;
- if ($href_self =~ m!([^/\\]*$)!) {
- $href_self = $1;
- }
- }
- $target_attrib = (defined $target? qq(target="$target"): "");
- } else {
- $href = "";
- $target_attrib = "";
- }
-
- if (defined $ind_lev_next && $ind_lev_next > $ind_lev) {
- $child_id = "toc_child_$pi";
- #print " child_id=$child_id\n";
- push @child_trace, $child_id;
- $opener_elem = mk_opener_elem($pi,
- ($href? $href : $href_self),
- $childs_are_visible);
- }
- $title =~ s/_/&nbsp;/go;
- my $indent = ($ind_lev ? "&nbsp;" x (($ind_lev-1) * 4) : "");
- my $size = $size[$ind_lev];
- $title = b($title) if $ind_lev == 0;
-
- my $Aattrib =
- {
- id=>"toc_link_$pi",
- onclick=>"html_wtoc_nailing(this)",
- };
- if (!$file_name) {
- $Aattrib =
- {
- id=>"opener_text_$pi",
- };
- }
- if ($pi == $pnum) {
- ### Current page
- $$Aattrib{class} = "html-wtoc-currcont";
- $$Aattrib{title} = "You are here";
- $$Aattrib{href} = $href_self;
- $this_entry .=
- table({
- -cellspacing=>0,
- -cellpadding=>0,
- -class=>"html-wtoc-contline",
- -border=>0,
- -summary=>"Formatter",
- },
- Tr({
- },
- td({
- },
- a(
- $Aattrib,
- $indent . $title . "&nbsp;"
- )
- )
- . td({
- -class=>"html-wtoc-mark",
- },
- $opener_elem
- )
- )
- );
-
-
-
-
- } else {
- ### Link to other page
- if (file_title($pi)) {
- $tooltip = $pages[$pi][TIP];
- if (!defined $tooltip) { $tooltip = "Go to the page $title"; }
- $$Aattrib{class} = "html-wtoc-contents-a";
- my $a_or_span;
- if (!defined $href) {
- $a_or_span = span($Aattrib, $indent . $title);
- } else {
- $$Aattrib{title} = $tooltip;
- $$Aattrib{href} = $href;
- if (defined $target) { $$Aattrib{target} = $target; }
- $a_or_span = a($Aattrib, $indent . $title);
- }
- $this_entry .=
- table({
- -cellspacing=>0,
- -cellpadding=>0,
- -class=>"html-wtoc-contline",
- -border=>0,
- -summary=>"Formatter",
- },
- Tr({
- },
- td({
- },
- $a_or_span
- )
- . td({
- -class=>"html-wtoc-mark",
- },
- $opener_elem
- )
- )
- );
- } else {
- $this_entry .= $indent . " " . $title;
- #die $this_entry;
- }
- }
- if ((!defined $ind_lev_next) || $ind_lev_next <= $ind_lev) {
- my $ind_end = $ind_lev;
- if (defined $ind_lev_next) { $ind_end = $ind_lev_next+1; }
- for (my $i = $ind_end; $i <= $ind_lev; $i++) {
- my $end_id = pop @child_trace;
- if (defined $end_id) {
- $this_entry .= "</div><!-- end child $end_id -->"; # end childs' span
- #print " end $end_id\n";
- }
- }
- }
- $cont .= $this_entry;
- $father[$ind_lev] = $pi;
- } #for my $pi (0..$#pages)
-
- $cont = div({-class=>"html-wtoc-contents"}, $cont) . p("&nbsp;");
- #$cont =~ s|<|\n<|gms;
- #$cont =~ tr!\n\r! !;
- $cont =~ s{
- (\ssrc=)"(.*?)"
- }
- {
- my $s1 = $1;
- my $src = $2;
- if (!PathSubs::is_abs_path($src)) {
- my $srcabs = PathSubs::mk_absolute_link(full_out_name(0), $src);
- $src = PathSubs::mk_relative_link(full_out_name($pnum), $srcabs);
- };
- "${s1}\"$src\"";
- }egsmx;
- $cont;
-} # mk_content
-
-sub mk_main_window($) {
- my $pnum = shift;
- my $full_name = full_in_name($pnum);
- return unless defined $full_name;
- return get_body(get_file($full_name, 1));
-}
-
-
-
-
-
-
-
-
-##########################################################
-### The JavaScripts and styles we need
-##########################################################
-
-sub mk_style($) {
- return "";
- my $pnum = shift;
- my $rel_link =
- PathSubs::mk_relative_link(full_out_name($pnum), $m_param_OutRoot . "html-wtoc.css");
- return qq(<link rel="stylesheet" href="$rel_link" type="text/css">\n);
-}
-sub mk_js($) {
- my $pnum = shift;
- return <<__HTML_END_JS_PNUM__;
- <script type="text/JavaScript">
- var iCurrentChild = $pnum;
- var iMaxChildNum = $#pages;
- </script>
-__HTML_END_JS_PNUM__
- return "";
- my $single_js = "";
- if ($m_param_single) {
- $single_js = qq[if (!document.all) { navigate("0.html"); }];
- my $page_info = "var page_name = new Array;\n";
- for my $i (0..$#pages) {
- my $page_name = file_title($i); #$pages[$i][TIT];
- $page_info .= qq[ page_name[$i] = "$page_name";\n];
- }
- $single_js .= $page_info;
- }
- my $sch_link =
- PathSubs::mk_relative_link(full_out_name($pnum), $m_param_OutRoot . "search.js");
- my $top_link =
- PathSubs::mk_relative_link(full_out_name($pnum), $m_param_OutRoot . "html-wtoc.js");
- return <<__HTML_END_JS__;
- <script type="text/JavaScript" src="$sch_link"></script>
- <script type="text/JavaScript" src="$top_link"></script>
- <script type="text/JavaScript">
- $single_js
- </script>
-__HTML_END_JS__
-}
-
-##########################################################
-### Page creation
-##########################################################
-
-sub replace_template_links($$) {
- my $template = shift;
- my $sFile = shift;
- $template =~ s{\ssrc="(.*?)"}
- {
- my $sSrc = $m_param_OutRoot . $1;
- my $sRelSrc = PathSubs::mk_relative_link($sFile, $sSrc);
- qq( src="$sRelSrc");
- }exg;
- $template =~ s{\shref="(.*?)"}
- {
- my $sOld = $1;
- if ((lc substr($sOld, 0, 11)) eq "javascript:") {
- qq( href="$sOld");
- } elsif (PathSubs::is_abs_netpath($sOld)) {
- qq( href="$sOld");
- } else {
- my $sSrc = $m_param_OutRoot . $sOld;
- my $sRelSrc = PathSubs::mk_relative_link($sFile, $sSrc);
- qq( href="$sRelSrc");
- }
- }exg;
- return $template;
-} # replace_template_links
-
-sub mk_start_of_page($) {
- my $pnum = shift;
- my $page = "";
- my $page_style = mk_style($pnum);
- my $page_js = mk_js($pnum);
- my $sFile = full_out_name($pnum);
- my $head = "";
- $head .= $page_js;
- $head .= $page_style;
- $head .= get_head_from_file(full_in_name($pnum));
- $page .= header if !$m_param_files;
- $page .= replace_template_links($m_sStartTemplate, $sFile);
- $page =~ s!<title>HEAD</title>!$head!;
- my $focus_pnum = $pnum;
- my $ind_lev = $pages[$pnum][IND];
- if ($ind_lev > 50) { $focus_pnum = 0; }
- $page =~ s!%%PNUM%%!$focus_pnum!;
- return $page;
-} # mk_start_of_page
-
-my %m_sCreatedPages;
-sub page_src_time($) {
- my $pnum = shift;
- my $src_file = $pages[$pnum][FULL_FIL];
- return (stat $src_file)[9];
-}
-sub create_page($) {
- my $pnum = shift;
- return unless $pages[$pnum][FULL_FIL];
-
- my $out_name = full_out_name($pnum);
- return if exists $m_sCreatedPages{$out_name};
- $m_sCreatedPages{$out_name} = 1;
-
- my $page = mk_start_of_page($pnum);
- my $cont_win = mk_content($pnum);
- my $main_win = mk_main_window($pnum);
- $page .= mk_main_table(
- $cont_win,
- $main_win,
- "",
- $out_name,
- $pnum,
- );
- $page .= end_html;
- $page = replace_name_link($page);
- return $page;
-} # create_page
-
-
-__END__
-
-
- ##########################################################
- ### Unused currently
- ##########################################################
-
- sub build_ShowPage() {
- for my $num (0..$#pages) {
- $page_num{$pages[$num][FULL_FIL]} = $num;
- my $fon = full_out_name($num);
- if ($fon) { $js_show_page{$fon} = "ShowPage($num);"; }
- }
-}
-build_ShowPage();
-
-
-sub mk_meta_enter_exit() {
- return <<__HTML_EE__;
- <meta HTTP-EQUIV="Page-Enter" content="RevealTrans (Duration=0.1, Transition=31)">
- <meta HTTP-EQUIV="Page-Exit" content="RevealTrans (Duration=1, Transition=23)">
-__HTML_EE__
-}
-
-##########################################################
-### Single page
-##########################################################
-
-sub mk_noscript() {
- return <<__HTML_END_NOSCRIPT__;
- <noScript>
- Sorry, there is not yet any version for non-JavaScript browsers.
- You need to enable JavaScript to see the rest of the pages!
-__HTML_END_NOSCRIPT__
-}
-
-sub create_single_page($) {
- my $pnum = shift;
-
- my $page = mk_start_of_page($pnum);
- my $left_col = "";
- my $main = "";
- for my $pi (0..$#pages) {
- next unless $pages[$pi][FULL_FIL];
- my $display = ($pi == $pnum ? 'style="display: block"' : 'Style="display: none"');
- my $pi_left_col = replace_rel_link(mk_content($pi), full_out_name($pi));
- my $pi_main = replace_rel_link(mk_main_window($pi), full_out_name($pi));
- my $pi_margin = "";
- $left_col .= "\n<div id='left_col_$pi' $display>" . $pi_left_col . "</div>\n";
- $main .= "\n<div id='main_$pi' $display>" . $pi_main . "</div>\n";
- }
- my $search_table = qq[
- <table border="0" width="100%" height="200"
- cellpadding="0" cellspacing="0"
- xbgcolor="yellow"
- class="html-wtoc-search"
- id="search" style="display:none">
- <tr>
- <td>&nbsp;&nbsp;</td>
- <td align="left" valign="top" height="1">
- <form onsubmit="return do_search(input.value);"
- class="html-wtoc-search-form"
- >
- <input id="input" size="14"
- ><input type="image" name="Search" value="Search"
- title="Search"
- src="img/search.gif"
- align="top"
- >
- </td>
- </form>
- </tr>
- <tr valign="top">
- <td>&nbsp;&nbsp;</td>
- <td id="hits" valign="top">
- </td>
- </tr>
- <tr>
- <td>&nbsp;&nbsp;</td>
- <td valign="bottom">
-
- <a href="javascript:hide_search()" xstyle="font-size: 8pt"
- title="Show Menu"
- ><img src="img/nosearch.gif" border=0 align="left"></a>
- <a href="javascript:hide_search()"
- title="Show Menu"
- >Göm sökning</a>
- </td>
- </tr>
- </table>
- ];
- $page .= mk_main_table(
- $left_col,
- $main,
- $search_table,
- full_out_name($pnum),
- $pnum,
- );
- $page .= mk_noscript();
- $page .= end_html;
- $page =~ s/(\d+)\.html/javascript:ShowPage($1);/gs;
- #$page =~ s/<body(.*?)>/<body$1 onload="ShowPage(0)">/gis;
- $page =~ s/<body(.*?)>/<body$1 onload="HTML_WTOC_NS.onload_actions()">/gis;
- $page = replace_name_link($page);
- return $page;
-} # create_single_page
-
-my $abs_pos_tbl =
- qq(
- <table border="$m_bBorders" cellpadding=0 cellspacing=0
- width="100%" height=70
- bgcolor="white"
- style="
- position: absolute;
- left: 0;
- top: 0;
- "
- >
- <tr>
- <td>
- </td>
- </tr>
- </table>
- );
-
-
-##########################################################
-### Index.htm
-##########################################################
-
-# sub mk_index_page($) {
-# my $page = shift;
-# my $check_browser = qq[ //if (document.all) { navigate("single_0.html"); }\n];
-# #$page =~ s/(<script.*?>)/$1\n$check_browser/s;
-# mkdir $m_param_OutRoot, 0777;
-# my $out_file = $m_param_OutRoot . "index.htm";
-# create_file_and_path($out_file, $page);
-# }
-
-
-
-
-##########################################################
-### Links handling
-##########################################################
-
-
-sub replace_rel_link($$) {
- my ($page, $page_file) = @_;
- my $qr;
- $page =~
- s{
- (src|href)="(.*?)"
- }{
- my $src_href = $1;
- my $href = $2;
- if (!PathSubs::is_abs_path($href)) {
- $href = PathSubs::mk_absolute_link($page_file, $href);
- $href =~ tr|\\|/|;
- if (exists $js_show_page{$href}) {
- $href = "javascript:$js_show_page{$href}";
- }
- }
- qq($src_href="$href");
- }xegsm;
-
- $page;
-}
-
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/blank12.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/blank12.gif
deleted file mode 100644
index 0869f9f..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/blank12.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/down.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/down.gif
deleted file mode 100644
index 30d6ecf..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/down.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/freeCont.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/freeCont.gif
deleted file mode 100644
index 1c94b60..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/freeCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.png b/emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.png
deleted file mode 100644
index 5254ef1..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.xcf b/emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.xcf
deleted file mode 100644
index f2ce5ce..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/gnu-m-x-160.xcf
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/hideCont.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/hideCont.gif
deleted file mode 100644
index 9908895..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/hideCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/nailCont.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/nailCont.gif
deleted file mode 100644
index 4c1bca4..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/nailCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/nosearch.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/nosearch.gif
deleted file mode 100644
index e824f5b..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/nosearch.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.gif
deleted file mode 100644
index 40b7220..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.png b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.png
deleted file mode 100644
index ad6505e..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/CompFaceLogoTemp4.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/blue_left_top.png b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/blue_left_top.png
deleted file mode 100644
index e7da402..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/blue_left_top.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/close-cross.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/close-cross.gif
deleted file mode 100644
index e5cb142..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/close-cross.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue.png b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue.png
deleted file mode 100644
index d524ff1..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue1.png b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue1.png
deleted file mode 100644
index d111473..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbiinfo_and_blue1.png
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1.gif
deleted file mode 100644
index d3777ae..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1_30.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1_30.gif
deleted file mode 100644
index 1df04d4..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/lbinfo_col1_30.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/up.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/up.gif
deleted file mode 100644
index c4795d9..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/other/up.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/right.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/right.gif
deleted file mode 100644
index 2400cf1..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/right.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/search.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/search.gif
deleted file mode 100644
index 9f58dfd..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/search.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/img/showCont.gif b/emacs.d/nxhtml/nxhtml/html-wtoc/img/showCont.gif
deleted file mode 100644
index 7bd2e7d..0000000
--- a/emacs.d/nxhtml/nxhtml/html-wtoc/img/showCont.gif
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml-autoload.el b/emacs.d/nxhtml/nxhtml/nxhtml-autoload.el
deleted file mode 100644
index 48a0459..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml-autoload.el
+++ /dev/null
@@ -1,147 +0,0 @@
-;; nxhtml-autoload.el -- Autoloading of nxthml-mode
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sat Feb 11 00:06:14 2006
-;; Version: 0.51
-;; Last-Updated: 2008-02-13T01:21:14+0100 Wed
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when (load)
- (message "nxhtml-autoload starting ... (hm, should maybe be renamed ...)"))
-
-(eval-when-compile (require 'majmodpri nil t))
-(eval-when-compile (require 'moz nil t))
-
-;;; Convenient moving by tags:
-(eval-after-load 'nxml-mode
- '(progn
- (define-key nxml-mode-map [C-M-left] 'nxml-backward-element)
- (define-key nxml-mode-map [C-M-right] 'nxml-forward-element)
- (define-key nxml-mode-map [C-M-up] 'nxml-backward-up-element)
- (define-key nxml-mode-map [C-M-down] 'nxml-down-element)))
-
-;; MozLab support, for more info see moz.el
-;;(autoload 'inferior-moz-mode "moz" "MozRepl Inferior Mode" t)
-;;(autoload 'moz-minor-mode "moz" "MozRepl Minor Mode" t)
-(defun javascript-moz-setup () (moz-minor-mode 1))
-(add-hook 'javascript-mode-hook 'javascript-moz-setup)
-;;(add-hook 'js2-fl-mode-hook 'javascript-moz-setup)
-
-
-(defun nxhtml-setup-file-assoc ()
- "Setup file associations for nXhtml.
-Add nXhtml entries similar to those that are already there for
-html-mode and xml-mode.
-
-Add multi major mode entries.
-
-Finally run `majmodpri-sort-lists' to get everything in the right
-order."
- ;; Add nXhtml entries similar to those that are already there for
- ;; html-mode and xml-mode.
- (dolist (mode-list '(auto-mode-alist magic-fallback-mode-alist magic-mode-alist))
- (dolist (rec (symbol-value mode-list))
- (when (eq (cdr rec) 'html-mode)
- (add-to-list mode-list (cons (car rec) 'nxhtml-mode)))
- (when (eq (cdr rec) 'html-mode)
- (add-to-list mode-list (cons (car rec) 'nxhtml-mumamo-mode)))
- ;; (when (eq (cdr rec) 'html-mode)
- ;; (add-to-list mode-list (cons (car rec) 'html-mumamo-mode)))
- (when (eq (cdr rec) 'xml-mode)
- (add-to-list mode-list (cons (car rec) 'nxml-mode)))
- ))
-
- ;; Add multi major mode entries.
- (add-to-list 'magic-mode-alist
- '("\\(?:.\\|\n\\)\\{,500\\}xmlns:py=\"http://genshi.edgewall.org/\""
- . genshi-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.htm\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.html\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.xhtm\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.xhtml\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.html\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.htmlf\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.xhtml\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.xhtmlf\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.php\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.phtml\\'" . nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.jsp\\'" . jsp-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.gsp\\'" . gsp-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.asp\\'" . asp-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . django-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.rhtml\\'" . eruby-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.erb\\'" . eruby-javascript-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.phps\\'" . smarty-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.epl\\'" . embperl-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.ghtml\\'" . genshi-nxhtml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.mhtml\\'" . mason-nxhtml-mumamo-mode))
-
- ;; Add html-mumamo style entry if there is an nxhtml-mumamo style entry.
- (save-match-data
- (dolist (mode-list '(auto-mode-alist magic-fallback-mode-alist magic-mode-alist))
- (dolist (rec (symbol-value mode-list))
- (let* ((mode (cdr rec))
- (name (when (symbolp mode) (symbol-name mode)))
- nxmode)
- (when (and name
- (string-match "nxhtml-mumamo" name))
- (setq name (replace-regexp-in-string "nxhtml-mumamo" "html-mumamo" name t t))
- (setq nxmode (intern-soft name))
- (when nxmode
- (add-to-list mode-list (cons (car rec) nxmode))))))))
-
- (add-to-list 'auto-mode-alist '("\\.lzx\\'" . laszlo-nxml-mumamo-mode))
- (add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
- (add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
- (add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
-
- (majmodpri-sort-lists)
- ;;(message "nxhtml-autoload finished")
- )
-
-;;(defvar nxhtml-src-dir (file-name-directory (if load-file-name load-file-name buffer-file-name)))
-
-;;(eval-when (load) (nxhtml-setup-file-assoc))
-(nxhtml-setup-file-assoc)
-
-(provide 'nxhtml-autoload)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-autoload.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml-bug.el b/emacs.d/nxhtml/nxhtml/nxhtml-bug.el
deleted file mode 100644
index 5ccfd73..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml-bug.el
+++ /dev/null
@@ -1,332 +0,0 @@
-;;; nxhtml-bug.el --- Reporting nXhtml bugs
-;;
-;; Author: Lennar Borgman
-;; Maintainer:
-;; Created: Wed Mar 07 15:57:15 2007
-;; Version:
-;; Lxast-Updated: Wed Mar 07 16:00:22 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Fxeatures that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'nxhtml-menu nil t))
-
-(require 'sendmail)
-
-;;(require 'emacsbug)
-(autoload 'report-emacs-bug-info "emacsbug" "Go to the Info node on reporting Emacs bugs." t)
-
-(defvar nxhtml-report-bug-orig-text nil
- "The automatically-created initial text of bug report.")
-
-(defvar nxhtml-report-bug-no-confirmation nil
- "*If non-nil, suppress the confirmations asked for the sake of novice users.")
-
-(defvar nxhtml-report-bug-no-explanations nil
- "*If non-nil, suppress the explanations given when reporting bugs.")
-
-;; (defvar nxhtml-bug-launchpad-mode-map
-;; (let ((map (make-sparse-keymap)))
-;; (define-key map [(control ?c) (control ?c)] 'nxhtml-bug-maybe-to-launchpad)
-;; map))
-
-;; (define-minor-mode nxhtml-bug-launchpad-mode
-;; "Changes C-c C-c to ask to report on Launchpad."
-;; nil
-;; :keymap 'nxhtml-bug-launchpad-mode-map
-;; nil)
-
-;; (defun nxhtml-bug-maybe-to-launchpad ()
-;; (interactive)
-;; (if (y-or-n-p "Do you want to report bug on Launchad (preferred): ")
-;; (browse-url "https://bugs.launchpad.net/nxhtml")
-;; (mail-send-and-exit)))
-
-;;;###autoload
-(defun nxhtml-report-bug ()
- "Report a bug in nXhtml."
- (interactive)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'nxhtml-report-bug) (interactive-p))
- (with-current-buffer (help-buffer)
- (let ((here (point)))
- (insert
- "A lot of things can interfere with nXhtml/MuMaMo to cause bugs.\n"
- "Therefore when reporting a bug please try to describe\n"
- "how to show it without your own Emacs initializations.\n"
- "To do that start from")
- (fill-region here (point))
- (insert "\n\n M-x `emacs-Q-nxhtml'\n\n")
- (setq here (point))
- (insert
- "If you want to find out if your initialization files interfere\n"
- "then you can try the both test commands `nxhtmltest-run' and\n"
- "`nxhtmltest-run-Q' and see if there is any difference.\n\n")
- (fill-region here (point))
- (setq here (point))
- (insert
- "You may also want to look at the installation part of the ")
- (insert-text-button "The Quick Guide"
- 'action (lambda (btn)
- (browse-url
- (concat
- (nxhtml-docfile-url)
- "#qg"))))
- (insert " or the file ")
- (insert-text-button
- "nxhtml/readme.txt"
- 'action (lambda (btn)
- (find-file-other-window
- (expand-file-name "../readme.txt"
- (file-name-directory
- (symbol-file 'nxhtml-report-bug))))))
- (insert ".\n\n")
- (fill-region here (point))
- (setq here (point))
- (insert
- "If you know Emacs lisp and are reporting a bug it would be nice "
- "if you wrote a new unit test case.\n"
- "Please see the file ")
- (insert-text-button "nxhtmltest-suites.el"
- 'help-echo "Visit file"
- 'action (lambda (button)
- (find-file (symbol-file 'nxhtmltest-run))))
- (insert " for examples.\n\n")
- (fill-region here (point))
- (setq here (point))
- (insert
- "There are several ways to report a bug, use the links below:\n"
- "- By visiting URL `https://bugs.launchpad.net/nxhtml'.\n")
- (setq here (point))
- (insert
- "- By ")
- (insert-text-button "email to Launchpad"
- 'help-echo "Send email to Launchpad bug system"
- 'action (lambda (button)
- (call-interactively
- 'nxhtml-report-bug-by-mail)))
- (insert
- ".\n")
- (insert
- " This requires PGP signing the email\n"
- " and that you have told your PGP key to Launchpad.\n")
- (fill-region here (point))
- (setq here (point))
- (insert
- "- The above ways are best since the bug get into the database,\n"
- " and it is easy to communicate about it, but if they does\n"
- " not work for you please go to \n"
- " URL `http://www.emacswiki.org/cgi-bin/wiki/NxhtmlMode'.\n")
- (fill-region here (point))
- (setq here (point))
- )
- (with-no-warnings (print-help-return-message)))))
-
-(defun nxhtml-report-bug-by-mail (topic)
- "Report a bug by mail.
-Prompts for bug subject. Leaves you in an Emacs mail
-buffer. However when you send the bug your normal mail client
-will take over the job (with your help)."
- (interactive (list (read-string "nXhtml Bug Subject: ")))
- ;; If there are four numbers in emacs-version, this is a pretest
- ;; version.
- (require 'nxhtml-menu)
- (let* ((pretest-p (string-match "\\..*\\..*\\." emacs-version))
- (from-buffer (current-buffer))
- ;;(reporting-address "lennart.borgman@gmail.com")
- ;;(reporting-address "emacs-nxml-mode@yahoogroups.com")
- (reporting-address "new@bugs.launchpad.net")
- ;; Put these properties on semantically-void text.
- (prompt-properties '(field nxhtml-bug-prompt
- intangible but-helpful
- rear-nonsticky t))
- user-point message-end-point)
- (setq message-end-point
- (with-current-buffer (get-buffer-create "*Messages*")
- (point-max-marker)))
- (compose-mail reporting-address
- topic)
- ;; The rest of this does not execute
- ;; if the user was asked to confirm and said no.
- (rfc822-goto-eoh)
- (forward-line 1)
-
- (let ((signature (buffer-substring (point) (point-max))))
- (delete-region (point) (point-max))
- (insert signature)
- (backward-char (length signature)))
- ;;(nxhtml-bug-launchpad-mode 1)
- (insert
- "\nThis is a bug report for nXhtml mode.\n")
- (unless nxhtml-report-bug-no-explanations
- ;; Insert warnings for novice users.
- (when (string-match "nxml-mode" reporting-address)
- (insert "This bug report will be sent to the nXhtml maintainers,\n")
- (let ((pos (point)))
- (insert "not to your local site managers!\n")
- (put-text-property pos (point) 'face 'highlight)))
- (insert "\nPlease write in ")
- (let ((pos (point)))
- (insert "English")
- (put-text-property pos (point) 'face 'highlight))
- (insert " if possible, because the nXhtml maintainers
-usually do not have translators to read other languages for them.\n\n")
- )
- (insert "Please describe exactly what actions triggered the bug\n"
- "and the precise symptoms of the bug, preferrably starting\n"
- "from `M-x emacs-Q-nxhtml'\n"
- "(it may also be helpful to include an *EXAMPLE FILE*!).\n\n")
- (add-text-properties (point) (save-excursion (mail-text) (point))
- prompt-properties)
-
- (setq user-point (point))
- (insert "\n\n")
-
- (insert "\n\nnXhtml version " nxhtml-menu:version ", " (emacs-version) "\n\n")
- (insert (format "Major mode: %s\n"
- (buffer-local-value 'mode-name from-buffer)))
- (insert "\n")
- (insert "Minor modes in effect:\n")
- (dolist (mode minor-mode-list)
- (and (boundp mode) (buffer-local-value mode from-buffer)
- (insert (format " %s: %s\n" mode
- (buffer-local-value mode from-buffer)))))
- (insert "\n")
- (let ((message-buf (get-buffer "*Messages*")))
- (if message-buf
- (let (beg-pos
- (end-pos message-end-point))
- (with-current-buffer message-buf
- (goto-char end-pos)
- (forward-line -10)
- (setq beg-pos (point)))
- (insert "\n\nRecent messages:\n")
- (insert-buffer-substring message-buf beg-pos end-pos))))
- ;; This is so the user has to type something
- ;; in order to send easily.
- (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
- (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info)
- (unless nxhtml-report-bug-no-explanations
- (with-output-to-temp-buffer "*Bug Help*"
- (if (eq mail-user-agent 'sendmail-user-agent)
- (princ (substitute-command-keys
- "Type \\[mail-send-and-exit] to send the bug report.\n")))
- (princ (substitute-command-keys
- "Type \\[kill-buffer] RET to cancel (don't send it).\n"))
- (terpri)
- (princ (substitute-command-keys
- "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
-about when and how to write a bug report,
-and what information to supply so that the bug can be fixed.
-
-When there type SPC to scroll through this section and its subsections.
-
-Please notice that you are now reporting a bug for nXhtml, not
-Emacs itself, so everyting in that manual section might not
-apply."))))
- ;; Make it less likely people will send empty messages.
- (make-local-variable 'mail-send-hook)
- (add-hook 'mail-send-hook 'nxhtml-report-bug-hook)
- (save-excursion
- (goto-char (point-max))
- (skip-chars-backward " \t\n")
- (make-local-variable 'nxhtml-report-bug-orig-text)
- (setq nxhtml-report-bug-orig-text (buffer-substring (point-min) (point))))
- (goto-char user-point)))
-
-
-(defun nxhtml-report-bug-hook ()
- (save-excursion
- (save-excursion
- (goto-char (point-max))
- (skip-chars-backward " \t\n")
- (if (and (= (- (point) (point-min))
- (length nxhtml-report-bug-orig-text))
- (equal (buffer-substring (point-min) (point))
- nxhtml-report-bug-orig-text))
- (error "No text entered in bug report")))
-
- ;; Check the buffer contents and reject non-English letters.
- (save-excursion
- (goto-char (point-min))
- (skip-chars-forward "\0-\177")
- (if (not (eobp))
- (if (or nxhtml-report-bug-no-confirmation
- (y-or-n-p "Convert non-ASCII letters to hexadecimal? "))
- (while (progn (skip-chars-forward "\0-\177")
- (not (eobp)))
- (let ((ch (following-char)))
- (delete-char 1)
- (insert (format "=%02x" ch)))))))
-
- ;; The last warning for novice users.
- (if (or nxhtml-report-bug-no-confirmation
- (yes-or-no-p
- "Send this bug report to the nXhtml maintainers? "))
- ;; Just send the current mail.
- nil
- (goto-char (point-min))
- (if (search-forward "To: ")
- (let ((pos (point)))
- (end-of-line)
- (delete-region pos (point))))
- (kill-local-variable 'mail-send-hook)
- (with-output-to-temp-buffer "*Bug Help*"
- (princ (substitute-command-keys "\
-You invoked the command nxhtml-report-bug,
-but you decided not to mail the bug report to the nXhtml maintainer.
-
-If you want to mail it to someone else instead,
-please insert the proper e-mail address after \"To: \",
-and send the mail again using \\[mail-send-and-exit].")))
- (error "M-x nxhtml-report-bug was cancelled, please read *Bug Help* buffer"))
-
- ;; Unclutter
- (mail-text)
- (insert
- "Next line tells Launchpad bug system what this is. Don't change it!\n"
- " affects nxhtml\n\n")
- (mail-text)
- (let ((pos (1- (point))))
- (while (setq pos (text-property-any pos (point-max)
- 'field 'nxhtml-bug-prompt))
- (delete-region pos (field-end (1+ pos)))))))
-
-(provide 'nxhtml-bug)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-bug.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml-menu.el b/emacs.d/nxhtml/nxhtml/nxhtml-menu.el
deleted file mode 100644
index 09c7f4b..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml-menu.el
+++ /dev/null
@@ -1,1658 +0,0 @@
-;;; nxhtml-menu.el --- Defines menus for nXhtml
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sat Apr 21 2007
-;; Moved version to autostart.el.
-;; Last-Updated: 2010-01-04 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Menus for nXhtml to be used in different major modes.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'cus-edit))
-(eval-when-compile (require 'dired))
-(eval-when-compile (require 'gimpedit nil t))
-(eval-when-compile (require 'html-site nil t))
-(eval-when-compile (when (fboundp 'nxml-mode) (require 'nxhtml-mode nil t)))
-(eval-when-compile (require 'css-color nil t))
-(eval-when-compile (require 'flymake))
-;;(eval-when-compile (require 'flymake-php))
-(eval-when-compile (require 'flymake-js nil t))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'nxhtml-base))
-(eval-when-compile (require 'udev-ecb nil t))
-;;(eval-when-compile (require 'udev-cedet))
-(eval-when-compile (require 'udev-rinari nil t))
-
-(defun nxhtml-nxhtml-in-buffer ()
- (or (derived-mode-p 'nxhtml-mode)
- (when (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'nxhtml-mode)))))
-
-(defun nxhtml-nxml-in-buffer ()
- (or (derived-mode-p 'nxml-mode)
- (when (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'nxml-mode)))))
-
-(defun nxhtml-html-in-buffer ()
- (or (derived-mode-p 'html-mode)
- (when (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'html-mode)))
- (nxhtml-nxhtml-in-buffer)))
-
-(defun nxhtml-nxml-html-in-buffer ()
- (or (derived-mode-p 'html-mode)
- (when (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'html-mode)))
- (nxhtml-nxml-in-buffer)))
-
-(defun buffer-or-dired-file-name ()
- "Return buffer file name or file pointed to in dired."
- (if (derived-mode-p 'dired-mode)
- (dired-get-file-for-visit)
- buffer-file-name))
-
-(defun nxhtml-this-file-can-have-toc (&optional file)
- (unless file
- (setq file (buffer-or-dired-file-name)))
- (and (nxhtml-buffer-possibly-local-viewable file)
- (html-site-current-merge-dir)
- (html-site-current-ensure-file-in-site file)))
-
-(defun nxhtml-buffer-possibly-local-viewable (&optional file)
- (unless file
- (setq file (buffer-or-dired-file-name)))
- (or (and file
- (member (file-name-extension file)
- '("html" "htm" "gif" "png")))))
-
-(defun nxhtml-buffer-possibly-remote-viewable ()
- ;; Fix-me
- (let* ((fmt "nxhtml-buffer-possibly-remote-viewable.dgffv: %s")
- (file (or buffer-file-name
- (and (derived-mode-p 'dired-mode)
- (condition-case err
- (dired-get-file-for-visit)
- (error
- (message fmt (error-message-string err))
- nil))))))
- (and (featurep 'html-upl)
- file
- (member (downcase (file-name-extension file))
- '("html" "htm" "gif" "png" "pl" "php")))))
-
-;; (nxhtml-insert-menu-dynamically 'temp)
-(defun nxhtml-insert-menu-dynamically (real-binding)
- (or (and (symbolp real-binding)
- (boundp real-binding)
- (symbol-value real-binding))
- (let ((map (make-sparse-keymap "Not loaded yet")))
- (define-key map [dummy]
- (list 'menu-item "Not loaded yet" 'ignore))
- map)
- ;; (easy-menu-filter-return
- ;; (easy-menu-create-menu
- ;; "Not ready"
- ;; '(["Not Loaded Yet" ignore t])))
- ))
-
-(defun nxhtml-menu-image-file ()
- (or (get-char-property (point) 'image-file)
- buffer-file-name))
-
-(defun nxhtml-gimp-can-edit ()
- (or (not (featurep 'gimp))
- (gimpedit-can-edit (nxhtml-menu-image-file))))
-
-;;;###autoload
-(defun nxhtml-edit-with-gimp ()
- "Edit with GIMP buffer or file at point."
- (interactive)
- (gimpedit-edit-file (nxhtml-menu-image-file)))
-
-;;;###autoload
-(defun nxhtml-browse-file (file)
- "View file in web browser."
- (interactive (list
- (or (buffer-or-dired-file-name)
- (read-file-name "File: "))))
- (let* ((buf (if (buffer-file-name)
- (current-buffer)
- (find-buffer-visiting file)))
- (use-temp (and (buffer-file-name)
- (or (and (boundp 'nxhtml-current-validation-header)
- nxhtml-current-validation-header)
- (buffer-modified-p)
- (not buffer-file-name)
- (not (file-exists-p buffer-file-name)))))
- (file-to-browse file))
- (when use-temp
- (setq file-to-browse (nxhtml-save-browseable-temp-file nil nil use-temp)))
- ;; Fix-me: Workaround for Emacs bug on w32
- ;; http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4015
- (if (eq system-type 'windows-nt)
- (w32-shell-execute nil (concat "file:///" file-to-browse) nil 1)
- (browse-url-of-file file-to-browse))
- ))
-
-;;;###autoload
-(defun nxhtml-browse-region ()
- "View region in web browser."
- (interactive)
- (unless mark-active
- (error "The region is not active"))
- (browse-url (nxhtml-save-browseable-temp-file (region-beginning) (region-end))))
-
-;;(defvar nxhtml-browseable-buffer-name "*nXhtml Browsing Buffer*")
-(defvar nxhtml-browseable-buffer-file "~/.temp-nxhtml-browse.htm")
-;; Fix-me: Handle base href here!
-(defun nxhtml-save-browseable-temp-file (start end &optional doit-anyway)
- "Return a temporary file for viewing in web browser."
- ;; When using this either region should be active or there should be
- ;; a validation header or both.
- (or doit-anyway
- (and start end) ;mark-active
- (and (boundp 'nxhtml-validation-header-mode)
- nxhtml-validation-header-mode
- nxhtml-current-validation-header)
- (error "Neither region nor validation header"))
- (save-excursion
- (let ((curbuf (current-buffer))
- (view-buffer (find-file-noselect nxhtml-browseable-buffer-file))
- header
- content)
- ;; Get header and content
- (save-restriction
- (widen)
- (setq header
- (if nxhtml-validation-header-mode
- (let* ((key nxhtml-current-validation-header)
- (rec (unless (listp key)
- (assoc key nxhtml-validation-headers)))
- (header (cdr rec)))
- header)
- (if (and doit-anyway (not start))
- ""
- (goto-char (point-min))
- (save-match-data
- (let ((body (re-search-forward "<body[^>]*>")))
- (if body
- (buffer-substring-no-properties (point-min) (match-end 0))
- ""))))))
- (setq content
- (if start
- (buffer-substring-no-properties start end)
- (buffer-substring-no-properties (point-min) (point-max))))
- )
- ;; Switch to view buffer
- (set-buffer view-buffer)
- ;; (unless buffer-file-name
- ;; (set-visited-file-name nxhtml-browseable-buffer-file)
- ;; (rename-buffer nxhtml-valhead-view-buffer-name))
- (erase-buffer)
- (insert header content)
- ;;(when (fboundp 'emacsw32-eol-set) (emacsw32-eol-set nil))
- (nxhtml-mode)
- (save-buffer)
- ;;(current-buffer)
- (kill-buffer view-buffer)
- (expand-file-name nxhtml-browseable-buffer-file)
- )))
-
-
-
-(defvar nxhtml-menu-mode-menu-map
- (let ((map (make-sparse-keymap "nxhtml-menu-mode-menu")))
-
- (let ((help-map (make-sparse-keymap)))
- (define-key help-map [emacs-Q-nxhtml]
- (list 'menu-item "Start 'emacs -Q' and load nXhtml" 'emacs-Q-nxhtml))
- (define-key help-map [nxhtmltest-run]
- (list 'menu-item "Run nXhtml Tests in Current Emacs" 'nxhtmltest-run))
- (define-key help-map [nxhtmltest-run-Q]
- (list 'menu-item "Run nXhtml Tests in a Fresh Emacs" 'nxhtmltest-run-Q))
- (define-key help-map [nxhtml-report-bug]
- (list 'menu-item "Report a Bug in nXhtml ..." 'nxhtml-report-bug))
- (define-key help-map [nxhtml-help-separator2] (list 'menu-item "--"))
- (define-key help-map [nxhtml-byte-compile-nxhtml]
- (list 'menu-item "Byte Compile nXhtml" 'nxhtmlmaint-start-byte-compilation))
- ;; Downloads
- (let ((download-map (make-sparse-keymap)))
- (define-key help-map [nxhtml-downloading]
- (list 'menu-item "Download nXhtml Updates" download-map))
- (define-key download-map [nxhtml-web-download-log]
- (list 'menu-item "View Download Log" 'web-vcs-log-edit))
- (define-key download-map [nxhtml-view-dl-log-separator]
- (list 'menu-item "--" nil))
- (define-key download-map [nxhtml-web-auto-download]
- (list 'menu-item "Auto download from Devel Sources"
- 'nxhtml-autoload-web
- :button '(:toggle . (and (boundp 'nxhtml-autoload-web)
- nxhtml-autoload-web))))
- (define-key download-map [nxhtml-web-download]
- (list 'menu-item "Update nXhtml (from devel sources)" 'nxhtml-update-existing-files))
- )
- (define-key help-map [nxhtml-features-check]
- (list 'menu-item "Check Optional Features" 'nxhtml-features-check))
- (define-key help-map [nxhtml-list-multi-modes]
- (list 'menu-item "List Available Multi Major Modes" 'mumamo-list-defined-multi-major-modes))
- (define-key help-map [nxhtml-customize]
- (list 'menu-item "Customize nXhtml ..." 'nxhtml-customize))
-;;; (define-key help-map [nxhtml-quick-customize]
-;;; (list 'menu-item "Quick Customize nXhtml ..." 'nxhtml-quick-customize))
- (define-key help-map [nxhtml-help-separator3] (list 'menu-item "--"))
-;;; (define-key help-map [nxhtml-help]
-;;; (list 'menu-item "nXhtml Help" 'nxhtml-help))
- (define-key help-map [nxhtml-tutorials]
- (list 'menu-item "nXhtml Tutorials" 'nxhtml-tutorials))
- (define-key help-map [nxhtml-overview]
- (list 'menu-item (concat "nXhtml Version "
- (if (boundp 'nxhtml-menu:version)
- nxhtml-menu:version
- "(unknown)")
- " Overview")
- 'nxhtml-overview))
- (define-key help-map [nxhtml-welcome]
- (list 'menu-item "Welcome to nXhtml" 'nxhtml-welcome))
- (define-key map [nxhtml-help-map]
- (list 'menu-item "nXhtml Help and Setup" help-map))
- (define-key map [nxhtml-info-separator] (list 'menu-item "--"))
- )
-
-
-
-
- (let ((tools-map (make-sparse-keymap)))
- (define-key map [nxhtml-tools-map]
- (list 'menu-item "Tools" tools-map))
- (define-key tools-map [nxhtml-last-resort]
- (list 'menu-item "Last Resort" 'n-back-game))
- (define-key tools-map [nxhtml-pause]
- (list 'menu-item "Life Reminder" 'pause-start-in-new-emacs))
- (define-key tools-map [nxhtml-last-resort-separator]
- (list 'menu-item "--" nil))
- (define-key tools-map [nxhtml-viper-tut]
- (list 'menu-item "Viper Try-Out Tutorial"
- 'viper-tutorial))
- (define-key tools-map [nxhtml-viper-separator]
- (list 'menu-item "--" nil))
- ;;(define-key tools-map [nxhtml-frame-win-separator] (list 'menu-item "--" nil))
- (define-key tools-map [nxhtml-resize-windows]
- (list 'menu-item "Resize Windows"
- 'resize-windows))
-
-
-
- (define-key tools-map [nxhtml-ecb-separator]
- (list 'menu-item "--" nil))
-
-
- (let ((ecb-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-ecb-map]
- (list 'menu-item "ECB" ecb-map))
- (define-key ecb-map [nxhtml-custom-important-ecb]
- (list 'menu-item "Customize important ECB things"
- (lambda ()
- "Customize group `ecb-most-important'."
- (interactive)
- (customize-group-other-window 'ecb-most-important))
- :enable '(featurep 'ecb)))
- (define-key ecb-map [nxhtml-ecb-mode]
- (list 'menu-item "ECB Minor Mode"
- 'ecb-minor-mode
- :button '(:toggle . (and (boundp 'ecb-minor-mode)
- ecb-minor-mode))
- :enable '(boundp 'ecb-minor-mode)))
- (define-key ecb-map [nxhtml-ecb-show-help]
- (list 'menu-item "ECB Help"
- 'ecb-show-help
- :enable '(fboundp 'ecb-show-help)))
- (define-key ecb-map [nxhtml-ecb-custom-separator]
- (list 'menu-item "--" nil))
- (define-key ecb-map [nxhtml-custom-ecb]
- (list 'menu-item "Customize ECB dev startup from nXhtml"
- 'udev-ecb-customize-startup))
- (define-key ecb-map [nxhtml-update-ecb]
- (list 'menu-item "Fetch/update ECB dev sources"
- 'udev-ecb-update))
- (define-key ecb-map [nxhtml-ecb-home-separator]
- (list 'menu-item "--" nil))
- (define-key ecb-map [nxhtml-rinari-homepage]
- (list 'menu-item "ECB Home Page"
- (lambda ()
- "Open ECB home page in your web browser."
- (interactive)
- (browse-url "http://ecb.sourceforge.net/"))))
- )
-
-
- ;; (let ((cedet-map (make-sparse-keymap)))
- ;; (define-key tools-map [nxhtml-cedet-map]
- ;; (list 'menu-item "CEDET" cedet-map))
- ;; (define-key cedet-map [nxhtml-custom-cedet]
- ;; (list 'menu-item "Customize CEDET dev startup from nXhtml"
- ;; 'udev-cedet-customize-startup))
- ;; (define-key cedet-map [nxhtml-cedet-utest]
- ;; (list 'menu-item "Run CEDET unit tests"
- ;; 'udev-cedet-utest))
- ;; (define-key cedet-map [nxhtml-update-cedet]
- ;; (list 'menu-item "Fetch/update and install CEDET dev sources"
- ;; 'udev-cedet-update))
- ;; (define-key cedet-map [nxhtml-cedet-home-separator]
- ;; (list 'menu-item "--" nil))
- ;; (define-key cedet-map [nxhtml-rinari-homepage]
- ;; (list 'menu-item "CEDET Home Page"
- ;; (lambda ()
- ;; "Open CEDET home page in your web browser."
- ;; (interactive)
- ;; (browse-url "http://cedet.sourceforge.net/"))))
- ;; )
-
-
- (let ((rinari-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-rinari-map]
- (list 'menu-item "Rinari" rinari-map))
- (define-key rinari-map [nxhtml-custom-rinari]
- (list 'menu-item "Customize Rinari startup from nXhtml"
- (lambda ()
- "Customize Rinari dev nXhtml startup options."
- (interactive)
- (customize-group-other-window 'udev-rinari))))
- (define-key rinari-map [nxhtml-update-rinari]
- (list 'menu-item "Fetch/update Rinari dev sources"
- 'udev-rinari-update))
- (define-key rinari-map [nxhtml-rinari-home-separator]
- (list 'menu-item "--" nil))
- (define-key rinari-map [nxhtml-rinari-homepage]
- (list 'menu-item "Rinari Home Page"
- (lambda ()
- "Open Rinari home page in your web browser."
- (interactive)
- (browse-url "http://rubyforge.org/projects/rinari/"))))
- )
- (let ((mozrepl-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-mozrepl-map]
- (list 'menu-item "MozRepl - control Firefox" mozrepl-map))
-
- (let ((mozrepl-low-map (make-sparse-keymap)))
- (define-key mozrepl-map [nxhtml-mozrepl-map]
- (list 'menu-item "MozRepl Basic Functions" mozrepl-low-map))
- (define-key mozrepl-low-map [nxhtml-mozrepl-run-mozilla]
- (list 'menu-item "Display/Start MozRepl Process" 'run-mozilla
- :enable '(fboundp 'moz-minor-mode)))
- (define-key mozrepl-low-map [nxhtml-mozrepl-separator1]
- (list 'menu-item "--" nil))
- (define-key mozrepl-low-map [nxhtml-mozrepl-save-and-send]
- (list 'menu-item "Save Buffer and Send it" 'moz-save-buffer-and-send
- :enable '(or (not (boundp 'mumamo-multi-major-mode))
- (not mumamo-multi-major-mode))))
- (define-key mozrepl-low-map [nxhtml-mozrepl-send-defun-and-go]
- (list 'menu-item "Send Current Function, Go to MozRepl"
- 'moz-send-defun-and-go
- :enable '(and (boundp 'moz-minor-mode) moz-minor-mode)))
- (define-key mozrepl-low-map [nxhtml-mozrepl-send-defun]
- (list 'menu-item "Send Current Function" 'moz-send-defun
- :enable '(and (boundp 'moz-minor-mode) moz-minor-mode)))
- (define-key mozrepl-low-map [nxhtml-mozrepl-send-region]
- (list 'menu-item "Send the Region" 'moz-send-region
- :enable '(and mark-active
- (boundp 'moz-minor-mode) moz-minor-mode))))
-
- (define-key mozrepl-map [nxhtml-mozrepl-separator2]
- (list 'menu-item "--" nil))
- (define-key mozrepl-map [nxhtml-mozrepl-refresh]
- (list 'menu-item "Refresh Firefox on Save" 'mozadd-refresh-edited-on-save-mode
- :button '(:toggle . (and (boundp 'mozadd-refresh-edited-on-save-mode)
- mozadd-refresh-edited-on-save-mode))))
- (define-key mozrepl-map [nxhtml-mozrepl-mirror]
- (list 'menu-item "Mirror Buffer in Firefox" 'mozadd-mirror-mode
- :button '(:toggle . (and (boundp 'mozadd-mirror-mode)
- mozadd-mirror-mode))))
- (define-key mozrepl-map [nxhtml-mozrepl-separator3]
- (list 'menu-item "--" nil))
- (define-key mozrepl-map [nxhtml-mozrepl-home-page]
- (list 'menu-item "MozLab/MozRepl Home Page"
- (lambda ()
- "Open MozLab/MozRepl home page in your web browser."
- (interactive)
- (browse-url "http://hyperstruct.net/projects/mozlab"))))
- )
-
- (define-key tools-map [nxhtml-ediff-url]
- (list 'menu-item "Compare download file" 'ediff-url))
- (define-key tools-map [nxhtml-investigate-elisp]
- (list 'menu-item "Investigate Elisp File" 'web-vcs-investigate-elisp-file))
-
- (define-key tools-map [nxhtml-tidy-separator]
- (list 'menu-item "--" nil))
- (define-key tools-map [nxhtml-flymake]
- (list 'menu-item "Flymake Mode" 'flymake-mode
- :button '(:toggle . (and (boundp 'flymake-mode)
- flymake-mode))
- :enable '(and buffer-file-name
- (require 'flymake)
- (fboundp 'flymake-get-init-function)
- (flymake-get-init-function buffer-file-name)
- )))
- (let ((flyspell-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-flyspell-map]
- (list 'menu-item "Flyspell" flyspell-map))
- (define-key flyspell-map [nxhtml-flyspell-goto-next]
- (list 'menu-item "Flyspell Go To Next Error" 'flyspell-goto-next-error
- :enable 'flyspell-mode))
- (define-key flyspell-map [nxhtml-flyspell-region]
- (list 'menu-item "Flyspell Region" 'flyspell-region
- :enable 'flyspell-mode))
- (define-key flyspell-map [nxhtml-flyspell-div-1]
- (list 'menu-item "--"))
- (define-key flyspell-map [nxhtml-flyspell]
- (list 'menu-item "Flyspell Mode" 'flyspell-mode
- :button '(:toggle . (and (boundp 'flyspell-mode)
- flyspell-mode))))
- )
- (define-key tools-map [nxhtml-flyspell-separator]
- (list 'menu-item "--"))
- (let ((img-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-img-map]
- (list 'menu-item "Images" img-map))
- (define-key img-map [nxhtml-chartg]
- (list 'menu-item "Make Chart" 'chartg-make-chart))
- (define-key img-map [nxhtml-chartg-separator] (list 'menu-item "--"))
- (define-key img-map [nxhtml-gimp-edit]
- (list 'menu-item "Edit with GIMP" 'nxhtml-edit-with-gimp
- :enable '(nxhtml-gimp-can-edit)))
- (define-key img-map [nxhtml-gimp-separator] (list 'menu-item "--"))
- (define-key img-map [nxhtml-inlimg-toggle-display]
- (list 'menu-item "Toggle Display of Image" 'inlimg-toggle-display))
- (define-key img-map [nxhtml-inlimg-toggle-slicing]
- (list 'menu-item "Toggle Slicing of Image" 'inlimg-toggle-slicing))
- (define-key img-map [nxhtml-inlimg-mode]
- (list 'menu-item "Show <img ...> Images" 'inlimg-mode
- :button '(:toggle . (and (boundp 'inlimg-mode)
- inlimg-mode)))))
- (define-key tools-map [nxhtml-img-separator]
- (list 'menu-item "--"))
- (let ((some-help-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-some-help-map]
- (list 'menu-item "Help for Item at Point" some-help-map))
- (define-key some-help-map [nxhtml-css-help]
- (list 'menu-item "CSS Help" 'xhtml-help-show-css-ref))
- (define-key some-help-map [nxhtml-tag-help]
- (list 'menu-item "XHTML Tag Help" 'nxhtml-short-tag-help)))
-
- (let ((cssclr-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-css-color]
- (list 'menu-item "Color Help" cssclr-map))
- (define-key cssclr-map [nxhtml-css-color-mode]
- (list 'menu-item "Css Color Mode" 'css-color-mode
- :enable '(and font-lock-mode
- ;; (or (not (boundp 'mumamo-multi-major-mode))
- ;; (not mumamo-multi-major-mode))
- ;; (featurep 'css-color)
- )
- :button '(:toggle . (and (boundp 'css-color-mode)
- css-color-mode))))
- (define-key cssclr-map [nxhtml-css-color-test]
- (list 'menu-item "Color Test" 'css-color-test
- ;; :enable '(featurep 'css-color)
- )))
-
- (define-key tools-map [nxhtml-help-separator]
- (list 'menu-item "--"))
-
-
- (let ((html-link-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-link-map]
- (list 'menu-item "HTML Links" html-link-map
- :enable '(nxhtml-html-in-buffer)))
-
- (define-key html-link-map [nxhtml-chklnk]
- (list 'menu-item "Check Links" 'html-chklnk-check-site-links
- :enable '(featurep 'html-chklnk)))
-
- (let ((move-map (make-sparse-keymap)))
- (define-key html-link-map [move-map]
- (list 'menu-item "Moving Files" move-map))
- (define-key move-map [html-move-buffer-file]
- (list 'menu-item "Move Buffer File" 'html-move-buffer-file
- :help "Move buffer file and update links"
- :enable '(and buffer-file-name
- (featurep 'html-move))))
- (define-key html-link-map [move-map-separator] (list 'menu-item "--"))
- )
-
-
- (define-key html-link-map [nxhtml-paste-link]
- (list 'menu-item "Paste Saved Relative Link" 'nxhtml-paste-link
- :help "Paste link"
- :enable '(and (boundp 'nxhtml-saved-link-file)
- nxhtml-saved-link-file)))
- (define-key html-link-map [nxhtml-paste-link-as-a-tag]
- (list 'menu-item "Paste Saved Relative Link as <a href=...>" 'nxhtml-paste-link-as-a-tag
- :help "Paste link as <a ...> tag"
- :enable '(and (boundp 'nxhtml-saved-link-file)
- nxhtml-saved-link-file
- (nxhtml-nxml-html-in-buffer))))
- (define-key html-link-map [nxhtml-save-link-to-here]
- (list 'menu-item "Save Relative Link to Current File" 'nxhtml-save-link-to-here
- :help "Save link info for current file"
- :enable 'buffer-file-name))
- )
-
- (let ((quick-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-quick-map]
- (list 'menu-item "Quick Inserts etc" quick-map
- :visible '(or (derived-mode-p 'html-mode)
- (nxhtml-nxhtml-in-buffer))))
- (let ((sometoc-map (make-sparse-keymap)))
- (let ((toc-map (make-sparse-keymap)))
- (define-key sometoc-map [nxhtml-toc-map]
- (list 'menu-item "For Site" toc-map
- :enable '(featurep 'html-toc)))
- (define-key toc-map [nxhtml-html-wtoc]
- (list 'menu-item "Merge Pages and TOC"
- 'html-wtoc-write-pages-with-toc
- :enable '(or (not (featurep 'html-site))
- (html-site-current-page-list))))
- (define-key toc-map [nxthml-html-toc]
- (list 'menu-item "With Frames" 'html-toc-menu-map
- :filter 'nxhtml-insert-menu-dynamically)))
- (define-key sometoc-map [nxhtml-html-pagetoc]
- (list 'menu-item "For Page" 'html-pagetoc-menu-map
- :enable (boundp 'html-pagetoc-menu-map)
- :filter 'nxhtml-insert-menu-dynamically
- ))
- (define-key quick-map [nxhtml-sometoc-map]
- (list 'menu-item "Table of Contents" sometoc-map
- :visible '(or (derived-mode-p 'html-mode)
- (nxhtml-nxhtml-in-buffer)))))
- (define-key quick-map [nxhtml-quick-sep-1]
- (list 'menu-item "--"))
- (define-key quick-map [nxhtml-spec-chars]
- (list 'menu-item "Insert special character"
- 'nxml-insert-named-char))
- (define-key quick-map [nxhtml-css-rollover]
- (list 'menu-item "Insert CSS Rollover Images"
- 'nxhtml-rollover-insert-2v)))
-
-
- (define-key tools-map [nxhtml-html-write-mode]
- (list 'menu-item "HTML Write Mode"
- 'html-write-mode
- :enable '(nxhtml-html-in-buffer)
- :button '(:toggle . (and (boundp 'html-write-mode)
- html-write-mode))))
- (define-key tools-map [nxhtml-tidy-map]
- (list 'menu-item "Tidy XHTML" 'tidy-menu-symbol
- ;; Seems like :visible is called before :filter so we
- ;; can compute things in :visible.
- :filter 'nxhtml-insert-menu-dynamically
- :visible '(or (and (or (derived-mode-p 'html-mode)
- (nxhtml-nxhtml-in-buffer))
- (fboundp 'tidy-build-menu) (tidy-build-menu))
- t)
- :enable '(and (or (derived-mode-p 'html-mode)
- (nxhtml-nxhtml-in-buffer))
- (fboundp 'tidy-build-menu) (tidy-build-menu))
- ))
- (define-key tools-map [zencoding]
- (list 'menu-item "Zen coding for HTML/CSS" 'zencoding-mode
- :button '(:toggle . (and (boundp 'zencoding-mode)
- zencoding-mode))
- :enable '(nxhtml-html-in-buffer)))
-
- (let ((where-map (make-sparse-keymap)))
- (define-key tools-map [nxml-where]
- (list 'menu-item "XML Path" where-map
- :enable '(and (fboundp 'nxml-where-mode)
- (or (derived-mode-p 'nxml-mode)
- (nxhtml-nxhtml-in-buffer)))))
- (define-key where-map [nxhtml-nxml-where-cust]
- (list 'menu-item "Customize display of XML Path"
- (lambda ()
- "Customize XML path, ie group `nxml-where'."
- (interactive)
- (customize-group-other-window 'nxml-where))))
- (define-key where-map [where-separator-2] (list 'menu-item "--"))
- (define-key where-map [nxml-where-inner]
- (list 'menu-item "Show inly inner tag" 'nxml-where-only-inner-toggle
- :enable '(boundp 'nxml-where-only-inner)
- :button '(:toggle . (and (boundp 'nxml-where-only-inner)
- nxml-where-only-inner))))
- (define-key where-map [nxml-where-id]
- (list 'menu-item "Show tag ids in path" 'nxml-where-tag+id-toggle
- :enable '(boundp 'nxml-where-tag+id)
- :button '(:toggle . (and (boundp 'nxml-where-tag+id)
- nxml-where-tag+id))))
- (define-key where-map [nxml-where-header]
- (list 'menu-item "Show XML path in header" 'nxml-where-header-toggle
- :enable '(boundp 'nxml-where-header)
- :button '(:toggle . (and (boundp 'nxml-where-header)
- 'nxml-where-header))))
- (define-key where-map [nxml-where-marks]
- (list 'menu-item "Show XML path marks" 'nxml-where-marks-toggle
- :enable '(boundp 'nxml-where-marks)
- :button '(:toggle . (and (boundp 'nxml-where-marks)
- nxml-where-marks))))
- (define-key where-map [where-separator] (list 'menu-item "--"))
- (define-key where-map [nxml-where-global-toggle]
- (list 'menu-item "Show XML path" 'nxml-where-global-mode
- :button '(:toggle . (and (boundp 'nxml-where-global-mode)
- nxml-where-global-mode))))
- (define-key where-map [nxml-where-toggle]
- (list 'menu-item "Show XML path in buffer" 'nxml-where-mode
- :button '(:toggle . (and (boundp 'nxml-where-mode)
- nxml-where-mode))))
- )
-
-
- (let ((cmpl-map (make-sparse-keymap)))
- (define-key tools-map [nxhtml-cmpl-map]
- (list 'menu-item "XHTML Completion and Validation" cmpl-map
- ;; :enable '(or (derived-mode-p 'nxml-mode) (nxhtml-nxhtml-in-buffer))
- :visible `(not (derived-mode-p 'dired-mode))
- :enable ' (or (derived-mode-p 'nxml-mode)
- (nxhtml-nxhtml-in-buffer))
- ))
- (let ((val-map (make-sparse-keymap)))
- (define-key cmpl-map [nxhtml-cmpl-val-map]
- (list 'menu-item "Validation Helpers (for php etc)" val-map
- :enable '(nxhtml-nxhtml-in-buffer)
- :visible '(nxhtml-nxml-html-in-buffer)))
-;;; (define-key val-map [nxhtml-strval-mode]
-;;; (list 'menu-item "Allow attr=\"<?php...?>\" etc"
-;;; 'nxhtml-strval-mode
-;;; :button '(:toggle . nxhtml-strval-mode)))
- (define-key val-map [mumamo-alt-php-tags]
- (list 'menu-item "Use <?php -> (?php"
- 'mumamo-alt-php-tags-mode
- :button '(:toggle . (and (boundp 'mumamo-alt-php-tags-mode)
- mumamo-alt-php-tags-mode))))
- (define-key val-map [mumamo-alt-tags-separator] (list 'menu-item "--"))
- (define-key val-map [nxhtml-toggle-warnings]
- (list 'menu-item "Hide Validation Errors"
- 'nxhtml-toggle-visible-warnings
- :button '(:toggle . (not (nxhtml-warnings-are-visible)))
- ))
- (define-key val-map [nxhtml-error-separator] (list 'menu-item "--"))
- (define-key val-map [nxhtml-remove-saved-validation-header]
- (list 'menu-item "Remove File's Fictive XHTML Validation Header"
- 'nxhtml-remove-saved-validation-header
- ;; Fix-me: maybe a better enable here?
- :enable 'nxhtml-validation-header-mode))
- (define-key val-map [nxhtml-save-validation-header]
- (list 'menu-item "Save File's Fictive XHTML Validation Header"
- 'nxhtml-save-validation-header
- :enable 'nxhtml-validation-header-mode))
- (define-key val-map [nxhtml-set-validation-header]
- (list 'menu-item "Choose Fictive XHTML Validation Header for Buffer"
- 'nxhtml-set-validation-header))
- (define-key val-map [nxhtml-update-validation-header]
- (list 'menu-item "Update Fictive XHTML Validation Header for Buffer"
- 'nxhtml-update-validation-header))
- (define-key val-map [nxhtml-use-saved-val-separator] (list 'menu-item "--"))
-;;; (let ((afic-map (make-sparse-keymap)))
-;;; (define-key val-map [nxhtml-afic-map]
-;;; (list 'menu-item "Automatic Fictive XHTML Validation Header" afic-map))
-;;; (define-key afic-map [nxhtml-validation-header-mumamo-set]
-;;; (list 'menu-item "Customize Automatic XHTML Validation Turn On"
-;;; (lambda () (interactive) (customize-option 'nxhtml-validation-header-mumamo-modes))))
-;;; (define-key afic-map [nxhtml-validation-header-mumamo]
-;;; (list 'menu-item "Turn on Fictive XHTML Validation Header with MuMaMo"
-;;; 'nxhtml-validation-header-if-mumamo-toggle
-;;; :button '(:toggle . nxhtml-validation-header-if-mumamo))))
- (define-key val-map [nxhtml-show-validation-header]
- (list 'menu-item "Display Fictive XHTML Validation Header"
- 'rngalt-display-validation-header-toggle
- :help-echo "Displays the Fictive XHTML validation header (if any) at top of buffer"
- :button '(:toggle . (and (boundp 'rngalt-display-validation-header)
- rngalt-display-validation-header))))
- (define-key val-map [nxhtml-recheck-validation-header]
- (list 'menu-item "Recheck Fictive XHTML Validation Header in Buffer"
- 'nxhtml-recheck-validation-header
- :enable 'nxhtml-validation-header-mode))
- (define-key val-map [nxhtml-validation-header-mode]
- (list 'menu-item "Use Fictive XHTML Validation Header in Buffer"
- 'nxhtml-validation-header-mode
- :button '(:toggle . (and (boundp 'nxhtml-validation-header-mode)
- nxhtml-validation-header-mode))))
- )
- (define-key cmpl-map [nxhtml-validation-separator]
- (list 'menu-item "--" nil
- :visible '(nxhtml-nxml-html-in-buffer)))
- (let ((style-map (make-sparse-keymap)))
- (define-key cmpl-map [nxhtml-cmpl-style-map]
- (list 'menu-item "Completion Style" style-map
- :visible '(nxhtml-nxml-html-in-buffer)
- :enable '(nxhtml-nxhtml-in-buffer)))
- (define-key style-map [popcmp-customize]
- (list 'menu-item "Customize Completion Style"
- (lambda () (interactive) (customize-group-other-window 'popcmp))))
- (define-key style-map [popcmp-style-div2]
- (list 'menu-item "--"))
- ;;(defun nxhtml-nxml-html-in-buffer ()
- (define-key style-map [popcmp-with-help]
- (list 'menu-item "Show Short Help Beside Alternatives"
- 'popcmp-short-help-beside-alts-toggle
- :button '(:toggle . (and (boundp 'popcmp-short-help-beside-alts)
- popcmp-short-help-beside-alts))))
- (define-key style-map [nxhtml-tag-do-also]
- (list 'menu-item "Complete Tag Extras"
- 'nxhtml-tag-do-also-toggle
- :button '(:toggle . (and (boundp 'nxhtml-tag-do-also)
- nxhtml-tag-do-also))))
- (define-key style-map [popcmp-group-alternatives]
- (list 'menu-item "Group Alternatives"
- 'popcmp-group-alternatives-toggle
- :button '(:toggle . (and (boundp 'popcmp-group-alternatives)
- popcmp-group-alternatives))))
- (define-key style-map [popcmp-style-div1]
- (list 'menu-item "--"))
- (define-key style-map [popcmp-anything-completion]
- (list 'menu-item "Anything Style Completion"
- (lambda () (interactive) (customize-set-variable 'popcmp-completion-style 'anything))
- :enable `(fboundp 'anything)
- :button `(:radio . (eq popcmp-completion-style 'anything))))
- (define-key style-map [popcmp-company-completion]
- (list 'menu-item "Company Mode Style Completion"
- (lambda () (interactive) (customize-set-variable 'popcmp-completion-style 'company-mode))
- :enable `(fboundp 'company-mode)
- :button `(:radio . (eq popcmp-completion-style 'company-mode))))
- (define-key style-map [popcmp-emacs-completion]
- (list 'menu-item "Emacs Default Style Completion"
- (lambda () (interactive) (customize-set-variable 'popcmp-completion-style 'emacs-default))
- :button `(:radio . (eq popcmp-completion-style 'emacs-default))))
- (define-key style-map [popcmp-popup-completion]
- (list 'menu-item "Popup Style Completion"
- (lambda () (interactive) (customize-set-variable 'popcmp-completion-style 'popcmp-popup))
- :button `(:radio . (eq popcmp-completion-style 'popcmp-popup))))
- )
- (define-key cmpl-map [nxhtml-cmpl-separator]
- (list 'menu-item "--" nil
- :visible '(nxhtml-nxml-html-in-buffer)))
- (define-key cmpl-map [nxhtml-untag-element]
- (list 'menu-item "Untag Element" 'nxml-untag-element
- :enable '(nxhtml-nxhtml-in-buffer)
- :visible '(nxhtml-nxml-html-in-buffer)))
- (define-key cmpl-map [rngalt-finish-element]
- (list 'menu-item "Insert End Tag" 'rngalt-finish-element
- :enable '(nxhtml-nxhtml-in-buffer)
- :visible '(nxhtml-nxml-html-in-buffer)))
- (define-key cmpl-map [nxhtml-complete]
- (list 'menu-item "Complete tag, attribute etc" 'nxml-complete
- :enable '(nxhtml-nxml-in-buffer)
- :visible '(nxhtml-nxml-html-in-buffer)))
- )
-
-
- )
-
- (let ((options-map (make-sparse-keymap)))
- (define-key map [nxhtml-options-map]
- (list 'menu-item "Options" options-map))
-
- (define-key options-map [nxhtml-save-opt]
- (list 'menu-item "Save All Changed Options" 'customize-save-customized))
-
- (define-key options-map [nxhtml-save-sep] (list 'menu-item "--"))
-
- (define-key options-map [nxhtml-load-flymake]
- (list 'menu-item "Use nXhtml CSS/JS Flymake"
- 'nxhtml-flymake-setup
- :button '(:toggle . (and (boundp 'nxhtml-flymake-setup)
- nxhtml-flymake-setup))))
-
- (define-key options-map [nxhtml-save-sep] (list 'menu-item "--"))
-
- (define-key options-map [nxhtml-winsav-mode]
- (list 'menu-item "Save/restore Frames and Windows"
- 'winsav-save-mode
- :button '(:toggle . (and (boundp 'winsav-save-mode)
- winsav-save-mode))))
- (define-key options-map [nxhtml-win-sep] (list 'menu-item "--"))
- (define-key options-map [nxhtml-images-global]
- (list 'menu-item "Display Images Inline" 'inlimg-global-mode
- :button '(:toggle . (and (boundp 'inlimg-global-mode)
- inlimg-global-mode))))
- (define-key options-map [nxhtml-opt-sep] (list 'menu-item "--"))
- (define-key options-map [nxhtml-hl-needed-mode]
- (list 'menu-item "Tell Me Where I Am" 'hl-needed-mode
- :button '(:toggle . (and (boundp 'hl-needed-mode)
- hl-needed-mode))))
- (define-key options-map [nxhtml-mark-nonascii]
- (list 'menu-item "Mark Special Chars (default non-IDN)" 'markchars-global-mode
- :button '(:toggle . (and (boundp 'markchars-global-mode)
- markchars-global-mode))))
- (define-key options-map [nxhtml-sml-modeline-mode]
- (list 'menu-item "Mode Line Scroll Indicator" 'sml-modeline-mode
- :button '(:toggle . (and (boundp 'sml-modeline-mode)
- sml-modeline-mode))))
- (define-key options-map [rebind-keys]
- (list 'menu-item "Rebind My Choosen Keys" 'rebind-keys-mode
- :button '(:toggle . (and (boundp 'rebind-keys-mode)
- rebind-keys-mode))))
- (define-key options-map [nxhtml-appmenu]
- (list 'menu-item "Context Sensitive AppMenu"
- 'appmenu-mode
- :button '(:toggle . (and (boundp 'appmenu-mode)
- appmenu-mode))))
- (define-key options-map [nxhtml-menu-to-m-x]
- (list 'menu-item "Add Menu Commands to M-x history"
- 'ourcomments-M-x-menu-mode
- :button '(:toggle . (and (boundp 'ourcomments-M-x-menu-mode)
- ourcomments-M-x-menu-mode))))
- (define-key options-map [nxhtml-patch-converting]
- (list 'menu-item "Paste with Convert"
- 'ourcomments-paste-with-convert-mode
- :button '(:toggle . (and (boundp 'ourcomments-paste-with-convert-mode)
- ourcomments-paste-with-convert-mode))))
-
- (define-key options-map [nxhtml-tab-separator]
- (list 'menu-item "--" nil))
- (define-key options-map [nxhtml-ctrl-tab]
- (list 'menu-item "Ctrl-TAB Buffer Switching"
- 'ourcomments-ido-ctrl-tab
- :button '(:toggle . (and (boundp 'ourcomments-ido-ctrl-tab)
- ourcomments-ido-ctrl-tab))))
- (define-key options-map [nxhtml-tab-complete]
- (list 'menu-item "Indent and then Complete (TabKey2 mode)" 'tabkey2-mode
- :button '(:toggle . (and (boundp 'tabkey2-mode)
- tabkey2-mode))))
-
-
-
- (define-key options-map [nxhtml-majpri-separator]
- (list 'menu-item "--" nil))
- (define-key options-map [nxhtml-as-external]
- (list 'menu-item "External Editor Setup"
- 'as-external-mode
- :button '(:toggle . (and (boundp 'as-external-mode)
- as-external-mode))))
- (define-key options-map [nxhtml-sex-mode]
- (list 'menu-item "Open Files in External Apps"
- 'sex-mode
- :button '(:toggle . (and (boundp 'sex-mode)
- sex-mode))))
- (let ((majpri-map (make-sparse-keymap)))
- (define-key options-map [nxhtml-majpri-map]
- (list 'menu-item "Major Modes Priorities" majpri-map))
- (define-key majpri-map [nxhtml-majpri-act]
- (list 'menu-item "Apply Major Modes Priorities"
- 'majmodpri-apply-priorities))
- (define-key majpri-map [nxhtml-majpri-cust]
- (list 'menu-item "Customize Major Mode Priorities"
- (lambda ()
- "Customize group Major Mode priorities."
- (interactive)
- (customize-group-other-window 'majmodpri))))
- )
- )
-
- (let ((edit-map (make-sparse-keymap)))
- (define-key map [nxhtml-edit-map]
- (list 'menu-item "Edit" edit-map))
-
- (let ((folding-map (make-sparse-keymap)))
- (define-key edit-map [nxhtml-folding-map]
- (list 'menu-item "Folding" folding-map))
- (define-key folding-map [nxhtml-fold-unhide-all]
- (list 'menu-item "Unhide Everything"
- 'fold-dwim-unhide-hs-and-outline))
- (define-key folding-map [nxhtml-fold-dwim]
- (list 'menu-item "Maybe DWIM Folding"
- 'fold-dwim-toggle))
- (define-key folding-map [nxhtml-separator2] (list 'menu-item "--" nil))
- (define-key folding-map [nxhtml-hs]
- (list 'menu-item "Turn On Hide/Show and Hide"
- 'fold-dwim-turn-on-hs-and-hide))
- (define-key folding-map [nxhtml-outline]
- (list 'menu-item "Turn On Outline and Hide All"
- 'fold-dwim-turn-on-outline-and-hide-all))
- (define-key folding-map [nxhtml-separator1] (list 'menu-item "--" nil))
- (define-key folding-map [nxhtml-foldit-mode]
- (list 'menu-item "Folding Markers in Buffer"
- 'foldit-mode
- :button '(:toggle . (and (boundp 'foldit-mode)
- foldit-mode))))
- (define-key folding-map [nxhtml-foldit-global-mode]
- (list 'menu-item "Folding Markers Everywhere"
- 'foldit-global-mode
- :button '(:toggle . (and (boundp 'foldit-global-mode)
- foldit-global-mode))))
- )
-
- (define-key edit-map [nxhtml-folding-sep] (list 'menu-item "--"))
-
- (define-key edit-map [nxhtml-wrap-to-fill-column-mode]
- (list 'menu-item "Wrap To Fill Column Mode"
- 'wrap-to-fill-column-mode
- :button '(:toggle . (and (boundp 'wrap-to-fill-column-mode)
- wrap-to-fill-column-mode))))
- (define-key edit-map [nxhtml-fill-dwim]
- (list 'menu-item "Fill DWIM" 'fill-dwim))
-
- (define-key edit-map [nxhtml-fill-sep] (list 'menu-item "--"))
-
-
- (let ((link-map (make-sparse-keymap)))
- (define-key edit-map [nxhtml-link-map]
- (list 'menu-item "Links" link-map
- :enable '(not (derived-mode-p 'dired-mode))
- ))
-
- (define-key link-map [mlinks-goto-link-other-frame]
- (list 'menu-item "Follow MLink Link in New Frame" 'mlinks-goto-other-frame
- :enable '(and (boundp 'mlinks-mode)
- mlinks-mode)
- :help "Follow MLinks Link in New Frame"))
- (define-key link-map [mlinks-goto-link-other-window]
- (list 'menu-item "Follow MLink Link in Other Window" 'mlinks-goto-other-window
- :enable '(and (boundp 'mlinks-mode)
- mlinks-mode)
- :help "Follow MLinks Link in Other Window"))
- (define-key link-map [mlinks-goto-link]
- (list 'menu-item "Follow MLink Link" 'mlinks-goto
- :enable '(and (boundp 'mlinks-mode)
- mlinks-mode)
- :help "Follow MLinks Link"))
- (define-key link-map [nxhtml-separator-follow-mlink] (list 'menu-item "--"))
- (define-key link-map [mlinks-next-link]
- (list 'menu-item "Next MLink Link" 'mlinks-forward-link
- :enable '(and (boundp 'mlinks-mode)
- mlinks-mode)
- :help "Go to next MLinks link"))
- (define-key link-map [mlinks-prev-link]
- (list 'menu-item "Previous MLink Link" 'mlinks-backward-link
- :enable '(and (boundp 'mlinks-mode)
- mlinks-mode)
- :help "Go to previous MLinks link"))
-
- )
- (define-key edit-map [nxhtml-edit-sep1] (list 'menu-item "--"))
- (define-key edit-map [nxhtml-grep-replace]
- (list 'menu-item "Replace in Grepped Files" 'grep-query-replace))
- (define-key edit-map [nxhtml-rdir-replace]
- (list 'menu-item "Replace in Files in Tree" 'rdir-query-replace))
- (define-key edit-map [nxhtml-ldir-replace]
- (list 'menu-item "Replace in Files in Directory" 'ldir-query-replace))
-
- (define-key edit-map [nxhtml-edit-sep2] (list 'menu-item "--"))
- (define-key edit-map [nxhtml-multi-occur]
- (list 'menu-item "Occur in File Buffers" 'multi-occur-in-matching-buffers))
- (define-key edit-map [nxhtml-occur]
- (list 'menu-item "Occur" 'occur))
- (define-key edit-map [nxhtml-edit-sep3] (list 'menu-item "--"))
- (define-key edit-map [nxhtml-re-builder]
- (list 'menu-item "Re-Builder" 're-builder))
- (define-key edit-map [nxhtml-edit-sep4] (list 'menu-item "--"))
- (let ((copy+paste-map (make-sparse-keymap "copy+paste")))
- (define-key edit-map [nxhtml-copy+paste-map]
- (list 'menu-item "Copy+Paste" copy+paste-map))
- (define-key copy+paste-map [nxhtml-copy+paste-do]
- (list 'menu-item "Do Copy+Paste" 'ourcomments-copy+paste
- :enable '(and (boundp 'ourcomments-copy+paste-mode)
- ourcomments-copy+paste-mode)))
- (define-key copy+paste-map [nxhtml-copy+paste-set]
- (list 'menu-item "Start Copy+Paste" 'ourcomments-copy+paste-set-point
- :button '(:toggle . (and (boundp 'ourcomments-copy+paste-mode)
- ourcomments-copy+paste-mode))))
- )
- (define-key edit-map [nxhtml-anchored-transpose]
- (list 'menu-item "Transpose Regions" 'anchored-transpose
- :button '(:toggle . (and mouse-secondary-overlay
- (overlay-buffer mouse-secondary-overlay)))))
- )
-
- (define-key map [nxhtml-help-tools-separator]
- ;; Notice that removing nil below gives an error that is quite
- ;; hard to catch:
- ;;
- ;; Wrong type argument: arrayp, not
- (list 'menu-item "--" nil
- :visible `(not (derived-mode-p 'dired-mode))
- ))
-
-
- (let ((upl-map (make-sparse-keymap "html-upl")))
- (define-key map [nxhtml-upl-map]
- (list 'menu-item "File Transfer" upl-map
- ;;:enable '(featurep 'html-upl)))
- :enable '(fboundp 'html-upl-upload-file)))
- (define-key upl-map [nxhtml-upl-remote-dired]
- (list 'menu-item "Remote Dired" 'html-upl-remote-dired))
- (define-key upl-map [nxhtml-upl-dired-sep] (list 'menu-item "--"))
- (define-key upl-map [nxhtml-upl-edit-remote-wtoc]
- (list 'menu-item "Edit Remote File With TOC" 'html-upl-edit-remote-file-with-toc
- :visible '(or (not (featurep 'html-site))
- (nxhtml-this-file-can-have-toc))))
- (define-key upl-map [nxhtml-upl-edit-remote]
- (list 'menu-item "Edit Remote File" 'html-upl-edit-remote-file))
- (define-key upl-map [nxhtml-upl-ediff-file]
- (list 'menu-item "Ediff Remote/Local Files" 'html-upl-ediff-file))
- (define-key upl-map [nxhtml-upl-sep] (list 'menu-item "--"))
- (define-key upl-map [nxhtml-upl-upload-site-with-toc]
- (list 'menu-item "Upload Site with TOC" 'html-upl-upload-site-with-toc
- :visible '(or (not (featurep 'html-site))
- (and (html-site-current-merge-dir)
- (html-site-current-ensure-file-in-site file)))))
- (define-key upl-map [nxhtml-upl-upload-site]
- (list 'menu-item "Upload Site" 'html-upl-upload-site))
- (define-key upl-map [nxhtml-upl-upload-file]
- (list 'menu-item "Upload Single File" 'html-upl-upload-file))
- )
-
-
- (let ((browse-map (make-sparse-keymap)))
- (define-key map [nxhtml-browse-map]
- (list 'menu-item "Browse" browse-map
- '(or buffer-file-name
- (eq major-mode 'nxhtml-mode))
- :enable '(nxhtml-buffer-possibly-local-viewable)))
- (define-key browse-map [nxhtml-browse-region]
- (list 'menu-item "Browse the Region Only" 'nxhtml-browse-region
- :enable 'mark-active))
- (define-key browse-map [nxhtml-upl-sep3] (list 'menu-item "--"))
- (define-key browse-map [nxhtml-upl-browse-remote-wtoc]
- (list 'menu-item "Browse Uploaded File With TOC" 'html-upl-browse-remote-with-toc
- :visible '(and (nxhtml-buffer-possibly-local-viewable)
- (featurep 'html-wtoc)
- (html-site-current-merge-dir)
- (html-site-current-ensure-file-in-site file)
- (nxhtml-buffer-possibly-remote-viewable)
- )))
- (define-key browse-map [nxhtml-upl-browse-remote-frame-file]
- (list 'menu-item "Browse Uploaded Frames File" 'html-upl-browse-remote-frames
- :enable '(nxhtml-buffer-possibly-remote-viewable)))
- (define-key browse-map [nxhtml-upl-browse-remote]
- (list 'menu-item "Browse Uploaded File" 'html-upl-browse-remote
- :enable '(nxhtml-buffer-possibly-remote-viewable)))
- (define-key browse-map [nxhtml-upl-sep2]
- (list 'menu-item "--"))
- (define-key browse-map [nxhtml-browse-merged-file]
- (list 'menu-item "Browse File With TOC" 'html-wtoc-browse-page-with-toc
- :visible '(and (nxhtml-buffer-possibly-local-viewable)
- (featurep 'html-wtoc)
- (html-site-current-merge-dir)
- (html-site-current-ensure-file-in-site file)
- )))
- (define-key browse-map [nxhtml-browse-frame-file]
- (list 'menu-item "Browse Frames File" 'html-toc-browse-frames-file
- :enable '(and (featurep 'html-toc)
- (nxhtml-buffer-possibly-local-viewable))))
- (define-key browse-map [nxhtml-browse-file]
- (list 'menu-item "Browse File" 'nxhtml-browse-file
- :enable '(nxhtml-buffer-possibly-local-viewable)))
- )
-
-
-
- (let ((site-map (make-sparse-keymap)))
- (define-key map [nxhtml-site-map]
- (list 'menu-item "Site" site-map))
- (define-key site-map [html-site-global-mode]
- (list 'menu-item "HTML Site Global Mode"
- 'html-site-global-mode
- :button '(:toggle . (and (boundp 'html-site-global-mode)
- html-site-global-mode))))
- (define-key site-map [nxhtml-site-separator] (list 'menu-item "--"))
- (define-key site-map [nxhtml-customize-site-list]
- (list 'menu-item "Edit Sites" (lambda ()
- "Customize option `html-size-list'."
- (interactive)
- (customize-option-other-window 'html-site-list))))
- (define-key site-map [nxhtml-set-site]
- (list 'menu-item "Set Current Site" 'html-site-set-site))
- (define-key site-map [nxhtml-site-separator-1] (list 'menu-item "--"))
- (define-key site-map [nxhtml-dired-site-top]
- (list 'menu-item "Dired Site" 'html-site-dired-current))
- (define-key site-map [nxhtml-find-site-file]
- (list 'menu-item "Find File in Site" 'html-site-find-file))
- (define-key site-map [nxhtml-site-search-separator]
- (list 'menu-item "--" nil))
- (define-key site-map [nxhtml-replace-in-site]
- (list 'menu-item "Replace in Site Files" 'html-site-query-replace))
- (define-key site-map [nxhtml-rgrep-in-site]
- (list 'menu-item "Search Site Files" 'html-site-rgrep))
- )
-
- (define-key map [nxhtml-insert-separator]
- (list 'menu-item "--" nil
- :visible `(not (derived-mode-p 'dired-mode))
- ))
- (let ((chunk-map (make-sparse-keymap)))
- (define-key map [nxhtml-chunk-map]
- (list 'menu-item "Multi Major Modes" chunk-map
- :visible `(not (derived-mode-p 'dired-mode))
- ))
- (define-key chunk-map [nxhtml-customize-mumamo]
- (list 'menu-item "Customize MuMaMo"
- (lambda () (interactive) (customize-group-other-window 'mumamo))))
- (define-key chunk-map [nxhtml-list-mumamo]
- (list 'menu-item "List defined Multi Major Modes"
- 'mumamo-list-defined-multi-major-modes))
- (define-key chunk-map [nxhtml-chunks-separator2]
- (list 'menu-item "--" nil))
- (define-key chunk-map [nxhtml-chunk-no-colors]
- (list 'menu-item "Remove Chunk Colors Temporarily"
- 'mumamo-no-chunk-coloring
- :button '(:toggle . (and (boundp 'mumamo-no-chunk-coloring)
- mumamo-no-chunk-coloring))))
- (define-key chunk-map [nxhtml-chunk-margin-info]
- (list 'menu-item "Display Chunk Info in Margin"
- 'mumamo-margin-info-global-mode
- :button '(:toggle . (and (boundp 'mumamo-margin-info-global-mode)
- mumamo-margin-info-global-mode))))
- (define-key chunk-map [nxhtml-chunks-separator1]
- (list 'menu-item "--" nil))
- (let ((region-map (make-sparse-keymap)))
- (define-key chunk-map [nxhtml-region-map]
- (list 'menu-item "Temprary Region Chunks" region-map))
- (define-key region-map [mumamo-clear-all-regions]
- (list 'menu-item "Clear Region Chunks"
- 'mumamo-clear-all-regions
- :enable '(and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode
- (fboundp 'mumamo-clear-all-regions))))
- (define-key region-map [mumamo-clear-region]
- (list 'menu-item "Clear Region Chunk at Point"
- 'mumamo-clear-region
- :enable '(fboundp 'mumamo-clear-region)))
- (define-key region-map [nxhtml-region-separator2]
- (list 'menu-item "--" nil))
- (define-key region-map [mumamo-region-major]
- (list 'menu-item "Set Region Chunk Major Mode"
- 'mumamo-region-set-major
- :enable '(fboundp 'mumamo-region-set-major)))
- (define-key region-map [mumamo-add-region-from-string]
- (list 'menu-item "Add Region Chunk from String"
- 'mumamo-add-region-from-string))
- (define-key region-map [mumamo-add-region]
- (list 'menu-item "Add Region Chunk from Selection"
- 'mumamo-add-region)))
- (define-key chunk-map [nxhtml-region-separator]
- (list 'menu-item "--" nil))
- (define-key chunk-map [mumamo-mark-chunk]
- (list 'menu-item "Mark Chunk"
- 'mumamo-mark-chunk
- :enable '(and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)))
- (define-key chunk-map [nxhtml-separator-mark-chunk] (list 'menu-item "--"))
- (define-key chunk-map [mumamo-backward-chunk]
- (list 'menu-item "Backward Chunk"
- 'mumamo-backward-chunk
- :enable '(and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)))
- (define-key chunk-map [mumamo-forward-chunk]
- (list 'menu-item "Forward Chunk"
- 'mumamo-forward-chunk
- :enable '(and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode))))
- (let ((tag-map (make-sparse-keymap)))
- (define-key map [nxhtml-tag-map]
- (list 'menu-item "Move by Tag" tag-map
- :visible '(or (derived-mode-p 'nxml-mode)
- (derived-mode-p 'sgml-mode))
- :enable '(or (derived-mode-p 'nxml-mode)
- (nxhtml-nxhtml-in-buffer))))
- (define-key tag-map [nxml-forward-par]
- (list 'menu-item "Forward Paragraph"
- 'nxml-forward-paragraph))
- (define-key tag-map [nxml-backward-par]
- (list 'menu-item "Backward Paragraph"
- 'nxml-backward-paragraph))
- (define-key tag-map [nxml-insert-separator-move2] (list 'menu-item "--"))
- (define-key tag-map [nxml-down]
- (list 'menu-item "Forward Into Tag"
- 'nxml-down-element))
- (define-key tag-map [nxml-backward-up]
- (list 'menu-item "Backward Out of Tag"
- 'nxml-backward-up-element))
- (define-key tag-map [nxml-insert-separator-move] (list 'menu-item "--"))
- (define-key tag-map [nxml-forward]
- (list 'menu-item "Forward Balanced Tag"
- 'nxml-forward-element))
- (define-key tag-map [nxml-backward]
- (list 'menu-item "Backward Balanced Tag"
- 'nxml-backward-element))
- )
-
-
- map))
-
-(defvar nxhtml-menu-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) ?? ?x] 'nxhtml-short-tag-help)
- (define-key map [(control ?c) ?? ?c] 'xhtml-help-show-css-ref)
- (define-key map [(control ?c) ?_] 'nxhtml-toggle-visible-warnings)
- (define-key map [menu-bar nxhtml-menu-mode]
- (list 'menu-item "nXhtml" nxhtml-menu-mode-menu-map))
- map))
-
-;;;###autoload
-(define-minor-mode nxhtml-menu-mode
- "Minor mode to turn on some key and menu bindings.
-See `nxhtml-mode' for more information.
-
-This minor mode adds the entry 'nXhtml' to the menu bar. This
-submenu gives easy access to most of the important features of
-nXhtml.
-
-To see an \(incomplete) overview in html format do
-\\[nxhtml-overview].
-
-* Note: Please observe that when loading nXhtml some file
- associations are done, see `nxhtml-setup-file-assoc'.
-
-Here are some important features:
-
-- multiple major modes, see `define-mumamo-multi-major-mode'
-- easy uploading and viewing of files, see for example
- `html-upl-upload-file'
-
-- validation in XHTML part for php etc, see
- `nxhtml-validation-header-mode' (you probably also want to know
- about `nxhtml-toggle-visible-warnings' for this!)
-
-- converting of html to xhtml, see `tidy-buffer'
-
-Some smaller, useful, but easy-to-miss features:
-
-* Following links. The href and src attribute names are
- underlined and a special keymap is bound to
- them:\\<mlinks-mode-map>
-
- \\[mlinks-backward-link], \\[mlinks-forward-link] Move
- between underlined href/src attributes
-
- \\[mlinks-goto], Mouse-1 Follow link inside Emacs
- (if possible)
-
- It is even a little bit quicker when the links are in an active
- state (marked with the face `isearch'):\\<mlinks-active-hilight-keymap>
-
- \\[mlinks-backward-link], \\[mlinks-forward-link] Move
- between underlined href/src attributes
- \\[mlinks-goto], Mouse-1 Follow link inside Emacs (if possible)
-
- If the link is not into a file that you can edit (a mailto link
- for example) you will be prompted for an alternative action.
-
-* Creating links. To make it easier to create links to id/name
- attribute in different files there are two special
- functions:\\<nxhtml-mode-map>
-
- \\[nxhtml-save-link-to-here] copy link to id/name (you must
- be in the tag to get the link)
- \\[nxhtml-paste-link-as-a-tag] paste this as an a-tag.
-
-This minor mode also adds some bindings:
-
-\\{nxhtml-menu-mode-map}
-
----------
-* Note: Some of the features supported are optional and available
- only if other Emacs modules are found. Use
- \\[nxhtml-features-check] to get a list of these optional
- features and modules needed. You should however have no problem
- with this if you have followed the installation instructions
- for nXhtml."
- :keymap nxhtml-menu-mode-map
- :group 'nxhtml
- :global t
- )
-
-(defalias 'nxhtml-minor-mode 'nxhtml-menu-mode)
-(defalias 'nxhtml-global-minor-mode 'nxhtml-menu-mode)
-
-;; (defcustom nxhtml-menu-mode-modes
-;; '(
-;; nxhtml-mode
-;; nxml-mode
-;; html-mode
-;; sgml-mode
-;; xml-mode
-;; php-mode
-;; css-mode
-;; javascript-mode
-;; java-mode ;; jsp
-;; groovy-mode ;; gsp
-;; image-mode
-;; ;;
-;; dired-mode
-;; )
-;; "List for turning on `nxhtml-menu-mode'.
-;; If the buffer's major modes is any of those in this list then
-;; `nxhtml-global-minor-mode' will turn on `nxhtml-menu-mode' in
-;; the buffer."
-;; :type '(repeat (symbol :tag "Major mode"))
-;; :group 'nxhtml)
-
-;; (defun nxhtml-maybe-turn-on-minor-mode ()
-;; "Maybe turn on `nxhtml-menu-mode'.
-;; See `nxhtml-menu-mode-modes'."
-;; (nxhtml-menu-mode 1))
-;; (unless (or (minibufferp (current-buffer))
-;; (string= " " (substring (buffer-name) 0 1))
-;; (string= "*" (substring (buffer-name) 0 1))
-;; )
-;; (let ((on (and (boundp 'mumamo-multi-major-mode)
-;; mumamo-multi-major-mode)))
-;; (dolist (major nxhtml-menu-mode-modes)
-;; (when (derived-mode-p major)
-;; (setq on t)))
-;; (when on
-;; (nxhtml-menu-mode 1)))))
-
-;; (define-globalized-minor-mode nxhtml-global-minor-mode
-;; nxhtml-menu-mode
-;; nxhtml-maybe-turn-on-minor-mode
-;; ;;:require 'nxhtml-menu
-;; :group 'nxhtml)
-;;(message "nxhtml-menu:here A")
-;;(custom-reevaluate-setting 'nxhtml-global-minor-mode)
-;;(message "nxhtml-menu:here B")
-;;(when nxhtml-global-minor-mode (nxhtml-global-minor-mode 1))
-;;(message "nxhtml-menu:here C")
-
-
-;; (file-exists-p (nxhtml-docfile))
-;; (find-file (nxhtml-docfile))
-(defun nxhtml-docfile ()
- (expand-file-name "nxhtml/doc/nxhtml.html" nxhtml-install-dir))
-
-(defun nxhtml-docfile-url ()
- (let ((local-docfile (concat "file://" (nxhtml-docfile))))
- (if (and nxhtml-autoload-web
- (not (file-exists-p local-docfile)))
- "http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html"
- local-docfile)))
-
-;;;###autoload
-(defun nxhtml-overview ()
- "Show a HTML page with an overview of nXhtml."
- (interactive)
- (browse-url (nxhtml-docfile-url)))
-
-(defun nxhtml-tutorials ()
- "Show a HTML page with a list of tutorials for nXhtml'."
- (interactive)
- (browse-url "http://ourcomments.org/Emacs/nXhtml/tut/tutorials.html"))
-
-(defun nxhtml-custom-valfaced (value &optional bgcolor)
- (let ((v (if (sequencep value)
- (copy-seq value)
- value))
- (bgcolor (if bgcolor bgcolor "RGB:FF/FF/AA")))
- (put-text-property 0 (length v)
- 'face (list
- 'bold
- (cons 'background-color bgcolor)
- )
- v)
- v))
-(defun nxhtml-custom-insert-nxhtml-row (symbol nxhtml-value description)
- (let ((desc (if description
- (format "%s (%s)" description symbol)
- (format "%s" (custom-unlispify-tag-name symbol)))))
- (widget-insert " " description " (")
- (nxhtml-custom-describe-defun symbol)
- (widget-insert "): "
- (nxhtml-custom-valfaced
- (format "%s" (symbol-value symbol))
- (if (eq (symbol-value symbol)
- nxhtml-value)
- "GreenYellow"
- "gainsboro"))
- "\n")))
-
-(defun nxhtml-custom-h1(title &optional divider top-newline)
- (let ((s title))
- (put-text-property 0 (length s)
- 'face '(:weight bold
- :height 1.4
- :foreground "DarkGreen"
- ;;:underline t
- )
- s)
- (when top-newline (widget-insert "\n"))
- ;;(when divider (widget-insert (nxhtml-custom-divider (length s))))
- (widget-insert s)
- ))
-
-(defun widget-button-notify (widget &rest ignore)
- (apply (widget-get widget 'function) (widget-get widget 'data)))
-
-(defun widget-insert-link (txt function data)
- (widget-insert-button txt function data
- :button-face 'link
- :mouse-face 'highlight
- :button-prefix ""
- :button-suffix ""))
-
-(defun widget-insert-button (txt function data &rest keywords)
- (let ((btn (apply 'widget-create
- (append
- '(push-button
- :notify
- widget-button-notify)
- keywords
- (list txt)))))
- (widget-put btn 'data data)
- (widget-put btn 'function function)))
-
-(defun nxhtml-custom-url-link (txt url)
- (let ((plain-url (substring-no-properties url)))
- (unless (equal txt url)
- (put-text-property 0 (length txt) 'help-echo plain-url txt))
- (put-text-property 0 (length txt) 'mouse-face 'highlight txt)
- (widget-insert-link txt 'browse-url (list url))))
-
-(defun nxhtml-custom-describe-defun (sym &optional help)
- (let ((txt (symbol-name sym)))
- (when help
- (put-text-property 0 (length txt) 'help-echo help txt))
- (put-text-property 0 (length txt) 'mouse-face 'highlight txt)
- (widget-insert-link txt 'describe-function (list sym))))
-
-;; (defun nxhtml-quick-customize (&optional same-window)
-;; "Show page for Quick Customize of nXhtml."
-;; (interactive)
-;; (require 'nxhtml)
-;; (require 'custom)
-;; (require 'cus-edit)
-;; (if same-window
-;; (switch-to-buffer "*Quick Customize nXhtml*")
-;; (switch-to-buffer-other-window "*Quick Customize nXhtml*"))
-;; (kill-all-local-variables)
-;; (custom-mode)
-;; (let ((inhibit-read-only t))
-;; (erase-buffer))
-;; (let ((sFound "found")
-;; (sError "error"))
-;; (put-text-property 0 (length sFound)
-;; 'face '(bold
-;; (foreground-color . "green")) sFound)
-;; (put-text-property 0 (length sError)
-;; 'face '(bold
-;; (foreground-color . "red")) sError)
-;; (let* (
-;; (default-used "(not set yet - default used)")
-;; )
-;; (nxhtml-custom-h1 "Quick Customize for nXhtml" t)
-;; (widget-insert "
-
-;; This page is for a quick and easy setup of some ")
-;; (nxhtml-custom-url-link "nXhtml" (nxhtml-docfile-url))
-;; (widget-insert " features
-;; that I did not want to turn on by default since they alter what
-;; happens when you open a file. I suggest however that you turn
-;; them on since they are quite useful if you just understands what
-;; is happening.
-
-;; The values you set here are saved so that they will be used next
-;; time you start Emacs too.")
-;; ;;(widget-insert-link "customize nXhtml" 'customize-group (list 'nxhtml))
-;; (widget-insert "\n\n")
-
-;; (nxhtml-custom-insert-nxhtml-row 'nxhtml-global-minor-mode t "Show the nXhtml menu in all relevant buffers\n\t")
-;; ;;(nxhtml-custom-insert-nxhtml-row 'mumamo-global-mode t "Turn on Multiple Major Mode in all relevant buffers\n\t")
-;; ;;(nxhtml-custom-insert-nxhtml-row 'mlinks-global-mode t "Make link of lins, for example href=\"...\"\n\t")
-;; ;;(nxhtml-custom-insert-nxhtml-row 'indent-region-mode t "Use TAB to indent region when it is selected\n\t")
-
-;; (widget-insert "\n")
-;; (widget-insert-button " Turn them all on "
-;; (lambda ()
-;; (nxhtml-quick-all t)
-;; (nxhtml-quick-customize t))
-;; nil)
-;; (widget-insert " ")
-;; (widget-insert-button " Turn them all off "
-;; (lambda ()
-;; (nxhtml-quick-all nil)
-;; (nxhtml-quick-customize t))
-;; nil)
-;; (beginning-of-line)
-;; )))
-
-;; (defun nxhtml-quick-all (on)
-;; (custom-set-and-prepare-save 'nxhtml-global-minor-mode on)
-;; ;;(custom-set-and-prepare-save 'mumamo-global-mode on)
-;; (custom-set-and-prepare-save 'indent-region-mode on)
-;; (when custom-file
-;; (custom-save-all)))
-
-(defun custom-set-and-prepare-save (symbol value)
- "Set SYMBOL to VALUE and add to customize.
-Both the current value and the value to save is set, but
-`custom-save-all' must be called to save customization."
- (customize-set-variable symbol value)
- (customize-set-value symbol value)
- (customize-mark-to-save symbol))
-
-
-;;(nxhtml-quick-customize)
-
-(defun nxhtml-welcome ()
- "Show welcome information."
- (interactive)
- (require 'cus-edit)
- (let* ((bufnam "*nXhtml Welcome*")
- (oldbuf (get-buffer bufnam))
- (curwin (selected-window)))
- (switch-to-buffer-other-window bufnam)
- (unless oldbuf
- (let ((inhibit-read-only t)
- (here (point)))
- (Custom-mode)
- (nxhtml-menu-mode 1)
- (setq cursor-in-non-selected-windows nil)
- (nxhtml-custom-h1 "Welcome to nXhtml - a package for web editing" t)
- (insert "\n\n")
- (setq here (point))
- (insert "If you have not done it already it might "
- "be a good time to read at least The Quick Guide in the ")
- (nxhtml-custom-url-link "nXhtml overview" (nxhtml-docfile-url))
- (insert " now.\n\n")
- (fill-region here (point))
- (setq here (point))
- (insert "And oh, wait! If you are new to Emacs too you might want "
- "to take a quick ")
- (nxhtml-custom-url-link
- "Emacs tour"
- "http://www.gnu.org/software/emacs/tour/")
- (insert ". And then perhaps the Emacs tutorial "
- "(which is in the Help menu above).\n\n")
- (fill-region here (point))
- (setq here (point))
-
- (unless (nxhtml-skip-welcome)
- (insert "Click to ")
- (widget-insert-link "remove this message"
- (lambda ()
- "Customize `nxhtml-skip-welcome'."
- (customize-option 'nxhtml-skip-welcome))
- nil)
- (insert " at startup. (This page is still "
- "available in the nXhtml menu, at the bottom.)"))
- (fill-region here (point))
- (setq here (point))
- (goto-char (point-min))))
- (select-window curwin)))
-
-(defcustom nxhtml-skip-welcome nil
- "Turn this on to always skip the nXhtml welcome message."
- :type 'boolean
- :group 'nxhtml)
-
-(defun nxhtml-skip-welcome ()
- "Return t if nXhtml welcome message should be skipped.
-If nil then the message will be shown when you open the first
-file using nxhtml-mode."
- (or nxhtml-skip-welcome
- (and nxhtml-menu-mode
- ;;mumamo-global-mode
- ;;indent-region-mode
- )))
-
-(defun nxhtml-say-welcome-unless-skip ()
- (condition-case err
- (unless (nxhtml-skip-welcome)
- (save-match-data
- (nxhtml-welcome)))
- (error (message "ERROR nxhtml-say-welcome-unless-skip: %s" err))))
-
-;; Show welcome screen once after loading nxhtml:
-;;(unless (boundp 'bytecomp-filename)
-(eval-when '(load)
- (eval-after-load 'nxhtml
- ;; Use a short delay if something like desktop is used:
- '(run-with-idle-timer 0.5 nil 'nxhtml-say-welcome-unless-skip)))
-
-(provide 'nxhtml-menu)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-menu.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml-mode.el b/emacs.d/nxhtml/nxhtml/nxhtml-mode.el
deleted file mode 100644
index 063be3c..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml-mode.el
+++ /dev/null
@@ -1,2796 +0,0 @@
-;;; nxhtml-mode.el --- Edit XHTML files
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Parts are from Peter Heslin (see below)
-;; Created: 2005-08-05
-;;Version:
-;; Last-Updated: 2008-12-28 Sun
-;; Keywords: languages
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; The purpose of nxhtml.el is to add some features that are useful
-;; when editing XHTML files to nxml-mode. For more information see
-;; `nxhtml-mode'.
-;;
-;;
-;; Usage:
-;;
-;; See the file readme.txt in the directory above this file. Or, if
-;; you do not have that follow the instructions below.
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; History:
-;;
-;; 2006-04-25: Added completion for href, src etc. Removed xhtmlin.
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This file is not part of Emacs
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'hideshow))
-
-(eval-when-compile (require 'appmenu-fold nil t))
-(eval-when-compile (require 'fold-dwim nil t))
-(eval-when-compile (require 'foldit nil t))
-(eval-when-compile (require 'html-pagetoc nil t))
-(eval-when-compile (require 'html-toc nil t))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'mlinks nil t))
-(eval-when-compile (require 'nxhtml-base))
-;;(eval-when-compile (require 'nxhtml-menu)) ;; recursive load
-(eval-when-compile (require 'ourcomments-util nil t))
-(eval-and-compile (require 'typesetter nil t))
-(eval-when-compile (require 'xhtml-help nil t))
-(eval-when-compile (require 'popcmp nil t))
-;; (eval-when-compile
-;; (unless (or (< emacs-major-version 23)
-;; (boundp 'nxhtml-menu:version)
-;; (featurep 'nxhtml-autostart))
-;; (let ((efn (expand-file-name
-;; "../autostart.el"
-;; (file-name-directory
-;; (or load-file-name
-;; (when (boundp 'bytecomp-filename) bytecomp-filename)
-;; buffer-file-name)))))
-;; (message "efn=%s" efn)
-;; (load efn))
-;; (require 'rng-valid)
-;; (require 'rng-nxml)))
-
-(require 'button)
-(require 'loadhist)
-(require 'nxml-mode nil t)
-(require 'rng-nxml nil t)
-(require 'rng-valid nil t)
-
-;; Require nxml things conditionally to silence byte compiler under
-;; Emacs 22.
-(eval-and-compile (require 'rngalt nil t))
-
-(require 'url-parse)
-(require 'url-expand)
-(require 'popcmp nil t)
-(eval-when-compile (require 'html-imenu nil t))
-(eval-when-compile (require 'tidy-xhtml nil t))
-(eval-when-compile (require 'html-quote nil t))
-
-(defun nxhtml-version ()
- "Show nxthml version."
- (interactive)
- (message "nXhtml mode version %s" nxhtml-menu:version))
-
-;;(defun nxhtml-nxml-fontify-attribute (att &optional namespace-declaration)
-;;"Holds the original `nxml-fontify-attribute' function.")
-;;(fset 'nxhtml-nxml-fontify-attribute (symbol-function 'nxml-fontify-attribute))
-
-
-(defun nxhtml-turn-onoff-tag-do-also (on)
- (add-hook 'nxhtml-mode-hook 'nxhtml-check-tag-do-also)
- (dolist (b (buffer-list))
- (when (with-current-buffer b
- (eq major-mode 'nxhtml-mode))
- (if on
- (progn
- (add-hook 'rngalt-complete-tag-hooks 'nxhtml-complete-tag-do-also t t)
- )
- (remove-hook 'rngalt-complete-tag-hooks 'nxhtml-complete-tag-do-also t)
- ))))
-
-;;(define-toggle nxhtml-tag-do-also t
-(define-minor-mode nxhtml-tag-do-also
- "When completing tag names do some more if non-nil.
-For some tag names additional things can be done at completion to
-speed writing up. For example for an <img ...> tag `nxhtml-mode'
-can prompt for src attribute and add width and height attributes
-if this attribute points to a local file.
-
-You can add additional elisp code for completing to
-`nxhtml-complete-tag-do-also'."
- :global t
- :init-value t
- :group 'nxhtml
- (nxhtml-turn-onoff-tag-do-also nxhtml-tag-do-also))
-(when nxhtml-tag-do-also (nxhtml-tag-do-also 1))
-
-(defun nxhtml-tag-do-also-toggle ()
- "Toggle `nxhtml-tag-do-also'."
- (interactive)
- (nxhtml-tag-do-also (if nxhtml-tag-do-also -1 1)))
-
-(defun nxhtml-check-tag-do-also ()
- (when nxhtml-tag-do-also
- (nxhtml-turn-onoff-tag-do-also t)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Folding etc.
-
-
-;; This part is origially taken from
-;; http://www.emacswiki.org/cgi-bin/wiki/NxmlModeForXHTML and was
-;; originally written by Peter Heslin, but has been changed rather
-;; much.
-
-;; (defun nxhtml-hs-adjust-beg-func (pos)
-;; (save-excursion
-;; (save-match-data
-;; ;; (search-backward "<" nil t)
-;; ;; (forward-char)
-;; ;; (search-forward ">" nil t)
-;; )
-;; (point)))
-
-(defun nxhtml-hs-forward-sexp-func (pos)
- (nxhtml-hs-forward-element))
-
-(defun nxhtml-hs-forward-element ()
- (let ((nxml-sexp-element-flag))
- (setq nxml-sexp-element-flag (not (looking-at "<!--")))
- (unless nil ;;(looking-at outline-regexp)
- ;;(condition-case nil
- (nxml-forward-balanced-item 1)
- ;;(error nil))
- )))
-
-(defun nxhtml-setup-for-fold-dwim ()
- (make-local-variable 'outline-regexp)
- (setq outline-regexp "\\s *<\\([h][1-6]\\|html\\|body\\|head\\)\\b")
- (make-local-variable 'outline-level)
- (setq outline-level 'nxhtml-outline-level)
- ;;(outline-minor-mode 1)
- ;;(hs-minor-mode 1)
- (setq hs-special-modes-alist (assq-delete-all 'nxhtml-mode hs-special-modes-alist))
- (add-to-list 'hs-special-modes-alist
- '(nxhtml-mode
- ;;"<!--\\|<[^/>]>\\|<[^/][^>]*[^/]>"
- "<!--\\|<[^/>]>\\|<[^/][^>]*"
- "</\\|-->"
- "<!--" ;; won't work on its own; uses syntax table
- nxhtml-hs-forward-sexp-func
- nil ;nxhtml-hs-adjust-beg-func
- ))
- (set (make-local-variable 'hs-set-up-overlay) 'nxhtml-hs-set-up-overlay)
- (put 'hs-set-up-overlay 'permanent-local t)
- (when (featurep 'appmenu-fold)
- (appmenu-fold-setup))
- (foldit-mode 1))
-
-(defun nxhtml-hs-start-tag-end (beg)
- (save-excursion
- (save-match-data
- (goto-char beg)
- (or (search-forward ">" (line-end-position) t)
- (line-end-position)))))
-
-(defun nxhtml-hs-set-up-overlay (ovl)
- (overlay-put ovl 'priority (1+ mlinks-link-overlay-priority))
- (when foldit-mode
- (setq foldit-hs-start-tag-end-func 'nxhtml-hs-start-tag-end)
- (foldit-hs-set-up-overlay ovl)))
-
-(defun nxhtml-outline-level ()
- ;;(message "nxhtml-outline-level=%s" (buffer-substring (match-beginning 0) (match-end 0)))(sit-for 2)
- ;; Fix-me: What did I intend to do???
- ;; (let ((tag (buffer-substring (match-beginning 1) (match-end 1))))
- ;; (if (eq (length tag) 2)
- ;; (- (aref tag 1) ?0)
- ;; 0))
- 8)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-
-(defcustom nxhtml-use-imenu t
- "Use imenu in nxhtml-mode."
- :type 'boolean
- :group 'nxhtml)
-
-
-
-(defcustom nxhtml-default-encoding 'iso-8859-1
- "Default encoding."
- :type 'coding-system
- :group 'nxhtml)
-
-(defun nxhtml-insert-empty-frames-page ()
- "Insert an empty frames page."
- (interactive)
- ;;(unless (= 0 (buffer-size))
- (unless (nxhtml-can-insert-page-here)
- (error "Buffer is not empty"))
- (insert
- "<?xml version=\"1.0\" encoding=\""
- (symbol-name nxhtml-default-encoding)
- "\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"
- \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title></title>
- </head>
- <frameset cols=\"50%, 50%\">
- <frame src=\"about:blank\" />
- <frame src=\"about:blank\" />
- </frameset>
-</html>")
- (search-backward "</title>"))
-
-(defun nxhtml-insert-empty-page ()
- "Insert an empty XHTML page."
- (interactive)
- ;;(unless (= 0 (buffer-size))
- (unless (nxhtml-can-insert-page-here)
- (error "Buffer is not empty"))
- (insert
- "<?xml version=\"1.0\" encoding=\""
- (symbol-name nxhtml-default-encoding)
- "\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title></title>
- </head>
- <body>
- </body>
-</html>")
- (search-backward "</title>"))
-
-(defun nxhtml-empty-page-completion ()
- ;;(unless (= 0 (buffer-size)) (error "Buffer is not empty"))
- (let* ((frames "Frameset page")
- (normal "Normal page")
- ;;(vlhead "Validation header")
- ;;popcmp-popup-completion
- (initial nil) ;;(unless popcmp-popup-completion normal))
- (hist (if (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- ;;(list vlhead frames normal)
- (list frames normal)
- (list frames normal)))
- res
- (completion-ignore-case t))
- (setq res (popcmp-completing-read "Insert: " hist nil t initial (cons 'hist (length hist))))
- (cond ((string= res frames)
- (nxhtml-insert-empty-frames-page))
- ((string= res normal)
- (nxhtml-insert-empty-page))
- ;;((string= res vlhead)
- ;; (nxhtml-validation-header-mode))
- (t
- (error "Bad res=%s" res))))
- (rng-auto-set-schema))
-
-
-
-(defvar nxhtml-mode-hook nil)
-;;(add-hook 'nxhtml-mode-hook 'nxml-fontify-buffer)
-
-(defun nxhtml-help ()
- (interactive)
- (describe-function 'nxhtml-mode))
-
-(defvar nxhtml-current-validation-header nil)
-(make-variable-buffer-local 'nxhtml-current-validation-header)
-(put 'nxhtml-current-validation-header 'permanent-local t)
-
-
-;; FIX-ME: When should this be done? Get tidy-menu-symbol:
-(when (featurep 'tidy-xhtml)
- (tidy-build-menu))
-
-
-;; (eval-after-load 'css-mode
-;; '(when (featurep 'xhtml-help)
-;; (define-key css-mode-map [(control ?c) ?? ?c] 'xhtml-help-show-css-ref)
-;; ))
-;; (add-hook 'css-mode-hook
-;; (lambda ()
-;; (and (featurep 'xhtml-help)
-;; (boundp 'css-mode-map)
-;; (define-key css-mode-map [(control ?c) ?? ?c]
-;; 'xhtml-help-show-css-ref))))
-
-;; This should be run in `change-major-mode-hook'."
-;; (defun nxhtml-change-mode ()
-;; (when (fboundp 'mlinks-mode)
-;; (mlinks-mode 0)))
-
-(when (< emacs-major-version 23)
- (defun nxml-change-mode ()
- ;; Remove overlays used by nxml-mode.
- (save-excursion
- (save-restriction
- (widen)
- (rng-validate-mode -1)
- (let ((inhibit-read-only t)
- (buffer-undo-list t)
- (modified (buffer-modified-p)))
- (nxml-with-invisible-motion
- (remove-text-properties (point-min) (point-max) '(face nil)))
- (set-buffer-modified-p modified))))))
-
-(defcustom nxhtml-heading-element-name-regexp "[a-z]*"
- "Used for `nxml-heading-element-name-regexp."
- :type 'regexp
- :group 'nxhtml)
-
-;; Fix-me: Put this is a separate file and load it only if nxml is
-;; availabe.
-(put 'nxhtml-mode 'flyspell-mode-predicate 'sgml-mode-flyspell-verify)
-;;;###autoload
-(define-derived-mode nxhtml-mode nxml-mode "nXhtml"
- "Major mode for editing XHTML documents.
-It is based on `nxml-mode' and adds some features that are useful
-when editing XHTML files.\\<nxhtml-mode-map>
-
-The XML menu contains functionality added by `nxml-mode' \(on
-which this major mode is based). There is also a popup menu
-added to the \[apps] key.
-
-The most important features are probably completion and
-validation, which is inherited from `nxml-mode' with some small
-addtions. In very many situation you can use completion. To
-access it type \\[nxml-complete]. Completion has been enhanced in
-the following way:
-
-- If region is active and visible then completion will surround the
- region with the chosen tag's start and end tag. However only the
- starting point is checked for validity. If something is wrong after
- insertion you will however immediately see it if you have validation
- on.
-- It can in some cases give assistance with attribute values.
-- Completion can be customized, see the menus XHTML - Completion:
- * You can use a menu popup style completion.
- * You can have alternatives grouped.
- * You can get a short help text shown for each alternative.
-- There does not have to be a '<' before point for tag name
- completion. (`nxml-mode' requires a '<' before point for tag name
- completion.)
-- Completes xml version and encoding.
-- Completes in an empty buffer, ie inserts a skeleton.
-
-Here are all key bindings in nxhtml-mode itself:
-
-\\{nxhtml-mode-map}
-
-Notice that other minor mode key bindings may also be active, as
-well as emulation modes. Do \\[describe-bindings] to get a list
-of all active key bindings. Also, *VERY IMPORTANT*, if mumamo is
-used in the buffer each mumamo chunk has a different major mode
-with different key bindings. You can however still see all
-bindings with \\[describe-bindings], but you have to do that with
-point in the mumamo chunk you want to know the key bindings in."
- (set (make-local-variable 'nxml-heading-element-name-regexp)
- nxhtml-heading-element-name-regexp)
- (when (fboundp 'nxml-change-mode)
- (add-hook 'change-major-mode-hook 'nxml-change-mode nil t))
- ;;(add-hook 'change-major-mode-hook 'nxhtml-change-mode nil t)
- (when (featurep 'rngalt)
- (add-hook 'nxml-completion-hook 'rngalt-complete nil t))
- ;;(define-key nxhtml-mode-map [(meta tab)] 'nxml-complete)
- ;;(nxhtml-menu-mode 1)
- (when (and nxhtml-use-imenu
- (featurep 'html-imenu))
- (add-hook 'nxhtml-mode-hook 'html-imenu-setup nil t))
- ;;(mlinks-mode 1)
- (nxhtml-setup-for-fold-dwim)
- (when (featurep 'rngalt)
- (set (make-local-variable 'rngalt-completing-read-tag) 'nxhtml-completing-read-tag)
- (set (make-local-variable 'rngalt-completing-read-attribute-name) 'nxhtml-completing-read-attribute-name)
- (set (make-local-variable 'rngalt-completing-read-attribute-value) 'nxhtml-completing-read-attribute-value)
- (set (make-local-variable 'rngalt-complete-first-try) 'nxhtml-complete-first-try)
- (set (make-local-variable 'rngalt-complete-last-try) 'nxhtml-complete-last-try)
- ))
-
-;; Fix-me: The nxhtml-mode-map is define by define-derived-mode, but
-;; how should keys be added?
-
-;; Replace the Insert End Tag function:
-(define-key nxhtml-mode-map [(control ?c) (control ?f)] 'rngalt-finish-element)
-
-;; Put completion on the normal key?
-(define-key nxhtml-mode-map [(meta tab)] 'nxml-complete)
-;; Paragraphs (C-p mnemonic for paragraph)
-(define-key nxhtml-mode-map [(control ?c) (control ?p) ?l] 'longlines-mode)
-(define-key nxhtml-mode-map [(control ?c) (control ?p) ?f] 'fill-paragraph)
-(define-key nxhtml-mode-map [(control ?c) (control ?p) ?u] 'unfill-paragraph)
-;; Html related (C-h mnemonic for html)
-(define-key nxhtml-mode-map [(control ?c) (control ?h) ?c] 'nxhtml-save-link-to-here)
-(define-key nxhtml-mode-map [(control ?c) (control ?h) ?v] 'nxhtml-paste-link-as-a-tag)
-(define-key nxhtml-mode-map [(control ?c) (control ?h) ?b] 'nxhtml-browse-file)
-(define-key nxhtml-mode-map [(control ?c) ?<] 'nxml-untag-element)
-(when (featurep 'html-quote)
- (define-key nxhtml-mode-map [(control ?c) (control ?q)] 'nxhtml-quote-html)
- )
-;; Fix-me: Is pagetoc really that important to have its own keybindings?
-(when (featurep 'html-pagetoc)
- (define-key nxhtml-mode-map [(control ?c) (control ?h) ?t ?i] 'html-pagetoc-insert-toc)
- (define-key nxhtml-mode-map [(control ?c) (control ?h) ?t ?r] 'html-pagetoc-rebuild-toc)
- (define-key nxhtml-mode-map [(control ?c) (control ?h) ?t ?s] 'html-pagetoc-insert-style-guide)
- )
-
-(defun nxhtml-quote-html()
- "Quote character(s) unsafe in html text parts.
-If region is visible quote all characters in region. Otherwise
-just quote current char.
-
-Note to CUA users: See `cua-mode' for how to prevent CUA from
-just copying region when you press C-c."
- (interactive)
- (if (and mark-active
- transient-mark-mode)
- (let* ((rb (region-beginning))
- (re (region-end))
- (qr (html-quote-html-string
- (buffer-substring-no-properties rb re))))
- (delete-region rb re)
- (insert qr))
- (let ((cs (html-quote-html-char (char-after))))
- (delete-char 1)
- (insert cs))))
-
-(defvar nxhtml-single-tags
- '("base"
- "meta"
- "link"
- "br"
- "hr"
- "frame"
- "img"
- "input"
- "option"
- "param"))
-
-(defun nxthml-is-single-tag (tag)
- (member tag nxhtml-single-tags))
-
-(defvar nxhtml-help-attribute-name
- '(("title" "Element title")
- ("class" "Style class of element")
- ("charset" "Encoding of target")
- ("coords" "Defining shape")
- ("href" "Target URL")
- ("hreflang" "Language of target")
- ("name" "(DEPRECEATED)")
- ("rel" "Target's relation to document")
- ("rev" "Document's relation to target")
- ("shape" "Area shape")
- ("target" "Where to open target")
- ("type" "MIME type of target")
-
- ("id" "Unique id of element")
- ("lang" "Language code")
- ("dir" "Text direction")
- ("accesskey" "Keyboard shortcut")
- ("tabindex" "Tab order of element")
-
- ("style" "Inline style")
- ("disabled" "Tag initially disabled")
- ("readonly" "User can not modify")
- ;;("" "")
-
- ("alink" "(DEPRECEATED)")
- ("background" "(DEPRECEATED)")
- ("bgcolor" "(DEPRECEATED)")
- ("link" "(DEPRECEATED)")
- ("text" "(DEPRECEATED)")
- ("vlink" "(DEPRECEATED)")
- ("xml:lang" "Tag content language")
- ("cite" "URL with more info")
- ("method" "HTTP method for sending")
- ("accept" "Content types")
- ("accept-charset" "Character sets")
- ("enctype" "Encoding")
- ))
-(defvar nxhtml-help-attribute-name-tag
- '(("textarea"
- ("name" "Name for textarea")
- )
- ))
-
-(defvar nxhtml-help-tag
- (let ((h (make-hash-table :test 'equal)))
- (puthash "html" "Document" h)
- (puthash "head" "Document head" h)
- (puthash "title" "Document title" h)
- (puthash "base" "Base URL/target" h)
- (puthash "meta" "Meta information" h)
- (puthash "style" "Inline style sheet" h)
- (puthash "link" "Style sheet etc" h)
- (puthash "script" "(Java)Script code" h)
- (puthash "noscript" "Script disabled part" h)
- (puthash "isindex" "(DEPRECEATED)" h)
-
- (puthash "iframe" "Inline frame" h)
- (puthash "frameset" "Organize frames" h)
- (puthash "frame" "Sub window" h)
- (puthash "noframes" "Substitute for frames" h)
-
- (puthash "bdo" "Text direction" h)
-
- (puthash "body" "Document body" h)
- (puthash "a" "Link" h)
- (puthash "p" "Paragraph" h)
- (puthash "span" "Group inline elements" h)
- (puthash "br" "Line break" h)
- (puthash "hr" "Horizontal rule" h)
- (puthash "div" "Division/section" h)
- (puthash "img" "Image" h)
- (puthash "h1" "Header 1" h)
- (puthash "del" "Deleted text" h)
- (puthash "strike" "(DEPRECEATED)" h)
- (puthash "u" "(DEPRECEATED)" h)
- (puthash "s" "(DEPRECEATED)" h)
- (puthash "ins" "Inserted text" h)
- (puthash "sup" "Superscript text" h)
- (puthash "center" "(DEPRECEATED)" h)
- (puthash "dir" "(DEPRECEATED)" h)
-
- (puthash "blockquote" "Long quotation" h)
- (puthash "q" "Short quotation" h)
- (puthash "pre" "Preformatted text" h)
- (puthash "applet" "(DEPRECEATED)" h)
- (puthash "basefont" "(DEPRECEATED)" h)
- (puthash "font" "(DEPRECEATED)" h)
-
- ;; The following elements are all font style elements. They are
- ;; not deprecated, but it is possible to achieve richer effects
- ;; using style sheets.
- (puthash "tt" "Renders as teletype or mono spaced text" h)
- (puthash "i" "Renders as italic text" h)
- (puthash "b" "Renders as bold text" h)
- (puthash "big" "Renders as bigger text" h)
- (puthash "small" "Renders as smaller text" h)
-
-
- ;; The following tags are not deprecated, but it is possible to
- ;; achieve a much richer effect using style sheets:
- (puthash "em" "Renders as emphasized text" h)
- (puthash "strong" "Renders as strong emphasized text" h)
- (puthash "dfn" "Defines a definition term" h)
- (puthash "code" "Defines computer code text" h)
- (puthash "samp" "Defines sample computer code" h)
- (puthash "kbd" "Defines keyboard text" h)
- (puthash "var" "Defines a variable" h)
- (puthash "cite" "Defines a citation" h)
-
- (puthash "ul" "Unordered list" h)
- (puthash "ol" "Ordered list" h)
- (puthash "li" "List element" h)
- (puthash "dl" "Definition list" h)
- (puthash "dt" "Definition term" h)
- (puthash "dd" "Definition description" h)
-
-
- (puthash "fieldset" "Draw box around" h)
- (puthash "form" "User input form" h)
- (puthash "input" "Input field/checkbox etc" h)
- (puthash "textarea" "Input multiline field" h)
- (puthash "button" "Push button" h)
- (puthash "label" "Label for control" h)
- (puthash "map" "Client side image map" h)
- (puthash "select" "Drop down list" h)
- (puthash "option" "Option in drop down list" h)
- (puthash "menu" "(DEPRECEATED)" h)
-
- (puthash "object" "Embedded object" h)
- (puthash "param" "Object settings" h)
-
- (puthash "abbr" "Abbreviation" h)
- (puthash "address" "For addresses etc" h)
- (puthash "acronym" "May be used for lookup etc" h)
-
- (puthash "table" "Table" h)
- (puthash "caption" "Table caption" h)
- (puthash "col" "Table column attributes" h)
- (puthash "colgroup" "Table column group" h)
- (puthash "thead" "Table header" h)
- (puthash "tbody" "Table body" h)
- (puthash "tfoot" "Table footer" h)
- (puthash "tr" "Table row" h)
- (puthash "td" "Table cell" h)
-
- h))
-
-;;;###autoload
-(defun nxhtml-short-tag-help (tag)
- "Display description of tag TAG. If TAG is omitted, try tag at point."
- (interactive
- (let ((tag (xhtml-help-tag-at-point)))
- (unless (stringp tag)
- (setq tag (read-string "No tag at point. Give tag name: ")))
- (list tag)))
- (setq tag (downcase tag))
- (let ((desc (gethash tag nxhtml-help-tag))
- (use-dialog-box nil))
- (unless desc
- (setq desc (concat tag " -- No short description available")))
- (when (y-or-n-p (concat desc ". Fetch more information from the Internet? "))
- ;; Loaded by the autoloading of `xhtml-help-tag-at-point' above:
- (xhtml-help-browse-tag tag))))
-
-(defvar nxhtml-no-single-tags nil)
-(defvar nxhtml-no-end-tags nil)
-
-(defadvice rng-complete-qname-function (around nxhtml-rng-complete-qname-function-ad
- (string predicate flag)
- disable)
- ;;(if (not (eq major-mode 'nxhtml-mode))
- (if (not nxhtml-completing-with-help)
- ad-do-it
- (setq ad-return-value
- (let ((alist (mapcar (lambda (name) (cons name nil))
- (nxhtml-rng-generate-qname-list string))))
- (cond ((not flag)
- (try-completion string alist predicate))
- ((eq flag t)
- (all-completions string alist predicate))
- ((eq flag 'lambda)
- (and (assoc string alist) t)))))))
-
-
-
-
-(defvar nxhtml-predicate-error nil)
-
-(defun nxhtml-find-ids (file)
- (let ((buf (find-file-noselect file)))
- (when buf
- (with-current-buffer buf
- (when (eq major-mode 'nxhtml-mode)
- (save-excursion
- (let ((ids nil)
- (id-ptrn
- (rx space
- "id"
- (0+ space)
- ?=
- (0+ space)
- ?\"
- (submatch
- (1+ (not (any ?\")))
- )
- ?\"
- )))
- (goto-char (point-min))
- (while (re-search-forward id-ptrn nil t)
- (add-to-list 'ids (match-string-no-properties 1)))
- ids)))))))
-
-(defun nxhtml-read-url (&optional allowed-types initial-contents extra-predicate prompt-prefix)
- (popcmp-mark-completing initial-contents)
- (let ((local-ovl popcmp-mark-completing-ovl))
- (setq popcmp-mark-completing-ovl nil)
- (unwind-protect
- (let* ((url-type (nxhtml-read-url-type allowed-types initial-contents))
- (base-prompt (cond ((eq url-type 'local-file-url)
- "File: ")
- ((eq url-type 'id-url)
- "Id: ")
- ((eq url-type 'web-url)
- "Web URL: ")
- ((eq url-type 'mail-url)
- "e-Mail address: ")
- ((eq url-type 'any-url)
- "Any URL-type: ")
- (t
- ;;(error "Internal error: bad url-type=%s" url-type)
- "Unknown URL-type: ")
- ))
- prompt
- type-predicate
- url
- (bad-url initial-contents)
- (default-directory (if buffer-file-name
- (file-name-directory buffer-file-name)
- default-directory)))
- (when prompt-prefix
- (setq base-prompt (concat prompt-prefix " " base-prompt)))
- (setq nxhtml-predicate-error "")
- (cond ((eq url-type 'local-file-url)
- )
- ((eq url-type 'web-url)
- )
- ((eq url-type 'mail-url)
- (setq type-predicate 'nxhtml-mailto-predicate)
- (when (and (stringp bad-url)
- (<= 7 (length bad-url))
- (string= "mailto:" (substring bad-url 0 7)))
- (setq bad-url (substring bad-url 7)))))
- (while (not url)
- (setq prompt (concat nxhtml-predicate-error " " base-prompt))
- (cond ((eq url-type 'local-file-url)
- (setq url (read-file-name prompt nil "" nil bad-url extra-predicate))
- (when (< 0 (length url))
- ;; Fix-me: prompt for id here
- (setq url (file-relative-name
- (expand-file-name url)))))
- ((eq url-type 'id-url)
- (setq url (completing-read prompt (nxhtml-find-ids buffer-file-name)))
- (when url
- (setq url (concat "#" url))))
- ((eq url-type 'web-url)
- (setq url (nxhtml-read-from-minibuffer prompt bad-url nil nil
- 'nxhtml-read-web-url-history
- t)))
- ((eq url-type 'mail-url)
- (setq url (nxhtml-read-from-minibuffer prompt bad-url nil nil
- 'nxhtml-read-mail-url-history
- t)))
- (t
- (setq url (nxhtml-read-from-minibuffer prompt bad-url nil nil
- 'nxhtml-read-url-history
- t))))
- (when (or (and type-predicate
- (not (funcall type-predicate url)))
- (and extra-predicate
- (not (funcall extra-predicate url))))
- (setq bad-url url)
- (setq url)))
- (when (eq url-type 'mail-url)
- (setq url (concat "mailto:" url)))
- url)
- (delete-overlay local-ovl)
- )))
-
-(defun nxhtml-read-url-type (allowed url-beginning)
- (assert (or (listp allowed) (eq t allowed)) t)
- (let* ((prompt "URL-type: ")
- (parsed-url (url-generic-parse-url url-beginning))
- (beg-type (url-type parsed-url))
- (allowed-u allowed)
- (completion-ignore-case t)
- choices
- choice)
- ;; (url-type (url-generic-parse-url "#some-id"))
- ;;(lwarn t :warning "url-type=%s, pu=%s" (url-type parsed-url) parsed-url)
- ;; Emacs 23 bug workaround Sat Jan 26 2008
- ;;(when (eq beg-type 'cl-struct-url) (setq beg-type (elt parsed-url 1)))
- (cond ((string= "mailto" beg-type)
- (setq allowed-u '(?m)))
- ((or (string= "http" beg-type)
- (string= "https" beg-type)
- (string= "ftp" beg-type))
- (setq allowed-u '(?w)))
- ((= 1 (length beg-type)) ;; w32
- (setq allowed-u '(?f)))
- ((and (null beg-type)
- url-beginning
- (= ?# (string-to-char url-beginning)))
- (setq allowed-u '(?i)))
- )
- ;; Be a bit picky and hopefully helpful, check if really allowed:
- (unless (or (eq allowed t)
- (equal allowed allowed-u))
- (let ((temp-u (copy-sequence allowed-u)))
- (dolist (a allowed)
- (setq temp-u (delq a temp-u)))
- (dolist (u temp-u)
- (setq allowed-u (delq u allowed-u)))))
- (if allowed-u
- (when (eq allowed-u t)
- (setq allowed-u '(?f ?i ?w ?m)))
- (setq allowed-u '(?f ?w)))
- (dolist (a allowed-u)
- (cond
- ((= a ?f)
- (setq choices (cons "File" choices)))
- ((= a ?i)
- (setq choices (cons "Id" choices)))
- ((= a ?w) (setq choices (cons "Url" choices)))
- ((= a ?m) (setq choices (cons "Mail" choices)))
- ))
- (if (= 1 (length allowed-u))
- (setq choice (car choices))
- (setq choice (popcmp-completing-read prompt choices nil t
- "" nil nil t)))
- (cond ((string= choice "Id")
- 'id-url)
- ((string= choice "File")
- 'local-file-url)
- ((string= choice "Url")
- 'web-url)
- ((string= choice "Mail")
- 'mail-url)
- )))
-
-(defvar nxhtml-read-url-history nil)
-(defvar nxhtml-read-web-url-history nil)
-(defvar nxhtml-read-mail-url-history nil)
-
-(defconst nxhtml-in-xml-attribute-value-regex
- (replace-regexp-in-string
- "w"
- xmltok-ncname-regexp
- ;;"<w\\(?::w\\)?\
- "<\\?xml\
-\\(?:[ \t\r\n]+w\\(?::w\\)?[ \t\r\n]*=\
-\[ \t\r\n]*\\(?:\"[^\"]*\"\\|'[^']*'\\)\\)*\
-\[ \t\r\n]+\\(w\\(:w\\)?\\)[ \t\r\n]*=[ \t\r\n]*\
-\\(\"[^\"]*\\|'[^']*\\)\\="
- t
- t))
-
-(defun nxhtml-mailto-predicate (url)
- "Tries to match a mailto url.
-This is not supposed to be entirely correct."
- (setq nxhtml-predicate-error nil)
- ;; Local pattern copied from gnus.
- (let ((r (concat "^"
- ;;"mailto:"
- "[a-z0-9$%(*-=?[_][^<>\")!;:,{}]*"
- "\@"
- "\\(?:[a-z0-9\-]+\.\\)+[a-z0-9]\\{2,4\\}$"))
- (case-fold-search t))
- ;;(message "mailpred") (sit-for 1)
- (if (string-match r url)
- t
- (setq nxhtml-predicate-error "Malformed email address.")
- nil)))
-
-(defcustom nxhtml-image-completion-pattern
- "\\.\\(?:png\\|jpg\\|jpeg\\|gif\\)$"
- "Pattern for matching image URLs in completion."
- :type 'regexp
- :group 'nxhtml)
-
-(defun nxhtml-image-url-predicate (url)
- (setq nxhtml-predicate-error nil)
- (if (or (file-directory-p url)
- (string-match nxhtml-image-completion-pattern url))
- t
- (setq nxhtml-predicate-error "Does not match image file name pattern.")
- nil
- ))
-
-(defcustom nxhtml-css-completion-pattern
- "\\.\\(?:css\\)$"
- "Pattern for matching css URLs in completion."
- :type 'regexp
- :group 'nxhtml)
-
-(defun nxhtml-css-url-predicate (url)
- (setq nxhtml-predicate-error nil)
- (if (or (file-directory-p url)
- (string-match nxhtml-css-completion-pattern url))
- t
- (setq nxhtml-predicate-error "Does not match css file name pattern.")
- nil
- ))
-
-(defcustom nxhtml-script-completion-pattern
- "\\.\\(?:js\\)$"
- "Pattern for matching src URLs in completion in script tags."
- :type 'regexp
- :group 'nxhtml)
-
-(defun nxhtml-script-url-predicate (url)
- (setq nxhtml-predicate-error nil)
- (if (or (file-directory-p url)
- (string-match nxhtml-script-completion-pattern url))
- t
- (setq nxhtml-predicate-error "Does not match script file name pattern.")
- nil
- ))
-
-(defun nxhtml-coding-systems-complete (init default)
- (let (coding-systems
- hist-num
- (n 0)
- hist)
- (unless (and init (< 0 (length init)))
- (setq init default))
- (mapc (lambda (coding-system)
- (let ((mime-charset (coding-system-get coding-system 'mime-charset)))
- (when mime-charset
- (setq coding-systems (cons
- (symbol-name mime-charset)
- coding-systems)))))
- (coding-system-list t))
- (setq coding-systems (sort coding-systems 'string=))
- (mapc (lambda (coding-system)
- (unless (< 0 (length coding-system))
- (error "len=0"))
- (setq n (1+ n))
- (when (string= coding-system init) (setq hist-num n)))
- coding-systems)
- (if hist-num
- (setq hist (cons 'coding-systems hist-num))
- (setq hist 'coding-systems))
- (completing-read "Encoding (coding system): "
- coding-systems nil t init hist)))
-
-
-;; Note: This function does not currently use the state provided by
-;; the nxml and rng functions directly. Instead it searches the
-;; environment near point to decide what to do.
-;; (defun nxhtml-complete-and-insert ()
-;; "Perform XHTML completion at point.
-;; This is merely an extended version of `nxml-complete' with the following changes:
-
-;; - If region is visible and active then completion will surround the
-;; region with the chosen tag's start and end tag. However only the
-;; starting point is checked for validity. If something is wrong after
-;; insertion you will however immediately see it if you have validation
-;; on.
-;; - Can in some cases give completion help inside attribute values.
-;; - There does not have to be a '<' before point for tag name
-;; completion. (`nxml-mode' requires a '<' before point for tag name
-;; completion.)
-;; - For tag names there is a popup style completion available. This
-;; gives a bit more guiding since it groups the alternative tags. Set
-;; `popcmp-popup-completion' to use this.
-;; - Completes xml version and encoding.
-;; - Completes an empty file, ie inserts a skeleton."
-;; (interactive)
-;; (let (res
-;; (where (nxhtml-check-where)))
-;; (or (when (eq where 'in-empty-page)
-;; (nxhtml-empty-page-completion))
-;; (when (and mark-active
-;; transient-mark-mode
-;; (eq where 'in-text))
-;; (nxhtml-insert-tag))
-;; (progn
-;; (cond ((memq where '(in-start-tag in-closed-start-tag in-end-tag))
-;; (re-search-forward "\\=/?[a-z]*" nil t))
-;; ((memq where '(in-attr))
-;; (re-search-forward "\\=[a-z]*=" nil t))
-;; ((memq where '(in-attr-val in-xml-attr-val))
-;; (re-search-forward "\\=[^<>\" \t\r\n]*" nil t))
-;; )
-;; (when (run-hook-with-args-until-success 'nxml-completion-hook)
-;; (when (re-search-backward "[^=]\"\\=" nil t)
-;; (forward-char) (delete-char 1)
-;; ;;(undo-start) (undo-more 1)
-;; )
-;; t))
-;; (when (and (not where)
-;; (char-before)
-;; (= ?\" (char-before)))
-;; nil)
-;; (when (or (when (char-before) (= ?> (char-before)))
-;; (eq where 'in-text))
-;; (setq res t)
-;; (nxhtml-insert-tag))
-;; ;; Eventually we will complete on entity names here.
-;; res
-;; (progn
-;; (ding)
-;; (message "Cannot complete in this context")))))
-
-(defvar nxhtml-in-proc-instr-back-regex "<\\?[^<>]*\\=")
-(defvar nxhtml-in-proc-instr-forw-regex "\\=[^<>]*\\?>")
-
-(defconst rngalt-in-pre-attribute-value-regex
- (replace-regexp-in-string
- "w"
- xmltok-ncname-regexp
- "<w\\(?::w\\)?\
-\\(?:[ \t\r\n]+w\\(?::w\\)?[ \t\r\n]*=\
-\[ \t\r\n]*\\(?:\"[^\"]*\"\\|'[^']*'\\)\\)*\
-\[ \t\r\n]+\\(w\\(:w\\)?\\)[ \t\r\n]*=[ \t\r\n]*\
-\\="
- t
- t))
-
-(defun nxhtml-check-where ()
- "Get a state for `nxhtml-complete-last-try'."
- (let ((p (point))
- (lt-pos (save-excursion (search-backward "<" nil t)))
- res)
- (cond ((= 0 (buffer-size))
- (setq res 'in-empty-page))
- ((looking-back "<!--[^<>]*\\=" 1 t)
- (setq res 'in-comment))
- ((let ((face (get-char-property (point) 'face)))
- (when (memq face '(nxml-comment-content-face
- nxml-comment-delimiter-face))
- (setq res 'in-comment)))
- t)
- ((looking-back nxhtml-in-xml-attribute-value-regex lt-pos t)
- (setq res 'in-xml-attr-val))
- ((looking-back nxhtml-in-proc-instr-back-regex 1 t)
- (setq res 'in-proc-instr))
- ((looking-back "<!D[^>]*\\=" 1 t)
- (setq res 'in-doctype))
- ((looking-back ">[^<]*" 1 t)
- (setq res 'in-text))
- ((looking-back rng-in-start-tag-name-regex 1 t)
- (setq res 'in-tag-start)
- (when (looking-at "\\=[^<]*>")
- (setq res 'in-closed-start-tag)))
- ((looking-back rng-in-end-tag-name-regex 1 t)
- (setq res 'in-tag-end))
- ((looking-back rng-in-attribute-regex 1 t)
- (setq res 'in-attr))
- ((looking-back rng-in-attribute-value-regex 1 t)
- (setq res 'in-attr-val))
- ((looking-back rngalt-in-pre-attribute-value-regex 1 t)
- (setq res 'in-pre-attr-val))
- ((looking-back "\"")
- (setq res 'after-attr-val))
- ((and rngalt-validation-header
- (looking-back "\\`[^<]*"))
- ;; FIX-ME: This is treated the same as in text currently,
- ;; but this should be checked. Maybe it is best to test
- ;; this here and return the relevant value?
- (setq res 'after-validation-header))
- )
- ;;(message "res=%s" res)(sit-for 1)
- (unless res
- (error "Could not find a state for completion"))
- res))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Make the completions additions cleaner:
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defconst nxhtml-tag-sets
- '(("logical"
- "del"
- "ins"
- "abbr"
- "acronym"
- "fieldset"
- "blockquote"
- "q"
- "code"
- "samp"
- "cite"
- "kbd"
- "var"
- "dfn"
- "address"
- "em"
- "strong"
- "pre"
- )
- ("physical"
- "hr"
- "sup"
- "sub"
- "font"
- "basefont"
- "br"
- "big"
- "small"
- "strike"
- "u"
- "i"
- "b"
- "s"
- "tt"
- "center"
- "bdo"
- )
- ("scripting"
- "script"
- "noscript"
- "object"
- "applet"
- )
- ("structure"
- "iframe"
- "p"
- "div"
- "span"
- "h6"
- "h5"
- "h4"
- "h3"
- "h2"
- "h1"
- )
-
- ("form"
- "isindex"
- "label"
- "button"
- "option"
- "select"
- "input"
- "textarea"
- "form"
- )
-
- ("list"
- "dt"
- "dd"
- "li"
- "dir"
- "menu"
- "ol"
- "dl"
- "ul"
- )
-
- ("link"
- "a"
- )
-
- ("image"
- "img"
- "map"
- )
-
- ("table"
- "table"
- "tr"
- "th"
- "td"
- "caption"
- "col"
- "colgroup"
- "thead"
- "tbody"
- "tfoot"
- )
-
- ("document"
- "base"
- "style"
- "link"
- "head"
- "body"
- "frame"
- "frameset"
- "noframes"
- "isindex"
- "nextid"
- "meta"
- "title"
- )
- ))
-
-(defvar nxhtml-attr-sets
- '(("scripting"
- "onblur"
- "onchange"
- "onclick"
- "ondblclick"
- "onfocus"
- "onkeydown"
- "onkeypress"
- "onkeyup"
- "onload"
- "onunload"
- "onmousedown"
- "onmousemove"
- "onmouseout"
- "onmouseover"
- "onmouseup"
- "onreset"
- "onselect"
- "onsubmit"
- )
- ("form"
- "method"
- "accept"
- "accept-charset"
- "enctype"
- )
- ("access"
- "id"
- "name"
- "disabled"
- "readonly")
- ("layout"
- "accesskey"
- "class"
- "coords"
- "shape"
- "style"
- "tabindex"
- "title"
- "align"
- "valign"
- "alink"
- "background"
- "bgcolor"
- "link"
- "text"
- "vlink"
- "compact"
- )
- ("target"
- "charset"
- "href"
- "hreflang"
- "rel"
- "rev"
- "target"
- "type"
- )
- ("language"
- "dir"
- "lang"
- "xml:lang"
- )
- ;; id
- ;; name
- ;; xml:lang
- ))
-
-(defun nxhtml-complete-last-try ()
- (when rng-current-schema-file-name
- (let ((where (nxhtml-check-where)))
- (cond
- ;;((eq where 'after-attr-val)
- ;;(insert " ")
- ;;)
- ((eq where 'in-pre-attr-val)
- (insert ?\"))
- ((eq where 'in-comment)
- (if (not (looking-at "[^>]*<"))
- nil
- (insert " -->")
- t))
- ((eq where 'in-xml-attr-val)
- (let (attr
- delimiter
- val)
- (save-excursion
- (save-match-data
- (re-search-forward "\\=[^<> \t\r\n\"]*" nil t)))
- (let* ((name-start (match-beginning 1))
- (name-end (match-end 1))
- (colon (match-beginning 2))
- (attr (buffer-substring-no-properties name-start
- (or colon name-end)))
- (value-start (1+ (match-beginning 3)))
- (tag (save-excursion
- (when (search-backward-regexp "<[[:alpha:]]+" nil t)
- (match-string 0))))
- (init (buffer-substring-no-properties value-start (point))))
- (setq delimiter (char-before value-start))
- (cond ((string= "encoding" attr)
- ;; Give a default that works in browsers today
- (setq val (nxhtml-coding-systems-complete
- init
- (symbol-name nxhtml-default-encoding))))
- ((string= "version" attr)
- (setq val "1.0")))
- (when val
- (insert val)
- t)
- )))
- ((or (memq where '(in-text
- after-validation-header
- in-empty-page)))
- (rngalt-complete-tag-region-prepare)
- (insert "<")
- (condition-case err
- (nxhtml-redisplay-complete)
- (quit
- (message "%s" (error-message-string err))
- (undo-start)
- (undo-more 1)
- (rngalt-complete-tag-region-cleanup)))
- t)
- (t
- ;;(message "LAST TRY where=%s" (nxhtml-check-where))(sit-for 1)
- nil)
- ))))
-
-(defun nxhtml-img-tag-do-also ()
- (insert "alt=\"")
- (rngalt-validate)
- (insert (read-string "Alt attribute: ")
- "\" ")
- (insert "src=\"")
- (rngalt-validate)
- (let ((src (nxhtml-read-url nil nil 'nxhtml-image-url-predicate "Image")))
- (insert src)
- (insert "\"")
- (when (file-exists-p src)
- (let ((sizes (image-size (create-image (expand-file-name src)) t)))
- (insert
- " width=\"" (format "%d" (car sizes)) "\""
- " height=\"" (format "%d" (cdr sizes)) "\"")
- )))
- (unless (save-match-data (looking-at "[^<]\\{,200\\}>"))
- (insert " />")))
-
-(defun nxhtml-redisplay-complete ()
- (rngalt-validate)
- (rng-cancel-timers)
- (message "")
- (redisplay t)
- (nxml-complete)
- (rng-activate-timers))
-
-(defun nxhtml-read-from-minibuffer (prompt &optional
- initial-contents keymap
- read hist default-value
- inherit-input-method)
- (rng-cancel-timers)
- (message "")
- (let ((res (read-from-minibuffer prompt initial-contents keymap
- read hist default-value inherit-input-method)))
- (rng-activate-timers)
- res))
-
-(defun nxhtml-meta-tag-do-also ()
- (let ((type (popcmp-completing-read
- "Type: "
- '(
- ;;"Refresh/Redirect"
- "HTTP Message Headers"
- "Robot Rules"
- "Description for Search Engines"
- ))))
- (cond
- ((string= type "Description for Search Engines")
- (insert " name=\"Description\"")
- (insert " content=\"")
- (insert (nxhtml-read-from-minibuffer "Description: "))
- (insert "\" />"))
- ((string= type "Robot Rules")
- (insert " name=\"Robots\"")
- (insert " content=\"")
- (nxhtml-redisplay-complete)
- (insert " />"))
- ((string= type "HTTP Message Headers")
- (insert " http-equiv=\"")
- (nxhtml-redisplay-complete)
- (insert " content=\"")
- (insert (nxhtml-read-from-minibuffer "Content: "))
- (insert "\" />")))))
-
-(defun nxhtml-style-tag-do-also ()
- (insert "type=\"text/css\"")
- (insert " media=\"")
- (nxhtml-redisplay-complete)
- (insert ">")
- (indent-according-to-mode)
- (insert "\n/* <![CDATA[ */")
- (indent-according-to-mode)
- (insert "\n")
- (indent-according-to-mode)
- (insert "\n/* ]]> */")
- (indent-according-to-mode)
- (insert "\n</style>")
- (indent-according-to-mode)
- (insert "\n")
- (end-of-line -2))
-
-(defun nxhtml-script-tag-do-also ()
- (let ((type (popcmp-completing-read
- "Type: "
- '("Inlined"
- "Linked"))))
- (cond
- ((string= type "Inlined")
- (insert "type=\"text/javascript\">")
- (indent-according-to-mode)
- (insert "\n// <![CDATA[")
- (indent-according-to-mode)
- (insert "\n")
- (indent-according-to-mode)
- (insert "\n// ]]>")
- (indent-according-to-mode)
- (insert "\n</script>")
- (indent-according-to-mode)
- (end-of-line -1))
- ((string= type "Linked")
- (insert "type=\"text/javascript\"")
- (insert " src=\"")
- (nxhtml-redisplay-complete)
- (insert "></script>")))))
-
-(defun nxhtml-link-tag-do-also ()
- (let ((type (popcmp-completing-read "Type: "
- '(
- "Other"
- "Shortcut icon"
- "Style sheet"
- ))))
- (cond
- ((string= type "Style sheet")
- (insert " rel=\"Stylesheet\" ")
- (insert "type=\"text/css\" ")
- (insert "href=\"")
- (nxhtml-redisplay-complete)
- (insert " media=\"")
- (nxhtml-redisplay-complete)
- (insert " />"))
- ((string= type "Shortcut icon")
- (insert " rel=\"Shortcut Icon\" ")
- (insert "href=\"")
- (nxhtml-redisplay-complete)
- (insert " />"))
- (t
- (insert " ")
- (nxhtml-redisplay-complete)
- ))))
-
-(defun nxhtml-input-tag-do-also ()
- (insert " ")
- (rngalt-validate)
- ;; type=
- (insert "type=\"")
- (nxhtml-redisplay-complete)
- (insert " ")
-
- (let* ((choice (save-match-data
- (when (looking-back "type=\"\\(.*\\)\" ")
- (match-string 1)))))
- ;;(insert "type=\"" choice "\" ")
- (rngalt-validate)
- ;;(message "choice=%s" choice)(sit-for 2)
- ;; name=
- (when (member choice '("button" "checkbox" "file" "hidden" "image"
- "password" "radio" "text"))
- (insert "name=\""
- (read-string "Name (name): ")
- "\" ")
- (rngalt-validate))
- ;; checked=
- (when (member choice '("checkbox" "radio"))
- (when (y-or-n-p "Checked? (checked): ")
- (insert "checked=\"checked\" ")
- (rngalt-validate)))
- ;; disabled=
- (unless (string= choice "hidden")
- (unless (y-or-n-p "Enabled? : ")
- (insert "disabled=\"disabled\" ")
- (rngalt-validate)))
- ;; readonly=
- (when (string= choice "text")
- (when (y-or-n-p "Readonly? (readonly): ")
- (insert "readonly=\"readonly\" "))
- (rngalt-validate))
- (when (string= choice "file")
- ;; accept=
- (require 'mailcap)
- (condition-case err
- (let ((prompt (concat
- "Accept mime type, RET to stop ("
- "C-g to skip"
- "): "))
- (mime " ")
- mimes
- (types (when (boundp 'mailcap-mime-extensions)
- (mapcar (lambda (elt)
- (cdr elt))
- mailcap-mime-extensions))))
- (while (< 0 (length mime))
- (setq mime
- (if types
- (completing-read prompt types)
- (read-string prompt)))
- (when (< 0 (length mime))
- (if mimes
- (setq mimes (concat mimes "," mime))
- (setq mimes mime))))
- (when (and mimes
- (< 0 (length mimes)))
- (insert "accept=\"" mimes "\" ")))
- (quit (message "Skipped accept attribute")))
- (rngalt-validate))
- (when (string= choice "image")
- ;; alt=
- (insert "alt=\"")
- (rngalt-validate)
- (insert (read-string "Alt attribute: ")
- "\" ")
- (rngalt-validate)
- ;; src=
- (insert "src=\"")
- (rngalt-validate)
- (let ((src (nxhtml-read-url nil nil 'nxhtml-image-url-predicate "Image")))
- (insert src)
- (insert "\" "))
- (rngalt-validate))
- ;; value=
- (cond
- ((member choice '("button" "reset" "submit"))
- (nxhtml-do-also-value "Label"))
- ((member choice '("checkbox" "radio"))
- (nxhtml-do-also-value "Result"))
- ((member choice '("hidden" "password" "text"))
- (nxhtml-do-also-value "Value"))
- )
- (insert "/>")
- ;;(message "type=%s" choice)(sit-for 2)
- ))
-
-(defun nxhtml-do-also-value (label)
- (let ((v (read-string (concat label " (value): "))))
- (when (and v
- (< 0 (length v)))
- (insert " value=\"" v "\" "))))
-
-(defun nxhtml-form-tag-do-also ()
- (insert "action=\"")
- (rngalt-validate)
- (let ((src (nxhtml-read-url nil nil nil "Action")))
- (insert src "\" "))
- )
-
-(defun nxhtml-a-tag-do-also ()
- (insert " href=\"")
- (rngalt-validate)
- (insert (nxhtml-read-url t))
- (insert "\"")
- (let* ((pre-choices '("_blank" "_parent" "_self" "_top"))
- (all-choices (reverse (cons "None" (cons "Frame name" pre-choices))))
- choice
- (prompt "Target: "))
- (setq choice (popcmp-completing-read prompt all-choices nil t
- "" nil nil t))
- (unless (string= choice "None")
- (insert " target=\"")
- (cond ((member choice pre-choices)
- (insert choice "\""))
- ((string= choice "Frame name")
- (rngalt-validate)
- (insert (read-string "Frame name: ") "\""))
- (t (error "Uh?")))))
- (insert ">")
- (rngalt-validate)
- (insert (read-string "Link title: ")
- "</a>"))
-
-(defconst nxhtml-complete-tag-do-also
- '(("a" nxhtml-a-tag-do-also)
- ;; (lambda ()
- ;; (insert " href=\"")
- ;; (rngalt-validate)
- ;; (insert (nxhtml-read-url t))
- ;; (insert "\"")))
- ("form" nxhtml-form-tag-do-also)
- ("img" nxhtml-img-tag-do-also)
- ("input" nxhtml-input-tag-do-also)
- ("link" nxhtml-link-tag-do-also)
- ("script" nxhtml-script-tag-do-also)
- ("style" nxhtml-style-tag-do-also)
- ("meta" nxhtml-meta-tag-do-also)
- )
- "List of functions to call at tag completion.
-Each element of the list have the form
-
- \(TAG-NAME TAG-FUN)
-
-If `nxhtml-tag-do-also' is non-nil then TAG-FUN is called after
-by `nxml-complete' (with the special setup of this function for
-`nxhtml-mode') when completing a tag with the name TAG-NAME.
-
-The list is handled as an association list, ie only the first
-occurence of a tag name is used.")
-
-(defun nxhtml-complete-tag-do-also-for-state-completion (dummy-completed)
- "Add this to state completion functions completed hook."
- (when (and nxhtml-tag-do-also
- (derived-mode-p 'nxhtml-mode))
- ;; Find out tag
- (let ((tag nil))
- (save-match-data
- ;;(when (looking-back "<\\([a-z]+\\)[[:blank:]]+")
- (when (looking-back "<\\([a-z]+\\)")
- (setq tag (match-string 1))))
- (when tag
- (insert " ")
- (nxhtml-complete-tag-do-also tag)))))
-
-(defun nxhtml-complete-tag-do-also (tag)
- ;; First required attributes:
- (let ((tagrec (assoc tag nxhtml-complete-tag-do-also)))
- (when tagrec
- (funcall (cadr tagrec))))
- )
-
-
-;;;###autoload
-(define-minor-mode nxhtml-validation-header-mode
- "If on use a Fictive XHTML Validation Header for the buffer.
-See `nxhtml-set-validation-header' for information about Fictive XHTML Validation Headers.
-
-This mode may be turned on automatically in two ways:
-- If you try to do completion of a XHTML tag or attribute then
- `nxthml-mode' may ask you if you want to turn this mode on if
- needed.
-- You can also choose to have it turned on automatically whenever
- a mumamo multi major mode is used, see
- `nxhtml-validation-header-if-mumamo' for further information."
- :global nil
- :lighter " VH"
- :group 'nxhtml
- (if nxhtml-validation-header-mode
- (progn
- (unless nxhtml-current-validation-header
- (setq nxhtml-current-validation-header
- (nxhtml-get-default-validation-header)))
- ;;(message "nxhtml-current-validation-header=%s" nxhtml-current-validation-header)
- (if nxhtml-current-validation-header
- (progn
- (nxhtml-apply-validation-header)
- (add-hook 'change-major-mode-hook 'nxhtml-vhm-change-major nil t)
- (when (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- (add-hook 'mumamo-change-major-mode-hook 'nxhtml-vhm-mumamo-change-major nil t)
- (add-hook 'mumamo-after-change-major-mode-hook 'nxhtml-vhm-mumamo-after-change-major nil t)))
- (run-with-idle-timer 0 nil 'nxhtml-validation-header-empty (current-buffer))))
- (rngalt-set-validation-header nil)
- (setq nxhtml-current-validation-header nil)
- (remove-hook 'after-change-major-mode-hook 'nxhtml-vhm-after-change-major t)
- (when (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- (remove-hook 'mumamo-change-major-mode-hook 'nxhtml-vhm-mumamo-change-major t)
- (remove-hook 'mumamo-after-change-major-mode-hook 'nxhtml-vhm-mumamo-after-change-major t))))
-
-(defun nxhtml-can-insert-page-here ()
- (and (not nxhtml-validation-header-mode)
- (= 1 (point))
- (or (= 0 (buffer-size))
- (save-restriction
- (widen)
- (save-match-data
- (looking-at (rx buffer-start
- (0+ space)
- buffer-end)))))))
-
-(defun nxhtml-complete-first-try ()
- (when (nxhtml-can-insert-page-here)
- (nxhtml-empty-page-completion)))
-
-(defun nxhtml-completing-read-tag (prompt
- table
- &optional predicate require-match
- initial-input hist def inherit-input-method)
- (let ((popcmp-in-buffer-allowed t))
- (popcmp-completing-read prompt
- table
- predicate require-match
- initial-input hist def inherit-input-method
- nxhtml-help-tag
- nxhtml-tag-sets)))
-
-(defun nxhtml-add-required-to-attr-set (tag)
- (let ((missing (when tag
- (rngalt-get-missing-required-attr
- (nxthml-is-single-tag tag)))))
- (if (not missing)
- nxhtml-attr-sets
- (cons (cons "Required" missing)
- nxhtml-attr-sets))))
-
-(defun nxhtml-get-tag-specific-attr-help (tag)
- (append (cdr (assoc tag nxhtml-help-attribute-name-tag)) nxhtml-help-attribute-name)
- )
-
-(defconst nxhtml-in-start-tag-regex
- ;;(defconst rng-in-start-tag-name-regex
- (replace-regexp-in-string
- "w"
- xmltok-ncname-regexp
- ;; Not entirely correct since < could be part of attribute value:
- "<\\(w\\(?::w?\\)?\\)+ [^<]*"
- t
- t))
-
-(defun nxhtml-completing-read-attribute-name (prompt
- table
- &optional predicate require-match
- initial-input hist def inherit-input-method)
- (let* ((tag (save-match-data
- ;;(when (looking-back "<\\([a-z1-6]+\\) [^<]*")
- (when (looking-back nxhtml-in-start-tag-regex)
- (match-string 1))))
- (attr-sets (nxhtml-add-required-to-attr-set tag))
- (help-attr (nxhtml-get-tag-specific-attr-help tag))
- (popcmp-in-buffer-allowed t)
- )
- (popcmp-completing-read prompt
- table
- predicate require-match
- initial-input hist def inherit-input-method
- help-attr
- attr-sets)))
-
-(defun nxhtml-completing-read-attribute-value (prompt
- table
- &optional predicate require-match
- initial-input hist def inherit-input-method)
- (let (val)
- (if table
- (let ((popcmp-in-buffer-allowed t))
- (setq val (popcmp-completing-read prompt table
- predicate require-match
- initial-input hist def inherit-input-method)))
- (let* (init
- delimiter
- (lt-pos (save-excursion (search-backward "<" nil t)))
- (in-attr-val
- (save-excursion
- (re-search-backward rng-in-attribute-value-regex lt-pos t)))
- (in-xml-attr-val
- (unless in-attr-val
- (save-excursion
- (re-search-backward nxhtml-in-xml-attribute-value-regex lt-pos t))))
- )
- (when (or in-attr-val in-xml-attr-val)
- ;;(save-match-data (save-excursion (re-search-forward "\\=[^<> \t\r\n\"]*" nil t)))
- (let* ((name-start (match-beginning 1))
- (name-end (match-end 1))
- (colon (match-beginning 2))
- (attr (buffer-substring-no-properties name-start
- (or colon name-end)))
- (value-start (1+ (match-beginning 3)))
- tag-start-end
- (tag (save-excursion
- (when (search-backward-regexp "<[[:alpha:]]+" nil t)
- (setq tag-start-end (match-end 0))
- (match-string-no-properties 0)))))
- (setq init (buffer-substring-no-properties value-start (point)))
- (setq delimiter (char-before value-start))
- (if in-xml-attr-val
- (error "in-xml-attr-val should not be true here!")
- ;; (cond ((string= "encoding" attr)
- ;; ;; Give a default that works in browsers today
- ;; (setq val (nxhtml-coding-systems-complete
- ;; init
- ;; (symbol-name nxhtml-default-encoding))))
- ;; ((string= "version" attr)
- ;; (setq val "1.0")))
- (cond ((string= "rel" attr)
- (cond ((string= "<link" tag)
- (setq val (nxhtml-read-link-rel))
- )))
- ((string= "media" attr)
- (cond ((string= "<link" tag)
- (setq val (nxhtml-read-link-media)))
- ((string= "<style" tag)
- (setq val (nxhtml-read-link-media)))
- ))
- ((string= "type" attr)
- (cond ((string= "<link" tag)
- (setq val (nxhtml-read-link-type))
- )))
- ((string= "http-equiv" attr)
- (cond ((string= "<meta" tag)
- (setq val (nxhtml-read-meta-http-equiv)))))
- ((string= "content" attr)
- (cond ((string= "<meta" tag)
- (setq val (nxhtml-read-meta-content)))))
- ((string= "scheme" attr)
- (cond ((string= "<meta" tag)
- (setq val (nxhtml-read-meta-scheme)))))
- ((string= "name" attr)
- (cond ((string= "<meta" tag)
- (setq val (nxhtml-read-meta-name)))))
- ((string= "href" attr)
- (cond ((string= "<a" tag)
- (setq val (nxhtml-read-url t init)))
- ((string= "<base" tag)
- (setq val (nxhtml-read-url nil init nil "Base")))
- ((string= "<area" tag)
- (setq val (nxhtml-read-url nil init)))
- ((string= "<link" tag)
- (let (predicate
- (here (point)))
- (save-excursion
- (goto-char tag-start-end)
- (cond
- ((search-forward "text/css" here nil)
- (setq predicate 'nxhtml-css-url-predicate))
- ))
- (setq val (nxhtml-read-url nil init predicate))))
- (t
- (setq val (nxhtml-read-url nil init)))))
- ((string= "src" attr)
- (cond ((string= "<img" tag)
- (setq val (nxhtml-read-url nil init 'nxhtml-image-url-predicate "Image")))
- ((string= "<script" tag)
- (setq val (nxhtml-read-url nil init 'nxhtml-script-url-predicate "Script")))
- ((string= "<input" tag)
- (setq val (nxhtml-read-url nil init 'nxhtml-image-url-predicate "Image")))
- ((string= "<frame" tag)
- (setq val (nxhtml-read-url nil init nil "Frame Source")))
- ((string= "<iframe" tag)
- (setq val (nxhtml-read-url nil init nil "Frame Source")))
- (t
- (setq val (nxhtml-read-url nil init)))))))))))
- ;;(unless val (setq val (read-from-minibuffer prompt init)))
- (if (not val)
- (progn
- (message "No completion of attribute value available here")
- nil)
- val)))
-
-(defun nxhtml-read-link-type ()
- (require 'mailcap)
- (let ((types (when (boundp 'mailcap-mime-extensions)
- (mapcar (lambda (elt)
- (cdr elt))
- mailcap-mime-extensions))))
- (completing-read "Link type: " types nil t)))
-
-(defun nxhtml-read-link-media ()
- (let ((types '(
- "screen"
- "tty"
- "tv"
- "projection"
- "handheld"
- "print"
- "braille"
- "aural"
- "all"
- )))
- (popcmp-completing-read "For media type: " types nil t)))
-
-(defun nxhtml-read-link-rel ()
- (let ((predefined-linktypes '(
- "Alternate"
- "Appendix"
- "Bookmark"
- "Chapter"
- "Contents"
- "Copyright"
- "Glossary"
- "Help"
- "Index"
- "Next"
- "Prev"
- "Section"
- "Shortcut Icon"
- "Start"
- "Stylesheet"
- "Subsection"
- )))
- (popcmp-completing-read "Predefined LinkTypes: " predefined-linktypes nil t)))
-
-(defun nxhtml-read-meta-name ()
- (let ((types '(
- "author"
- "description"
- "keywords"
- "generator"
- "revised"
- ;;"others"
- )))
- (popcmp-completing-read "Meta name: " types nil t)))
-
-(defun nxhtml-read-meta-content ()
- (nxhtml-read-from-minibuffer "Meta content: "))
-
-(defun nxhtml-read-meta-scheme ()
- (nxhtml-read-from-minibuffer "Meta scheme: "))
-
-(defun nxhtml-read-meta-http-equiv ()
- (let ((types '(
- "content-type"
- "expires"
- "refresh"
- "set-cookie"
- )))
- (popcmp-completing-read "Meta http-equiv: " types nil t)))
-
-(when nil
- (setq rngalt-completing-read-tag nil)
- (setq rngalt-complete-last-try nil)
- )
-
-
-(when (featurep 'typesetter)
- (defun typesetter-init-nxhtml-mode ()
- (typesetter-init-html-mode))
- )
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Validation start state
-
-(defcustom nxhtml-validation-headers
- '(
- ("body-iso-8859-1" .
- "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title>Fictive XHTML Validation Header</title>
- </head>
- <body>
-"
- )
- ("head-iso-8859-1" .
- "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
-"
- )
- ("html-iso-8859-1" .
- "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
-"
- )
- ;; ("doctype-iso-8859-1" .
- ;; "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
- ;; <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
- ;; \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
- ;; "
- ;; )
- ;; ("xml-iso-8859-1" .
- ;; "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
- ;; "
- ;; )
-
- ("body-utf-8" .
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title>Fictive XHTML Validation Header</title>
- </head>
- <body>
-"
- )
- ("head-utf-8" .
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
-"
- )
- ("head-closed-utf-8" .
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title></title>
- </head>
-"
- )
- ("html-utf-8" .
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
-"
- )
- ;; ("doctype-utf-8" .
- ;; "<?xml version=\"1.0\" encoding=\"utf-8\"?>
- ;; <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
- ;; \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
- ;; "
- ;; )
- ;; ("xml-utf-8" .
- ;; "<?xml version=\"1.0\" encoding=\"utf-8\"?>
- ;; "
- ;; )
- )
- "Fictive XHTML validation headers.
-Used by `nxhtml-set-validation-header'."
- :type '(alist :key-type string :value-type string)
- :group 'nxhtml)
-
-(defcustom nxhtml-default-validation-header nil
- "Default Fictive XHTML validation header.
-Must be nil or one of the key values in
-`nxhtml-validation-headers'."
- :type 'string
- :set (lambda (sym val)
- (if (or (null val)
- (assoc val nxhtml-validation-headers))
- (set-default sym val)
- (lwarn 'nxhtml-default-validation-header
- :warning "There is no Fictive XHTML Validation Header named %s" val)))
- :group 'nxhtml)
-
-(defun nxhtml-must-have-validation-headers ()
- (unless nxhtml-validation-headers
- (error
- "No XHTML validation headers. Please customize nxhtml-validation-headers.")))
-
-(defvar nxhtml-set-validation-header-hist nil)
-
-(defcustom nxhtml-guess-validation-header-alist
- ;;(rx line-start (0+ blank) "<body")
- '(
- ("^[[:blank:]]*<body" . "body-utf-8")
- ("^[[:blank:]]*</head>" . "head-closed-utf-8")
- ("^[[:blank:]]*<head" . "head-utf-8")
- ("^[[:blank:]]*<html" . "html-utf-8")
- )
- "Alist used by `nxhtml-guess-validation-header'.
-Alternatives are tried from top to bottom until one fits."
- :type '(alist :key-type (regexp :tag "If NOT found in buffer")
- :value-type (string :tag "Use Fictive XHTML Validation Header"))
- :group 'nxhtml)
-
-(defun nxhtml-guess-validation-header ()
- "Return Fictive XHTML validation that could fit current buffer.
-This guess is made by matching the entries in
-`nxhtml-guess-validation-header-alist' against the buffer."
- (nxhtml-must-have-validation-headers)
- (save-excursion
- (save-restriction
- (save-match-data
- (widen)
- (let (rec
- regexp
- key
- (guesses nxhtml-guess-validation-header-alist))
- (goto-char (point-min))
- (if (not (search-forward "</" 2000 t))
- (progn
- (setq rec (car guesses))
- (setq key (cdr rec)))
- (while (and guesses
- (not key))
- (setq rec (car guesses))
- (setq guesses (cdr guesses))
- (setq regexp (car rec))
- (goto-char (point-min))
- ;; Fix-me: check for chunk and check if in string.
- (let (found)
- (while (and (not found)
- (re-search-forward regexp nil t))
- ;; ensure fontified, but how?
- (when (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- (let ((mumamo-just-changed-major nil))
- ;;(unless (and (mumamo-get-existing-chunk-at (point))
- (unless (and (mumamo-find-chunks (point) "guess-validation-header")
- (eq t (get-text-property (point) 'fontified)))
- (mumamo-fontify-region (point-min) (+ 1000 (point))))))
- (unless (memq (get-text-property (point) 'face)
- '(font-lock-comment-face
- font-lock-comment-delimiter-face
- font-lock-doc-face
- font-lock-string-face
- ))
- (setq found t)))
- (unless found
- (setq key (cdr rec))))))
- ;;(unless (re-search-forward regexp nil t) (setq key (cdr rec)))))
- key)))))
-
-(defun nxhtml-open-dir-saved-validation-headers (must-exist)
- "Open file with saved validation headers and return buffer."
- ;;(lwarn 't :warning "must-exist=%s" must-exist)
- (when (buffer-file-name)
- (let* ((dir-name (file-name-directory (buffer-file-name)))
- (file-name (expand-file-name "nxhtml-val-headers.el"))
- emacs-lisp-mode-hook)
- (when (or (not must-exist)
- (file-exists-p file-name))
- (find-file-noselect file-name)))))
-
-(defun nxhtml-get-saved-validation-header ()
- (when (buffer-file-name)
- (let* ((val-buf (nxhtml-open-dir-saved-validation-headers t))
- (file-name (file-name-nondirectory (buffer-file-name)))
- validation-headers)
- (when val-buf
- (with-current-buffer val-buf
- (eval-buffer))
- (cadr (assoc file-name validation-headers))))))
-
-(defun nxhtml-remove-saved-validation-header ()
- "Removed the saved validation header.
-Reverse the action done by `nxhtml-save-validation-header'."
- (interactive)
- (nxhtml-update-saved-validation-header nil))
-
-(defun nxhtml-save-validation-header ()
- "Save the current validation header.
-The current validation is saved for the next time you open the
-current file. It is then used by `nxhtml-validation-header-mode'
-and `nxhtml-set-validation-header'. This means that if you have
-turned on `nxhtml-global-validation-header-mode' this validation
-header will be set automatically.
-
-The saved validation header can be removed with
-`nxhtml-remove-saved-validation-header'.
-
-* Note: There is normally no need to save the validation headers
- since `nxhtml-global-validation-header-mode' will add
- validation headers as needed most of the time."
- (interactive)
- (nxhtml-update-saved-validation-header t))
-
-(defun nxhtml-update-saved-validation-header (save)
- (unless (buffer-file-name)
- (error "Validation Header can only be saved if buffer contains a file."))
- (let* ((val-buf (nxhtml-open-dir-saved-validation-headers nil))
- ;;(get-buffer-create "temp val head"))
- validation-headers
- (file-name (file-name-nondirectory (buffer-file-name)))
- (entry (list file-name nxhtml-current-validation-header))
- ;;entry-list
- removed
- )
- ;; Get old headers
- (with-current-buffer val-buf
- (eval-buffer))
- ;; Remove old value
- (setq validation-headers
- (delq nil
- (mapcar (lambda (elt)
- (if (string= file-name (car elt))
- (progn
- (setq removed t)
- nil)
- elt))
- validation-headers)))
- ;; Add new value
- (when save
- (setq validation-headers (cons entry validation-headers)))
- (with-current-buffer val-buf
- (erase-buffer)
- ;;(print file-name val-buf)
- ;;(print nxhtml-current-validation-header val-buf)
- ;;(print entry val-buf)
- (insert "(setq validation-headers (quote")
- (print validation-headers val-buf)
- (insert "))")
- (basic-save-buffer)
- )
- (if save
- (message "Current validation header for file saved")
- (if removed
- (message "Removed saved validation header")
- (message "There was no saved validation header")))))
-
-(defun nxhtml-get-default-validation-header ()
- "Return default Fictive XHTML validation header key for current buffer.
-If `nxhtml-default-validation-header' is non-nil then return
-this. Otherwise return saved validation header if there is one
-or guess using `nxhtml-guess-validation-header'."
- (or nxhtml-default-validation-header
- (nxhtml-get-saved-validation-header)
- (nxhtml-guess-validation-header)))
-
-(defun nxhtml-set-validation-header (&optional key)
- "Set a Fictive XHTML validation header in the buffer.
-Such a header is not inserted in the buffer, but is only used by
-validation and XHTML completion by `nxhtml-mode'.
-
-The header is active for validation and completion if and only if
-`nxhtml-validation-header-mode' is on.
-
-Note that Fictive XHTML Validation Headers are normally chosen
-automatically, but you can use this function to override that choice.
-
-The header is chosen from `nxhtml-validation-headers'. If there
-is more than one you will be prompted. To set the default fictive
-XHTML validation header customize `nxhtml-validation-headers'.
-
-If called non-interactive then the header corresponding to key
-KEY will be used. If KEY is nil then it is set to
-`nxhtml-default-validation-header'.
-
-This header can be visible or invisible in the buffer, for more
-information see `rngalt-show-validation-header'."
- (interactive
- (list
- (let ((nh (length nxhtml-validation-headers))
- (default (nxhtml-get-default-validation-header)))
- (if (> nh 1)
- (completing-read "XHTML validation header: "
- nxhtml-validation-headers
- nil
- t
- default
- nxhtml-set-validation-header-hist)
- (if (not (y-or-n-p "Only one XHTML validation header is defined. Define more? "))
- default
- (customize-option 'nxhtml-validation-headers)
- 'adding)))))
- ;;(lwarn 'svh2 :warning "key=%s" key)
- (or key
- (setq key (nxhtml-get-default-validation-header))
- (setq key (cons 'schema "XHTML")))
- (unless (eq key 'adding)
- (setq nxhtml-current-validation-header key)
- (nxhtml-validation-header-mode 1)
- (nxhtml-apply-validation-header)))
-
-(defun nxhtml-apply-validation-header ()
- (when nxhtml-current-validation-header
- (setq rngalt-major-mode
- (if (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- (mumamo-main-major-mode)
- major-mode))
- (let* ((key nxhtml-current-validation-header)
- (rec (unless (listp key)
- (assoc key nxhtml-validation-headers)))
- (header (cdr rec)))
- (if (listp key)
- (let ((schema-file (rng-locate-schema-file (cdr key))))
- (unless schema-file
- (error "Could not locate schema for type id `%s'" key)) ;type-id))
- (rng-set-schema-file-1 schema-file))
- (rngalt-set-validation-header header)
- ))))
-
-(defun nxhtml-update-validation-header ()
- "Update the validation header in the buffer as needed."
- (interactive)
- (let ((mode-on nxhtml-validation-header-mode))
- (when mode-on (nxhtml-validation-header-mode 0))
- (setq nxhtml-current-validation-header nil)
- (when mode-on (nxhtml-validation-header-mode 1))))
-
-(defun nxhtml-vhm-change-major ()
- "Turn off `nxhtml-validation-header-mode' after change major."
- ;;(message "nxhtml-vhm-change-major here")
- (unless (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- (setq nxhtml-current-validation-header nil))
- (run-with-idle-timer 0 nil 'nxhtml-validation-header-empty (current-buffer)))
-(put 'nxhtml-vhm-change-mode 'permanent-local-hook t)
-
-(defun nxhtml-recheck-validation-header ()
- "Just turn off and on again `nxhtml-validation-header-mode'.
-This will adjust the XHTML validation to the code currently in
-the buffer."
- (interactive)
- (nxhtml-validation-header-mode -1)
- (nxhtml-validation-header-mode 1))
-
-(defun nxhtml-validation-header-empty (buffer)
- "Turn off validation header mode.
-This is called because there was no validation header."
- (with-current-buffer buffer
- (unless nxhtml-current-validation-header
- ;;(message "nxhtml-validation-header-empty")
- (save-match-data ;; runs in timer
- (nxhtml-validation-header-mode -1))
- ;;(message "No validation header was needed")
- )))
-
-(defun nxhtml-turn-on-validation-header-mode ()
- "Turn on `nxhtml-validation-header-mode'."
- (nxhtml-validation-header-mode 1))
-
-
-(defun nxhtml-vhm-mumamo-change-major ()
- (put 'rngalt-validation-header 'permanent-local t)
- (put 'nxhtml-validation-header-mode 'permanent-local t)
- (put 'nxhtml-current-validation-header 'permanent-local t)
- ;;(put 'nxhtml-validation-header-mode-major-mode 'permanent-local t)
- ;;(setq nxhtml-validation-header-mode-major-mode mumamo-set-major-running)
- )
-
-(defun nxhtml-vhm-mumamo-after-change-major ()
- (put 'rngalt-validation-header 'permanent-local nil)
- (put 'nxhtml-validation-header-mode 'permanent-local nil)
- (put 'nxhtml-current-validation-header 'permanent-local nil)
- ;;(put 'nxhtml-validation-header-mode-major-mode 'permanent-local nil)
- )
-
-(defcustom nxhtml-validation-headers-check 'html
- "Defines what check the function with the same name does.
-The function returns true if the condition here is met."
- :type '(choice :tag "Add Fictive XHTML Validation Header if:"
- (const :tag "If buffer contains html" html)
- (const :tag "If buffer contains html or is empty" html-empty))
- :group 'nxhtml)
-
-;; (defun nxhtml-validation-headers-check (buffer)
-;; "Return non-nil if buffer contains a html tag or is empty.
-;; This is for use with `nxhtml-validation-header-filenames'.
-
-;; The variable `nxhtml-validation-headers-check' determines how the
-;; check is made."
-;; (if (= 0 (buffer-size buffer))
-;; (eq 'html-empty nxhtml-validation-headers-check)
-;; (save-match-data
-;; (save-restriction
-;; (let ((here (point))
-;; (html nil))
-;; (goto-char (point-min))
-;; (setq html (re-search-forward "</?[a-z]+>" nil t))
-;; (goto-char here)
-;; html)))))
-
-;; (defcustom nxhtml-validation-header-filenames
-;; '(
-;; ("\.php\\'" nxhtml-validation-headers-check)
-;; ("\.rhtml\\'" nxhtml-validation-headers-check)
-;; ("\.jsp\\'" nxhtml-validation-headers-check)
-;; ("\.gsp\\'" nxhtml-validation-headers-check)
-;; )
-;; "Alist for turning on `nxhtml-validation-mode'.
-;; The entries in the list should have the form
-
-;; \(FILE-REGEXP CHECK-FUNCION)
-
-;; If buffer file name matches the regexp FILE-REGEXP and the
-;; function CHECK-FUNCTION returns non-nil when called with the
-;; buffer as an argument \(or CHECK-FUNCTION is nil) then
-;; `nxhtml-global-validation-header-mode' will turn on
-;; `nxhtml-validation-header-mode' in buffer.
-
-;; The function `nxhtml-validation-headers-check' may be a useful
-;; value for CHECK-FUNCTION.
-
-;; See also `nxhtml-maybe-turn-on-validation-header'."
-;; :type '(alist :key-type regexp :tag "File name regexp"
-;; :value-type (group (choice (const :tag "No more check" nil)
-;; (function :tag "Check buffer with"))))
-;; :group 'nxhtml)
-
-
-
-;; (defun nxhtml-maybe-turn-on-validation-header ()
-;; "Maybe turn on `nxhtml-validation-header-mode' in buffer.
-;; This is called by `nxhtml-global-validation-header-mode'.
-
-;; See `nxhtml-validation-header-filenames' for how the check
-;; is made."
-;; (or (and (or (and mumamo-mode
-;; (eq (mumamo-main-major-mode) 'nxhtml-mode))
-;; (eq major-mode 'nxhtml-mode))
-;; rngalt-validation-header
-;; nxhtml-current-validation-header
-;; nxhtml-validation-header-mode
-;; (progn
-;; ;;(lwarn 'maybe :warning "quick, buffer=%s" (current-buffer))
-;; (nxhtml-validation-header-mode 1)
-;; t))
-;; (when (buffer-file-name)
-;; (unless (or ;;nxhtml-validation-header-mode
-;; (minibufferp (current-buffer))
-;; (string= " " (substring (buffer-name) 0 1))
-;; (string= "*" (substring (buffer-name) 0 1))
-;; )
-;; (when (catch 'turn-on
-;; (save-match-data
-;; (dolist (rec nxhtml-validation-header-filenames)
-;; (when (string-match (car rec) (buffer-file-name))
-;; (let ((fun (nth 1 rec)))
-;; (if (not fun)
-;; (progn
-;; ;;(lwarn 't :warning "matched %s to %s, nil" (car rec) (buffer-file-name))
-;; (throw 'turn-on t))
-;; (when (funcall fun (current-buffer))
-;; ;;(lwarn 't :warning "matched %s to %s" (car rec) (buffer-file-name))
-;; (throw 'turn-on t))))))))
-;; ;;(lwarn 't :warning "turn on %s, buffer=%s" major-mode (current-buffer))
-;; (nxhtml-validation-header-mode 1))))))
-
-
-;; ;; Fix-me: Is this really the way to do it? Would it not be better to
-;; ;; tie this to mumamo-mode in the turn on hook there? After all
-;; ;; validation headers are probably not used unless mumamo-mode is on.
-;; (define-globalized-minor-mode nxhtml-global-validation-header-mode
-;; nxhtml-validation-header-mode
-;; nxhtml-maybe-turn-on-validation-header
-;; :group 'nxhtml)
-;; ;; The problem with global minor modes:
-;; (when (and nxhtml-global-validation-header-mode
-;; (not (boundp 'define-global-minor-mode-bug)))
-;; (nxhtml-global-validation-header-mode 1))
-
-
-(defcustom nxhtml-validation-header-mumamo-modes
- '(nxhtml-mode)
- "Main major modes for which to turn on validation header.
-Turn on Fictive XHTML Validation Header if main major mode for the
-used mumamo multi major mode is any of those in this list.
-
-See `mumamo-defined-turn-on-functions' for information about
-mumamo multi major modes."
- :type '(repeat (function :tag "Main major mode in mumamo"))
- :group 'nxhtml)
-
-(defun nxhtml-add-validation-header-if-mumamo ()
- "Maybe turn on validation header.
-See `nxhtml-validation-header-if-mumamo' for more information."
- ;;(nxhtml-validation-headers-check (current-buffer))
- (when (and (fboundp 'mumamo-main-major-mode)
- (memq (mumamo-main-major-mode) nxhtml-validation-header-mumamo-modes))
- (nxhtml-validation-header-mode 1)))
-
-;;(define-toggle nxhtml-validation-header-if-mumamo nil
-(define-minor-mode nxhtml-validation-header-if-mumamo
- "Add a fictive validation header when mumamo is used.
-If this variable is t then add a Fictive XHTML Validation Header
-\(see `nxhtml-validation-header-mode') in buffer when mumamo is
-used. However do this only if `mumamo-main-major-mode' is one of
-those in `nxhtml-validation-header-mumamo-modes'.
-
-Changing this variable through custom adds/removes the function
-`nxhtml-add-validation-header-if-mumamo' to
-`mumamo-turn-on-hook'."
- :global t
- :group 'nxhtml
- (if nxhtml-validation-header-if-mumamo
- (add-hook 'mumamo-turn-on-hook 'nxhtml-add-validation-header-if-mumamo)
- (remove-hook 'mumamo-turn-on-hook 'nxhtml-add-validation-header-if-mumamo)))
-
-(defun nxhtml-validation-header-if-mumamo-toggle ()
- "Toggle `nxhtml-validation-header-if-mumamo'."
- (interactive)
- (nxhtml-validation-header-if-mumamo (if nxhtml-validation-header-if-mumamo -1 1)))
-
-(defun nxhtml-warnings-are-visible ()
- (get 'rng-error 'face))
-
-(defvar nxhtml-old-rng-error-face nil)
-(defun nxhtml-toggle-visible-warnings ()
- "Toggle the red underline on validation errors.
-Those can be quite disturbing when using mumamo multi major modes
-because there will probably be many validation errors in for
-example a php buffer, since unfortunately the validation routines
-in `rng-validate-mode' from `nxml-mode' tries to validate the
-whole buffer as XHTML.
-
-Also, because of a \(normally unimportant) bug in Emacs 22,
-the red underline that marks an error will sometimes span several
-lines instead of just marking a single character as it
-should. \(This bug is a problem with overlays in Emacs 22.)"
- (interactive)
- (let ((face (get 'rng-error 'face)))
- (if face
- (progn
- (setq nxhtml-old-rng-error-face (get 'rng-error 'face))
- (put 'rng-error 'face nil))
- (put 'rng-error 'face nxhtml-old-rng-error-face))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Bug corrections
-;; (defun nxml-indent-line ()
-;; "Indent current line as XML."
-;; (let ((indent (nxml-compute-indent))
-;; (from-end (- (point-max) (point))))
-;; (when indent
-;; (beginning-of-line)
-;; (let ((bol (point)))
-;; (skip-chars-forward " \t")
-;; ;; There is a problem with some lines, try a quick fix:
-;; (when (and (= 0 indent)
-;; (not (eq (char-after) ?<)))
-;; (save-excursion
-;; (save-match-data
-;; (when (re-search-backward "^<" nil t)
-;; (when (search-forward " ")
-;; (setq indent (current-column))))))
-;; (when (= 0 indent)
-;; (setq indent nxml-child-indent)))
-;; ;; And sometimes nxml-compute-indent get very upset, check for
-;; ;; that:
-;; (let ((here (point)))
-;; (beginning-of-line 0)
-;; (back-to-indentation)
-;; (when (and (= indent (current-column))
-;; (eq (char-after) ?\"))
-;; (setq indent 0))
-;; (goto-char here))
-;; (unless (= (current-column) indent)
-;; (delete-region bol (point))
-;; (indent-to indent)))
-;; (when (> (- (point-max) from-end) (point))
-;; (goto-char (- (point-max) from-end))))))
-
-
-;; FIX-ME: untag should be in nxml-mode.el since it is in no way
-;; specific to nxhtml-mode, but I do not want to change nxml-mode.el
-;; at the moment.
-
-(defcustom nxml-untag-select 'yes
- "Decide whether to select an element untagged by `nxml-untag-element'.
-If this variable is 'yes the element is selected after untagging
-the element. The mark is set at the end of the element and point
-at the beginning of the element.
-
-If this variable is 'no then the element is not selected and
-point is not moved. If it is 'ask the user is asked what to do."
- :type '(choice (const :tag "Yes" yes)
- (const :tag "No" no)
- (const :tag "Ask" ask))
- :group 'nxml)
-
-(defun nxml-untag-element (arg)
- "Remove start and end tag from current element.
-The mark is by default set to the end of the former element and
-point is moved to the beginning. Mark is also activated so that
-it is easy to surround the former element with a new tag.
-
-Whether to select the old element is controlled by
-`nxml-untag-select'. The meaning of the values 'yes and 'no for
-this variable is flipped by using a universal argument.
-
-Note: If you want to `undo' the untag and you use
-`transient-mark-mode' then you must first do something so that
-the region is not highlighted (for example C-g)."
- (interactive "*P")
- (let ((here (point-marker))
- el-start
- el-start-end
- el-end
- el-end-end
- (select t))
- (nxml-backward-up-element)
- (setq el-start (point))
- (nxml-forward-balanced-item)
- (setq el-start-end (point))
- (goto-char el-start)
- (nxml-forward-element)
- (setq el-end-end (point-marker))
- (nxml-backward-single-balanced-item)
- (setq el-end (point))
- (delete-region el-end el-end-end)
- (delete-region el-start el-start-end)
- ;; Select the element or not?
- (if (eq nxml-untag-select 'ask)
- (setq select (y-or-n-p "Select the old element? "))
- (when (eq nxml-untag-select 'no)
- (setq select nil))
- (when arg
- (setq select (not select))))
- (if (not select)
- (goto-char here)
- (goto-char el-end-end)
- (push-mark nil t t)
- (setq mark-active t)
- (setq deactivate-mark nil)
- (goto-char el-start))))
-
-(defun nxhtml-rollover-insert-2v ()
- "Insert CSS rollover images.
-The upper half of the image will be used when mouse is out and
-the lower half when mouse is over the image.
-
-Only CSS is used for the rollover. The CSS code is written to the
-header part of the file if possible, otherwise it is copied to
-the kill ring/clipboard.
-
-The CSS code is built from a template file and the image size.
-
-This might be used for example for creating a menu with
-alternatives vertically or horizontally.
-
-Usage example:
-
- If you want to make a small button style menu with images you
- can start like this:
-
- <div id=\"mylinks\">
- <ul>
- <li>
- X <a href=\"news.html\">News and Notes</a>
- </li>
- <li>
- <a href=\"doc.html\">Documentation</a>
- </li>
- <ul>
- </div>
-
- Then put point at the X above (this is just a mark, should not
- be in your code) and call this function.
-
- It will add some CSS code to in the header of your file. You
- may want to tweak this a little bit, see below (or place it
- somewhere else). It may look like this:
-
- #mylinks a {
- /* Image */
- display: block;
- background: transparent url(\"img/mybutton.png\") 0 0 no-repeat;
- overflow: hidden;
- width: 200px;
- /* Text placement and size, etc */
- text-align: center;
- /* You may need to change top and bottom padding depending
- on font size. */
- padding-top: 11px;
- font-size: 12px;
- padding-bottom: 9px;
- text-decoration: none;
- white-space: nowrap;
- border: none;
- }
- #mylinks a:hover {
- background-position: 0 -35px;
- }
- #mylinks li {
- display: inline;
- padding: 0;
- margin: 0;
- float: none;
- }
-
-For an example of usage see the file nxhtml.html that comes with
-nXhtml and can be opened from the nXhtml menu under
-
- nXhtml / nXhtml Help and Setup / nXhtml version nn Overview"
- (interactive)
- ;; Fix-me: not quite ready yet, but should work OK."
- (save-excursion
- (let* ((tag (progn
- (search-forward ">" nil t)
- (unless (re-search-backward (rx "<"
- (1+ (any "a-zA-Z:"))
- (1+ (not (any ">")))
- " id=\""
- (submatch (+? anything))
- "\"")
- nil t)
- (error "Can't find tag with id backwards"))
- (match-string-no-properties 0)))
- (tagid (match-string-no-properties 1))
- (tagovl (let ((ovl (make-overlay
- (match-beginning 0) (match-end 0))))
- (overlay-put ovl 'face 'highlight)
- ovl))
- (head-end (save-excursion (search-backward "</head" nil t))))
- (unless head-end
- (error "Can't find end of head tag. Need this to insert css."))
- (sit-for 1)
- (unwind-protect
- (condition-case err
- (let* ((img-src (nxhtml-read-url
- '(?f) nil 'nxhtml-image-url-predicate
- (concat "Rollover image for \"" tag "\",")))
- (img-sizes (when (file-exists-p img-src)
- (image-size (create-image
- (expand-file-name img-src))
- t)))
- (class (read-string
- (concat
- "Class name for rollover (empty to use id="
- tagid "): ")))
- (rollover-spec (if (< 0 (length class))
- (concat "." class)
- (concat "#" tagid)))
- img-width img-height
- img-h2
- img-w2
- padding-top
- padding-bottom
- (font-size (read-number "Font size (px): " 12))
- (css-template-file (read-file-name
- "CSS template file: "
- (expand-file-name "etc/templates/" nxhtml-install-dir)
- nil
- t
- "rollover-2v.css"
- ))
- (center-or-pad
- (if (y-or-n-p "Do you want to center the text? ")
- "text-align: center"
- (format "padding: %spx" (/ font-size 2))))
- (hor-or-ver
- (if (y-or-n-p "Do you want the alternatives shown in a vertical list? ")
- "float: none"
- "float: left"))
- (css-template-buffer (find-file-noselect
- css-template-file))
- (css-template (with-current-buffer css-template-buffer
- ;; Do not widen, let user decide.
- (buffer-substring-no-properties
- (point-min) (point-max))))
- (css css-template))
- (unless (file-exists-p css-template-file)
- (error "Can't find file %s" css-template-file))
- (if img-sizes
- (progn
- (setq img-width (car img-sizes))
- (setq img-height (cdr img-sizes)))
- (setq img-width (read-number "Width: "))
- (setq img-height (read-number "Width: ")))
- (setq img-h2 (/ img-height 2))
- (setq img-w2 (/ img-width 2))
- (setq padding-top (/ (- img-h2 font-size) 2))
- ;; Fix-me: I have no idea why I have to subtract 3
- ;; from bottom, but inspection with Firebug seems to
- ;; say so:
- (setq padding-bottom (- img-h2 padding-top font-size 3))
- (setq css (replace-regexp-in-string "ROLLOVER_SPEC" rollover-spec css t t))
- (setq css (replace-regexp-in-string "IMG_WIDTH_2" (number-to-string img-h2) css t t))
- (setq css (replace-regexp-in-string "IMG_HEIGHT_2" (number-to-string img-h2) css t t))
- (setq css (replace-regexp-in-string "IMG_WIDTH" (number-to-string img-width) css t t))
- (setq css (replace-regexp-in-string "IMG_HEIGHT" (number-to-string img-height) css t t))
- (setq css (replace-regexp-in-string "IMG_URL" img-src css t t))
- (setq css (replace-regexp-in-string "FONT_SIZE" (number-to-string font-size) css t t))
- (setq css (replace-regexp-in-string "PADDING_TOP" (number-to-string padding-top) css t t))
- (setq css (replace-regexp-in-string "PADDING_BOTTOM" (number-to-string padding-bottom) css t t))
- (setq css (replace-regexp-in-string "CENTER_OR_PAD" center-or-pad css t t))
- (setq css (replace-regexp-in-string "HOR_OR_VER" hor-or-ver css t t))
- (if head-end
- (let ((this-window (selected-window)))
- (find-file-other-window buffer-file-name)
- (goto-char head-end)
- (beginning-of-line)
- (insert "<style type=\"text/css\">\n"
- css
- "\n</style>\n")
- (select-window this-window))
- (kill-new css)
- (message "No place to insert CSS, copied to clipboard instead"))))
- (delete-overlay tagovl)
- ))))
-
-;; Fix-me: image border 0
-;; Fix-me: SSI <!--#include file="file:///C|/EmacsW32/nxml/nxhtml/bug-tests/bug-080609.html" -->
-;; Fix-me: Better a tag completion, target etc.
-;; Fix-me: image map - is that possible now?
-;; Fix-me: Special chars - completing on &? Or popup? Use nxml-insert-named-char
-;; Fix-me: Quick table insert? A form?
-;; Fix-me: Quick object insert? (applet is depreceated)
-;; Fix-me: Better meta insert? Quick meta?
-;; Fix-me: Quick div! Better div completion with position: static,
-;; relative, absolute and fixed - with some explanations.
-;; Fix-me: Quick hr?
-;; Fix-me: Import CSS? Export CSS?
-;; Fix-me: Use nxhtml-js.el?
-;; Fix-me: Scroll bar colors etc? See 1stPage.
-;; body {
-;; scrollbar-arrow-color: #FF6699;
-;; scrollbar-3dlight-color: #00FF33;
-;; scrollbar-highlight-color: #66FFFF;
-;; scrollbar-face-color: #6699FF;
-;; scrollbar-shadow-color: #6633CC;
-;; scrollbar-darkshadow-color: #660099;
-;; scrollbar-track-color: #CC6633;
-;; }
-;; Fix-me: More quick menus: http://www.cssplay.co.uk/menus/
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(provide 'nxhtml-mode)
-
-;;; nxhtml-mode.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el b/emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el
deleted file mode 100644
index 83dca7b..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el
+++ /dev/null
@@ -1,365 +0,0 @@
-;;; nxhtml-mumamo.el --- Multi major modes using nxhtml
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-03-10T19:04:20+0100 Mon
-(defconst nxhtml-mumamo:version "0.5")
-;; Last-Updated: 2009-01-06 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `backquote', `bytecomp', `mumamo', `mumamo-fun'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'nxhtml nil t))
-(eval-when-compile (require 'nxhtml-base))
-(eval-when-compile (require 'nxhtml-mode))
-(eval-when-compile (require 'mumamo))
-(eval-and-compile (require 'mumamo-fun))
-(eval-when-compile (require 'rng-valid nil t))
-;;(mumamo-fun-require)
-
-;; (defgroup nxhtml-auto-val-head nil
-;; "Automatic turn on of XHTML validation headers."
-;; :group 'nxhtml)
-
-;; (defmacro define-fictive-validation-header-toggle (fun-sym default-value)
-;; (let* ((fun-name (symbol-name fun-sym))
-;; (custom-sym (intern (concat fun-name "-auto-val-head")))
-;; (hook-sym (intern-soft (concat fun-name "-hook")))
-;; (docstring
-;; (concat "Automatic XHTML validation header for `" fun-name "'.
-;; ´")))
-;; (assert hook-sym)
-;; `(defcustom ,custom-sym ,default-value
-;; ,docstring
-;; :type 'boolean
-;; :set (lambda (sym val)
-;; (set-default sym val)
-;; (if val
-;; (add-hook ',hook-sym 'nxhtml-turn-on-validation-header-mode)
-;; (remove-hook ',hook-sym 'nxhtml-turn-on-validation-header-mode)))
-;; :group 'nxhtml-auto-val-head)
-;; ))
-
-;; Fix-me: add chunk type attr string as last alternative. This will
-;; allow things like myattr="<?php echo ?>".
-
-;;;###autoload
-(define-mumamo-multi-major-mode nxhtml-mumamo-mode
- "Turn on multiple major modes for (X)HTML with main mode `nxhtml-mode'.
-This covers inlined style and javascript and PHP.
-
-See also `mumamo-alt-php-tags-mode'."
- ("nXhtml Family" nxhtml-mode
- (mumamo-chunk-xml-pi
- mumamo-chunk-alt-php
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(add-hook 'nxhtml-mumamo-mode-hook 'mumamo-define-html-file-wide-keys)
-;;(define-fictive-validation-header-toggle nxhtml-mumamo-mode t)
-
-;;;###autoload
-(define-mumamo-multi-major-mode embperl-nxhtml-mumamo-mode
- "Turn on multiple major modes for Embperl files with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("Embperl nXhtml Family" nxhtml-mode
- (mumamo-chunk-embperl-<-
- mumamo-chunk-embperl-<+
- mumamo-chunk-embperl-<!
- mumamo-chunk-embperl-<$
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;###autoload
-(define-mumamo-multi-major-mode django-nxhtml-mumamo-mode
- "Turn on multiple major modes for Django with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("Django nXhtml Family" nxhtml-mode
- (mumamo-chunk-django4
- mumamo-chunk-django
- mumamo-chunk-django2
- mumamo-chunk-django3
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;###autoload
-(define-mumamo-multi-major-mode mason-nxhtml-mumamo-mode
- "Turn on multiple major modes for Mason using main mode `nxhtml-mode'.
-This covers inlined style and javascript."
- ("Mason nxhtml Family" nxhtml-mode
- (
- mumamo-chunk-mason-perl-line
- mumamo-chunk-mason-perl-single
- mumamo-chunk-mason-perl-block
- mumamo-chunk-mason-perl-init
- mumamo-chunk-mason-perl-once
- mumamo-chunk-mason-perl-cleanup
- mumamo-chunk-mason-perl-shared
- mumamo-chunk-mason-simple-comp
- mumamo-chunk-mason-compcont
- mumamo-chunk-mason-args
- mumamo-chunk-mason-doc
- mumamo-chunk-mason-text
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(add-hook 'mason-nxhtml-mumamo-mode-hook 'mumamo-define-html-file-wide-keys)
-;;(mumamo-inherit-sub-chunk-family-locally 'mason-nxhtml-mumamo-mode 'mason-nxhtml-mumamo-mode)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Genshi / kid
-
-(define-derived-mode nxhtml-genshi-mode nxhtml-mode "gXhtml"
- "Like `nxhtml-mode' but with Genshi rnc.
-You should not use this! This is just a part of
-`genshi-nxhtml-mumamo-mode', use that instead."
- (let* ((schema-dir (expand-file-name "etc/schema/" nxhtml-install-dir))
- (genshi-rnc (expand-file-name "qtmstr-xhtml.rnc" schema-dir)))
- ;;(message "nxhtml-src-dir =%s" nxhtml-src-dir)
- (message "schema-dir =%s" schema-dir)
- (when (or (not rng-current-schema-file-name)
- (string= "xhtml.rnc" (file-name-nondirectory rng-current-schema-file-name)))
- (condition-case err
- (progn
- (rng-set-schema-file-1 genshi-rnc)
- (rng-what-schema)
- ;;(rng-save-schema-location-1 t)
- )
- (nxml-file-parse-error
- (nxml-display-file-parse-error err)))
- (when rng-validate-mode
- (rng-validate-mode -1)
- (rng-validate-mode 1)))))
-
-;;;###autoload
-(define-mumamo-multi-major-mode genshi-nxhtml-mumamo-mode
- "Turn on multiple major modes for Genshi with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("Genshi HTML Family" nxhtml-genshi-mode
- (;;mumamo-chunk-genshi%
- mumamo-chunk-genshi$
- mumamo-chunk-py:=
- mumamo-chunk-py:match
- mumamo-chunk-xml-pi
- ;;mumamo-chunk-alt-php
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; MJT
-
-;; MJT is run in the browser. Some new tags and attributes are used.
-
-(define-derived-mode nxhtml-mjt-mode nxhtml-mode "mjtXhtml"
- "Like `nxhtml-mode' but with genshi rnc.
-You should not use this! This is just a part of
-`mjt-nxhtml-mumamo-mode', use that instead."
- (let* ((schema-dir (expand-file-name "etc/schema/" nxhtml-install-dir))
- (genshi-rnc (expand-file-name "mjt.rnc" schema-dir)))
- ;;(message "nxhtml-src-dir =%s" nxhtml-src-dir)
- (message "schema-dir =%s" schema-dir)
- (when (or (not rng-current-schema-file-name)
- (string= "xhtml.rnc" (file-name-nondirectory rng-current-schema-file-name)))
- (condition-case err
- (progn
- (rng-set-schema-file-1 genshi-rnc)
- (rng-what-schema)
- ;;(rng-save-schema-location-1 t)
- )
- (nxml-file-parse-error
- (nxml-display-file-parse-error err)))
- (when rng-validate-mode
- (rng-validate-mode -1)
- (rng-validate-mode 1)))))
-
-;;;###autoload
-(define-mumamo-multi-major-mode mjt-nxhtml-mumamo-mode
- "Turn on multiple major modes for MJT with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("MJT nXhtml Family" nxhtml-mjt-mode
- (
- mumamo-chunk-mjt$
- mumamo-chunk-xml-pi
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Smarty
-
-;;;###autoload
-(define-mumamo-multi-major-mode smarty-nxhtml-mumamo-mode
- "Turn on multiple major modes for Smarty with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("Smarty nXhtml Family" nxhtml-mode
- (mumamo-chunk-xml-pi
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- ;;mumamo-chunk-inlined-style
- ;;mumamo-chunk-inlined-script
- mumamo-chunk-smarty-literal
- mumamo-chunk-smarty-t
- mumamo-chunk-smarty-comment
- mumamo-chunk-smarty
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; GSP
-
-;;;###autoload
-(define-mumamo-multi-major-mode gsp-nxhtml-mumamo-mode
- "Turn on multiple major modes for GSP with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("GSP nXhtml Family" nxhtml-mode
- (mumamo-chunk-gsp
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; JSP
-
-;;;###autoload
-(define-mumamo-multi-major-mode jsp-nxhtml-mumamo-mode
- "Turn on multiple major modes for JSP with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("JSP nXhtml Family" nxhtml-mode
- (mumamo-chunk-jsp
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; eRuby
-
-;;;###autoload
-(define-mumamo-multi-major-mode eruby-nxhtml-mumamo-mode
- "Turn on multiple major modes for eRuby with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("eRuby nXhtml Family" nxhtml-mode
- (mumamo-chunk-eruby
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; ASP
-
-;;;###autoload
-(define-mumamo-multi-major-mode asp-nxhtml-mumamo-mode
- "Turn on multiple major modes for ASP with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
- ("ASP nXhtml Family" nxhtml-mode
- (mumamo-chunk-asp%
- mumamo-asp-chunk-inlined-script
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Mako
-
-;;;###autoload
-(define-mumamo-multi-major-mode mako-nxhtml-mumamo-mode
- "Turn on multiple major modes for Mako with main mode `nxhtml-mode'.
-This also covers inlined style and javascript."
-;; Fix-me: test case
-;;
-;; Fix-me: Add chunks for the tags, but make sure these are made
-;; invisible to nxml-mode parser.
-;;
-;; Fix-me: Maybe finally add that indentation support for one-line chunks?
- ("Mako nXhtml Family" nxhtml-mode
- (
- mumamo-chunk-mako-one-line-comment
- mumamo-chunk-mako-<%doc
- mumamo-chunk-mako-<%include
- mumamo-chunk-mako-<%inherit
- mumamo-chunk-mako-<%namespace
- mumamo-chunk-mako-<%page
-
- ;;mumamo-chunk-mako-<%def
- ;;mumamo-chunk-mako-<%call
- ;;mumamo-chunk-mako-<%text
-
- mumamo-chunk-mako-<%
- mumamo-chunk-mako-%
- mumamo-chunk-mako$
-
- mumamo-chunk-xml-pi
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;; Fix-me: This caused mumamo to loop during fontification since
-;; fmode-replace-default-mode was not defined. Mumamo tried to load
-;; the function in mumamo-fetch-major-mode-setup in (funcall major)
-;; where major mode is php-mode.
-
-;;(eval-after-load 'php-mode '(fmode-replace-default-mode 'php-mode 'nxhtml-mumamo-mode))
-
-
-
-(provide 'nxhtml-mumamo)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-mumamo.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml-strval.el b/emacs.d/nxhtml/nxhtml/nxhtml-strval.el
deleted file mode 100644
index 88ed1d0..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml-strval.el
+++ /dev/null
@@ -1,210 +0,0 @@
-;;; nxhtml-strval.el ---
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Wed Jun 06 12:42:09 2007
-(defconst nxhtml-strval:version "0.3") ;;Version:
-;; LXast-Updated: Sun Jun 10 14:52:50 2007 (7200 +0200)
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; FXeatures that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This is a workaround for a problem caused by that the parser from
-;; `nxml-mode' parses the whole buffer. This workaround handles things
-;; like
-;;
-;; <a href="<?php title(); ?>">...</a>
-;;
-;; where the string value is not valid XHTML (because of the <). When
-;; the minor mode `nxhtml-strval-mode' is on this construct will be
-;; replaced by text that are valid XHTML. When writing to file or
-;; copying/yanking this will be replaced with the intended text.
-;;
-;; For a long term solution the parser should be broken up, see also
-;;
-;; http://sourceforge.net/mailarchive/forum.php?thread_name=4638A428.9010408%40pareto.nl&forum_name=cedet-devel
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(define-minor-mode nxhtml-strval-mode
- "Handle some useful, but not XHTML compliant attribute values.
-This is mainly for PHP and similar.
-
-Things like
-
- <a href=\"<?php title(); ?>\">...</a>
-
-may be very useful in PHP. However the string value is not valid
-XHTML (because of the <). This makes it difficult to use XHTML
-completion and validation.
-
-This minor mode tries to take care of that by substituting the
-<?php and ?> in the buffer while editing with something else.
-The screen still shows <?php and ?> and when writing the buffer
-to a file the substitutes are reverted to <?php and ?>.
-
-Note that this is a workaround. See the comments in the source
-file. There are several \(I hope minor) problems with it. For
-example is the buffer marked as modified when turning on/off this
-minor mode.
-
-IMPORTANT: Do not edit the replaced string <? or ?>."
- :lighter nil
- :gropu 'nxhtml
- (if nxhtml-strval-mode
- (nxhtml-strval-mode-turn-on)
- (nxhtml-strval-mode-turn-off)))
-(put 'nxhtml-strval-mode 'permanent-local t)
-
-(defcustom nxhtml-strval-replface 'nxhtml-strval-replface
- "Face used to mark replaced characters in strings."
- :type 'face
- :group 'nxhtml)
-
-(defface nxhtml-strval-replface '((t :inherit font-lock-warning-face))
- "Default face used to mark replaced characters in strings."
- :group 'nxhtml)
-
-(defun nxthml-strval-add-ovl (start end)
- (let ((ovl (make-overlay start end nil t nil)))
- (overlay-put ovl 'nxhtml-strval t)
- (overlay-put ovl 'face font-lock-warning-face)))
- ;;(overlay-put ovl 'face 'highlight)))
-
-(defun nxhtml-strval-remove-all-ovls ()
- (remove-overlays (point-min) (point-max) 'nxhtml-strval t))
-
-(defun nxhtml-strval-replace-match ()
- (let ((s (compose-string "{" nil nil ?<)))
- (replace-match s t t nil 1))
- (put-text-property (1- (point)) (point) 'font-lock-face 'font-lock-warning-face)
- (put-text-property (1- (point)) (point) 'nxhtml-strval-> t)
- (nxthml-strval-add-ovl (1- (point)) (point))
- (let ((s (compose-string "}" nil nil ?>)))
- (replace-match s t t nil 2))
- (nxthml-strval-add-ovl (1- (point)) (point))
- (put-text-property (1- (point)) (point) 'font-lock-face 'font-lock-warning-face)
- (put-text-property (1- (point)) (point) 'nxhtml-strval-> nil))
-
-(defun nxhtml-strval-revert-match ()
- (replace-match "<" t t nil 1)
- (put-text-property (1- (point)) (point) 'font-lock-face nil)
- (put-text-property (1- (point)) (point) 'nxhtml-strval-> nil)
- (replace-match ">" t t nil 2)
- (put-text-property (1- (point)) (point) 'font-lock-face nil)
- (put-text-property (1- (point)) (point) 'nxhtml-strval-> nil))
-
-(defconst nxhtml-strval-on-re "\"\\(<\\)[^>]*\\(>\\)\"")
-(defconst nxhtml-strval-off-re "\"\\({\\)[^>]*\\(}\\)\"")
-
-(defun nxhtml-strval-mode-turn-on ()
- (unless (derived-mode-p 'nxml-mode 'php-mode)
- (error "%s is not derived from nxml-mode" major-mode))
- (add-hook 'write-contents-functions 'nxhtml-strval-write-contents nil t)
- (make-local-variable 'buffer-substring-filters)
- (add-to-list 'buffer-substring-filters 'nxhtml-strval-buffer-substring-filter)
- (nxhtml-strval-replace-values)
- (add-hook 'after-change-functions 'nxhtml-strval-after-change nil t))
-
-(defun nxhtml-strval-replace-values ()
- (save-excursion
- (save-match-data
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward nxhtml-strval-on-re nil t)
- (nxhtml-strval-replace-match))))))
-
-(defun nxhtml-strval-mode-turn-off ()
- (remove-hook 'after-change-functions 'nxhtml-strval-after-change t)
- (nxhtml-strval-revert-values)
- (remove-hook 'write-contents-functions 'nxhtml-strval-write-contents t)
- (kill-local-variable 'buffer-substring-filters))
-
-(defun nxhtml-strval-revert-values ()
- (save-excursion
- (save-match-data
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward nxhtml-strval-off-re nil t)
- (nxhtml-strval-revert-match))
- (nxhtml-strval-remove-all-ovls)))))
-
-(defun nxhtml-strval-write-contents ()
- (let ((nxhtml-strval-no-after-change t))
- ;;(setq write-contents-functions (delq 'nxhtml-strval-write-contents write-contents-functions))
- (remove-hook 'write-contents-functions 'nxhtml-strval-write-contents t)
- (undo-boundary)
- (nxhtml-strval-revert-values)
- ;;(write-file (buffer-file-name))
- (save-buffer)
- ;; Fix-me: undo
- ;;(nxhtml-strval-replace-values)
- (undo-start)
- (undo-more 1)
- (add-hook 'write-contents-functions 'nxhtml-strval-write-contents nil t)
- (set-buffer-modified-p nil)
- t))
-
-;;; Clip board etc.
-(defun nxhtml-strval-buffer-substring-filter (orig-str)
- (let ((str (replace-regexp-in-string "\"{" "\"<" orig-str)))
- (setq str (replace-regexp-in-string "}\"" ">\"" str))
- str
- ))
-
-;;; Changes
-; after-change-functions
-(defun nxhtml-strval-after-change (beg end len)
- (unless (and (boundp 'nxhtml-strval-no-after-change)
- nxhtml-strval-no-after-change)
- (let ((here (point))
- (new-beg beg)
- (new-end end))
- (goto-char beg)
- (setq new-beg (line-beginning-position))
- (goto-char end)
- (setq new-end (line-end-position))
- ;; Fix-me: examine old replacements here
- (remove-text-properties new-beg new-end '(nxhtml-strval-< nxhtml-strval->))
- (goto-char new-beg)
- (while (re-search-forward nxhtml-strval-on-re new-end t)
- (nxhtml-strval-replace-match))
- (goto-char here)
- )))
-
-(provide 'nxhtml-strval)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-strval.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtml.el b/emacs.d/nxhtml/nxhtml/nxhtml.el
deleted file mode 100644
index 7c85766..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtml.el
+++ /dev/null
@@ -1,339 +0,0 @@
-;;; nxhtml.el --- Keeping nXhtml together
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-01-01 Thu
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'loadhist))
-(eval-when-compile (require 'nxhtml-base))
-(eval-and-compile (require 'nxhtml-menu nil t))
-
-;;;###autoload
-(defgroup nxhtml nil
- "Customization of `nxhtml-mode'."
- :group 'nxml)
-
-;;;###autoload
-(defun nxhtml-customize ()
- "Customize nXhtml."
- (interactive)
- (customize-group 'nxhtml))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Features
-
-;; Fix-me: add help links
-(defvar nxhtml-req-features
- (let ((req-features
- '(
- "XHTML/HTML"
- (nxml-mode "XML Completion" "nxml-mode.el")
- (nxhtml "Additional XHTML Completion" "nxhtml.el")
- (mlinks "Live XHTML links" "mlinks.el" "0.28")
- (tidy-xhtml "Run HTML tidy program" "tidy-xhtml.el" "2.24")
- (xhtml-help "HTML+CSS help" "xhtml-help.el" "0.57")
- (nxml-where "Shows XML path" "nxml-where.el" "0.52")
- (html-imenu "Table of content in menus" "html-imenu.el" "0.9")
- (html-pagetoc "Page TOC" "html-pagetoc.el" "0.85")
- (html-site "Web sites you define" "html-site.el" "0.2")
- (html-upl "Upload web sites" "html-upl.el" "0.2")
- (html-chklnk "Checking links in site" "html-chklnk.el" "0.2")
- (html-move "Moving files in web sites" "html-move.el" "0.31")
- (html-toc "Web site TOC" "html-toc.el" "0.4")
- (html-wtoc "Merge pages and web Site TOC" "html-wtoc.el" "0.2")
- (html-write "Show <i> as italic etc" "html-write.el" "0.6")
- "General"
- (mumamo "Multiple major modes in buffer" "mumamo.el" "0.73")
- (majmodpri "Major mode priorities" "majmodpri.el" "0.5")
- (tabkey2 "Tab completion" "tabkey2.el" "1.12")
- (fold-dwim "Folding on headers and tags" "fold-dwim.el" "1.3")
- (appmenu "General popup menu" "appmenu.el" "0.53")
- (appmenu-fold "Popup menu entries for folding" "appmenu-fold.el" "0.51" appmenu fold-dwim)
- (winsize "Resizing and window handling" "winsize.el" "0.98")
- (winsav "Save/restore for windows/frames" "winsav.el" "0.77")
- (viper-tut "Viper try-out tutorial" "viper-tut.el" "0.2")
- (ourcomments-util "Some minor utilities" "ourcomments-util.el" "0.25")
- "External applications / Emacs as dito"
- (as-external "Emacs as an external editor" "as-external.el" "0.5")
- (sex-mode "Send to EXternal program" "sex-mode.el" "0.71")
- (freemind "Export/import freemind maps" "freemind.el" "0.60")
- (hfyview "Print with browser/copy to html" "hfyview.el" "0.63")
- (mozadd "Mirroring in Firefox" "mozadd.el" "0.2")
- "Images and Colors"
- (gimpedit "Edit images with GIMP" "gimp.el" "0.3")
- (inlimg "Inline images" "inlimg.el" "0.7")
- (css-color "Css color help functions" "css-color.el" "0.02")
- (chart "Easy google charts" "chart.el" "0.2")
- "Fetching and using elisp from repositories"
- (udev "Fetch and from elisp repostories" "udev.el" "0.5")
- ;;(udev-cedet "CEDET fetcher and loader" "udev-cedet.el" "0.2")
- (udev-ecb "ECB fetcher and loader" "udev-ecb.el" "0.2")
- (udev-rinari "Rinari fetcher and loader" "udev-rinari.el" "0.2")
- "Games and life"
- (pause "Take a break! I wish you some fun!" "pause.el" "0.64")
- (n-back "n-back game for fun and brain" "n-back.el" "0.5")
- )
- ))
- req-features))
-
-(defun nxhtml-load-req-features ()
- (dolist (extf nxhtml-req-features)
- (unless (or (stringp extf)
- (eq (car extf) 'nxhtml))
- (require (car extf) nil t))))
-
-
-
-(defun nxhtml-make-library-link (beg end)
- (let ((library (buffer-substring-no-properties beg end)))
- (make-text-button beg end
- 'action (lambda (button)
- (find-library
- (button-get button 'lib-name)))
- 'lib-name library
- 'face 'button)))
-
-(defun nxhtml-feature-insert (ok msg)
- (put-text-property 0 (length msg)
- 'face (if ok font-lock-type-face font-lock-warning-face)
- msg)
- (insert msg))
-
-(defun nxhtml-feature-check (feat-entry silent)
- (require 'loadhist)
- (let ((feature (nth 0 feat-entry))
- (description (nth 1 feat-entry))
- (file (nth 2 feat-entry))
- (need-ver (nth 3 feat-entry))
- (need-list (cddddr feat-entry))
- (ok))
- (if (featurep feature)
- (let* (
- (feat-versym (read (format "%s:version" feature)))
- (feat-ver (condition-case err
- (symbol-value feat-versym)
- (error nil)))
- (feat-vok (or (not need-ver)
- (and feat-ver
- (version<= need-ver feat-ver))))
- (need-ok (or (not need-list)
- (let ((has t))
- (dolist (n need-list)
- (unless (featurep n)
- (setq has nil)))
- has))))
- (setq ok (and feat-vok need-ok))
- (unless silent
- (nxhtml-feature-insert
- ok
- (concat (format "%34s -- " description)
- (if ok
- (format "supported by %s%s\n"
- file
- (if (not need-ver)
- ""
- (if (string= feat-ver need-ver)
- (format " (%s)" feat-ver)
- (format " (%s/%s)" feat-ver need-ver))))
- (concat "found " file
- " but needs"
- (if feat-vok ""
- (format " version %s" need-ver))
- (if (or feat-vok need-ok) "" " and")
- (if need-ok ""
- (format " also %s" need-list))
- "\n"))))
- (unless (string= (file-name-sans-extension file)
- (file-name-sans-extension
- (file-name-nondirectory (feature-file feature))))
- (insert (make-string (+ 34 4) ?\ ) "** Bad file name: " file "\n"))))
- (unless silent
- (nxhtml-feature-insert
- nil (format "%34s -- support missing, can't find %s\n"
- description file))))
- ok))
-
-;; Fix-me: move help here from `nxhtml-mode'?
-
-;;;###autoload
-(defun nxhtml-features-check ()
- "Check if external modules used by nXhtml are found."
- (interactive)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'nxhtml-features-check) (interactive-p))
- (with-current-buffer (help-buffer)
- (nxhtml-menu-mode 1)
- (erase-buffer)
- (let ((s (concat "Elisp modules used by nXhtml version " nxhtml-menu:version ":")))
- (put-text-property 0 (length s)
- 'face '( :weight bold :height 1.4)
- s)
- (insert s "\n\n"))
- (nxhtml-load-req-features)
- (nxhtml-load-req-features)
- (nxhtml-load-req-features)
- (nxhtml-load-req-features)
- (dolist (feat-entry nxhtml-req-features)
- (if (stringp feat-entry)
- (insert "==== " (propertize feat-entry 'face 'font-lock-comment-face 'face '(:weight bold)) "\n")
- (nxhtml-feature-check feat-entry nil)))
- (goto-char (point-min))
- (while (search-forward-regexp "[-a-zA-Z0-9]+\\.el" nil t)
- (nxhtml-make-library-link
- (match-beginning 0)
- (match-end 0)))
- (goto-char (point-min)))
- (set-buffer-modified-p nil)))
-
-(defun nxhtml-all-features-found ()
- (let ((all t))
- (dolist (feat-entry nxhtml-req-features)
- ;;(unless (featurep (car extf))
- (unless (stringp feat-entry)
- (unless (nxhtml-feature-check feat-entry t)
- (setq all nil))))
- all))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Link saving and pasting
-
-(defun nxhtml-find-base-href ()
- "Return base href found in the current file."
- (let ((base-href))
- (save-excursion
- (goto-char (point-min))
- (while (and (not base-href)
- (search-forward-regexp "<!--[^!]*-->\\|<base[[:space:]]" nil t))
- (when (equal " " (char-to-string (char-before)))
- (backward-char 6)
- (when (looking-at "<base [^>]*href *= *\"\\(.*?\\)\"")
- (setq base-href (match-string-no-properties 1))))))
- base-href))
-
-
-(defvar nxhtml-saved-link-file nil
- "Saved buffer file name for use in `nxhtml-paste-link'.")
-(defvar nxhtml-saved-link-anchor nil
- "Saved anchor name for use in `nxhtml-paste-link'.")
-
-;; Fix-me: same line???
-(defun nxhtml-save-link-to-here ()
- "Save buffer file name+anchor for `nxhtml-paste-link'."
- (interactive)
- (if (not buffer-file-name)
- (message "Current buffer has no file name")
- (setq nxhtml-saved-link-file (buffer-file-name))
- (setq nxhtml-saved-link-anchor nil)
- (save-excursion
- (let ((here (point)))
- (while (not (or (bolp) (looking-at "\\(?:id\\|name\\)[[:space:]]*=[[:space:]]*\".*?\"")))
- (backward-char))
- (when (and (looking-at "\\(?:id\\|name\\)[[:space:]]*=[[:space:]]*\"\\(.*?\\)\"")
- (<= (match-beginning 0) here)
- (< here (match-end 0)))
- (setq nxhtml-saved-link-anchor (match-string-no-properties 1)))))
- (message "Saved link: %s%s" nxhtml-saved-link-file
- (if nxhtml-saved-link-anchor
- (concat "#" nxhtml-saved-link-anchor)
- ""))))
-
-(defun nxhtml-paste-link-as-a-tag ()
- "Paste link saved by `nxhtml-save-link-to-here' as an <a> tag.
-Takes into account the relative position of the saved link."
- (interactive)
- (let ((paste-text (nxhtml-get-saved-link)))
- (when paste-text
- (let ((link-text (read-string "Link text: ")))
- (insert "<a href=\"" paste-text "\">" link-text "</a>")))))
-
-(defun nxhtml-paste-link ()
- "Paste link saved by `nxhtml-save-link-to-here'.
-Takes into account the relative position of the saved link."
- (interactive)
- (let ((paste-text (nxhtml-get-saved-link)))
- (when paste-text
- (insert paste-text))))
-
-(defun nxhtml-get-saved-link ()
- (if nxhtml-saved-link-file
- (let* (
- (base-href (nxhtml-find-base-href))
- (rel (file-relative-name nxhtml-saved-link-file
- (if base-href
- base-href
- (file-name-directory (buffer-file-name)))))
- (to-file (file-name-nondirectory (buffer-file-name)))
- (anchor nxhtml-saved-link-anchor)
- )
- (when (equal to-file rel) (setq rel ""))
- (when anchor (setq rel (concat rel "#" anchor)))
- rel)
- (message "There is no saved link")
- nil))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Misc
-
-(defun nxhtml-update-mark-today (date-str)
- "Update marks for today's date.
-The mark has this form
-
- <!-- today -->zzz<!-- end today -->"
- (interactive (list (format-time-string "%Y-%m-%d")))
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward (rx
- "<!-- today -->"
- (submatch (0+ anything))
- "<!-- end today -->")
- nil t)
- (replace-match date-str nil nil nil 1))))
-
-
-(provide 'nxhtml)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxhtmljs.el b/emacs.d/nxhtml/nxhtml/nxhtmljs.el
deleted file mode 100644
index 5adb3de..0000000
--- a/emacs.d/nxhtml/nxhtml/nxhtmljs.el
+++ /dev/null
@@ -1,240 +0,0 @@
-;;; nxhtml-js.el --- Javascript support functions
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sat Apr 28 2007
-;; Version: 0.1
-;; Last-Updated: 2008-12-28 Sun
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Fxeatures that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'nxhtml nil t))
-(eval-when-compile (require 'nxhtml-mode nil t))
-
-(defun nxhtml-add-link (type src silent)
- ;;<script type="text/javascript" src="EmacsW32.js"></script>
- (catch 'exit
- (save-excursion
- (save-restriction
- (widen)
- (let ((here (point))
- (link (cond
- ((eq type 'js)
- (concat "<script type=\"text/javascript\" src=\"" src "\"></script>\n"))
- ((eq type 'css)
- (concat "<link rel=\"stylesheet\" href=\"" src "\" type=\"text/css\" media=\"screen\"/>\n"))
- (t
- (error "Bad type=%s" type))
- )))
- (goto-char (point-min))
- (when (search-forward link nil t)
- (unless silent
- (let ((temp-ovl (make-overlay (match-beginning 0)
- (match-end 0)))
- (after-string " <-- It is already here "))
- (condition-case err
- (progn
- (put-text-property 0 (length after-string)
- 'face '(:background "red")
- after-string)
- (overlay-put temp-ovl 'face '(:background "yellow"))
- (overlay-put temp-ovl 'priority 100)
- (overlay-put temp-ovl 'after-string after-string)
- (redisplay t)
- (sit-for 3))
- (quit nil)
- (error (message "%s" (error-message-string err))))
- (delete-overlay temp-ovl))
- (throw 'exit t)))
- (unless (search-forward "</head>" nil t)
- (goto-char here)
- (unless (y-or-n-p "Can't find </head>, insert link to script here? ")
- (throw 'exit nil)))
- (beginning-of-line)
- (insert link)
- (beginning-of-line 0)
- (indent-according-to-mode))))))
-
-(defun nxhtml-smoothgallery-add-base (silent)
- "Add links to javascript and style sheets.
-This command add links to the javascript and style sheets that
-comes with SmoothGallery, see URL
-`http://smoothgallery.jondesign.net/'.
-
-* NOTICE: The files are not added to your project. Instead the
-files that comes with nXhtml are linked to directly."
- (interactive (list nil))
- (unless (buffer-file-name)
- (error "Can't add SmoothGallery if buffer has no filename"))
- (unless (memq major-mode '(html-mode nxhtml-mode))
- (error "Wrong major mode"))
- (let* ((libfile (locate-library "nxhtml"))
- (jsdir-abs (expand-file-name "doc/js/smoothgallery/scripts/"
- (file-name-directory libfile)))
- (jsdir-rel (file-relative-name jsdir-abs (file-name-directory (buffer-file-name))))
- (cssdir-abs (expand-file-name "doc/js/smoothgallery/css/"
- (file-name-directory libfile)))
- (cssdir-rel (file-relative-name cssdir-abs (file-name-directory (buffer-file-name)))))
- (nxhtml-add-link 'js (concat jsdir-rel "mootools.js") silent)
- (nxhtml-add-link 'js (concat jsdir-rel "jd.gallery.js") silent)
- (nxhtml-add-link 'css (concat cssdir-rel "jd.gallery.css") silent)
- (nxhtml-add-link 'css (concat cssdir-rel "layout.css") silent)
- ))
-
-(defconst nxhtml-smoothgallery-mark "<!-- SmoothGallery -->")
-(defun nxhtml-smoothgallery-find ()
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (when (search-forward nxhtml-smoothgallery-mark nil t)
- (back-to-indentation)
- (when (looking-at
- ;; (rx
- ;; "<div id=\""
- ;; (submatch
- ;; (1+ (not (any ">")))
- ;; )
- ;; "\">" (eval nxhtml-smoothgallery-mark))
- ;;(concat "<div id=\"\\([^>]+\\)\">" nxhtml-smoothgallery-mark)
- (rx-to-string
- `(and
- "<div id=\""
- (submatch
- (1+ (not (any ">")))
- )
- "\">"
- ,nxhtml-smoothgallery-mark))
- )
- (cons
- (copy-marker (match-beginning 0))
- (buffer-substring-no-properties
- (match-beginning 1) (match-end 1))))))))
-
-(defun nxhtml-smoothgallery-mk-jsmark (name)
- (concat "new gallery($('" name "'), {"))
-
-(defun nxhtml-smoothgallery-find-script (name)
- (let ((jsmark (nxhtml-smoothgallery-mk-jsmark name)))
- (goto-char (point-min))
- (search-forward jsmark nil t)))
-
-(defun nxhtml-smoothgallery-add (point-name)
- (interactive "i")
- (unless point-name
- (setq point-name (nxhtml-smoothgallery-find))
- (unless point-name
- (setq point-name "myGallery")))
- (let ((name (if (consp point-name)
- (cdr point-name)
- point-name))
- (where (when (consp point-name)
- (car point-name))))
- (unless where
- (goto-char (point-min))
- (search-forward "<body")
- (search-forward ">")
- (insert "\n")
- (setq where (point-marker))
- (insert-and-indent "<div id=\"" name "\">" nxhtml-smoothgallery-mark
- "\n</div>")
- )
- (unless (nxhtml-smoothgallery-find-script name)
- (goto-char where)
- (beginning-of-line)
- (insert-and-indent "<script type=\"text/javascript\">
- function startGallery() {
- var myGallery = new gallery($('" name "'), {
- timed: true,
- delay: 9000,
- embedLinks: false,
- showArrows: true,
- showCarousel: false,
- showInfopane: true,
- });
- }
- window.onDomReady(startGallery);
- </script>")
- (indent-according-to-mode))
- (goto-char where)))
-
-(defun nxhtml-smoothgallery-add-img (imgsrc thumbsrc title description)
- (interactive (let ((gallery (nxhtml-smoothgallery-find)))
- (when gallery
- (goto-char (car gallery)))
- (list
- (nxhtml-read-url nil nil 'nxhtml-image-url-predicate "Image")
- (when (y-or-n-p "Include thumbnail? " )
- (nxhtml-read-url nil nil 'nxhtml-image-url-predicate "Thumbnail"))
- (read-string "Title: ")
- (read-string "Description: ")
- )))
- (unless thumbsrc (setq thumbsrc imgsrc))
- (let ((gallery (nxhtml-smoothgallery-find)))
- (unless gallery
- (setq gallery (nxhtml-smoothgallery-add nil)))
- (goto-char (car gallery))
- (end-of-line)
- (insert-and-indent "
- <div class=\"imageElement\">
- <h3>" title "</h3>
- <p>" description "</p>
- <a href=\"#\" title=\"open image\" class=\"open\"></a>
- <img src=\"" imgsrc "\" class=\"full\" alt=\"" title "\" />
- <img src=\"" thumbsrc "\" class=\"thumbnail\" alt=\"" title " (thumbnail)\" />
- </div>")
-;; (when (file-exists-p src)
-;; (let ((sizes (image-size (create-image src) t)))
-;; (insert
-;; " width=\"" (format "%d" (car sizes)) "\""
-;; " height=\"" (format "%d" (cdr sizes)) "\"")
-;; ))
- ))
-
-(defun insert-and-indent (&rest lines)
- (let ((lines (split-string (apply 'concat lines) "[\n\r]")))
- (dolist (line lines)
- (insert "\n" line)
- (indent-according-to-mode))))
-
-
-(provide 'nxhtml-js)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtml-js.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/nxml-where.el b/emacs.d/nxhtml/nxhtml/nxml-where.el
deleted file mode 100644
index 8c171d4..0000000
--- a/emacs.d/nxhtml/nxhtml/nxml-where.el
+++ /dev/null
@@ -1,734 +0,0 @@
-;;; nxml-where.el --- Show XML path
-;;
-;; Author: Lennart Borgman
-;; Maintainer:
-;; Created: Tue Dec 19 14:59:01 2006
-(defconst nxml-where:version "0.52");; Version:
-;; Lxast-Updated: Thu Mar 01 23:16:35 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `cl'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; This buffer is for notes you don't want to save, and for Lisp evaluation.
-;; If you want to create a file, visit that file with C-x C-f,
-;; then enter the text in that file's own buffer.
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'nxml-mode nil t))
-(eval-when-compile (require 'ourcomments-util nil t))
-;; (eval-when-compile
-;; (unless (featurep 'nxhtml-autostart)
-;; (let ((efn (expand-file-name "../autostart.el")))
-;; (load efn))
-;; (require 'nxml-mode)))
-
-(defun nxml-where-error-message (format-string &rest args)
- (with-current-buffer (get-buffer-create "*Messages*")
- (let ((start (1+ (point-max))))
- (apply 'message format-string args)
- (goto-char (point-max))
- (backward-char)
- ;; fix-me: got some error here:
- ;;(put-text-property start (point) 'face 'highlight)
- )))
-
-(defvar nxml-where-last-point nil
- "Where point was last time marking finished.
-Ie we should not restart marking if point is still there and no
-changes have occured.")
-(make-variable-buffer-local 'nxml-where-last-point)
-(put 'nxml-where-last-point 'permanent-local t)
-
-(defvar nxml-where-last-finished nil
- "Non-nil then marking is finished.")
-(make-variable-buffer-local 'nxml-where-last-finished)
-(put 'nxml-where-last-finished 'permanent-local t)
-
-(defvar nxml-where-last-added nil)
-(make-variable-buffer-local 'nxml-where-last-added)
-(put 'nxml-where-last-added 'permanent-local t)
-
-(defvar nxml-where-path nil
- "The current where path.
-This is a list where the records have the form
-
- \(START END TAG-STR OVERLAY)")
-(make-variable-buffer-local 'nxml-where-path)
-(put 'nxml-where-path 'permanent-local t)
-
-(defvar nxml-where-new-path nil
- "The new where path.
-This is a list where the records have the form
-
- \(START END TAG-STR OVERLAY)")
-(make-variable-buffer-local 'nxml-where-new-path)
-(put 'nxml-where-new-path 'permanent-local t)
-
-(defvar nxml-where-once-update-timer nil)
-(make-variable-buffer-local 'nxml-where-once-update-timer)
-(put 'nxml-where-once-update-timer 'permanent-local t)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Custom options
-
-;;;###autoload
-(defgroup nxml-where nil
- "Customization group for nxml-where."
- :group 'nxhtml
- :group 'nxml)
-
-;;(define-toggle nxml-where-only-inner nil
-(define-minor-mode nxml-where-only-inner
- "Mark only inner-most tag."
- :global t
- :group 'nxml-where
- (when (fboundp 'nxml-where-update-buffers)
- (nxml-where-update-buffers)))
-
-(defun nxml-where-only-inner-toggle ()
- "Toggle `nxml-where-only-inner'."
- (interactive)
- (nxml-where-only-inner (if nxml-where-only-inner -1 1)))
-
-;;(define-toggle nxml-where-header t
-(define-minor-mode nxml-where-header
- "Show header with XML-path if non-nil."
- :global t
- :init-value t
- :group 'nxml-where
- (when (fboundp 'nxml-where-update-buffers)
- (nxml-where-update-buffers)))
-
-(defun nxml-where-header-toggle ()
- "Toggle `nxml-where-header'."
- (interactive)
- (nxml-where-header (if nxml-where-header -1 1)))
-
-;;(define-toggle nxml-where-tag+id t
-(define-minor-mode nxml-where-tag+id
- "Show tags + id in path if non-nil.
-If nil show only tag names."
- :global t
- :init-value t
- :group 'nxml-where
- (when (fboundp 'nxml-where-update-buffers)
- (nxml-where-update-buffers)))
-
-(defun nxml-where-tag+id-toggle ()
- "Toggle `nxml-where-tag+id'."
- (interactive)
- (nxml-where-tag+id (if nxml-where-tag+id -1 1)))
-
-;;(define-toggle nxml-where-marks t
-(define-minor-mode nxml-where-marks
- "Show marks in buffer for XML-path if non-nil."
- :global t
- :init-value t
- :group 'nxml-where
- (when (fboundp 'nxml-where-update-buffers)
- (nxml-where-update-buffers)))
-
-(defun nxml-where-marks-toggle ()
- "Toggle `nxml-where-marks'."
- (interactive)
- (nxml-where-marks (if nxml-where-marks -1 1)))
-
-;; Fix-me: implement this?
-;; (define-toggle nxml-where-only-tags-with-id t
-;; "Show only tags with id in the header line."
-;; :set (lambda (sym val)
-;; (set-default sym val)
-;; (when (fboundp 'nxml-where-update-buffers)
-;; (nxml-where-update-buffers)))
-;; :group 'nxml-where)
-
-(defface nxml-where-marking
- '((t (:inherit secondary-selection)))
- "The default face used for marking tags in path."
- :group 'nxml-where)
-
-(defcustom nxml-where-marking 'nxml-where-marking
- "Variable pointing to the face used for marking tags in path."
- :type 'face
- :set (lambda (sym val)
- (set-default sym val)
- (when (fboundp 'nxml-where-update-buffers)
- (nxml-where-update-buffers)))
- :group 'nxml-where)
-
-(defcustom nxml-where-header-attributes '("id" "name")
- "List of attributes `nxml-where-header' should display."
- :type '(repeat string)
- :set (lambda (sym val)
- (set-default sym val)
- (when (fboundp 'nxml-where-update-buffers)
- (nxml-where-update-buffers)))
- :group 'nxml-where)
-
-(defcustom nxml-where-widen t
- "If non-nil and narrowed widen before getting XML path."
- :type 'boolean
- :group 'nxml-where)
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Modes
-
-(defvar nxml-where-modes '(nxml-mode nxhtml-mode))
-
-(defun nxml-where-is-nxml ()
- (or (derived-mode-p 'nxml-mode)
- (and (featurep 'mumamo)
- mumamo-multi-major-mode
- (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'nxml-mode)))))
-
-(defun nxml-where-setup-updating ()
- (nxml-where-clear-old-path 0 "setup")
- (setq nxml-where-last-added nil)
- (setq nxml-where-last-point nil)
- (when (and nxml-where-header
- (not nxml-where-only-inner))
- (setq header-line-format "Started nxml-where-mode ..."))
- ;;(nxml-where-restart-update)
- (add-hook 'post-command-hook 'nxml-where-restart-update nil t))
-
-(defun nxml-where-mode-start ()
- ;;(message "START")
- (unless (nxml-where-is-nxml)
- (error "Can't display XML path since major mode is not nxml-mode child."))
- (add-hook 'after-change-major-mode-hook 'nxml-where-turn-off-unless-nxml nil t)
- (add-hook 'after-change-functions 'nxml-where-after-change nil t)
- (nxml-where-save-header-line-format)
- (nxml-where-setup-updating))
-
-(defun nxml-where-mode-stop ()
- ;;(message "STOP")
- (remove-hook 'after-change-major-mode-hook 'nxml-where-turn-off-unless-nxml t)
- (remove-hook 'after-change-functions 'nxml-where-after-change t)
- (nxml-where-stop-updating)
- (nxml-where-unmark-forward-element)
- (nxml-where-restore-header-line-format)
- (nxml-where-clear-old-path 0 "stop"))
-
-(defun nxml-where-turn-off-unless-nxml ()
- (unless (nxml-where-is-nxml)
- (nxml-where-mode-stop)))
-(put 'nxml-where-turn-off-unless-nxml 'permanent-local-hook t)
-
-;;;###autoload
-(define-minor-mode nxml-where-mode
- "Shows path in mode line."
- :global nil
- :group 'nxml-where
- (if nxml-where-mode
- ;;Turn it on
- (nxml-where-mode-start)
- ;; Turn it off
- (nxml-where-mode-stop)
- ))
-(put 'nxml-where-mode 'permanent-local t)
-
-(defun nxml-where-turn-on-in-nxml-child ()
- "Turn on `nxml-where-mode' if possible.
-This is possible if `major-mode' in the buffer is derived from
-`nxml-mode'."
- (when (or (derived-mode-p 'nxml-mode)
- (and mumamo-multi-major-mode
- (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'nxml-mode))))
- (unless nxml-where-mode
- (nxml-where-mode 1))))
-
-;;;###autoload
-(define-globalized-minor-mode nxml-where-global-mode nxml-where-mode
- nxml-where-turn-on-in-nxml-child
- :group 'nxml-where)
-;; The problem with global minor modes:
-(when (and nxml-where-global-mode
- (not (boundp 'define-global-minor-mode-bug)))
- (nxml-where-global-mode 1))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Auto updating
-
-(defvar nxhtml-where-hook nil
- "Normal hook run when marking has changed.")
-
-(defun nxml-where-start-update-in-timer (buffer)
- "First checks post command."
- ;;(message "nxml-where-start-update buffer=%s (bufferp buffer)=%s" buffer (bufferp buffer))
- (when (and (bufferp buffer)
- (buffer-live-p buffer))
- (with-current-buffer buffer
- (let ((here (point)))
- (save-match-data
- (condition-case err
- (progn
- ;;(unless nxml-where-marks (nxml-where-clear-old-path))
- (unless (and nxml-where-header
- (not nxml-where-only-inner))
- (setq header-line-format nil))
- (when (and nxml-where-mode
- (or nxml-where-header nxml-where-marks))
- (nxml-where-do-marking nil buffer)))
- (error
- (nxml-where-error-message
- "nxml-where-start-update-in-timer error: %s" err)))
- (goto-char here))))))
-
-(defun nxml-where-continue-marking-in-timer (this-point buffer)
- "Continue unfinished marking after last restart.
-Ie we have run at least once post command."
- ;;(message "continue-marking-in-timer %s %s" this-point buffer)
- (with-current-buffer buffer
- (let ((here (point)))
- (condition-case err
- (save-match-data ;; runs in timer
- (nxml-where-do-marking this-point buffer))
- (error
- (nxml-where-error-message
- "nxml-where-do-marking error: %s"
- err)))
- (goto-char here))))
-
-(defun nxml-where-start-continue-in-timer (next-point buffer)
- ;;(message "start second")
- (condition-case err
- (setq nxml-where-once-update-timer
- (run-with-idle-timer idle-update-delay
- nil
- 'nxml-where-continue-marking-in-timer
- next-point
- buffer))
- (error
- (nxml-where-error-message
- "nxml-where-start-second error %s" err))))
-
-(defun nxml-where-restart-update ()
- "Restart update, runs in `post-command-hook'."
- ;;(message "restart-update")
- (condition-case err
- (save-match-data ;; runs in timer
- (unless (and nxml-where-last-point
- (= nxml-where-last-point (point)))
- (setq nxml-where-last-point nil)
- (setq nxml-where-last-finished nil)
- (nxml-where-cancel-once)
- (setq nxml-where-once-update-timer
- (run-with-idle-timer
- (* 0.2 idle-update-delay)
- nil
- 'nxml-where-start-update-in-timer
- (current-buffer)))))
- (error
- (nxml-where-error-message
- "%s" (error-message-string err)))))
-(put 'nxml-where-restart-update 'permanent-local-hook t)
-
-(defvar nxml-where-first-change-pos nil)
-(make-variable-buffer-local 'nxml-where-first-change-pos)
-(put 'nxml-where-first-change-pos 'permanent-local t)
-
-(defun nxml-where-after-change (beg end len)
- (setq nxml-where-last-point nil)
- (setq nxml-where-first-change-pos
- (min beg
- (or nxml-where-first-change-pos
- beg))))
-
-(defun nxml-where-cancel-once ()
- (when (timerp nxml-where-once-update-timer)
- (cancel-timer nxml-where-once-update-timer)
- (setq nxml-where-once-update-timer nil)))
-
-(defun nxml-where-update-buffers ()
- (when (boundp 'nxml-where-mode)
- (dolist (buf (buffer-list))
- (with-current-buffer buf
- (when nxml-where-mode
- (nxml-where-mode -1)
- (nxml-where-mode 1))))))
-
-(defun nxml-where-stop-updating ()
- (remove-hook 'post-command-hook 'nxml-where-restart-update t))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Marking
-
-(defconst nxml-where-get-id-pattern
- (rx-to-string
- `(and
- space
- ,(cons 'or nxml-where-header-attributes)
- (0+ space)
- ?=
- (0+ space)
- ?\"
- (0+ (not (any ?\")))
- ?\")
- t))
-
-(defvar nxml-where-tag+id-pattern
- (rx ?<
- (submatch
- (1+ (char "-a-z0-9:"))
- )
- (0+ (1+ space)
- (1+ (any "a-z"))
- (0+ space)
- ?=
- (0+ space)
- ?\"
- (0+ (not (any ?\")))
- ?\"
- )
- (0+ space)
- (opt ?/)
- ?>))
-
-
-(defvar nxml-where-forward-element nil)
-(make-variable-buffer-local 'nxml-where-forward-element)
-(put 'nxml-where-forward-element 'permanent-local t)
-
-(defun nxml-where-unmark-forward-element ()
- "Unmark currently marked end tag."
- (when nxml-where-forward-element
- (let* ((ovl (nth 1 nxml-where-forward-element))
- (str (when ovl (buffer-substring-no-properties (overlay-start ovl) (overlay-end ovl)))))
- (when (overlayp ovl)
- ;;(message "unmark-forward-element:delete-overlay %s %s" str ovl)
- (delete-overlay ovl)))
- (setq nxml-where-forward-element nil)))
-
-(defun nxml-where-mark-forward-element (start-tag)
- "Mark the end tag matching START-TAG."
- ;;(message "nxml-where-forward-element=%s" nxml-where-forward-element)
- (unless (and start-tag
- nxml-where-forward-element
- (nth 1 nxml-where-forward-element)
- (= (nth 0 nxml-where-forward-element)
- start-tag))
- ;;(message "before unmark")
- (nxml-where-unmark-forward-element)
- ;;(message "after unmark")
- (when start-tag
- (let ((here (point))
- (end-of-narrow
- (progn
- (goto-char start-tag)
- (line-end-position 4)))
- start end ovl)
- ;; Fix-me: Narrow how much?
- (setq end-of-narrow (max (+ 4000 (window-end))
- end-of-narrow))
- (setq end-of-narrow (min (point-max)
- end-of-narrow))
- (save-restriction
- (narrow-to-region start-tag end-of-narrow)
- (condition-case err
- (progn
- (goto-char start-tag)
- (nxml-forward-element)
- (when (looking-back "</[a-z0-9]+>")
- (setq start (match-beginning 0))
- (setq end (point))
- (setq ovl (make-overlay start end))
- (overlay-put ovl 'nxml-where t)
- (overlay-put ovl 'face nxml-where-marking)))
- (error
- (let ((msg (error-message-string err)))
- (unless (string= msg "Start-tag has no end-tag")
- (message "nxml-where-mark-forw: %s" msg))))))
- (goto-char here)
- ;;(message "point 2 = %s" (point))
- (setq nxml-where-forward-element (list start-tag ovl))))))
-
-
-(defun nxml-where-make-rec (tag-start tag-end tag-str buf)
- ;;(message "nxml-where-make-rec %s %s %s %s" tag-start tag-end tag-str buf)
- (let ((ovls (overlays-at tag-start))
- str)
- (dolist (ovl ovls)
- (when (overlay-get ovl 'nxml-where)
- (setq str (buffer-substring-no-properties (overlay-start ovl) (overlay-end ovl)))
- (message "==================================================")
- (nxml-where-error-message "old ovl=%s %S" ovl str)
- (message "old: nxml-where-path=%s" nxml-where-path)
- (message "old: nxml-where-new-path=%s" nxml-where-new-path)
- )))
- (let ((ovl (when buf (make-overlay tag-start tag-end))))
- (when ovl
- (overlay-put ovl 'nxml-where t)
- (overlay-put ovl 'face nxml-where-marking))
- (list tag-start tag-end tag-str ovl)))
-
-(defun nxml-where-delete-rec (rec from)
- (let* ((ovl (nth 3 rec))
- (str (when ovl
- (buffer-substring-no-properties (overlay-start ovl) (overlay-end ovl)))))
- (when (and ovl (overlay-buffer ovl))
- (assert (overlayp ovl) t)
- ;;(message "delete-rec:delete-overlay %s %s (%s)" str ovl from)
- (delete-overlay ovl)
- ;;(message "after delete=%s" ovl)
- )))
-
-
-(defun nxml-where-clear-old-path (end-of-interest from)
- "Clear all marking below END-OF-INTEREST.
-Update `nxml-where-path accordingly."
- (setq nxml-where-last-added nil)
- ;;(message "++++++ clear A: %s (%s)" end-of-interest from)
- (setq nxml-where-path (cons 'dummy nxml-where-path))
- (let ((path nxml-where-path))
- ;;(message "path 1=%s" path)
- (while (cdr path)
- ;;(message "path 2=%s" path)
- (when (> (nth 1 (cadr path)) end-of-interest)
- (dolist (p (cdr path))
- (nxml-where-delete-rec p "clear"))
- (setcdr path nil))
- (setq path (cdr path))))
- (setq nxml-where-path (cdr nxml-where-path)))
-
-(defun nxml-where-clear-new-path ()
- (dolist (new nxml-where-new-path)
- (nxml-where-delete-rec new "clear new"))
- (setq nxml-where-new-path nil)
- ;;(message "clear B:nxml-where-path=%s" nxml-where-path)
- )
-
-
-(defun nxml-where-update-where-path (tag-start tag-end tag-str buffer)
- "Update where path with given tag.
-The tag is between TAG-START and TAG-END and the string to
-display for it in the header-line is TAG-STR. This is in buffer
-BUFFER."
- ;; Delete old marks below tag-start:
- (nxml-where-clear-old-path (+ tag-end 0) (format "update-where-path, tag-start=%s" tag-start))
- ;; Is this now the same as the old value?
- (let ((last-old (last nxml-where-path))
- new-rec
- result)
- ;;(message "update: %s %s %s %s, last-old=%s" tag-start tag-end tag-str buffer last-old)
- (if (and last-old
- (= tag-start (nth 0 (car last-old)))
- (= tag-end (nth 1 (car last-old))))
- (progn
- (setq result 'ready))
- (when nxml-where-only-inner
- ;;(message "last-old=%S, nwp=%S, nwnp=%S" last-old nxml-where-path nxml-where-new-path)
- (setq last-old (car (last nxml-where-path)))
- (when last-old
- (setq nxml-where-path nil)
- (nxml-where-delete-rec last-old "only-inner")))
- (setq new-rec (nxml-where-make-rec tag-start tag-end tag-str buffer))
- (setq nxml-where-last-added new-rec)
- (setq nxml-where-new-path (cons new-rec nxml-where-new-path))
- (setq result 'continue))
- result))
-
-(defun nxml-where-do-marking (this-point buffer)
- "Do marking.
-If THIS-POINT is nil then it is the first marking post command in
-buffer BUFFER. In that case start from current point, otherwise
-from THIS-POINT.
-
-Go up to previous tag. Then check if this is the same tag where
-we started last time and ran to completion. If so just finish.
-
-Otherwise check this tag. If not ready after that then restart
-this command with arg THIS-POINT set to right before this tag."
- ;;(message "****************nxml-where-do-marking %s %s, point=%s" this-point buffer (point))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer
- (save-restriction
- (when nxml-where-widen (widen))
- (let ((here (point))
- next-point
- (is-first (not this-point))
- (end-of-interest (if nxml-where-first-change-pos
- (min (point) nxml-where-first-change-pos)
- ;; Check for tag at point
- (catch 'eoi
- (let (ovl)
- (dolist (ovl (overlays-at (point)))
- (when (overlay-get ovl 'nxml-where)
- (throw 'eoi (overlay-end ovl)))))
- (point)))))
- ;; If on beginning of tag step forward one char.
- (unless (or (eobp)
- this-point
- (not (eq ?< (char-after))))
- (forward-char))
- (when this-point (goto-char this-point))
- (setq next-point
- (catch 'cnext-point
- (progn
- (condition-case err
- (nxml-backward-up-element)
- (error
- (if (equal err '(error "No parent element"))
- (let (rec)
- ;;(message "------------ No parent element")
- (dolist (rec nxml-where-path)
- (nxml-where-delete-rec rec "no parent"))
- (setq nxml-where-path nil)
- (throw 'cnext-point nil)) ;; <---- remember...
- (nxml-where-error-message "nxml-where error: %S" err)
- (throw 'cnext-point "uh?"))))
- ;; Is this the first call
- ;;(message ";; Is this the first call, %s" is-first)
- (when is-first
- (when (and nxml-where-path
- nxml-where-last-finished
- (= (point) (caar (last nxml-where-path))))
- (throw 'cnext-point 'same-as-last))
- ;;(setq nxml-where-new-path nil)
- (setq nxml-where-last-added nil)
- ;; Delete those parts we can't trust or don't
- ;; need any more. Fix-me, Note: this is different
- ;; dependent on if some buffer changes occured.
- (nxml-where-clear-old-path end-of-interest (format "is-first,p=%s" (point)))
- (nxml-where-clear-new-path))
- ;;(message "looking-at")
- (when (looking-at nxml-where-tag+id-pattern)
- (let ((start (point))
- (end (match-end 0))
- (tag (match-string-no-properties 1))
- (all (match-string-no-properties 0)))
- (when nxml-where-tag+id
- (when (string-match nxml-where-get-id-pattern all)
- (setq tag (concat tag (match-string 0 all)))))
- (setq tag (concat "<" tag ">"))
- (when (or (eq 'ready
- (nxml-where-update-where-path start end tag t))
- nxml-where-only-inner)
- ;;(message "throw 'cp nil")
- (throw 'cnext-point nil))))
- (throw 'cnext-point (max (1- (point)) (point-min))))))
- (goto-char here)
- (if next-point
- (cond
- ((stringp next-point) (message "%s" next-point) ;; Some error
- (when nxml-where-header (setq header-line-format next-point)))
- ((eq 'same-as-last next-point)
- nil)
- (t
- (unless nxml-where-only-inner
- (setq nxml-where-once-update-timer
- (run-with-timer (* 0.2 idle-update-delay)
- nil
- 'nxml-where-start-continue-in-timer
- next-point (current-buffer))))))
- (if nxml-where-path
- (setcdr (last nxml-where-path) nxml-where-new-path)
- (setq nxml-where-path nxml-where-new-path))
- (setq nxml-where-new-path nil)
- ;;(message "nxml-where-path=%s" nxml-where-path)
- (nxml-where-mark-forward-element (caar (last nxml-where-path)))
- (setq nxml-where-last-finished t)
- (setq nxml-where-first-change-pos nil)
- (run-hooks 'nxhtml-where-hook)
- (setq nxml-where-last-point (point))
- (when (and nxml-where-header
- (not nxml-where-only-inner))
- (nxml-where-insert-header))))))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Header path
-
-(defun nxml-where-insert-header ()
- (let ((path (mapcar (lambda (elt)
- (nth 2 elt))
- nxml-where-path)))
- (unless path
- (setq path (list (if (looking-at "[[:space:]]*\\'")
- "(After last tag)"
- "(Before first tag)"))))
- (if (null path)
- (setq path " *Error* ")
- ;; Throw away <html>
- (let* ((first (car path))
- (html "<html")
- (hlen (length html)))
- (when (and (> (length first) hlen)
- (string= html (substring first 0 hlen)))
- (setq path (cdr path))))
- (unless path
- (setq path (list "(At html start)"))))
- (let* ((sp (substring (format "%s" path) 1 -1))
- (label " Path: ")
- (totlen (+ (length sp) (length label)))
- header)
- (when (> totlen (window-width))
- (setq sp (concat "... "
- (substring sp (+ (- totlen (window-width))
- 4)))))
- (setq header (concat label sp))
- (when nxml-where-header
- (setq header-line-format header)))))
-
-(defvar nxml-where-saved-header-line-format nil)
-(make-variable-buffer-local 'nxml-where-saved-header-line-format)
-(put 'nxml-where-saved-header-line-format 'permanent-local t)
-
-(defun nxml-where-save-header-line-format ()
- (unless nxml-where-saved-header-line-format
- (setq nxml-where-saved-header-line-format header-line-format)))
-
-(defun nxml-where-restore-header-line-format ()
- (setq header-line-format nxml-where-saved-header-line-format))
-
-
-
-(provide 'nxml-where)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxml-where.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/outline-magic.el b/emacs.d/nxhtml/nxhtml/outline-magic.el
deleted file mode 100644
index 5b800ed..0000000
--- a/emacs.d/nxhtml/nxhtml/outline-magic.el
+++ /dev/null
@@ -1,588 +0,0 @@
-;;; outline-magic.el --- outline mode extensions for Emacs
-
-;; Copyright (C) 2002 Carsten Dominik <dominik@science.uva.nl>
-
-;; Maintainer: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 0.9
-;; Keywords: outlines
-
-;; This file is not part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;; This file implements extensions for outline(-minor)-mode.
-;;
-;; - VISIBILITY CYCLING: A *single* command to replace the many
-;; outline commands for showing and hiding parts of a document.
-;;
-;; - STRUCTURE EDITING: Promotion, demotion and transposition of subtrees.
-;;
-;; Installation
-;; ============
-;;
-;; Byte-compile outline-magic.el, put it on the load path and copy the
-;; following into .emacs (adapting keybindings to your own preferences)
-;;
-;; (add-hook 'outline-mode-hook
-;; (lambda ()
-;; (require 'outline-cycle)))
-;;
-;; (add-hook 'outline-minor-mode-hook
-;; (lambda ()
-;; (require 'outline-magic)
-;; (define-key outline-minor-mode-map [(f10)] 'outline-cycle)))
-;;
-;; Usage
-;; =====
-;;
-;; Visibility cycling
-;; ------------------
-;;
-;; The command `outline-cycle' changes the visibility of text and headings
-;; in the buffer. Instead of using many different commands to show and
-;; hide buffer parts, `outline-cycle' cycles through the most important
-;; states of an outline buffer. In the major `outline-mode', it will be
-;; bound to the TAB key. In `outline-minor-mode', the user can choose a
-;; different keybinding. The action of the command depends on the current
-;; cursor location:
-;;
-;; 1. When point is at the beginning of the buffer, `outline-cycle'
-;; cycles the entire buffer through 3 different states:
-;; - OVERVIEW: Only top-level headlines are shown.
-;; - CONTENTS: All headlines are shown, but no body text.
-;; - SHOW ALL: Everything is shown.
-;;
-;; 2. When point in a headline, `outline-cycle' cycles the subtree started
-;; by this line through the following states:
-;; - FOLDED: Only the headline is shown.
-;; - CHILDREN: The headline and its direct children are shown. From
-;; this state, you can move to one of the children and
-;; zoom in further.
-;; - SUBTREE: The entire subtree under the heading is shown.
-;;
-;; 3. At other positions, `outline-cycle' jumps back to the current heading.
-;; It can also be configured to emulate TAB at those positions, see
-;; the option `outline-cycle-emulate-tab'.
-;;
-;; Structure editing
-;; -----------------
-;;
-;; Four commands are provided for structure editing. The commands work on
-;; the current subtree (the current headline plus all inferior ones). In
-;; addition to menu access, the commands are assigned to the four arrow
-;; keys pressed with a modifier (META by default) in the following way:
-;;
-;; move up
-;; ^
-;; promote <- | -> demote
-;; v
-;; move down
-;;
-;; Thus, M-left will promote a subtree, M-up will move it up
-;; vertically throught the structure. Configure the variable
-;; `outline-structedit-modifiers' to use different modifier keys.
-;;
-;; Moving subtrees
-;; - - - - - - - -
-;; The commands `outline-move-subtree-up' and `outline-move-subtree-down'
-;; move the entire current subtree (folded or not) past the next same-level
-;; heading in the given direction. The cursor moves with the subtree, so
-;; these commands can be used to "drag" a subtree to the wanted position.
-;; For example, `outline-move-subtree-down' applied with the cursor at the
-;; beginning of the "* Level 1b" line will change the tree like this:
-;;
-;; * Level 1a * Level 1a
-;; * Level 1b ===\ * Level 1c
-;; ** Level 2b ===/ * Level 1b
-;; * Level 1c ** Level 2b
-;;
-;; Promotion/Demotion
-;; - - - - - - - - - -
-;; The commands `outline-promote' and `outline-demote' change the current
-;; subtree to a different outline level - i.e. the level of all headings in
-;; the tree is decreased or increased. For example, `outline-demote'
-;; applied with the cursor at the beginning of the "* Level 1b" line will
-;; change the tree like this:
-;;
-;; * Level 1a * Level 1a
-;; * Level 1b ===\ ** Level 1b
-;; ** Level 2b ===/ *** Level 2
-;; * Level 1c * Level 1c
-;;
-;; The reverse operation is `outline-promote'. Note that the scope of
-;; "current subtree" may be changed after a promotion. To change all
-;; headlines in a region, use transient-mark-mode and apply the command to
-;; the region.
-;;
-;; NOTE: Promotion/Demotion in complex outline setups
-;; - - - - - - - - - - - - - - - - - - - - - - - - - -
-;; Promotion/demotion works easily in a simple outline setup where the
-;; indicator of headings is just a polymer of a single character (e.g. "*"
-;; in the default outline mode). It can also work in more complicated
-;; setups. For example, in LaTeX-mode, sections can be promoted to
-;; chapters and vice versa. However, the outline setup for the mode must
-;; meet two requirements:
-;;
-;; 1. `outline-regexp' must match the full text which has to be changed
-;; during promotion/demotion. E.g. for LaTeX, it must match "\chapter"
-;; and not just "\chap". Major modes like latex-mode, AUCTeX's
-;; latex-mode and texinfo-mode do this correctly.
-;;
-;; 2. The variable `outline-promotion-headings' must contain a sorted list
-;; of headings as matched by `outline-regexp'. Each of the headings in
-;; `outline-promotion-headings' must be matched by `outline-regexp'.
-;; `outline-regexp' may match additional things - those matches will be
-;; ignored by the promotion commands. If a mode has multiple sets of
-;; sectioning commands (for example the texinfo-mode with
-;; chapter...subsubsection and unnumbered...unnumberedsubsubsec), the
-;; different sets can all be listed in the same list, but must be
-;; separated by nil elements to avoid "promotion" accross sets.
-;; Examples:
-;;
-;; (add-hook 'latex-mode-hook ; or 'LaTeX-mode-hook for AUCTeX
-;; (lambda ()
-;; (setq outline-promotion-headings
-;; '("\\chapter" "\\section" "\\subsection"
-;; "\\subsubsection" "\\paragraph" "\\subparagraph"))))
-;;
-;; (add-hook 'texinfo-mode-hook
-;; (lambda ()
-;; (setq outline-promotion-headings
-;; '("@chapter" "@section" "@subsection" "@subsubsection" nil
-;; "@unnumbered" "@unnumberedsec" "@unnumberedsubsec"
-;; "@unnumberedsubsubsec" nil
-;; "@appendix" "@appendixsec" "@appendixsubsec"
-;; "@appendixsubsubsec" nil
-;; "@chapheading" "@heading" "@subheading" "@subsubheading"))))
-;;
-;; If people find this useful enough, maybe the maintainers of the
-;; modes can be persuaded to set `outline-promotion-headings'
-;; already as part of the mode setup.
-;;
-;; Compatibility:
-;; --------------
-;; outline-magic was developed to work with the new outline.el
-;; implementation which uses text properties instead of selective display.
-;; If you are using XEmacs which still has the old implementation, most
-;; commands will work fine. However, structure editing commands will
-;; require all relevant headlines to be visible.
-;;
-;; History
-;; -------
-;; - Before first header now works as at beginning of file
-;; - Two levels are shown for contents.
-;;
-;;; Code:
-
-(require 'outline)
-
-;;; Visibility cycling
-
-(defcustom outline-cycle-emulate-tab nil
- "Where should `outline-cycle' emulate TAB.
-nil Never
-white Only in completely white lines
-t Everywhere except in headlines"
- :group 'outlines
- :type '(choice (const :tag "Never" nil)
- (const :tag "Only in completely white lines" white)
- (const :tag "Everywhere except in headlines" t)
- ))
-
-(defvar outline-promotion-headings nil
- "A sorted list of headings used for promotion/demotion commands.
-Set this to a list of headings as they are matched by `outline-regexp',
-top-level heading first. If a mode or document needs several sets of
-outline headings (for example numbered and unnumbered sections), list
-them set by set, separated by a nil element. See the example for
-`texinfo-mode' in the file commentary.")
-(make-variable-buffer-local 'outline-promotion-headings)
-
-(defun outline-cycle (&optional arg)
- "Visibility cycling for outline(-minor)-mode.
-
-- When point is at the beginning of the buffer, or when called with a
- C-u prefix argument, rotate the entire buffer through 3 states:
- 1. OVERVIEW: Show only top-level headlines.
- 2. CONTENTS: Show all headlines of all levels, but no body text.
- 3. SHOW ALL: Show everything.
-
-- When point is at the beginning of a headline, rotate the subtree started
- by this line through 3 different states:
- 1. FOLDED: Only the main headline is shown.
- 2. CHILDREN: The main headline and the direct children are shown. From
- this state, you can move to one of the children and
- zoom in further.
- 3. SUBTREE: Show the entire subtree, including body text.
-
-- When point is not at the beginning of a headline, execute
- `indent-relative', like TAB normally does."
- (interactive "P")
- (setq deactivate-mark t)
- (cond
-
- ((equal arg '(4))
- ; Run `outline-cycle' as if at the top of the buffer.
- (save-excursion
- (goto-char (point-min))
- (outline-cycle nil)))
-
- (t
- (cond
- ((or (bobp) ;; Beginning of buffer: Global cycling
- (let ((here (point))
- (atbobp t))
- (condition-case err
- (progn
- (outline-back-to-heading)
- (setq atbobp nil))
- (error nil))
- atbobp))
-
- (cond
- ((eq last-command 'outline-cycle-overview)
- ;; We just created the overview - now do table of contents
- ;; This can be slow in very large buffers, so indicate action
- (message "CONTENTS...")
- (save-excursion
- ;; Visit all headings and show their offspring
- (goto-char (point-max))
- (catch 'exit
- (while (and (progn (condition-case nil
- (outline-previous-visible-heading 1)
- (error (goto-char (point-min))))
- t)
- (looking-at outline-regexp))
- (show-branches)
- (if (bobp) (throw 'exit nil))))
- (message "CONTENTS...done"))
- (setq this-command 'outline-cycle-toc))
- ((eq last-command 'outline-cycle-toc)
- ;; We just showed the table of contents - now show everything
- (show-all)
- (message "SHOW ALL")
- (setq this-command 'outline-cycle-showall))
- (t
- ;; Default action: go to overview
- ;; FIX-ME: variable sublevel here (for wikipedia for example):
- (hide-sublevels 2)
- (message "OVERVIEW")
- (setq this-command 'outline-cycle-overview))))
-
- ((save-excursion (beginning-of-line 1) (looking-at outline-regexp))
- ;; At a heading: rotate between three different views
- (outline-back-to-heading)
- (let ((goal-column 0) beg eoh eol eos)
- ;; First, some boundaries
- (save-excursion
- (outline-back-to-heading) (setq beg (point))
- (save-excursion (outline-next-line) (setq eol (point)))
- (outline-end-of-heading) (setq eoh (point))
- (outline-end-of-subtree) (setq eos (point)))
- ;; Find out what to do next and set `this-command'
- (cond
- ((= eos eoh)
- ;; Nothing is hidden behind this heading
- (message "EMPTY ENTRY"))
- ((>= eol eos)
- ;; Entire subtree is hidden in one line: open it
- (show-entry)
- (show-children)
- (message "CHILDREN")
- (setq this-command 'outline-cycle-children))
- ((eq last-command 'outline-cycle-children)
- ;; We just showed the children, now show everything.
- (show-subtree)
- (message "SUBTREE"))
- (t
- ;; Default action: hide the subtree.
- (hide-subtree)
- (message "FOLDED")))))
-
- ;; TAB emulation
- ((outline-cycle-emulate-tab)
- (indent-relative))
-
- (t
- ;; Not at a headline: Do indent-relative
- (outline-back-to-heading))))))
-
-(defun outline-cycle-emulate-tab ()
- "Check if TAB should be emulated at the current position."
- ;; This is called after the check for point in a headline,
- ;; so we can assume we are not in a headline
- (if (and (eq outline-cycle-emulate-tab 'white)
- (save-excursion
- (beginning-of-line 1) (looking-at "[ \t]+$")))
- t
- outline-cycle-emulate-tab))
-
-(defun outline-next-line ()
- "Forward line, but mover over invisible line ends.
-Essentially a much simplified version of `next-line'."
- (interactive)
- (beginning-of-line 2)
- (while (and (not (eobp))
- (get-char-property (1- (point)) 'invisible))
- (beginning-of-line 2)))
-
-;;; Vertical tree motion
-
-(defun outline-move-subtree-up (&optional arg)
- "Move the currrent subtree up past ARG headlines of the same level."
- (interactive "p")
- (outline-move-subtree-down (- arg)))
-
-(defun outline-move-subtree-down (&optional arg)
- "Move the currrent subtree down past ARG headlines of the same level."
- (interactive "p")
- (let ((re (concat "^" outline-regexp))
- (movfunc (if (> arg 0) 'outline-get-next-sibling
- 'outline-get-last-sibling))
- (ins-point (make-marker))
- (cnt (abs arg))
- beg end txt)
- ;; Select the tree
- (outline-back-to-heading)
- (setq beg (point))
- (outline-end-of-subtree)
- (if (= (char-after) ?\n) (forward-char 1))
- (setq end (point))
- ;; Find insertion point, with error handling
- (goto-char beg)
- (while (> cnt 0)
- (or (funcall movfunc)
- (progn (goto-char beg)
- (error "Cannot move past superior level")))
- (setq cnt (1- cnt)))
- (if (> arg 0)
- ;; Moving forward - still need to move over subtree
- (progn (outline-end-of-subtree)
- (if (= (char-after) ?\n) (forward-char 1))))
- (move-marker ins-point (point))
- (setq txt (buffer-substring beg end))
- (delete-region beg end)
- (insert txt)
- (goto-char ins-point)
- (move-marker ins-point nil)))
-
-;;; Promotion and Demotion
-
-(defun outline-promote (&optional arg)
- "Decrease the level of an outline-structure by ARG levels.
-When the region is active in transient-mark-mode, all headlines in the
-region are changed. Otherwise the current subtree is targeted. Note that
-after each application of the command the scope of \"current subtree\"
-may have changed."
- (interactive "p")
- (outline-change-level (- arg)))
-
-
-(defun outline-demote (&optional arg)
- "Increase the level of an outline-structure by ARG levels.
-When the region is active in transient-mark-mode, all headlines in the
-region are changed. Otherwise the current subtree is targeted. Note that
-after each application of the command the scope of \"current subtree\"
-may have changed."
- (interactive "p")
- (outline-change-level arg))
-
-(defun outline-change-level (delta)
- "Workhorse for `outline-demote' and `outline-promote'."
- (let* ((headlist (outline-headings-list))
- (atom (outline-headings-atom headlist))
- (re (concat "^" outline-regexp))
- (transmode (and transient-mark-mode mark-active))
- beg end)
-
- ;; Find the boundaries for this operation
- (save-excursion
- (if transmode
- (setq beg (min (point) (mark))
- end (max (point) (mark)))
- (outline-back-to-heading)
- (setq beg (point))
- (outline-end-of-heading)
- (outline-end-of-subtree)
- (setq end (point)))
- (setq beg (move-marker (make-marker) beg)
- end (move-marker (make-marker) end))
-
- (let (head newhead level newlevel static)
-
- ;; First a dry run to test if there is any trouble ahead.
- (goto-char beg)
- (while (re-search-forward re end t)
- (outline-change-heading headlist delta atom 'test))
-
- ;; Now really do replace the headings
- (goto-char beg)
- (while (re-search-forward re end t)
- (outline-change-heading headlist delta atom))))))
-
-(defun outline-headings-list ()
- "Return a list of relevant headings, either a user/mode defined
-list, or an alist derived from scanning the buffer."
- (let (headlist)
- (cond
- (outline-promotion-headings
- ;; configured by the user or the mode
- (setq headlist outline-promotion-headings))
-
- ((and (eq major-mode 'outline-mode) (string= outline-regexp "[*\^L]+"))
- ;; default outline mode with original regexp
- ;; this need special treatment because of the \f in the regexp
- (setq headlist '(("*" . 1) ("**" . 2)))) ; will be extrapolated
-
- (t ;; Check if the buffer contains a complete set of headings
- (let ((re (concat "^" outline-regexp)) head level)
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward re nil t)
- (save-excursion
- (beginning-of-line 1)
- (setq head (outline-cleanup-match (match-string 0))
- level (funcall outline-level))
- (add-to-list 'headlist (cons head level))))))
- ;; Check for uniqueness of levels in the list
- (let* ((hl headlist) entry level seen nonunique)
- (while (setq entry (car hl))
- (setq hl (cdr hl)
- level (cdr entry))
- (if (and (not (outline-static-level-p level))
- (member level seen))
- ;; We have two entries for the same level.
- (add-to-list 'nonunique level))
- (add-to-list 'seen level))
- (if nonunique
- (error "Cannot promote/demote: non-unique headings at level %s\nYou may want to configure `outline-promotion-headings'."
- (mapconcat 'int-to-string nonunique ","))))))
- ;; OK, return the list
- headlist))
-
-(defun outline-change-heading (headlist delta atom &optional test)
- "Change heading just matched by `outline-regexp' by DELTA levels.
-HEADLIST can be either an alist ((\"outline-match\" . level)...) or a
-straight list like `outline-promotion-headings'. ATOM is a character
-if all headlines are composed of a single character.
-If TEST is non-nil, just prepare the change and error if there are problems.
-TEST nil means, really replace old heading with new one."
- (let* ((head (outline-cleanup-match (match-string 0)))
- (level (save-excursion
- (beginning-of-line 1)
- (funcall outline-level)))
- (newhead ; compute the new head
- (cond
- ((= delta 0) t)
- ((outline-static-level-p level) t)
- ((null headlist) nil)
- ((consp (car headlist))
- ;; The headlist is an association list
- (or (car (rassoc (+ delta level) headlist))
- (and atom
- (> (+ delta level) 0)
- (make-string (+ delta level) atom))))
- (t
- ;; The headlist is a straight list - grab the correct element.
- (let* ((l (length headlist))
- (n1 (- l (length (member head headlist)))) ; index old
- (n2 (+ delta n1))) ; index new
- ;; Careful checking
- (cond
- ((= n1 l) nil) ; head not found
- ((< n2 0) nil) ; newlevel too low
- ((>= n2 l) nil) ; newlevel too high
- ((let* ((tail (nthcdr (min n1 n2) headlist))
- (nilpos (- (length tail) (length (memq nil tail)))))
- (< nilpos delta)) ; nil element between old and new
- nil)
- (t (nth n2 headlist)))))))) ; OK, we have a match!
- (if (not newhead)
- (error "Cannot shift level %d heading \"%s\" to level %d"
- level head (+ level delta)))
- (if (and (not test) (stringp newhead))
- (save-excursion
- (beginning-of-line 1)
- (or (looking-at (concat "[ \t]*\\(" (regexp-quote head) "\\)"))
- (error "Please contact maintainer"))
- (replace-match newhead t t nil 1)))))
-
-(defun outline-headings-atom (headlist)
- "Use the list created by `outline-headings-list' and check if all
-headings are polymers of a single character, e.g. \"*\".
-If yes, return this character."
- (if (consp (car headlist))
- ;; this is an alist - it makes sense to check for atomic structure
- (let ((re (concat "\\`"
- (regexp-quote (substring (car (car headlist)) 0 1))
- "+\\'")))
- (if (not (delq nil (mapcar (lambda (x) (not (string-match re (car x))))
- headlist)))
- (string-to-char (car (car headlist)))))))
-
-(defun outline-cleanup-match (s)
- "Remove text properties and start/end whitespace from a string."
- (set-text-properties 1 (length s) nil s)
- (save-match-data
- (if (string-match "^[ \t]+" s) (setq s (replace-match "" t t s)))
- (if (string-match "[ \t]+$" s) (setq s (replace-match "" t t s))))
- s)
-
-(defun outline-static-level-p (level)
- "Test if a level should not be changed by level promotion/demotion."
- (>= level 1000))
-
-;;; Key bindings
-
-(defcustom outline-structedit-modifiers '(meta)
- "List of modifiers for outline structure editing with the arrow keys."
- :group 'outlines
- :type '(repeat symbol))
-
-(define-key outline-mode-map [(tab)] 'outline-cycle)
-(let ((keys '((left . outline-promote)
- (right . outline-demote)
- (up . outline-move-subtree-up)
- (down . outline-move-subtree-down)))
- key)
- (while (setq key (pop keys))
- (apply 'define-key outline-mode-map
- (list
- (vector (append outline-structedit-modifiers (list (car key))))
- (cdr key)))))
-
-;;; Menu entries
-
-(define-key outline-mode-menu-bar-map [headings outline-move-subtree-down]
- '("Move subtree down" . outline-move-subtree-down))
-(define-key outline-mode-menu-bar-map [headings outline-move-subtree-up]
- '("Move subtree up" . outline-move-subtree-up))
-(define-key outline-mode-menu-bar-map [headings outline-demote]
- '("Demote by 1 level" . outline-demote))
-(define-key outline-mode-menu-bar-map [headings outline-promote]
- '("Promote by 1 level" . outline-promote))
-(define-key outline-mode-menu-bar-map [show outline-cycle]
- '("Rotate visibility" . outline-cycle))
-(define-key outline-mode-menu-bar-map [hide outline-cycle]
- '("Rotate visibility" . outline-cycle))
-
-;;; Finish up
-
-(provide 'outline-magic)
-
-;;; outline-magic.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/rngalt.el b/emacs.d/nxhtml/nxhtml/rngalt.el
deleted file mode 100644
index 788128a..0000000
--- a/emacs.d/nxhtml/nxhtml/rngalt.el
+++ /dev/null
@@ -1,828 +0,0 @@
-;;; rngalt.el --- Tools for making completion addition to nxml mode
-;;
-;; Author: Lennart Borgman
-;; Created: Wed Jan 10 17:17:18 2007
-(defconst rngalt:version "0.51") ;;Version:
-;; Last-Updated: 2008-03-08T03:33:56+0100 Sat
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `nxml-enc', `nxml-ns', `nxml-parse', `nxml-util',
-;; `ourcomments-util', `rng-dt', `rng-loc', `rng-match',
-;; `rng-parse', `rng-pttrn', `rng-uri', `rng-util', `rng-valid',
-;; `xmltok'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-and-compile (require 'rng-valid))
-(eval-when-compile (require 'rng-nxml))
-(eval-when-compile (unless load-file-name (require 'nxhtml-mode nil t)))
-
-(eval-when-compile
- (let* ((this-file (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- (this-dir (file-name-directory this-file))
- (util-dir (expand-file-name "../util/" this-dir))
- (load-path (cons util-dir load-path)))
- (require 'ourcomments-util)))
-;;(require 'ourcomments-util)
-
-;; (setq x (macroexpand '(defcustom my-temp-opt t "doc" :type 'boolean)))
-;; (setq x (macroexpand '(define-minor-mode my-temp-mode "doc")))
-;; (setq x (macroexpand '(define-toggle my-temp-toggle t "doc")))
-;;(define-toggle rngalt-display-validation-header t
-(define-minor-mode rngalt-display-validation-header
- "Display XML validation headers at the top of buffer when t.
-The validation header is only displayed in buffers where the main
-major mode is derived from `nxml-mode'."
- :global t
- :init-value t
- :group 'relax-ng
- :group 'nxhtml
- (when (fboundp 'rngalt-update-validation-header-overlay-everywhere)
- (rngalt-update-validation-header-overlay-everywhere)))
-
-(defun rngalt-display-validation-header-toggle ()
- "Toggle `rngalt-display-validation-header'."
- (interactive)
- (rngalt-display-validation-header (if rngalt-display-validation-header -1 1)))
-
-;;(define-toggle rngalt-minimal-validation-header t
-(define-minor-mode rngalt-minimal-validation-header
- "If non-nil display only a short informaion about the XML validation header.
-See also `rngalt-display-validation-header'."
- :global t
- :init-value t
- :group 'relax-ng
- :group 'nxhtml
- (when (fboundp 'rngalt-update-validation-header-overlay-everywhere)
- (rngalt-update-validation-header-overlay-everywhere)))
-
-(defun rngalt-minimal-validation-header-toggle ()
- "Toggle `rngalt-minimal-validation-header'."
- (interactive)
- (rngalt-minimal-validation-header (if rngalt-minimal-validation-header -1 1)))
-
-(defface rngalt-validation-header-top
- '((t (:foreground "RGB:87/CE/FA" :background "white")))
- "Face first line of validation header."
- :group 'nxhtml)
-
-(defface rngalt-validation-header-bottom
- '((t (:foreground "white" :background "RGB:87/CE/FA")))
- "Face first line of validation header."
- :group 'nxhtml)
-
-;; FIX-ME: remember to clear these variable, but where?
-(defvar rngalt-validation-header nil)
-(make-variable-buffer-local 'rngalt-validation-header)
-(put 'rngalt-validation-header 'permanent-local t)
-
-(defvar rngalt-current-schema-file-name nil)
-(make-variable-buffer-local 'rngalt-current-schema-file-name)
-(put 'rngalt-current-schema-file-name 'permanent-local t)
-
-(defvar rngalt-validation-header-overlay nil)
-(make-variable-buffer-local 'rngalt-validation-header-overlay)
-(put 'rngalt-validation-header-overlay 'permanent-local t)
-
-(defvar rngalt-major-mode nil)
-(make-variable-buffer-local 'rngalt-major-mode)
-(put 'rngalt-major-mode 'permanent-local t)
-
-(defvar rngalt-complete-first-try nil
- "First function to try for completion.
-If non-nil should be a function with no parameters. Used by
-`rngalt-complete'.")
-
-(defvar rngalt-complete-last-try nil
- "Last function to try for completion.
-If non-nil should be a function with no parameters. Used by
-`rngalt-complete'.")
-
-(defvar rngalt-completing-read-tag nil
- "Alternate function for completing tag name.
-If non-nil should be a function with the same parameters as
-`completing-read'. Used by `rngalt-complete'.")
-
-(defvar rngalt-completing-read-attribute-name nil
- "Alternate function for completing attribute name.
-If non-nil should be a function with the same parameters as
-`completing-read'. Used by `rngalt-complete'.")
-
-(defvar rngalt-completing-read-attribute-value nil
- "Alternate function for completing attribute value.
-If non-nil should be a function with the same parameters as
-`completing-read'. Used by `rngalt-complete'.")
-
-
-(defun rngalt-finish-element ()
- "Finish the current element by inserting an end-tag.
-Like `nxml-finish-element' but takes `rngalt-validation-header'
-into account."
- (interactive "*")
- (rngalt-finish-element-1 nil))
-
-;; Fix-me: Check the other uses of `nxml-finish-element-1'. But this
-;; is maybe not necessary since the only other use is in
-;; `nxml-split-element' and that will anyway work - I believe ...
-(defun rngalt-finish-element-1 (startp)
- "Insert an end-tag for the current element and optionally a start-tag.
-The start-tag is inserted if STARTP is non-nil. Return the position
-of the inserted start-tag or nil if none was inserted.
-
-This is like `nxml-finish-element-1' but takes
-`rngalt-validation-header' into account."
- (interactive "*")
- (let (token-end
- start-tag-end
- starts-line
- ends-line
- start-tag-indent
- qname
- inserted-start-tag-pos)
- ;; Temporary insert the fictive validation header if any.
- (let ((buffer-undo-list nil)
- (here (point-marker)))
- (when rngalt-validation-header
- (let ((vh (nth 2 rngalt-validation-header)))
- (set-marker-insertion-type here t)
- (save-restriction
- (widen)
- (goto-char (point-min))
- (insert vh)))
- (goto-char here))
- (setq token-end (nxml-token-before))
- (setq start-tag-end
- (save-excursion
- (when (and (< (point) token-end)
- (memq xmltok-type
- '(cdata-section
- processing-instruction
- comment
- start-tag
- end-tag
- empty-element)))
- (error "Point is inside a %s"
- (nxml-token-type-friendly-name xmltok-type)))
- (nxml-scan-element-backward token-end t)))
- (when start-tag-end
- (setq starts-line
- (save-excursion
- (unless (eq xmltok-type 'start-tag)
- (error "No matching start-tag"))
- (goto-char xmltok-start)
- (back-to-indentation)
- (eq (point) xmltok-start)))
- (setq ends-line
- (save-excursion
- (goto-char start-tag-end)
- (looking-at "[ \t\r\n]*$")))
- (setq start-tag-indent (save-excursion
- (goto-char xmltok-start)
- (current-column)))
- (setq qname (xmltok-start-tag-qname)))
-
- ;; Undo the insertion of the fictive header:
- (undo-start)
- (while (and (not (eq t pending-undo-list))
- pending-undo-list)
- (undo-more 1))
- (goto-char here))
-
- (unless start-tag-end (error "No more start tags"))
-
- (when (and starts-line ends-line)
- ;; start-tag is on a line by itself
- ;; => put the end-tag on a line by itself
- (unless (<= (point)
- (save-excursion
- (back-to-indentation)
- (point)))
- (insert "\n"))
- (indent-line-to start-tag-indent))
- (insert "</" qname ">")
- (when startp
- (when starts-line
- (insert "\n")
- (indent-line-to start-tag-indent))
- (setq inserted-start-tag-pos (point))
- (insert "<" qname ">")
- (when (and starts-line ends-line)
- (insert "\n")
- (indent-line-to (save-excursion
- (goto-char xmltok-start)
- (forward-line 1)
- (back-to-indentation)
- (if (= (current-column)
- (+ start-tag-indent nxml-child-indent))
- (+ start-tag-indent nxml-child-indent)
- start-tag-indent)))))
- inserted-start-tag-pos))
-
-(defun rngalt-complete ()
- "Complete the string before point using the current schema.
-Return non-nil if in a context it understands.
-
-This function should be added to `nxml-completion-hook' before
-`rng-complete'. By default it works just like this function, but
-you can add your own completion by setting the variables
-`rngalt-complete-first-try', `rngalt-completing-read-tag',
-`rngalt-completing-read-attribute-name',
-`rngalt-completing-read-attribute-value' and
-`rngalt-complete-last-try'."
- (interactive)
- (unless rng-validate-mode
- (when (y-or-n-p
- "XML Validation is not on. Do you want to turn it on? ")
- (rng-validate-mode 1)))
- (when rng-validate-mode
- ;; schema file may mismatch if user sets it explicitly:
- (rngalt-reapply-validation-header)
- (when rng-current-schema-file-name
- (rngalt-validate))
- (or (when rngalt-complete-first-try
- (funcall rngalt-complete-first-try))
- (progn
- (unless rng-current-schema-file-name
- (when (eq major-mode 'nxhtml-mode)
- (when (y-or-n-p
- "There is currently no DTD specified for the buffer.
-This makes XHTML completion impossible. You can add a fictive
-XHTML validation header that sets the DTD to XHTML. This will
-not be inserted in the buffer but completion and XHTML validation
-will assume it is there so both error checking and completion
-will work.
-
-Do you want to add a fictive XHTML validation header? ")
- (message "") ;; Get rid of the large minibuffer message window
- (nxhtml-validation-header-mode)
- )))
- (let ((lt-pos (save-excursion (search-backward "<" nil t)))
- xmltok-dtd)
- (or (and lt-pos
- (= (rng-set-state-after lt-pos) lt-pos)
- (or (rngalt-complete-tag lt-pos)
- (rng-complete-end-tag lt-pos)
- (rngalt-complete-attribute-name lt-pos)
- (rngalt-complete-attribute-value lt-pos)))
- (when rngalt-complete-last-try
- (funcall rngalt-complete-last-try))))))))
-
-(defun rngalt-validate ()
- (unless (= (buffer-size) 0)
- (let ((while-n1 0)
- (maxn1 20))
- (condition-case err
- (while (and (> maxn1 (setq while-n1 (1+ while-n1)))
- (rng-do-some-validation))
- nil)
- (error
- ;; FIX-ME: for debugging:
- ;;(lwarn 'rngalt-validate :error "%s" (error-message-string err))
- (message "rngalt-validate: %s" (error-message-string err))
- nil))
- (when (>= while-n1 maxn1)
- (error "rngalt-validate: Could not validate")))
- (rng-validate-done)))
-
-(defvar rngalt-region-ovl nil)
-(defvar rngalt-region-prepared nil)
-(defun rngalt-complete-tag-region-prepare ()
- (unless rngalt-region-prepared
- (when rngalt-region-ovl
- (when (overlayp rngalt-region-ovl)
- (delete-overlay rngalt-region-ovl))
- (setq rngalt-region-ovl nil))
- (when (and mark-active
- transient-mark-mode)
- (let ((beginning (region-beginning))
- (end (region-end)))
- (unless (= (point) (region-beginning))
- (goto-char beginning))
- (when (save-excursion
- (when (re-search-forward "\\=[^<]*\\(?:<[^<]*>\\)*[^>]*" end t)
- (= end (point))))
- (setq rngalt-region-ovl (make-overlay beginning end))
- (overlay-put rngalt-region-ovl 'face 'region)
- )))
- (setq rngalt-region-prepared t)))
-
-(defun rngalt-complete-tag-region-cleanup ()
- (when rngalt-region-prepared
- (when (overlayp rngalt-region-ovl)
- (delete-overlay rngalt-region-ovl))
- (deactivate-mark)
- (setq rngalt-region-prepared nil)))
-
-(defun rngalt-complete-tag-region-finish ()
- (when (and rngalt-region-prepared
- (overlayp rngalt-region-ovl))
- (let ((here (point)))
- (insert ">")
- (goto-char (overlay-end rngalt-region-ovl))
- (nxml-finish-element)
- (rngalt-validate)
- (goto-char here)))
- (rngalt-complete-tag-region-cleanup))
-
-(defun rngalt-complete-tag (lt-pos)
- "Like `rng-complete-tag' but with some additions.
-The additions are:
-- Alternate completion.
-- Complete around highlighted region.
-
-See also the variable `rngalt-completing-read-tag'."
- (let (rng-complete-extra-strings)
- (when (and (= lt-pos (1- (point)))
- rng-complete-end-tags-after-<
- rng-open-elements
- (not (eq (car rng-open-elements) t))
- (or rng-collecting-text
- (rng-match-save
- (rng-match-end-tag))))
- (setq rng-complete-extra-strings
- (cons (concat "/"
- (if (caar rng-open-elements)
- (concat (caar rng-open-elements)
- ":"
- (cdar rng-open-elements))
- (cdar rng-open-elements)))
- rng-complete-extra-strings)))
- (when (save-excursion
- (re-search-backward rng-in-start-tag-name-regex
- lt-pos
- t))
- (and rng-collecting-text (rng-flush-text))
- (rngalt-complete-tag-region-prepare)
- (let ((completion
- (let ((rng-complete-target-names
- (rng-match-possible-start-tag-names))
- (rng-complete-name-attribute-flag nil))
- (rngalt-complete-before-point (1+ lt-pos)
- 'rng-complete-qname-function
- "Insert tag: "
- nil
- 'rng-tag-history
- rngalt-completing-read-tag)))
- name)
- (when completion
- (cond ((rng-qname-p completion)
- (setq name (rng-expand-qname completion
- t
- 'rng-start-tag-expand-recover))
- (when (and name
- (rng-match-start-tag-open name)
- (or (not (rng-match-start-tag-close))
- ;; need a namespace decl on the root element
- (and (car name)
- (not rng-open-elements))))
- ;; attributes are required
- (insert " "))
- (rngalt-complete-tag-region-finish)
- (run-hook-with-args 'rngalt-complete-tag-hooks completion)
- )
- ((member completion rng-complete-extra-strings)
- (insert ">")))))
- (rngalt-complete-tag-region-finish)
- t)))
-
-(defvar rngalt-complete-tag-hooks nil
- "Hook run after completing a tag.
-Each function is called with the last name of the last tag
-completed.")
-
-(defun rngalt-complete-attribute-name (lt-pos)
- "Like `rng-complete-attribute-name' but with alternate completion.
-See the variable `rngalt-completing-read-attribute-name'."
- (when (save-excursion
- (re-search-backward rng-in-attribute-regex lt-pos t))
- (let ((attribute-start (match-beginning 1))
- rng-undeclared-prefixes)
- (and (rng-adjust-state-for-attribute lt-pos
- attribute-start)
- (let ((rng-complete-target-names
- (rng-match-possible-attribute-names))
- (rng-complete-extra-strings
- (mapcar (lambda (prefix)
- (if prefix
- (concat "xmlns:" prefix)
- "xmlns"))
- rng-undeclared-prefixes))
- (rng-complete-name-attribute-flag t)
- completion)
- (setq completion
- (rngalt-complete-before-point attribute-start
- 'rng-complete-qname-function
- "Attribute: "
- nil
- 'rng-attribute-name-history
- rngalt-completing-read-attribute-name))
- (when (and completion
- (< 0 (length completion)))
- (insert "=\"")))))
- t))
-
-(defun rngalt-complete-attribute-value (lt-pos)
- "Like `rng-complete-attribute-value' but with alternate completion.
-See the variable `rngalt-completing-read-attribute-value'."
- (when (save-excursion
- (re-search-backward rng-in-attribute-value-regex lt-pos t))
- (let ((name-start (match-beginning 1))
- (name-end (match-end 1))
- (colon (match-beginning 2))
- (value-start (1+ (match-beginning 3))))
- (and (rng-adjust-state-for-attribute lt-pos
- name-start)
- (if (string= (buffer-substring-no-properties name-start
- (or colon name-end))
- "xmlns")
- (rngalt-complete-before-point
- value-start
- (rng-strings-to-completion-alist
- (rng-possible-namespace-uris
- (and colon
- (buffer-substring-no-properties (1+ colon) name-end))))
- "Namespace URI: "
- nil
- 'rng-namespace-uri-history
- rngalt-completing-read-attribute-value) ;; fix-me
- (rng-adjust-state-for-attribute-value name-start
- colon
- name-end)
- (rngalt-complete-before-point
- value-start
- (rng-strings-to-completion-alist
- (rng-match-possible-value-strings))
- "Value: "
- nil
- 'rng-attribute-value-history
- rngalt-completing-read-attribute-value))
- (unless (eq (char-after) (char-before value-start))
- (insert (char-before value-start)))))
- t))
-
-(defun rngalt-complete-before-point (start table prompt &optional predicate hist altcompl)
- "Complete text between START and point.
-Works like `rng-complete-before-point' if ALTCOMPL is nil. When
-ALTCOMPL is a function symbol and no completion alternative is
-available from table then this is called instead of
-`compleating-read' with the same parameters."
- (let* ((orig (buffer-substring-no-properties start (point)))
- (completion (try-completion orig table predicate))
- (completing-fun (if altcompl altcompl 'completing-read))
- (completion-ignore-case t))
- (cond ((not (or completion completing-fun))
- (if (string= orig "")
- (message "No completions available")
- (message "No completion for %s" (rng-quote-string orig)))
- (ding)
- nil)
- ((eq completion t) orig)
- ((and completion
- (not (string= completion orig)))
- (delete-region start (point))
- (insert completion)
- (cond ((not (rng-completion-exact-p completion table predicate))
- (message "Incomplete")
- nil)
- ((eq (try-completion completion table predicate) t)
- completion)
- (t
- (message "Complete but not unique")
- nil)))
- (t
- (setq completion
- (let ((saved-minibuffer-setup-hook
- (default-value 'minibuffer-setup-hook)))
- (add-hook 'minibuffer-setup-hook
- 'minibuffer-completion-help
- t)
- (unwind-protect
- (funcall completing-fun
- prompt
- table
- predicate
- nil
- orig
- hist)
- (setq-default minibuffer-setup-hook
- saved-minibuffer-setup-hook))))
- (when completion
- (delete-region start (point))
- (insert completion))
- completion))))
-
-(defun rngalt-get-missing-required-attr (single-tag)
- "Get a list of missing required attributes.
-This is to be used when completing attribute names.
-SINGLE-TAG should be non-nil if the tag has no end tag.
-
-For a typical use see `nxhtml-completing-read-attribute-name' in
-nxhtml.el.
-"
- ;; FIX-ME: This is a terrible cludge. One day I hope I will
- ;; understand how to write this ;-)
- ;;
- ;; I currently fetch the missing tags from the error message in the
- ;; error overlay set by rng validate.
- (let ((here (point)))
- (unless (save-match-data (looking-at "[^<]\\{,200\\}>"))
- ;; We can probably add a >, so let us do it:
- (when single-tag
- (insert "/"))
- (insert ">")
- (rngalt-validate))
- (goto-char here))
- (let ((ovl (rng-error-overlay-message (or (rng-error-overlay-after (point))
- (rng-error-overlay-after (1- (point)))))))
- ;;(message "ovl=%s" ovl)(sit-for 1)
- ;;(message "prop ovl=%s" (overlay-properties ovl))(sit-for 1)
- (when (and ovl
- (eq (overlay-get ovl 'category) 'rng-error))
- ;;(message "rng-error")(sit-for 1)
- (let ((msg (overlay-get ovl 'help-echo)))
- ;;(message "msg=%s" msg);(sit-for 1)
- (when (string-match "Missing attributes? \\(.*\\)" msg)
- ;;(message "0=%s" (match-string 0 msg));(sit-for 1)
- ;;(message "1=%s" (match-string 1 msg));(sit-for 1)
- (let* ((matches (match-string 1 msg))
- (lst (split-string (substring matches 1 (- (length matches) 1)) "\", \"")))
- ;;(message "matches=%s" matches);(sit-for 2)
- ;;(message "lst=%s" lst);(sit-for 1)
- lst))))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Validation start state
-
-(defun rngalt-after-change-major ()
- (unless (and (boundp 'mumamo-set-major-running)
- mumamo-set-major-running)
- (setq rngalt-major-mode major-mode)
- (when (and (derived-mode-p 'nxml-mode)
- rngalt-validation-header)
- (rngalt-reapply-validation-header))
- (rngalt-update-validation-header-overlay)))
-
-(defvar rngalt-validation-header-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map [mouse-1] 'rngalt-minimal-validation-header-toggle)
- map))
-
-(defun rngalt-update-validation-header-overlay ()
- (if (and (boundp 'rngalt-display-validation-header)
- rngalt-display-validation-header
- rngalt-validation-header
- (or (derived-mode-p 'nxml-mode)
- (let ((major-mode rngalt-major-mode))
- (and major-mode
- (derived-mode-p 'nxml-mode))))
- )
- (progn
- (if rngalt-validation-header-overlay
- (move-overlay rngalt-validation-header-overlay 1 1)
- (setq rngalt-validation-header-overlay (make-overlay 1 1)))
- (overlay-put rngalt-validation-header-overlay
- 'priority 1000)
- ;; Other properties should go to the 'before-string
- (let* ((validation-header (nth 2 rngalt-validation-header))
- (header
- (if rngalt-minimal-validation-header
- (propertize
- (concat
- "*** Fictive XHTML/XML Validation Header: ... "
- (save-match-data
- (if (string-match "\\(<[^[:space:]>]+\\)[^>]*>[^<>]*\\'"
- validation-header)
- (concat (match-string 1 validation-header) ">")
- "Error"))
- "\n")
- 'face 'rngalt-validation-header-bottom)
- (concat
- (propertize "*** Fictive XHTML/XML Validation Header:\n"
- 'face 'rngalt-validation-header-top)
- (propertize (concat validation-header "\n")
- 'face 'rngalt-validation-header-bottom)))))
- (setq header
- (propertize
- header
- 'help-echo
- "Click to toggle full/minimal display of header"
- 'keymap rngalt-validation-header-keymap))
- (overlay-put rngalt-validation-header-overlay
- 'before-string header)))
- (when rngalt-validation-header-overlay
- (delete-overlay rngalt-validation-header-overlay))))
-
-(defun rngalt-update-validation-header-overlay-everywhere ()
- (dolist (b (buffer-list))
- (when (buffer-live-p b)
- (with-current-buffer b
- (when rngalt-validation-header
- (rngalt-update-validation-header-overlay))))))
-
-;; This is exactly the same as the original `rng-set-initial-state'
-;; except when `rngalt-validation-header' is non-nil."
-(defadvice rng-set-initial-state (around
- rngalt-set-initial-state
- activate
- compile
- )
- (nxml-ns-init)
- (rng-match-start-document)
- (setq rng-open-elements nil)
- (setq rng-pending-contents nil)
- (when rngalt-validation-header
- (let ((state (car rngalt-validation-header)))
- (rng-restore-state state)))
- (setq ad-return-value (goto-char (point-min))))
-
-;; (defun rng-new-validate-prepare ()
-;; "Prepare to do some validation, initializing point and the state.
-;; Return t if there is work to do, nil otherwise.
-
-;; This is exactly the same as the original-insert-directory
-;; `rng-validate-prepare' with the difference that the state at
-;; point 1 is set differently if `rngalt-validation-header' is
-;; non-nil.
-
-;; See also `rng-set-initial-state'."
-;; (cond ((= rng-validate-up-to-date-end 1)
-;; (rng-set-initial-state)
-;; t)
-;; ((= rng-validate-up-to-date-end (point-max))
-;; nil)
-;; (t (let ((state
-;; (if (and rngalt-validation-header
-;; (= rng-validate-up-to-date-end 1))
-;; (car rngalt-validation-header)
-;; (get-text-property (1- rng-validate-up-to-date-end)
-;; 'rng-state))))
-;; (cond (state
-;; (rng-restore-state state)
-;; (goto-char rng-validate-up-to-date-end))
-;; (t
-;; (let ((pos (previous-single-property-change
-;; rng-validate-up-to-date-end
-;; 'rng-state)))
-;; (cond (pos
-;; (rng-restore-state
-;; (or (get-text-property (1- pos) 'rng-state)
-;; (error "Internal error: state null")))
-;; (goto-char pos))
-;; (t (rng-set-initial-state))))))))))
-
-
-;; For as-external.el
-;;;###autoload
-(defun rngalt-set-validation-header (start-of-doc)
- (let ((old-rvm rng-validate-mode))
- (when old-rvm (rng-validate-mode -1))
- (if start-of-doc
- (progn
- (add-hook 'after-change-major-mode-hook 'rngalt-after-change-major nil t)
- (setq rngalt-validation-header (rngalt-get-state-after start-of-doc))
- (rng-set-schema-file-1 (cadr rngalt-validation-header))
- (setq rngalt-current-schema-file-name rng-current-schema-file-name)
- (setq rng-compile-table nil)
- (setq rng-ipattern-table nil)
- (setq rng-last-ipattern-index nil))
- (remove-hook 'after-change-major-mode-hook 'rngalt-after-change-major t)
- (setq rngalt-validation-header nil)
- (when old-rvm
- (rng-set-vacuous-schema)
- (rng-auto-set-schema)))
- (when old-rvm
- (rng-validate-mode 1)
- (rngalt-update-validation-header-overlay)
- (rngalt-update-validation-header-buffer))))
-
-(defun rngalt-reapply-validation-header ()
- (when rngalt-validation-header
- (when (or (not rng-current-schema-file-name)
- (unless (string= rngalt-current-schema-file-name rng-current-schema-file-name)
- (lwarn 'schema-mismatch :warning
- "XHTML validation header schema %s reapplied (replaces %s)"
- (file-name-nondirectory rngalt-current-schema-file-name)
- (file-name-nondirectory rng-current-schema-file-name))
- t))
- (rngalt-set-validation-header (nth 2 rngalt-validation-header)))))
-
-;; (defun rngalt-clear-validation-header ()
-;; "Remove XML validation header from current buffer.
-;; For more information see `rngalt-show-validation-header'."
-;; (interactive)
-;; (rngalt-set-validation-header nil)
-;; (rng-auto-set-schema t))
-
-;; FIX-ME: Add edit header?
-
-(defun rngalt-get-validation-header-buffer ()
- (let ((b (get-buffer " *XML Validation Header*")))
- (unless b
- (setq b (get-buffer-create " *XML Validation Header*"))
- (with-current-buffer b
- ;;(fundamental-mode)
- (nxml-mode)))
- b))
-
-(defun rngalt-get-state-after (start-of-doc)
- ;; FIX-ME: better buffer name?
- (let ((statebuf (rngalt-get-validation-header-buffer)))
- (with-current-buffer statebuf
- (when rng-validate-mode (rng-validate-mode -1))
- (erase-buffer)
- (insert start-of-doc)
- ;; From rng-get-state
- (setq rng-match-state nil)
- (setq nxml-ns-state nil)
- (setq rng-open-elements nil)
- ;; From rng-match-init-buffer
- (setq rng-compile-table nil)
- (setq rng-ipattern-table nil)
- (setq rng-last-ipattern-index nil)
-
- (nxml-mode)
- (rng-validate-mode 1)
- (rngalt-validate)
- (let* ((state (rng-get-state))
- (cp-state (copy-tree state)))
- ;;(if (equal state cp-state) (message "(equal state cp-state)=t") (message "(equal state cp-state)=nil"))
- ;; Fix-me: is the copy-tree necessary here?
- (list
- cp-state
- (rng-locate-schema-file)
- start-of-doc)))))
-
-(defun rngalt-show-validation-header ()
- "Show XML validation header used in current buffer.
-The XML validation header is used in `nxhtml-mode' to set a state
-for XML validation at the start of the buffer.
-
-The purpose is to make it possible to use `nxml-mode' completion
-in buffers where you do not actually have a full XML file. This
-could for example be a buffer with PHP code or a buffer with a
-blog entry.
-
-More techhnical info: This can be used by any mode derived from
-`nxml-mode'. To use it in other modes than `nxhtml-mode' replace
-`rng-complete' by `rngalt-complete' in `nxml-completion-hook'."
- (interactive)
- (unless (derived-mode-p 'nxml-mode)
- (error "Buffer mode is not an nXml type major mode: %s" major-mode))
- (rngalt-update-validation-header-buffer)
- (display-buffer (rngalt-get-validation-header-buffer) t))
-
-(defun rngalt-update-validation-header-buffer ()
- (let ((vh (nth 2 rngalt-validation-header))
- (cb (current-buffer)))
- (with-current-buffer (rngalt-get-validation-header-buffer)
- (erase-buffer)
- (if (not vh)
- (setq header-line-format (concat " No XML validation header in buffer "
- (buffer-name cb)))
- (insert vh)
- (setq header-line-format (concat " XML validation header in buffer "
- (buffer-name cb)))))))
-
-;; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
-
-
-(provide 'rngalt)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; rngalt.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/tidy-xhtml.el b/emacs.d/nxhtml/nxhtml/tidy-xhtml.el
deleted file mode 100644
index 1c2cdd4..0000000
--- a/emacs.d/nxhtml/nxhtml/tidy-xhtml.el
+++ /dev/null
@@ -1,2921 +0,0 @@
-;;; tidy-xhtml.el --- Interface to the HTML Tidy program
-
-;; Copyright (C) 2001, 2002, 2003, 2006, 2007 by Free Software
-;; Foundation, Inc.
-
-;; Emacs Lisp Archive Entry
-;; Ancestors filename: tidy.el
-;; Author: Kahlil (Kal) HODGSON <dorge@tpg.com.au>
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Original X-URL: http://www.emacswiki.org/elisp/tidy.el
-;; Last-Updated: 2008-03-09T13:10:06+0100 Sun
-(defconst tidy-xhtml:version "2.25")
-;; Keywords: languages
-
-;; This file is NOT part of GNU Emacs.
-
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;;; Commentary:
-
-;; Provides a simple interface to the HTML Tidy program -- a free
-;; utility that can fix common errors in your mark-up and clean up
-;; sloppy editing automatically. See
-;;
-;; <http://tidy.sourceforge.net/>
-;;
-;; for more details. This package provides the following functions:
-;;
-;; `tidy-buffer',
-;; `tidy-region',
-;; `tidy-tree',
-;; `tidy-html-site',
-;; `tidy-parse-config-file',
-;; `tidy-save-settings',
-;; `tidy-describe-options',
-;; `tidy-show-xhtml-options',
-;; `tidy-set-xhtml-options',
-;;
-;; These can be invoked interactively (using M-x) or via the menu-bar.
-;; The function `tidy-buffer' sends the current buffer to HTML Tidy,
-;; replacing the existing contents with a "tidied" version. If
-;; `tidy-buffer' is given a prefix argument, tidy operates on the
-;; current region, ignoring mark-up outside <BODY>...</BODY> tags
-;; (useful for writhing cgi scripts in Pearl). Warnings and errors
-;; are presented in a compilation buffer to facilitate tracking down
-;; necessary changes (e.g. C-x ` is bound to `next-error').
-;;
-;; This package also provides menu-bar support for setting Tidy's many
-;; options, and includes support for Tidy configuration files. The
-;; function `tidy-parse-config-file' will synchronise options
-;; displayed in the menu-bar with the settings in `tidy-config-file'.
-;; This is normally called by the load-hook for your HTML editing mode
-;; (see installation instructions below). The function
-;; `tidy-save-settings' will save the current option settings to your
-;; `tidy-config-file'. Finally `tidy-describe-options' allows you to
-;; browse the documentation strings associated with each option.
-
-;;;
-
-;;;; Installation:
-
-;; This package assumes you have and up-to-date HTML Tidy program
-;; installed on your system. See the URL above for instructions on
-;; how to do this. To set up this support package, first place the
-;; "tidy.el" file somewhere in your `load-path' and open it in Emacs.
-;; Byte-compile and load this package using the command
-;;
-;; M-x emacs-lisp-byte-compile-and-load <RET>
-;;
-;; Next customise the variables `tidy-config-file', `tidy-temp-dir'
-;; `tidy-shell-program', `tidy-menu-lock' and `tidy-menu-x-position'
-;;
-;; M-x customize-group <RET> tidy <RET>
-;;
-;; Now add the following autoloads to your ".emacs.el" file:
-;;
-;; (autoload 'tidy-buffer "tidy" "Run Tidy HTML parser on current buffer" t)
-;; (autoload 'tidy-parse-config-file "tidy" "Parse the `tidy-config-file'" t)
-;; (autoload 'tidy-save-settings "tidy" "Save settings to `tidy-config-file'" t)
-;; (autoload 'tidy-build-menu "tidy" "Install an options menu for HTML Tidy." t)
-;;
-;; If you use html-mode to edit HTML files then add something like
-;; this as well
-
-;; (defun my-html-mode-hook () "Customize my html-mode."
-;; (tidy-build-menu html-mode-map)
-;; (local-set-key [(control c) (control c)] 'tidy-buffer)
-;; (setq sgml-validate-command "tidy"))
-;;
-;; (add-hook 'html-mode-hook 'my-html-mode-hook)
-
-;; This will set up a "tidy" menu in the menu bar and bind the key
-;; sequence "C-c C-c" to `tidy-buffer' in html-mode (normally bound to
-;; `validate-buffer').
-;;
-;; For other modes (like html-helper-mode) simple change the variables
-;; `html-mode-hook' and `html-mode-map' to whatever is appropriate e.g.
-
-;; (defun my-html-mode-hook () "Customize my html-helper-mode."
-;; (tidy-build-menu html-helper-mode-map)
-;; (local-set-key [(control c) (control c)] 'tidy-buffer)
-;; (setq sgml-validate-command "tidy"))
-;;
-;; (add-hook 'html-helper-mode-hook 'my-html-mode-hook)
-
-;; Finally, restart Emacs and open an HTML file to test-drive the tidy
-;; package. For people new to HTML tidy check that the option "markup"
-;; under the "Input/Output" sub menu is set. You can read the
-;; documentation on this option via the menu item "Describe Options".
-;;
-;; Enjoy!
-
-;;;; New Features:
-;;
-;; 0. Now compatible with CVS version of Tidy as at 22 May 2003
-;; 1. Improved menu support to facillitate incorporting new options
-;; 2. Menu lock option makes menu stick when toggling options.
-;; 3. Now runs on XEmacs!!
-;; 4. Uses error file rather than std-error to retrieve errors (this
-;; fixes some odd pop up behaviour)
-;; 5. minor bug fix (empty config files)
-;; 6. handle buffer modified query in error buffer better
-;; 7. make it impossible to mark the error buffer as modified
-;; 8. Added the variable `tidy-temp-directory'.
-;; 9. Bugfix in tidy-buffer: call find-file-noselect with NOWARN
-;; 10. Removes ^M on w32.
-;; 11. Changed defcustom types to 'file and 'directory.
-;; 12. Added `tidy-set-xhtml-options'.
-;; 13. Tried to handle encodings.
-;; 14. Added the function `tidy-region'.
-;; 15. Added ediff support.
-;; 16. Added `tidy-tree'.
-;; 17. Added `tidy-html-site'.
-
-;;;; ToDo:
-;;
-;; 1. Automatically set "char-encoding" according to the buffer encoding
-;; 2. Should check value of HTML_TIDY environment variable.
-
-
-;;;; Bugs:
-
-;; Requires a version of HTML Tidy that understands the "-f"
-;; "-config" "--show-body-only" command line options e.g. source-forge
-;; pre-release.
-;;
-;; There may be a bug with setting doctypes. I don't use this feature
-;; yet and, well, don't really know how its supposed to work:-)
-;;
-;; Care with character encodings!!
-
-
-;;; History:
-
-;; 2006-05-09: New features 10-17 above.
-;; - Lennart Borgman
-;; 2006-05-24: Fixed some errors spotted by Andreas Roethler.
-
-
-;;;; Credits
-
-;; This code was inspired by an Emacs "tip" suggested by Pete Gelbman.
-;;
-;; Thanks to Hans-Michael Stahl for comments regarding XEmacs
-;; compatibility.
-;;
-;; Thanks to Thomas Baumann for bugfix's in `tidy-parse-config-file'
-;; and `tidy-buffer'.
-;;
-;; Thanks to Chris Lott for comments regarding installation and menu
-;; display
-;;
-;; Thanks to Jeroen Baekelandt for noting a problem with ange-ftp and
-;; inspiring `tidy-temp-directory'.
-
-;;;; Code:
-
-;;;;; Forward references (stuff which must come first)
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'ediff))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'ourcomments-util nil t))
-(eval-when-compile
- (add-to-list 'load-path default-directory))
-(eval-when-compile (require 'html-site nil t))
-(require 'easymenu) ;; This makes menus so much easier!
-(require 'compile) ;; To make the error buffer more sexy
-(require 'cus-edit) ;; Just for face custom-button
-(require 'help-mode)
-
-;; The following two are functions so that the same compiled code will
-;; work in both situations (time cost is negligible)
-
-(defsubst tidy-xemacs-p ()
- "Return t iff we are running XEmacs this session."
- (not (null (string-match "^XEmacs.*" (emacs-version)))))
-
-(defsubst tidy-windows-p ()
- "Return t iff we are running on a Windows system."
- (memq system-type '(emx win32 w32 mswindows ms-dos windows-nt)))
-
-;; function definitions
-
-;; XEmacs
-(defalias 'tidy-x-event-function 'event-function)
-(defalias 'tidy-x-event-object 'event-object)
-(defalias 'tidy-x-find-menu-item 'find-menu-item)
-(defalias 'tidy-x-get-popup-menu-response 'get-popup-menu-response)
-(defalias 'tidy-x-make-event 'make-event)
-(defalias 'tidy-x-misc-user-event-p 'misc-user-event-p)
-
-;;;;; User Variables
-
-;;;###autoload
-(defgroup tidy nil
- "Provides a simple interface to the HTML Tidy program -- a free
-utility that can fix common errors in your mark-up and clean up
-sloppy editing automatically. See
-
- <http://tidy.sourceforge.net/>
-
-for more details. This package provides the following functions:
-
- `tidy-buffer',
- `tidy-parse-config-file',
- `tidy-save-settings', and
- `tidy-describe-options',
-
-These can be invoked interactively (using M-x) or via the menu-bar.
-The function `tidy-buffer' sends the current buffer to HTML Tidy,
-replacing the existing contents with a \"tidied\" version. If
-`tidy-buffer' is given a prefix argument, tidy operates on the
-current region, ignoring mark-up outside <BODY>...</BODY> tags
-\(useful for writhing cgi scripts in Pearl). Warnings and errors
-are presented in a compilation buffer to facilitate tracking down
-necessary changes (e.g. C-x ` is bound to `next-error').
-
-This package also provides menu-bar support for setting Tidy's many
-options, and includes support for Tidy configuration files. The
-function `tidy-parse-config-file' will synchronise options
-displayed in the menu-bar with the settings in `tidy-config-file'.
-This is normally called by the load-hook for your HTML editing mode
-\(see installation instructions below). The function
-`tidy-save-settings' will save the current option settings to your
-`tidy-config-file'. Finally `tidy-describe-options' allows you to
-browse the documentation strings associated with each option.
-"
- :group 'nxhtml
- :group 'hypermedia)
-
-;; (defcustom tidy-use-ediff nil
-;; "If non-nil call ediff in `tidy-buffer' instead of replacing."
-;; :group 'tidy
-;; :type 'boolean)
-
-(defvar tidy-warnings 0)
-(defvar tidy-errors 0)
-(defvar tidy-message nil)
-
-;;(defvar tidy-batch-buffer nil)
-(defvar tidy-batch-last-file nil)
-
-(defvar tidy-default-config-file "~/.tidyrc")
-
-(defvar tidy-config-file-parsed nil)
-
-(defcustom tidy-config-file tidy-default-config-file
- "Path to your default tidy configuration file.
-
-This is used by `tidy-parse-config-file' to synchronise Tidy's behaviour
-inside Emacs with its behaviour outside, and by `tidy-save-settings' to
-set your configuration file from within Emacs. If you never want this to
-happen, set `tidy-config-file' to \"\"."
- :group 'tidy
- :type 'file
- :set (lambda (symbol value)
- (set-default symbol value)
- (if (file-readable-p value)
- ;; Just set the default values here:
- ;;(tidy-parse-config-file)
- ;; Just tell we need to parse:
- (setq tidy-config-file-parsed nil)
- (if (file-exists-p value)
- (lwarn '(tidy-config-file)
- :warning "Tidy config file not readable: %s" value)
- (unless (string= value tidy-default-config-file)
- (lwarn '(tidy-config-file)
- :warning "Tidy config file not found: %s" value))))))
-
-
-(defcustom tidy-shell-program "tidy"
- "The HTML program."
- :group 'tidy
- :type '(choice (file :must-match t)
- (string :tag "File name (searched for in path): "))
- :set (lambda (symbol value)
- (set-default symbol value)
- (unless (string= value "tidy")
- (or (file-executable-p value)
- (executable-find value)
- (lwarn '(tidy-shell-program)
- :error "Tidy program not found: %s" value)))))
-
-(defcustom tidy-temp-directory temporary-file-directory
- "Directory where tidy places its temp files. The default is the
-current directory which works fine unless you are operating on remote
-files via `ange-ftp' and its ilk, in which case it will try to place
-the temp files on the remote server (and will probably fail). If this
-is the case try setting this variable to something like \"/tmp/\" or
-\"/var/tmp/\"."
- :group 'tidy
- :type 'directory
- :set-after '(temporary-file-directory))
-
-(defcustom tidy-menu-lock t
- " *Non-nil means menu is locked (i.e. doesn't pop down) when
-selecting toggle and radio options.
-
-See also `tidy-menu-x-position'."
- :type 'boolean
- :group 'tidy)
-
-(defcustom tidy-menu-x-position 211
- "Specify menu position height in pixels.
-
-This variable is used to set the horizontal position of the locked
-menu, so don't forget to adjust it if menu position is not ok.
-
-See also `tidy-menu-lock'."
- :type 'integer
- :group 'tidy)
-
-;;;;; Local Variables
-
-(defvar tidy-debug nil
- "If t then we rebuild everything on reload. Useful for debugging.")
-
-;;(eval-when-compile (setq tidy-debug t))
-
-(defun tidy-toggle-debug ()
- "Toggle value of tidy-debug."
- (interactive)
- (message "tidy-debug is %s" (setq tidy-debug (not tidy-debug))))
-
-;; (defun tidy-boolean-option-value (symbol)
-;; "Return t when the symbol's value is \"yes\"."
-;; (let ((name (symbol-name symbol)))
-;; (assert (string= "tidy-" (substring name 0 5)))
-;; (setq name (substring name 5))
-;; (let ((entry (assoc name tidy-options-alist)))
-;; (assert (string= "Boolean" (nth 2 entry)))))
-;; (when (symbol-value symbol)
-;; (string= (symbol-value symbol))))
-
-(defvar tidy-options-alist nil
- "An alist containing all valid tidy options.
-Each element is a list of the form
- (NAME, SUB-MENU, VALUE-TYPE, DEFAULT-VALUE, DOC-STRING).
-This is used to automatically construct variables and a menu bar.
-To add new or modify exiting options simply modify this list.")
-
-;; Fix-me: built the options list dynamically, point to
-;; http://tidy.sourceforge.net/docs/quickref.html for help
-(defun tidy-build-options-alist ()
- (when (and tidy-shell-program
- (executable-find tidy-shell-program))
- (let ((outbuf (get-buffer-create "* Tidy options *")))
- (call-process tidy-shell-program
- nil ;; No input
- outbuf ;; Output here
- nil ;; Do not display
- "-help-config")
- (switch-to-buffer outbuf))))
-
-(when (or (null tidy-options-alist) tidy-debug)
- (setq tidy-options-alist
- '(
- ("add-xml-decl" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should add the XML declaration when
-outputting XML or XHTML. Note that if the input already includes an <?xml
-... ?> declaration then this option will be ignored.")
-
-;; ("add-xml-pi" "Fix Markup" "Boolean" "no"
-;; "
-;; Type: Boolean
-;; Default: no
-;; Example: y/n, yes/no, t/f, true/false, 1/0
-
-;; This option is the same as the add-xml-decl option.")
-
- ("add-xml-space" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should add xml:space=\"preserve\" to elements
-such as <PRE>, <STYLE> and <SCRIPT> when generating XML. This is needed if
-the whitespace in such elements is to be parsed appropriately without
-having access to the DTD.")
-
- ("alt-text" "Fix Markup" "String" ""
- "
-Type: String
-Default: -none-
-
-This option specifies the default \"alt=\" text Tidy uses for <IMG>
-attributes. This feature is dangerous as it suppresses further
-accessibility warnings. You are responsible for making your documents
-accessible to people who can not see the images!")
-
- ("ascii-chars" "Fix Markup" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-Can be used to modify behavior of -c (--clean yes) option.
-Defaults to \"yes\" when using -c. Set to \"no\" to prevent
-converting &emdash;, &rdquo;, and other named character entities
-to their ascii equivalents.")
-
- ("assume-xml-procins" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should change the parsing of processing
-instructions to require ?> as the terminator rather than >. This option is
-automatically set if the input is in XML.")
-
- ("bare" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should strip Microsoft specific HTML from
-Word 2000 documents, and output spaces rather than non-breaking spaces
-where they exist in the input.")
-
- ("break-before-br" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output a line break before each <BR>
-element.")
-
- ("char-encoding" "Encoding" "Encoding" "ascii"
- "
-Type: Encoding
-Default: ascii
-Example: ascii, latin1, raw, utf8, iso2022, mac, win1252
-
-This option specifies the character encoding Tidy uses for both the input
-and output. Possible values are: ascii, latin1, raw, utf8, iso2022, mac,
-win1252. For ascii, Tidy will accept Latin-1 (ISO-8859-1) character
-values, but will use entities for all characters whose value > 127. For
-raw, Tidy will output values above 127 without translating them into
-entities. For latin1, characters above 255 will be written as
-entities. For utf8, Tidy assumes that both input and output is encoded as
-UTF-8. You can use iso2022 for files encoded using the ISO-2022 family of
-encodings e.g. ISO-2022-JP. For mac and win1252, Tidy will accept vendor
-specific character values, but will use entities for all characters whose
-value > 127.")
-
- ("clean" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should strip out surplus presentational tags
-and attributes replacing them by style rules and structural markup as
-appropriate. It works well on the HTML saved by Microsoft Office products.")
-
- ("doctype" "Fix Markup" "DocType" "auto"
- "
-Type: DocType
-Default: auto
-Example: auto, omit, strict, loose, transitional, user specified fpi \(string\)
-
-This option specifies the DOCTYPE declaration generated by Tidy. If set to
-\"omit\" the output won't contain a DOCTYPE declaration. If set to \"auto\"
-\(the default\) Tidy will use an educated guess based upon the contents of
-the document. If set to \"strict\", Tidy will set the DOCTYPE to the strict
-DTD. If set to \"loose\", the DOCTYPE is set to the loose \(transitional\)
-DTD. Alternatively, you can supply a string for the formal public
-identifier \(FPI\). For example:
-
- doctype: \"-//ACME//DTD HTML 3.14159//EN\"
-
-If you specify the FPI for an XHTML document, Tidy will set
-the system identifier to the empty string. Tidy leaves the DOCTYPE for
-generic XML documents unchanged.")
-
- ("drop-empty-paras" "Fix Markup" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should discard empty paragraphs. If set to
-no, empty paragraphs are replaced by a pair of <BR> elements as HTML4
-precludes empty paragraphs.")
-
- ("drop-font-tags" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should discard <FONT> and <CENTER> tags
-rather than creating the corresponding style rules, but only if the clean
-option is also set to yes.")
-
- ("drop-proprietary-attributes" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should strip out proprietary attributes,
-such as MS data binding attributes.")
-
- ("enclose-block-text" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should insert a <P> element to enclose any
-text it finds in any element that allows mixed content for HTML
-transitional but not HTML strict.")
-
- ("enclose-text" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should enclose any text it finds in the body
-element within a <P> element. This is useful when you want to take
-existing HTML and use it with a style sheet.")
-
-;; ("error-file" "Omit" "String" "-none-"
-;; "
-;; Type: String
-;; Default: -none-
-
-;; This option specifies the error file Tidy uses for errors and
-;; warnings. Normally errors and warnings are output to \"stderr\".
-
-;; This is option is ignored in Emacs.")
-
- ("escape-cdata" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should convert <![CDATA[]]> sections to
-normal text.")
-
- ("fix-backslash" "Fix Markup" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should replace backslash characters \"\\\" in
-URLs by forward slashes \"/\".")
-
- ("fix-bad-comments" "Fix Markup" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should replace unexpected hyphens with \"=\"
-characters when it comes across adjacent hyphens. The default is yes. This
-option is provided for users of Cold Fusion which uses the comment syntax:
-<!--- --->")
-
- ("fix-uri" "Fix Markup" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should check attribute values that carry
-URIsfor illegal characters and if such are found, escape them as HTML 4
-recommends.")
-
- ("force-output" "Input/Output" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should produce output even if errors are
-encountered. Use this option with care - if Tidy reports an error,
-this means Tidy was not able to, or is not sure how to, fix the error,
-so the resulting output may not reflect your intention.")
-
-;; ("gnu-emacs" "Omit" "Boolean" "no"
-;; "
-;; Type: Boolean
-;; Default: no
-;; Example: y/n, yes/no, t/f, true/false, 1/0
-
-;; This option specifies if Tidy should change the format for reporting
-;; errors and warnings to a format that is more easily parsed by GNU
-;; Emacs.
-
-;; This option is automatically set in Emacs." )
-
- ("hide-comments" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should print out comments.")
-
- ("hide-endtags" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should omit optional end-tags when
-generating the pretty printed markup. This option is ignored if you are
-outputting to XML.")
-
- ("indent" "Indentation" "AutoBool" "no"
- "
-Type: AutoBool
-Default: no
-Example: auto, y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should indent block-level tags. If set to
-\"auto\", this option causes Tidy to decide whether or not to indent the
-content of tags such as TITLE, H1-H6, LI, TD, TD, or P depending on whether
-or not the content includes a block-level element. You are advised to avoid
-setting indent to yes as this can expose layout bugs in some browsers.")
-
- ("indent-attributes" "Indentation" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should begin each attribute on a new line.")
-
- ("indent-cdata" "Indent" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should indent <![CDATA[]]> sections.")
-
- ("indent-spaces" "Indentation" "Integer" "2"
- "
-Type: Integer
-Default: 2
-Example: 0, 1, 2, ...
-
-This option specifies the number of spaces Tidy uses to indent content,
-when indentation is enabled.")
-
- ("input-encoding" "Encoding" "Encoding" "latin1"
- "
-Type: Encoding
-Default: ascii
-Example: ascii, latin1, raw, utf8, iso2022, mac, win1252
-
-This option specifies the character encoding Tidy uses for the input. See
-char-encoding for more info.")
-
- ("input-xml" "Input/Output" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should use the XML parser rather than the
-error correcting HTML parser.")
-
- ("join-classes" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should combine class names to generate a
-single new class name, if multiple class assignments are detected on an
-element.")
-
- ("join-styles" "Fix Markup" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should combine styles to generate a single
-new style, if multiple style values are detected on an element.")
-
- ("keep-time" "Preference" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should alter the last modified time for
-files it writes back to. The default is no, which allows you to tidy files
-without affecting which ones will be uploaded to a Web server when using a
-tool such as 'SiteCopy'. Note that this feature may not work on some
-platforms.")
-
- ("literal-attributes" "Preference" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should ensure that whitespace characters
-within attribute values are passed through unchanged.")
-
- ("logical-emphasis" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should replace any occurrence of <I> by <EM>
-and any occurrence of <B> by <STRONG>. In both cases, the attributes are
-preserved unchanged. This option can be set independently of the clean and
-drop-font-tags options.")
-
- ("lower-literals" "Preference" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should convert the value of an attribute
-that takes a list of predefined values to lower case. This is required for
-XHTML documents.")
-
- ("markup" "Input/Output" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should generate a pretty printed version of
-the markup. Note that Tidy won't generate a pretty printed version if it
-finds significant errors (see force-output).")
-
- ("ncr" "Preference" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should allow numeric character references.")
-
- ("newline" "Encoding" "Encoding" "LF"
- "
-Type: Encoding
-Default: LF
-Example: LF, CRLF, CR
-
-Line ending style. \(Only used in batch operations here.\)")
-
- ("new-blocklevel-tags" "Tags" "Tag names" ""
- "
-Type: Tag names
-Default: -none-
-Example: tagX, tagY, ...
-
-This option specifies new block-level tags. This option takes a space or
-comma separated list of tag names. Unless you declare new tags, Tidy will
-refuse to generate a tidied file if the input includes previously unknown
-tags. Note you can't change the content model for elements such as
-<TABLE>, <UL>, <OL> and <DL>.")
-
- ("new-empty-tags" "Tags" "Tag names" ""
- "
-Type: Tag names
-Default: -none-
-Example: tagX, tagY, ...
-
-This option specifies new empty inline tags. This option takes a space or
-comma separated list of tag names. Unless you declare new tags, Tidy will
-refuse to generate a tidied file if the input includes previously unknown
-tags. Remember to also declare empty tags as either inline or blocklevel.")
-
- ("new-inline-tags" "Tags" "Tag names" ""
- "
-Type: Tag names
-Default: -none-
-Example: tagX, tagY, ...
-
-This option specifies new non-empty inline tags. This option takes a space
-or comma separated list of tag names. Unless you declare new tags, Tidy
-will refuse to generate a tidied file if the input includes previously
-unknown tags.")
-
- ("new-pre-tags" "Tags" "Tag names" ""
- "
-Type: Tag names
-Default: -none-
-Example: tagX, tagY, ...
-
-This option specifies new tags that are to be processed in exactly the
-same way as HTML's <PRE> element. This option takes a space or comma
-separated list of tag names. Unless you declare new tags, Tidy will refuse
-to generate a tidied file if the input includes previously unknown
-tags. Note you can not as yet add new CDATA elements (similar to
-<SCRIPT>).")
-
- ("numeric-entities" "Preference" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output entities other than the
-built-in HTML entities \(&amp;, &lt;, &gt; and &quot;\) in the numeric
-rather than the named entity form.")
-
- ("output-bom" "Encoding" "AutoBool" "auto"
- "
-Type: AutoBool
-Default: auto
-Example: auto, y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should write a Unicode Byte Order Mark
-character (BOM; also known as Zero Width No-Break Space; has value of
-U+FEFF) to the beginning of the output; only for UTF-8 and UTF-16 output
-encodings. If set to \"auto\", this option causes Tidy to write a BOM to the
-output only if a BOM was present at the beginning of the input. A BOM is
-always written for XML/XHTML output using UTF-16 output encodings.")
-
- ("output-encoding" "Encoding" "Encoding" "ascii"
- "
-Type: Encoding
-Default: ascii
-Example: ascii, latin1, raw, utf8, iso2022, mac, win1252
-
-This option specifies the character encoding Tidy uses for the output. See
-char-encoding for more info. May only be different from input-encoding for
-Latin encodings (ascii, latin1, mac, win1252).")
-
- ("output-xhtml" "Input/Output" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should generate pretty printed output,
-writing it as extensible HTML. This option causes Tidy to set the DOCTYPE
-and default namespace as appropriate to XHTML. If a DOCTYPE or namespace
-is given they will checked for consistency with the content of the
-document. In the case of an inconsistency, the corrected values will
-appear in the output. For XHTML, entities can be written as named or
-numeric entities according to the setting of the \"numeric-entities\"
-option. The original case of tags and attributes will be preserved,
-regardless of other options.")
-
- ("output-xml" "Input/Output" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should pretty print output, writing it as
-well-formed XML. Any entities not defined in XML 1.0 will be written as
-numeric entities to allow them to be parsed by a XML parser. The original
-case of tags and attributes will be preserved, regardless of other
-options.")
-
- ("quiet" "Input/Output" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output the summary of the numbers of
-errors and warnings, or the welcome or informational messages.")
-
- ("quote-ampersand" "Preference" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output unadorned & characters as
-&amp;.")
-
- ("quote-marks" "Preference" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output \" characters as &quot; as is
-preferred by some editing environments. The apostrophe character \' is
-written out as &#39; since many web browsers don't yet support &apos;.")
-
- ("quote-nbsp" "Preference" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output non-breaking space characters
-as entities, rather than as the Unicode character value 160 (decimal).")
-
- ("raw" "Omit" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0 char-encoding
-
-Currently not used, but this option would be the same as the
-char-encoding: raw option.")
-
- ("repeated-attributes" "Fix Markup" ("keep-first" "keep-last") "keep-last"
- "
-Type: -
-Default: keep-last
-Example: keep-first, keep-last
-
-This option specifies if Tidy should keep the first or last attribute, if
-an attribute is repeated, e.g. has two align attributes.")
-
-
- ("replace-color" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should replace numeric values in color
-attributes by HTML/XHTML color names where defined, e.g. replace
-\"#ffffff\" with \"white\"." )
-
- ("slide-style" "Omit" "String"
- "
-Type: Name
-Default: -none-
-split Currently not used.")
-
-;; ("show-body-only" "Omit" "Boolean" "no"
-;; "
-;; Type: Boolean
-;; Default: no
-;; Example: y/n, yes/no, t/f, true/false, 1/0
-
-;; This option specifies if Tidy should print only the contents of the body
-;; tag as an HTML fragment. Useful for incorporating existing whole pages as
-;; a portion of another page.
-
-;; Emacs overrides this option.")
-
- ("show-errors" "Input/Output" "Integer" "6"
- "
-Type: Integer
-Default: 6
-Example: 0, 1, 2, ...
-
-This option specifies the number Tidy uses to determine if further errors
-should be shown. If set to 0, then no errors are shown.")
-
- ("show-warnings" "Input/Output" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should suppress warnings. This can be useful
-when a few errors are hidden in a flurry of warnings.")
-
- ("slide-style" "Omit" "String" ""
- "
-Type: Name
-Default: -none-
-
-Currently not used.")
-
- ("split" "Omit" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should create a sequence of slides from
-the input, splitting the markup prior to each successive <H2>. The
-slides are written to \"slide001.html\", \"slide002.html\" etc.
-
-There is currently no Emacs support for this option.")
-
- ("tab-size" "Indentation" "Integer" "4"
- "
-Type: Integer
-Default: 4
-Example: 0, 1, 2, ...
-
-This option specifies the number of columns that Tidy uses between
-successive tab stops. It is used to map tabs to spaces when reading the
-input. Tidy never outputs tabs.")
-
- ("tidy-mark" "Preference" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should add a meta element to the document
-head to indicate that the document has been tidied. Tidy won't add a meta
-element if one is already present.")
-
- ("uppercase-attributes" "Preference" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output attribute names in upper
-case. The default is no, which results in lower case attribute names,
-except for XML input, where the original case is preserved.")
-
- ("uppercase-tags" "Preference" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should output tag names in upper case. The
-default is no, which results in lower case tag names, except for XML
-input, where the original case is preserved.")
-
- ("word-2000" "Fix Markup" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should go to great pains to strip out all
-the surplus stuff Microsoft Word 2000 inserts when you save Word documents
-as \"Web pages\". Doesn't handle embedded images or VML.")
-
- ("wrap" "Line Wrapping" "Integer" "68"
- "
-Type: Integer
-Default: 68
-Example: 0, 1, 2, ...
-
-This option specifies the right margin Tidy uses for line wrapping. Tidy
-tries to wrap lines so that they do not exceed this length. Set wrap to
-zero if you want to disable line wrapping.")
-
- ("wrap-asp" "Line Wrapping" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should line wrap text contained within ASP
-pseudo elements, which look like: <% ... %>.")
-
- ("wrap-attributes" "Line Wrapping" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should line wrap attribute values, for
-easier editing. This option can be set independently of
-wrap-script-literals.")
-
- ("wrap-jste" "Line Wrapping" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should line wrap text contained within JSTE
-pseudo elements, which look like: <# ... #>.")
-
- ("wrap-php" "Line Wrapping" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should line wrap text contained within PHP
-pseudo elements, which look like: <?php ... ?>.")
-
- ("wrap-script-literals" "Line Wrapping" "Boolean" "no"
- "
-Type: Boolean
-Default: no
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should line wrap string literals that appear
-in script attributes. Tidy wraps long script string literals by inserting
-a backslash character before the line break.")
-
- ("wrap-sections" "Line Wrapping" "Boolean" "yes"
- "
-Type: Boolean
-Default: yes
-Example: y/n, yes/no, t/f, true/false, 1/0
-
-This option specifies if Tidy should line wrap text contained within
-<![... ]> section tags.")
-
-;; ("write-back" "Omit" "Boolean" "no"
-;; "
-;; Type: Boolean
-;; Default: no
-;; Example: y/n, yes/no, t/f, true/false, 1/0
-
-;; This option specifies if Tidy should write back the tidied markup to
-;; the same file it read from. You are advised to keep copies of
-;; important files before tidying them, as on rare occasions the result
-;; may not be what you expect.
-
-;; This option is ignored by Emacs.")
- ))
- )
-
-;;;;; Create a variable for each option in `tidy-options-alist'"
-
-;; these variables are made buffer local so that different buffers can
-;; use a different set of options
-
-(let ((options-alist tidy-options-alist)
- option name symbol docstring)
-
- (while (setq option (car options-alist))
- (setq name (nth 0 option)
- docstring (nth 4 option)
- symbol (intern (concat "tidy-" name)))
- ;; create the variable on the fly
- (put symbol 'variable-documentation docstring)
- (make-variable-buffer-local symbol)
- (set symbol nil) ;;default)
- (setq options-alist (cdr options-alist))
- )
- )
-
-
-;;;;; Quick options setting
-
-(defvar tidy-xhtml-values
- '(
- (add-xml-decl "yes")
- (add-xml-space "no")
- (doctype "auto")
- (escape-cdata "no")
- (fix-backslash "yes")
- (fix-bad-comments "yes")
- (fix-uri "yes")
- (indent "yes")
- (indent-cdata "yes")
- (indent-spaces "2")
- (join-classes "yes")
- (join-styles "yes")
- (lower-literals "yes")
- (newline "LF")
- (output-xhtml "yes")
- (output-xml "no")
- (quote-ampersand "yes")
- (quote-nbsp "yes")
- (tidy-mark "no")
- (uppercase-attributes "no")
- (uppercase-tags "no")))
-
-(defun tidy-xhtml-options-ok ()
- (let ((ok t))
- (dolist (optval tidy-xhtml-values)
- (let* ((opt (car optval))
- (val (cadr optval))
- (nam (symbol-name opt))
- (ent (assoc nam tidy-options-alist))
- (def (nth 3 ent))
- (sym (intern (concat "tidy-" nam))))
- (when (equal val def)
- (setq val nil))
- (unless (equal val (symbol-value sym))
- (setq ok nil))))
- ok))
-
-(defun tidy-show-xhtml-options ()
- "List the settings set by `tidy-set-xhtml-options'."
- (interactive)
- (with-output-to-temp-buffer (help-buffer)
- (with-current-buffer (help-buffer)
- (help-setup-xref (list #'tidy-show-xhtml-settings) (interactive-p))
- (let ((inhibit-read-only t)
- (point (point))
- s)
- (insert "Values that will be set by `tidy-set-xhtml-options'. ")
- (setq s "Green")
- (put-text-property 0 (length s)
- 'face '(:foreground "green")
- s)
- (insert s " indicates that the local value in the current buffer")
- (insert " is the value that would be set, ")
- (setq s "red")
- (put-text-property 0 (length s)
- 'face '(:foreground "red")
- s)
- (insert s " indicates it is not.\n\n")
- (fill-region point (point))
- (dolist (optval tidy-xhtml-values)
- (let* ((opt (car optval))
- (val (cadr optval))
- (nam (symbol-name opt))
- (ent (assoc nam tidy-options-alist))
- (def (nth 3 ent))
- (cur (symbol-value (intern (concat "tidy-" nam))))
- (show (copy-seq val))
- )
- (unless cur (setq cur def))
- (put-text-property 0 (length show)
- 'face
- (if (equal val cur)
- '(:foreground "green")
- 'face '(:foreground "red"))
- show)
- (insert (format "%25s => %s\n" opt show))))))
- (with-no-warnings (print-help-return-message))))
-
-(defun tidy-set-xhtml-options (&optional only-current-buffer)
- "Set option necessary to convert to XHTML.
-To get a list of this settings use `tidy-show-xhtml-options'.
-
-Note that the option variables are buffer local. The default
-variable values are always set. If ONLY-CURRENT-BUFFER is nil set
-the buffer local variables in all buffers."
- (interactive (list
- (not (y-or-n-p "Set XHTML options in all buffers? "))))
- (let ((buffers (if (not only-current-buffer)
- (buffer-list)
- (list (current-buffer)))))
- (dolist (buffer buffers)
- (when (buffer-live-p buffer)
- (with-current-buffer buffer
- (dolist (optval tidy-xhtml-values)
- (let* ((opt (car optval))
- (val (cadr optval))
- (nam (symbol-name opt))
- (ent (assoc nam tidy-options-alist))
- (def (nth 3 ent))
- (symbol (intern (concat "tidy-" nam))))
- (when (equal val def)
- (setq val nil))
- (set-default symbol val) ;; The least overhead I think
- (unless (equal val (symbol-value symbol))
- (set symbol val)))))))))
-
-
-;;;;; Menu Lock (adapted from printing.el)
-
-;; quite compiler
-(eval-when-compile
- (progn
- (or (boundp 'current-menubar)
- (defvar current-menubar nil))
- (or (fboundp 'tidy-menu-position)
- (defun tidy-menu-position () ""))
- (or (fboundp 'tidy-menu-lock)
- (defun tidy-menu-lock (entry state path) ""))
- (or (fboundp 'tidy-menu-lookup)
- (defun tidy-menu-lookup (path) ""))
- ))
-
-;; always define these
-(defvar tidy-menu nil "Menu used by tidy.")
-(defvar tidy-menu-position nil)
-(defvar tidy-menu-state nil)
-
-(cond
- ((tidy-xemacs-p)
- ;; XEmacs
- (defun tidy-menu-position ()
- (tidy-x-make-event
- 'button-release
- (list 'button 1
- 'x tidy-menu-x-position
- 'y -5
- )))
-
- ;; XEmacs
- (defun tidy-menu-lock (entry state path)
- (when (and (not (interactive-p)) tidy-menu-lock)
- (or (and tidy-menu-position (eq state tidy-menu-state))
- (setq tidy-menu-position (tidy-menu-position)
- tidy-menu-state state))
- (let* ((menu (tidy-menu-lookup path))
- (result (tidy-x-get-popup-menu-response menu tidy-menu-position)))
- (and (tidy-x-misc-user-event-p result)
- (funcall (tidy-x-event-function result)
- (tidy-x-event-object result))))
- (setq tidy-menu-position nil)))
-
- ;; XEmacs
- (defun tidy-menu-lookup (path)
- (car (tidy-x-find-menu-item current-menubar (cons "Tidy" path)))))
-
- (t
- ;; GNU Emacs
- (defun tidy-menu-position ()
- (let ()
- (list (list tidy-menu-x-position '-5)
- (selected-frame)))) ; frame
-
- ;; GNU Emacs
-;; (defun tidy-menu-lock-old (entry state path)
-;; (when (and (not (interactive-p)) tidy-menu-lock)
-;; (or (and tidy-menu-position (eq state tidy-menu-state))
-;; (setq tidy-menu-position (tidy-menu-position )
-;; tidy-menu-state state))
-;; (let* ((menu (tidy-menu-lookup path))
-;; (result (x-popup-menu tidy-menu-position menu)))
-;; (and result
-;; (let ((command (lookup-key menu (vconcat result))))
-;; (if (fboundp command)
-;; (funcall command)
-;; (eval command)))))
-;; (setq tidy-menu-position nil)))
- (defun tidy-menu-lock (entry state path)
- (when (and (not (interactive-p)) tidy-menu-lock)
- (or (and tidy-menu-position (eq state tidy-menu-state))
- (setq tidy-menu-position (tidy-menu-position )
- tidy-menu-state state))
- ;;(popup-menu tidy-menu tidy-menu-position)))
- (run-with-idle-timer 1 nil 'popup-menu tidy-menu tidy-menu-position)))
-
- ;; GNU Emacs
- (defun tidy-menu-lookup (dummy)
- (lookup-key (current-local-map) [menu-bar Tidy])))
- )
-
-;;;;; Define classes of menu items
-
-(defun tidy-set (var-sym value mess entry state &optional path)
- "Set the value of the symbol VAR-SYM to VALUE giving a message
-derived from VALUE and MESS. Pass on menu data to `tidy-menu-lock'."
- (set var-sym value)
- (message "%s is %s" mess value)
- (tidy-menu-lock entry state path))
-
-(defun tidy-boolean-entry (symbol name type default menu)
- "Returns a menu entry that allows us to toggle the value of SYMBOL.
-SYMBOL refers to the option called NAME which has default value
-DEFAULT. TYPE should always have the value \"Boolean\". MENU refers
-to the sub-menu that this item belongs to and POSITION its position in
-that list."
- (cond ((equal default "no")
- (list (vector name
- (list 'tidy-set (list 'quote symbol)
- (list 'if symbol 'nil "yes")
- name
- (list 'quote menu)
- '(quote toggle)
- )
- :style 'toggle
- :selected (list 'if symbol 't 'nil))))
-
- ((equal default "yes")
- (list (vector name (list 'tidy-set (list 'quote symbol)
- (list 'if symbol 'nil "no")
- name
- (list 'quote menu)
- '(quote toggle)
- )
- :style 'toggle
- :selected (list 'if symbol 'nil 't))))))
-
-(defun tidy-list-entry (symbol name type default menu)
-"Returns a menu entry that allows us to set via a radio button the
-value of SYMBOL. SYMBOL refers to the option called NAME which has
-default value DEFAULT. TYPE should be a list of the possible
-values. MENU refers to the sub-menu that this item belongs to and
-POSITION its position in that list."
- (let (value element)
- (while (setq value (car type))
- (if (equal value default)
- (setq element
- (append element
- (list
- (vector
- (concat name " is \"" value "\"")
- (list 'tidy-set (list 'quote symbol)
- (list 'if symbol 'nil value)
- name
- (list 'quote menu)
- '(quote toggle)
- )
- :style 'radio
- :selected (list 'if symbol 'nil 't)
- ))))
- (setq element
- (append element
- (list
- (vector
- (concat name " is \"" value "\"")
-
- (list 'tidy-set (list 'quote symbol)
- (list 'if symbol 'nil value)
- name
- (list 'quote menu)
- '(quote toggle)
- )
-
- :style 'radio
- :selected (list
- 'if (list 'string-equal symbol value)
- 't 'nil)
- )))))
- (setq type (cdr type)))
- element))
-
-(defun tidy-set-string (symbol name default)
- "Set the value of SYMBOL identified by name to VALUE,
-unless VALUE equals DEFAULT, in which case we set it to nil."
- (interactive)
- (let* ((last-value (symbol-value symbol))
- (new-value
- (if (tidy-xemacs-p)
- (read-string (format "Set %s to: " name)
- (or last-value default) nil) ;; no default arg
- (read-string (format "Set %s to: " name)
- (or last-value default) nil default))))
- (set symbol (if (equal new-value default) nil new-value))))
-
-(defun tidy-set-integer (symbol name default)
- "Set the value of SYMBOL identified by name to VALUE,
-unless VALUE = DEFAULT, in which case we set it to nil."
- (interactive)
- (let* ((last-value (symbol-value symbol))
- ;; careful to interpret the string as a number
- (new-value
- (string-to-number
- (if (tidy-xemacs-p)
- (read-string (format "Set %s to: " name)
- (or last-value default) nil)
- (read-string (format "Set %s to: " name)
- (or last-value default) nil default)
- ))))
- (set symbol (if (= new-value (string-to-number default)) nil
- (number-to-string new-value)))))
-
-
-(defun tidy-string-entry (symbol name type default menu)
- "Returns a menu entry that allows us to set the value of SYMBOL.
-SYMBOL refers to the option called NAME which has default value
-DEFAULT. TYPE should always be one of \"String\" \"Tags\", or
-\"DocType\". MENU and POSITION are not used in this case."
-
- (list (vector (concat "set " name)
- (list 'tidy-set-string
- (list 'quote symbol)
- name default))))
-
-(defun tidy-integer-entry (symbol name type default menu)
-"Returns a menu entry that allows us to set the value of SYMBOL.
-SYMBOL refers to the option called NAME which has default value
-DEFAULT. TYPE should always have the value \"Integer\". MENU and
-POSITION are not used in this case. "
- (list (vector (concat "set " name)
- (list 'tidy-set-integer
- (list 'quote symbol)
- name default))))
-
-(defun tidy-exe-found ()
- (when tidy-shell-program
- ;;(file-executable-p (car (split-string tidy-shell-program)))))
- (or (file-executable-p tidy-shell-program)
- (executable-find tidy-shell-program))))
-
-
-(defvar tidy-top-menu nil
- "The first part of the menu.")
-(when (or (null tidy-top-menu) tidy-debug)
- (setq tidy-top-menu
- '("Tidy"
- ["Tidy Buffer" tidy-buffer
- :active (tidy-exe-found)]
-
-;; ["Tidy Region" tidy-region
-;; :active (and (mark)
-;; (tidy-exe-found))
-;; :keys "C-u \\[tidy-buffer]"]
-
- ["Tidy Directory Tree" tidy-tree
- :active (tidy-exe-found)]
-
- ["Tidy Site" tidy-tree
- :active (and (featurep 'html-site)
- (tidy-exe-found))]
-
- "----------------------------------------------"
-
- ["Customize Tidy" (customize-group-other-window 'tidy)]
-
-;; ["Use Ediff" (lambda () (interactive)
-;; (setq tidy-use-ediff (not tidy-use-ediff)))
-;; :style toggle
-;; :selected tidy-use-ediff
-;; ]
-
-;; ["Load Settings" tidy-parse-config-file
-;; :active (and tidy-config-file (file-exists-p tidy-config-file))]
-
-;; ["Load Settings All Buffers" (lambda () (interactive)
-;; (tidy-parse-config-file t))
-;; :active (and tidy-config-file (file-readable-p tidy-config-file))]
-
- ["Save Settings" tidy-save-settings
- :active (and tidy-config-file (file-readable-p tidy-config-file))]
-
- "----------------------------------------------"
-
- )))
-
-(defvar tidy-newline-menu
- '("Set newline"
- ["LF" (tidy-set 'tidy-newline
- nil
- "newline"
- 'newline
- 'toggle)
- :style radio
- :selected (if (null tidy-newline) t nil)]
-
- ["CRLF" (tidy-set 'tidy-newline
- "CRLF"
- "newline"
- 'newline
- 'toggle)
- :style radio
- :selected (if (equal tidy-newline "CRLF") t nil)]
-
- ["CR" (tidy-set 'tidy-newline
- "CR"
- "newline"
- 'newline
- 'toggle)
- :style radio
- :selected (if (equal tidy-newline "CRLF") t nil)]
- ))
-
-(defvar tidy-doctype-menu nil "The second to last sub-menu.")
-(when (or (null tidy-doctype-menu) tidy-debug)
- (setq tidy-doctype-menu
- '("Set doctype" ;; ==>
-
- ["auto" (tidy-set 'tidy-doctype
- nil
- "doctype"
- 'doctype
- 'toggle)
- :style radio
- :selected (if (null tidy-doctype) t nil)]
-
- ["omit" (tidy-set 'tidy-doctype
- "omit"
- "doctype"
- 'doctype
- 'toggle)
- :style radio
- :selected (if (equal tidy-doctype "omit") t nil)]
-
- ["strict" (tidy-set 'tidy-doctype
- "strict"
- "doctype"
- 'doctype
- 'toggle)
- :style radio
- :selected (if (equal tidy-doctype "strict") t nil)]
-
- ["loose" (tidy-set 'tidy-doctype
- "loose"
- "doctype"
- 'doctype
- 'toggle)
- :style radio
- :selected (if (equal tidy-doctype "loose") t nil)]
-
- ["transitional" (tidy-set 'tidy-doctype
- "transitional"
- "doctype"
- 'doctype
- 'toggle)
- :style radio
- :selected (if (equal tidy-doctype "transitional") t nil)]
-
- ["fpi" (null nil) ;; stub function
- :style radio
- :selected (if (or (null tidy-doctype)
- (equal tidy-doctype "omit")
- (equal tidy-doctype "strict")
- (equal tidy-doctype "loose"))
- nil t) ]
-
- ["reset fpi" (tidy-set-string 'tidy-doctype "doctype" "" "")]
- )))
-
-(defconst tidy-emacs-encoding-lbl "Use Emacs' encoding")
-
-(defun tidy-create-encoding-menu (label encoding-what msg-what)
- (list label ;; ==>
- (vector tidy-emacs-encoding-lbl (list 'tidy-set (list 'quote encoding-what)
- tidy-emacs-encoding-lbl ;(list 'tidy-get-buffer-encoding)
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what tidy-emacs-encoding-lbl) t nil)
- )
-
- "----------------------------------------------"
-
- (vector "ascii" (list 'tidy-set (list 'quote encoding-what)
- nil
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'null encoding-what) t nil) ;; default
- )
-
- (vector "raw" (list 'tidy-set (list 'quote encoding-what)
- "raw"
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what "raw") t nil))
-
- (vector "latin1" (list 'tidy-set (list 'quote encoding-what)
- "latin1"
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what "latin1") t nil))
-
- (vector "utf8" (list 'tidy-set (list 'quote encoding-what)
- "utf8"
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what "utf8") t nil))
-
- (vector "iso2022" (list 'tidy-set (list 'quote encoding-what)
- "iso2022"
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what "iso2022") t nil))
-
- (vector "mac" (list 'tidy-set (list 'quote encoding-what)
- "mac"
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what "mac") t nil))
-
- (vector "win1252" (list 'tidy-set (list 'quote encoding-what)
- "win1252"
- msg-what
- ''encoding
- ''toggle)
- :style 'radio
- :selected (list 'if (list 'equal encoding-what "win1252") t nil))
-
- ))
-;; (defvar tidy-char-encoding-menu nil "The last sub-menu.")
-;; (when (or (null tidy-char-encoding-menu) tidy-debug)
-;; (setq tidy-char-encoding-menu
-;; (tidy-create-encoding-menu
-;; "Set char-encoding" 'tidy-char-encoding "char-encoding")))
-;; (defvar tidy-input-encoding-menu nil "The last sub-menu.")
-;; (when (or (null tidy-input-encoding-menu) tidy-debug)
-;; (setq tidy-input-encoding-menu
-;; (tidy-create-encoding-menu
-;; "Set input-encoding" 'tidy-input-encoding "input-encoding")))
-(defvar tidy-output-encoding-menu nil "The last sub-menu.")
-(when (or (null tidy-output-encoding-menu) tidy-debug)
- (setq tidy-output-encoding-menu
- (tidy-create-encoding-menu
- "Set output-encoding" 'tidy-output-encoding "output-encoding")))
-
-;;;;; Create a menu item for each option that has a valid sub-menu
-;; field
-
-(when (or (null tidy-menu) tidy-debug)
- (let ((options-alist tidy-options-alist)
-
- ;; sub menus are divided into two parts with list type options
- ;; coming first, followed by the rest
-
- markup-menu-bool markup-menu-set
- line-wrap-menu-bool line-wrap-menu-set
- preference-menu-bool preference-menu-set
- indent-menu-bool indent-menu-set
- io-menu-bool io-menu-set
- tags-menu-bool tags-menu-set
-
- name sub-menu type default symbol entry entry-function option)
-
- (while (setq option (car options-alist))
- (setq name (nth 0 option)
- sub-menu (nth 1 option)
- type (nth 2 option)
- default (nth 3 option)
- symbol (intern (concat "tidy-" name))
- entry nil)
-
- (cond ((equal type "Boolean")
- (setq entry-function 'tidy-boolean-entry))
-
- ((equal type "AutoBool")
- (setq entry-function 'tidy-list-entry)
- (setq type '("auto" "yes" "no")))
-
- ((equal type "DocType")
- (setq entry '())) ;; handled below
-
- ((equal type "Tag names")
- (setq entry-function 'tidy-string-entry))
-
- ((equal type "String")
- (setq entry-function 'tidy-string-entry))
-
- ((equal type "Integer")
- (setq entry-function 'tidy-integer-entry))
-
- ((equal type "Encoding")
- (setq entry '()));; handled below
-
- ((listp type)
- (setq entry-function 'tidy-list-entry))
- (t
- (error (concat "Tidy: unhandled value type " type " for " name))))
-
- (cond ((equal sub-menu "Fix Markup")
- (setq entry (funcall
- entry-function
- symbol
- name
- type
- default
- 'markup))
-
- (if (or (equal type "Boolean") (equal type "AutoBool") (listp type))
- (setq markup-menu-bool (append markup-menu-bool entry))
- (setq markup-menu-set (append markup-menu-set entry))))
-
- ((equal sub-menu "Indentation")
- (setq entry (funcall
- entry-function
- symbol
- name
- type
- default
- 'indent))
-
- (if (or (equal type "Boolean") (equal type "AutoBool") (listp type))
- (setq indent-menu-bool (append indent-menu-bool entry))
- (setq indent-menu-set (append indent-menu-set entry))))
-
- ((equal sub-menu "Line Wrapping")
- (setq entry (funcall
- entry-function
- symbol
- name
- type
- default
- 'line-wrap))
-
- (if (or (equal type "Boolean") (equal type "AutoBool") (listp type))
- (setq line-wrap-menu-bool (append line-wrap-menu-bool entry))
- (setq line-wrap-menu-set (append line-wrap-menu-set entry))))
-
- ((equal sub-menu "Input/Output")
- (setq entry (funcall
- entry-function
- symbol
- name
- type
- default
- 'io))
-
- (if (or (equal type "Boolean") (equal type "AutoBool") (listp type))
- (setq io-menu-bool (append io-menu-bool entry))
- (setq io-menu-set (append io-menu-set entry))))
-
- ((equal sub-menu "Preference")
- (setq entry (funcall
- entry-function
- symbol
- name
- type
- default
- 'preference))
-
- (if (or (equal type "Boolean") (equal type "AutoBool") (listp type))
- (setq preference-menu-bool (append preference-menu-bool entry))
- (setq preference-menu-set (append preference-menu-set entry))))
-
- ((equal sub-menu "Tags")
- (setq entry (funcall
- entry-function
- symbol
- name
- type
- default
- 'tags))
-
- (if (or (equal type "Boolean") (equal type "AutoBool"))
- (setq tags-menu-bool (append tags-menu-bool entry))
- (setq tags-menu-set (append tags-menu-set entry))))
- (t)) ;; we simple omit all other menus
-
- (setq options-alist (cdr options-alist)))
-
- (setq tidy-menu (append
- tidy-top-menu
- (list
- (list "Quick Options Settings"
- (vector "Set Options for XHTML"
- 'tidy-set-xhtml-options
- :style 'toggle
- :selected '(tidy-xhtml-options-ok)
- )
- (vector "Show Options for XHTML"
- 'tidy-show-xhtml-options
- )
- ))
- (list (append (list "Advanced")
-
-
-;; "----------------------------------------------"
-
-;; ["Menu Lock" (tidy-set 'tidy-menu-lock
-;; (if tidy-menu-lock nil t)
-;; "Menu Lock"
-;; 'top
-;; 'toggle)
-;; :style toggle
-;; :selected (if tidy-menu-lock t nil)
-;; ]
-;; (vector "Menu Lock"
-;; 'tidy-menu-lock
-;; :style 'toggle
-;; :selected '(if tidy-menu-lock t nil)
-;; )
- (list (vector "Menu Lock"
- '(tidy-set 'tidy-menu-lock
- (if tidy-menu-lock nil t)
- "Menu Lock"
- 'top
- 'toggle
- )
- :style 'toggle
- :selected '(if tidy-menu-lock t nil)
- ))
- (list (list "-------"))
-
- (list (append (list "Fix Markup")
- markup-menu-bool
- markup-menu-set))
- (list (append (list "Line Wrapping")
- line-wrap-menu-bool
- line-wrap-menu-set))
- (list (append (list "Preference")
- preference-menu-bool
- preference-menu-set))
- (list (append (list "Indentation")
- indent-menu-bool
- indent-menu-set))
- (list (append (list "Input/Output")
- io-menu-bool
- io-menu-set))
- (list (append (list "Tags")
- tags-menu-bool
- tags-menu-set))
- (list tidy-doctype-menu)
- (list tidy-output-encoding-menu)
- (list tidy-newline-menu)
- ))
- '(["Describe Options" tidy-describe-options t])
- (list (list "-------"))
- '(["Tidy Home Page"
- (lambda ()
- "Open Tidy home page in your web browser."
- (interactive)
- (browse-url "http://tidy.sourceforge.net/"))
- t])
- ))
- )
-)
-
-(defvar tidy-menu-symbol nil)
-;;(tidy-build-menu (&optional map)
-;;;###autoload
-(defun tidy-build-menu (&optional map)
- "Set up the tidy menu in MAP.
-Used to set up a Tidy menu in your favourite mode."
- (interactive) ;; for debugging
- (unless tidy-menu-symbol
- (unless tidy-config-file-parsed
- (tidy-parse-config-file)
- (setq tidy-config-file-parsed t))
- ;;(or map (setq map (current-local-map)))
- (easy-menu-remove tidy-menu)
- (easy-menu-define tidy-menu-symbol map "Menu for Tidy" tidy-menu)
- (setq tidy-menu-symbol (delete "Tidy" tidy-menu-symbol))
- (easy-menu-add tidy-menu map))
- t)
-
-;;;;; Option description support
-
-;; quiet FSF Emacs and XEmacs compilers
-(eval-when-compile
- (progn (or (fboundp 'event-point) (defun event-point (dummy) ""))
- (or (fboundp 'posn-point) (defun posn-point (dummy) ""))
- (or (fboundp 'event-start) (defun event-start (dummy) ""))))
-
-(defun tidy-describe-this-option-mouse (click)
- (interactive "e")
- (let ((p (if (tidy-xemacs-p)
- (event-point click)
- (posn-point (event-start click)))))
- (tidy-describe-this-option p)))
-
-(defun tidy-describe-this-option (&optional point)
- "Describe variable associated with the text at point."
- (interactive (list (point)))
-
- (let* ((variable (get-text-property
- point
- 'tidy-variable))
- value
- buffer) ;; reuse the help buffer
- (when variable
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'tidy-describe-this-option point) (interactive-p))
- (with-current-buffer (help-buffer)
- (setq value (symbol-value variable))
- (insert (substring (symbol-name variable) 5) ;; clip the `tidy-' prefix
- " is set to ")
- (if value (insert value) (insert "set to the default value"))
- (insert "\n\n" (documentation-property variable 'variable-documentation))
- (local-set-key [(q)] 'tidy-quit-describe-options)
- (with-no-warnings (print-help-return-message)))))))
-
-(defun tidy-quit-describe-options ()
- "Rid thyself of any display associated with Tidy's options."
- (interactive)
- (bury-buffer (get-buffer "*tidy-options*"))
- (delete-windows-on (get-buffer "*tidy-options*"))
- (bury-buffer (get-buffer "*Help*"))
- (delete-windows-on (get-buffer "*Help*")))
-
-;; nicked this from cal-desk-calendar.el:-)
-(defun tidy-current-line ()
- "Get the current line number (in the buffer) of point."
- ;;(interactive)
- (save-restriction
- (widen)
- (save-excursion
- (beginning-of-line)
- (1+ (count-lines 1 (point))))))
-
-(defun tidy-goto-line (line)
- (save-restriction
- (widen)
- (goto-char (point-min))
- (forward-line (1- line))))
-
-(defun tidy-describe-options ()
- "Interactively access documentation strings for `tidy-' variables."
- (interactive)
- (let ((buffer (get-buffer "*tidy-options*")))
- (if buffer (pop-to-buffer buffer)
- ;; else build it from scratch
- (setq buffer (get-buffer-create "*tidy-options*"))
- (let* ((start 0)
- (end 0)
- name
- (count 0)
- (option-alist tidy-options-alist)
- (column2a (+ (length "drop-proprietary-attributes") 3))
- (column2b (/ (window-width) 3))
- (column2 (if (> column2a column2b) column2a column2b))
- (column3 (* 2 column2))
- (start-line 0)
- (third-length 0)
- (two-third-length 0))
-
- (set-buffer buffer)
-
- (setq buffer-read-only nil)
- (delete-region (point-min) (point-max)) ;; empty the buffer
-
- ;; set up local bindings
- (if (tidy-xemacs-p)
- (local-set-key [(button2)] 'tidy-describe-this-option-mouse)
- (local-set-key [(mouse-2)] 'tidy-describe-this-option-mouse))
-
- (local-set-key "\r" 'tidy-describe-this-option)
- (local-set-key [(q)] 'tidy-quit-describe-options)
-
- (insert "Press RET over option to see its description. "
- "Type \"q\" to quit." "\n\n")
-
- (setq start-line (tidy-current-line))
- (setq third-length (1+ (/ (length option-alist) 3) ))
- (setq two-third-length (1- (* 2 third-length)))
-
- (while (setq name (car (car-safe option-alist)))
- (setq option-alist (cdr option-alist))
- (setq count (+ count 1))
-
- (cond
- ((< count third-length) ;; 0 <= count < third-length
- (setq start (point))
- (insert name)
- (setq end (point))
- (insert "\n"))
- ((< count two-third-length) ;; third-length <= count < two-third-length
- (if (= count third-length)
- (tidy-goto-line start-line)
- (forward-line 1))
- (end-of-line)
- (setq start (point))
- (indent-to-column column2)
- (setq end (point))
- (put-text-property start end 'mouse-face 'default)
- (setq start (point))
- (insert name)
- (setq end (point)))
- (t ;; two-third-length <= count < length
- (if (= count two-third-length)
- (tidy-goto-line start-line)
- (forward-line 1))
- (end-of-line)
- (setq start (point))
- (indent-to-column column3)
- (setq end (point))
- (put-text-property start end 'mouse-face 'default)
- (setq start (point))
- (insert name)
- (setq end (point))))
-
- ;; make the strings funky
- (put-text-property start end 'mouse-face 'highlight)
- (put-text-property start end 'tidy-variable (intern (concat "tidy-" name)))
- )
- (setq buffer-read-only t)
- ;;(beginning-of-buffer)
- (goto-char (point-min))
- (pop-to-buffer buffer)
- ))))
-
-;;;;; Configuration file support
-
-(defun tidy-parse-config-file (&optional all-buffers)
- "Parse `tidy-config-file' and set variables accordingly.
-If `tidy-config-file' is nil or \"\" do nothing. If the file does
-not exist just give a message.
-
-Note that the option variables are buffer local. The default
-variable values are always set. If ALL-BUFFERS is non-nil set the
-buffer local variables in all buffers."
- (interactive (list
- (y-or-n-p "Set Tidy config file values in all buffers? ")))
- (tidy-set-xhtml-options all-buffers)
- (when (and tidy-config-file
- (not (string= "" tidy-config-file)))
- (if (not (file-exists-p tidy-config-file))
- (unless (string= tidy-config-file tidy-default-config-file)
- (message "Could not find Tidy config file \"%s\"." tidy-config-file))
- (message "Parsing config file...")
- (let ((html-buffer (current-buffer))
- (config-buffer (find-file-noselect tidy-config-file t))
- config-variables)
- (with-current-buffer config-buffer
- (goto-char (point-min)) ;; unnecessary but pedantic
-
- ;; delete all comments
- (while (re-search-forward "//.*\n" nil t)
- (replace-match "" nil nil))
-
- (goto-char (point-min))
- (while (re-search-forward "\\([a-z,-]+\\):\\s-*\\(.*\\)\\s-*" nil t)
- ;; set the variable
- ;; Thanks to Thomas Baumann for this bugfix
- (let ((variable (concat "tidy-" (match-string 1)))
- (value (match-string 2)))
- ;;(set-default (intern variable value))
- (set-default (intern variable) value)
- (setq config-variables
- (cons (cons variable value) config-variables))
- (with-current-buffer html-buffer
- (set (intern variable) value))
- ))
-
- (set-buffer-modified-p nil) ;; don't save changes
- (kill-buffer config-buffer))
- (when all-buffers
- (dolist (buffer (buffer-list))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer
- (dolist (optval config-variables)
- (let* ((opt (car optval))
- (val (cdr optval))
- (sym (intern opt)))
- (set sym val))))))))
- (message "Parsing config file...done")
- )))
-
-(defun tidy-save-settings (&optional config-file)
- "Query saving the current settings to your `tidy-config-file'.
-The local values in the current buffer will be saved."
- (interactive)
- (or config-file (setq config-file tidy-config-file))
- (when config-file
-
- ;; should check for locks!
- (if (or (not (interactive-p))
- (y-or-n-p "Save settings to your tidy configuration file? "))
-
- (let ((buffer (find-file-noselect config-file t))
- (option-alist tidy-options-alist)
- (outer-buffer (current-buffer))
- option name symbol value)
- (with-current-buffer buffer
- (delete-region (point-min) (point-max)) ;; clear the buffer
-
- ;; need this line so that config file is always non empty
- (insert "// HTML Tidy configuration file \n")
- (while (setq option (car option-alist))
- (setq option-alist (cdr option-alist))
- (setq name (nth 0 option)
- symbol (intern (concat "tidy-" name)))
- (with-current-buffer outer-buffer
- (setq value (symbol-value symbol)))
- (when (string= value tidy-emacs-encoding-lbl)
- (setq value (tidy-get-buffer-encoding)))
- (when value ;; nil iff default
- (insert (car option) ": " value "\n")))
-
- (save-buffer)
- ;;(basic-save-buffer)
- (kill-buffer buffer)
- )))))
-
-
-;;;;; Main user function
-
-(eval-when-compile (defvar tidy-markup nil ""))
-
-(defun tidy-set-buffer-unmodified (dummy1 dummy2 dumm3)
- "Used to prevent error buffer form being marked as modified."
- (set-buffer-modified-p nil))
-
-;; See http://www.mhonarc.org/MHonArc/doc/resources/charsetaliases.html
-(defconst tidy-encodings-mime-charset-list
- '(
- ;; ("raw") ;; Same as ascii??
- ("ascii" . "us-ascii")
- ("latin0" . "iso-8859-15")
- ("latin1" . "iso-8859-1")
- ("iso2022" . "iso-2022-jp") ;; Correct? There are several iso-2022-..
- ("utf8" . "utf-8")
- ("mac" . "macintosh")
- ("win1252" . "windows-1252")
- ("ibm858" . "cp850")
- ("utf16le" . "utf-16-le")
- ("utf16be" . "utf-16-be")
- ("utf16" . "utf-16")
- ("big5" . "big5")
- ("shiftjis" . "shift_jis")
- )
- "Encoding names used by Tidy and Emacs.
-First column is Tidy's name, second Emacs' name."
- )
-
-(defun tidy-get-buffer-encoding ()
- "Get Tidy's name for value of `buffer-file-coding-system'."
- (tidy-get-tidy-encoding buffer-file-coding-system))
-
-(defun tidy-get-tidy-encoding (emacs-coding-system)
- (let ((encoding (rassoc
- (symbol-name
- (coding-system-get emacs-coding-system 'mime-charset))
- tidy-encodings-mime-charset-list)))
- (if encoding
- (setq encoding (car encoding))
- (setq encoding "raw"))
- encoding))
-
-(defun tidy-temp-config-file ()
- (expand-file-name "temp-tidy-config"
- tidy-temp-directory))
-
-(defconst tidy-output-buf-name "Tidy (X)HTML Output")
-
-(defvar tidy-tidied-buffer nil)
-(make-variable-buffer-local 'tidy-tidied-buffer)
-(put 'tidy-tidied-buffer 'permanent-local t)
-
-(defun tidy-check-is-tidied (orig-buf tidy-buf)
- (with-current-buffer tidy-buf
- (unless tidy-tidied-buffer
- (error "%s is not a tidy output buffer" tidy-buf))
- (unless (eq orig-buf tidy-tidied-buffer)
- (error "Buffer does not contain tidied %s" orig-buf))))
-
-(defconst tidy-control-buffer-name "Tidy Control Buffer")
-
-(defvar tidy-output-encoding) ;; dyn var
-
-(defun tidy-buffer ()
- "Run the HTML Tidy program on the current buffer.
-Show the errors in a buffer with buttons to:
-
-- show the original buffer
-- show the tidied output
-- copy tidied to original
-- run ediff
-
-This buffer also contains any error and warning messages and they
-link to the original source code.
-
-If the buffer to tidy contains a fictive XHTML validation header
-\(see `nxhtml-validation-header-mode') then the corresponding
-header is added before running tidy. This header is removed again
-after tidying, together with additions tidy might have done at
-the end of the buffer.
-
-You may tidy part of the buffer, either by narrowing the buffer
-or by selecting a region and having it visibly marked (`cua-mode'
-etc). A fictive XHTML validation header will apply as
-above. However if there is no such header then when you tidy part
-of the buffer still a hopefully suitable header is added before
-calling tidy."
-;; Fix-me: copy back parts outside visible region
- (interactive)
- (message "starting tidy-buffer")
- (let* ((is-narrowed (buffer-narrowed-p))
- (validation-header (when (boundp 'rngalt-validation-header)
- (let ((header (nth 2 rngalt-validation-header)))
- (when header (concat header "\n")))))
- (region-restricted (and mark-active
- transient-mark-mode
- (or (< (point-min) (region-beginning))
- (< (region-end) (point-max)))))
- (partial (or validation-header
- is-narrowed
- region-restricted))
- (start (if region-restricted (region-beginning) (point-min)))
- (end (if region-restricted (region-end) (point-max)))
- (region-header (when region-restricted
- (when (< (point-min) (region-beginning))
- (buffer-substring-no-properties
- (point-min) (region-beginning)))))
- (region-footer (when region-restricted
- (when (< (region-end) (point-max))
- (buffer-substring-no-properties
- (region-end) (point-max)))))
- (tidy-beg-mark "<!-- TIDY BEGIN MARK 142505535 -->\n")
- (tidy-end-mark "<!-- TIDY END MARK 143345187 -->")
- ;;(whole-file t) ;(and (= start 1) (= end (1+ (buffer-size)))))
- (filename buffer-file-name)
- ;;(orig-dir (file-name-directory filename))
- (orig-buffer (current-buffer))
- (work-buffer (get-buffer-create "* Tidy Temporary Work Buffer *"))
- (line-header-offset nil)
-
- ;; Gasp! We have to use temp files here because the command
- ;; line would likely get too long!
-
- (error-buf-name tidy-control-buffer-name)
-
- (error-file (expand-file-name error-buf-name
- tidy-temp-directory))
-
- (error-buffer (get-buffer-create error-buf-name))
-
- (output-buffer (get-buffer-create tidy-output-buf-name))
-
- (config-file (tidy-temp-config-file))
-
- ;;(eol (coding-system-eol-type buffer-file-coding-system))
- ;;(encoding (coding-system-get buffer-file-coding-system 'mime-charset))
- ;;(errors 0)
- ;;(warnings 0)
- (tidy-message "")
- (seg-error nil)
- ;;(use-ediff tidy-use-ediff)
-
- (want-mumamo nil)
- )
-
-;; (when (and use-ediff
-;; (not tidy-show-warnings)) ;; default "yes" hence inverted logic
-;; (setq use-ediff (y-or-n-p "Warning can not be shown when using ediff. Still use ediff? ")))
- (unless buffer-file-name
- (error "Can't tidy buffer with no file name"))
-
- (when (buffer-modified-p orig-buffer)
- (error "Can't tidy buffer because it is modified"))
-
- (with-current-buffer error-buffer
- (setq buffer-read-only nil)
- (erase-buffer)
- (setq tidy-tidied-buffer orig-buffer))
-
- ;; OK do the tidy
-;; (message "coding-system: %s, %s, %s"
-;; (find-operation-coding-system
-;; 'call-process-region start end command)
-;; coding-system-for-write
-;; buffer-file-coding-system)
- (let* ((coding-system-for-write buffer-file-coding-system)
- (tidy-input-encoding (tidy-get-tidy-encoding coding-system-for-write)))
-
- (let ((output-mode (if (not (featurep 'mumamo))
- major-mode
- (if (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- mumamo-multi-major-mode
- major-mode))))
- (with-current-buffer output-buffer
- (erase-buffer)
- ;;(when (and (fboundp 'mumamo-mode) mumamo-mode) (setq want-mumamo t) (mumamo-mode 0))
- (funcall output-mode)
- (set (make-local-variable 'coding-system-for-read) coding-system-for-write)))
-
- (let ((tidy-output-encoding tidy-output-encoding))
- (unless tidy-output-encoding
- (setq tidy-output-encoding tidy-input-encoding))
- ;;(message "tidy-input-enc=%s, tidy-output-enc=%s" tidy-input-encoding tidy-output-encoding)
- (tidy-save-settings config-file)
- )
-
- ;; Tidy does not replace the xml declaration so it must be removed:
- ;(setq tidy-add-xml-decl "no")
- (let (;(orig-min (point-min)) (orig-max (point-max))
- )
-;; (when region-restricted
-;; ;; We have a visible region
-;; (setq orig-min (region-beginning))
-;; (setq orig-max (region-end)))
- (with-current-buffer work-buffer
- (erase-buffer)
- (when validation-header
- (insert validation-header))
- (when partial
- ;; Have to insert things to make tidy insert at correctt
- ;; position. A bit of guessing here to keep it simple.
- (let ((p "\n<p>TIDY</p>\n")
- (b "\n<body>\n")
- (he "\n<head><title></title></head>\n")
- (ht (concat
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
- "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n"
- "\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n"
- "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n")))
- (goto-char (point-min))
- (if (re-search-forward "<body[^>]*>" nil t)
- (insert p)
- (if (search-forward "</head>" nil t)
- (insert b p)
- (if (re-search-forward "<html[^>]*>" nil t)
- (insert he b p)
- (insert ht he b p))))
- (goto-char (point-max))
- (insert "\n" tidy-beg-mark)))
- (setq line-header-offset (line-number-at-pos))
- (insert-buffer-substring orig-buffer start end) ;orig-min orig-max)
- (when partial (insert "\n" tidy-end-mark "\n"))
- (let ((args
- (list
- ;;start end
- (point-min) (point-max)
- tidy-shell-program
- nil
- output-buffer
- t
- "-config" config-file
- "--error-file" error-file
- "--write-back" "no"
- ;;(if (not whole-file) "--show-body-only" "--show-body-only")
- ;;(if (not whole-file) "yes" "no")
- "--show-body-only" "no"
- "--gnu-emacs" "yes"
- "--gnu-emacs-file" (file-name-nondirectory filename)
- ))
- (default-directory (file-name-directory filename))
- )
- (apply 'call-process-region args)))
- ))
-
-
- ;; Since XEmacs can't grab the std error stream we use an error file
- ;;(setq error-buffer (find-file-noselect error-file t))
- (with-current-buffer error-buffer
- (setq tidy-tidied-buffer orig-buffer)
- (insert-file-contents error-file)
- ;; Change the line numbers if a header was inserted
- (when line-header-offset
- (goto-char (point-min))
- (while (re-search-forward ":\\([0-9]+\\):[0-9]+" nil t)
- (let ((line (1+ (- (string-to-number (match-string-no-properties 1))
- line-header-offset))))
- (replace-match (number-to-string line) nil nil nil 1))))
- )
-
- ;; avoid leaving these guys lying around
- (if (file-exists-p error-file) (delete-file error-file))
- ;;(if (file-exists-p config-file) (delete-file config-file))
-
- ;; scan the buffer for error strings
- (with-current-buffer error-buffer
- ;;(local-set-key [tab] 'tidy-errbuf-forward)
- (goto-char (point-min))
- (insert "\n")
- (make-local-variable 'widget-button-face)
- (setq widget-button-face custom-button)
- (set (make-local-variable 'widget-push-button-prefix) "")
- (set (make-local-variable 'widget-push-button-suffix) "")
- (set (make-local-variable 'widget-link-prefix) "")
- (set (make-local-variable 'widget-link-suffix) "")
- (widget-create 'push-button
- :tag " Show Source "
- :keymap (make-sparse-keymap)
- :arg-orig orig-buffer
- :action (lambda (widget &optional event)
- (let ((orig-buf (widget-get widget :arg-orig))
- (curr-win (selected-window)))
- (switch-to-buffer-other-window orig-buf)
- (select-window curr-win))))
- (insert " ")
- (widget-create 'push-button
- :tag " Show Tidied "
- :keymap (make-sparse-keymap)
- :arg-tidy output-buffer
- :arg-orig orig-buffer
- :action (lambda (widget &optional event)
- (let ((tidy-buf (widget-get widget :arg-tidy))
- (orig-buf (widget-get widget :arg-orig))
- (curr-win (selected-window)))
- (tidy-check-is-tidied orig-buf tidy-buf)
- (switch-to-buffer-other-window tidy-buf)
- (select-window curr-win))))
-
-
- (insert " ")
- (widget-create 'push-button
- :tag " Use Tidied "
- :keymap (make-sparse-keymap)
- :arg-tidy output-buffer
- :arg-orig orig-buffer
- :action (lambda (widget &optional event)
- (message "Copying ...")
- (let* ((orig-buf (widget-get widget :arg-orig))
- (tidy-buf (widget-get widget :arg-tidy))
- (orig-buf-str
- (save-restriction
- (with-current-buffer orig-buf
- (widen)
- (buffer-substring-no-properties (point-min) (point-max)))))
- (tidy-buf-str
- (save-restriction
- (with-current-buffer tidy-buf
- (widen)
- (buffer-substring-no-properties (point-min) (point-max)))))
- )
- (tidy-check-is-tidied orig-buf tidy-buf)
- (kill-buffer (current-buffer))
- (kill-buffer tidy-buf)
- (if (string= orig-buf-str tidy-buf-str)
- (message "Original buffer's and tidied buffer's contents are equal")
- (with-current-buffer orig-buf
- (erase-buffer)
- (insert tidy-buf-str)
- (goto-char (point-min))
- (delete-window (selected-window))
- (switch-to-buffer orig-buf)
- (message "Copied to %s" orig-buf))))))
- (insert " ")
- (widget-create 'push-button
- :tag " Ediff "
- :keymap (make-sparse-keymap)
- :arg-tidy output-buffer
- :arg-orig orig-buffer
- :action (lambda (widget &optional event)
- (require 'ediff)
- (let ((orig-buf (widget-get widget :arg-orig))
- (tidy-buf (widget-get widget :arg-tidy))
- ;; Fix-me: How should ediff-actual-options be set?
- (old-ediff-actual-diff-options (default-value 'ediff-actual-diff-options))
- (new-ediff-actual-diff-options " -a -b -w "))
- (with-current-buffer orig-buf (setq ediff-actual-diff-options " -a -b -w "))
- (with-current-buffer tidy-buf (setq ediff-actual-diff-options " -a -b -w "))
- (tidy-check-is-tidied orig-buf tidy-buf)
- (set-default 'ediff-actual-diff-options new-ediff-actual-diff-options)
- (tidy-ediff-buffers orig-buf tidy-buf)
- (set-default 'ediff-actual-diff-options old-ediff-actual-diff-options)
- )))
- ;;(widget-setup)
-
- (insert "\n\n")
- (when (re-search-forward (concat
- "\\([0-9]+\\) warnings?, "
- "\\([0-9]+\\) errors? were found!")
- nil t)
- (setq tidy-warnings (string-to-number (match-string 1)))
- (setq tidy-errors (string-to-number (match-string 2)))
- (setq tidy-message (match-string 0)))
-
- (goto-char (point-min))
- ;;(while (re-search-forward "stdin:" nil t) (replace-match (concat filename ":")))
- (wab-compilation-mode)
- (set-buffer-modified-p nil)
- (goto-char (point-min))
- ;; Fix-me: How should this be run? Some hook for compilation I
- ;; guess, but what is the name of it?
- ;; (wab-forward)
- )
-
-
- (when (buffer-live-p output-buffer)
- ;; Catch segmentation violations
- ;; Sometimes get this when editing files from Macs
- ;; See the function at the bottom of the file
- (with-current-buffer output-buffer
- (goto-char (point-min))
- (let ((case-fold-search t))
- (if (looking-at "Segmentation") ;; might work with XEmacs
- (setq seg-error t))))
- ;; Fix-me: add parts outside region
- (when partial
- (with-current-buffer output-buffer
- (goto-char (point-min))
- (when (search-forward tidy-beg-mark nil t)
- (delete-region (point-min) (point)))
- (when region-header (insert region-header))
- (when (search-forward tidy-end-mark nil t)
- (backward-char (length tidy-end-mark))
- (delete-region (point) (point-max)))
- (when region-footer (insert region-footer))))
- )
-
- (unless (or (> tidy-errors 0) seg-error)
- ;; Do not know if the window stuff is needed?
- (let* ((window (get-buffer-window (current-buffer)))
- (top (window-start window)))
-
- (unless tidy-markup ;; default is "yes" hence inverted logic
- (when (eq system-type 'windows-nt)
- (tidy-remove-ctrl-m output-buffer))
- (with-current-buffer output-buffer
- (setq tidy-tidied-buffer orig-buffer)
- (delete-trailing-whitespace)
- (indent-region (point-min) (point-max))
- (goto-char (point-min))))
-
- ;; Try not to move the window too much when we tidy the whole buffer
- (set-window-start window top)))
-
- (switch-to-buffer-other-window error-buffer)
-
- (if seg-error
- (message (concat "Tidy: Segmentation violation!!!"
- " Check your character encoding."))
- (message "%s" tidy-message))))
-
-(defun tidy-after-ediff ()
- (run-with-idle-timer 0 nil 'remove-hook 'ediff-quit-hook 'tidy-after-ediff)
- ;;(lwarn 't :warning "cb=%s, %s, %s" (current-buffer) ediff-buffer-A ediff-buffer-B)
- (let ((sw (selected-window))
- nw)
- (select-window ediff-window-B)
- (setq nw (split-window))
- (set-window-buffer nw (get-buffer-create tidy-control-buffer-name))
- (select-window sw))
- nil)
-
-(defun tidy-ediff-buffers (buffer-a buffer-b &optional startup-hooks job-name)
- (add-hook 'ediff-quit-hook 'tidy-after-ediff)
- (ediff-buffers buffer-a buffer-b startup-hooks job-name))
-
-;; http://sf.net/tracker/index.php?func=detail&aid=1425219&group_id=27659&atid=390963
-(defun tidy-remove-ctrl-m (buffer)
- (with-current-buffer buffer
- (goto-char (point-min))
- (let ((control-m (char-to-string ?\r)))
- (while (search-forward control-m nil t)
- (replace-match "" nil t)))))
-
-(defvar tidy-html-files-re "\.x?html?$")
-(defun tidy-is-html-file (filename)
- (string-match tidy-html-files-re filename))
-
-(defun tidy-contains (dir file)
- (let ((d (file-name-as-directory dir)))
- (when (< (length d) (length file))
- (string= d (substring file 0 (length d))))))
-
-
-
-(defvar tidy-tree-files nil)
-(defun tidy-tree-next ()
- (let ((next-file (car tidy-tree-files))
- file-buffer
- ;;(tidy-use-ediff nil)
- )
- (if (not next-file)
- ;;(setq tidy-batch-buffer nil)
- nil
- (setq tidy-tree-files (cdr tidy-tree-files))
- (if (file-directory-p next-file)
- (error "Uh?")
- (tidy-batch next-file)))))
-
-(defun tidy-tree (root)
- "Run Tidy on all files in the directory ROOT.
-The files are first opened in Emacs and then `tidy-buffer' is
-called."
- (interactive "DDirectory tree: ")
- (unless (file-directory-p root)
- (error "tidy-tree called with non-directory arg: %s" root))
- (setq tidy-tree-files (html-site-get-sub-files root html-site-files-re))
- (dolist (f tidy-tree-files)
- (let ((b (get-file-buffer f)))
- (when (and b
- (buffer-modified-p b))
- (unless
- (y-or-n-p (format "Modified buffer %s must be saved. Save it and continue? "
- (buffer-name b)))
- (error "Modified buffers prevent run with Tidy"))
- (with-current-buffer b
- (basic-save-buffer)))))
- (setq tidy-batch-last-file nil)
- (tidy-tree-next))
-
-(defun tidy-html-site ()
- "Tidy the whole tree in the current site."
- ;; Fix-me: document html-site better.
- (interactive)
- (unless (featurep 'html-site)
- (error "html-site is not loaded"))
- (html-site-current-ensure-site-defined)
- (tidy-tree (html-site-current-site-dir)))
-
-(defun tidy-batch-sentinel (process event)
- (with-current-buffer (process-buffer process)
- (let ((inhibit-read-only t))
- (insert "PROCESS-EVENT: " event "\n")))
- (when (eq (process-status process) 'exit)
- (when tidy-batch-last-file
- (let ((b (get-file-buffer tidy-batch-last-file)))
- (when b
- (with-current-buffer b
- (save-excursion
- (widen)
- (let ((old (buffer-substring-no-properties (point-min) (point-max)))
- (new (with-temp-buffer
- ;;(insert-file tidy-batch-last-file)
- (insert-file-contents tidy-batch-last-file)
- (buffer-substring-no-properties (point-min) (point-max))))
- )
- (unless (string= old new)
- (erase-buffer)
- (insert new))))))))
- (tidy-tree-next)))
-
-(defun tidy-batch-output-filter (proc string)
- (display-buffer (process-buffer proc))
- (with-current-buffer (process-buffer proc)
- (let ((moving (= (point) (process-mark proc))))
- (save-excursion
- ;; Insert the text, advancing the process marker.
- (goto-char (process-mark proc))
- (let ((inhibit-read-only t))
- ;; http://sf.net/tracker/index.php?func=detail&aid=1425219&group_id=27659&atid=390963
- (setq string (replace-regexp-in-string "\r$" "" string))
- (insert string))
- (set-marker (process-mark proc) (point)))
- (if moving (goto-char (process-mark proc))))))
-
-(defun tidy-batch (filename)
- (interactive (list buffer-file-name)) ;; For testing
- (setq tidy-batch-last-file filename)
- (let* (;;(filename buffer-file-name)
- (config-file (tidy-temp-config-file))
- (command (list tidy-shell-program
- ;; load configuration file first so that
- ;; options are overridden by command line
-
- "-config" config-file
- ;;"--error-file" error-file
- "--write-back" "yes"
- ;;"--show-body-only" "no"
- "--gnu-emacs" "yes"
- "--gnu-emacs-file" filename
- filename
- ))
- (procbuf (noshell-procbuf-setup "subprocess for Tidy"))
- (start (with-current-buffer procbuf (point)))
- proc
- ;; This does not work at the moment (2006-05-16):
- (coding-system-for-read 'undecided-dos)
- (coding-system-for-write 'undecided-dos)
- )
- ;;(setq tidy-batch-buffer procbuf)
- (tidy-save-settings config-file)
- (unwind-protect
- (setq proc (apply 'noshell-procbuf-run procbuf command))
- (with-current-buffer procbuf
- (set-process-sentinel proc 'tidy-batch-sentinel)
- ;;(set-process-coding-system 'dos)
- (set-process-filter proc 'tidy-batch-output-filter)
- (let ((win (get-buffer-window procbuf)))
- (when win
- (set-window-point win (point-max))
- ))
- ))))
-
-;;;}}} +
-
-;;;}}}
-
-;; (with-temp-buffer
-;; (tidy-parse-config-file))
-
-(defun wab-compilation-button-at (pos)
- (let ((old (point))
- ret)
- (goto-char pos)
- (setq ret (eq 'compilation-button-map
- (get-char-property pos 'keymap)))
- (goto-char old)
- ret))
-
-(defun wab-click (&optional event)
- "Do the action that is tighed to the button."
- (interactive (list last-input-event))
- (if event (posn-set-point (event-end event)))
- (let ((button (get-char-property (point) 'button))
- done)
- (condition-case nil
- (progn
- (compile-goto-error)
- (setq done t))
- (error nil))
- (unless done
- (when button
- (if (widget-at)
- ;;(widget-apply-action button event)
- (widget-apply-action button)
- (push-button))))))
-
-(defvar wab-errors-supress
- '("No more buttons"
- "Moved past last error"
- "No buttons or fields found"
- "Moved back before first error"
- ))
-
-(defun wab-fb-errmsg (err)
- (let ((s (error-message-string err)))
- (unless (member s wab-errors-supress)
- (message "%s" err)
- (signal (car err) (cdr err)))))
-
-(defun wab-fb-helper (forward function check-at args)
- (let (ret
- (len (1+ (- (point-max) (point-min))))
- (old (point)))
- (condition-case err
- (progn
- (apply function args)
- (when (funcall check-at (point))
- (setq ret (point))))
- (error (wab-fb-errmsg err)))
- (unless ret
- (if forward
- (goto-char (point-min))
- (goto-char (point-max)))
- (condition-case err
- (progn
- (apply function args)
- (when (funcall check-at (point))
- (setq ret (point))))
- (error (message "%s" (error-message-string err)))))
- (goto-char old)
- (when (and ret (= ret old))
- (if forward
- (setq ret (+ ret len))
- (setq ret (- ret len))))
- ;;(message "function=%s, ret=%s" function ret)
- ret))
-(defvar wab-button-list
- '(
- (compilation-previous-error (1) compilation-next-error (1) wab-compilation-button-at)
- (backward-button (1) forward-button (1) button-at)
- (widget-backward (1) widget-forward (1) widget-at)
- ))
-(defun wab-fb (forward)
- ;;(message "==================")
- (let* ((pos-list (mapcar (lambda (p)
- (let ((prev-fun (nth 0 p))
- (prev-arg (nth 1 p))
- (next-fun (nth 2 p))
- (next-arg (nth 3 p))
- (test-fun (nth 4 p)))
- (if forward
- (wab-fb-helper t next-fun test-fun next-arg)
- (wab-fb-helper nil prev-fun test-fun prev-arg))))
- wab-button-list))
- (len (1+ (- (point-max) (point-min))))
- (defpos (if forward (* 2 len) (- len)))
- (newpos defpos)
- (here (point)))
- ;;(message "pos-list=%s" pos-list)
- (mapc (lambda (p) (when (and p
- (if forward
- (progn
- (when (< p here)
- (setq p (+ p len)))
- (< p newpos))
- (when (> p here)
- (setq p (- p len)))
- (> p newpos)))
- (setq newpos p)))
- pos-list)
- (if (= newpos defpos)
- (setq newpos here)
- (setq newpos (mod newpos len)))
- (goto-char newpos)))
-
-(defun wab-backward ()
- "Go to next button or error link."
- (interactive)
- (wab-fb nil))
-
-(defun wab-forward ()
- "Go to previous button or error link."
- (interactive)
- (wab-fb t))
-
-(define-compilation-mode wab-compilation-mode "WAB Compilation"
- "Mode for tidy control buffer."
- )
-(define-key wab-compilation-mode-map [tab] 'wab-forward)
-(define-key wab-compilation-mode-map [(shift tab)] 'wab-backward)
-(define-key wab-compilation-mode-map [backtab] 'wab-backward)
-(define-key wab-compilation-mode-map "\r" 'wab-click)
-(define-key wab-compilation-mode-map [mouse-1] 'wab-click)
-(define-key wab-compilation-mode-map [mouse-2] 'wab-click)
-
-(defvar tidy-menu-mode-map
- (let ((map (make-sparse-keymap)))
- ;; This did not work:
- ;;(define-key map [menu-bar tidy-menu] (list 'menu-item "Tidy" '(lambda () (interactive) tidy-menu-symbol)))
- map))
-
-(define-minor-mode tidy-menu-mode
- "This mode just adds Tidy to the menu bar."
- nil
- nil
- nil
- (when tidy-menu-mode
- (define-key tidy-menu-mode-map [menu-bar tidy-menu]
- (list 'menu-item "Tidy" tidy-menu-symbol))))
-
-(provide 'tidy-xhtml)
-
-;;; tidy-xhtml.el ends here
diff --git a/emacs.d/nxhtml/nxhtml/wtest.el b/emacs.d/nxhtml/nxhtml/wtest.el
deleted file mode 100644
index 6cf1c39..0000000
--- a/emacs.d/nxhtml/nxhtml/wtest.el
+++ /dev/null
@@ -1,56 +0,0 @@
-(require 'wid-edit)
-(require 'help-mode)
-
-(defun test-widget-formats ()
- (interactive)
- (let ((widget-button-prefix "<<<<")
- (widget-button-suffix ""))
- (with-output-to-temp-buffer (help-buffer)
- (with-current-buffer (help-buffer)
- (set (make-local-variable 'widget-push-button-prefix) "")
- (set (make-local-variable 'widget-push-button-suffix) "")
- (set (make-local-variable 'widget-link-prefix) "")
- (set (make-local-variable 'widget-link-suffix) "")
-
- (widget-create 'push-button
- :action '(lambda (w &optional e) (message "1"))
- :button-face 'emacsw32-link-face
- :button-prefix ""
- :button-suffix ""
- "One"
- )
- (widget-create 'push-button
- :action '(lambda (w &optional e) (message "2"))
- :format "%[%v%]"
- :value "two"
- )
- (widget-create 'push-button
- :action '(lambda (w &optional e) (message "3"))
- :format "%[%v%]"
- :button-prefix ""
- :button-suffix ""
- "three"
- )
- (widget-create 'push-button
- :action '(lambda (w &optional e) (message "4"))
- :format "%v"
- :button-prefix ""
- :button-suffix ""
- "four"
- )
- (widget-create 'push-button
- :action '(lambda (w &optional e) (message "5"))
- :format "%{%v%}"
- :button-prefix ""
- :button-suffix ""
- "five"
- )
- (widget-create 'push-button
- :action '(lambda (w &optional e) (message "6"))
- ;;:format "%[[%v]%]"
- :value "Six"
- ;;:value-create 'widget-browse-value-create
- :value-create (lambda (widget) (insert (widget-get widget :value)))
- )
- (widget-setup)
- ))))
diff --git a/emacs.d/nxhtml/nxhtml/xhtml-help.el b/emacs.d/nxhtml/nxhtml/xhtml-help.el
deleted file mode 100644
index f72c2fa..0000000
--- a/emacs.d/nxhtml/nxhtml/xhtml-help.el
+++ /dev/null
@@ -1,373 +0,0 @@
-;;; xhtml-help.el --- Browse XHTML reference sites
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2005-08-16
-;; Last-Updated: Wed Aug 01 14:24:07 2007 (7200 +0200)
-(defconst xhtml-help:version "0.57") ;; Version:
-;; Keywords: languages
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Use when editing XHTML file to get tag references or CSS property
-;; name references (like background-color) from web sources.
-;;
-;; Usage:
-;;
-;; (require 'fmode)
-;;
-;; Then call `xhtml-help-show-tag-ref' or `xhtml-help-show-css-ref'.
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; History:
-;;
-;; 2005-12-02: Corrected fetching margin-*.
-;; 2006-01-08: Prompt for tag and property name before fetching help.
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This file is not part of Emacs
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defun xhtml-help-css-prop-at-point ()
- "Get possible css name property at point."
- (save-excursion
- (let ((ch (char-after))
- (in-word))
- (when (and (not (bolp))
- (or (not ch)
- (member ch '(10 9 32 ?\:))))
- (backward-char)
- (setq ch (char-after)))
- (while (string-match "[a-z-]" (char-to-string ch))
- (setq in-word t)
- (backward-char)
- (setq ch (char-after)))
- (when in-word
- (forward-char)
- (when (looking-at "[a-z-]+")
- (match-string-no-properties 0))))))
-
-;;;###autoload
-(defun xhtml-help-show-css-ref ()
- "Show CSS reference for CSS property name at point."
- (interactive)
- (let ((css-prop (xhtml-help-css-prop-at-point)))
- (setq css-prop (read-from-minibuffer "Get help for CSS property: " css-prop))
- (when css-prop
- (xhtml-help-browse-css css-prop))))
-
-;;;###autoload
-(defun xhtml-help-tag-at-point ()
- "Get xhtml tag name at or before point."
- (save-excursion
- (when (eq (following-char) ?<)
- (forward-char))
- (when (and (search-backward "<" nil t)
- (looking-at "</?\\([[:alnum:]]+\\)"))
- (match-string-no-properties 1))))
-
-;;;###autoload
-(defun xhtml-help-show-tag-ref ()
- "Show xhtml reference for tag name at or before point."
- (interactive)
- (let ((tag (xhtml-help-tag-at-point)))
- (setq tag (read-from-minibuffer "Get help for tag name: " tag))
- (when (< 0 (length tag))
- (xhtml-help-browse-tag tag))))
-
-;;;###autoload
-(defgroup xhtml-help nil
- "Customization group for xhtml-help."
- :group 'nxhtml
- :group 'hypermedia)
-
-(defcustom xhtml-help-refurl "http://www.w3.org/"
- "Web url to get references from."
- :type '(choice
- (const "http://www.w3.org/")
- (const "http://xhtml.com/")
- (const "http://www.w3schools.com/")
- ;;(const "http://learningforlife.fsu.edu/")
- )
- :group 'xhtml-help)
-
-(defcustom xhtml-help-query-refurl t
- "Query for reference url.
-This is used in `xhtml-help-browse-tag' and `xhtml-help-browse-css'."
- :type 'boolean
- :group 'xhtml-help)
-
-(defun xhtml-help-query-refurl (prompt &optional notvalid)
- (let ((choices (get 'xhtml-help-refurl 'custom-type))
- (default xhtml-help-refurl))
- (unless (eq 'choice (car choices))
- (error "Custom type of xhtml-help-refurl is not choices"))
- (setq choices (cdr choices))
- (setq choices (mapcar (lambda (elt)
- (car (cdr elt)))
- choices))
- (mapc (lambda (elt)
- (setq choices (delete elt choices)))
- notvalid)
- (when (member default notvalid)
- (setq default (car choices)))
- (completing-read (concat "Fetch " prompt " reference from: ")
- choices
- nil
- t
- default
- '(choices . 1))))
-
-(defun xhtml-match (target str)
- (let ((len (length target)))
- (when (<= len (length str))
- (equal target (substring str 0 len)))))
-
-(defun xhtml-match-member (target str-list)
- (let (m)
- (mapc (lambda (elt)
- (when (xhtml-match elt target)
- (setq m t)))
- str-list)
- m))
-
-(defun xhtml-help-browse-css (css-prop)
- (let* ((refurl (if xhtml-help-query-refurl
- (xhtml-help-query-refurl (concat "CSS property '" css-prop "'")
- (list "http://xhtml.com/"))
- xhtml-help-refurl))
- (url
- (cond
- ( (equal refurl "http://www.w3schools.com/")
- (concat
- refurl "css/pr_"
- (cond
- ( (member css-prop '("clear" "cursor" "display" "float" "position" "visibility"))
- "class_")
- ( (member css-prop '("height" "line-height" "max-width" "min-height" "min-width" "width"))
- "dim_")
- ( (xhtml-match "font-weight" css-prop)
- (setq css-prop "") "font_weight")
- ( (xhtml-match "font" css-prop)
- "font_")
- ( (member css-prop '("content" "counter-increment" "counter-reset" "quotes"))
- "gen_")
- ( (xhtml-match "list" css-prop)
- "list_")
- ( (xhtml-match "margin" css-prop)
- "")
- ( (xhtml-match "outline" css-prop)
- "outline_")
- ( (equal "padding" css-prop)
- "")
- ( (xhtml-match "padding" css-prop)
- "padding_")
- ( (member css-prop '("bottom" "clip" "left" "overflow" "right" "top"
- "vertical-align" "z-index"))
- "pos_")
- ( (member css-prop '("border-collapse"))
- "tab_")
- ( (member css-prop '("color" "direction" "letter-spacing" "text-align"
- "text-decoration" "text-indent" "text-transform"
- "white-space" "word-spacing"))
- "text_")
- ( t ""))
- css-prop ".asp"))
- ;; ( (equal refurl "http://learningforlife.fsu.edu/")
- ;; (let ((css-prop2 css-prop)
- ;; (cc)
- ;; (ii 0))
- ;; (while (< ii (length css-prop))
- ;; (setq cc (substring css-prop2 ii (1+ ii)))
- ;; (when (equal cc "-")
- ;; (store-substring css-prop2 ii "_"))
- ;; (setq ii (1+ ii)))
- ;; (concat
- ;; refurl "webmaster/references/css/" css-prop2 ".cfm")))
- ( (equal refurl "http://www.w3.org/")
- (let ((properties "")
- (prop-def ""))
- (concat
- refurl "TR/REC-CSS2/"
- (cond
- ( (xhtml-match-member css-prop '("margin" "padding" "border"))
- "box.html#propdef-")
- ( (member css-prop '("display" "position"
- "top" "right" "bottom" "left"
- "float" "clear"
- "z-index"
- "direction" "unicode-bidi"))
- "visuren.html#propdef-")
- ( (member css-prop '("width" "min-width" "max-width"
- "height" "min-height" "max-height"
- "line-height" "vertical-align"))
- "visudet.html#propdef-")
- ( (member css-prop '("overflow" "clip" "visibility"))
- "visufx.html#propdef-")
- ( (member css-prop '("content" "quotes"))
- "generate.html#propdef-")
- ( (or (xhtml-match css-prop "counter")
- (member css-prop '("marker-offset")))
- (setq css-prop "")
- "generate.html#counters")
- ( (xhtml-match-member css-prop '("list"))
- "generate.html#propdef-")
- ( (member css-prop '("size" "marks"
- "page-break-before" "page-break-after" "page-break-inside"
- "page"
- "orphans" "widows"
- ))
- "page.html#propdef-")
- ( (member css-prop '("color"
- "background-color" "background-image" "background-repeat"
- "background-attachment" "background-position" "background"
- ))
- "colors.html#propdef-")
- ( (xhtml-match "font" css-prop)
- "fonts.html#propdef-")
- ( (xhtml-match "text" css-prop)
- "text.html#")
- ( (member css-prop '("letter-spacing" "word-spacing"))
- "text.html#")
- ;; Fix-me: tables???
- ( (member css-prop '("cursor"))
- "ui.html#propdef-")
- ( (xhtml-match "outline" css-prop)
- "ui.html#dynamic-outlines")
- ( (or (xhtml-match "speak" css-prop)
- (xhtml-match "pause" css-prop)
- (xhtml-match "cue" css-prop)
- (xhtml-match "pitch" css-prop)
- (member css-prop '("volume" "play-during" "azimuth" "elevation"
- "speech-rate" "voice-family" "richness")))
- "aural.html#propdef-")
- )
- css-prop
- )))
- ( t (error "Bad value for xhtml-help-refurl: %s" refurl)))))
- (browse-url url)))
-
-
-
-
-
-(defun xhtml-help-browse-tag (tag)
- (let* ((refurl (if xhtml-help-query-refurl
- (xhtml-help-query-refurl (concat "XHTML tag '" tag "'")
- (list "http://www.w3.org/"))
- xhtml-help-refurl))
- (url
- (cond
- ( (equal refurl "http://xhtml.com/")
- (concat
- refurl "en/xhtml/reference/"
- tag
- "/")
- )
- ( (equal refurl "http://www.w3schools.com/")
- (concat
- refurl "tags/"
- (cond
- ( (member tag '("tt" "i" "b" "big" "small"))
- "tag_font_style.asp")
- ( (member tag '("em" "strong" "dfn" "code" "samp" "kbd" "var" "cite"))
- "tag_phrase_elements.asp")
- ( (member tag '("h1" "h2" "h3" "h4" "h5" "h6"))
- "tag_hn.asp")
- ( (member tag '("sub" "sup"))
- "tag_sup.asp")
- ( t
- (concat "tag_" tag ".asp")
- ))))
- ;; ( (equal refurl "http://learningforlife.fsu.edu/")
- ;; (concat
- ;; refurl "webmaster/references/xhtml/tags/"
- ;; (cond
- ;; ( (member tag '("body" "head" "html" "title"))
- ;; "structure/")
- ;; ( (member tag '("abbr" "acronym" "address" "blockquote" "br" "cite"
- ;; "code" "dfn" "div" "em" "h1" "h2" "h3" "h4" "h5" "h6"
- ;; "kbd" "p" "pre" "q" "samp" "span" "strong" "var"))
- ;; "text/")
- ;; ( (member tag '("a"))
- ;; "hypertext/")
- ;; ( (member tag '("dl" "dd" "dt" "ol" "ul" "li"))
- ;; "list/")
- ;; ( (member tag '("object" "param"))
- ;; "object/")
- ;; ( (member tag '("b" "big" "hr" "i" "small" "sub" "sup" "tt"))
- ;; "presentation/")
- ;; ( (member tag '("del" "ins"))
- ;; "edit/")
- ;; ( (member tag '("bdo"))
- ;; "bidirectional/")
- ;; ( (member tag '("button" "fieldset" "form" "input" "label" "legend"
- ;; "select" "optgroup" "option" "textarea"))
- ;; "forms/")
- ;; ( (member tag '("caption" "col" "colgroup" "table" "tbody" "td"
- ;; "tfoot" "th" "thead" "tr"))
- ;; "table/")
- ;; ( (member tag '("img"))
- ;; "image/")
- ;; ( (member tag '("area" "map"))
- ;; "client/")
- ;; ( (member tag '("area" "map"))
- ;; "client/")
- ;; ( (member tag '("meta"))
- ;; "meta/")
- ;; ( (member tag '("noscript" "script"))
- ;; "scripting/")
- ;; ( (member tag '("style"))
- ;; "stylesheet/")
- ;; ( (member tag '("link"))
- ;; "link/")
- ;; ( (member tag '("base"))
- ;; "base/")
- ;; ( (member tag '("base"))
- ;; "base/")
- ;; ( (member tag '("ruby" "rbc" "rtc" "rb" "rt" "rp"))
- ;; "ruby/")
- ;; )
- ;; tag ".cfm"))
- ( t (error "Bad value for xhtml-help-refurl: %s" refurl))
- )))
- (browse-url url)))
-
-(defconst xhtml-help-mode-keymap
- (let ((map (make-sparse-keymap "XHTML Help")))
- (define-key map [menu-bar xh-help] (cons "XHTML Help" (make-sparse-keymap "second")))
- (define-key map [menu-bar xh-help css-help] '("CSS Help" . xhtml-help-show-css-ref))
- (define-key map [menu-bar xh-help tag-help] '("XHTML Tag Help" . xhtml-help-show-tag-ref))
- map))
-
-(define-minor-mode xhtml-help-mode
- "Minor mode that adds keys for accessing xhtml and css help."
- :keymap xhtml-help-mode-keymap)
-
-(provide 'xhtml-help)
-
-;;; xhtml-help.el ends here
diff --git a/emacs.d/nxhtml/nxhtmlmaint.el b/emacs.d/nxhtml/nxhtmlmaint.el
deleted file mode 100644
index 68c03b7..0000000
--- a/emacs.d/nxhtml/nxhtmlmaint.el
+++ /dev/null
@@ -1,439 +0,0 @@
-;;; nxhtmlmaint.el --- Some maintenance helpers
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-09-27T15:29:35+0200 Sat
-;; Version: 0.6
-;; Last-Updated: 2010-01-18 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This module contains maintenance functions:
-;;
-;; `nxhtmlmaint-get-all-autoloads' (nxhtmlmaint-get-all-autoloads)
-;;
-;; `nxhtmlmaint-start-byte-compilation'
-;; `nxhtmlmaint-byte-uncompile-all'
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'advice))
-(eval-when-compile (require 'nxhtml-base))
-(eval-when-compile (require 'nxhtml-web-vcs nil t))
-(eval-when-compile (require 'web-vcs nil t))
-(eval-when-compile (require 'ourcomments-util))
-
-(defvar nxhtmlmaint-dir
- ;;(file-name-directory (if load-file-name load-file-name buffer-file-name))
- (file-name-directory (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- "Maintenance directory for nXhtml.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Autoload helpers
-
-(defun nxhtmlmaint-autoloads-file ()
- "Return autoload file name for nXhtml."
- (file-truename (expand-file-name "nxhtml-loaddefs.el" nxhtmlmaint-dir)))
-
-(defun nxhtmlmaint-util-dir ()
- "Return nXhtml util directory."
- (file-truename (file-name-as-directory
- (expand-file-name "util" nxhtmlmaint-dir))))
-
-(defvar nxhtmlmaint-autoload-default-directory (nxhtmlmaint-util-dir))
-
-(defvar generated-autoload-file)
-
-(defun nxhtmlmaint-initialize-autoloads-file ()
- "Initialize nXhtml autoload file."
- (with-current-buffer (find-file-noselect generated-autoload-file)
- (when (= 0 (buffer-size))
- (insert ";; Autoloads for nXthml
-;;
-;; This file should be updated by `nxhtmlmaint-get-file-autoloads',
-;; `nxhtmlmaint-get-dir-autoloads' or `nxhtmlmaint-get-all-autoloads'.
-\(eval-when-compile (require 'nxhtml-base))
-\(eval-when-compile (require 'web-vcs))")
- (basic-save-buffer))))
-
-(defun nxmtmlmaint-advice-autoload (on)
- "Activate advices if ON, otherwise turn them off."
- (if on
- (progn
- (ad-activate 'autoload-file-load-name)
- (ad-activate 'make-autoload))
- (ad-deactivate 'autoload-file-load-name)
- (ad-deactivate 'make-autoload)))
-
-(defun nxhtmlmaint-get-file-autoloads (file)
- "Get autoloads for file FILE.
-Update nXhtml autoload file with them."
- (interactive (list (buffer-file-name)))
- (let* ((generated-autoload-file (nxhtmlmaint-autoloads-file))
- (emacs-lisp-mode-hook nil)
- (default-directory (nxhtmlmaint-util-dir)))
- (nxhtmlmaint-initialize-autoloads-file)
- ;; Get the autoloads using advice
- (nxmtmlmaint-advice-autoload t)
- (update-file-autoloads file nil)
- (nxmtmlmaint-advice-autoload nil)
- ;; Display
- (display-buffer (find-file-noselect generated-autoload-file))))
-
-(defun nxhtmlmaint-get-dir-autoloads (dir)
- "Get autoloads for directory DIR.
-Update nXhtml autoload file with them."
- (interactive (list (or (when (buffer-file-name)
- (file-name-directory (buffer-file-name)))
- default-directory)))
- (let* ((generated-autoload-file (nxhtmlmaint-autoloads-file))
- (emacs-lisp-mode-hook nil)
- (auto-buf (find-file-noselect generated-autoload-file)))
- (nxhtmlmaint-initialize-autoloads-file)
- ;; Get the autoloads using advice
- (nxmtmlmaint-advice-autoload t)
- ;; Fix-me: Loop instead, some files must be avoided.
- (update-directory-autoloads dir)
- (nxmtmlmaint-advice-autoload nil)
- ;; Display
- (display-buffer (find-file-noselect generated-autoload-file))))
-
-(defun nxhtmlmaint-get-tree-autoloads (root)
- "Get autoloads for directory tree ROOT.
-Update nXhtml autoload file with them."
- (interactive (list (or (when (buffer-file-name)
- (file-name-directory (buffer-file-name)))
- default-directory)))
- (message "Getting autoloads in %s" root)
- (nxhtmlmaint-get-dir-autoloads root)
- (let* ((files (directory-files root))
- (sub-dirs (mapcar (lambda (file)
- (when (and (not (member file '("." "..")))
- (not (member file '("nxml-mode-20041004" "old")))
- (not (member file '("nxhtml-company-mode")))
- (not (member file '("in")))
- (file-directory-p (expand-file-name file root)))
- file))
- files)))
- (setq sub-dirs (delq nil sub-dirs))
- ;;(message "sub-dirs=%s" sub-dirs)
- (dolist (dir sub-dirs)
- (let ((full-dir (expand-file-name dir root)))
- (unless (or (string= full-dir nxhtmlmaint-dir)
- (string= dir "alts"))
- (nxhtmlmaint-get-tree-autoloads full-dir))))))
-
-;;(nxhtmlmaint-get-all-autoloads)
-(defun nxhtmlmaint-get-all-autoloads ()
- "Get all autoloads for nXhtml.
-Update nXhtml autoload file with them."
- ;;(interactive)
- (if nxhtml-autoload-web
- (message "Skipping rebuilding autoloads, not possible when autoloading from web")
- (let ((auto-buf (find-file-noselect (nxhtmlmaint-autoloads-file))))
- (with-current-buffer auto-buf
- (erase-buffer)
- (basic-save-buffer))
- (nxhtmlmaint-get-tree-autoloads nxhtmlmaint-dir)
- ;; `nxhtml-mode' and `nxhtml-validation-header-mode' should only be
- ;; autoloaded if nxml-mode if available.
- (with-current-buffer auto-buf
- (message "Fixing nxml autoloads")
- (let ((frmt (if (= emacs-major-version 22)
- "^(autoload (quote %s) "
- "^(autoload '%s ")))
- (dolist (nxmode '(nxhtml-mode nxhtml-validation-header-mode))
- (goto-char (point-min))
- (when (re-search-forward (format frmt nxmode) nil t)
- (forward-line 0)
- (insert "(when (fboundp 'nxml-mode)\n")
- (forward-sexp)
- (insert ")"))))
- ;; Fix defcustom autoloads
- (goto-char (point-min))
- (let ((cus-auto "(\\(custom-autoload\\) +'.* +\\(\".*?\"\\)"))
- (while (re-search-forward cus-auto nil t)
- ;;(backward-char (1- (length cus-auto)))
- ;;(insert "nxhtml-")
- (let ((lib (match-string 2)))
- ;; Change to symbol to fix autoloading. This works because
- ;; custom-load-symbol does require on symbols.
- (setq lib (concat "'" (substring lib 1 -1)))
- (replace-match "nxhtml-custom-autoload" t t nil 1)
- (replace-match lib t t nil 2))))
- ;; Fix autoload calls
- (goto-char (point-min))
- (let ((auto "(autoload "))
- (while (search-forward auto nil t)
- (backward-char (1- (length auto)))
- (insert "nxhtml-")))
- ;; Fix autoload source
- (goto-char (point-min))
- (let* ((patt-src "^;;; Generated autoloads from \\(.*\\)$")
- (patt-auto "^(nxhtml-autoload '[^ ]+ \\(\"[^\"]+\"\\)")
- (patt-cust "^(nxhtml-custom-autoload '[^ ]+ \\(\"[^\"]+\"\\)")
- (patt (concat "\\(?:" patt-src "\\)\\|\\(?:" patt-auto "\\)\\|\\(?:" patt-cust "\\)"))
- curr-src)
- (while (re-search-forward patt nil t)
- (cond
- ( (match-string 1)
- (setq curr-src (match-string-no-properties 1))
- ;; Remove .el
- (setq curr-src (substring curr-src 0 -3))
- ;; Setup up for web autoload
- (let* ((src-name (file-name-nondirectory curr-src))
- (feature (make-symbol src-name))
- )
- (end-of-line)
- (insert "\n"
- "(web-autoload-require '"
- (symbol-name feature)
- " 'lp"
- " '(nxhtml-download-root-url nil)"
- " \"" curr-src "\""
- " nxhtml-install-dir"
- " 'nxhtml-byte-compile-file"
- ")\n"))
- )
- ( (match-string 3)
- ;; (custom-autoload 'sym "lib" nil) is will give a
- ;; (require 'lib) so everything is ok here.
- nil)
- ( (or (match-string 2)
- (match-string 3)
- )
- (let* ((subexp (if (match-string 2) 2 3))
- (file (match-string-no-properties subexp)))
- (replace-match (concat "`(lp '(nxhtml-download-root-url nil)"
- " \"" curr-src "\""
- " nxhtml-install-dir)")
- nil ;; fixedcase
- nil ;; literal
- nil ;; string
- subexp ;; subexp
- ))
- )
- (t (error "No match???")))))
- ;; Save
- (basic-save-buffer)))))
-
-
-(defun nxhtmlmaint-autoload-file-load-name (file)
- "Return relative file name for FILE to autoload file directory."
- (let ((name (if (and nxhtmlmaint-autoload-default-directory
- (file-name-absolute-p file))
- (file-relative-name
- file nxhtmlmaint-autoload-default-directory)
- (file-name-nondirectory file))))
- (if (string-match "\\.elc?\\(\\.\\|\\'\\)" name)
- (substring name 0 (match-beginning 0))
- name)))
-
-(defadvice autoload-file-load-name (around
- nxhtmlmaint-advice-autoload-file-load-name
- ;;activate
- compile)
- "Advice to return relative file name."
- (setq ad-return-value (nxhtmlmaint-autoload-file-load-name (ad-get-arg 0))))
-
-(defun nxhtmlmaint-make-autoload (form file)
- "Make autoload for multi major modes."
- ;;(message "form=%S" form)
- (if (or (not (listp form))
- (not (eq 'define-mumamo-multi-major-mode (car form))))
- ad-return-value
- (if ad-return-value
- ad-return-value
- ;; Fix-me: Maybe expand??
- (let ((name (nth 1 form))
- (doc (nth 2 form)))
- `(autoload ',name ,file ,doc t)
- ))))
-
-(defadvice make-autoload (after
- nxhtmlmaint-advice-make-autoload
- ;;activate
- compile)
- "Make autoload for multi major modes."
- (setq ad-return-value
- (nxhtmlmaint-make-autoload (ad-get-arg 0)
- (ad-get-arg 1))))
-
-;; (defun nxhtmlmaint-generate-library-autoloads (library)
-;; "Insert at point autoloads for Emacs library LIBRARY.
-;; Works like `generate-file-autoloads', but for a library."
-;; (interactive
-;; (list (completing-read "Generate autoloads for library: "
-;; 'locate-file-completion
-;; (cons load-path (get-load-suffixes)))))
-;; (let ((file (locate-library library)))
-;; ;; Fix-me: wasn't this defined???
-;; (generate-file-autoloads file)))
-
-;;;###autoload
-(defun nxhtmlmaint-start-byte-compilation ()
- "Start byte compilation of nXhtml in new Emacs instance.
-Byte compiling in general makes elisp code run 5-10 times faster
-which is quite noticeable when you use nXhtml.
-
-This will also update the file nxhtml-loaddefs.el.
-
-You must restart Emacs to use the byte compiled files.
-
-If for some reason the byte compiled files does not work you can
-remove then with `nxhtmlmaint-byte-uncompile-all'."
- (interactive)
- ;; Fix-me: This message and redisplay seems only necessary sometimes.
- (message "Preparing byte compilation of nXhtml ...") (redisplay t)
- (let* ((this-file (expand-file-name "nxhtmlmaint.el" nxhtmlmaint-dir))
- (auto-file (expand-file-name "autostart.el" nxhtmlmaint-dir))
- (web-vcs-file (expand-file-name "nxhtml-web-vcs.el" nxhtmlmaint-dir))
- (this-emacs (locate-file invocation-name
- (list invocation-directory)
- exec-suffixes))
- (process-args `(,this-emacs nil 0 nil "-Q")))
- (nxhtmlmaint-byte-uncompile-all)
- (if (or noninteractive
- (not window-system))
- (nxhtmlmaint-byte-compile-all)
- ;;(when noninteractive (setq process-args (append process-args '("-batch"))))
- (setq process-args (append process-args
- (list "-l" auto-file
- "-l" web-vcs-file
- "-l" this-file
- "-f" "nxhtmlmaint-byte-compile-all")))
- (message "process-args=%S" process-args)
- (message "Starting new Emacs instance for byte compiling ...")
- (apply 'call-process process-args))))
-
-;;(nxhtmlmaint-byte-compile-all)
-(defun nxhtmlmaint-byte-compile-all ()
- "Byte recompile all files in nXhtml that needs it."
- (message "nxhtmlmaint-byte-compile-all: nxhtmlmaint-dir=%S, exists=%s" nxhtmlmaint-dir (file-directory-p nxhtmlmaint-dir))
- (let* ((load-path load-path)
- (nxhtml-dir (file-name-as-directory
- (expand-file-name "nxhtml"
- nxhtmlmaint-dir)))
- (util-dir (file-name-as-directory
- (expand-file-name "util"
- nxhtmlmaint-dir)))
- ;; (nxhtml-company-dir (file-name-as-directory
- ;; (expand-file-name "nxhtml-company-mode"
- ;; util-dir)))
- (related-dir (file-name-as-directory
- (expand-file-name "related"
- nxhtmlmaint-dir)))
- (tests-dir (file-name-as-directory
- (expand-file-name "tests"
- nxhtmlmaint-dir)))
- (emacsw32-dir (file-name-as-directory
- (expand-file-name "../lisp"
- nxhtmlmaint-dir)))
- (default-dir nxhtml-dir)
- )
- (message "nxhtmlmaint-byte-compile-all: nxhtml-dir=%S, exists=%s" nxhtml-dir (file-directory-p nxhtml-dir))
- (message "nxhtmlmaint-byte-compile-all: util-dir=%S, exists=%s" util-dir (file-directory-p util-dir))
- (message "nxhtmlmaint-byte-compile-all: related-dir=%S, exists=%s" related-dir (file-directory-p related-dir))
- (message "nxhtmlmaint-byte-compile-all: tests-dir=%S, exists=%s" tests-dir (file-directory-p tests-dir))
- (add-to-list 'load-path nxhtml-dir)
- (add-to-list 'load-path util-dir)
- ;;(add-to-list 'load-path nxhtml-company-dir)
- (add-to-list 'load-path related-dir)
- (add-to-list 'load-path tests-dir)
- (when (file-directory-p emacsw32-dir)
- (add-to-list 'load-path emacsw32-dir))
- (require 'cl) ;; This is run in a new Emacs. Fix-me: This might not be true any more.
- (message "load-path=%s" load-path)
- (let ((dummy-debug-on-error t))
- (nxhtmlmaint-byte-compile-dir nxhtmlmaint-dir nil nil nil))
- (web-vcs-message-with-face 'web-vcs-gold "Byte compiling nXhtml is ready, restart Emacs to use the compiled files")))
-
-;;;###autoload
-(defun nxhtmlmaint-byte-recompile ()
- "Recompile or compile all nXhtml files in current Emacs."
- (interactive)
- (nxhtmlmaint-byte-compile-dir nxhtmlmaint-dir nil nil t)
- (web-vcs-message-with-face 'web-vcs-gold "Byte recompiling nXhtml ready"))
-
-;;;###autoload
-(defun nxhtmlmaint-byte-uncompile-all ()
- "Delete byte compiled files in nXhtml.
-This will also update the file nxhtml-loaddefs.el.
-
-See `nxhtmlmaint-start-byte-compilation' for byte compiling."
- (interactive)
- (nxhtmlmaint-get-all-autoloads)
- (let ((dummy-debug-on-error t))
- (nxhtmlmaint-byte-compile-dir nxhtmlmaint-dir t t nil))
- (message "Byte uncompiling is ready, restart Emacs to use the elisp files"))
-
-(defconst nxhtmlmaint-nonbyte-compile-dirs
- '("." ".." "alts" "nxml-mode-20041004" "old" "tests" "nxhtml-company-mode"))
-
-;; Fix-me: simplify this now that nxml is not included
-(defun nxhtmlmaint-byte-compile-dir (dir force del-elc load)
- "Byte compile or uncompile directory tree DIR.
-If FORCE is non-nil byte recompile the elisp file even if the
-compiled file is newer.
-
-If DEL-ELC is nil then byte compile files. If DEL-ELC is non-nil
-then instead delete the compiled files."
- ;;(directory-files (file-name-directory buffer-file-name) t "\.el\\'")
- (dolist (el-src (directory-files dir t "\.el\\'"))
- (let ((elc-dst (concat el-src "c")))
- (if del-elc
- (when (file-exists-p elc-dst)
- (delete-file elc-dst)
- (message "Deleted %s" elc-dst))
- (setq debug-on-error t)
- (when (or force (file-newer-than-file-p el-src elc-dst))
- ;;(message "fn=%s" (file-name-nondirectory el-src))
- (when t ;;(string= "nxhtml-menu.el" (file-name-nondirectory el-src))
- ;;(message "(nxhtml-byte-compile-file %s)" el-src)
- (unless (nxhtml-byte-compile-file el-src load)
- (message "Couldn't compile %s" el-src)))))))
- (dolist (f (directory-files dir t))
- (when (file-directory-p f)
- ;; Fix-me: Avoid some dirs
- (let ((name (file-name-nondirectory f)))
- (unless (member name nxhtmlmaint-nonbyte-compile-dirs)
- (nxhtmlmaint-byte-compile-dir f force del-elc load))))))
-
-(provide 'nxhtmlmaint)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtmlmaint.el ends here
diff --git a/emacs.d/nxhtml/related/blank.html b/emacs.d/nxhtml/related/blank.html
deleted file mode 100644
index f8b6c17..0000000
--- a/emacs.d/nxhtml/related/blank.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
- <head>
- </head>
- <body>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/related/csharp-mode.el b/emacs.d/nxhtml/related/csharp-mode.el
deleted file mode 100644
index 9cd7914..0000000
--- a/emacs.d/nxhtml/related/csharp-mode.el
+++ /dev/null
@@ -1,1977 +0,0 @@
-;;; csharp-mode.el --- C# mode derived mode
-
-;; Author: Dylan R. E. Moonfire
-;; Maintainer: Dylan R. E. Moonfire <contact@mfgames.com>
-;; Created: Feburary 2005
-;; Modified: February 2010
-;; Version: 0.7.4 - Dino Chiesa <dpchiesa@hotmail.com>
-;; Keywords: c# languages oop mode
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-;;
-;; This is a separate mode to implement the C# constructs and
-;; font-locking. It is based on the java-mode example from cc-mode.
-;;
-;; csharp-mode requires CC Mode 5.30 or later. It works with
-;; cc-mode 5.31.3, which is current at this time.
-;;
-;; Features:
-;;
-;; - font-lock and indent of C# syntax including:
-;; all c# keywords and major syntax
-;; attributes that decorate methods, classes, fields, properties
-;; enum types
-;; #if/#endif #region/#endregion
-;; instance initializers
-;; anonymous functions and methods
-;; verbatim literal strings (those that begin with @)
-;; generics
-;;
-;; - automagic code-doc generation when you type three slashes.
-;;
-;; - intelligent inserttion of matched pairs of curly braces.
-;;
-;; - sets the compiler regex for next-error, for csc.exe output.
-;;
-;;
-
-
-;;; To use:
-;;
-;; put this in your .emacs:
-;;
-;; (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
-;;
-;; or:
-;;
-;; (require 'csharp-mode)
-;;
-;;
-;; AND:
-;;
-;; (setq auto-mode-alist
-;; (append '(("\\.cs$" . csharp-mode)) auto-mode-alist))
-;; (defun my-csharp-mode-fn ()
-;; "function that runs when csharp-mode is initialized for a buffer."
-;; ...insert your code here...
-;; ...most commonly, your custom key bindings ...
-;; )
-;; (add-hook 'csharp-mode-hook 'my-csharp-mode-fn t)
-;;
-;;
-
-
-;;; Bugs:
-;;
-;; Namespaces in the using statements are not fontified. Should do in
-;; c-basic-matchers-before or c-basic-matchers-after.
-;;
-;; Method names with a preceding attribute are not fontified.
-;;
-;; Field/Prop names inside object initializers are fontified only
-;; if the null constructor is used, with no parens.
-;;
-;; This code doesn't seem to work when you compile it, then
-;; load/require in the emacs file. You will get an error (error
-;; "`c-lang-defconst' must be used in a file") which happens because
-;; cc-mode doesn't think it is in a buffer while loading directly
-;; from the init. However, if you call it based on a file extension,
-;; it works properly. Interestingly enough, this doesn't happen if
-;; you don't byte-compile cc-mode.
-;;
-;;
-;;
-;; Todo:
-;;
-;; Get csharp-mode.el accepted as part of the emacs standard distribution.
-;; Must contact monnier at iro.umontreal.ca to make this happen.
-;;
-;;
-;;
-;; Acknowledgements:
-;;
-;; Thanks to Alan Mackenzie and Stefan Monnier for answering questions
-;; and making suggestions.
-;;
-;;
-
-;;; Versions:
-;;
-;; 0.1.0 - Initial release.
-;; 0.2.0 - Fixed the identification on the "enum" keyword.
-;; - Fixed the font-lock on the "base" keyword
-;; 0.3.0 - Added a regex to fontify attributes. It isn't the
-;; the best method, but it handles single-like attributes
-;; well.
-;; - Got "super" not to fontify as a keyword.
-;; - Got extending classes and interfaces to fontify as something.
-;; 0.4.0 - Removed the attribute matching because it broke more than
-;; it fixed.
-;; - Corrected a bug with namespace not being properly identified
-;; and treating the class level as an inner object, which screwed
-;; up formatting.
-;; - Added "partial" to the keywords.
-;; 0.5.0 - Found bugs with compiled cc-mode and loading from init files.
-;; - Updated the eval-when-compile to code to let the mode be
-;; compiled.
-;; 0.6.0 - Added the c-filter-ops patch for 5.31.1 which made that
-;; function in cc-langs.el unavailable.
-;; - Added a csharp-lineup-region for indention #region and
-;; #endregion block differently.
-;; 0.7.0 - Added autoload so update-directory-autoloads works
-;; (Thank you, Nikolaj Schumacher)
-;; - Fontified the entire #region and #endregion lines.
-;; - Initial work to get get, set, add, remove font-locked.
-;; 0.7.1 - Added option to indent #if/endif with code
-;; - Fixed c-opt-cpp-prefix defn (it must not include the BOL
-;; char (^).
-;; - proper fontification and indent of classes that inherit
-;; (previously the colon was confusing the parser)
-;; - reclassified namespace as a block beginner
-;; - removed $ as a legal symbol char - not legal in C#.
-;; - added struct to c-class-decl-kwds so indent is correct
-;; within a struct.
-;; 0.7.2 - Added automatic codedoc insertion.
-;; 0.7.3 - Instance initializers (new Type { ... } ) and
-;; (new Type() { ...} ) are now indented properly.
-;; - proper fontification and indent of enums as brace-list-*,
-;; including special treatment for enums that explicitly
-;; inherit from an int type. Previously the colon was
-;; confusing the parser.
-;; - proper fontification of verbatim literal strings,
-;; including those that end in slash. This edge case was not
-;; handled at all before; it is now handled correctly.
-;; - code cleanup and organization; removed the linefeed.
-;; - intelligent curly-brace insertion
-;; 0.7.4 - added a C# style
-;; - using is now a keyword and gets fontified
-;; - fixed a bug that had crept into the codedoc insertion
-;;
-
-
-(require 'cc-mode)
-
-(message (concat "Loading " load-file-name))
-
-
-;; ==================================================================
-;; c# upfront stuff
-;; ==================================================================
-
-;; This is a copy of the function in cc-mode which is used to handle
-;; the eval-when-compile which is needed during other times.
-(defun c-filter-ops (ops opgroup-filter op-filter &optional xlate)
- ;; See cc-langs.el, a direct copy.
- (unless (listp (car-safe ops))
- (setq ops (list ops)))
- (cond ((eq opgroup-filter t)
- (setq opgroup-filter (lambda (opgroup) t)))
- ((not (functionp opgroup-filter))
- (setq opgroup-filter `(lambda (opgroup)
- (memq opgroup ',opgroup-filter)))))
- (cond ((eq op-filter t)
- (setq op-filter (lambda (op) t)))
- ((stringp op-filter)
- (setq op-filter `(lambda (op)
- (string-match ,op-filter op)))))
- (unless xlate
- (setq xlate 'identity))
- (c-with-syntax-table (c-lang-const c-mode-syntax-table)
- (delete-duplicates
- (mapcan (lambda (opgroup)
- (when (if (symbolp (car opgroup))
- (when (funcall opgroup-filter (car opgroup))
- (setq opgroup (cdr opgroup))
- t)
- t)
- (mapcan (lambda (op)
- (when (funcall op-filter op)
- (let ((res (funcall xlate op)))
- (if (listp res) res (list res)))))
- opgroup)))
- ops)
- :test 'equal)))
-
-
-
-;; These are only required at compile time to get the sources for the
-;; language constants. (The cc-fonts require and the font-lock
-;; related constants could additionally be put inside an
-;; (eval-after-load "font-lock" ...) but then some trickery is
-;; necessary to get them compiled.)
-(eval-when-compile
- (let ((load-path
- (if (and (boundp 'byte-compile-dest-file)
- (stringp byte-compile-dest-file))
- (cons (file-name-directory byte-compile-dest-file) load-path)
- load-path)))
- (load "cc-mode" nil t)
- (load "cc-fonts" nil t)
- (load "cc-langs" nil t)))
-
-(eval-and-compile
- ;; Make our mode known to the language constant system. Use Java
- ;; mode as the fallback for the constants we don't change here.
- ;; This needs to be done also at compile time since the language
- ;; constants are evaluated then.
- (c-add-language 'csharp-mode 'java-mode))
-
-;; ==================================================================
-;; end of c# upfront stuff
-;; ==================================================================
-
-
-
-
-
-;; ==================================================================
-;; csharp-mode utility and feature defuns
-;; ==================================================================
-
-;; Indention: csharp-mode follows normal indention rules except for
-;; when indenting the #region and #endregion blocks. This function
-;; defines a custom indention to indent the #region blocks properly
-;;
-
-(defun csharp-lineup-region (langelem)
- "Indent all #region and #endregion blocks inline with code while
-retaining normal column-zero indention for #if and the other
-processing blocks.
-
-To use this indenting just put the following in your emacs file:
- (c-set-offset 'cpp-macro 'csharp-lineup-region)
-
-An alternative is to use `csharp-lineup-if-and-region'.
-"
-
- (save-excursion
- (back-to-indentation)
- (if (re-search-forward "#\\(end\\)?region" (c-point 'eol) [0]) 0 [0])))
-
-
-
-(defun csharp-lineup-if-and-region (langelem)
-
-"Indent all #region/endregion blocks and #if/endif blocks inline
-with code while retaining normal column-zero indention for any
-other processing blocks.
-
-To use this indenting just put the following in your emacs file:
- (c-set-offset 'cpp-macro 'csharp-lineup-if-and-region)
-
-Another option is to use `csharp-lineup-region'.
-
-"
- (save-excursion
- (back-to-indentation)
- (if (re-search-forward "#\\(\\(end\\)?\\(if\\|region\\)\\|else\\)" (c-point 'eol) [0]) 0 [0])))
-
-
-
-
-
-(defun csharp-insert-open-brace ()
- "Intelligently insert a pair of curly braces. This fn is most
-often bound to the open-curly brace, with
-
- (local-set-key (kbd \"{\") 'csharp-insert-open-brace)
-
-The default binding for an open curly brace in cc-modes is often
-`c-electric-brace' or `skeleton-pair-insert-maybe'. The former
-can be configured to insert newlines around braces in various
-syntactic positions. The latter inserts a pair of braces and
-then does not insert a newline, and does not indent.
-
-This fn provides another option, with some additional
-intelligence for csharp-mode. When you type an open curly, the
-appropriate pair of braces appears, with spacing and indent set
-in a context-sensitive manner.
-
-Within a string literal, you just get a pair of braces, and point
-is set between them. Following an equals sign, you get a pair of
-braces, with a semincolon appended. Otherwise, you
-get the open brace on a new line, with the closing brace on the
-line following.
-
-There may be another way to get this to happen appropriately just within emacs,
-but I could not figure out how to do it. So I wrote this alternative.
-"
- (interactive)
- (let
- (tpoint
- (in-string (string= (csharp-in-literal) "string"))
- (preceding3
- (save-excursion
- (and
- (skip-chars-backward " ")
- (> (- (point) 2) (point-min))
- (buffer-substring-no-properties (point) (- (point) 3)))))
- (one-word-back
- (save-excursion
- (backward-word 2)
- (thing-at-point 'word))))
-
- (cond
-
- ;; Case 1: inside a string literal?
- ;; --------------------------------------------
- ;; If so, then just insert a pair of braces and put the point
- ;; between them. The most common case is a format string for
- ;; String.Format() or Console.WriteLine().
- (in-string
- (self-insert-command 1)
- (insert "}")
- (backward-char))
-
- ;; Case 2: the open brace starts an array initializer.
- ;; --------------------------------------------
- ;; When the last non-space was an equals sign or square brackets,
- ;; then it's an initializer.
- ((save-excursion
- (backward-sexp)
- (looking-at "\\(\\w+\\b *=\\|[[]]+\\)"))
- (self-insert-command 1)
- (insert " };")
- (backward-char 3))
-
- ;; Case 3: the open brace starts an instance initializer
- ;; --------------------------------------------
- ;; If one-word-back was "new", then it's an object initializer.
- ((string= one-word-back "new")
- (save-excursion
- (message "object initializer")
- (setq tpoint (point)) ;; prepare to indent-region later
- (newline)
- (self-insert-command 1)
- (newline-and-indent)
- (newline)
- (insert "};")
- (c-indent-region tpoint (point))
- (previous-line)
- (indent-according-to-mode)
- (end-of-line)
- (setq tpoint (point)))
- (goto-char tpoint))
-
- ;; Case 4: a lambda initialier.
- ;; --------------------------------------------
- ;; If the open curly follows =>, then it's a lambda initializer.
- ((string= (substring preceding3 -2) "=>")
- (message "lambda init")
- (self-insert-command 1)
- (insert " }")
- (backward-char 2))
-
- ;; else, it's a new scope. (if, while, class, etc)
- (t
- (save-excursion
- (message "new scope")
- (set-mark (point)) ;; prepare to indent-region later
- ;; check if the prior sexp is on the same line
- (if (save-excursion
- (let ((curline (line-number-at-pos))
- (aftline (progn
- (backward-sexp)
- (line-number-at-pos))))
- (= curline aftline)))
- (newline-and-indent))
- (self-insert-command 1)
- (c-indent-line-or-region)
- (end-of-line)
- (newline)
- (insert "}")
- ;;(c-indent-command) ;; not sure of the difference here
- (c-indent-line-or-region)
- (previous-line)
- (end-of-line)
- (newline-and-indent)
- ;; point ends up on an empty line, within the braces, properly indented
- (setq tpoint (point)))
-
- (goto-char tpoint)))))
-
-
-
-
-;; ==================================================================
-;; end of csharp-mode utility and feature defuns
-;; ==================================================================
-
-
-
-
-
-
-;; ==================================================================
-;; c# values for "language constants" defined in cc-langs.el
-;; ==================================================================
-
-
-;; Java uses a series of regexes to change the font-lock for class
-;; references. The problem comes in because Java uses Pascal (leading
-;; space in names, SomeClass) for class and package names, but
-;; Camel-casing (initial lowercase, upper case in words,
-;; i.e. someVariable) for variables. The notation suggested by EMCA for C# is
-;; to use Pascal notation for everything, except inner variables. So,
-;; the Java regex and formatting produces very wrong results in C#.
-;;(error (byte-compile-dest-file))
-;;(error (c-get-current-file))
-(c-lang-defconst c-opt-after-id-concat-key
- csharp (if (c-lang-const c-opt-identifier-concat-key)
- (c-lang-const c-symbol-start)))
-
-(c-lang-defconst c-basic-matchers-before
- csharp `(
- ;;;; Font-lock the attributes by searching for the
- ;;;; appropriate regex and marking it as TODO.
- ;;,`(,(concat "\\(" csharp-attribute-regex "\\)")
- ;; 0 font-lock-function-name-face)
-
- ;; Put a warning face on the opener of unclosed strings that
- ;; can't span lines. Later font
- ;; lock packages have a `font-lock-syntactic-face-function' for
- ;; this, but it doesn't give the control we want since any
- ;; fontification done inside the function will be
- ;; unconditionally overridden.
- ,(c-make-font-lock-search-function
- ;; Match a char before the string starter to make
- ;; `c-skip-comments-and-strings' work correctly.
- (concat ".\\(" c-string-limit-regexp "\\)")
- '((c-font-lock-invalid-string)))
-
- ;; Fontify keyword constants.
- ,@(when (c-lang-const c-constant-kwds)
- (let ((re (c-make-keywords-re nil
- (c-lang-const c-constant-kwds))))
- `((eval . (list ,(concat "\\<\\(" re "\\)\\>")
- 1 c-constant-face-name)))))
-
- ;; Fontify all keywords except the primitive types.
- ,`(,(concat "\\<" (c-lang-const c-regular-keywords-regexp))
- 1 font-lock-keyword-face)
-
- ;; Fontify leading identifiers in fully qualified names like
- ;; "Foo.Bar".
- ,@(when (c-lang-const c-opt-identifier-concat-key)
- `((,(byte-compile
- `(lambda (limit)
- (while (re-search-forward
- ,(concat "\\(\\<" ; 1
- "\\(" (c-lang-const c-symbol-key)
- "\\)" ; 2
- "[ \t\n\r\f\v]*"
- (c-lang-const
- c-opt-identifier-concat-key)
- "[ \t\n\r\f\v]*"
- "\\)"
- "\\("
- (c-lang-const
- c-opt-after-id-concat-key)
- "\\)")
- limit t)
- (unless (progn
- (goto-char (match-beginning 0))
- (c-skip-comments-and-strings limit))
- (or (get-text-property (match-beginning 2) 'face)
- (c-put-font-lock-face (match-beginning 2)
- (match-end 2)
- c-reference-face-name))
- (goto-char (match-end 1)))))))))
- ))
-
-
-
-;; C# does not allow a leading qualifier operator. It also doesn't
-;; allow the ".*" construct of Java. So, we redo this regex without
-;; the "\\|\\*" regex.
-(c-lang-defconst c-identifier-key
- csharp (concat "\\(" (c-lang-const c-symbol-key) "\\)" ; 1
- (concat "\\("
- "[ \t\n\r\f\v]*"
- (c-lang-const c-opt-identifier-concat-key)
- "[ \t\n\r\f\v]*"
- (concat "\\("
- "\\(" (c-lang-const c-symbol-key) "\\)"
- "\\)")
- "\\)*")))
-
-;; C# has a few rules that are slightly different than Java for
-;; operators. This also removed the Java's "super" and replaces it
-;; with the C#'s "base".
-(c-lang-defconst c-operators
- csharp `((prefix "base")))
-
-
-;; C# uses CPP-like prefixes to mark #define, #region/endregion,
-;; #if/else/endif, and #pragma. This regexp matches the prefix,
-;; not including the beginning-of-line (BOL), and not including
-;; the term after the prefix (define, pragma, etc). This regexp says
-;; whitespace, followed by the prefix, followed by maybe more whitespace.
-
-(c-lang-defconst c-opt-cpp-prefix
- csharp "\\s *#\\s *")
-
-
-;; there are no message directives in C#
-(c-lang-defconst c-cpp-message-directives
- csharp nil)
-
-(c-lang-defconst c-cpp-expr-directives
- csharp '("if"))
-
-(c-lang-defconst c-opt-cpp-macro-define
- csharp "define")
-
-;; $ is not a legal char in an identifier in C#. So we need to
-;; create a csharp-specific definition of this constant.
-(c-lang-defconst c-symbol-chars
- csharp (concat c-alnum "_"))
-
-
-(c-lang-defconst c-colon-type-list-kwds
- csharp '("class"))
-
-(c-lang-defconst c-block-prefix-disallowed-chars
-
- ;; Allow ':' for inherit list starters.
- csharp (set-difference (c-lang-const c-block-prefix-disallowed-chars)
- '(?: ?,)))
-
-
-(c-lang-defconst c-assignment-operators
- csharp '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|="))
-
-(c-lang-defconst c-primitive-type-kwds
- ;; ECMA-344, S8
- csharp '("object" "string" "sbyte" "short" "int" "long" "byte"
- "ushort" "uint" "ulong" "float" "double" "bool" "char"
- "decimal" "void"))
-
-;; The keywords that define that the following is a type, such as a
-;; class definition.
-(c-lang-defconst c-type-prefix-kwds
- ;; ECMA-344, S?
- csharp '("class" "interface" "struct")) ;; no enum here.
- ;; we want enum to be a brace list.
-
-
-;; Type modifier keywords. They appear anywhere in types, but modify
-;; instead of create one.
-(c-lang-defconst c-type-modifier-kwds
- ;; EMCA-344, S?
- csharp '("readonly" "const"))
-
-
-;; Tue, 20 Apr 2010 16:02
-;; need to vverify that this works for lambdas...
-(c-lang-defconst c-special-brace-lists
- csharp '((?{ . ?}) ))
-
-
-
-;; dinoch
-;; Thu, 22 Apr 2010 18:54
-;;
-;; No idea why this isn't getting set properly in the first place.
-;; In cc-langs.el, it is set to the union of a bunch of things, none
-;; of which include "new", or "enum".
-;;
-;; But somehow both of those show up in the resulting derived regexp.
-;; This breaks indentation of instance initializers, such as
-;;
-;; var x = new Foo { ... };
-;;
-;; Based on my inspection, the existing c-lang-defconst should work!
-;; I don't know how to fix this c-lang-defconst, so I am re-setting this
-;; variable here, to provide the regex explicitly.
-;;
-(c-lang-defconst c-decl-block-key
-
- csharp '"\\(namespace\\)\\([^[:alnum:]_]\\|$\\)\\|\\(class\\|interface\\|struct\\)\\([^[:alnum:]_]\\|$\\)"
- )
-
-
-
-;; Thu, 22 Apr 2010 14:29
-;; I want this to handle var x = new Foo[] { ... };
-;; not sure if necessary.
-(c-lang-defconst c-inexpr-brace-list-kwds
- csharp '("new"))
-
-
-;; ;;(c-lang-defconst c-inexpr-class-kwds
-;; ;; csharp '("new"))
-
-
-
-(c-lang-defconst c-class-decl-kwds
- ;; EMCA-344, S?
- csharp '("class" "interface" "struct" )) ;; no "enum"!!
-
-
-;; The various modifiers used for class and method descriptions.
-(c-lang-defconst c-modifier-kwds
- csharp '("public" "partial" "private" "const" "abstract"
- "protected" "ref" "out" "static" "virtual"
- "override" "params" "internal"))
-
-
-;; Thu, 22 Apr 2010 23:02
-;; Based on inspection of the cc-mode code, the c-protection-kwds
-;; c-lang-const is used only for objective-c. So the value is
-;; irrelevant for csharp.
-(c-lang-defconst c-protection-kwds
- csharp nil
- ;; csharp '("private" "protected" "public" "internal")
-)
-
-
-;; Define the keywords that can have something following after them.
-(c-lang-defconst c-type-list-kwds
- csharp '("struct" "class" "interface" "is" "as"
- "delegate" "event" "set" "get" "add" "remove"))
-
-
-;; This allows the classes after the : in the class declartion to be
-;; fontified.
-(c-lang-defconst c-typeless-decl-kwds
- csharp '(":"))
-
-;; Sets up the enum to handle the list properly, and also the new
-;; keyword to handle object initializers. This requires a modified
-;; c-basic-matchers-after (see above) in order to correctly fontify C#
-;; 3.0 object initializers.
-(c-lang-defconst c-brace-list-decl-kwds
- csharp '("enum" "new"))
-
-
-;; Statement keywords followed directly by a substatement.
-;; catch is not one of them.
-(c-lang-defconst c-block-stmt-1-kwds
- csharp '("do" "try" "finally"))
-
-
-;; Statement keywords followed by a paren sexp and then by a substatement.
-(c-lang-defconst c-block-stmt-2-kwds
- csharp '("for" "if" "switch" "while" "catch" "foreach" "using"
- "checked" "unchecked" "lock"))
-
-
-;; Statements that break out of braces
-(c-lang-defconst c-simple-stmt-kwds
- csharp '("return" "continue" "break" "throw" "goto" ))
-
-;; Statements that allow a label
-;; TODO?
-(c-lang-defconst c-before-label-kwds
- csharp nil)
-
-;; Constant keywords
-(c-lang-defconst c-constant-kwds
- csharp '("true" "false" "null"))
-
-;; Keywords that start "primary expressions."
-(c-lang-defconst c-primary-expr-kwds
- csharp '("this" "base"))
-
-;; Treat namespace as an outer block so class indenting
-;; works properly.
-(c-lang-defconst c-other-block-decl-kwds
- csharp '("namespace"))
-
-(c-lang-defconst c-other-kwds
- csharp '("in" "sizeof" "typeof" "is" "as" "yield"
- "where" "select" "from"))
-
-(c-lang-defconst c-overloadable-operators
- ;; EMCA-344, S14.2.1
- csharp '("+" "-" "*" "/" "%" "&" "|" "^"
- "<<" ">>" "==" "!=" ">" "<" ">=" "<="))
-
-
-;; This c-cpp-matchers stuff is used for fontification.
-;; see cc-font.el
-;;
-
-;; There's no preprocessor in C#, but there are still compiler
-;; directives to fontify: "#pragma", #region/endregion, #define, #undef,
-;; #if/else/endif. (The definitions for the extra keywords above are
-;; enough to incorporate them into the fontification regexps for types
-;; and keywords, so no additional font-lock patterns are required for
-;; keywords.)
-
-(c-lang-defconst c-cpp-matchers
- csharp (cons
- ;; Use the eval form for `font-lock-keywords' to be able to use
- ;; the `c-preprocessor-face-name' variable that maps to a
- ;; suitable face depending on the (X)Emacs version.
- '(eval . (list "^\\s *\\(#pragma\\|undef\\|define\\)\\>\\(.*\\)"
- (list 1 c-preprocessor-face-name)
- '(2 font-lock-string-face)))
- ;; There are some other things in `c-cpp-matchers' besides the
- ;; preprocessor support, so include it.
- (c-lang-const c-cpp-matchers)))
-
-(defcustom csharp-font-lock-extra-types nil
- "*List of extra types (aside from the type keywords) to recognize in C# mode.
-Each list item should be a regexp matching a single identifier."
- :type 'list :group 'csharp)
-
-(defconst csharp-font-lock-keywords-1 (c-lang-const c-matchers-1 csharp)
- "Minimal highlighting for C# mode.")
-
-(defconst csharp-font-lock-keywords-2 (c-lang-const c-matchers-2 csharp)
- "Fast normal highlighting for C# mode.")
-
-(defconst csharp-font-lock-keywords-3 (c-lang-const c-matchers-3 csharp)
- "Accurate normal highlighting for C# mode.")
-
-(defvar csharp-font-lock-keywords csharp-font-lock-keywords-3
- "Default expressions to highlight in C# mode.")
-
-(defvar csharp-mode-syntax-table nil
- "Syntax table used in csharp-mode buffers.")
-(or csharp-mode-syntax-table
- (setq csharp-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table csharp))))
-
-(defvar csharp-mode-abbrev-table nil
- "Abbreviation table used in csharp-mode buffers.")
-(c-define-abbrev-table 'csharp-mode-abbrev-table
- ;; Keywords that if they occur first on a line might alter the
- ;; syntactic context, and which therefore should trig reindentation
- ;; when they are completed.
- '(("else" "else" c-electric-continued-statement 0)
- ("while" "while" c-electric-continued-statement 0)
- ("catch" "catch" c-electric-continued-statement 0)
- ("finally" "finally" c-electric-continued-statement 0)))
-
-(defvar csharp-mode-map (let ((map (c-make-inherited-keymap)))
- ;; Add bindings which are only useful for C#
- map)
- "Keymap used in csharp-mode buffers.")
-
-
-;; TODO
-;; Defines our constant for finding attributes.
-;;(defconst csharp-attribute-regex "\\[\\([XmlType]+\\)(")
-;;(defconst csharp-attribute-regex "\\[\\(.\\)")
-;; This doesn't work because the string regex happens before this point
-;; and getting the font-locking to work before and after is fairly difficult
-;;(defconst csharp-attribute-regex
-;; (concat
-;; "\\[[a-zA-Z][ \ta-zA-Z0-9.]+"
-;; "\\((.*\\)?"
-;;))
-
-
-;; ==================================================================
-;; end of c# values for "language constants" defined in cc-langs.el
-;; ==================================================================
-
-
-
-
-;; ==================================================================
-;; C# code-doc insertion magic
-;; ==================================================================
-;;
-;; In Visual Studio, if you type three slashes, it immediately expands into
-;; an inline code-documentation fragment. The following method does the
-;; same thing.
-;;
-;; This is the kind of thing that could be handled by YASnippet or
-;; another similarly flexible snippet framework. But I don't want to
-;; introduce a dependency on yasnippet to csharp-mode. So the capability
-;; must live within csharp-mode itself.
-
-(defun csharp-maybe-insert-codedoc (arg)
-
- "Insert an xml code documentation template as appropriate, when
-typing slashes. This fn gets bound to / (the slash key), in
-csharp-mode. If the slash being inserted is not the third
-consecutive slash, the slash is inserted as normal. If it is the
-third consecutive slash, then a xml code documentation template
-may be inserted in some cases. For example,
-
- a <summary> template is inserted if the prior line is empty,
- or contains only an open curly brace;
- a <remarks> template is inserted if the prior word
- closes the <summary> element;
- a <returns> template is inserted if the prior word
- closes the <remarks> element;
- an <example> template is inserted if the prior word closes
- the <returns> element;
- a <para> template is inserted if the prior word closes
- a <para> element.
-
-In all other cases the slash is inserted as normal.
-
-If you want the default cc-mode behavior, which implies no automatic
-insertion of xml code documentation templates, then use this in
-your `csharp-mode-hook' function:
-
- (local-set-key (kbd \"/\") 'c-electric-slash)
-
- "
- (interactive "*p")
- ;;(message "csharp-maybe-insert-codedoc")
- (let (
- (cur-point (point))
- (char last-command-char)
- (cb0 (char-before (- (point) 0)))
- (cb1 (char-before (- (point) 1)))
- is-first-non-whitespace
- did-auto-insert
- )
-
- ;; check if two prior chars were slash
- (if (and
- (= char ?/)
- cb0 (= ?/ cb0)
- cb1 (= ?/ cb1)
- )
-
- (progn
- ;;(message "yes - this is the third consecutive slash")
- (setq is-first-non-whitespace
- (save-excursion
- (back-to-indentation)
- (= cur-point (+ (point) 2))))
-
- (if is-first-non-whitespace
- ;; This is a 3-slash sequence. It is the first non-whitespace text
- ;; on the line. Now we need to examine the surrounding context
- ;; in order to determine which xml cod doc template to insert.
- (let (word-back char0 char1
- word-fore char-0 char-1
- text-to-insert ;; text to insert in lieu of slash
- fn-to-call ;; func to call after inserting text
- (preceding-line-is-empty (or
- (= (line-number-at-pos) 1)
- (save-excursion
- (previous-line)
- (beginning-of-line)
- (looking-at "[ \t]*$\\|[ \t]*{[ \t]*$"))))
- (flavor 0) ;; used only for diagnostic purposes
- )
-
- ;;(message "starting a 3-slash comment")
- ;; get the prior word, and the 2 chars preceding it.
- (backward-word)
-
- (setq word-back (thing-at-point 'word)
- char0 (char-before (- (point) 0))
- char1 (char-before (- (point) 1)))
-
- ;; restore prior position
- (goto-char cur-point)
-
- ;; get the following word, and the 2 chars preceding it.
- (forward-word)
- (backward-word)
- (setq word-fore (thing-at-point 'word)
- char-0 (char-before (- (point) 0))
- char-1 (char-before (- (point) 1)))
-
- ;; restore prior position again
- (goto-char cur-point)
-
- (cond
- ;; The preceding line is empty, or all whitespace, or
- ;; contains only an open-curly. In this case, insert a
- ;; summary element pair.
- (preceding-line-is-empty
- (setq text-to-insert "/ <summary>\n/// \n/// </summary>"
- flavor 1) )
-
- ;; The preceding word closed a summary element. In this case,
- ;; if the forward word does not open a remarks element, then
- ;; insert a remarks element.
- ((and (string-equal word-back "summary") (eq char0 ?/) (eq char1 ?<))
- (if (not (and (string-equal word-fore "remarks") (eq char-0 ?<)))
- (setq text-to-insert "/ <remarks>\n/// <para>\n/// \n/// </para>\n/// </remarks>"
- flavor 2)))
-
- ;; The preceding word closed the remarks section. In this case,
- ;; insert an example element.
- ((and (string-equal word-back "remarks") (eq char0 ?/) (eq char1 ?<))
- (setq text-to-insert "/ <example>\n/// \n/// </example>"
- flavor 3))
-
- ;; The preceding word closed the example section. In this
- ;; case, insert an returns element. This isn't always
- ;; correct, because sometimes the xml code doc is attached to
- ;; a class or a property, neither of which has a return
- ;; value. A more intelligent implementation would inspect the
- ;; syntax state and only inject a returns element if
- ;; appropriate.
- ((and (string-equal word-back "example") (eq char0 ?/) (eq char1 ?<))
- (setq text-to-insert "/ <returns></returns>"
- fn-to-call (lambda ()
- (backward-word)
- (backward-char)
- (backward-char)
- (c-indent-line-or-region)
- )
- flavor 4))
-
- ;; The preceding word opened the remarks section, or it
- ;; closed a para section. In this case, insert a para
- ;; element, using appropriate indentation with respect to the
- ;; prior tag.
- ((or
- (and (string-equal word-back "remarks") (eq char0 ?<) (or (eq char1 32) (eq char1 9)))
- (and (string-equal word-back "para") (eq char0 ?/) (eq char1 ?<)))
-
- (let (prior-point spacer)
- (save-excursion
- (backward-word)
- (backward-char)
- (backward-char)
- (setq prior-point (point))
- (skip-chars-backward "\t ")
- (setq spacer (buffer-substring (point) prior-point))
- ;;(message (format "pt(%d) prior(%d) spacer(%s)" (point) prior-point spacer))
- )
-
- (if (string-equal word-back "remarks")
- (setq spacer (concat spacer " ")))
-
- (setq text-to-insert (format "/%s<para>\n///%s \n///%s</para>"
- spacer spacer spacer)
- flavor 6)))
-
- ;; The preceding word opened a para element. In this case, if
- ;; the forward word does not close the para element, then
- ;; close the para element.
- ;; --
- ;; This is a nice idea but flawed. Suppose I have a para element with some
- ;; text in it. If I position the cursor at the first line, then type 3 slashes,
- ;; I get a close-element, and that would be inappropriate. Not sure I can
- ;; easily solve that problem, so the best thing might be to simply punt, and
- ;; require people to close their own elements.
- ;;
- ;; ( (and (string-equal word-back "para") (eq char0 60) (or (eq char1 32) (eq char1 9)))
- ;; (if (not (and (string-equal word-fore "para") (eq char-0 47) (eq char-1 60) ))
- ;; (setq text-to-insert "/ \n/// </para>\n///"
- ;; fn-to-call (lambda ()
- ;; (previous-line)
- ;; (end-of-line)
- ;; )
- ;; flavor 7) )
- ;; )
-
- ;; the default case - do nothing
- (t nil))
-
- (if text-to-insert
- (progn
- ;;(message (format "inserting special text (f(%d))" flavor))
-
- ;; set the flag, that we actually inserted text
- (setq did-auto-insert t)
-
- ;; save point of beginning of insertion
- (setq cur-point (point))
-
- ;; actually insert the text
- (insert text-to-insert)
-
- ;; indent the inserted string, and re-position point, either through
- ;; the case-specific fn, or via the default progn.
- (if fn-to-call
- (funcall fn-to-call)
-
- (let ((newline-count 0) (pos 0) ix)
-
- ;; count the number of newlines in the inserted string
- (while (string-match "\n" text-to-insert pos)
- (setq pos (match-end 0)
- newline-count (+ newline-count 1) )
- )
-
- ;; indent what we just inserted
- (c-indent-region cur-point (point) t)
-
- ;; move up n/2 lines. This assumes that the
- ;; inserted text is ~symmetric about the halfway point.
- ;; The assumption holds if the xml code doc uses a
- ;; begin-elt and end-elt on a new line all by themselves,
- ;; and a blank line in between them where the point should be.
- ;; A more intelligent implementation would use a specific
- ;; marker string, like @@DOT, to note the desired point.
- (previous-line (/ newline-count 2))
- (end-of-line)))))))))
-
- (if (not did-auto-insert)
- (self-insert-command (prefix-numeric-value arg)))))
-
-;; ==================================================================
-;; end of c# code-doc insertion magic
-;; ==================================================================
-
-
-
-
-;; ==================================================================
-;; c# fontification extensions
-;; ==================================================================
-;; Commentary:
-;;
-;; The purpose of the following code is to fix font-lock for C#,
-;; specifically for the verbatim-literal strings. C# is a cc-mode
-;; language and strings are handled mostly like other c-based
-;; languages. The one exception is the verbatim-literal string, which
-;; uses the syntax @"...".
-;;
-;; `parse-partial-sexp' treats those strings as just regular strings,
-;; with the @ a non-string character. This is fine, except when the
-;; verblit string ends in a slash, in which case, font-lock breaks from
-;; that point onward in the buffer.
-;;
-;; This is an attempt to fix that.
-;;
-;; The idea is to scan the buffer in full for verblit strings, and apply the
-;; appropriate syntax-table text properties for verblit strings. Also setting
-;; `parse-sexp-lookup-properties' to t tells `parse-partial-sexp'
-;; to use the syntax-table text properties set up by the scan as it does
-;; its parse.
-;;
-;; Also need to re-scan after any changes in the buffer, but on a more
-;; limited region.
-;;
-
-
-;; ;; I don't remember what this is supposed to do,
-;; ;; or how I figured out the value.
-;; ;;
-;; (defconst csharp-font-lock-syntactic-keywords
-;; '(("\\(@\\)\\(\"\\)[^\"]*\\(\"\\)\\(\"\\)[^\"]*\\(\"\\)[^\"]"
-;; (1 '(6)) (2 '(7)) (3 '(1)) (4 '(1)) (5 '(7))
-;; ))
-;; "Highlighting of verbatim literal strings. See also the variable
-;; `font-lock-keywords'.")
-
-
-
-;; Allow this:
-;; (csharp-log 3 "csharp: scan...'%s'" state)
-
-(defvar csharp-log-level 0
- "The current log level for CSharp-specific operations.
-This is used in particular by the verbatim-literal
-string scanning.
-
-Most other csharp functions are not instrumented.
-0 = NONE, 1 = Info, 2 = VERBOSE, 3 = DEBUG, 4 = SHUTUP ALREADY. ")
-
-(defun csharp-log (level text &rest args)
- "Log a message at level LEVEL.
-If LEVEL is higher than `csharp-log-level', the message is
-ignored. Otherwise, it is printed using `message'.
-TEXT is a format control string, and the remaining arguments ARGS
-are the string substitutions (see `format')."
- (if (<= level csharp-log-level)
- (let* ((msg (apply 'format text args)))
- (message "%s" msg)
- )))
-
-
-
-(defun csharp-max-beginning-of-stmt ()
- "Return the greater of `c-beginning-of-statement-1' and
-`c-beginning-of-statement' . I don't understand why both of
-these methods are necessary or why they differ. But they do."
-
- (let (dash
- nodash
- (curpos (point)))
-
- ;; I think this may need a save-excursion...
- ;; Calling c-beginning-of-statement-1 resets the point!
-
- (setq dash (progn (c-beginning-of-statement-1) (point)))
- (csharp-log 3 "C#: max-bostmt dash(%d)" dash)
- (goto-char curpos)
-
- (setq nodash (progn (c-beginning-of-statement 1) (point)))
- (csharp-log 3 "C#: max-bostmt nodash(%d)" nodash)
- (goto-char curpos)
-
- (max dash nodash)))
-
-
-(defun csharp-in-literal (&optional lim detect-cpp)
- "Return the type of literal point is in, if any.
-Basically this works like `c-in-literal' except it doesn't
-use or fill the cache (`c-in-literal-cache').
-
-The return value is `c' if in a C-style comment, `c++' if in a C++
-style comment, `string' if in a string literal, `pound' if DETECT-CPP
-is non-nil and in a preprocessor line, or nil if somewhere else.
-Optional LIM is used as the backward limit of the search. If omitted,
-or nil, `c-beginning-of-syntax' is used.
-
-Note that this function might do hidden buffer changes. See the
-comment at the start of cc-engine.el for more info."
-
- (let ((rtn
- (save-excursion
- (let* ((pos (point))
- (lim (or lim (progn
- (c-beginning-of-syntax)
- (point))))
- (state (parse-partial-sexp lim pos)))
- (csharp-log 4 "C#: parse lim(%d) state: %s" lim (prin1-to-string state))
- (cond
- ((elt state 3)
- (csharp-log 4 "C#: in literal string (%d)" pos)
- 'string)
- ((elt state 4)
- (csharp-log 4 "C#: in literal comment (%d)" pos)
- (if (elt state 7) 'c++ 'c))
- ((and detect-cpp (c-beginning-of-macro lim)) 'pound)
- (t nil))))))
- rtn))
-
-
-(defun csharp-set-vliteral-syntax-table-properties (beg end)
- "Scan the buffer text between BEG and END, a verbatim literal
-string, setting and clearing syntax-table text properties where
-necessary.
-
-We need to modify the default syntax-table text property in these cases:
- (backslash) - is not an escape inside a verbatim literal string.
- (double-quote) - can be a literal quote, when doubled.
-
-BEG is the @ delimiter. END is the 'old' position of the ending quote.
-
-see http://www.sunsite.ualberta.ca/Documentation/Gnu/emacs-lisp-ref-21-2.7/html_node/elisp_592.html
-for the list of syntax table numeric codes.
-
-"
-
- (csharp-log 3 "C#: set-vlit-syntax-table: beg(%d) end(%d)" beg end)
-
- (if (and (> beg 0) (> end 0))
-
- (let ((curpos beg)
- (state 0))
-
- (c-clear-char-properties beg end 'syntax-table)
-
- (while (<= curpos end)
-
- (cond
- ((= state 0)
- (if (= (char-after curpos) ?@)
- (progn
- (c-put-char-property curpos 'syntax-table '(3)) ; (6) = expression prefix, (3) = symbol
- ;;(message (format "C#: set-s-t: prefix pos(%d) chr(%c)" beg (char-after beg)))
- )
- )
- (setq state (+ 1 state)))
-
- ((= state 1)
- (if (= (char-after curpos) ?\")
- (progn
- (c-put-char-property curpos 'syntax-table '(7)) ; (7) = string quote
- ;;(message (format "C#: set-s-t: open quote pos(%d) chr(%c)"
- ;; curpos (char-after curpos)))
- ))
- (setq state (+ 1 state)))
-
- ((= state 2)
- (cond
- ;; handle backslash
- ((= (char-after curpos) ?\\)
- (c-put-char-property curpos 'syntax-table '(2)) ; (1) = punctuation, (2) = word
- ;;(message (format "C#: set-s-t: backslash word pos(%d) chr(%c)" curpos (char-after curpos)))
- )
-
- ;; doubled double-quote
- ((and
- (= (char-after curpos) ?\")
- (= (char-after (+ 1 curpos)) ?\"))
- (c-put-char-property curpos 'syntax-table '(2)) ; (1) = punctuation, (2) = word
- (c-put-char-property (+ 1 curpos) 'syntax-table '(2)) ; (1) = punctuation
- ;;(message (format "C#: set-s-t: double doublequote pos(%d) chr(%c)" curpos (char-after curpos)))
- (setq curpos (+ curpos 1))
- )
-
- ;; a single double-quote, which should be a string terminator
- ((= (char-after curpos) ?\")
- (c-put-char-property curpos 'syntax-table '(7)) ; (7) = string quote
- ;;(message (format "C#: set-s-t: close quote pos(%d) chr(%c)" curpos (char-after curpos)))
- ;;go no further
- (setq state (+ 1 state)))
-
- ;; everything else
- (t
- ;;(message (format "C#: set-s-t: none pos(%d) chr(%c)" curpos (char-after curpos)))
- nil))))
- ;; next char
- (setq curpos (+ curpos 1))))))
-
-
-
-(defun csharp-end-of-verbatim-literal-string (&optional lim)
- "Moves to and returns the position of the end quote of the verbatim literal
-string. When calling, point should be on the @ of the verblit string.
-If it is not, then no movement is performed and `point' is returned.
-
-This function ignores text properties. In fact it is the
-underlying scanner used to set the text properties in a C# buffer.
-"
-
- (csharp-log 3 "C#: end-of-vlit-string: point(%d) c(%c)" (point) (char-after))
-
- (let (curpos
- (max (or lim (point-max))))
-
- (if (not (looking-at "@\""))
- (point)
- (forward-char 2) ;; pass up the @ sign and first quote
- (setq curpos (point))
-
- ;; Within a verbatim literal string, a doubled double-quote
- ;; escapes the double-quote."
- (while (and ;; process characters...
- (or ;; while...
- (not (eq (char-after curpos) ?\")) ;; it's not a quote
- (eq (char-after (+ curpos 1)) ?\")) ;; or, its a double (double) quote
- (< curpos max)) ;; and we're not done yet
-
- (cond
- ((and (eq (char-after curpos) ?\") ;; it's a double-quote.
- (eq (char-after (+ curpos 1)) ?\"))
- (setq curpos (+ 2 curpos))) ;; Skip 2
- (t ;; anything else
- (setq curpos (+ 1 curpos))))) ;; skip fwd 1
- curpos)))
-
-
-
-
-(defun csharp-scan-for-verbatim-literals-and-set-props (&optional beg end)
-
-"Scans the buffer, between BEG and END, for verbatim literal
-strings, and sets override text properties on each string to
-allow proper syntax highlighting, indenting, and cursor movement.
-
-BEG and END define the limits of the scan. When nil, they
-default to `point-min' and `point-max' respectively.
-
-Setting text properties generally causes the buffer to be marked
-as modified, but this fn suppresses that via the
-`c-buffer-save-state' macro, for any changes in text properties
-that it makes. This fn also ignores the read-only setting on a
-buffer, using the same macro.
-
-This fn is called when a csharp-mode buffer is loaded, with BEG
-and END set to nil, to do a full scan. It is also called on
-every buffer change, with the BEG and END set to the values for
-the change.
-
-The return value is nil if the buffer was not a csharp-mode
-buffer. Otherwise it is the last cursor position examined by the
-scan.
-"
-
- (if (not (c-major-mode-is 'csharp-mode)) ;; don't scan if not csharp mode
- nil
- (save-excursion
- (c-save-buffer-state
- ((curpos (or beg (point-min)))
- (lastpos (or end (point-max)))
- (state 0) (start 0) (cycle 0)
- literal eos limits)
-
- (csharp-log 3 "C#: scan")
- (goto-char curpos)
-
- (while (and (< curpos lastpos) (< cycle 10000))
- (cond
-
- ;; Case 1: current char is a @ sign
- ;; --------------------------------------------
- ;; Check to see if it demarks the beginning of a verblit
- ;; string.
- ((= ?@ (char-after curpos))
-
- ;; are we in a comment? a string? Maybe the @ is a prefix
- ;; to allow the use of a reserved word as a symbol. Let's find out.
-
- ;; not sure why I need both of the following.
- (syntax-ppss-flush-cache 1)
- (parse-partial-sexp 1 curpos)
- (goto-char curpos)
- (setq literal (csharp-in-literal))
- (cond
-
- ;; Case 1.A: it's a @ within a string.
- ;; --------------------------------------------
- ;; This should never happen, because this scanner hops over strings.
- ;; But it might happen if the scan starts at an odd place.
- ((eq literal 'string) nil)
-
- ;; Case 1.B: The @ is within a comment. Hop over it.
- ((and (memq literal '(c c++))
- ;; This is a kludge for XEmacs where we use
- ;; `buffer-syntactic-context', which doesn't correctly
- ;; recognize "\*/" to end a block comment.
- ;; `parse-partial-sexp' which is used by
- ;; `c-literal-limits' will however do that in most
- ;; versions, which results in that we get nil from
- ;; `c-literal-limits' even when `c-in-literal' claims
- ;; we're inside a comment.
- ;;(setq limits (c-literal-limits start)))
- (setq limits (c-literal-limits)))
-
- ;; advance to the end of the comment
- (if limits
- (progn
- (csharp-log 4 "C#: scan: jump end comment A (%d)" (cdr limits))
- (setq curpos (cdr limits)))))
-
-
- ;; Case 1.B: curpos is at least 2 chars before the last
- ;; position to examine, and, the following char is a
- ;; double-quote (ASCII 34).
- ;; --------------------------------------------
- ;; This looks like the beginning of a verbatim string
- ;; literal.
- ((and (< (+ 2 curpos) lastpos)
- (= ?\" (char-after (+ 1 curpos))))
-
- (setq eos (csharp-end-of-verbatim-literal-string))
- ;; set override syntax properties on the verblit string
- (csharp-set-vliteral-syntax-table-properties curpos eos)
-
- (csharp-log 4 "C#: scan: jump end verblit string (%d)" eos)
- (setq curpos eos))))
-
-
- ;; Case 2: current char is a double-quote.
- ;; --------------------------------------------
- ;; If this is a string, we hop over it, on the assumption that
- ;; this scanner need not bother with regular literal strings, which
- ;; get the proper syntax with the generic approach.
- ;; If in a comment, hop over the comment.
- ((= ?\" (char-after curpos))
- (goto-char curpos)
- (setq literal (c-in-literal))
- (cond
-
- ;; Case 2.A: a quote within a string
- ;; --------------------------------------------
- ;; This shouldn't happen, because we hop over strings.
- ;; But it might.
- ((eq literal 'string) nil)
-
- ;; Case 2.B: a quote within a comment
- ;; --------------------------------------------
- ((and (memq literal '(c c++))
- ;; This is a kludge for XEmacs where we use
- ;; `buffer-syntactic-context', which doesn't correctly
- ;; recognize "\*/" to end a block comment.
- ;; `parse-partial-sexp' which is used by
- ;; `c-literal-limits' will however do that in most
- ;; versions, which results in that we get nil from
- ;; `c-literal-limits' even when `c-in-literal' claims
- ;; we're inside a comment.
- ;;(setq limits (c-literal-limits start)))
- (setq limits (c-literal-limits)))
-
- ;; advance to the end of the comment
- (if limits
- (progn
- (setq curpos (cdr limits))
- (csharp-log 3 "C#: scan: jump end comment B (%s)" curpos))))
-
-
- ;; Case 2.C: Not in a comment, and not in a string.
- ;; --------------------------------------------
- ;; This is the beginning of a literal (but not verbatim) string.
- (t
- (forward-char 1) ;; pass up the quote
- (if (consp (setq limits (c-literal-limits)))
- (progn
- (csharp-log 4 "C#: scan: jump end literal (%d)" (cdr limits))
- (setq curpos (cdr limits))))))))
-
- (setq cycle (+ 1 cycle))
- (setq curpos (+ 1 curpos))
- (c-safe (goto-char curpos)))))))
-
-
-(defun csharp-before-font-lock (beg end old-len)
- "Adjust`syntax-table' properties on the region affected by the change
-in a csharp-mode buffer.
-
-This function is the C# value for `c-before-font-lock-function'.
-It intended to be called only by the cc-mode runtime.
-
-It prepares the buffer for font locking, hence must get called
-before `font-lock-after-change-function'.
-
-It does hidden buffer changes.
-
-BEG, END and OLD-LEN have the same meaning here as for any
-after-change function.
-
-Point is undefined both before and after this function call.
-The return value is meaningless, and is ignored by cc-mode.
-"
- (let ((start-scan (progn
- (c-beginning-of-statement 1)
- (point))))
- (csharp-scan-for-verbatim-literals-and-set-props start-scan end)))
-
-
-
-(c-lang-defconst c-before-font-lock-function
- csharp 'csharp-before-font-lock)
-
-;; ==================================================================
-;; end of c# fontification extensions
-;; ==================================================================
-
-
-
-
-
-;; ==================================================================
-;; C#-specific optimizations of cc-mode funcs
-;; ==================================================================
-
-
-;; There's never a need to check for C-style macro definitions in
-;; a C# buffer.
-(defadvice c-beginning-of-macro (around
- csharp-mode-advice-1
- compile activate)
- (if (c-major-mode-is 'csharp-mode)
- nil
- ad-do-it)
- )
-
-
-;; There's never a need to move over an Obj-C directive in csharp mode
-(defadvice c-forward-objc-directive (around
- csharp-mode-advice-2
- compile activate)
- (if (c-major-mode-is 'csharp-mode)
- nil
- ad-do-it)
- )
-
-;; ==================================================================
-;; end of C#-specific optimizations of cc-mode funcs
-;; ==================================================================
-
-
-
-
-
-
-
-
-;; ==================================================================
-;; c# - monkey-patching of basic parsing logic
-;; ==================================================================
-;;
-;; Here, the model redefines two defuns to add special cases for csharp
-;; mode. These primarily deal with indentation of instance
-;; initializers, which are somewhat unique to C#. I couldn't figure out
-;; how to get cc-mode to do what C# needs, without modifying these
-;; defuns.
-;;
-
-(defun c-looking-at-inexpr-block (lim containing-sexp &optional check-at-end)
- ;; Return non-nil if we're looking at the beginning of a block
- ;; inside an expression. The value returned is actually a cons of
- ;; either 'inlambda, 'inexpr-statement or 'inexpr-class and the
- ;; position of the beginning of the construct.
- ;;
- ;; LIM limits the backward search. CONTAINING-SEXP is the start
- ;; position of the closest containing list. If it's nil, the
- ;; containing paren isn't used to decide whether we're inside an
- ;; expression or not. If both LIM and CONTAINING-SEXP are used, LIM
- ;; needs to be farther back.
- ;;
- ;; If CHECK-AT-END is non-nil then extra checks at the end of the
- ;; brace block might be done. It should only be used when the
- ;; construct can be assumed to be complete, i.e. when the original
- ;; starting position was further down than that.
- ;;
- ;; This function might do hidden buffer changes.
-
- (save-excursion
- (let ((res 'maybe) passed-paren
- (closest-lim (or containing-sexp lim (point-min)))
- ;; Look at the character after point only as a last resort
- ;; when we can't disambiguate.
- (block-follows (and (eq (char-after) ?{) (point))))
-
- (while (and (eq res 'maybe)
- (progn (c-backward-syntactic-ws)
- (> (point) closest-lim))
- (not (bobp))
- (progn (backward-char)
- (looking-at "[\]\).]\\|\\w\\|\\s_"))
- (c-safe (forward-char)
- (goto-char (scan-sexps (point) -1))))
-
- (setq res
- (if (looking-at c-keywords-regexp)
- (let ((kw-sym (c-keyword-sym (match-string 1))))
- (cond
- ((and block-follows
- (c-keyword-member kw-sym 'c-inexpr-class-kwds))
- (and (not (eq passed-paren ?\[))
-
- ;; dinoch Thu, 22 Apr 2010 18:20
- ;; ============================================
- ;; looking at new MyType() { ... }
- ;; means this is a brace list, so, return nil,
- ;; implying NOT looking-at-inexpr-block
- (not
- (and (c-major-mode-is 'csharp-mode)
- (looking-at "new\s+\\([[:alnum:]_]+\\)\\b")))
-
- (or (not (looking-at c-class-key))
- ;; If the class instantiation is at the start of
- ;; a statement, we don't consider it an
- ;; in-expression class.
- (let ((prev (point)))
- (while (and
- (= (c-backward-token-2 1 nil closest-lim) 0)
- (eq (char-syntax (char-after)) ?w))
- (setq prev (point)))
- (goto-char prev)
- (not (c-at-statement-start-p)))
- ;; Also, in Pike we treat it as an
- ;; in-expression class if it's used in an
- ;; object clone expression.
- (save-excursion
- (and check-at-end
- (c-major-mode-is 'pike-mode)
- (progn (goto-char block-follows)
- (zerop (c-forward-token-2 1 t)))
- (eq (char-after) ?\())))
- (cons 'inexpr-class (point))))
- ((c-keyword-member kw-sym 'c-inexpr-block-kwds)
- (when (not passed-paren)
- (cons 'inexpr-statement (point))))
- ((c-keyword-member kw-sym 'c-lambda-kwds)
- (when (or (not passed-paren)
- (eq passed-paren ?\())
- (cons 'inlambda (point))))
- ((c-keyword-member kw-sym 'c-block-stmt-kwds)
- nil)
- (t
- 'maybe)))
-
- (if (looking-at "\\s(")
- (if passed-paren
- (if (and (eq passed-paren ?\[)
- (eq (char-after) ?\[))
- ;; Accept several square bracket sexps for
- ;; Java array initializations.
- 'maybe)
- (setq passed-paren (char-after))
- 'maybe)
- 'maybe))))
-
- (if (eq res 'maybe)
- (when (and c-recognize-paren-inexpr-blocks
- block-follows
- containing-sexp
- (eq (char-after containing-sexp) ?\())
- (goto-char containing-sexp)
- (if (or (save-excursion
- (c-backward-syntactic-ws lim)
- (and (> (point) (or lim (point-min)))
- (c-on-identifier)))
- (and c-special-brace-lists
- (c-looking-at-special-brace-list)))
- nil
- (cons 'inexpr-statement (point))))
-
- res))))
-
-
-
-
-(defconst csharp-enum-decl-re
- (concat
- "\\<enum\\>\s+\\([[:alnum:]_]+\\)\s*:\s*"
- "\\("
- (c-make-keywords-re nil
- (list "sbyte" "byte" "short" "ushort" "int" "uint" "long" "ulong"))
- "\\)")
- "Regex that captures an enum declaration in C#"
- )
-
-
-
-(defun c-inside-bracelist-p (containing-sexp paren-state)
- ;; return the buffer position of the beginning of the brace list
- ;; statement if we're inside a brace list, otherwise return nil.
- ;; CONTAINING-SEXP is the buffer pos of the innermost containing
- ;; paren. PAREN-STATE is the remainder of the state of enclosing
- ;; braces
- ;;
- ;; N.B.: This algorithm can potentially get confused by cpp macros
- ;; placed in inconvenient locations. It's a trade-off we make for
- ;; speed.
- ;;
- ;; This function might do hidden buffer changes.
- (or
- ;; This will pick up brace list declarations.
- (c-safe
- (save-excursion
- (goto-char containing-sexp)
- (c-forward-sexp -1)
- (let (bracepos)
- (if (and (or (looking-at c-brace-list-key)
-
- (progn (c-forward-sexp -1)
- (looking-at c-brace-list-key))
-
- ;; dinoch Thu, 22 Apr 2010 18:20
- ;; ============================================
- ;; looking enum Foo : int
- ;; means this is a brace list, so, return nil,
- ;; implying NOT looking-at-inexpr-block
-
- (and (c-major-mode-is 'csharp-mode)
- (progn
- (c-forward-sexp -1)
- (looking-at csharp-enum-decl-re))))
-
- (setq bracepos (c-down-list-forward (point)))
- (not (c-crosses-statement-barrier-p (point)
- (- bracepos 2))))
- (point)))))
- ;; this will pick up array/aggregate init lists, even if they are nested.
- (save-excursion
- (let ((class-key
- ;; Pike can have class definitions anywhere, so we must
- ;; check for the class key here.
- (and (c-major-mode-is 'pike-mode)
- c-decl-block-key))
- bufpos braceassignp lim next-containing)
- (while (and (not bufpos)
- containing-sexp)
- (when paren-state
- (if (consp (car paren-state))
- (setq lim (cdr (car paren-state))
- paren-state (cdr paren-state))
- (setq lim (car paren-state)))
- (when paren-state
- (setq next-containing (car paren-state)
- paren-state (cdr paren-state))))
- (goto-char containing-sexp)
- (if (c-looking-at-inexpr-block next-containing next-containing)
- ;; We're in an in-expression block of some kind. Do not
- ;; check nesting. We deliberately set the limit to the
- ;; containing sexp, so that c-looking-at-inexpr-block
- ;; doesn't check for an identifier before it.
- (setq containing-sexp nil)
- ;; see if the open brace is preceded by = or [...] in
- ;; this statement, but watch out for operator=
- (setq braceassignp 'dontknow)
- (c-backward-token-2 1 t lim)
- ;; Checks to do only on the first sexp before the brace.
- (when (and c-opt-inexpr-brace-list-key
- (eq (char-after) ?\[))
- ;; In Java, an initialization brace list may follow
- ;; directly after "new Foo[]", so check for a "new"
- ;; earlier.
- (while (eq braceassignp 'dontknow)
- (setq braceassignp
- (cond ((/= (c-backward-token-2 1 t lim) 0) nil)
- ((looking-at c-opt-inexpr-brace-list-key) t)
- ((looking-at "\\sw\\|\\s_\\|[.[]")
- ;; Carry on looking if this is an
- ;; identifier (may contain "." in Java)
- ;; or another "[]" sexp.
- 'dontknow)
- (t nil)))))
- ;; Checks to do on all sexps before the brace, up to the
- ;; beginning of the statement.
- (while (eq braceassignp 'dontknow)
- (cond ((eq (char-after) ?\;)
- (setq braceassignp nil))
- ((and class-key
- (looking-at class-key))
- (setq braceassignp nil))
- ((eq (char-after) ?=)
- ;; We've seen a =, but must check earlier tokens so
- ;; that it isn't something that should be ignored.
- (setq braceassignp 'maybe)
- (while (and (eq braceassignp 'maybe)
- (zerop (c-backward-token-2 1 t lim)))
- (setq braceassignp
- (cond
- ;; Check for operator =
- ((and c-opt-op-identifier-prefix
- (looking-at c-opt-op-identifier-prefix))
- nil)
- ;; Check for `<opchar>= in Pike.
- ((and (c-major-mode-is 'pike-mode)
- (or (eq (char-after) ?`)
- ;; Special case for Pikes
- ;; `[]=, since '[' is not in
- ;; the punctuation class.
- (and (eq (char-after) ?\[)
- (eq (char-before) ?`))))
- nil)
- ((looking-at "\\s.") 'maybe)
- ;; make sure we're not in a C++ template
- ;; argument assignment
- ((and
- (c-major-mode-is 'c++-mode)
- (save-excursion
- (let ((here (point))
- (pos< (progn
- (skip-chars-backward "^<>")
- (point))))
- (and (eq (char-before) ?<)
- (not (c-crosses-statement-barrier-p
- pos< here))
- (not (c-in-literal))
- ))))
- nil)
- (t t))))))
- (if (and (eq braceassignp 'dontknow)
- (/= (c-backward-token-2 1 t lim) 0))
- (setq braceassignp nil)))
- (if (not braceassignp)
- (if (eq (char-after) ?\;)
- ;; Brace lists can't contain a semicolon, so we're done.
- (setq containing-sexp nil)
- ;; Go up one level.
- (setq containing-sexp next-containing
- lim nil
- next-containing nil))
- ;; we've hit the beginning of the aggregate list
- (c-beginning-of-statement-1
- (c-most-enclosing-brace paren-state))
- (setq bufpos (point))))
- )
- bufpos))
- ))
-
-;; ==================================================================
-;; end of monkey-patching of basic parsing logic
-;; ==================================================================
-
-
-
-
-;;(easy-menu-define csharp-menu csharp-mode-map "C# Mode Commands"
-;; ;; Can use `csharp' as the language for `c-mode-menu'
-;; ;; since its definition covers any language. In
-;; ;; this case the language is used to adapt to the
-;; ;; nonexistence of a cpp pass and thus removing some
-;; ;; irrelevant menu alternatives.
-;; (cons "C#" (c-lang-const c-mode-menu csharp)))
-
-;;; Autoload mode trigger
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode))
-
-
-
-(c-add-style "C#"
- '("Java"
- (c-basic-offset . 4)
- (c-comment-only-line-offset . (0 . 0))
- (c-offsets-alist . (
- (access-label . -)
- (arglist-close . c-lineup-arglist)
- (arglist-cont . 0)
- (arglist-cont-nonempty . c-lineup-arglist)
- (arglist-intro . c-lineup-arglist-intro-after-paren)
- (block-close . 0)
- (block-open . 0)
- (brace-entry-open . 0)
- (brace-list-close . 0)
- (brace-list-entry . 0)
- (brace-list-intro . +)
- (brace-list-open . +)
- (c . c-lineup-C-comments)
- (case-label . +)
- (catch-clause . 0)
- (class-close . 0)
- (class-open . 0)
- (comment-intro . c-lineup-comment)
- (cpp-macro . 0)
- (cpp-macro-cont . c-lineup-dont-change)
- (defun-block-intro . +)
- (defun-close . 0)
- (defun-open . 0)
- (do-while-closure . 0)
- (else-clause . 0)
- (extern-lang-close . 0)
- (extern-lang-open . 0)
- (friend . 0)
- (func-decl-cont . +)
- (inclass . +)
- (inexpr-class . +)
- (inexpr-statement . 0)
- (inextern-lang . +)
- (inher-cont . c-lineup-multi-inher)
- (inher-intro . +)
- (inlambda . c-lineup-inexpr-block)
- (inline-close . 0)
- (inline-open . 0)
- (innamespace . +)
- (knr-argdecl . 0)
- (knr-argdecl-intro . 5)
- (label . 0)
- (lambda-intro-cont . +)
- (member-init-cont . c-lineup-multi-inher)
- (member-init-intro . +)
- (namespace-close . 0)
- (namespace-open . 0)
- (statement . 0)
- (statement-block-intro . +)
- (statement-case-intro . +)
- (statement-case-open . +)
- (statement-cont . +)
- (stream-op . c-lineup-streamop)
- (string . c-lineup-dont-change)
- (substatement . +)
- (substatement-open . 0)
- (template-args-cont c-lineup-template-args +)
- (topmost-intro . 0)
- (topmost-intro-cont . 0)
- ))
- ))
-
-
-
-
-;; Custom variables
-;;;###autoload
-(defcustom csharp-mode-hook nil
- "*Hook called by `csharp-mode'."
- :type 'hook
- :group 'c)
-
-
-
-;;; The entry point into the mode
-;;;###autoload
-(defun csharp-mode ()
- "Major mode for editing C# code. This mode is derived from CC Mode to
-support C#.
-
-The hook `c-mode-common-hook' is run with no args at mode
-initialization, then `csharp-mode-hook'.
-
-This mode will automatically add a regexp for Csc.exe error and warning
-messages to the `compilation-error-regexp-alist'.
-
-Key bindings:
-\\{csharp-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (make-local-variable 'beginning-of-defun-function)
- (make-local-variable 'end-of-defun-function)
- (c-initialize-cc-mode t)
- (set-syntax-table csharp-mode-syntax-table)
-
- ;; define underscore as part of a word in the Csharp syntax table
- (modify-syntax-entry ?_ "w" csharp-mode-syntax-table)
-
- ;; define @ as an expression prefix in Csharp syntax table
- (modify-syntax-entry ?@ "'" csharp-mode-syntax-table)
-
- (setq major-mode 'csharp-mode
- mode-name "C#"
- local-abbrev-table csharp-mode-abbrev-table
- abbrev-mode t)
- (use-local-map csharp-mode-map)
-
- ;; `c-init-language-vars' is a macro that is expanded at compile
- ;; time to a large `setq' with all the language variables and their
- ;; customized values for our language.
- (c-init-language-vars csharp-mode)
-
-
- ;; `c-common-init' initializes most of the components of a CC Mode
- ;; buffer, including setup of the mode menu, font-lock, etc.
- ;; There's also a lower level routine `c-basic-common-init' that
- ;; only makes the necessary initialization to get the syntactic
- ;; analysis and similar things working.
- (c-common-init 'csharp-mode)
-
-
- ;; csc.exe, the C# Compiler, produces errors like this:
- ;; file.cs(6,18): error SC1006: Name of constructor must match name of class
-
- (add-hook 'compilation-mode-hook
- (lambda ()
- (setq compilation-error-regexp-alist
- (cons ' ("^[ \t]*\\([A-Za-z0-9][^(]+\\.cs\\)(\\([0-9]+\\)[,]\\([0-9]+\\)) ?: \\(error\\|warning\\) CS[0-9]+:" 1 2 3)
- compilation-error-regexp-alist))))
-
- ;; to allow next-error to work with csc.exe:
- (setq compilation-scroll-output t)
-
- ;; allow fill-paragraph to work on xml code doc
- (set (make-local-variable 'paragraph-separate)
- "[ \t]*\\(//+\\|\\**\\)\\([ \t]+\\|[ \t]+<.+?>\\)$\\|^\f")
-
-
- (c-run-mode-hooks 'c-mode-common-hook 'csharp-mode-hook)
-
-
- ;; Need the following for parse-partial-sexp to work properly with
- ;; verbatim literal strings Setting this var to non-nil tells
- ;; `parse-partial-sexp' to pay attention to the syntax text
- ;; properties on the text in the buffer. If csharp-mode attaches
- ;; text syntax to @"..." then, `parse-partial-sexp' will treat those
- ;; strings accordingly.
- (set (make-local-variable 'parse-sexp-lookup-properties)
- t)
-
- ;; scan the entire buffer for verblit strings
- (csharp-scan-for-verbatim-literals-and-set-props nil nil)
-
-
- (local-set-key (kbd "/") 'csharp-maybe-insert-codedoc)
- (local-set-key (kbd "{") 'csharp-insert-open-brace)
-
- (c-update-modeline))
-
-
-
-(message (concat "Done loading " load-file-name))
-
-
-(provide 'csharp-mode)
-
-;;; csharp-mode.el ends here
-;;MD5: 4EDCB2ECE38841F407C7ED3DA8354E15
diff --git a/emacs.d/nxhtml/related/django.el b/emacs.d/nxhtml/related/django.el
deleted file mode 100644
index f592550..0000000
--- a/emacs.d/nxhtml/related/django.el
+++ /dev/null
@@ -1,203 +0,0 @@
-;;; django.el ---
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sun Nov 18 18:29:41 2007
-;; Version: 0.3
-;; Last-Updated: 2008-08-08T13:22:19+0200 Fri
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Simple highlighting for Django for use with mumamo.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Maybe there are something to get here?
-;; http://github.com/cosmin/emacs-utils/tree/85cc1d2bd447cb9b2fc98e27b5f8780453e5b978/django-html-mode.el
-
-(defconst django-indenting-keywords
- '("block" "comment" "else"
- "filter" "for" "if" "ifchanged" "ifequal"
- "ifnotequal" "spaceless" "with"))
-
-;; (append '(or) django-indenting-keywords)
-(defconst django-font-lock-keywords
- (list
- (cons (rx-to-string
- `(and
- word-start
- (or "as" "autoescape" "csrf_token" "cycle" "debug" "extends"
- "firstof" "in" "include" "load" "now" "regroup" "ssi"
- "templatetag" "url" "widthratio"
- (seq
- (opt "end")
- ;; (or "autoescape" "block" "comment" "cycle" "debug" "else"
- ;; "extends" "filter" "firstof" "for" "if" "ifchanged" "ifequal"
- ;; "ifnotequal" "include" "load" "now" "regroup"
- ;; "spaceless" "ssi" "templatetag" "url" "widthratio"
- ;; "with")
- ,(append '(or) django-indenting-keywords)
- ))
- word-end))
- font-lock-keyword-face)
- )
- "Minimal highlighting expressions for Django mode")
-
-(defcustom django-indent-width 2
- "Indentation width for Django."
- :type 'integer
- :group 'django)
-
-(defun django-indent-line ()
- "Indent current line as Django code.
-Indent like the examples on URL
-`http://docs.djangoproject.com/en/1.1/ref/templates/builtins/'."
- (save-match-data
- (let* ((indent-re (rx-to-string `(and word-start
- ,(append '(or "else") django-indenting-keywords))))
- (deindent-re (rx-to-string `(and word-start
- (or "else"
- (seq
- "end"
- ,(append '(or) django-indenting-keywords))))))
- (here (point-marker))
- (this-indentation (current-indentation))
- (this-line-start (progn (beginning-of-line) (point)))
- (prev-line-start (progn (skip-chars-backward " \t\n\r\f")
- (beginning-of-line)
- (when (< (point) this-line-start)
- (point))))
- (prev-indentation (if prev-line-start (current-indentation) 0))
- (shift-in (if (and prev-line-start
- (re-search-forward indent-re (point-at-eol) t))
- django-indent-width 0))
- (shift-out (progn
- (goto-char this-line-start)
- (if (re-search-forward deindent-re (point-at-eol) t)
- (- django-indent-width) 0)))
- (new-indentation (max 0 (+ prev-indentation shift-in shift-out)))
- )
- (goto-char this-line-start)
- (cond
- ((> new-indentation this-indentation)
- (skip-chars-forward " \t")
- (indent-to new-indentation))
- ((< new-indentation this-indentation)
- (back-to-indentation)
- (delete-region this-line-start (point))
- (indent-to new-indentation)))
- (goto-char here))))
-
-;;;###autoload
-(define-derived-mode django-mode nil "Django"
- "Simple Django mode for use with mumamo.
-This mode only provides syntax highlighting."
- (set (make-local-variable 'indent-line-function) 'django-indent-line)
- (setq font-lock-defaults '(django-font-lock-keywords)))
-
-;;; Comments mode
-;; (defconst django-comment-font-lock-keywords
-;; (list
-;; (cons "\\(.*\\)" (list 1 font-lock-comment-face))
-;; ))
-
-;; (defvar django-comment-font-lock-defaults
-;; '(django-comment-font-lock-keywords t t))
-
-;; (define-derived-mode django-comment-mode nil "Django comment"
-;; "For django comment blocks."
-;; (set (make-local-variable 'font-lock-defaults) django-comment-font-lock-defaults))
-
-;;; Variables mode
-
-(defconst django-variable-font-lock-keywords
- (list
- ;; Built in filters:
- (cons (rx
- "|"
- (submatch
- (or "add" "addslashes" "capfirst" "center" "cut"
- "date" "default" "default_if_none"
- "dictsort" "dictsortreversed"
- "divisibleby"
- "escape"
- "filesizeformat"
- "first"
- "fixampersands"
- "floatformat"
- "force_escape"
- "iriencode"
- "join"
- "length" "length_is"
- "linebreaks" "linebreaksbr" "linenumbers"
- "ljust"
- "lower"
- "make_list"
- "phone2numeric"
- "pluralize"
- "pprint"
- "random"
- "removetags"
- "rjust"
- "safe" "slice" "slugify" "stringformat" "striptags"
- "time" "timesince" "timeuntil"
- "title" "truncatewords" "truncatewords_html"
- "unordered_list"
- "upper" "urlencode" "urlize" "urlizetrunc"
- "wordcount" "wordwrap" "yesno")))
- (list 1 font-lock-builtin-face))
- (cons (rx
- "|"
- (submatch
- (0+ (any "a-z"))))
- (list 1 font-lock-function-name-face))
- (cons "\\([^|]*\\)" (list 1 font-lock-variable-name-face))
- ))
-
-(defvar django-variable-font-lock-defaults
- '(django-variable-font-lock-keywords
- t t
- ;; This still gives teh syntax symbol to |, why?
- ((?| . ". "))
- ))
-
-(define-derived-mode django-variable-mode nil "Django variable"
- "For django comment blocks."
- ;;(modify-syntax-entry ?| ?.)
- (set (make-local-variable 'font-lock-defaults) django-variable-font-lock-defaults))
-
-(provide 'django)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; django.el ends here
diff --git a/emacs.d/nxhtml/related/env.js b/emacs.d/nxhtml/related/env.js
deleted file mode 100644
index 53551e7..0000000
--- a/emacs.d/nxhtml/related/env.js
+++ /dev/null
@@ -1,695 +0,0 @@
-/*
- * Simulated browser environment for Rhino
- * By John Resig <http://ejohn.org/>
- * Copyright 2007 John Resig, under the MIT License
- */
-
-// The window Object
-var window = this;
-
-(function(){
-
- // Browser Navigator
-
- window.navigator = {
- get userAgent(){
- return "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3";
- }
- };
-
- var curLocation = (new java.io.File("./")).toURL();
-
- window.__defineSetter__("location", function(url){
- var xhr = new XMLHttpRequest();
- xhr.open("GET", url);
- xhr.onreadystatechange = function(){
- curLocation = new java.net.URL( curLocation, url );
- window.document = xhr.responseXML;
-
- var event = document.createEvent();
- event.initEvent("load");
- window.dispatchEvent( event );
- };
- xhr.send();
- });
-
- window.__defineGetter__("location", function(url){
- return {
- get protocol(){
- return curLocation.getProtocol() + ":";
- },
- get href(){
- return curLocation.toString();
- },
- toString: function(){
- return this.href;
- }
- };
- });
-
- // Timers
-
- var timers = [];
-
- window.setTimeout = function(fn, time){
- var num;
- return num = setInterval(function(){
- fn();
- clearInterval(num);
- }, time);
- };
-
- window.setInterval = function(fn, time){
- var num = timers.length;
-
- timers[num] = new java.lang.Thread(new java.lang.Runnable({
- run: function(){
- while (true){
- java.lang.Thread.currentThread().sleep(time);
- fn();
- }
- }
- }));
-
- timers[num].start();
-
- return num;
- };
-
- window.clearInterval = function(num){
- if ( timers[num] ) {
- timers[num].stop();
- delete timers[num];
- }
- };
-
- // Window Events
-
- var events = [{}];
-
- window.addEventListener = function(type, fn){
- if ( !this.uuid || this == window ) {
- this.uuid = events.length;
- events[this.uuid] = {};
- }
-
- if ( !events[this.uuid][type] )
- events[this.uuid][type] = [];
-
- if ( events[this.uuid][type].indexOf( fn ) < 0 )
- events[this.uuid][type].push( fn );
- };
-
- window.removeEventListener = function(type, fn){
- if ( !this.uuid || this == window ) {
- this.uuid = events.length;
- events[this.uuid] = {};
- }
-
- if ( !events[this.uuid][type] )
- events[this.uuid][type] = [];
-
- events[this.uuid][type] =
- events[this.uuid][type].filter(function(f){
- return f != fn;
- });
- };
-
- window.dispatchEvent = function(event){
- if ( event.type ) {
- if ( this.uuid && events[this.uuid][event.type] ) {
- var self = this;
-
- events[this.uuid][event.type].forEach(function(fn){
- fn.call( self, event );
- });
- }
-
- if ( this["on" + event.type] )
- this["on" + event.type].call( self, event );
- }
- };
-
- // DOM Document
-
- window.DOMDocument = function(file){
- this._file = file;
- this._dom = Packages.javax.xml.parsers.
- DocumentBuilderFactory.newInstance()
- .newDocumentBuilder().parse(file);
-
- if ( !obj_nodes.containsKey( this._dom ) )
- obj_nodes.put( this._dom, this );
- };
-
- DOMDocument.prototype = {
- createTextNode: function(text){
- return makeNode( this._dom.createTextNode(
- text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")) );
- },
- createElement: function(name){
- return makeNode( this._dom.createElement(name.toLowerCase()) );
- },
- getElementsByTagName: function(name){
- return new DOMNodeList( this._dom.getElementsByTagName(
- name.toLowerCase()) );
- },
- getElementById: function(id){
- var elems = this._dom.getElementsByTagName("*");
-
- for ( var i = 0; i < elems.length; i++ ) {
- var elem = elems.item(i);
- if ( elem.getAttribute("id") == id )
- return makeNode(elem);
- }
-
- return null;
- },
- get body(){
- return this.getElementsByTagName("body")[0];
- },
- get documentElement(){
- return makeNode( this._dom.getDocumentElement() );
- },
- get ownerDocument(){
- return null;
- },
- addEventListener: window.addEventListener,
- removeEventListener: window.removeEventListener,
- dispatchEvent: window.dispatchEvent,
- get nodeName() {
- return "#document";
- },
- importNode: function(node, deep){
- return makeNode( this._dom.importNode(node._dom, deep) );
- },
- toString: function(){
- return "Document" + (typeof this._file == "string" ?
- ": " + this._file : "");
- },
- get innerHTML(){
- return this.documentElement.outerHTML;
- },
-
- get defaultView(){
- return {
- getComputedStyle: function(elem){
- return {
- getPropertyValue: function(prop){
- prop = prop.replace(/\-(\w)/g,function(m,c){
- return c.toUpperCase();
- });
- var val = elem.style[prop];
-
- if ( prop == "opacity" && val == "" )
- val = "1";
-
- return val;
- }
- };
- }
- };
- },
-
- createEvent: function(){
- return {
- type: "",
- initEvent: function(type){
- this.type = type;
- }
- };
- }
- };
-
- function getDocument(node){
- return obj_nodes.get(node);
- }
-
- // DOM NodeList
-
- window.DOMNodeList = function(list){
- this._dom = list;
- this.length = list.getLength();
-
- for ( var i = 0; i < this.length; i++ ) {
- var node = list.item(i);
- this[i] = makeNode( node );
- }
- };
-
- DOMNodeList.prototype = {
- toString: function(){
- return "[ " +
- Array.prototype.join.call( this, ", " ) + " ]";
- },
- get outerHTML(){
- return Array.prototype.map.call(
- this, function(node){return node.outerHTML;}).join('');
- }
- };
-
- // DOM Node
-
- window.DOMNode = function(node){
- this._dom = node;
- };
-
- DOMNode.prototype = {
- get nodeType(){
- return this._dom.getNodeType();
- },
- get nodeValue(){
- return this._dom.getNodeValue();
- },
- get nodeName() {
- return this._dom.getNodeName();
- },
- cloneNode: function(deep){
- return makeNode( this._dom.cloneNode(deep) );
- },
- get ownerDocument(){
- return getDocument( this._dom.ownerDocument );
- },
- get documentElement(){
- return makeNode( this._dom.documentElement );
- },
- get parentNode() {
- return makeNode( this._dom.getParentNode() );
- },
- get nextSibling() {
- return makeNode( this._dom.getNextSibling() );
- },
- get previousSibling() {
- return makeNode( this._dom.getPreviousSibling() );
- },
- toString: function(){
- return '"' + this.nodeValue + '"';
- },
- get outerHTML(){
- return this.nodeValue;
- }
- };
-
- // DOM Element
-
- window.DOMElement = function(elem){
- this._dom = elem;
- this.style = {
- get opacity(){ return this._opacity; },
- set opacity(val){ this._opacity = val + ""; }
- };
-
- // Load CSS info
- var styles = (this.getAttribute("style") || "").split(/\s*;\s*/);
-
- for ( var i = 0; i < styles.length; i++ ) {
- var style = styles[i].split(/\s*:\s*/);
- if ( style.length == 2 )
- this.style[ style[0] ] = style[1];
- }
- };
-
- DOMElement.prototype = extend( new DOMNode(), {
- get nodeName(){
- return this.tagName.toUpperCase();
- },
- get tagName(){
- return this._dom.getTagName();
- },
- toString: function(){
- return "<" + this.tagName + (this.id ? "#" + this.id : "" ) + ">";
- },
- get outerHTML(){
- var ret = "<" + this.tagName, attr = this.attributes;
-
- for ( var i in attr )
- ret += " " + i + "='" + attr[i] + "'";
-
- if ( this.childNodes.length || this.nodeName == "SCRIPT" )
- ret += ">" + this.childNodes.outerHTML +
- "</" + this.tagName + ">";
- else
- ret += "/>";
-
- return ret;
- },
-
- get attributes(){
- var attr = {}, attrs = this._dom.getAttributes();
-
- for ( var i = 0; i < attrs.getLength(); i++ )
- attr[ attrs.item(i).nodeName ] = attrs.item(i).nodeValue;
-
- return attr;
- },
-
- get innerHTML(){
- return this.childNodes.outerHTML;
- },
- set innerHTML(html){
- html = html.replace(/<\/?([A-Z]+)/g, function(m){
- return m.toLowerCase();
- });
-
- var nodes = this.ownerDocument.importNode(
- new DOMDocument( new java.io.ByteArrayInputStream(
- (new java.lang.String("<wrap>" + html + "</wrap>"))
- .getBytes("UTF8"))).documentElement, true).childNodes;
-
- while (this.firstChild)
- this.removeChild( this.firstChild );
-
- for ( var i = 0; i < nodes.length; i++ )
- this.appendChild( nodes[i] );
- },
-
- get textContent(){
- return nav(this.childNodes);
-
- function nav(nodes){
- var str = "";
- for ( var i = 0; i < nodes.length; i++ )
- if ( nodes[i].nodeType == 3 )
- str += nodes[i].nodeValue;
- else if ( nodes[i].nodeType == 1 )
- str += nav(nodes[i].childNodes);
- return str;
- }
- },
- set textContent(text){
- while (this.firstChild)
- this.removeChild( this.firstChild );
- this.appendChild( this.ownerDocument.createTextNode(text));
- },
-
- style: {},
- clientHeight: 0,
- clientWidth: 0,
- offsetHeight: 0,
- offsetWidth: 0,
-
- get disabled() {
- var val = this.getAttribute("disabled");
- return val != "false" && !!val;
- },
- set disabled(val) { return this.setAttribute("disabled",val); },
-
- get checked() {
- var val = this.getAttribute("checked");
- return val != "false" && !!val;
- },
- set checked(val) { return this.setAttribute("checked",val); },
-
- get selected() {
- if ( !this._selectDone ) {
- this._selectDone = true;
-
- if ( this.nodeName == "OPTION" && !this.parentNode.getAttribute("multiple") ) {
- var opt = this.parentNode.getElementsByTagName("option");
-
- if ( this == opt[0] ) {
- var select = true;
-
- for ( var i = 1; i < opt.length; i++ )
- if ( opt[i].selected ) {
- select = false;
- break;
- }
-
- if ( select )
- this.selected = true;
- }
- }
- }
-
- var val = this.getAttribute("selected");
- return val != "false" && !!val;
- },
- set selected(val) { return this.setAttribute("selected",val); },
-
- get className() { return this.getAttribute("class") || ""; },
- set className(val) {
- return this.setAttribute("class",
- val.replace(/(^\s*|\s*$)/g,""));
- },
-
- get type() { return this.getAttribute("type") || ""; },
- set type(val) { return this.setAttribute("type",val); },
-
- get value() { return this.getAttribute("value") || ""; },
- set value(val) { return this.setAttribute("value",val); },
-
- get src() { return this.getAttribute("src") || ""; },
- set src(val) { return this.setAttribute("src",val); },
-
- get id() { return this.getAttribute("id") || ""; },
- set id(val) { return this.setAttribute("id",val); },
-
- getAttribute: function(name){
- return this._dom.hasAttribute(name) ?
- new String( this._dom.getAttribute(name) ) :
- null;
- },
- setAttribute: function(name,value){
- this._dom.setAttribute(name,value);
- },
- removeAttribute: function(name){
- this._dom.removeAttribute(name);
- },
-
- get childNodes(){
- return new DOMNodeList( this._dom.getChildNodes() );
- },
- get firstChild(){
- return makeNode( this._dom.getFirstChild() );
- },
- get lastChild(){
- return makeNode( this._dom.getLastChild() );
- },
- appendChild: function(node){
- this._dom.appendChild( node._dom );
- },
- insertBefore: function(node,before){
- this._dom.insertBefore( node._dom, before ? before._dom : before );
- },
- removeChild: function(node){
- this._dom.removeChild( node._dom );
- },
-
- getElementsByTagName: DOMDocument.prototype.getElementsByTagName,
-
- addEventListener: window.addEventListener,
- removeEventListener: window.removeEventListener,
- dispatchEvent: window.dispatchEvent,
-
- click: function(){
- var event = document.createEvent();
- event.initEvent("click");
- this.dispatchEvent(event);
- },
- submit: function(){
- var event = document.createEvent();
- event.initEvent("submit");
- this.dispatchEvent(event);
- },
- focus: function(){
- var event = document.createEvent();
- event.initEvent("focus");
- this.dispatchEvent(event);
- },
- blur: function(){
- var event = document.createEvent();
- event.initEvent("blur");
- this.dispatchEvent(event);
- },
- get elements(){
- return this.getElementsByTagName("*");
- },
- get contentWindow(){
- return this.nodeName == "IFRAME" ? {
- document: this.contentDocument
- } : null;
- },
- get contentDocument(){
- if ( this.nodeName == "IFRAME" ) {
- if ( !this._doc )
- this._doc = new DOMDocument(
- new java.io.ByteArrayInputStream((new java.lang.String(
- "<html><head><title></title></head><body></body></html>"))
- .getBytes("UTF8")));
- return this._doc;
- } else
- return null;
- }
- });
-
- // Helper method for extending one object with another
-
- function extend(a,b) {
- for ( var i in b ) {
- var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
-
- if ( g || s ) {
- if ( g )
- a.__defineGetter__(i, g);
- if ( s )
- a.__defineSetter__(i, s);
- } else
- a[i] = b[i];
- }
- return a;
- }
-
- // Helper method for generating the right
- // DOM objects based upon the type
-
- var obj_nodes = new java.util.HashMap();
-
- function makeNode(node){
- if ( node ) {
- if ( !obj_nodes.containsKey( node ) )
- obj_nodes.put( node, node.getNodeType() ==
- Packages.org.w3c.dom.Node.ELEMENT_NODE ?
- new DOMElement( node ) : new DOMNode( node ) );
-
- return obj_nodes.get(node);
- } else
- return null;
- }
-
- // XMLHttpRequest
- // Originally implemented by Yehuda Katz
-
- window.XMLHttpRequest = function(){
- this.headers = {};
- this.responseHeaders = {};
- };
-
- XMLHttpRequest.prototype = {
- open: function(method, url, async, user, password){
- this.readyState = 1;
- if (async)
- this.async = true;
- this.method = method || "GET";
- this.url = url;
- this.onreadystatechange();
- },
- setRequestHeader: function(header, value){
- this.headers[header] = value;
- },
- getResponseHeader: function(header){ },
- send: function(data){
- var self = this;
-
- function makeRequest(){
- var url = new java.net.URL(curLocation, self.url);
-
- if ( url.getProtocol() == "file" ) {
- if ( self.method == "PUT" ) {
- var out = new java.io.FileWriter(
- new java.io.File( new java.net.URI( url.toString() ) ) ),
- text = new java.lang.String( data || "" );
-
- out.write( text, 0, text.length() );
- out.flush();
- out.close();
- } else if ( self.method == "DELETE" ) {
- var file = new java.io.File( new java.net.URI( url.toString() ) );
- file["delete"]();
- } else {
- var connection = url.openConnection();
- connection.connect();
- handleResponse();
- }
- } else {
- var connection = url.openConnection();
-
- connection.setRequestMethod( self.method );
-
- // Add headers to Java connection
- for (var header in self.headers)
- connection.addRequestProperty(header, self.headers[header]);
-
- connection.connect();
-
- // Stick the response headers into responseHeaders
- for (var i = 0; ; i++) {
- var headerName = connection.getHeaderFieldKey(i);
- var headerValue = connection.getHeaderField(i);
- if (!headerName && !headerValue) break;
- if (headerName)
- self.responseHeaders[headerName] = headerValue;
- }
-
- handleResponse();
- }
-
- function handleResponse(){
- self.readyState = 4;
- self.status = parseInt(connection.responseCode) || undefined;
- self.statusText = connection.responseMessage || "";
-
- var stream = new java.io.InputStreamReader(connection.getInputStream()),
- buffer = new java.io.BufferedReader(stream), line;
-
- while ((line = buffer.readLine()) != null)
- self.responseText += line;
-
- self.responseXML = null;
-
- if ( self.responseText.match(/^\s*</) ) {
- try {
- self.responseXML = new DOMDocument(
- new java.io.ByteArrayInputStream(
- (new java.lang.String(
- self.responseText)).getBytes("UTF8")));
- } catch(e) {}
- }
- }
-
- self.onreadystatechange();
- }
-
- if (this.async)
- (new java.lang.Thread(new java.lang.Runnable({
- run: makeRequest
- }))).start();
- else
- makeRequest();
- },
- abort: function(){},
- onreadystatechange: function(){},
- getResponseHeader: function(header){
- if (this.readyState < 3)
- throw new Error("INVALID_STATE_ERR");
- else {
- var returnedHeaders = [];
- for (var rHeader in this.responseHeaders) {
- if (rHeader.match(new Regexp(header, "i")))
- returnedHeaders.push(this.responseHeaders[rHeader]);
- }
-
- if (returnedHeaders.length)
- return returnedHeaders.join(", ");
- }
-
- return null;
- },
- getAllResponseHeaders: function(header){
- if (this.readyState < 3)
- throw new Error("INVALID_STATE_ERR");
- else {
- var returnedHeaders = [];
-
- for (var header in this.responseHeaders)
- returnedHeaders.push( header + ": " + this.responseHeaders[header] );
-
- return returnedHeaders.join("\r\n");
- }
- },
- async: true,
- readyState: 0,
- responseText: "",
- status: 0
- };
-})();
diff --git a/emacs.d/nxhtml/related/flymake-css.el b/emacs.d/nxhtml/related/flymake-css.el
deleted file mode 100644
index d80abe3..0000000
--- a/emacs.d/nxhtml/related/flymake-css.el
+++ /dev/null
@@ -1,161 +0,0 @@
-;;; flymake-css.el --- Flymake setup for css files
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-11-21 Sat
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; See variable `flymake-css-validator-jar' for instructions for how
-;; to set this up.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-
-(require 'flymake)
-(require 'xml)
-
-
-(defcustom flymake-allowed-css-file-name-masks '(("\\.css\\'" flymake-css-init))
- "Filename extensions that switch on js syntax checks."
- :type '(repeat (list (regexp :tag "File name regexp")
- (function :tag "Init function")
- (choice (const :tag "No cleanup function" nil)
- (function :tag "Cleanup function"))))
- :group 'flymake)
-
-
-(defvar flymake-css-err-line-pattern-re '(("^file:\\([^:]+\\):\\([^:]+\\):\\(.*\\)" 1 2 nil 3))
- "Regexp matching CSS error messages")
-
-(defcustom flymake-css-validator-jar "~/bin/css-validator.jar"
- "Full path to css-validor.jar file.
-You need the css-validator.jar and some other files for flymake
-for CSS to work. The instructions below tell you how to get and
-install it. The instructions are copied from
-
- http://www.emacswiki.org/emacs/FlymakeCSS
-
-Get http://www.w3.org/QA/Tools/css-validator/css-validator.jar
-create a directory named ‘lib’ in the same directory. Copy to the
-‘lib’ dir the following jars:
-
- * commons-collections-3.2.1.jar
- * jigsaw.jar
- * velocity-1.6.1.jar
- * xml-apis.jar
- * commons-lang-2.4.jar
- * tagsoup-1.2.jar
- * xercesImpl.jar
-
-From:
-
- URL `http://jigsaw.w3.org/Distrib/jigsaw_2.2.6.tar.gz'
- URL `http://www.apache.org/dist/commons/collections/binaries/commons-collections-3.2.1-bin.tar.gz'
- URL `http://www.apache.org/dist/commons/lang/binaries/commons-lang-2.4-bin.tar.gz'
- URL `http://www.apache.org/dist/velocity/engine/1.6.1/velocity-1.6.1.tar.gz'
- URL `http://www.apache.org/dist/xerces/j/Xerces-J-bin.2.9.1.tar.gz'
- URL `http://home.ccil.org/~cowan/XML/tagsoup/tagsoup-1.2.jar'
-
-Test validating some CSS file by running:
-
- java -jar css-validator.jar file:somecssfile.css"
- :type 'file
- :group 'flymake)
-;;(setq flymake-css-validator-jar "c:/dl/programs/css-valid/css-validator.jar")
-
-(defun flymake-css-init ()
- (let* ((temp-file (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-inplace))
- (local-file (file-relative-name
- temp-file
- (file-name-directory buffer-file-name))))
- (unless (file-exists-p flymake-css-validator-jar)
- (error "Can't find css-validator.jar: %s\n\nPlease customize option flymake-css-validator-jar\n"
- flymake-css-validator-jar))
- (list "java"
- (list "-jar" flymake-css-validator-jar
- "-output" "gnu"
- (concat "file:" local-file)))))
-
-;;;###autoload
-(defun flymake-css-load ()
- (dolist (rec flymake-allowed-css-file-name-masks)
- (add-to-list 'flymake-allowed-file-name-masks rec))
- (dolist (rec flymake-css-err-line-pattern-re)
- (add-to-list 'flymake-err-line-patterns rec)))
-
-
-;;(defun flymake-make-overlay (beg end tooltip-text face mouse-face)
-(defadvice flymake-make-overlay (before
- flymake-css-ad-flymake-make-overlay
- activate
- compile)
- (ad-set-arg 2 (xml-substitute-numeric-entities (ad-get-arg 2))))
-
-;; Fix-me: remove when this has been giving its proper place in Emacs.
-(eval-when-compile
- (unless (fboundp 'xml-substitute-numeric-entities)
- (message "Use Emacs 22 workaround for newsticker--decode-numeric-entities")
- (defun xml-substitute-numeric-entities (string)
- "Decode SGML numeric entities by their respective utf characters.
-This is just a copy of the function in newst-backen.el for Emacs
-22 users.
-
-This function replaces numeric entities in the input STRING and
-returns the modified string. For example \"&#42;\" gets replaced
-by \"*\"."
- (if (and string (stringp string))
- (let ((start 0))
- (while (string-match "&#\\([0-9]+\\);" string start)
- (condition-case nil
- (setq string (replace-match
- (string (read (substring string
- (match-beginning 1)
- (match-end 1))))
- nil nil string))
- (error nil))
- (setq start (1+ (match-beginning 0))))
- string)
- nil))
- ))
-
-;;(eval-after-load 'css-mode (flymake-css-load))
-
-(provide 'flymake-css)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; flymake-css.el ends here
diff --git a/emacs.d/nxhtml/related/flymake-helpers.el b/emacs.d/nxhtml/related/flymake-helpers.el
deleted file mode 100644
index 34468d5..0000000
--- a/emacs.d/nxhtml/related/flymake-helpers.el
+++ /dev/null
@@ -1,78 +0,0 @@
-;;; flymake-helpers.el --- Helper functions for flymake
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-07-21T14:30:20+0200 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'flymake))
-
-;; (flymake-create-temp-intemp buffer-file-name nil)
-(defun flymake-create-temp-intemp (file-name prefix)
- "Return file name in temporary directory for checking FILE-NAME.
-This is a replacement for `flymake-create-temp-inplace'. The
-only difference is that it gives a file name in
-`temporary-file-directory' instead of the same directory as
-FILE-NAME.
-
-For the use of PREFIX see that function.
-
-Note that not making the temporary file in another directory
-\(like here) will not work if the file you are checking depends
-on relative paths to other files \(for the type of checks flymake
-makes)."
- (unless (stringp file-name)
- (error "Invalid file-name"))
- (or prefix
- (setq prefix "flymake"))
- (let* ((prefix (concat
- (file-name-nondirectory (file-name-sans-extension file-name))
- "_" prefix))
- (suffix (concat "." (file-name-extension file-name)))
- (temp-name (make-temp-file prefix nil suffix)))
- (flymake-log 3 "create-temp-intemp: file=%s temp=%s" file-name temp-name)
- temp-name))
-
-
-(provide 'flymake-helpers)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; flymake-helpers.el ends here
diff --git a/emacs.d/nxhtml/related/flymake-java-1.el b/emacs.d/nxhtml/related/flymake-java-1.el
deleted file mode 100644
index deb1e86..0000000
--- a/emacs.d/nxhtml/related/flymake-java-1.el
+++ /dev/null
@@ -1,109 +0,0 @@
-;;; flymake-java-1.el --- Flymake for single java files
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-12-02 Wed
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-and-compile (require 'flymake))
-
-(defun flymake-init-maybe-find-buildfile-dir (source-file-name buildfile-name)
- "Find buildfile, store its dir in buffer data and return its dir, if found."
- (let* ((buildfile-dir
- (flymake-find-buildfile buildfile-name
- (file-name-directory source-file-name))))
- (if buildfile-dir
- (setq flymake-base-dir buildfile-dir)
- (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name)
- nil)))
-
-(defun flymake-complex-make-init-impl-1 (create-temp-f use-relative-base-dir use-relative-source build-file-name get-cmdline-f)
- "Create syntax check command line for a directly checked source file.
-Use CREATE-TEMP-F for creating temp copy."
- (let* ((args nil)
- (source-file-name buffer-file-name)
- (buildfile-dir (flymake-init-maybe-find-buildfile-dir source-file-name build-file-name)))
- (if buildfile-dir
- (let* ((temp-source-file-name (flymake-init-create-temp-buffer-copy create-temp-f)))
- (setq args (flymake-get-syntax-check-program-args temp-source-file-name buildfile-dir
- use-relative-base-dir use-relative-source
- get-cmdline-f))))
- args))
-
-(defun flymake-complex-java-init ()
- (or (flymake-complex-make-init-impl-1 'flymake-create-temp-with-folder-structure nil nil "Makefile" 'flymake-get-make-cmdline)
- (flymake-complex-make-init-impl-1 'flymake-create-temp-with-folder-structure nil nil "build.xml" 'flymake-get-make-cmdline)
- (flymake-java-1-init)))
-
-(defcustom flymake-java-1-javac "c:/Sun/SDK/jdk/bin/javac.exe"
- "Path to javac."
- :group 'flymake)
-
-(defun flymake-java-1-init ()
- (if (not (executable-find flymake-java-1-javac))
- (message "Can't find javac. Please customize flymake-java-1-javac")
- (list flymake-java-1-javac
- (list (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-with-folder-structure)))))
-
-;; (defun flymake-java-1-turn-on ()
-;; (interactive)
-;; (if (not (executable-find flymake-java-1-javac))
-;; (message "Can't find javac. Please customize flymake-java-1-javac")
-;; (let ((flymake-allowed-file-name-masks
-;; '(("\\.java\\'" flymake-java-1-init flymake-simple-cleanup))))
-;; (when flymake-mode (flymake-mode -1))
-;; (flymake-mode 1))))
-
-;;;###autoload
-(defun flymake-java-1-load ()
- (let ((jrec (assoc "\\.java\\'" flymake-allowed-file-name-masks)))
- (setq flymake-allowed-file-name-masks
- (delete jrec flymake-allowed-file-name-masks))
- (setq flymake-allowed-file-name-masks
- (cons
- '("\\.java\\'" flymake-complex-java-init flymake-simple-java-cleanup)
- flymake-allowed-file-name-masks))))
-
-(provide 'flymake-java-1)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; flymake-java-1.el ends here
diff --git a/emacs.d/nxhtml/related/flymake-js.el b/emacs.d/nxhtml/related/flymake-js.el
deleted file mode 100644
index 256eee5..0000000
--- a/emacs.d/nxhtml/related/flymake-js.el
+++ /dev/null
@@ -1,234 +0,0 @@
-;;; flymake-js.el --- Flymake setup for javascript files
-;;
-;; Author: Lennart Borgman
-;; Created: Sun Dec 02 07:52:52 2007
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This library provides basic setup for using `flymake-mode' with
-;; javascript files. To use this you must have a javascript
-;; installed. There are (at least) two free javascript engines (both
-;; from Mozill) you can use, Rhino (implemented in Java) or
-;; SpiderMonkey (implemented in C). Both are supported in this
-;; library.
-;;
-;; I have not been able to find binaries for SpiderMonkeys to
-;; download. However the Rhino engine seems fast enough and is easy to
-;; install. You find them at
-;;
-;; http://www.mozilla.org/rhino/
-;; http://www.mozilla.org/js/spidermonkey/
-;;
-;; Put this file in your Emacs `load-path' and then in .emacs
-;;
-;; (require 'flymake-js)
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Flymake JS mode
-
-(require 'flymake)
-
-(defconst flymake-js-dir
- (file-name-directory (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- "Installation directory for flymake-js.")
-
-;;;###autoload
-(defgroup flymake-js nil
- "Customization group for flymake for javascript."
- :group 'flymake)
-
-(defcustom flymake-allowed-js-file-name-masks '(("\\.json\\'" flymake-js-init)
- ("\\.js\\'" flymake-js-init))
- "Filename extensions that switch on js syntax checks."
- :type '(repeat (list (regexp :tag "File name regexp")
- (function :tag "Init function")
- (choice (const :tag "No cleanup function" nil)
- (function :tag "Cleanup function"))))
- :group 'flymake-js)
-
-
-(defvar flymake-js-err-line-pattern-re
- '(;; These pattern are probably for Rhino:
- ("^js: \"\\(.+\\)\", line \\([0-9]+\\): \\(.+\\)$" 1 2 nil 3)
- ("^js: uncaught JavaScript \\(.+\\)$" nil nil nil 1)
- ;; For Rhino with jslint.js
- ("^Lint at line \\([[:digit:]]+\\) character \\([[:digit:]]+\\): \\(.+\\)$" nil 1 2 3)
- ;; These pattern are probably for SpiderMonkey:
- ("^\\(.+\\)\:\\([0-9]+\\)\: \\(SyntaxError\:.+\\)\:$" 1 2 nil 3)
- ("^\\(.+\\)\:\\([0-9]+\\)\: \\(strict warning: trailing comma.+\\)\:$" 1 2 nil 3))
- "Regexp matching JavaScript error messages")
-
-(defcustom flymake-js-rhino-jar "/path/to/js.jar"
- "Path to Rihno jar file.
-Download and install Rhino JavaScript engine from
-
- URL `http://www.mozilla.org/rhino/'
-
-This variable should point to the file js.jar that is in the top
-directory of the Rhino dir tree. \(It was differently named
-earlier and might perhaps be renamed again.)"
- :type '(file :must-match t)
- :group 'flymake-js)
-
-;;(setq flymake-log-level 3)
-;;(setq flymake-js-rhino-use-jslint nil)
-(defcustom flymake-js-rhino-use-jslint nil
- "Use jslint.js if this is non-nil.
-jslint.js will give you warnings about style things like indentation too."
- :type 'boolean
- :group 'flymake-js)
-
-(defcustom flymake-js-rhino-js (expand-file-name "rhino.js" flymake-js-dir)
- "Path to rhino.js.
-Only used if `flymake-js-rhino-use-jslint' is nil.
-
-This file and env.js must be placed in the same directory. Default
-is this directory.
-
-Those files comes with Rhino, see `flymake-js-rhino-jar'."
- :type '(file :must-match t)
- :group 'flymake-js)
-
-(defcustom flymake-js-rhino-jslint (expand-file-name "jslint.js" flymake-js-dir)
- "Path to jslint.js.
-Only used if `flymake-js-rhino-use-jslint' is t.
-
-If you do not have this file you can download it from URL
-`http://www.jslint.com/rhino/jslint.js'. I had to change quit(2)
-to quit(0) in it \(which seems like a bug in `flymake-mode' to
-me)."
- :type '(file :must-match t)
- :group 'flymake-js)
-
-;;(flymake-js-check-rhino-js)
-(defun flymake-js-check-rhino-js ()
- "Checks that the path to env.js is ok."
- (with-current-buffer (find-file-noselect flymake-js-rhino-js)
- (let* ((proj-folder (file-name-as-directory (file-name-directory (buffer-file-name))))
- (proj-line (concat "var project_folder = 'file:///" proj-folder "';"))
- (proj-line-re "^\\W*var\\W+project_folder\\W*=\\W*"))
- (save-restriction
- (widen)
- (goto-char (point-max))
- (if (re-search-backward proj-line-re nil t)
- (let ((beg (line-beginning-position))
- (end (line-end-position)))
- (unless (string= (buffer-substring-no-properties beg end)
- proj-line)
- (delete-region beg end)
- (insert proj-line)
- (basic-save-buffer)))
- (goto-char (point-min))
- (insert proj-line "\n")
- (basic-save-buffer))))))
-
-(defcustom flymake-js-engine 'rhino
- "Javascript engine to use.
-You may have to restart Emacs after changing this - if you can
-not figure out what buffers and processes to kill.
-
-I have only been able to test Rhino since I do not have
-SpiderMonkey."
- :type '(choice (const :tag "Rhino" rhino)
- (const :tag "SpiderMonkey" spidermonkey))
- :group 'flymake-js)
-
-(defun flymake-js-init ()
- (message "running flymake-js-init")
- (let* ((temp-file (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-inplace))
- (local-file (file-relative-name
- temp-file
- (file-name-directory buffer-file-name))))
- (flymake-js-check-has-engine)
- (cond
- ((eq flymake-js-engine 'rhino)
- (list "java" (list "-jar" flymake-js-rhino-jar
- (if flymake-js-rhino-use-jslint
- flymake-js-rhino-jslint
- flymake-js-rhino-js)
- local-file)))
- ((eq flymake-js-engine 'spidermonkey)
- (list "js" (list "-s" local-file)))
- (t
- (error "Bad value: %s" flymake-js-engine)))))
-
-(defvar flymake-js-has-engine nil)
-
-(defun flymake-js-check-has-engine ()
- "Check for the needed files."
- (if flymake-js-has-engine
- t
- (cond
- ;; Rhino
- ((eq flymake-js-engine 'rhino)
- (unless (executable-find "java")
- (error "Could not find java executable"))
- (unless (file-exists-p flymake-js-rhino-jar)
- (error "Could not find file %s\n\nPlease customize flymake-js-rhino-jar\n"
- flymake-js-rhino-jar))
- (if flymake-js-rhino-use-jslint
- (unless (file-exists-p flymake-js-rhino-jslint)
- (error "Could not find file %s" flymake-js-rhino-jslint))
- (unless (file-exists-p flymake-js-rhino-js)
- (error "Could not find file %s" flymake-js-rhino-js))
- (flymake-js-check-rhino-js)))
- ;; SpiderMonkey
- ((eq flymake-js-engine 'spidermonkey)
- (unless (executable-find "js")
- (error "Could not find js program")))
- (t
- (error "Bad value: %s" flymake-js-engine)))
- (setq flymake-js-has-engine t)))
-
-;;;###autoload
-(defun flymake-js-load ()
- (dolist (rec flymake-allowed-js-file-name-masks)
- (add-to-list 'flymake-allowed-file-name-masks rec))
- (dolist (rec flymake-js-err-line-pattern-re)
- (add-to-list 'flymake-err-line-patterns rec)))
-
-;;(eval-after-load 'javascript (flymake-js-load))
-
-(provide 'flymake-js)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; flymake-js.el<2> ends here
diff --git a/emacs.d/nxhtml/related/flymakemsg.el b/emacs.d/nxhtml/related/flymakemsg.el
deleted file mode 100644
index b704ba7..0000000
--- a/emacs.d/nxhtml/related/flymakemsg.el
+++ /dev/null
@@ -1,144 +0,0 @@
-;;; flymakemsg.el --- Show flymake compile errors in echo area
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-11-21 Sat
-;; Version: 0.1
-;; Last-Updated: 2009-11-21 Sat
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `backquote', `bytecomp'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Show flymake error messages in minibuffer when point is on a
-;; flymake error overlay.
-;;
-;; To use it just load this file. Put this in .emacs:
-;;
-;; (require 'flymakemsg)
-;;
-;; This file run `defadvice' on some functions in `flymake-mode'.
-;; This code started from an idea in a paste.
-;;
-;; Note: This code breaks Emacs conventions since it does the
-;; defadvising when you just loads this file.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'flymake))
-
-(defun flymakemsg-show-err-at-point ()
- "If point is on a flymake error, show it in echo area.
-Protected to run in timers and hooks."
- (condition-case err
- (flymakemsg-show-err-at-point-1)
- (error (message "%s" err))))
-
-(defvar flymakemsg-last-errovl nil)
-
-(defun flymakemsg-show-err-at-point-1 ()
- "If point is on a flymake error, show it in echo area."
- (interactive)
- (when flymake-mode
- (let ((flyovl (flymakemsg-get-errovl (point))))
- (unless (eq flyovl flymakemsg-last-errovl)
- (setq flymakemsg-last-errovl flyovl)
- (when flyovl
- (message "%s" (propertize
- (overlay-get flyovl 'help-echo)
- 'face 'flymake-errline)))))))
-
-(defun flymakemsg-get-errovl (POS)
- "Get flymake error overlay at POS."
- (catch 'errovl
- (dolist (ovl (overlays-at POS))
- (when (eq 'flymake-errline (overlay-get ovl 'face))
- (throw 'errovl ovl)))))
-
-(defadvice flymake-mode (after
- flymakemsg-ad-flymake-mode
- activate compile)
- "Turn on showing of flymake errors then point is on them.
-This shows the error in the echo area."
- (if flymake-mode
- nil ;;(add-hook 'post-command-hook 'flymakemsg-post-command t t)
- (remove-hook 'post-command-hook 'flymakemsg-post-command t)))
-
-(defadvice flymake-log (after
- flymakemsg-ad-flymake-log
- activate compile)
- "Display error on current line if any."
- ;;(message "flymake-log defadvice called")
- (if (not flymake-err-info)
- (remove-hook 'post-command-hook 'flymakemsg-post-command t)
- (add-hook 'post-command-hook 'flymakemsg-post-command t t)
- ;; Wait, because there is another message first.
- (flymakemsg-start-msg-timer 3.0)))
-
-(defun flymakemsg-post-command ()
- ;; Wait to not disturb to much.
- (flymakemsg-start-msg-timer 0.2))
-
-(defvar flymakemsg-msg-timer nil)
-
-(defun flymakemsg-cancel-msg-timer ()
- (when (timerp flymakemsg-msg-timer)
- (cancel-timer flymakemsg-msg-timer)))
-
-(defun flymakemsg-start-msg-timer (delay)
- (flymakemsg-cancel-msg-timer)
- (run-with-idle-timer delay nil 'flymakemsg-show-err-at-point))
-
-;;; I have no idea why it was done the way below. It was in the paste.
-;;; It seems very unnecessary but I keep it for now.
-;;
-;; (defun fly-pyflake-determine-message (err)
-;; "pyflake is flakey if it has compile problems, this adjusts the
-;; message to display, so there is one ;)"
-;; (cond ((not (or (eq major-mode 'Python) (eq major-mode 'python-mode) t)))
-;; ((null (flymake-ler-file err))
-;; ;; normal message do your thing
-;; (flymake-ler-text err))
-;; (t ;; could not compile err
-;; (format "compile error, problem on line %s" (flymake-ler-line err)))))
-
-;; (let ((line-no (line-number-at-pos)))
-;; (dolist (elem flymake-err-info)
-;; (if (eq (car elem) line-no)
-;; (let ((err (car (second elem))))
-;; (message "%s" (fly-pyflake-determine-message err))))))
-
-
-(provide 'flymakemsg)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; flymakemsg.el ends here
diff --git a/emacs.d/nxhtml/related/flymu.el b/emacs.d/nxhtml/related/flymu.el
deleted file mode 100644
index 6b3a552..0000000
--- a/emacs.d/nxhtml/related/flymu.el
+++ /dev/null
@@ -1,157 +0,0 @@
-;;; flymu.el --- Flymake for mumamo-mode
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sun Dec 02 14:52:32 2007
-;; Version: 0.1
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Flymake syntax checks for mumamo chunks.
-;;
-;; Not ready yet!!!
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'flymake)
-
-;;(flymu-make-major-mode-alist)
-(defun flymu-make-major-mode-alist ()
- "Grab values from `flymake-allowed-file-name-masks'.
-We need a list of major modes and the corresponding init and
-cleanup functions for flymake. This functions creates such a list
-from flymakes dito list for file names."
- (let ((allowed nil))
- (save-match-data
- (dolist (regexp-init flymake-allowed-file-name-masks)
- (let* ((regexp (car regexp-init))
- (init (cdr regexp-init))
- ;; Make it as simple as possible. First see if the same
- ;; regexp is used:
- (mode (let ((m (cdr (assoc regexp auto-mode-alist))))
- ;; Don't use this if it is complicated:
- (when (commandp m) m)))
- (ext regexp))
- (unless mode
- ;; Try to make a simple file name, this could be made
- ;; better but I do not know if that would be meaningful:
- (setq ext (replace-regexp-in-string "\\\\\\." "." ext))
- (setq ext (replace-regexp-in-string "\\\\'" "" ext))
- (setq ext (replace-regexp-in-string "[\\$?+*]" "" ext))
- ;; Next compare the filename against the entries in
- ;; auto-mode-alist. The code is from `set-auto-mode'.
- (let ((name ext)
- (done nil))
- (while name
- ;; Find first matching alist entry.
- (setq mode
- (if (memq system-type '(vax-vms windows-nt cygwin))
- ;; System is case-insensitive.
- (let ((case-fold-search t))
- (assoc-default name auto-mode-alist
- 'string-match))
- ;; System is case-sensitive.
- (or
- ;; First match case-sensitively.
- (let ((case-fold-search nil))
- (assoc-default name auto-mode-alist
- 'string-match))
- ;; Fallback to case-insensitive match.
- (and auto-mode-case-fold
- (let ((case-fold-search t))
- (assoc-default name auto-mode-alist
- 'string-match))))))
- (if (and mode
- (consp mode)
- (cadr mode))
- (setq name (substring name 0 (match-beginning 0)))
- (setq name)))))
- (when (and mode
- ;; nxml-mode's do not need flymake:
- (let ((major-mode mode))
- (not (derived-mode-p 'nxml-mode))))
- (let ((rec (append (list mode) init)))
- (when (= (length rec) 2)
- (setq rec (append rec (list nil))))
- (add-to-list 'allowed rec))))))
- allowed))
-
-(defcustom flymu-allowed-major-modes (flymu-make-major-mode-alist)
- "Major modes syntax checking is allowed for."
- :type '(repeat (list (function :tag "Major mode")
- (function :tag "Init function")
- (choice (const :tag "No cleanup function" nil)
- (function :tag "Cleanup function"))))
- :set-after '(flymake-allowed-file-name-masks)
- :group 'flymu)
-
-(defvar flymu-mumamo-chunk nil)
-(make-variable-buffer-local 'flymu-mumamo-chunk)
-
-
-;; Fix-me: What to check? When? Make flymu-mumamo-chunk a function
-;; instead? Mark chunks for checking - let mumamo do that? Flymake
-;; should be able to mark a chunk to, even if it is not a whole
-;; line. What about line numbers?
-
-;; Advice these functions:
-(defadvice flymake-get-file-name-mode-and-masks (around
- flymu-ad-flymake-get-file-name-mode-and-masks
- (file-name))
- "Make flymake init file selection according to mode."
- (if flymu-mumamo-chunk
- (let ((major (overlay-get ovl 'mumamo-major-mode))
- (rec (assq major flymu-allowed-major-modes)))
- (when rec
- (setq ad-return-value (cdr rec))))
- ad-do-it))
-(ad-activate 'flymake-get-file-name-mode-and-masks)
-
-;;(defun flymake-save-buffer-in-file (file-name)
-(defadvice flymake-save-buffer-in-file (around
- flymu-ad-flymake-save-buffer-in-file
- (file-name))
- (if flymu-mumamo-chunk
- (let ((min (overlay-start flymu-mumamo-chunk))
- (max (overlay-end flymu-mumamo-chunk)))
- (make-directory (file-name-directory file-name) 1)
- (write-region min max file-name nil 566)
- (flymake-log 3 "saved chunk %s:%s-%s in file %s" (buffer-name) min ma file-name))
- ad-do-it))
-
-(provide 'flymu)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; flymu.el ends here
diff --git a/emacs.d/nxhtml/related/iss-mode.el b/emacs.d/nxhtml/related/iss-mode.el
deleted file mode 100644
index 7e498c0..0000000
--- a/emacs.d/nxhtml/related/iss-mode.el
+++ /dev/null
@@ -1,205 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; iss-mode.el --- Mode for InnoSetup install scripts
-
-;; Copyright (C) 2000-2007 by Stefan Reichoer
-
-;; Emacs Lisp Archive Entry
-;; Filename: iss-mode.el
-;; Author: Stefan Reichoer, <stefan@xsteve.at>
-;; Version: 1.1d
-
-;; iss-mode.el is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; iss-mode.el is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary
-
-;; InnoSetup is an Application Installer for Windows
-;; See: http://www.jrsoftware.org/isinfo.php
-;; This version of iss-mode.el is tested with InnoSetup v5.0
-
-;; iss-mode provides the following features:
-;; * Syntax coloring for InnoSetup scripts
-;; * Integration of the InnoSetup commandline compiler iscc.exe
-;; - Compilation via M-x iss-compile
-;; - Jump to compilation error via M-x next-error
-;; * Start Innosetup help via M-x iss-compiler-help
-;; * Test the installation via M-x iss-run-installer
-
-;; Of course you can bind this commands to keys (e.g. in the iss-mode-hook)
-
-;; My initialization for InnoSetup looks like this:
-;; (autoload 'iss-mode "iss-mode" "Innosetup Script Mode" t)
-;; (setq auto-mode-alist (append '(("\\.iss$" . iss-mode)) auto-mode-alist))
-;; (setq iss-compiler-path "c:/Programme/Inno Setup 5/")
-;; (add-hook 'iss-mode-hook 'xsteve-iss-mode-init)
-;; (defun xsteve-iss-mode-init ()
-;; (interactive)
-;; (define-key iss-mode-map [f6] 'iss-compile)
-;; (define-key iss-mode-map [(meta f6)] 'iss-run-installer)))
-
-;; The latest version of iss-mode.el can be found at:
-;; http://www.xsteve.at/prg/emacs/iss-mode.el
-
-;; Comments / suggestions welcome!
-
-;;; Change log:
-;;
-;; Version 1.1e:
-;;
-;; - Add some new flags to keywords
-
-;;; Code:
-
-(eval-and-compile (require 'compile))
-
-(defvar iss-compiler-path nil "Path to the iss compiler")
-
-;;; End of user settings
-
-(defvar iss-mode-syntax-table
- (let ((table (make-syntax-table)))
- ;; ";" starts a comment
- ;;(modify-syntax-entry ?\; "<" iss-mode-syntax-table)
- (modify-syntax-entry ?\; ". 12" table)
- ;; and \n and \^M end a comment
- (modify-syntax-entry ?\n ">" table)
- (modify-syntax-entry ?\^M ">" table)
-
- (modify-syntax-entry ?\" "." table)
-
- (modify-syntax-entry ?_ "w" table)
- table)
- "Syntax table in use in iss-mode buffers.")
-
-
-(defvar iss-font-lock-keywords
- (list
- (cons (concat "^;\.*")
- 'font-lock-comment-face)
- (cons (concat "\\sw+: ")
- 'font-lock-keyword-face)
- (cons "^[ \t]*\\[\.+\\]" 'font-lock-function-name-face) ;font-lock-constant-face)
- (cons "^[ \t]*#include[ \t]*\".+\"" 'font-lock-preprocessor-face)
- (cons (concat "^[ \t]*\\<\\(appname\\|appvername\\|appversion\\|appcopyright\\|appid\\|"
- "appmutex\\|beveledlabel\\|defaultdirname\\|versioninfoversion"
- "\\|defaultgroupname\\|minversion\\|outputdir\\|outputbasefilename\\|"
- "allownoicons\\|uninstallfilesdir\\|"
- "sourcedir\\|disableprogramgrouppage\\|alwayscreateuninstallicon\\)\\>")
- 'font-lock-type-face)
- (cons (concat "\\<\\(alwaysskipifsameorolder\\|uninsneveruninstall\\|"
- "comparetimestampalso\\|restartreplace\\|isreadme\\|"
- "unchecked\\|nowait\\|postinstall\\|skipifsilent\\|ignoreversion\\|"
- "uninsdeletekeyifempty\\|uninsdeletekey\\|"
- "runasoriginaluser\\|runascurrentuser"
- "\\)\\>")
- 'font-lock-variable-name-face)
- (cons (concat "\\<\\(HKCU\\|HKLM\\|dirifempty\\|files\\|filesandordirs\\)\\>")
- 'font-lock-constant-face)
- (list 'iss-fontify-options '(1 'font-lock-variable-name-face) '(2 'font-lock-keyword-face))
- )
- "Expressions to highlight in iss mode.")
-
-(defun iss-fontify-options (bound)
- (message "iss-fontify-options %s" bound)
- (when (re-search-forward "^[ \t]*\\([^=]+\\)[ \t]*\\(=\\)" bound t)
- (match-data)))
-
-(defvar iss-mode-map (make-sparse-keymap)
- "Keymap used in iss-mode buffers.")
-
-(easy-menu-define
- iss-menu
- iss-mode-map
- "InnoSetup script menu"
- (list
- "ISS"
- ["Compile" (iss-compile) t]
- ["Run Installer" (iss-run-installer) t]
- ["InnoSetup Help" (iss-compiler-help) t]
- ))
-(easy-menu-add iss-menu)
-
-(defvar compilation-file-regexp-alist) ;; silence compiler, don't know the var.
-
-;;;###autoload
-(defun iss-mode ()
- "Major mode for editing InnoSetup script files. Upon startup iss-mode-hook is run."
- (interactive)
- (kill-all-local-variables)
- (use-local-map iss-mode-map)
- (setq major-mode 'iss-mode)
- (setq mode-name "iss")
- (set-syntax-table iss-mode-syntax-table)
- (set (make-local-variable 'comment-start) ";")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'comment-multi-line) nil)
-
- (set (make-local-variable 'compilation-error-regexp-alist)
- '(("\\(Error on line\\) \\([0-9]+\\):" nil 2)))
- (set (make-local-variable 'compilation-file-regexp-alist)
- '(("iscc \\(.*\\)$" 1)))
-
- ;; Font lock support
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults '(iss-font-lock-keywords nil t))
- (run-hooks 'iss-mode-hook))
-
-(defun iss-compiler-help ()
- "Start the online documentation for the InnoSetup compiler"
- (interactive)
- (let ((default-directory (or iss-compiler-path default-directory)))
- (w32-shell-execute 1 "ISetup.chm")))
-
-(defun iss-compile ()
- "Compile the actual file with the InnoSetup compiler"
- (interactive)
- (let ((default-directory (or iss-compiler-path default-directory))
- (compilation-process-setup-function 'iss-process-setup))
- (compile (concat "iscc " (buffer-file-name)))))
-
-(defun iss-process-setup ()
- "Set up `compilation-exit-message-function' for `iss-compile'."
- (set (make-local-variable 'compilation-exit-message-function)
- 'iss-compilation-exit-message-function))
-
-(defun iss-compilation-exit-message-function (process-status exit-status msg)
- (interactive)
- (save-excursion
- (let ((buffer-read-only nil))
- (goto-char (point-min))
- ;;scroll down one line, so that the compile command is parsed to:
- ;; -> get the filename of the compiled file
- (insert "\n")))
- (cons msg exit-status))
-
-(defun iss-find-option (option)
- (let ((search-regexp
- (concat option "[ \t]*=[ \t]*\\(.*\\)$")))
- (save-excursion
- (goto-char (point-min))
- (when (search-forward-regexp search-regexp nil t)
- (buffer-substring-no-properties (match-beginning 1) (match-end 1))))))
-
-(defun iss-run-installer ()
- (interactive)
- (let ((executable
- (concat (or (iss-find-option "outputdir") "Output\\")
- (or (iss-find-option "outputbasefilename") "setup")
- ".exe")))
- (w32-shell-execute 1 executable)))
-
-(provide 'iss-mode)
-
-;; arch-tag: b07b7119-d591-465e-927f-d0be0bcf7cab
diff --git a/emacs.d/nxhtml/related/iss-mumamo.el b/emacs.d/nxhtml/related/iss-mumamo.el
deleted file mode 100644
index 85e067c..0000000
--- a/emacs.d/nxhtml/related/iss-mumamo.el
+++ /dev/null
@@ -1,70 +0,0 @@
-;;; iss-mumamo.el --- Defines multi major mode for Inno Setup files
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-09
-;; Version: 0.3
-;; Last-Updated: 2009-12-12 Sat
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `comint', `compile', `iss-mode', `ring', `tool-bar'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'iss-mode)
-(require 'mumamo)
-
-(defun mumamo-chunk-iss-code (pos min max)
- "Find [code]..., return range and `pascal-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-
-Note that if this section is not the last"
- (mumamo-quick-static-chunk pos min max "[code]" "{*** End of CODE **}" t 'pascal-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode iss-mumamo-mode
- "Turn on multiple major modes Inno Setup .iss files.
-The main major mode will be `iss-mode'.
-The [code] section, if any, will be in `pascal-mode'."
- ("Inno ISS Family" iss-mode
- (mumamo-chunk-iss-code
- )))
-
-(add-to-list 'auto-mode-alist '("\\.iss\\'" . iss-mumamo-mode))
-
-(provide 'iss-mumamo)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; iss-mumamo.el ends here
diff --git a/emacs.d/nxhtml/related/js_temp.js b/emacs.d/nxhtml/related/js_temp.js
deleted file mode 100644
index a2c6748..0000000
--- a/emacs.d/nxhtml/related/js_temp.js
+++ /dev/null
@@ -1,4 +0,0 @@
-
- // I am testing
-
- var x == 10;
diff --git a/emacs.d/nxhtml/related/jslint.js b/emacs.d/nxhtml/related/jslint.js
deleted file mode 100644
index fb89c06..0000000
--- a/emacs.d/nxhtml/related/jslint.js
+++ /dev/null
@@ -1,523 +0,0 @@
-// (C)2002 Douglas Crockford
-// www.JSLint.com
-// Rhino Edition
-"use strict";var JSLINT=(function(){var adsafe_id,adsafe_may,adsafe_went,anonname,approved,atrule={media:true,'font-face':true,page:true},bang={'<':true,'<=':true,'==':true,'===':true,'!==':true,'!=':true,'>':true,'>=':true,'+':true,'-':true,'*':true,'/':true,'%':true},banned={'arguments':true,callee:true,caller:true,constructor:true,'eval':true,prototype:true,unwatch:true,valueOf:true,watch:true},boolOptions={adsafe:true,bitwise:true,browser:true,cap:true,css:true,debug:true,eqeqeq:true,evil:true,forin:true,fragment:true,immed:true,laxbreak:true,newcap:true,nomen:true,on:true,onevar:true,passfail:true,plusplus:true,regexp:true,rhino:true,undef:true,safe:true,sidebar:true,strict:true,sub:true,white:true,widget:true},browser={addEventListener:false,alert:false,blur:false,clearInterval:false,clearTimeout:false,close:false,closed:false,confirm:false,console:false,Debug:false,defaultStatus:false,document:false,event:false,focus:false,frames:false,getComputedStyle:false,history:false,Image:false,length:false,location:false,moveBy:false,moveTo:false,name:false,navigator:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,opener:false,opera:false,Option:false,parent:false,print:false,prompt:false,removeEventListener:false,resizeBy:false,resizeTo:false,screen:false,scroll:false,scrollBy:false,scrollTo:false,setInterval:false,setTimeout:false,status:false,top:false,XMLHttpRequest:false},cssAttributeData,cssAny,cssColorData={"aliceblue":true,"antiquewhite":true,"aqua":true,"aquamarine":true,"azure":true,"beige":true,"bisque":true,"black":true,"blanchedalmond":true,"blue":true,"blueviolet":true,"brown":true,"burlywood":true,"cadetblue":true,"chartreuse":true,"chocolate":true,"coral":true,"cornflowerblue":true,"cornsilk":true,"crimson":true,"cyan":true,"darkblue":true,"darkcyan":true,"darkgoldenrod":true,"darkgray":true,"darkgreen":true,"darkkhaki":true,"darkmagenta":true,"darkolivegreen":true,"darkorange":true,"darkorchid":true,"darkred":true,"darksalmon":true,"darkseagreen":true,"darkslateblue":true,"darkslategray":true,"darkturquoise":true,"darkviolet":true,"deeppink":true,"deepskyblue":true,"dimgray":true,"dodgerblue":true,"firebrick":true,"floralwhite":true,"forestgreen":true,"fuchsia":true,"gainsboro":true,"ghostwhite":true,"gold":true,"goldenrod":true,"gray":true,"green":true,"greenyellow":true,"honeydew":true,"hotpink":true,"indianred":true,"indigo":true,"ivory":true,"khaki":true,"lavender":true,"lavenderblush":true,"lawngreen":true,"lemonchiffon":true,"lightblue":true,"lightcoral":true,"lightcyan":true,"lightgoldenrodyellow":true,"lightgreen":true,"lightpink":true,"lightsalmon":true,"lightseagreen":true,"lightskyblue":true,"lightslategray":true,"lightsteelblue":true,"lightyellow":true,"lime":true,"limegreen":true,"linen":true,"magenta":true,"maroon":true,"mediumaquamarine":true,"mediumblue":true,"mediumorchid":true,"mediumpurple":true,"mediumseagreen":true,"mediumslateblue":true,"mediumspringgreen":true,"mediumturquoise":true,"mediumvioletred":true,"midnightblue":true,"mintcream":true,"mistyrose":true,"moccasin":true,"navajowhite":true,"navy":true,"oldlace":true,"olive":true,"olivedrab":true,"orange":true,"orangered":true,"orchid":true,"palegoldenrod":true,"palegreen":true,"paleturquoise":true,"palevioletred":true,"papayawhip":true,"peachpuff":true,"peru":true,"pink":true,"plum":true,"powderblue":true,"purple":true,"red":true,"rosybrown":true,"royalblue":true,"saddlebrown":true,"salmon":true,"sandybrown":true,"seagreen":true,"seashell":true,"sienna":true,"silver":true,"skyblue":true,"slateblue":true,"slategray":true,"snow":true,"springgreen":true,"steelblue":true,"tan":true,"teal":true,"thistle":true,"tomato":true,"turquoise":true,"violet":true,"wheat":true,"white":true,"whitesmoke":true,"yellow":true,"yellowgreen":true},cssBorderStyle,cssBreak,cssLengthData={'%':true,'cm':true,'em':true,'ex':true,'in':true,'mm':true,'pc':true,'pt':true,'px':true},cssOverflow,escapes={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','/':'\\/','\\':'\\\\'},funct,functionicity=['closure','exception','global','label','outer','unused','var'],functions,global,htmltag={a:{},abbr:{},acronym:{},address:{},applet:{},area:{empty:true,parent:' map '},b:{},base:{empty:true,parent:' head '},bdo:{},big:{},blockquote:{},body:{parent:' html noframes '},br:{empty:true},button:{},canvas:{parent:' body p div th td '},caption:{parent:' table '},center:{},cite:{},code:{},col:{empty:true,parent:' table colgroup '},colgroup:{parent:' table '},dd:{parent:' dl '},del:{},dfn:{},dir:{},div:{},dl:{},dt:{parent:' dl '},em:{},embed:{},fieldset:{},font:{},form:{},frame:{empty:true,parent:' frameset '},frameset:{parent:' html frameset '},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{parent:' html '},html:{parent:'*'},hr:{empty:true},i:{},iframe:{},img:{empty:true},input:{empty:true},ins:{},kbd:{},label:{},legend:{parent:' fieldset '},li:{parent:' dir menu ol ul '},link:{empty:true,parent:' head '},map:{},menu:{},meta:{empty:true,parent:' head noframes noscript '},noframes:{parent:' html body '},noscript:{parent:' body head noframes '},object:{},ol:{},optgroup:{parent:' select '},option:{parent:' optgroup select '},p:{},param:{empty:true,parent:' applet object '},pre:{},q:{},samp:{},script:{empty:true,parent:' body div frame head iframe p pre span '},select:{},small:{},span:{},strong:{},style:{parent:' head ',empty:true},sub:{},sup:{},table:{},tbody:{parent:' table '},td:{parent:' tr '},textarea:{},tfoot:{parent:' table '},th:{parent:' tr '},thead:{parent:' table '},title:{parent:' head '},tr:{parent:' table tbody thead tfoot '},tt:{},u:{},ul:{},'var':{}},ids,implied,inblock,indent,jsonmode,lines,lookahead,member,membersOnly,nexttoken,noreach,option,predefined,prereg,prevtoken,rhino={defineClass:false,deserialize:false,gc:false,help:false,load:false,loadClass:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false},scope,sidebar={System:false},src,stack,standard={Array:false,Boolean:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,'eval':false,EvalError:false,Function:false,hasOwnProperty:false,isFinite:false,isNaN:false,JSON:false,Math:false,Number:false,Object:false,parseInt:false,parseFloat:false,RangeError:false,ReferenceError:false,RegExp:false,String:false,SyntaxError:false,TypeError:false,URIError:false},standard_member={E:true,LN2:true,LN10:true,LOG2E:true,LOG10E:true,PI:true,SQRT1_2:true,SQRT2:true,MAX_VALUE:true,MIN_VALUE:true,NEGATIVE_INFINITY:true,POSITIVE_INFINITY:true},strict_mode,syntax={},tab,token,urls,warnings,widget={alert:true,animator:true,appleScript:true,beep:true,bytesToUIString:true,Canvas:true,chooseColor:true,chooseFile:true,chooseFolder:true,closeWidget:true,COM:true,convertPathToHFS:true,convertPathToPlatform:true,CustomAnimation:true,escape:true,FadeAnimation:true,filesystem:true,Flash:true,focusWidget:true,form:true,FormField:true,Frame:true,HotKey:true,Image:true,include:true,isApplicationRunning:true,iTunes:true,konfabulatorVersion:true,log:true,md5:true,MenuItem:true,MoveAnimation:true,openURL:true,play:true,Point:true,popupMenu:true,preferenceGroups:true,preferences:true,print:true,prompt:true,random:true,Rectangle:true,reloadWidget:true,ResizeAnimation:true,resolvePath:true,resumeUpdates:true,RotateAnimation:true,runCommand:true,runCommandInBg:true,saveAs:true,savePreferences:true,screen:true,ScrollBar:true,showWidgetPreferences:true,sleep:true,speak:true,Style:true,suppressUpdates:true,system:true,tellWidget:true,Text:true,TextArea:true,Timer:true,unescape:true,updateNow:true,URL:true,Web:true,widget:true,Window:true,XMLDOM:true,XMLHttpRequest:true,yahooCheckLogin:true,yahooLogin:true,yahooLogout:true},xmode,xquote,ax=/@cc|<\/?|script|\]*s\]|<\s*!|&lt/i,cx=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,tx=/^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jslint|members?|global)?|=|\/)?|\*[\/=]?|\+[+=]?|-[\-=]?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/,hx=/^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-]*|[0-9]+|--|.)/,nx=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,nxg=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ox=/[>&]|<[\/!]?|--/,lx=/\*\/|\/\*/,ix=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,jx=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,ux=/&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto/i,sx=/^\s*([{:#%.=,>+\[\]@()"';]|\*=?|\$=|\|=|\^=|~=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,ssx=/^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/,qx=/[^a-zA-Z0-9-_\/ ]/,dx=/[\[\]\/\\"'*<>.&:(){}+=#]/,rx={outer:hx,html:hx,style:sx,styleproperty:ssx};function F(){}
-if(typeof Object.create!=='function'){Object.create=function(o){F.prototype=o;return new F();};}
-function is_own(object,name){return Object.prototype.hasOwnProperty.call(object,name);}
-function combine(t,o){var n;for(n in o){if(is_own(o,n)){t[n]=o[n];}}}
-String.prototype.entityify=function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');};String.prototype.isAlpha=function(){return(this>='a'&&this<='z\uffff')||(this>='A'&&this<='Z\uffff');};String.prototype.isDigit=function(){return(this>='0'&&this<='9');};String.prototype.supplant=function(o){return this.replace(/\{([^{}]*)\}/g,function(a,b){var r=o[b];return typeof r==='string'||typeof r==='number'?r:a;});};String.prototype.name=function(){if(ix.test(this)){return this;}
-if(nx.test(this)){return'"'+this.replace(nxg,function(a){var c=escapes[a];if(c){return c;}
-return'\\u'+('0000'+a.charCodeAt().toString(16)).slice(-4);})+'"';}
-return'"'+this+'"';};function assume(){if(!option.safe){if(option.rhino){combine(predefined,rhino);}
-if(option.browser||option.sidebar){combine(predefined,browser);}
-if(option.sidebar){combine(predefined,sidebar);}
-if(option.widget){combine(predefined,widget);}}}
-function quit(m,l,ch){throw{name:'JSLintError',line:l,character:ch,message:m+" ("+Math.floor((l/lines.length)*100)+"% scanned)."};}
-function warning(m,t,a,b,c,d){var ch,l,w;t=t||nexttoken;if(t.id==='(end)'){t=token;}
-l=t.line||0;ch=t.from||0;w={id:'(error)',raw:m,evidence:lines[l-1]||'',line:l,character:ch,a:a,b:b,c:c,d:d};w.reason=m.supplant(w);JSLINT.errors.push(w);if(option.passfail){quit('Stopping. ',l,ch);}
-warnings+=1;if(warnings>=option.maxerr){quit("Too many errors.",l,ch);}
-return w;}
-function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d);}
-function error(m,t,a,b,c,d){var w=warning(m,t,a,b,c,d);quit("Stopping, unable to continue.",w.line,w.character);}
-function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d);}
-var lex=(function lex(){var character,from,line,s;function nextLine(){var at;if(line>=lines.length){return false;}
-character=1;s=lines[line];line+=1;at=s.search(/ \t/);if(at>=0){warningAt("Mixed spaces and tabs.",line,at+1);}
-s=s.replace(/\t/g,tab);at=s.search(cx);if(at>=0){warningAt("Unsafe character.",line,at);}
-if(option.maxlen&&option.maxlen<s.length){warningAt("Line too long.",line,s.length);}
-return true;}
-function it(type,value){var i,t;if(type==='(color)'){t={type:type};}else if(type==='(punctuator)'||(type==='(identifier)'&&is_own(syntax,value))){t=syntax[value]||syntax['(error)'];}else{t=syntax[type];}
-t=Object.create(t);if(type==='(string)'||type==='(range)'){if(jx.test(value)){warningAt("Script URL.",line,from);}}
-if(type==='(identifier)'){t.identifier=true;if(value==='__iterator__'||value==='__proto__'){errorAt("Reserved name '{a}'.",line,from,value);}else if(option.nomen&&(value.charAt(0)==='_'||value.charAt(value.length-1)==='_')){warningAt("Unexpected {a} in '{b}'.",line,from,"dangling '_'",value);}}
-t.value=value;t.line=line;t.character=character;t.from=from;i=t.id;if(i!=='(endline)'){prereg=i&&(('(,=:[!&|?{};'.indexOf(i.charAt(i.length-1))>=0)||i==='return');}
-return t;}
-return{init:function(source){if(typeof source==='string'){lines=source.replace(/\r\n/g,'\n').replace(/\r/g,'\n').split('\n');}else{lines=source;}
-line=0;nextLine();from=1;},range:function(begin,end){var c,value='';from=character;if(s.charAt(0)!==begin){errorAt("Expected '{a}' and instead saw '{b}'.",line,character,begin,s.charAt(0));}
-for(;;){s=s.slice(1);character+=1;c=s.charAt(0);switch(c){case'':errorAt("Missing '{a}'.",line,character,c);break;case end:s=s.slice(1);character+=1;return it('(range)',value);case xquote:case'\\':warningAt("Unexpected '{a}'.",line,character,c);}
-value+=c;}},token:function(){var b,c,captures,d,depth,high,i,l,low,q,t;function match(x){var r=x.exec(s),r1;if(r){l=r[0].length;r1=r[1];c=r1.charAt(0);s=s.substr(l);from=character+l-r1.length;character+=l;return r1;}}
-function string(x){var c,j,r='';if(jsonmode&&x!=='"'){warningAt("Strings must use doublequote.",line,character);}
-if(xquote===x||(xmode==='scriptstring'&&!xquote)){return it('(punctuator)',x);}
-function esc(n){var i=parseInt(s.substr(j+1,n),16);j+=n;if(i>=32&&i<=126&&i!==34&&i!==92&&i!==39){warningAt("Unnecessary escapement.",line,character);}
-character+=n;c=String.fromCharCode(i);}
-j=0;for(;;){while(j>=s.length){j=0;if(xmode!=='html'||!nextLine()){errorAt("Unclosed string.",line,from);}}
-c=s.charAt(j);if(c===x){character+=1;s=s.substr(j+1);return it('(string)',r,x);}
-if(c<' '){if(c==='\n'||c==='\r'){break;}
-warningAt("Control character in string: {a}.",line,character+j,s.slice(0,j));}else if(c===xquote){warningAt("Bad HTML string",line,character+j);}else if(c==='<'){if(option.safe&&xmode==='html'){warningAt("ADsafe string violation.",line,character+j);}else if(s.charAt(j+1)==='/'&&(xmode||option.safe)){warningAt("Expected '<\\/' and instead saw '</'.",line,character);}else if(s.charAt(j+1)==='!'&&(xmode||option.safe)){warningAt("Unexpected '<!' in a string.",line,character);}}else if(c==='\\'){if(xmode==='html'){if(option.safe){warningAt("ADsafe string violation.",line,character+j);}}else if(xmode==='styleproperty'){j+=1;character+=1;c=s.charAt(j);if(c!==x){warningAt("Escapement in style string.",line,character+j);}}else{j+=1;character+=1;c=s.charAt(j);switch(c){case xquote:warningAt("Bad HTML string",line,character+j);break;case'\\':case'\'':case'"':case'/':break;case'b':c='\b';break;case'f':c='\f';break;case'n':c='\n';break;case'r':c='\r';break;case't':c='\t';break;case'u':esc(4);break;case'v':c='\v';break;case'x':if(jsonmode){warningAt("Avoid \\x-.",line,character);}
-esc(2);break;default:warningAt("Bad escapement.",line,character);}}}
-r+=c;character+=1;j+=1;}}
-for(;;){if(!s){return it(nextLine()?'(endline)':'(end)','');}
-while(xmode==='outer'){i=s.search(ox);if(i===0){break;}else if(i>0){character+=1;s=s.slice(i);break;}else{if(!nextLine()){return it('(end)','');}}}
-t=match(rx[xmode]||tx);if(!t){if(xmode==='html'){return it('(error)',s.charAt(0));}else{t='';c='';while(s&&s<'!'){s=s.substr(1);}
-if(s){errorAt("Unexpected '{a}'.",line,character,s.substr(0,1));}}}else{if(c.isAlpha()||c==='_'||c==='$'){return it('(identifier)',t);}
-if(c.isDigit()){if(xmode!=='style'&&!isFinite(Number(t))){warningAt("Bad number '{a}'.",line,character,t);}
-if(xmode!=='style'&&xmode!=='styleproperty'&&s.substr(0,1).isAlpha()){warningAt("Missing space after '{a}'.",line,character,t);}
-if(c==='0'){d=t.substr(1,1);if(d.isDigit()){if(token.id!=='.'&&xmode!=='styleproperty'){warningAt("Don't use extra leading zeros '{a}'.",line,character,t);}}else if(jsonmode&&(d==='x'||d==='X')){warningAt("Avoid 0x-. '{a}'.",line,character,t);}}
-if(t.substr(t.length-1)==='.'){warningAt("A trailing decimal point can be confused with a dot '{a}'.",line,character,t);}
-return it('(number)',t);}
-switch(t){case'"':case"'":return string(t);case'//':if(src||(xmode&&xmode!=='script')){warningAt("Unexpected comment.",line,character);}else if(xmode==='script'&&/<\s*\//i.test(s)){warningAt("Unexpected <\/ in comment.",line,character);}else if((option.safe||xmode==='script')&&ax.test(s)){warningAt("Dangerous comment.",line,character);}
-s='';token.comment=true;break;case'/*':if(src||(xmode&&xmode!=='script'&&xmode!=='style'&&xmode!=='styleproperty')){warningAt("Unexpected comment.",line,character);}
-if(option.safe&&ax.test(s)){warningAt("ADsafe comment violation.",line,character);}
-for(;;){i=s.search(lx);if(i>=0){break;}
-if(!nextLine()){errorAt("Unclosed comment.",line,character);}else{if(option.safe&&ax.test(s)){warningAt("ADsafe comment violation.",line,character);}}}
-character+=i+2;if(s.substr(i,1)==='/'){errorAt("Nested comment.",line,character);}
-s=s.substr(i+2);token.comment=true;break;case'/*members':case'/*member':case'/*jslint':case'/*global':case'*/':return{value:t,type:'special',line:line,character:character,from:from};case'':break;case'/':if(prereg){depth=0;captures=0;l=0;for(;;){b=true;c=s.charAt(l);l+=1;switch(c){case'':errorAt("Unclosed regular expression.",line,from);return;case'/':if(depth>0){warningAt("Unescaped '{a}'.",line,from+l,'/');}
-c=s.substr(0,l-1);q={g:true,i:true,m:true};while(q[s.charAt(l)]===true){q[s.charAt(l)]=false;l+=1;}
-character+=l;s=s.substr(l);return it('(regexp)',c);case'\\':c=s.charAt(l);if(c<' '){warningAt("Unexpected control character in regular expression.",line,from+l);}else if(c==='<'){warningAt("Unexpected escaped character '{a}' in regular expression.",line,from+l,c);}
-l+=1;break;case'(':depth+=1;b=false;if(s.charAt(l)==='?'){l+=1;switch(s.charAt(l)){case':':case'=':case'!':l+=1;break;default:warningAt("Expected '{a}' and instead saw '{b}'.",line,from+l,':',s.charAt(l));}}else{captures+=1;}
-break;case'|':b=false;break;case')':if(depth===0){warningAt("Unescaped '{a}'.",line,from+l,')');}else{depth-=1;}
-break;case' ':q=1;while(s.charAt(l)===' '){l+=1;q+=1;}
-if(q>1){warningAt("Spaces are hard to count. Use {{a}}.",line,from+l,q);}
-break;case'[':c=s.charAt(l);if(c==='^'){l+=1;if(option.regexp){warningAt("Insecure '{a}'.",line,from+l,c);}}
-q=false;if(c===']'){warningAt("Empty class.",line,from+l-1);q=true;}
-klass:do{c=s.charAt(l);l+=1;switch(c){case'[':case'^':warningAt("Unescaped '{a}'.",line,from+l,c);q=true;break;case'-':if(q){q=false;}else{warningAt("Unescaped '{a}'.",line,from+l,'-');q=true;}
-break;case']':if(!q){warningAt("Unescaped '{a}'.",line,from+l-1,'-');}
-break klass;case'\\':c=s.charAt(l);if(c<' '){warningAt("Unexpected control character in regular expression.",line,from+l);}else if(c==='<'){warningAt("Unexpected escaped character '{a}' in regular expression.",line,from+l,c);}
-l+=1;q=true;break;case'/':warningAt("Unescaped '{a}'.",line,from+l-1,'/');q=true;break;case'<':if(xmode==='script'){c=s.charAt(l);if(c==='!'||c==='/'){warningAt("HTML confusion in regular expression '<{a}'.",line,from+l,c);}}
-q=true;break;default:q=true;}}while(c);break;case'.':if(option.regexp){warningAt("Insecure '{a}'.",line,from+l,c);}
-break;case']':case'?':case'{':case'}':case'+':case'*':warningAt("Unescaped '{a}'.",line,from+l,c);break;case'<':if(xmode==='script'){c=s.charAt(l);if(c==='!'||c==='/'){warningAt("HTML confusion in regular expression '<{a}'.",line,from+l,c);}}}
-if(b){switch(s.charAt(l)){case'?':case'+':case'*':l+=1;if(s.charAt(l)==='?'){l+=1;}
-break;case'{':l+=1;c=s.charAt(l);if(c<'0'||c>'9'){warningAt("Expected a number and instead saw '{a}'.",line,from+l,c);}
-l+=1;low=+c;for(;;){c=s.charAt(l);if(c<'0'||c>'9'){break;}
-l+=1;low=+c+(low*10);}
-high=low;if(c===','){l+=1;high=Infinity;c=s.charAt(l);if(c>='0'&&c<='9'){l+=1;high=+c;for(;;){c=s.charAt(l);if(c<'0'||c>'9'){break;}
-l+=1;high=+c+(high*10);}}}
-if(s.charAt(l)!=='}'){warningAt("Expected '{a}' and instead saw '{b}'.",line,from+l,'}',c);}else{l+=1;}
-if(s.charAt(l)==='?'){l+=1;}
-if(low>high){warningAt("'{a}' should not be greater than '{b}'.",line,from+l,low,high);}}}}
-c=s.substr(0,l-1);character+=l;s=s.substr(l);return it('(regexp)',c);}
-return it('(punctuator)',t);case'<!--':l=line;c=character;for(;;){i=s.indexOf('--');if(i>=0){break;}
-i=s.indexOf('<!');if(i>=0){errorAt("Nested HTML comment.",line,character+i);}
-if(!nextLine()){errorAt("Unclosed HTML comment.",l,c);}}
-l=s.indexOf('<!');if(l>=0&&l<i){errorAt("Nested HTML comment.",line,character+l);}
-character+=i;if(s[i+2]!=='>'){errorAt("Expected -->.",line,character);}
-character+=3;s=s.slice(i+3);break;case'#':if(xmode==='html'||xmode==='styleproperty'){for(;;){c=s.charAt(0);if((c<'0'||c>'9')&&(c<'a'||c>'f')&&(c<'A'||c>'F')){break;}
-character+=1;s=s.substr(1);t+=c;}
-if(t.length!==4&&t.length!==7){warningAt("Bad hex color '{a}'.",line,from+l,t);}
-return it('(color)',t);}
-return it('(punctuator)',t);default:if(xmode==='outer'&&c==='&'){character+=1;s=s.substr(1);for(;;){c=s.charAt(0);character+=1;s=s.substr(1);if(c===';'){break;}
-if(!((c>='0'&&c<='9')||(c>='a'&&c<='z')||c==='#')){errorAt("Bad entity",line,from+l,character);}}
-break;}
-return it('(punctuator)',t);}}}}};}());function addlabel(t,type){if(option.safe&&funct['(global)']&&typeof predefined[t]!=='boolean'){warning('ADsafe global: '+t+'.',token);}else if(t==='hasOwnProperty'){warning("'hasOwnProperty' is a really bad name.");}
-if(is_own(funct,t)&&!funct['(global)']){warning(funct[t]===true?"'{a}' was used before it was defined.":"'{a}' is already defined.",nexttoken,t);}
-funct[t]=type;if(funct['(global)']){global[t]=funct;if(is_own(implied,t)){warning("'{a}' was used before it was defined.",nexttoken,t);delete implied[t];}}else{scope[t]=funct;}}
-function doOption(){var b,obj,filter,o=nexttoken.value,t,v;switch(o){case'*/':error("Unbegun comment.");break;case'/*members':case'/*member':o='/*members';if(!membersOnly){membersOnly={};}
-obj=membersOnly;break;case'/*jslint':if(option.safe){warning("ADsafe restriction.");}
-obj=option;filter=boolOptions;break;case'/*global':if(option.safe){warning("ADsafe restriction.");}
-obj=predefined;break;default:}
-t=lex.token();loop:for(;;){for(;;){if(t.type==='special'&&t.value==='*/'){break loop;}
-if(t.id!=='(endline)'&&t.id!==','){break;}
-t=lex.token();}
-if(t.type!=='(string)'&&t.type!=='(identifier)'&&o!=='/*members'){error("Bad option.",t);}
-v=lex.token();if(v.id===':'){v=lex.token();if(obj===membersOnly){error("Expected '{a}' and instead saw '{b}'.",t,'*/',':');}
-if(t.value==='indent'&&o==='/*jslint'){b=+v.value;if(typeof b!=='number'||!isFinite(b)||b<=0||Math.floor(b)!==b){error("Expected a small integer and instead saw '{a}'.",v,v.value);}
-obj.white=true;obj.indent=b;}else if(t.value==='maxerr'&&o==='/*jslint'){b=+v.value;if(typeof b!=='number'||!isFinite(b)||b<=0||Math.floor(b)!==b){error("Expected a small integer and instead saw '{a}'.",v,v.value);}
-obj.maxerr=b;}else if(v.value==='true'){obj[t.value]=true;}else if(v.value==='false'){obj[t.value]=false;}else{error("Bad option value.",v);}
-t=lex.token();}else{if(o==='/*jslint'){error("Missing option value.",t);}
-obj[t.value]=false;t=v;}}
-if(filter){assume();}}
-function peek(p){var i=p||0,j=0,t;while(j<=i){t=lookahead[j];if(!t){t=lookahead[j]=lex.token();}
-j+=1;}
-return t;}
-function advance(id,t){switch(token.id){case'(number)':if(nexttoken.id==='.'){warning("A dot following a number can be confused with a decimal point.",token);}
-break;case'-':if(nexttoken.id==='-'||nexttoken.id==='--'){warning("Confusing minusses.");}
-break;case'+':if(nexttoken.id==='+'||nexttoken.id==='++'){warning("Confusing plusses.");}
-break;}
-if(token.type==='(string)'||token.identifier){anonname=token.value;}
-if(id&&nexttoken.id!==id){if(t){if(nexttoken.id==='(end)'){warning("Unmatched '{a}'.",t,t.id);}else{warning("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",nexttoken,id,t.id,t.line,nexttoken.value);}}else if(nexttoken.type!=='(identifier)'||nexttoken.value!==id){warning("Expected '{a}' and instead saw '{b}'.",nexttoken,id,nexttoken.value);}}
-prevtoken=token;token=nexttoken;for(;;){nexttoken=lookahead.shift()||lex.token();if(nexttoken.id==='(end)'||nexttoken.id==='(error)'){return;}
-if(nexttoken.type==='special'){doOption();}else{if(nexttoken.id!=='(endline)'){break;}}}}
-function parse(rbp,initial){var left;if(nexttoken.id==='(end)'){error("Unexpected early end of program.",token);}
-advance();if(option.safe&&typeof predefined[token.value]==='boolean'&&(nexttoken.id!=='('&&nexttoken.id!=='.')){warning('ADsafe violation.',token);}
-if(initial){anonname='anonymous';funct['(verb)']=token.value;}
-if(initial===true&&token.fud){left=token.fud();}else{if(token.nud){left=token.nud();}else{if(nexttoken.type==='(number)'&&token.id==='.'){warning("A leading decimal point can be confused with a dot: '.{a}'.",token,nexttoken.value);advance();return token;}else{error("Expected an identifier and instead saw '{a}'.",token,token.id);}}
-while(rbp<nexttoken.lbp){advance();if(token.led){left=token.led(left);}else{error("Expected an operator and instead saw '{a}'.",token,token.id);}}}
-return left;}
-function adjacent(left,right){left=left||token;right=right||nexttoken;if(option.white||xmode==='styleproperty'||xmode==='style'){if(left.character!==right.from&&left.line===right.line){warning("Unexpected space after '{a}'.",right,left.value);}}}
-function nospace(left,right){left=left||token;right=right||nexttoken;if(option.white&&!left.comment){if(left.line===right.line){adjacent(left,right);}}}
-function nonadjacent(left,right){if(option.white){left=left||token;right=right||nexttoken;if(left.line===right.line&&left.character===right.from){warning("Missing space after '{a}'.",nexttoken,left.value);}}}
-function nobreaknonadjacent(left,right){left=left||token;right=right||nexttoken;if(!option.laxbreak&&left.line!==right.line){warning("Bad line breaking before '{a}'.",right,right.id);}else if(option.white){left=left||token;right=right||nexttoken;if(left.character===right.from){warning("Missing space after '{a}'.",nexttoken,left.value);}}}
-function indentation(bias){var i;if(option.white&&nexttoken.id!=='(end)'){i=indent+(bias||0);if(nexttoken.from!==i){warning("Expected '{a}' to have an indentation at {b} instead at {c}.",nexttoken,nexttoken.value,i,nexttoken.from);}}}
-function nolinebreak(t){t=t||token;if(t.line!==nexttoken.line){warning("Line breaking error '{a}'.",t,t.value);}}
-function comma(){if(token.line!==nexttoken.line){if(!option.laxbreak){warning("Bad line breaking before '{a}'.",token,nexttoken.id);}}else if(token.character!==nexttoken.from&&option.white){warning("Unexpected space after '{a}'.",nexttoken,token.value);}
-advance(',');nonadjacent(token,nexttoken);}
-function symbol(s,p){var x=syntax[s];if(!x||typeof x!=='object'){syntax[s]=x={id:s,lbp:p,value:s};}
-return x;}
-function delim(s){return symbol(s,0);}
-function stmt(s,f){var x=delim(s);x.identifier=x.reserved=true;x.fud=f;return x;}
-function blockstmt(s,f){var x=stmt(s,f);x.block=true;return x;}
-function reserveName(x){var c=x.id.charAt(0);if((c>='a'&&c<='z')||(c>='A'&&c<='Z')){x.identifier=x.reserved=true;}
-return x;}
-function prefix(s,f){var x=symbol(s,150);reserveName(x);x.nud=(typeof f==='function')?f:function(){this.right=parse(150);this.arity='unary';if(this.id==='++'||this.id==='--'){if(option.plusplus){warning("Unexpected use of '{a}'.",this,this.id);}else if((!this.right.identifier||this.right.reserved)&&this.right.id!=='.'&&this.right.id!=='['){warning("Bad operand.",this);}}
-return this;};return x;}
-function type(s,f){var x=delim(s);x.type=s;x.nud=f;return x;}
-function reserve(s,f){var x=type(s,f);x.identifier=x.reserved=true;return x;}
-function reservevar(s,v){return reserve(s,function(){if(this.id==='this'||this.id==='arguments'){if(strict_mode&&funct['(global)']){warning("Strict violation.",this);}else if(option.safe){warning("ADsafe violation.",this);}}
-return this;});}
-function infix(s,f,p,w){var x=symbol(s,p);reserveName(x);x.led=function(left){if(!w){nobreaknonadjacent(prevtoken,token);nonadjacent(token,nexttoken);}
-if(typeof f==='function'){return f(left,this);}else{this.left=left;this.right=parse(p);return this;}};return x;}
-function relation(s,f){var x=symbol(s,100);x.led=function(left){nobreaknonadjacent(prevtoken,token);nonadjacent(token,nexttoken);var right=parse(100);if((left&&left.id==='NaN')||(right&&right.id==='NaN')){warning("Use the isNaN function to compare with NaN.",this);}else if(f){f.apply(this,[left,right]);}
-if(left.id==='!'){warning("Confusing use of '{a}'.",left,'!');}
-if(right.id==='!'){warning("Confusing use of '{a}'.",left,'!');}
-this.left=left;this.right=right;return this;};return x;}
-function isPoorRelation(node){return node&&((node.type==='(number)'&&+node.value===0)||(node.type==='(string)'&&node.value===' ')||node.type==='true'||node.type==='false'||node.type==='undefined'||node.type==='null');}
-function assignop(s,f){symbol(s,20).exps=true;return infix(s,function(left,that){var l;that.left=left;if(predefined[left.value]===false&&scope[left.value]['(global)']===true){warning('Read only.',left);}
-if(option.safe){l=left;do{if(typeof predefined[l.value]==='boolean'){warning('ADsafe violation.',l);}
-l=l.left;}while(l);}
-if(left){if(left.id==='.'||left.id==='['){if(!left.left||left.left.value==='arguments'){warning('Bad assignment.',that);}
-that.right=parse(19);return that;}else if(left.identifier&&!left.reserved){if(funct[left.value]==='exception'){warning("Do not assign to the exception parameter.",left);}
-that.right=parse(19);return that;}
-if(left===syntax['function']){warning("Expected an identifier in an assignment and instead saw a function invocation.",token);}}
-error("Bad assignment.",that);},20);}
-function bitwise(s,f,p){var x=symbol(s,p);reserveName(x);x.led=(typeof f==='function')?f:function(left){if(option.bitwise){warning("Unexpected use of '{a}'.",this,this.id);}
-this.left=left;this.right=parse(p);return this;};return x;}
-function bitwiseassignop(s){symbol(s,20).exps=true;return infix(s,function(left,that){if(option.bitwise){warning("Unexpected use of '{a}'.",that,that.id);}
-nonadjacent(prevtoken,token);nonadjacent(token,nexttoken);if(left){if(left.id==='.'||left.id==='['||(left.identifier&&!left.reserved)){parse(19);return that;}
-if(left===syntax['function']){warning("Expected an identifier in an assignment, and instead saw a function invocation.",token);}
-return that;}
-error("Bad assignment.",that);},20);}
-function suffix(s,f){var x=symbol(s,150);x.led=function(left){if(option.plusplus){warning("Unexpected use of '{a}'.",this,this.id);}else if((!left.identifier||left.reserved)&&left.id!=='.'&&left.id!=='['){warning("Bad operand.",this);}
-this.left=left;return this;};return x;}
-function optionalidentifier(){if(nexttoken.reserved){warning("Expected an identifier and instead saw '{a}' (a reserved word).",nexttoken,nexttoken.id);}
-if(nexttoken.identifier){advance();return token.value;}}
-function identifier(){var i=optionalidentifier();if(i){return i;}
-if(token.id==='function'&&nexttoken.id==='('){warning("Missing name in function statement.");}else{error("Expected an identifier and instead saw '{a}'.",nexttoken,nexttoken.value);}}
-function reachable(s){var i=0,t;if(nexttoken.id!==';'||noreach){return;}
-for(;;){t=peek(i);if(t.reach){return;}
-if(t.id!=='(endline)'){if(t.id==='function'){warning("Inner functions should be listed at the top of the outer function.",t);break;}
-warning("Unreachable '{a}' after '{b}'.",t,t.value,s);break;}
-i+=1;}}
-function statement(noindent){var i=indent,r,s=scope,t=nexttoken;if(t.id===';'){warning("Unnecessary semicolon.",t);advance(';');return;}
-if(t.identifier&&!t.reserved&&peek().id===':'){advance();advance(':');scope=Object.create(s);addlabel(t.value,'label');if(!nexttoken.labelled){warning("Label '{a}' on {b} statement.",nexttoken,t.value,nexttoken.value);}
-if(jx.test(t.value+':')){warning("Label '{a}' looks like a javascript url.",t,t.value);}
-nexttoken.label=t.value;t=nexttoken;}
-if(!noindent){indentation();}
-if(nexttoken.id==='new'){warning("'new' should not be used as a statement.");}
-r=parse(0,true);if(!t.block){if(!r||!r.exps){warning("Expected an assignment or function call and instead saw an expression.",token);}
-if(nexttoken.id!==';'){warningAt("Missing semicolon.",token.line,token.from+token.value.length);}else{adjacent(token,nexttoken);advance(';');nonadjacent(token,nexttoken);}}
-indent=i;scope=s;return r;}
-function use_strict(){if(nexttoken.value==='use strict'){advance();advance(';');strict_mode=true;return true;}else{return false;}}
-function statements(begin){var a=[],f,p;if(begin&&!use_strict()&&option.strict){warning('Missing "use strict" statement.',nexttoken);}
-if(option.adsafe){switch(begin){case'script':if(!adsafe_may){if(nexttoken.value!=='ADSAFE'||peek(0).id!=='.'||(peek(1).value!=='id'&&peek(1).value!=='go')){error('ADsafe violation: Missing ADSAFE.id or ADSAFE.go.',nexttoken);}}
-if(nexttoken.value==='ADSAFE'&&peek(0).id==='.'&&peek(1).value==='id'){if(adsafe_may){error('ADsafe violation.',nexttoken);}
-advance('ADSAFE');advance('.');advance('id');advance('(');if(nexttoken.value!==adsafe_id){error('ADsafe violation: id does not match.',nexttoken);}
-advance('(string)');advance(')');advance(';');adsafe_may=true;}
-break;case'lib':if(nexttoken.value==='ADSAFE'){advance('ADSAFE');advance('.');advance('lib');advance('(');advance('(string)');comma();f=parse(0);if(f.id!=='function'){error('The second argument to lib must be a function.',f);}
-p=f.funct['(params)'];p=p&&p.join(', ');if(p&&p!=='lib'){error("Expected '{a}' and instead saw '{b}'.",f,'(lib)','('+p+')');}
-advance(')');advance(';');return a;}else{error("ADsafe lib violation.");}}}
-while(!nexttoken.reach&&nexttoken.id!=='(end)'){if(nexttoken.id===';'){warning("Unnecessary semicolon.");advance(';');}else{a.push(statement());}}
-return a;}
-function block(f){var a,b=inblock,old_indent=indent,s=scope,t;inblock=f;scope=Object.create(scope);nonadjacent(token,nexttoken);t=nexttoken;if(nexttoken.id==='{'){advance('{');if(nexttoken.id!=='}'||token.line!==nexttoken.line){indent+=option.indent;while(!f&&nexttoken.from>indent){indent+=option.indent;}
-if(!f){use_strict();}
-a=statements();indent-=option.indent;indentation();}
-advance('}',t);indent=old_indent;}else{warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'{',nexttoken.value);noreach=true;a=[statement()];noreach=false;}
-funct['(verb)']=null;scope=s;inblock=b;return a;}
-function idValue(){return this;}
-function countMember(m){if(membersOnly&&typeof membersOnly[m]!=='boolean'){warning("Unexpected /*member '{a}'.",token,m);}
-if(typeof member[m]==='number'){member[m]+=1;}else{member[m]=1;}}
-function note_implied(token){var name=token.value,line=token.line,a=implied[name];if(typeof a==='function'){a=false;}
-if(!a){a=[line];implied[name]=a;}else if(a[a.length-1]!==line){a.push(line);}}
-function cssName(){if(nexttoken.identifier){advance();return true;}}
-function cssNumber(){if(nexttoken.id==='-'){advance('-');adjacent();nolinebreak();}
-if(nexttoken.type==='(number)'){advance('(number)');return true;}}
-function cssString(){if(nexttoken.type==='(string)'){advance();return true;}}
-function cssColor(){var i,number;if(nexttoken.identifier){if(nexttoken.value==='rgb'){advance();advance('(');for(i=0;i<3;i+=1){if(i){advance(',');}
-number=nexttoken.value;if(nexttoken.type!=='(number)'||number<0){warning("Expected a positive number and instead saw '{a}'",nexttoken,number);advance();}else{advance();if(nexttoken.id==='%'){advance('%');if(number>100){warning("Expected a percentage and instead saw '{a}'",token,number);}}else{if(number>255){warning("Expected a small number and instead saw '{a}'",token,number);}}}}
-advance(')');return true;}else if(cssColorData[nexttoken.value]===true){advance();return true;}}else if(nexttoken.type==='(color)'){advance();return true;}
-return false;}
-function cssLength(){if(nexttoken.id==='-'){advance('-');adjacent();nolinebreak();}
-if(nexttoken.type==='(number)'){advance();if(nexttoken.type!=='(string)'&&cssLengthData[nexttoken.value]===true){adjacent();advance();}else if(+token.value!==0){warning("Expected a linear unit and instead saw '{a}'.",nexttoken,nexttoken.value);}
-return true;}
-return false;}
-function cssLineHeight(){if(nexttoken.id==='-'){advance('-');adjacent();}
-if(nexttoken.type==='(number)'){advance();if(nexttoken.type!=='(string)'&&cssLengthData[nexttoken.value]===true){adjacent();advance();}
-return true;}
-return false;}
-function cssWidth(){if(nexttoken.identifier){switch(nexttoken.value){case'thin':case'medium':case'thick':advance();return true;}}else{return cssLength();}}
-function cssMargin(){if(nexttoken.identifier){if(nexttoken.value==='auto'){advance();return true;}}else{return cssLength();}}
-function cssAttr(){if(nexttoken.identifier&&nexttoken.value==='attr'){advance();advance('(');if(!nexttoken.identifier){warning("Expected a name and instead saw '{a}'.",nexttoken,nexttoken.value);}
-advance();advance(')');return true;}
-return false;}
-function cssCommaList(){while(nexttoken.id!==';'){if(!cssName()&&!cssString()){warning("Expected a name and instead saw '{a}'.",nexttoken,nexttoken.value);}
-if(nexttoken.id!==','){return true;}
-comma();}}
-function cssCounter(){if(nexttoken.identifier&&nexttoken.value==='counter'){advance();advance('(');if(!nexttoken.identifier){}
-advance();if(nexttoken.id===','){comma();if(nexttoken.type!=='(string)'){warning("Expected a string and instead saw '{a}'.",nexttoken,nexttoken.value);}
-advance();}
-advance(')');return true;}
-if(nexttoken.identifier&&nexttoken.value==='counters'){advance();advance('(');if(!nexttoken.identifier){warning("Expected a name and instead saw '{a}'.",nexttoken,nexttoken.value);}
-advance();if(nexttoken.id===','){comma();if(nexttoken.type!=='(string)'){warning("Expected a string and instead saw '{a}'.",nexttoken,nexttoken.value);}
-advance();}
-if(nexttoken.id===','){comma();if(nexttoken.type!=='(string)'){warning("Expected a string and instead saw '{a}'.",nexttoken,nexttoken.value);}
-advance();}
-advance(')');return true;}
-return false;}
-function cssShape(){var i;if(nexttoken.identifier&&nexttoken.value==='rect'){advance();advance('(');for(i=0;i<4;i+=1){if(!cssLength()){warning("Expected a number and instead saw '{a}'.",nexttoken,nexttoken.value);break;}}
-advance(')');return true;}
-return false;}
-function cssUrl(){var c,url;if(nexttoken.identifier&&nexttoken.value==='url'){nexttoken=lex.range('(',')');url=nexttoken.value;c=url.charAt(0);if(c==='"'||c==='\''){if(url.slice(-1)!==c){warning("Bad url string.");}else{url=url.slice(1,-1);if(url.indexOf(c)>=0){warning("Bad url string.");}}}
-if(!url){warning("Missing url.");}
-advance();if(option.safe&&ux.test(url)){error("ADsafe URL violation.");}
-urls.push(url);return true;}
-return false;}
-cssAny=[cssUrl,function(){for(;;){if(nexttoken.identifier){switch(nexttoken.value.toLowerCase()){case'url':cssUrl();break;case'expression':warning("Unexpected expression '{a}'.",nexttoken,nexttoken.value);advance();break;default:advance();}}else{if(nexttoken.id===';'||nexttoken.id==='!'||nexttoken.id==='(end)'||nexttoken.id==='}'){return true;}
-advance();}}}];cssBorderStyle=['none','hidden','dotted','dashed','solid','double','ridge','inset','outset'];cssBreak=['auto','always','avoid','left','right'];cssOverflow=['auto','hidden','scroll','visible'];cssAttributeData={background:[true,'background-attachment','background-color','background-image','background-position','background-repeat'],'background-attachment':['scroll','fixed'],'background-color':['transparent',cssColor],'background-image':['none',cssUrl],'background-position':[2,[cssLength,'top','bottom','left','right','center']],'background-repeat':['repeat','repeat-x','repeat-y','no-repeat'],'border':[true,'border-color','border-style','border-width'],'border-bottom':[true,'border-bottom-color','border-bottom-style','border-bottom-width'],'border-bottom-color':cssColor,'border-bottom-style':cssBorderStyle,'border-bottom-width':cssWidth,'border-collapse':['collapse','separate'],'border-color':['transparent',4,cssColor],'border-left':[true,'border-left-color','border-left-style','border-left-width'],'border-left-color':cssColor,'border-left-style':cssBorderStyle,'border-left-width':cssWidth,'border-right':[true,'border-right-color','border-right-style','border-right-width'],'border-right-color':cssColor,'border-right-style':cssBorderStyle,'border-right-width':cssWidth,'border-spacing':[2,cssLength],'border-style':[4,cssBorderStyle],'border-top':[true,'border-top-color','border-top-style','border-top-width'],'border-top-color':cssColor,'border-top-style':cssBorderStyle,'border-top-width':cssWidth,'border-width':[4,cssWidth],bottom:[cssLength,'auto'],'caption-side':['bottom','left','right','top'],clear:['both','left','none','right'],clip:[cssShape,'auto'],color:cssColor,content:['open-quote','close-quote','no-open-quote','no-close-quote',cssString,cssUrl,cssCounter,cssAttr],'counter-increment':[cssName,'none'],'counter-reset':[cssName,'none'],cursor:[cssUrl,'auto','crosshair','default','e-resize','help','move','n-resize','ne-resize','nw-resize','pointer','s-resize','se-resize','sw-resize','w-resize','text','wait'],direction:['ltr','rtl'],display:['block','compact','inline','inline-block','inline-table','list-item','marker','none','run-in','table','table-caption','table-cell','table-column','table-column-group','table-footer-group','table-header-group','table-row','table-row-group'],'empty-cells':['show','hide'],'float':['left','none','right'],font:['caption','icon','menu','message-box','small-caption','status-bar',true,'font-size','font-style','font-weight','font-family'],'font-family':cssCommaList,'font-size':['xx-small','x-small','small','medium','large','x-large','xx-large','larger','smaller',cssLength],'font-size-adjust':['none',cssNumber],'font-stretch':['normal','wider','narrower','ultra-condensed','extra-condensed','condensed','semi-condensed','semi-expanded','expanded','extra-expanded'],'font-style':['normal','italic','oblique'],'font-variant':['normal','small-caps'],'font-weight':['normal','bold','bolder','lighter',cssNumber],height:[cssLength,'auto'],left:[cssLength,'auto'],'letter-spacing':['normal',cssLength],'line-height':['normal',cssLineHeight],'list-style':[true,'list-style-image','list-style-position','list-style-type'],'list-style-image':['none',cssUrl],'list-style-position':['inside','outside'],'list-style-type':['circle','disc','square','decimal','decimal-leading-zero','lower-roman','upper-roman','lower-greek','lower-alpha','lower-latin','upper-alpha','upper-latin','hebrew','katakana','hiragana-iroha','katakana-oroha','none'],margin:[4,cssMargin],'margin-bottom':cssMargin,'margin-left':cssMargin,'margin-right':cssMargin,'margin-top':cssMargin,'marker-offset':[cssLength,'auto'],'max-height':[cssLength,'none'],'max-width':[cssLength,'none'],'min-height':cssLength,'min-width':cssLength,opacity:cssNumber,outline:[true,'outline-color','outline-style','outline-width'],'outline-color':['invert',cssColor],'outline-style':['dashed','dotted','double','groove','inset','none','outset','ridge','solid'],'outline-width':cssWidth,overflow:cssOverflow,'overflow-x':cssOverflow,'overflow-y':cssOverflow,padding:[4,cssLength],'padding-bottom':cssLength,'padding-left':cssLength,'padding-right':cssLength,'padding-top':cssLength,'page-break-after':cssBreak,'page-break-before':cssBreak,position:['absolute','fixed','relative','static'],quotes:[8,cssString],right:[cssLength,'auto'],'table-layout':['auto','fixed'],'text-align':['center','justify','left','right'],'text-decoration':['none','underline','overline','line-through','blink'],'text-indent':cssLength,'text-shadow':['none',4,[cssColor,cssLength]],'text-transform':['capitalize','uppercase','lowercase','none'],top:[cssLength,'auto'],'unicode-bidi':['normal','embed','bidi-override'],'vertical-align':['baseline','bottom','sub','super','top','text-top','middle','text-bottom',cssLength],visibility:['visible','hidden','collapse'],'white-space':['normal','nowrap','pre','pre-line','pre-wrap','inherit'],width:[cssLength,'auto'],'word-spacing':['normal',cssLength],'word-wrap':['break-word','normal'],'z-index':['auto',cssNumber]};function styleAttribute(){var v;while(nexttoken.id==='*'||nexttoken.id==='#'||nexttoken.value==='_'){if(!option.css){warning("Unexpected '{a}'.",nexttoken,nexttoken.value);}
-advance();}
-if(nexttoken.id==='-'){if(!option.css){warning("Unexpected '{a}'.",nexttoken,nexttoken.value);}
-advance('-');if(!nexttoken.identifier){warning("Expected a non-standard style attribute and instead saw '{a}'.",nexttoken,nexttoken.value);}
-advance();return cssAny;}else{if(!nexttoken.identifier){warning("Excepted a style attribute, and instead saw '{a}'.",nexttoken,nexttoken.value);}else{if(is_own(cssAttributeData,nexttoken.value)){v=cssAttributeData[nexttoken.value];}else{v=cssAny;if(!option.css){warning("Unrecognized style attribute '{a}'.",nexttoken,nexttoken.value);}}}
-advance();return v;}}
-function styleValue(v){var i=0,n,once,match,round,start=0,vi;switch(typeof v){case'function':return v();case'string':if(nexttoken.identifier&&nexttoken.value===v){advance();return true;}
-return false;}
-for(;;){if(i>=v.length){return false;}
-vi=v[i];i+=1;if(vi===true){break;}else if(typeof vi==='number'){n=vi;vi=v[i];i+=1;}else{n=1;}
-match=false;while(n>0){if(styleValue(vi)){match=true;n-=1;}else{break;}}
-if(match){return true;}}
-start=i;once=[];for(;;){round=false;for(i=start;i<v.length;i+=1){if(!once[i]){if(styleValue(cssAttributeData[v[i]])){match=true;round=true;once[i]=true;break;}}}
-if(!round){return match;}}}
-function styleChild(){if(nexttoken.id==='(number)'){advance();if(nexttoken.value==='n'&&nexttoken.identifier){adjacent();advance();if(nexttoken.id==='+'){adjacent();advance('+');adjacent();advance('(number)');}}
-return;}else{switch(nexttoken.value){case'odd':case'even':if(nexttoken.identifier){advance();return;}}}
-warning("Unexpected token '{a}'.",nexttoken,nexttoken.value);}
-function substyle(){var v;for(;;){if(nexttoken.id==='}'||nexttoken.id==='(end)'||xquote&&nexttoken.id===xquote){return;}
-while(nexttoken.id===';'){warning("Misplaced ';'.");advance(';');}
-v=styleAttribute();advance(':');if(nexttoken.identifier&&nexttoken.value==='inherit'){advance();}else{if(!styleValue(v)){warning("Unexpected token '{a}'.",nexttoken,nexttoken.value);advance();}}
-if(nexttoken.id==='!'){advance('!');adjacent();if(nexttoken.identifier&&nexttoken.value==='important'){advance();}else{warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'important',nexttoken.value);}}
-if(nexttoken.id==='}'||nexttoken.id===xquote){warning("Missing '{a}'.",nexttoken,';');}else{advance(';');}}}
-function styleSelector(){if(nexttoken.identifier){if(!is_own(htmltag,nexttoken.value)){warning("Expected a tagName, and instead saw {a}.",nexttoken,nexttoken.value);}
-advance();}else{switch(nexttoken.id){case'>':case'+':advance();styleSelector();break;case':':advance(':');switch(nexttoken.value){case'active':case'after':case'before':case'checked':case'disabled':case'empty':case'enabled':case'first-child':case'first-letter':case'first-line':case'first-of-type':case'focus':case'hover':case'last-of-type':case'link':case'only-of-type':case'root':case'target':case'visited':advance();break;case'lang':advance();advance('(');if(!nexttoken.identifier){warning("Expected a lang code, and instead saw :{a}.",nexttoken,nexttoken.value);}
-advance(')');break;case'nth-child':case'nth-last-child':case'nth-last-of-type':case'nth-of-type':advance();advance('(');styleChild();advance(')');break;case'not':advance();advance('(');if(nexttoken.id===':'&&peek(0).value==='not'){warning("Nested not.");}
-styleSelector();advance(')');break;default:warning("Expected a pseudo, and instead saw :{a}.",nexttoken,nexttoken.value);}
-break;case'#':advance('#');if(!nexttoken.identifier){warning("Expected an id, and instead saw #{a}.",nexttoken,nexttoken.value);}
-advance();break;case'*':advance('*');break;case'.':advance('.');if(!nexttoken.identifier){warning("Expected a class, and instead saw #.{a}.",nexttoken,nexttoken.value);}
-advance();break;case'[':advance('[');if(!nexttoken.identifier){warning("Expected an attribute, and instead saw [{a}].",nexttoken,nexttoken.value);}
-advance();if(nexttoken.id==='='||nexttoken.value==='~='||nexttoken.value==='$='||nexttoken.value==='|='||nexttoken.id==='*='||nexttoken.id==='^='){advance();if(nexttoken.type!=='(string)'){warning("Expected a string, and instead saw {a}.",nexttoken,nexttoken.value);}
-advance();}
-advance(']');break;default:error("Expected a CSS selector, and instead saw {a}.",nexttoken,nexttoken.value);}}}
-function stylePattern(){var name;if(nexttoken.id==='{'){warning("Expected a style pattern, and instead saw '{a}'.",nexttoken,nexttoken.id);}else if(nexttoken.id==='@'){advance('@');name=nexttoken.value;if(nexttoken.identifier&&atrule[name]===true){advance();return name;}
-warning("Expected an at-rule, and instead saw @{a}.",nexttoken,name);}
-for(;;){styleSelector();if(nexttoken.id==='</'||nexttoken.id==='{'||nexttoken.id==='(end)'){return'';}
-if(nexttoken.id===','){comma();}}}
-function styles(){var i;while(nexttoken.id==='@'){i=peek();if(i.identifier&&i.value==='import'){advance('@');advance();if(!cssUrl()){warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'url',nexttoken.value);advance();}
-advance(';');}else{break;}}
-while(nexttoken.id!=='</'&&nexttoken.id!=='(end)'){stylePattern();xmode='styleproperty';if(nexttoken.id===';'){advance(';');}else{advance('{');substyle();xmode='style';advance('}');}}}
-function doBegin(n){if(n!=='html'&&!option.fragment){if(n==='div'&&option.adsafe){error("ADSAFE: Use the fragment option.");}else{error("Expected '{a}' and instead saw '{b}'.",token,'html',n);}}
-if(option.adsafe){if(n==='html'){error("Currently, ADsafe does not operate on whole HTML documents. It operates on <div> fragments and .js files.",token);}
-if(option.fragment){if(n!=='div'){error("ADsafe violation: Wrap the widget in a div.",token);}}else{error("Use the fragment option.",token);}}
-option.browser=true;assume();}
-function doAttribute(n,a,v){var u,x;if(a==='id'){u=typeof v==='string'?v.toUpperCase():'';if(ids[u]===true){warning("Duplicate id='{a}'.",nexttoken,v);}
-if(option.adsafe){if(adsafe_id){if(v.slice(0,adsafe_id.length)!==adsafe_id){warning("ADsafe violation: An id must have a '{a}' prefix",nexttoken,adsafe_id);}else if(!/^[A-Z]+_[A-Z]+$/.test(v)){warning("ADSAFE violation: bad id.");}}else{adsafe_id=v;if(!/^[A-Z]+_$/.test(v)){warning("ADSAFE violation: bad id.");}}}
-x=v.search(dx);if(x>=0){warning("Unexpected character '{a}' in {b}.",token,v.charAt(x),a);}
-ids[u]=true;}else if(a==='class'||a==='type'||a==='name'){x=v.search(qx);if(x>=0){warning("Unexpected character '{a}' in {b}.",token,v.charAt(x),a);}
-ids[u]=true;}else if(a==='href'||a==='background'||a==='content'||a==='data'||a.indexOf('src')>=0||a.indexOf('url')>=0){if(option.safe&&ux.test(v)){error("ADsafe URL violation.");}
-urls.push(v);}else if(a==='for'){if(option.adsafe){if(adsafe_id){if(v.slice(0,adsafe_id.length)!==adsafe_id){warning("ADsafe violation: An id must have a '{a}' prefix",nexttoken,adsafe_id);}else if(!/^[A-Z]+_[A-Z]+$/.test(v)){warning("ADSAFE violation: bad id.");}}else{warning("ADSAFE violation: bad id.");}}}else if(a==='name'){if(option.adsafe&&v.indexOf('_')>=0){warning("ADsafe name violation.");}}}
-function doTag(n,a){var i,t=htmltag[n],x;src=false;if(!t){error("Unrecognized tag '<{a}>'.",nexttoken,n===n.toLowerCase()?n:n+' (capitalization error)');}
-if(stack.length>0){if(n==='html'){error("Too many <html> tags.",token);}
-x=t.parent;if(x){if(x.indexOf(' '+stack[stack.length-1].name+' ')<0){error("A '<{a}>' must be within '<{b}>'.",token,n,x);}}else if(!option.adsafe&&!option.fragment){i=stack.length;do{if(i<=0){error("A '<{a}>' must be within '<{b}>'.",token,n,'body');}
-i-=1;}while(stack[i].name!=='body');}}
-switch(n){case'div':if(option.adsafe&&stack.length===1&&!adsafe_id){warning("ADSAFE violation: missing ID_.");}
-break;case'script':xmode='script';advance('>');indent=nexttoken.from;if(a.lang){warning("lang is deprecated.",token);}
-if(option.adsafe&&stack.length!==1){warning("ADsafe script placement violation.",token);}
-if(a.src){if(option.adsafe&&(!adsafe_may||!approved[a.src])){warning("ADsafe unapproved script source.",token);}
-if(a.type){warning("type is unnecessary.",token);}}else{if(adsafe_went){error("ADsafe script violation.",token);}
-statements('script');}
-xmode='html';advance('</');if(!nexttoken.identifier&&nexttoken.value!=='script'){warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'script',nexttoken.value);}
-advance();xmode='outer';break;case'style':xmode='style';advance('>');styles();xmode='html';advance('</');if(!nexttoken.identifier&&nexttoken.value!=='style'){warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'style',nexttoken.value);}
-advance();xmode='outer';break;case'input':switch(a.type){case'radio':case'checkbox':case'button':case'reset':case'submit':break;case'text':case'file':case'password':case'file':case'hidden':case'image':if(option.adsafe&&a.autocomplete!=='off'){warning("ADsafe autocomplete violation.");}
-break;default:warning("Bad input type.");}
-break;case'applet':case'body':case'embed':case'frame':case'frameset':case'head':case'iframe':case'noembed':case'noframes':case'object':case'param':if(option.adsafe){warning("ADsafe violation: Disallowed tag: "+n);}
-break;}}
-function closetag(n){return'</'+n+'>';}
-function html(){var a,attributes,e,n,q,t,v,w=option.white,wmode;xmode='html';xquote='';stack=null;for(;;){switch(nexttoken.value){case'<':xmode='html';advance('<');attributes={};t=nexttoken;if(!t.identifier){warning("Bad identifier {a}.",t,t.value);}
-n=t.value;if(option.cap){n=n.toLowerCase();}
-t.name=n;advance();if(!stack){stack=[];doBegin(n);}
-v=htmltag[n];if(typeof v!=='object'){error("Unrecognized tag '<{a}>'.",t,n);}
-e=v.empty;t.type=n;for(;;){if(nexttoken.id==='/'){advance('/');if(nexttoken.id!=='>'){warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'>',nexttoken.value);}
-break;}
-if(nexttoken.id&&nexttoken.id.substr(0,1)==='>'){break;}
-if(!nexttoken.identifier){if(nexttoken.id==='(end)'||nexttoken.id==='(error)'){error("Missing '>'.",nexttoken);}
-warning("Bad identifier.");}
-option.white=true;nonadjacent(token,nexttoken);a=nexttoken.value;option.white=w;advance();if(!option.cap&&a!==a.toLowerCase()){warning("Attribute '{a}' not all lower case.",nexttoken,a);}
-a=a.toLowerCase();xquote='';if(is_own(attributes,a)){warning("Attribute '{a}' repeated.",nexttoken,a);}
-if(a.slice(0,2)==='on'){if(!option.on){warning("Avoid HTML event handlers.");}
-xmode='scriptstring';advance('=');q=nexttoken.id;if(q!=='"'&&q!=="'"){error("Missing quote.");}
-xquote=q;wmode=option.white;option.white=false;advance(q);statements('on');option.white=wmode;if(nexttoken.id!==q){error("Missing close quote on script attribute.");}
-xmode='html';xquote='';advance(q);v=false;}else if(a==='style'){xmode='scriptstring';advance('=');q=nexttoken.id;if(q!=='"'&&q!=="'"){error("Missing quote.");}
-xmode='styleproperty';xquote=q;advance(q);substyle();xmode='html';xquote='';advance(q);v=false;}else{if(nexttoken.id==='='){advance('=');v=nexttoken.value;if(!nexttoken.identifier&&nexttoken.id!=='"'&&nexttoken.id!=='\''&&nexttoken.type!=='(string)'&&nexttoken.type!=='(number)'&&nexttoken.type!=='(color)'){warning("Expected an attribute value and instead saw '{a}'.",token,a);}
-advance();}else{v=true;}}
-attributes[a]=v;doAttribute(n,a,v);}
-doTag(n,attributes);if(!e){stack.push(t);}
-xmode='outer';advance('>');break;case'</':xmode='html';advance('</');if(!nexttoken.identifier){warning("Bad identifier.");}
-n=nexttoken.value;if(option.cap){n=n.toLowerCase();}
-advance();if(!stack){error("Unexpected '{a}'.",nexttoken,closetag(n));}
-t=stack.pop();if(!t){error("Unexpected '{a}'.",nexttoken,closetag(n));}
-if(t.name!==n){error("Expected '{a}' and instead saw '{b}'.",nexttoken,closetag(t.name),closetag(n));}
-if(nexttoken.id!=='>'){error("Missing '{a}'.",nexttoken,'>');}
-xmode='outer';advance('>');break;case'<!':if(option.safe){warning("ADsafe HTML violation.");}
-xmode='html';for(;;){advance();if(nexttoken.id==='>'||nexttoken.id==='(end)'){break;}
-if(nexttoken.value.indexOf('--')>=0){warning("Unexpected --.");}
-if(nexttoken.value.indexOf('<')>=0){warning("Unexpected <.");}
-if(nexttoken.value.indexOf('>')>=0){warning("Unexpected >.");}}
-xmode='outer';advance('>');break;case'(end)':return;default:if(nexttoken.id==='(end)'){error("Missing '{a}'.",nexttoken,'</'+stack[stack.length-1].value+'>');}else{advance();}}
-if(stack&&stack.length===0&&(option.adsafe||!option.fragment||nexttoken.id==='(end)')){break;}}
-if(nexttoken.id!=='(end)'){error("Unexpected material after the end.");}}
-type('(number)',idValue);type('(string)',idValue);syntax['(identifier)']={type:'(identifier)',lbp:0,identifier:true,nud:function(){var v=this.value,s=scope[v],f;if(typeof s==='function'){s=undefined;}else if(typeof s==='boolean'){f=funct;funct=functions[0];addlabel(v,'var');s=funct;funct=f;}
-if(funct===s){switch(funct[v]){case'unused':funct[v]='var';break;case'label':warning("'{a}' is a statement label.",token,v);break;}}else if(funct['(global)']){if(option.undef&&predefined[v]!=='boolean'){warning("'{a}' is not defined.",token,v);}
-note_implied(token);}else{switch(funct[v]){case'closure':case'function':case'var':case'unused':warning("'{a}' used out of scope.",token,v);break;case'label':warning("'{a}' is a statement label.",token,v);break;case'outer':case'global':break;default:if(s===true){funct[v]=true;}else if(s===null){warning("'{a}' is not allowed.",token,v);note_implied(token);}else if(typeof s!=='object'){if(option.undef){warning("'{a}' is not defined.",token,v);}else{funct[v]=true;}
-note_implied(token);}else{switch(s[v]){case'function':case'var':case'unused':s[v]='closure';funct[v]=s['(global)']?'global':'outer';break;case'closure':case'parameter':funct[v]=s['(global)']?'global':'outer';break;case'label':warning("'{a}' is a statement label.",token,v);}}}}
-return this;},led:function(){error("Expected an operator and instead saw '{a}'.",nexttoken,nexttoken.value);}};type('(regexp)',function(){return this;});delim('(endline)');delim('(begin)');delim('(end)').reach=true;delim('</').reach=true;delim('<!');delim('<!--');delim('-->');delim('(error)').reach=true;delim('}').reach=true;delim(')');delim(']');delim('"').reach=true;delim("'").reach=true;delim(';');delim(':').reach=true;delim(',');delim('#');delim('@');reserve('else');reserve('case').reach=true;reserve('catch');reserve('default').reach=true;reserve('finally');reservevar('arguments');reservevar('eval');reservevar('false');reservevar('Infinity');reservevar('NaN');reservevar('null');reservevar('this');reservevar('true');reservevar('undefined');assignop('=','assign',20);assignop('+=','assignadd',20);assignop('-=','assignsub',20);assignop('*=','assignmult',20);assignop('/=','assigndiv',20).nud=function(){error("A regular expression literal can be confused with '/='.");};assignop('%=','assignmod',20);bitwiseassignop('&=','assignbitand',20);bitwiseassignop('|=','assignbitor',20);bitwiseassignop('^=','assignbitxor',20);bitwiseassignop('<<=','assignshiftleft',20);bitwiseassignop('>>=','assignshiftright',20);bitwiseassignop('>>>=','assignshiftrightunsigned',20);infix('?',function(left,that){that.left=left;that.right=parse(10);advance(':');that['else']=parse(10);return that;},30);infix('||','or',40);infix('&&','and',50);bitwise('|','bitor',70);bitwise('^','bitxor',80);bitwise('&','bitand',90);relation('==',function(left,right){if(option.eqeqeq){warning("Expected '{a}' and instead saw '{b}'.",this,'===','==');}else if(isPoorRelation(left)){warning("Use '{a}' to compare with '{b}'.",this,'===',left.value);}else if(isPoorRelation(right)){warning("Use '{a}' to compare with '{b}'.",this,'===',right.value);}
-return this;});relation('===');relation('!=',function(left,right){if(option.eqeqeq){warning("Expected '{a}' and instead saw '{b}'.",this,'!==','!=');}else if(isPoorRelation(left)){warning("Use '{a}' to compare with '{b}'.",this,'!==',left.value);}else if(isPoorRelation(right)){warning("Use '{a}' to compare with '{b}'.",this,'!==',right.value);}
-return this;});relation('!==');relation('<');relation('>');relation('<=');relation('>=');bitwise('<<','shiftleft',120);bitwise('>>','shiftright',120);bitwise('>>>','shiftrightunsigned',120);infix('in','in',120);infix('instanceof','instanceof',120);infix('+',function(left,that){var right=parse(130);if(left&&right&&left.id==='(string)'&&right.id==='(string)'){left.value+=right.value;left.character=right.character;if(jx.test(left.value)){warning("JavaScript URL.",left);}
-return left;}
-that.left=left;that.right=right;return that;},130);prefix('+','num');infix('-','sub',130);prefix('-','neg');infix('*','mult',140);infix('/','div',140);infix('%','mod',140);suffix('++','postinc');prefix('++','preinc');syntax['++'].exps=true;suffix('--','postdec');prefix('--','predec');syntax['--'].exps=true;prefix('delete',function(){var p=parse(0);if(!p||(p.id!=='.'&&p.id!=='[')){warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'.',nexttoken.value);}
-this.first=p;return this;}).exps=true;prefix('~',function(){if(option.bitwise){warning("Unexpected '{a}'.",this,'~');}
-parse(150);return this;});prefix('!',function(){this.right=parse(150);this.arity='unary';if(bang[this.right.id]===true){warning("Confusing use of '{a}'.",this,'!');}
-return this;});prefix('typeof','typeof');prefix('new',function(){var c=parse(155),i;if(c&&c.id!=='function'){if(c.identifier){c['new']=true;switch(c.value){case'Object':warning("Use the object literal notation {}.",token);break;case'Array':if(nexttoken.id!=='('){warning("Use the array literal notation [].",token);}else{advance('(');if(nexttoken.id===')'){warning("Use the array literal notation [].",token);}else{i=parse(0);c.dimension=i;if((i.id==='(number)'&&/[.+\-Ee]/.test(i.value))||(i.id==='-'&&!i.right)||i.id==='(string)'||i.id==='['||i.id==='{'||i.id==='true'||i.id==='false'||i.id==='null'||i.id==='undefined'||i.id==='Infinity'){warning("Use the array literal notation [].",token);}
-if(nexttoken.id!==')'){error("Use the array literal notation [].",token);}}
-advance(')');}
-this.first=c;return this;case'Number':case'String':case'Boolean':case'Math':case'JSON':warning("Do not use {a} as a constructor.",token,c.value);break;case'Function':if(!option.evil){warning("The Function constructor is eval.");}
-break;case'Date':case'RegExp':break;default:if(c.id!=='function'){i=c.value.substr(0,1);if(option.newcap&&(i<'A'||i>'Z')){warning("A constructor name should start with an uppercase letter.",token);}}}}else{if(c.id!=='.'&&c.id!=='['&&c.id!=='('){warning("Bad constructor.",token);}}}else{warning("Weird construction. Delete 'new'.",this);}
-adjacent(token,nexttoken);if(nexttoken.id!=='('){warning("Missing '()' invoking a constructor.");}
-this.first=c;return this;});syntax['new'].exps=true;infix('.',function(left,that){adjacent(prevtoken,token);var m=identifier();if(typeof m==='string'){countMember(m);}
-that.left=left;that.right=m;if(!option.evil&&left&&left.value==='document'&&(m==='write'||m==='writeln')){warning("document.write can be a form of eval.",left);}else if(option.adsafe){if(left&&left.value==='ADSAFE'){if(m==='id'||m==='lib'){warning("ADsafe violation.",that);}else if(m==='go'){if(xmode!=='script'){warning("ADsafe violation.",that);}else if(adsafe_went||nexttoken.id!=='('||peek(0).id!=='(string)'||peek(0).value!==adsafe_id||peek(1).id!==','){error("ADsafe violation: go.",that);}
-adsafe_went=true;adsafe_may=false;}}}
-if(!option.evil&&(m==='eval'||m==='execScript')){warning('eval is evil.');}else if(option.safe){for(;;){if(banned[m]===true){warning("ADsafe restricted word '{a}'.",token,m);}
-if(typeof predefined[left.value]!=='boolean'||nexttoken.id==='('){break;}
-if(standard_member[m]===true){if(nexttoken.id==='.'){warning("ADsafe violation.",that);}
-break;}
-if(nexttoken.id!=='.'){warning("ADsafe violation.",that);break;}
-advance('.');token.left=that;token.right=m;that=token;m=identifier();if(typeof m==='string'){countMember(m);}}}
-return that;},160,true);infix('(',function(left,that){adjacent(prevtoken,token);nospace();var n=0,p=[];if(left){if(left.type==='(identifier)'){if(left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)){if(left.value!=='Number'&&left.value!=='String'&&left.value!=='Boolean'&&left.value!=='Date'){if(left.value==='Math'){warning("Math is not a function.",left);}else if(option.newcap){warning("Missing 'new' prefix when invoking a constructor.",left);}}}}else if(left.id==='.'){if(option.safe&&left.left.value==='Math'&&left.right==='random'){warning("ADsafe violation.",left);}}}
-if(nexttoken.id!==')'){for(;;){p[p.length]=parse(10);n+=1;if(nexttoken.id!==','){break;}
-comma();}}
-advance(')');if(option.immed&&left.id==='function'&&nexttoken.id!==')'){warning("Wrap the entire immediate function invocation in parens.",that);}
-nospace(prevtoken,token);if(typeof left==='object'){if(left.value==='parseInt'&&n===1){warning("Missing radix parameter.",left);}
-if(!option.evil){if(left.value==='eval'||left.value==='Function'||left.value==='execScript'){warning("eval is evil.",left);}else if(p[0]&&p[0].id==='(string)'&&(left.value==='setTimeout'||left.value==='setInterval')){warning("Implied eval is evil. Pass a function instead of a string.",left);}}
-if(!left.identifier&&left.id!=='.'&&left.id!=='['&&left.id!=='('&&left.id!=='&&'&&left.id!=='||'&&left.id!=='?'){warning("Bad invocation.",left);}}
-that.left=left;return that;},155,true).exps=true;prefix('(',function(){nospace();var v=parse(0);advance(')',this);nospace(prevtoken,token);if(option.immed&&v.id==='function'){if(nexttoken.id==='('){warning("Move the invocation into the parens that contain the function.",nexttoken);}else{warning("Do not wrap function literals in parens unless they are to be immediately invoked.",this);}}
-return v;});infix('[',function(left,that){nospace();var e=parse(0),s;if(e&&e.type==='(string)'){if(option.safe&&banned[e.value]===true){warning("ADsafe restricted word '{a}'.",that,e.value);}else if(!option.evil&&(e.value==='eval'||e.value==='execScript')){warning("eval is evil.",that);}else if(option.safe&&(e.value.charAt(0)==='_'||e.value.charAt(0)==='-')){warning("ADsafe restricted subscript '{a}'.",that,e.value);}
-countMember(e.value);if(!option.sub&&ix.test(e.value)){s=syntax[e.value];if(!s||!s.reserved){warning("['{a}'] is better written in dot notation.",e,e.value);}}}else if(!e||e.type!=='(number)'||e.value<0){if(option.safe){warning('ADsafe subscripting.');}}
-advance(']',that);nospace(prevtoken,token);that.left=left;that.right=e;return that;},160,true);prefix('[',function(){var b=token.line!==nexttoken.line;this.first=[];if(b){indent+=option.indent;if(nexttoken.from===indent+option.indent){indent+=option.indent;}}
-while(nexttoken.id!=='(end)'){while(nexttoken.id===','){warning("Extra comma.");advance(',');}
-if(nexttoken.id===']'){break;}
-if(b&&token.line!==nexttoken.line){indentation();}
-this.first.push(parse(10));if(nexttoken.id===','){comma();if(nexttoken.id===']'){warning("Extra comma.",token);break;}}else{break;}}
-if(b){indent-=option.indent;indentation();}
-advance(']',this);return this;},160);(function(x){x.nud=function(){var b,i,s,seen={};b=token.line!==nexttoken.line;if(b){indent+=option.indent;if(nexttoken.from===indent+option.indent){indent+=option.indent;}}
-for(;;){if(nexttoken.id==='}'){break;}
-if(b){indentation();}
-i=optionalidentifier(true);if(!i){if(nexttoken.id==='(string)'){i=nexttoken.value;if(ix.test(i)){s=syntax[i];}
-advance();}else if(nexttoken.id==='(number)'){i=nexttoken.value.toString();advance();}else{error("Expected '{a}' and instead saw '{b}'.",nexttoken,'}',nexttoken.value);}}
-if(seen[i]===true){warning("Duplicate member '{a}'.",nexttoken,i);}
-seen[i]=true;countMember(i);advance(':');nonadjacent(token,nexttoken);parse(10);if(nexttoken.id===','){comma();if(nexttoken.id===','||nexttoken.id==='}'){warning("Extra comma.",token);}}else{break;}}
-if(b){indent-=option.indent;indentation();}
-advance('}',this);return this;};x.fud=function(){error("Expected to see a statement and instead saw a block.",token);};}(delim('{')));function varstatement(prefix){var id,name,value;if(funct['(onevar)']&&option.onevar){warning("Too many var statements.");}else if(!funct['(global)']){funct['(onevar)']=true;}
-this.first=[];for(;;){nonadjacent(token,nexttoken);id=identifier();if(funct['(global)']&&predefined[id]===false){warning("Redefinition of '{a}'.",token,id);}
-addlabel(id,'unused');if(prefix){break;}
-name=token;this.first.push(token);if(nexttoken.id==='='){nonadjacent(token,nexttoken);advance('=');nonadjacent(token,nexttoken);if(peek(0).id==='='&&nexttoken.identifier){error("Variable {a} was not declared correctly.",nexttoken,nexttoken.value);}
-value=parse(0);name.first=value;}
-if(nexttoken.id!==','){break;}
-comma();}
-return this;}
-stmt('var',varstatement).exps=true;function functionparams(){var i,t=nexttoken,p=[];advance('(');nospace();if(nexttoken.id===')'){advance(')');nospace(prevtoken,token);return;}
-for(;;){i=identifier();p.push(i);addlabel(i,'parameter');if(nexttoken.id===','){comma();}else{advance(')',t);nospace(prevtoken,token);return p;}}}
-function doFunction(i){var s=scope;scope=Object.create(s);funct={'(name)':i||'"'+anonname+'"','(line)':nexttoken.line,'(context)':funct,'(breakage)':0,'(loopage)':0,'(scope)':scope};token.funct=funct;functions.push(funct);if(i){addlabel(i,'function');}
-funct['(params)']=functionparams();block(false);scope=s;funct['(last)']=token.line;funct=funct['(context)'];}
-blockstmt('function',function(){if(inblock){warning("Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function.",token);}
-var i=identifier();adjacent(token,nexttoken);addlabel(i,'unused');doFunction(i);if(nexttoken.id==='('&&nexttoken.line===token.line){error("Function statements are not invocable. Wrap the whole function invocation in parens.");}
-return this;});prefix('function',function(){var i=optionalidentifier();if(i){adjacent(token,nexttoken);}else{nonadjacent(token,nexttoken);}
-doFunction(i);if(funct['(loopage)']&&nexttoken.id!=='('){warning("Be careful when making functions within a loop. Consider putting the function in a closure.");}
-return this;});blockstmt('if',function(){var t=nexttoken;advance('(');nonadjacent(this,t);nospace();parse(20);if(nexttoken.id==='='){warning("Expected a conditional expression and instead saw an assignment.");advance('=');parse(20);}
-advance(')',t);nospace(prevtoken,token);block(true);if(nexttoken.id==='else'){nonadjacent(token,nexttoken);advance('else');if(nexttoken.id==='if'||nexttoken.id==='switch'){statement(true);}else{block(true);}}
-return this;});blockstmt('try',function(){var b,e,s;if(option.adsafe){warning("ADsafe try violation.",this);}
-block(false);if(nexttoken.id==='catch'){advance('catch');nonadjacent(token,nexttoken);advance('(');s=scope;scope=Object.create(s);e=nexttoken.value;if(nexttoken.type!=='(identifier)'){warning("Expected an identifier and instead saw '{a}'.",nexttoken,e);}else{addlabel(e,'exception');}
-advance();advance(')');block(false);b=true;scope=s;}
-if(nexttoken.id==='finally'){advance('finally');block(false);return;}else if(!b){error("Expected '{a}' and instead saw '{b}'.",nexttoken,'catch',nexttoken.value);}
-return this;});blockstmt('while',function(){var t=nexttoken;funct['(breakage)']+=1;funct['(loopage)']+=1;advance('(');nonadjacent(this,t);nospace();parse(20);if(nexttoken.id==='='){warning("Expected a conditional expression and instead saw an assignment.");advance('=');parse(20);}
-advance(')',t);nospace(prevtoken,token);block(true);funct['(breakage)']-=1;funct['(loopage)']-=1;return this;}).labelled=true;reserve('with');blockstmt('switch',function(){var t=nexttoken,g=false;funct['(breakage)']+=1;advance('(');nonadjacent(this,t);nospace();this.condition=parse(20);advance(')',t);nospace(prevtoken,token);nonadjacent(token,nexttoken);t=nexttoken;advance('{');nonadjacent(token,nexttoken);indent+=option.indent;this.cases=[];for(;;){switch(nexttoken.id){case'case':switch(funct['(verb)']){case'break':case'case':case'continue':case'return':case'switch':case'throw':break;default:warning("Expected a 'break' statement before 'case'.",token);}
-indentation(-option.indent);advance('case');this.cases.push(parse(20));g=true;advance(':');funct['(verb)']='case';break;case'default':switch(funct['(verb)']){case'break':case'continue':case'return':case'throw':break;default:warning("Expected a 'break' statement before 'default'.",token);}
-indentation(-option.indent);advance('default');g=true;advance(':');break;case'}':indent-=option.indent;indentation();advance('}',t);if(this.cases.length===1||this.condition.id==='true'||this.condition.id==='false'){warning("This 'switch' should be an 'if'.",this);}
-funct['(breakage)']-=1;funct['(verb)']=undefined;return;case'(end)':error("Missing '{a}'.",nexttoken,'}');return;default:if(g){switch(token.id){case',':error("Each value should have its own case label.");return;case':':statements();break;default:error("Missing ':' on a case clause.",token);}}else{error("Expected '{a}' and instead saw '{b}'.",nexttoken,'case',nexttoken.value);}}}}).labelled=true;stmt('debugger',function(){if(!option.debug){warning("All 'debugger' statements should be removed.");}
-return this;}).exps=true;(function(){var x=stmt('do',function(){funct['(breakage)']+=1;funct['(loopage)']+=1;this.first=block(true);advance('while');var t=nexttoken;nonadjacent(token,t);advance('(');nospace();parse(20);if(nexttoken.id==='='){warning("Expected a conditional expression and instead saw an assignment.");advance('=');parse(20);}
-advance(')',t);nospace(prevtoken,token);funct['(breakage)']-=1;funct['(loopage)']-=1;return this;});x.labelled=true;x.exps=true;}());blockstmt('for',function(){var f=option.forin,s,t=nexttoken;funct['(breakage)']+=1;funct['(loopage)']+=1;advance('(');nonadjacent(this,t);nospace();if(peek(nexttoken.id==='var'?1:0).id==='in'){if(nexttoken.id==='var'){advance('var');varstatement(true);}else{switch(funct[nexttoken.value]){case'unused':funct[nexttoken.value]='var';break;case'var':break;default:warning("Bad for in variable '{a}'.",nexttoken,nexttoken.value);}
-advance();}
-advance('in');parse(20);advance(')',t);s=block(true);if(!f&&(s.length>1||typeof s[0]!=='object'||s[0].value!=='if')){warning("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this);}
-funct['(breakage)']-=1;funct['(loopage)']-=1;return this;}else{if(nexttoken.id!==';'){if(nexttoken.id==='var'){advance('var');varstatement();}else{for(;;){parse(0,'for');if(nexttoken.id!==','){break;}
-comma();}}}
-nolinebreak(token);advance(';');if(nexttoken.id!==';'){parse(20);if(nexttoken.id==='='){warning("Expected a conditional expression and instead saw an assignment.");advance('=');parse(20);}}
-nolinebreak(token);advance(';');if(nexttoken.id===';'){error("Expected '{a}' and instead saw '{b}'.",nexttoken,')',';');}
-if(nexttoken.id!==')'){for(;;){parse(0,'for');if(nexttoken.id!==','){break;}
-comma();}}
-advance(')',t);nospace(prevtoken,token);block(true);funct['(breakage)']-=1;funct['(loopage)']-=1;return this;}}).labelled=true;stmt('break',function(){var v=nexttoken.value;if(funct['(breakage)']===0){warning("Unexpected '{a}'.",nexttoken,this.value);}
-nolinebreak(this);if(nexttoken.id!==';'){if(token.line===nexttoken.line){if(funct[v]!=='label'){warning("'{a}' is not a statement label.",nexttoken,v);}else if(scope[v]!==funct){warning("'{a}' is out of scope.",nexttoken,v);}
-this.first=nexttoken;advance();}}
-reachable('break');return this;}).exps=true;stmt('continue',function(){var v=nexttoken.value;if(funct['(breakage)']===0){warning("Unexpected '{a}'.",nexttoken,this.value);}
-nolinebreak(this);if(nexttoken.id!==';'){if(token.line===nexttoken.line){if(funct[v]!=='label'){warning("'{a}' is not a statement label.",nexttoken,v);}else if(scope[v]!==funct){warning("'{a}' is out of scope.",nexttoken,v);}
-this.first=nexttoken;advance();}}
-reachable('continue');return this;}).exps=true;stmt('return',function(){nolinebreak(this);if(nexttoken.id==='(regexp)'){warning("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");}
-if(nexttoken.id!==';'&&!nexttoken.reach){nonadjacent(token,nexttoken);this.first=parse(20);}
-reachable('return');return this;}).exps=true;stmt('throw',function(){nolinebreak(this);nonadjacent(token,nexttoken);this.first=parse(20);reachable('throw');return this;}).exps=true;reserve('void');reserve('class');reserve('const');reserve('enum');reserve('export');reserve('extends');reserve('import');reserve('super');reserve('let');reserve('yield');reserve('implements');reserve('interface');reserve('package');reserve('private');reserve('protected');reserve('public');reserve('static');function jsonValue(){function jsonObject(){var o={},t=nexttoken;advance('{');if(nexttoken.id!=='}'){for(;;){if(nexttoken.id==='(end)'){error("Missing '}' to match '{' from line {a}.",nexttoken,t.line);}else if(nexttoken.id==='}'){warning("Unexpected comma.",token);break;}else if(nexttoken.id===','){error("Unexpected comma.",nexttoken);}else if(nexttoken.id!=='(string)'){warning("Expected a string and instead saw {a}.",nexttoken,nexttoken.value);}
-if(o[nexttoken.value]===true){warning("Duplicate key '{a}'.",nexttoken,nexttoken.value);}else if(nexttoken.value==='__proto__'){warning("Stupid key '{a}'.",nexttoken,nexttoken.value);}else{o[nexttoken.value]=true;}
-advance();advance(':');jsonValue();if(nexttoken.id!==','){break;}
-advance(',');}}
-advance('}');}
-function jsonArray(){var t=nexttoken;advance('[');if(nexttoken.id!==']'){for(;;){if(nexttoken.id==='(end)'){error("Missing ']' to match '[' from line {a}.",nexttoken,t.line);}else if(nexttoken.id===']'){warning("Unexpected comma.",token);break;}else if(nexttoken.id===','){error("Unexpected comma.",nexttoken);}
-jsonValue();if(nexttoken.id!==','){break;}
-advance(',');}}
-advance(']');}
-switch(nexttoken.id){case'{':jsonObject();break;case'[':jsonArray();break;case'true':case'false':case'null':case'(number)':case'(string)':advance();break;case'-':advance('-');if(token.character!==nexttoken.from){warning("Unexpected space after '-'.",token);}
-adjacent(token,nexttoken);advance('(number)');break;default:error("Expected a JSON value.",nexttoken);}}
-var itself=function(s,o){var a,i;JSLINT.errors=[];predefined=Object.create(standard);if(o){a=o.predef;if(a instanceof Array){for(i=0;i<a.length;i+=1){predefined[a[i]]=true;}}
-if(o.adsafe){o.safe=true;}
-if(o.safe){o.browser=false;o.css=false;o.debug=false;o.eqeqeq=true;o.evil=false;o.forin=false;o.nomen=true;o.on=false;o.rhino=false;o.safe=true;o.sidebar=false;o.strict=true;o.sub=false;o.undef=true;o.widget=false;predefined.Date=null;predefined['eval']=null;predefined.Function=null;predefined.Object=null;predefined.ADSAFE=false;predefined.lib=false;}
-option=o;}else{option={};}
-option.indent=option.indent||4;option.maxerr=option.maxerr||50;adsafe_id='';adsafe_may=false;adsafe_went=false;approved={};if(option.approved){for(i=0;i<option.approved.length;i+=1){approved[option.approved[i]]=option.approved[i];}}else{approved.test='test';}
-tab='';for(i=0;i<option.indent;i+=1){tab+=' ';}
-indent=1;global=Object.create(predefined);scope=global;funct={'(global)':true,'(name)':'(global)','(scope)':scope,'(breakage)':0,'(loopage)':0};functions=[funct];ids={};urls=[];src=false;xmode=false;stack=null;member={};membersOnly=null;implied={};inblock=false;lookahead=[];jsonmode=false;warnings=0;lex.init(s);prereg=true;strict_mode=false;prevtoken=token=nexttoken=syntax['(begin)'];assume();try{advance();if(nexttoken.value.charAt(0)==='<'){html();if(option.adsafe&&!adsafe_went){warning("ADsafe violation: Missing ADSAFE.go.",this);}}else{switch(nexttoken.id){case'{':case'[':option.laxbreak=true;jsonmode=true;jsonValue();break;case'@':case'*':case'#':case'.':case':':xmode='style';advance();if(token.id!=='@'||!nexttoken.identifier||nexttoken.value!=='charset'||token.line!==1||token.from!==1){error('A css file should begin with @charset "UTF-8";');}
-advance();if(nexttoken.type!=='(string)'&&nexttoken.value!=='UTF-8'){error('A css file should begin with @charset "UTF-8";');}
-advance();advance(';');styles();break;default:if(option.adsafe&&option.fragment){error("Expected '{a}' and instead saw '{b}'.",nexttoken,'<div>',nexttoken.value);}
-statements('lib');}}
-advance('(end)');}catch(e){if(e){JSLINT.errors.push({reason:e.message,line:e.line||nexttoken.line,character:e.character||nexttoken.from},null);}}
-return JSLINT.errors.length===0;};function is_array(o){return Object.prototype.toString.apply(o)==='[object Array]';}
-function to_array(o){var a=[],k;for(k in o){if(is_own(o,k)){a.push(k);}}
-return a;}
-itself.data=function(){var data={functions:[]},fu,globals,implieds=[],f,i,j,members=[],n,unused=[],v;if(itself.errors.length){data.errors=itself.errors;}
-if(jsonmode){data.json=true;}
-for(n in implied){if(is_own(implied,n)){implieds.push({name:n,line:implied[n]});}}
-if(implieds.length>0){data.implieds=implieds;}
-if(urls.length>0){data.urls=urls;}
-globals=to_array(scope);if(globals.length>0){data.globals=globals;}
-for(i=1;i<functions.length;i+=1){f=functions[i];fu={};for(j=0;j<functionicity.length;j+=1){fu[functionicity[j]]=[];}
-for(n in f){if(is_own(f,n)&&n.charAt(0)!=='('){v=f[n];if(is_array(fu[v])){fu[v].push(n);if(v==='unused'){unused.push({name:n,line:f['(line)'],'function':f['(name)']});}}}}
-for(j=0;j<functionicity.length;j+=1){if(fu[functionicity[j]].length===0){delete fu[functionicity[j]];}}
-fu.name=f['(name)'];fu.param=f['(params)'];fu.line=f['(line)'];fu.last=f['(last)'];data.functions.push(fu);}
-if(unused.length>0){data.unused=unused;}
-members=[];for(n in member){if(typeof member[n]==='number'){data.member=member;break;}}
-return data;};itself.report=function(option){var data=itself.data();var a=[],c,e,err,f,i,k,l,m='',n,o=[],s;function detail(h,s){if(s){o.push('<div><i>'+h+'</i> '+
-s.sort().join(', ')+'</div>');}}
-if(data.errors||data.implieds||data.unused){err=true;o.push('<div id=errors><i>Error:</i>');if(data.errors){for(i=0;i<data.errors.length;i+=1){c=data.errors[i];if(c){e=c.evidence||'';o.push('<p>Problem'+(isFinite(c.line)?' at line '+
-c.line+' character '+c.character:'')+': '+c.reason.entityify()+'</p><p class=evidence>'+
-(e&&(e.length>80?e.slice(0,77)+'...':e).entityify())+'</p>');}}}
-if(data.implieds){s=[];for(i=0;i<data.implieds.length;i+=1){s[i]='<code>'+data.implieds[i].name+'</code>&nbsp;<i>'+
-data.implieds[i].line+'</i>';}
-o.push('<p><i>Implied global:</i> '+s.join(', ')+'</p>');}
-if(data.unused){s=[];for(i=0;i<data.unused.length;i+=1){s[i]='<code><u>'+data.unused[i].name+'</u></code>&nbsp;<i>'+
-data.unused[i].line+'</i> <code>'+
-data.unused[i]['function']+'</code>';}
-o.push('<p><i>Unused variable:</i> '+s.join(', ')+'</p>');}
-if(data.json){o.push('<p>JSON: bad.</p>');}
-o.push('</div>');}
-if(!option){o.push('<br><div id=functions>');if(data.urls){detail("URLs<br>",data.urls,'<br>');}
-if(data.json&&!err){o.push('<p>JSON: good.</p>');}else if(data.globals){o.push('<div><i>Global</i> '+
-data.globals.sort().join(', ')+'</div>');}else{o.push('<div><i>No new global variables introduced.</i></div>');}
-for(i=0;i<data.functions.length;i+=1){f=data.functions[i];o.push('<br><div class=function><i>'+f.line+'-'+
-f.last+'</i> '+(f.name||'')+'('+
-(f.param?f.param.join(', '):'')+')</div>');detail('<big><b>Unused</b></big>',f.unused);detail('Closure',f.closure);detail('Variable',f['var']);detail('Exception',f.exception);detail('Outer',f.outer);detail('Global',f.global);detail('Label',f.label);}
-if(data.member){a=to_array(data.member);if(a.length){a=a.sort();m='<br><pre id=members>/*members ';l=10;for(i=0;i<a.length;i+=1){k=a[i];n=k.name();if(l+n.length>72){o.push(m+'<br>');m=' ';l=1;}
-l+=n.length+2;if(data.member[k]===1){n='<i>'+n+'</i>';}
-if(i<a.length-1){n+=', ';}
-m+=n;}
-o.push(m+'<br>*/</pre>');}
-o.push('</div>');}}
-return o.join('');};itself.jslint=itself;itself.edition='2009-10-04';return itself;}());(function(a){var e,i,input;if(!a[0]){print("Usage: jslint.js file.js");quit(1);}
-input=readFile(a[0]);if(!input){print("jslint: Couldn't open file '"+a[0]+"'.");quit(1);}
-if(!JSLINT(input,{bitwise:true,eqeqeq:true,immed:true,newcap:true,nomen:true,onevar:true,plusplus:true,regexp:true,rhino:true,undef:true,white:true})){for(i=0;i<JSLINT.errors.length;i+=1){e=JSLINT.errors[i];if(e){print('Lint at line '+e.line+' character '+
-e.character+': '+e.reason);print((e.evidence||'').replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"));print('');}}
-quit(0);}else{print("jslint: No problems found in "+a[0]);quit();}}(arguments));
diff --git a/emacs.d/nxhtml/related/moz.el b/emacs.d/nxhtml/related/moz.el
deleted file mode 100644
index e910286..0000000
--- a/emacs.d/nxhtml/related/moz.el
+++ /dev/null
@@ -1,289 +0,0 @@
-;;; moz.el --- Lets current buffer interact with inferior mozilla.
-
-;; URL: http://github.com/bard/mozrepl/raw/master/chrome/content/moz.el
-
-;; Copyright (C) 2006 by Massimiliano Mirra
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-;;
-;; Author: Massimiliano Mirra, <bard [at] hyperstruct [dot] net>
-;; Contributors:
-;; - Lennart Borgman
-
-;;; Commentary:
-;;
-;; This file implements communication with Firefox via MozRepl
-;; (http://hyperstruct.net/projects/mozrepl). It is a slightly
-;; modified version of the file moz.el that comes with MozLab. To use
-;; it you have to install the MozRepl addon in Firefox.
-;;
-;; This file contains
-;;
-;; * a major mode for direct interaction in a buffer (as with
-;; telnet) with MozRepl, `inferior-moz-mode'.
-;; * a minor mode for sending code portions or whole files from
-;; other buffers to MozRepl, `moz-minor-mode'.
-;;
-;; Assuming you want to use javascript-mode to edit Javascript files,
-;; enter the following in your .emacs initialization file (from Emacs
-;; integration in the help text):
-;;
-;; (add-to-list 'auto-mode-alist '("\\.js$" . javascript-mode))
-;; (autoload 'inferior-moz-mode "moz" "MozRepl Inferior Mode" t)
-;; (autoload 'moz-minor-mode "moz" "MozRepl Minor Mode" t)
-;; (add-hook 'javascript-mode-hook 'javascript-moz-setup)
-;; (defun javascript-moz-setup () (moz-minor-mode 1))
-;;
-;; Replace javascript-mode above with the name of your favorite
-;; javascript mode.
-;;
-;; If you got this with nXhtml the setup above is already done for
-;; you.
-;;
-;; *Note 1* You have to start the MozRepl server in Firefox (or
-;; whatever Mozilla browser you use). From the menus do
-;;
-;; Tools - MozRepl - Start
-;;
-;; *Note 2* For clearness and brevity the documentation says Firefox
-;; where the correct term should rather be "your Mozilla web
-;; browser".
-
-;;; Change log:
-;;
-;; 2008-07-20: Lennart Borgman
-;; - Add `moz-minor-mode-map'.
-;; - Add `inferior-moz-insert-moz-repl'.
-;; - Add `inferior-moz-mode-map'.
-;; - Add doc strings to interactive functions.
-;; - Make minor enhancements to documentation etc.
-;; - Change Mozilla to Firefox/MozRepl for clarity and brevity.
-;; - Add error handling when starting MozRepl.
-
-;;; Code:
-
-(require 'comint)
-(require 'cc-cmds)
-
-;; Maybe fix-me: C-c control-char are reserved for major modes. But
-;; this minor mode is used in only one major mode (or one family of
-;; major modes) so it complies I think ...
-(defvar moz-minor-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-c\C-s" 'run-mozilla)
- (define-key map "\C-\M-x" 'moz-send-defun)
- (define-key map "\C-c\C-c" 'moz-send-defun-and-go)
- (define-key map "\C-c\C-r" 'moz-send-region)
- (define-key map "\C-c\C-l" 'moz-save-buffer-and-send)
- map))
-
-;;;###autoload
-(define-minor-mode moz-minor-mode
- "MozRepl minor mode for interaction with Firefox.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
-
-When this minor mode is enabled, some commands become available
-to send current code area \(as understood by c-mark-function) or
-region or buffer to an inferior MozRepl process (which will be
-started as needed).
-
-The following keys are bound in this minor mode:
-
-\\{moz-minor-mode-map}"
- nil
- " Moz"
- :keymap moz-minor-mode-map
- :group 'moz)
-
-(defalias 'run-mozilla 'inferior-moz-switch-to-mozilla)
-
-(defvar moz-repl-name "repl"
- "The current name of the repl.")
-
-(defvar moz-input-separator "\n--end-remote-input\n")
-
-(defvar moz-repl-host "localhost")
-
-(defvar moz-repl-port 4242)
-
-(defvar moz-temporary-file nil)
-
-(defun moz-temporary-file ()
- (if (and moz-temporary-file
- (file-readable-p moz-temporary-file))
- moz-temporary-file
- (setq moz-temporary-file (make-temp-file "emacs-mozrepl"))))
-
-(defun moz-send-region (start end)
- "Send the region to Firefox via MozRepl."
- (interactive "r")
- (comint-send-string (inferior-moz-process)
- (concat moz-repl-name ".pushenv('printPrompt', 'inputMode'); "
- moz-repl-name ".setenv('printPrompt', false); "
- moz-repl-name ".setenv('inputMode', 'multiline'); "
- "undefined; \n"))
- ;; Give the previous line a chance to be evaluated on its own. If
- ;; it gets concatenated to the following ones, we are doomed.
- (sleep-for 0 1)
- (comint-send-region (inferior-moz-process)
- start end)
- (comint-send-string (inferior-moz-process)
- "\n--end-remote-input\n")
- (comint-send-string (inferior-moz-process)
- (concat moz-repl-name ".popenv('inputMode', 'printPrompt'); "
- "undefined; \n"))
- (comint-send-string (inferior-moz-process)
- "\n--end-remote-input\n")
- (display-buffer (process-buffer (inferior-moz-process))))
-
-(defun moz-send-defun ()
- "Send the current function to Firefox via MozRepl.
-Curent function is the one recognized by c-mark-function."
- (interactive)
- (save-excursion
- (c-mark-function)
- (moz-send-region (point) (mark))))
-
-(defun moz-send-defun-and-go ()
- "Send the current function to Firefox via MozRepl.
-Also switch to the interaction buffer."
- (interactive)
- (moz-send-defun)
- (inferior-moz-switch-to-mozilla nil))
-
-(defun moz-save-buffer-and-send ()
- "Save the current buffer and load it in Firefox via MozRepl."
- (interactive)
- (save-buffer)
- (comint-send-string (inferior-moz-process)
- (concat moz-repl-name ".pushenv('printPrompt', 'inputMode'); "
- moz-repl-name ".setenv('inputMode', 'line'); "
- moz-repl-name ".setenv('printPrompt', false); undefined; "))
- (comint-send-string (inferior-moz-process)
- (concat moz-repl-name ".load('file://localhost/" (buffer-file-name) "');\n"
- moz-repl-name ".popenv('inputMode', 'printPrompt'); undefined;\n"))
- (display-buffer (process-buffer (inferior-moz-process))))
-
-;;; Inferior Mode
-
-(defvar inferior-moz-buffer nil
- "The buffer in which the inferior process is running.")
-
-(defun inferior-moz-insert-moz-repl ()
- "Insert value of `moz-repl-name' and a dot (.)."
- (interactive) (insert moz-repl-name "."))
-
-(defvar inferior-moz-mode-map
- (let ((map (make-sparse-keymap)))
- ;; Note: changed from C-c c which is reserved for users.
- (define-key map "\C-c\C-c" 'inferior-moz-insert-moz-repl)
- map))
-
-;;;###autoload
-(define-derived-mode inferior-moz-mode comint-mode "Inf-MozRepl"
- "Major mode for interacting with Firefox via MozRepl."
- (setq comint-input-sender 'inferior-moz-input-sender)
- (add-hook 'comint-output-filter-functions 'inferior-moz-track-repl-name nil t))
-
-(defun inferior-moz-track-repl-name (comint-output)
- (save-match-data
- (when (string-match "\\(\\w+\\)> $" comint-output)
- (setq moz-repl-name (match-string 1 comint-output)))))
-
-(defun inferior-moz-self-insert-or-repl-name ()
- (interactive)
- (if (looking-back "\\(\\w+\\)> $")
- (insert moz-repl-name ".")
- (insert last-command-event)))
-
-(defun inferior-moz-input-sender (proc string)
- "Custom function to send input with comint-send-input.
-Instead of sending input and newline separately like in
-comint-simple-send, here we *first* concatenate input and
-newline, then send it all together. This prevents newline to be
-interpreted on its own."
- (comint-send-string proc (concat string "\n")))
-
-(defun inferior-moz-switch-to-mozilla (arg)
- "Switch to the inferior MozRepl buffer.
-Create the buffer and start the MozRepl process and connect to
-Firefox if needed.
-
-See also `inferior-moz-start-process'."
- (interactive "P")
- (when arg
- (setq moz-repl-host (read-string "Host: " "localhost"))
- (setq moz-repl-port (read-number "Port: " 4242)))
- (pop-to-buffer (process-buffer (inferior-moz-process)))
- (goto-char (process-mark (inferior-moz-process))))
-
-(defun inferior-moz-process ()
- "Return inferior MozRepl process. Start it if necessary.
-See also `inferior-moz-start-process'."
- (or (if (buffer-live-p inferior-moz-buffer)
- (get-buffer-process inferior-moz-buffer))
- (progn
- (inferior-moz-start-process)
- (inferior-moz-process))))
-
-(defvar mozrepl-home-page "http://hyperstruct.net/projects/mozrepl")
-
-(defun inferior-moz-start-process ()
- "Start an inferior Mozrepl process and connect to Firefox.
-It runs the hook `inferior-moz-hook' after starting the process
-and setting up the inferior Firefox buffer.
-
-Note that you have to start the MozRepl server from Firefox."
- (interactive)
- (condition-case err
- (progn
- (setq inferior-moz-buffer
- (apply 'make-comint "MozRepl" (cons moz-repl-host moz-repl-port) nil nil))
- (sleep-for 0 100)
- (with-current-buffer inferior-moz-buffer
- (inferior-moz-mode)
- (run-hooks 'inferior-moz-hook)))
- (file-error
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'describe-function 'inferior-moz-start-process) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert "Can't start MozRepl, the error message was:\n\n "
- (error-message-string err)
- "\n"
- "\nA possible reason is that you have not installed"
- "\nthe MozRepl add-on to Firefox or that you have not"
- "\nstarted it. You start it from the menus in Firefox:"
- "\n\n Tools / MozRepl / Start"
- "\n"
- "\nSee ")
- (insert-text-button
- "MozRepl home page"
- 'action (lambda (button)
- (browse-url mozrepl-home-page))
- 'help-echo mozrepl-home-page
- 'face 'button)
- (insert
- " for more information."
- "\n"
- "\nMozRepl is also available directly from Firefox add-on"
- "\npages, but is updated less frequently there.")
- ))
- (error "Can't start MozRepl"))))
-
-(provide 'moz)
-
-;;; moz.el ends here
diff --git a/emacs.d/nxhtml/related/mozadd.el b/emacs.d/nxhtml/related/mozadd.el
deleted file mode 100644
index a303fe4..0000000
--- a/emacs.d/nxhtml/related/mozadd.el
+++ /dev/null
@@ -1,369 +0,0 @@
-;;; mozadd.el --- Additional functionality for MozRepl
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-07-22 Wed
-(defconst mozadd:version "0.2") ;; Version:
-;; Last-Updated: 2009-08-04 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `cc-cmds', `cc-defs', `cc-engine', `cc-vars', `comint', `json',
- ;; `moz', `regexp-opt', `ring'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Live tracking of editing changes, see
-;; `mozadd-mirror-mode'
-;; `mozadd-refresh-edited-on-save-mode'
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'moz)
-(require 'json)
-
-(defun mozadd-warning (format-string &rest args)
- (let ((str (apply 'format format-string args)))
- (message "%s" (propertize str 'face 'secondary-selection))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Refresh Firefox after save etc
-
-;; Partly after an idea on EmacsWiki
-
-(defvar mozadd-edited-buffer nil)
-(setq mozadd-edited-buffer nil)
-
-;;;###autoload
-(define-minor-mode mozadd-refresh-edited-on-save-mode
- "Refresh mozadd edited file in Firefox when saving file.
-The mozadd edited file is the file in the last buffer visited in
-`mozadd-mirror-mode'.
-
-You can use this for example when you edit CSS files.
-
-The mozadd edited file must be shown in Firefox and visible."
- :lighter "MozRefresh"
- (if mozadd-refresh-edited-on-save-mode
- (add-hook 'after-save-hook 'mozadd-queue-reload-mozilla-edited-file nil t)
- (remove-hook 'after-save-hook 'mozadd-queue-reload-mozilla-edited-file t)))
-(put 'mozadd-refresh-edited-on-save-mode 'permanent-local t)
-
-;;;###autoload
-(define-globalized-minor-mode global-mozadd-refresh-edited-on-save-mode
- mozadd-refresh-edited-on-save-mode
- (lambda ()
- (when (or (derived-mode-p 'css-mode)
- (mozadd-html-buffer-file-p))
- (mozadd-refresh-edited-on-save-mode 1))))
-
-(defun mozadd-queue-reload-mozilla-edited-file ()
- "Reload edited file."
- (when (buffer-live-p mozadd-edited-buffer)
- (if (buffer-modified-p mozadd-edited-buffer)
- (mozadd-warning "Mozadd: Edited buffer %s is not saved, can't reload browser."
- (buffer-name mozadd-edited-buffer))
- (mozadd-add-queue-get-mirror-location)
- (mozadd-add-task-1 'mozadd-send-refresh-edited-to-mozilla))))
-
-(defun mozadd-send-refresh-edited-to-mozilla ()
- "Update the remote mozrepl instance"
- (with-current-buffer mozadd-edited-buffer
- (if (not (mozadd-edited-file-is-shown))
- (mozadd-warning "Mozadd: Edited buffer %s is not shown, can't reload browser."
- (buffer-name mozadd-edited-buffer))
- (comint-send-string (inferior-moz-process)
- "setTimeout(BrowserReload(), \"1000\");")))
- (mozadd-exec-next))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Mirror html buffer in Firefox
-
-;; Partly after an idea on
-;; http://people.internetconnection.net/2009/02/interactive-html-development-in-emacs/
-
-;; Fun, it kind of works, but is perhaps totally useless .... - slow
-;; and maybe scrolling... - but the file I am testing with have 3000
-;; lines...
-
-;; Fix-me: How do you get the currently shown page in Firefox?
-
-(defun mozadd-perhaps-start ()
- "Start if MozRepl if not running. Return message if not ok."
- (unless (buffer-live-p inferior-moz-buffer)
- (condition-case err
- (progn
- (inferior-moz-start-process)
- nil)
- (error (error-message-string err)))))
-
-(defvar mozadd-mirror-location nil)
-(make-variable-buffer-local 'mozadd-mirror-location)
-(put 'mozadd-mirror-location 'permanent-local t)
-
-(defvar mozadd-initial-mirror-location nil)
-(make-variable-buffer-local 'mozadd-initial-mirror-location)
-(put 'mozadd-initial-mirror-location 'permanent-local t)
-
-;;(mozadd-get-comint-string-part "\"hi\" there")
-(defun mozadd-get-comint-string-part (comint-output)
- (save-match-data
- (if (string-match "^\".*?\"" comint-output)
- (match-string 0 comint-output)
- comint-output)))
-
-(defun mozadd-get-initial-mirror-location (comint-output)
- ;;(message "mozadd-get-initial-mirror-location %S" comint-output)
- (with-current-buffer mozadd-edited-buffer
- (setq mozadd-initial-mirror-location (mozadd-get-comint-string-part comint-output)))
- (mozadd-exec-next)
- comint-output)
-
-(defun mozadd-get-mirror-location (comint-output)
- ;;(message "mozadd-get-mirror-location %S" comint-output)
- (with-current-buffer mozadd-edited-buffer
- (setq mozadd-mirror-location (mozadd-get-comint-string-part comint-output)))
- (mozadd-exec-next)
- comint-output)
-
-(defun mozadd-add-queue-get-mirror-location ()
- (mozadd-add-task "content.location.href" 'mozadd-get-mirror-location))
-
-(defun mozadd-skip-output-until-prompt (comint-output)
- ;;(message "mozadd-skip-output-until-prompt %S" comint-output)
- (if (not (string-match-p "\\(\\w+\\)> $" comint-output))
- ""
- ;;(message "done recieve %s" (current-time-string))
- (mozadd-exec-next)
- comint-output
- ""
- ))
-
-(defun mozadd-queue-send-buffer-content-to-mozilla (buffer)
- (mozadd-add-queue-get-mirror-location)
- (setq mozadd-edited-buffer buffer)
- (mozadd-add-task-1 'mozadd-send-buffer-content-to-mozilla))
-
-(defun mozadd-edited-file-is-shown ()
- (with-current-buffer mozadd-edited-buffer
- (string= mozadd-mirror-location mozadd-initial-mirror-location)))
-
-(defvar mozadd-xml-path-outline-style "2px solid red")
-(defun mozadd-send-buffer-content-to-mozilla ()
- "Update the remote mozrepl instance"
- (with-current-buffer mozadd-edited-buffer
- (if (mozadd-edited-file-is-shown)
- (mozadd-requeue-me-as-task
- (concat "content.document.body.innerHTML="
- (json-encode
- (save-restriction
- (widen)
- (let ((where-points nil)
- (str "")
- (p1 (point-min))
- p2)
- ;; If nxml-where-mode is on add corresponding outline style.
- (when (and (boundp 'nxml-where-mode) nxml-where-mode)
- (mapc (lambda (ovl)
- (when (overlay-get ovl 'nxml-where)
- (when (/= ?/ (1+ (char-after (overlay-start ovl))))
- (push (1- (overlay-end ovl)) where-points))))
- (overlays-in (point-min) (point-max)))
- (setq where-points (sort where-points '<)))
- (dolist (p2 where-points)
- (setq str (concat str
- (buffer-substring-no-properties p1
- p2)))
- (setq str (concat str
- " style=\"outline: "
- mozadd-xml-path-outline-style
- "\""))
- (setq p1 p2)
- )
- (setq str (concat str
- (buffer-substring-no-properties p1
- (point-max))))
- str))
- )
- ";")
- 'mozadd-skip-output-until-prompt)
- (mozadd-skip-current-task))
- ;; Timer to avoid looping
- (run-with-idle-timer 0 nil 'mozadd-maybe-exec-next)
- ))
-
-(defvar mozadd-current-task nil)
-(setq mozadd-current-task nil)
-
-(defvar mozadd-task-queue nil)
-(setq mozadd-task-queue nil)
-;;(mozadd-add-task "content.location.href" 'mozadd-get-initial-mirror-location)
-;;(mozadd-add-task "hi" 1)
-;;(mozadd-add-task "hm" 2)
-
-(defun mozadd-clear-exec-queue ()
- (setq mozadd-current-task nil)
- (setq mozadd-task-queue nil)
- (when (buffer-live-p inferior-moz-buffer)
- (with-current-buffer inferior-moz-buffer
- (dolist (fun (buffer-local-value 'comint-preoutput-filter-functions (current-buffer)))
- (remove-hook 'comint-preoutput-filter-functions fun t)))))
-
-(defun mozadd-add-task (input task)
- (mozadd-add-task-1 (list input task)))
-
-(defun mozadd-add-task-1 (task)
- (setq mozadd-task-queue (cons task mozadd-task-queue))
- (setq mozadd-task-queue (reverse mozadd-task-queue))
- ;;(message "add-task: mozadd-task-queue=%S, current=%s" mozadd-task-queue mozadd-current-task)
- (mozadd-maybe-exec-next))
-
-(defun mozadd-maybe-exec-next ()
- ;;(message "mozadd-maybe-exec-next, current=%s" mozadd-current-task)
- (unless mozadd-current-task
- (mozadd-exec-next)))
-
-(defun mozadd-exec-next ()
- (when mozadd-current-task
- (let* ((old-task mozadd-current-task) ;;(pop mozadd-task-queue))
- (old-filter (when (listp old-task) (nth 1 old-task))))
- (when (and old-filter (buffer-live-p inferior-moz-buffer))
- (with-current-buffer inferior-moz-buffer
- (remove-hook 'comint-preoutput-filter-functions old-filter t)))))
- (setq mozadd-current-task nil)
- (when mozadd-task-queue
- (let* ((this (pop mozadd-task-queue))
- (input (when (listp this) (nth 0 this)))
- (task (when (listp this) (nth 1 this)))
- )
- (setq mozadd-current-task this)
- ;;(message "EXEC: %s" this)
- (if (not (listp this))
- (funcall this)
- (when (buffer-live-p inferior-moz-buffer)
- (with-current-buffer inferior-moz-buffer
- (add-hook 'comint-preoutput-filter-functions task nil t)))
- (comint-send-string (inferior-moz-process) input)))))
-
-(defun mozadd-skip-current-task ()
- ;;(message "mozadd-skip-current-task")
- ;;(pop mozadd-task-queue)
- (setq mozadd-current-task nil))
-
-(defun mozadd-requeue-me-as-task (input task)
- (mozadd-skip-current-task)
- ;;(message "mozadd-requeue-me-as-task %S %S" input task)
- (setq mozadd-task-queue (cons (list input task) mozadd-task-queue)))
-
-(defcustom mozadd-browseable-file-extensions
- '("html" "htm" "xhtml")
- "File extensions possibly viewable in a web browser."
- :type '(repeat (string :tag "File extension (without leading dot)"))
- :group 'mozadd)
-
-(defun mozadd-html-buffer-file-p ()
- "Return non-nil if buffer file is viewable in a web browser."
- (when (buffer-file-name)
- (member (file-name-extension (buffer-file-name))
- mozadd-browseable-file-extensions)))
-
-;;;###autoload
-(define-minor-mode mozadd-mirror-mode
- "Mirror content of current file buffer immediately in Firefox.
-When you turn on this mode the file will be opened in Firefox.
-Every change you make in the buffer will trigger a redraw in
-Firefox - regardless of if you save the file or not.
-
-For the mirroring to work the edited file must be shown in
-Firefox and visible.
-
-If `nxml-where-mode' is on the marks will also be shown in
-Firefox as CSS outline style. You can customize the style
-through the option `mozadd-xml-path-outline-style'.
-
-See also `mozadd-refresh-edited-on-save-mode'."
- nil
- :lighter " MozMirror"
- :group 'mozadd
- (if mozadd-mirror-mode
- (unless (catch 'ok
- (unless (mozadd-html-buffer-file-p)
- (mozadd-warning "You can only mirror html file buffers")
- (throw 'ok nil))
- (when (buffer-modified-p)
- (mozadd-warning "Please save buffer first")
- (throw 'ok nil))
- (let ((msg (mozadd-perhaps-start)))
- (when msg
- (mozadd-warning msg)
- (throw 'ok nil)))
- (mozadd-clear-exec-queue)
- (setq mozadd-edited-buffer (current-buffer))
- (mozadd-add-task (concat "content.location.href = "
- "\"file:///" (buffer-file-name) "\";")
- 'mozadd-get-initial-mirror-location)
- (add-hook 'after-change-functions 'mozadd-update-mozilla t t)
- (add-hook 'nxhtml-where-hook 'mozadd-update-mozilla t t)
- (add-hook 'post-command-hook 'mozadd-edited-buffer-post-command)
- t)
- (setq mozadd-mirror-mode nil))
- (setq mozadd-edited-buffer nil)
- (remove-hook 'post-command-hook 'mozadd-edited-buffer-post-command)
- (remove-hook 'nxhtml-where-hook 'mozadd-update-mozilla t)
- (remove-hook 'after-change-functions 'mozadd-update-mozilla t)))
-(put 'mozadd-mirror-mode 'permanent-local t)
-
-;;;###autoload
-(define-globalized-minor-mode global-mozadd-mirror-mode mozadd-mirror-mode
- (lambda ()
- (when (mozadd-html-buffer-file-p)
- (mozadd-mirror-mode 1))))
-
-(defun mozadd-edited-buffer-post-command ()
- "Check if we are in a new edited buffer."
- (when mozadd-mirror-mode
- (setq mozadd-edited-buffer (current-buffer))))
-
-
-(defvar mozadd-buffer-content-to-mozilla-timer nil)
-
-(defun mozadd-update-mozilla (&rest ignored)
- (when (timerp mozadd-buffer-content-to-mozilla-timer)
- (cancel-timer mozadd-buffer-content-to-mozilla-timer))
- (setq mozadd-buffer-content-to-mozilla-timer
- (run-with-idle-timer 1 nil 'mozadd-queue-send-buffer-content-to-mozilla (current-buffer))))
-(put 'mozadd-update-mozilla 'permanent-local-hook t)
-
-
-(provide 'mozadd)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mozadd.el ends here
diff --git a/emacs.d/nxhtml/related/php-imenu.el b/emacs.d/nxhtml/related/php-imenu.el
deleted file mode 100644
index 560bac0..0000000
--- a/emacs.d/nxhtml/related/php-imenu.el
+++ /dev/null
@@ -1,174 +0,0 @@
-;;; php-imenu.el --- object-oriented, hierarchical imenu for PHP
-;;;
-;;; Maintainer: Marcel Cary <marcel-cary of care2.com>
-;;; Keywords: php languages oop
-;;; Created: 2008-06-23
-;;; Modified: 2008-07-18
-;;; X-URL: http://www.oak.homeunix.org/~marcel/blog/articles/2008/07/14/nested-imenu-for-php
-;;;
-;;; Copyright (C) 2008 Marcel Cary
-;;;
-;;; License
-;;;
-;;; This program is free software; you can redistribute it and/or
-;;; modify it under the terms of the GNU General Public License
-;;; as published by the Free Software Foundation; either version 2
-;;; of the License, or (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-;;;
-;;;
-;;; Usage
-;;;
-;;; Rename this file to php-imenu.el if it isn't already then place it in
-;;; your Emacs lisp path (eg. site-lisp) and add to your .emacs file:
-;;;
-;;;--------------cut here-------------------------------------------
-; ;; Load the php-imenu index function
-; (autoload 'php-imenu-create-index "php-imenu" nil t)
-; ;; Add the index creation function to the php-mode-hook
-; (add-hook 'php-mode-user-hook 'php-imenu-setup)
-; (defun php-imenu-setup ()
-; (setq imenu-create-index-function (function php-imenu-create-index))
-; ;; uncomment if you prefer speedbar:
-; ;(setq php-imenu-alist-postprocessor (function reverse))
-; (imenu-add-menubar-index)
-; )
-;;;----------------end here--------------------------------------------
-;;;
-;;; Commentary
-;;;
-;;; Refines php-mode's imenu support. Imenu provides a menubar entry called
-;;; "Index" that allows you to jump to a structural element of a file. While
-;;; php-mode generates separate lists of functions and classes in imenu,
-;;; php-imenu.el (this code) generates a tree of class and function
-;;; definitions. It lists functions under the classes in which they're
-;;; defined. The hierarchical display of functions within their classes makes
-;;; the "Index" menu far more useful in understanding the high-level structure
-;;; of a file, and it makes it easier to find a method when a file contains
-;;; multiple by the same name.
-;;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(require 'imenu)
-(require 'thingatpt)
-
-;;; Alas, speedbar shows menu items in reverse, but only below the top level.
-;;; Provide a way to fix it. See sample configuration in file comment.
-(defvar php-imenu-alist-postprocessor (function identity))
-
-;;; Want to see properties or defines? Add an entry for them here.
-(defvar php-imenu-patterns nil)
-(setq php-imenu-patterns
- (list
- ;; types: classes and interfaces
- (list
- ;; for some reason [:space:] and \s- aren't matching \n
- (concat "^\\s-*"
- "\\(\\(abstract[[:space:]\n]+\\)?class\\|interface\\)"
- "[[:space:]\n]+"
- "\\([a-zA-Z0-9_]+\\)[[:space:]\n]*" ; class/iface name
- "\\([a-zA-Z0-9_[:space:]\n]*\\)" ; extends / implements clauses
- "[{]")
- (lambda ()
- (message "%S %S"
- (match-string-no-properties 3)
- (match-string-no-properties 1))
- (concat (match-string-no-properties 3)
- " - "
- (match-string-no-properties 1)))
- (lambda ()
- (save-excursion
- (backward-up-list 1)
- (forward-sexp)
- (point))))
- ;; functions
- (list
- (concat "^[[:space:]\n]*"
- "\\(\\(public\\|protected\\|private\\|"
- "static\\|abstract\\)[[:space:]\n]+\\)*"
- "function[[:space:]\n]*&?[[:space:]\n]*"
- "\\([a-zA-Z0-9_]+\\)[[:space:]\n]*" ; function name
- "[(]")
- (lambda ()
- (concat (match-string-no-properties 3) "()"))
- (lambda ()
- (save-excursion
- (backward-up-list 1)
- (forward-sexp)
- (when (not (looking-at "\\s-*;"))
- (forward-sexp))
- (point))))
- ))
-
-;;; Global variable to pass to imenu-progress-message in multiple functions
-(defvar php-imenu-prev-pos nil)
-
-;;; An implementation of imenu-create-index-function
-(defun php-imenu-create-index ()
- (let (prev-pos)
- (imenu-progress-message php-imenu-prev-pos 0)
- (let ((result (php-imenu-create-index-helper (point-min) (point-max) nil)))
- ;(message "bye %S" result)
- (imenu-progress-message php-imenu-prev-pos 100)
- result)))
-
-(defun php-imenu-create-index-helper (min max name)
- (let ((combined-pattern
- (concat "\\("
- (mapconcat
- (function (lambda (pat) (first pat)))
- php-imenu-patterns "\\)\\|\\(")
- "\\)"))
- (index-alist '()))
- (goto-char min)
- (save-match-data
- (while (re-search-forward combined-pattern max t)
- (let ((pos (set-marker (make-marker) (match-beginning 0)))
- (min (match-end 0))
- (pat (save-excursion
- (goto-char (match-beginning 0))
- (find-if (function
- (lambda (pat) (looking-at (first pat))))
- php-imenu-patterns))))
- (when (not pat)
- (message "php-imenu: How can no pattern get us here! %S" pos))
- (when (and pat
- (not (php-imenu-in-string-p))
- )
- (let* ((name (funcall (second pat)))
- (max (funcall (third pat)))
- (children (php-imenu-create-index-helper min max name)))
- ;; should validate max: what happens if unmatched curly?
- ;(message "%S %S %S" nm name (mapcar (function first) children))
- (if (equal '() children)
- (push (cons name pos) index-alist)
- (push (cons name
- (funcall php-imenu-alist-postprocessor
- (cons (cons "*go*" pos)
- children)))
- index-alist))
- ))
- (imenu-progress-message php-imenu-prev-pos nil)
- )))
- (reverse index-alist)))
-
-;;; Recognize when in quoted strings or heredoc-style string literals
-(defun php-imenu-in-string-p ()
- (save-match-data
- (or (in-string-p)
- (let ((pt (point)))
- (save-excursion
- (and (re-search-backward "<<<\\([A-Za-z0-9_]+\\)$" nil t)
- (not (re-search-forward (concat "^"
- (match-string-no-properties 1)
- ";$")
- pt t))))))))
diff --git a/emacs.d/nxhtml/related/readme.txt b/emacs.d/nxhtml/related/readme.txt
deleted file mode 100644
index 465fbf6..0000000
--- a/emacs.d/nxhtml/related/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-This subdir (related/) contains files that are taken from different
-places and are maybe modified to work with nXhtml.
-
-Please notice that major mode that are used with mumamo-mode must be a
-bit more carefully written. One problem I have noticed is that some
-major modes requuires that buffer-file-name is non-nil. That
-assumption does not work when mumamo-mode is used!
diff --git a/emacs.d/nxhtml/related/rhino.js b/emacs.d/nxhtml/related/rhino.js
deleted file mode 100644
index efc50f0..0000000
--- a/emacs.d/nxhtml/related/rhino.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Where you store your files
-var project_folder = 'file:///c:/emacs/p/091105/EmacsW32/nxhtml/related/';
-// Browser environment wrapper over Rhino
-load(project_folder + 'env.js');
-// For DOM constructing
-window.location = project_folder + 'blank.html';
-var my_script = arguments[0];
-// If DOM ready
-window.onload = function(){
- // Avoid recursive inclusion
- if ("rhino_flymake.js" != my_script) {
- load(my_script);
- }
-}
diff --git a/emacs.d/nxhtml/related/smarty-mode.el b/emacs.d/nxhtml/related/smarty-mode.el
deleted file mode 100644
index ad003b5..0000000
--- a/emacs.d/nxhtml/related/smarty-mode.el
+++ /dev/null
@@ -1,2753 +0,0 @@
-;;; smarty-mode.el --- major mode for editing Smarty templates
-
-;; Author: Vincent DEBOUT <deboutv@free.fr>
-;; Maintainer: Vincent DEBOUT <deboutv@free.fr>
-;; Keywords: languages smarty templates
-;; WWW: http://deboutv.free.fr/lisp/smarty/
-
-;;; License
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-;; Minor changes by Lennart Borgman
-
-(defconst smarty-version "0.0.5"
- "Smarty Mode version number.")
-
-(defconst smarty-time-stamp "2007-11-01"
- "Smarty Mode time stamp for last update.")
-
-(defconst smarty-is-xemacs (string-match "XEmacs" emacs-version)
- "Non-nil if XEmacs is used.")
-
-(require 'font-lock)
-(when (not smarty-is-xemacs)
- (require 'cc-mode)
- (require 'custom)
- (require 'etags))
-(eval-when-compile
- (require 'regexp-opt))
-;;(when smarty-is-xemacs
- (require 'easymenu)
- (require 'hippie-exp)
-;;)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Customization
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;###autoload
-(defgroup smarty nil
- "Customizations for Smarty mode."
- :prefix "smarty-"
- :group 'languages)
-
-(defgroup smarty-mode nil
- "Customizations for Smarty mode."
- :group 'smarty)
-
-(defcustom smarty-electric-mode t
- "*Non-nil enables electrification (automatic template generation).
-If nil, template generators can still be invoked through key bindings and
-menu. Is indicated in the modeline by \"/e\" after the mode name and can be
-toggled by `\\[smarty-electric-mode]'."
- :type 'boolean
- :group 'smarty-mode)
-
-(defcustom smarty-stutter-mode t
- "*Non-nil enables stuttering.
-Is indicated in the modeline by \"/s\" after the mode name and can be toggled
-by `\\[smarty-stutter-mode]'."
- :type 'boolean
- :group 'smarty-mode)
-
-(defgroup smarty-menu nil
- "Customizations for menues."
- :group 'smarty)
-
-(defcustom smarty-source-file-menu t
- "*Non-nil means add a menu of all source files in current directory."
- :type 'boolean
- :group 'smarty-menu)
-
-(defgroup smarty-highlight nil
- "Customizations for highlight."
- :group 'smarty)
-
-(defcustom smarty-highlight-plugin-functions t
- "*Non-nil means highlight the plugin functions in the buffer."
- :type 'boolean
- :group 'smarty-highlight)
-
-(defgroup smarty-template nil
- "Customizations for templates."
- :group 'smarty)
-
-(defgroup smarty-header nil
- "Customizations for header template."
- :group 'smarty-template)
-
-(defcustom smarty-file-header ""
- "*String or file to insert as file header.
-If the string specifies an existing file name, the contents of the file is
-inserted, otherwise the string itself is inserted as file header.
-Type `C-j' for newlines.
-If the header contains RCS keywords, they may be written as <RCS>Keyword<RCS>
-if the header needs to be version controlled.
-
-The following keywords for template generation are supported:
- <filename> : replaced by the name of the buffer
- <author> : replaced by the user name and email address
- \(`user-full-name',`mail-host-address', `user-mail-address')
- <login> : replaced by user login name (`user-login-name')
- <company> : replaced by contents of option `smarty-company-name'
- <date> : replaced by the current date
- <year> : replaced by the current year
- <copyright> : replaced by copyright string (`smarty-copyright-string')
- <cursor> : final cursor position."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-file-footer ""
- "*String or file to insert as file footer.
-If the string specifies an existing file name, the contents of the file is
-inserted, otherwise the string itself is inserted as file footer (i.e. at
-the end of the file).
-Type `C-j' for newlines.
-The same keywords as in option `smarty-file-header' can be used."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-company-name ""
- "*Name of company to insert in file header.
-See option `smarty-file-header'."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-copyright-string ""
- "*Copyright string to insert in file header.
-Can be multi-line string (type `C-j' for newline) and contain other file
-header keywords (see option `smarty-file-header')."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-date-format "%Y-%m-%d"
- "*Specifies the date format to use in the header.
-This string is passed as argument to the command `format-time-string'.
-For more information on format strings, see the documentation for the
-`format-time-string' command (C-h f `format-time-string')."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-modify-date-prefix-string ""
- "*Prefix string of modification date in Smarty file header.
-If actualization of the modification date is called (menu,
-`\\[smarty-template-modify]'), this string is searched and the rest
-of the line replaced by the current date."
- :type 'string
- :group 'smarty-header)
-
-(defcustom smarty-modify-date-on-saving nil
- "*Non-nil means update the modification date when the buffer is saved.
-Calls function `\\[smarty-template-modify]').
-
-NOTE: Activate the new setting in a Smarty buffer by using the menu entry
- \"Activate Options\"."
- :type 'boolean
- :group 'smarty-header)
-
-(defgroup smarty-misc nil
- "Miscellaneous customizations."
- :group 'smarty)
-
-(defcustom smarty-left-delimiter "{"
- "Left escaping delimiter."
- :type 'string
- :group 'smarty-misc)
-
-(defcustom smarty-right-delimiter "}"
- "Right escaping delimiter."
- :type 'string
- :group 'smarty-misc)
-
-(defcustom smarty-intelligent-tab t
- "*Non-nil means `TAB' does indentation, word completion and tab insertion.
-That is, if preceding character is part of a word then complete word,
-else if not at beginning of line then insert tab,
-else if last command was a `TAB' or `RET' then dedent one step,
-else indent current line (i.e. `TAB' is bound to `smarty-electric-tab').
-If nil, TAB always indents current line (i.e. `TAB' is bound to
-`indent-according-to-mode').
-
-NOTE: Activate the new setting in a Smarty buffer by using the menu entry
- \"Activate Options\"."
- :type 'boolean
- :group 'smarty-misc)
-
-(defcustom smarty-word-completion-in-minibuffer t
- "*Non-nil enables word completion in minibuffer (for template prompts).
-
-NOTE: Activate the new setting by restarting Emacs."
- :type 'boolean
- :group 'smarty-misc)
-
-(defcustom smarty-word-completion-case-sensitive nil
- "*Non-nil means word completion using `TAB' is case sensitive.
-That is, `TAB' completes words that start with the same letters and case.
-Otherwise, case is ignored."
- :type 'boolean
- :group 'smarty-misc)
-
-;; Functions
-
-(defun smarty-customize ()
- "Call the customize function with `smarty' as argument."
- (interactive)
- (customize-browse 'smarty))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Variables
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-menu-max-size 20
- "*Specifies the maximum size of a menu before splitting it into submenues.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Menu tools functions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-menu-split (list title)
- "Split menu LIST into several submenues, if number of
-elements > `smarty-menu-max-size'."
- (if (> (length list) smarty-menu-max-size)
- (let ((remain list)
- (result '())
- (sublist '())
- (menuno 1)
- (i 0))
- (while remain
- (setq sublist (cons (car remain) sublist))
- (setq remain (cdr remain))
- (setq i (+ i 1))
- (if (= i smarty-menu-max-size)
- (progn
- (setq result (cons (cons (format "%s %s" title menuno)
- (nreverse sublist)) result))
- (setq i 0)
- (setq menuno (+ menuno 1))
- (setq sublist '()))))
- (and sublist
- (setq result (cons (cons (format "%s %s" title menuno)
- (nreverse sublist)) result)))
- (nreverse result))
- list))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Source file menu
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-sources-menu nil)
-
-;; Create the source menu
-(defun smarty-add-source-files-menu ()
- "Scan directory for all Smarty source files and generate menu.
-The directory of the current source file is scanned."
- (interactive)
- (message "Scanning directory for source files ...")
- (let ((newmap (current-local-map))
- (file-list (smarty-get-source-files))
- menu-list found)
- ;; Create list for menu
- (setq found nil)
- (while file-list
- (setq found t)
- (setq menu-list (cons (vector (car file-list)
- (list 'find-file (car file-list)) t)
- menu-list))
- (setq file-list (cdr file-list)))
- (setq menu-list (smarty-menu-split menu-list "Sources"))
- (when found (setq menu-list (cons "--" menu-list)))
- (setq menu-list (cons ["*Rescan*" smarty-add-source-files-menu t] menu-list))
- (setq menu-list (cons "Sources" menu-list))
- ;; Create menu
- (easy-menu-add menu-list)
- (easy-menu-define smarty-sources-menu newmap
- "Smarty source files menu" menu-list))
- (message ""))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Smarty menu
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-create-mode-menu ()
- "Create Smarty Mode menu."
- `("Smarty"
- ("Templates"
- ("Built-in Functions"
- ["capture" smarty-template-capture t]
- ["config_load" smarty-template-config-load t]
- ["else" smarty-template-else t]
- ["elseif" smarty-template-elseif t]
- ["foreach" smarty-template-foreach t]
- ["foreachelse" smarty-template-foreachelse t]
- ["if" smarty-template-if t]
- ["include" smarty-template-include t]
- ["include_php" smarty-template-include-php t]
- ["insert" smarty-template-insert t]
- ["ldelim" smarty-template-ldelim t]
- ["literal" smarty-template-literal t]
- ["php" smarty-template-php t]
- ["rdelim" smarty-template-rdelim t]
- ["section" smarty-template-section t]
- ["sectionelse" smarty-template-sectionelse t]
- ["strip" smarty-template-strip t])
- ("Custom Functions"
- ["assign" smarty-template-assign t]
- ["counter" smarty-template-counter t]
- ["cycle" smarty-template-cycle t]
- ["debug" smarty-template-debug t]
- ["eval" smarty-template-eval t]
- ["fetch" smarty-template-fetch t]
- ["html_checkboxes" smarty-template-html-checkboxes t]
- ["html_image" smarty-template-html-image t]
- ["html_options" smarty-template-html-options t]
- ["html_radios" smarty-template-html-radios t]
- ["html_select_date" smarty-template-html-select-date t]
- ["html_select_time" smarty-template-html-select-time t]
- ["html_table" smarty-template-html-table t]
- ["mailto" smarty-template-mailto t]
- ["math" smarty-template-math t]
- ["popup" smarty-template-popup t]
- ["popup_init" smarty-template-popup-init t]
- ["textformat" smarty-template-textformat t])
- ("Variable Modifiers"
- ["capitalize" smarty-template-capitalize t]
- ["cat" smarty-template-cat t]
- ["count_characters" smarty-template-count-characters t]
- ["count_paragraphs" smarty-template-count-paragraphs t]
- ["count_sentences" smarty-template-count-sentences t]
- ["count_words" smarty-template-count-words t]
- ["date_format" smarty-template-date-format t]
- ["default" smarty-template-default t]
- ["escape" smarty-template-escape t]
- ["indent" smarty-template-indent t]
- ["lower" smarty-template-lower t]
- ["nl2br" smarty-template-nl2br t]
- ["regex_replace" smarty-template-regex-replace t]
- ["replace" smarty-template-replace t]
- ["spacify" smarty-template-spacify t]
- ["string_format" smarty-template-string-format t]
- ["strip" smarty-template-vstrip t]
- ["strip_tags" smarty-template-strip-tags t]
- ["truncate" smarty-template-truncate t]
- ["upper" smarty-template-upper t]
- ["wordwrap" smarty-template-wordwrap t])
- ("Plugins (Functions)"
- ("BlockRepeatPlugin"
- ["repeat" smarty-template-repeat t]
- ["str_repeat" smarty-template-str-repeat t])
- ("ClipCache"
- ["clipcache" smarty-template-clipcache t]
- ["include_clipcache" smarty-template-include-clipcache t])
- ("SmartyFormtool"
- ["formtool_checkall" smarty-template-formtool-checkall t]
- ["formtool_copy" smarty-template-formtool-copy t]
- ["formtool_count_chars" smarty-template-formtool-count-chars t]
- ["formtool_init" smarty-template-formtool-init t]
- ["formtool_move" smarty-template-formtool-move t]
- ["formtool_moveall" smarty-template-formtool-moveall t]
- ["formtool_movedown" smarty-template-formtool-movedown t]
- ["formtool_moveup" smarty-template-formtool-moveup t]
- ["formtool_remove" smarty-template-formtool-remove t]
- ["formtool_rename" smarty-template-formtool-rename t]
- ["formtool_save" smarty-template-formtool-save t]
- ["formtool_selectall" smarty-template-formtool-selectall t])
- ("SmartyPaginate"
- ["paginate_first" smarty-template-paginate-first t]
- ["paginate_last" smarty-template-paginate-last t]
- ["paginate_middle" smarty-template-paginate-middle t]
- ["paginate_next" smarty-template-paginate-next t]
- ["paginate_prev" smarty-template-paginate-prev t])
- ("SmartyValidate"
- ["validate" smarty-template-validate t]))
- ("Plugins (Variable Modifiers)"
- ("AlternativeDateModifierPlugin"
- ["date_format2" smarty-template-date-formatto t])
- ("B2Smilies"
- ["B2Smilies" smarty-template-btosmilies t])
- ("BBCodePlugin"
- ["bbcode2html" smarty-template-bbcodetohtml t])
- )
- "--"
- ["Insert Header" smarty-template-header t]
- ["Insert Footer" smarty-template-footer t]
- ["Insert Date" smarty-template-insert-date t]
- ["Modify Date" smarty-template-modify t])
- "--"
- ["Show Messages" smarty-show-messages :keys "C-c M-m"]
- ["Smarty Mode Documentation" smarty-doc-mode :keys "C-c C-h"]
- ["Version" smarty-version :keys "C-c C-v"]
- "--"
- ("Options"
- ("Mode"
- ["Electric Mode"
- (progn (customize-set-variable 'smarty-electric-mode
- (not smarty-electric-mode))
- (smarty-mode-line-update))
- :style toggle :selected smarty-electric-mode :keys "C-c C-m C-e"]
- ["Stutter Mode"
- (progn (customize-set-variable 'smarty-stutter-mode
- (not smarty-stutter-mode))
- (smarty-mode-line-update))
- :style toggle :selected smarty-stutter-mode :keys "C-c C-m C-s"]
- "--"
- ["Customize Group..." (customize-group 'smarty-mode) t])
- ("Menu"
- ["Source Menu"
- (customize-set-variable 'smarty-source-file-menu
- (not smarty-source-file-menu))
- :style toggle :selected smarty-source-file-menu]
- "--"
- ["Customize Group..." (customize-group 'smarty-menu) t])
- ("Highlight"
- ["Highlight plugin functions"
- (progn (customize-set-variable 'smarty-highlight-plugin-functions
- (not smarty-highlight-plugin-functions)))
- :style toggle :selected smarty-highlight-plugin-functions]
- "--"
- ["Customize Group..." (customize-group 'smarty-highlight) t])
- ("Template"
- ("Header"
- ["Header template..."
- (customize-option 'smarty-file-header) t]
- ["Footer template..."
- (customize-option 'smarty-file-footer) t]
- ["Company..."
- (customize-option 'smarty-company-name) t]
- ["Copyright..."
- (customize-option 'smarty-copyright-string) t]
- ["Date format..."
- (customize-option 'smarty-date-format) t]
- ["Modify date prefix..."
- (customize-option 'smarty-modify-date-prefix-string) t]
- ["Modify date on saving"
- (customize-set-variable 'smarty-modify-date-on-saving
- (not smarty-modify-date-on-saving))
- :style toggle :selected smarty-modify-date-on-saving]
- "--"
- ["Customize Group..." (customize-group 'smarty-header) t])
- "--"
- ["Customize Group..." (customize-group 'smarty-template) t])
- ("Miscellaneous"
- ["Left delimiter..."
- (customize-option 'smarty-left-delimiter) t]
- ["Right delimiter..."
- (customize-option 'smarty-right-delimiter) t]
- ["Use Intelligent Tab"
- (progn (customize-set-variable 'smarty-intelligent-tab
- (not smarty-intelligent-tab))
- (smarty-activate-customizations))
- :style toggle :selected smarty-intelligent-tab]
- ["Word Completion in Minibuffer"
- (progn (customize-set-variable 'smarty-word-completion-in-minibuffer
- (not smarty-word-completion-in-minibuffer))
- (message "Activate new setting by saving options and restarting Emacs"))
- :style toggle :selected smarty-word-completion-in-minibuffer]
- ["Completion is case sensitive"
- (customize-set-variable 'smarty-word-completion-case-sensitive
- (not smarty-word-completion-case-sensitive))
- :style toggle :selected smarty-word-completion-case-sensitive]
- "--"
- ["Customize Group..." (customize-group 'smarty-misc) t])
- "--"
- ["Save Options" customize-save-customized t]
- ["Activate Options" smarty-activate-customizations t]
- ["Browse Options..." smarty-customize t])))
-
-(defvar smarty-mode-menu-list (smarty-create-mode-menu)
- "Smarty Mode menu.")
-
-(defvar smarty-mode-map nil
- "Keymap for Smarty Mode.")
-
-(defun smarty-update-mode-menu ()
- "Update Smarty Mode menu."
- (interactive)
- (easy-menu-remove smarty-mode-menu-list)
- (setq smarty-mode-menu-list (smarty-create-mode-menu))
- (easy-menu-add smarty-mode-menu-list)
- (easy-menu-define smarty-mode-menu smarty-mode-map
- "Menu keymap for Smarty Mode." smarty-mode-menu-list))
-
-
-
-
-(defvar smarty-mode-hook nil)
-
-(defvar smarty-functions nil
- "List of Smarty functions.")
-
-(defvar smarty-functions-regexp nil
- "Regexp for Smarty functions.")
-
-(defconst smarty-01-functions
- '("capture" "config_load" "foreach" "foreachelse" "include"
- "include_php" "insert" "if" "elseif" "else" "ldelim" "rdelim"
- "literal" "php" "section" "sectionelse" "strip" "assign" "counter"
- "cycle" "debug" "eval" "fetch" "html_checkboxes" "html_image"
- "html_options" "html_radios" "html_select_date" "html_select_time"
- "html_table" "math" "mailto" "popup_init" "popup" "textformat")
- "Smarty built-in & custom functions.")
-
-(defvar smarty-modifiers nil
- "List of Smarty variable modifiers.")
-
-(defvar smarty-modifiers-regexp nil
- "Regexp for Smarty variable modifiers.")
-
-(defconst smarty-01-modifiers
- '("capitalize" "cat" "count_characters" "count_paragraphs"
- "count_sentences" "count_words" "date_format" "default"
- "escape" "indent" "lower" "nl2br" "regex_replace" "replace"
- "spacify" "string_format" "strip" "strip_tags" "truncate"
- "upper" "wordwrap")
- "Smarty variable modifiers.")
-
-(defvar smarty-plugins-functions nil
- "List of Smarty functions.")
-
-(defvar smarty-plugins-functions-regexp nil
- "Regexp for Smarty functions.")
-
-(defconst smarty-01-plugins-functions
- '("validate" "formtool_checkall" "formtool_copy" "formtool_count_chars"
- "formtool_init" "formtool_move" "formtool_moveall"
- "formtool_movedown" "formtool_moveup" "formtool_remove"
- "formtool_rename" "formtool_save" "formtool_selectall"
- "paginate_first" "paginate_last" "paginate_middle"
- "paginate_next" "paginate_prev" "clipcache" "include_clipcache"
- "repeat" "str_repeat")
- "Smarty plugins functions.")
-
-(defvar smarty-plugins-modifiers nil
- "List of Smarty variable modifiers.")
-
-(defvar smarty-plugins-modifiers-regexp nil
- "Regexp for Smarty functions.")
-
-(defconst smarty-01-plugins-modifiers
- '("B2Smilies" "bbcode2html" "date_format2")
- "Smarty plugins modifiers.")
-
-(defconst smarty-constants
- (eval-when-compile
- (regexp-opt
- '("TRUE" "FALSE" "NULL") t))
- "Smarty constants.")
-
-
-;; Syntax table creation
-(defvar smarty-mode-syntax-table nil
- "Syntax table for smarty-mode.")
-
-(defvar smarty-mode-ext-syntax-table nil
- "Syntax table extended by `_' used in `smarty-mode' buffers.")
-
-(defun smarty-create-syntax-table ()
- (if smarty-mode-syntax-table
- ()
- (setq smarty-mode-syntax-table (make-syntax-table))
-
- ;; Make | a punctuation character
- (modify-syntax-entry ?| "." smarty-mode-syntax-table)
- ;; Make " a punctuation character so highlighing works withing html strings
- (modify-syntax-entry ?\" "." smarty-mode-syntax-table)
- ;; define parentheses to match
- (modify-syntax-entry ?\( "()" smarty-mode-syntax-table)
- (modify-syntax-entry ?\) ")(" smarty-mode-syntax-table)
- (modify-syntax-entry ?\[ "(]" smarty-mode-syntax-table)
- (modify-syntax-entry ?\] ")[" smarty-mode-syntax-table)
- (modify-syntax-entry ?\{ "(}" smarty-mode-syntax-table)
- (modify-syntax-entry ?\} "){" smarty-mode-syntax-table)
- )
- (set-syntax-table smarty-mode-syntax-table)
- ;; extended syntax table including '_' (for simpler search regexps)
- (setq smarty-mode-ext-syntax-table (copy-syntax-table smarty-mode-syntax-table))
- (modify-syntax-entry ?_ "w" smarty-mode-ext-syntax-table))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; File/directory manipulation
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-directory-files (directory &optional full match)
- "Call `directory-files' if DIRECTORY exists, otherwise generate error
-message."
- (if (not (file-directory-p directory))
- (smarty-warning-when-idle "No such directory: \"%s\"" directory)
- (let ((dir (directory-files directory full match)))
- (setq dir (delete "." dir))
- (setq dir (delete ".." dir))
- dir)))
-
-(defun smarty-get-source-files (&optional full directory)
- "Get list of SMARTY source files in DIRECTORY or current directory."
- (let ((mode-alist auto-mode-alist)
- filename-regexp)
- ;; create regular expressions for matching file names
- (setq filename-regexp "\\`[^.].*\\(")
- (while mode-alist
- (when (eq (cdar mode-alist) 'smarty-mode)
- (setq filename-regexp
- (concat filename-regexp (caar mode-alist) "\\|")))
- (setq mode-alist (cdr mode-alist)))
- (setq filename-regexp
- (concat (substring filename-regexp 0
- (string-match "\\\\|$" filename-regexp)) "\\)"))
- ;; find files
- (smarty-directory-files
- (or directory default-directory) full filename-regexp)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Messages reporting
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-warnings nil
- "Warnings to tell the user during start up.")
-
-(defun smarty-run-when-idle (secs repeat function)
- "Wait until idle, then run FUNCTION."
- (if (fboundp 'start-itimer)
- (start-itimer "smarty-mode" function secs repeat t)
-; (run-with-idle-timer secs repeat function)))
- ;; explicitely activate timer (necessary when Emacs is already idle)
- (aset (run-with-idle-timer secs repeat function) 0 nil)))
-
-(defun smarty-warning-when-idle (&rest args)
- "Wait until idle, then print out warning STRING and beep."
- (save-match-data ;; runs in timer
- (if noninteractive
- (smarty-warning (apply 'format args) t)
- (unless smarty-warnings
- (smarty-run-when-idle .1 nil 'smarty-print-warnings))
- (setq smarty-warnings (cons (apply 'format args) smarty-warnings)))))
-
-(defun smarty-warning (string &optional nobeep)
- "Print out warning STRING and beep."
- (message (concat "WARNING: " string))
- (unless (or nobeep noninteractive) (beep)))
-
-(defun smarty-print-warnings ()
- "Print out messages in variable `smarty-warnings'."
- (let ((no-warnings (length smarty-warnings)))
- (setq smarty-warnings (nreverse smarty-warnings))
- (while smarty-warnings
- (message (concat "WARNING: " (car smarty-warnings)))
- (setq smarty-warnings (cdr smarty-warnings)))
- (beep)
- (when (> no-warnings 1)
- (message "WARNING: See warnings in message buffer (type `C-c M-m')."))))
-
-(defun smarty-show-messages ()
- "Get *Messages* buffer to show recent messages."
- (interactive)
- (display-buffer " *Message-Log*"))
-
-(defun smarty-version ()
- "Echo the current version of Smarty Mode in the minibuffer."
- (interactive)
- (message "Smarty Mode %s (%s)" smarty-version smarty-time-stamp)
- (smarty-keep-region-active))
-
-;; active regions
-(defun smarty-keep-region-active ()
- "Do whatever is necessary to keep the region active in XEmacs.
-Ignore byte-compiler warnings you might see."
- (and (boundp 'zmacs-region-stays)
- (setq zmacs-region-stays t)))
-
-(defmacro smarty-prepare-search-1 (&rest body)
- "Enable case insensitive search and switch to syntax table that includes '_',
-then execute BODY, and finally restore the old environment. Used for
-consistent searching."
- `(let ((case-fold-search t) ; case insensitive search
- (current-syntax-table (syntax-table))
- result
- (restore-prog ; program to restore enviroment
- '(progn
- ;; restore syntax table
- (set-syntax-table current-syntax-table))))
- ;; use extended syntax table
- (set-syntax-table smarty-mode-ext-syntax-table)
- ;; execute BODY safely
- (setq result
- (condition-case info
- (progn ,@body)
- (error (eval restore-prog) ; restore environment on error
- (error (cadr info))))) ; pass error up
- ;; restore environment
- (eval restore-prog)
- result))
-
-(defmacro smarty-prepare-search-2 (&rest body)
- "Enable case insensitive search, switch to syntax table that includes '_',
-and remove `intangible' overlays, then execute BODY, and finally restore the
-old environment. Used for consistent searching."
- `(let ((case-fold-search t) ; case insensitive search
- (current-syntax-table (syntax-table))
- result overlay-all-list overlay-intangible-list overlay
- (restore-prog ; program to restore enviroment
- '(progn
- ;; restore syntax table
- (set-syntax-table current-syntax-table)
- ;; restore `intangible' overlays
- (when (fboundp 'overlay-lists)
- (while overlay-intangible-list
- (overlay-put (car overlay-intangible-list) 'intangible t)
- (setq overlay-intangible-list
- (cdr overlay-intangible-list)))))))
- ;; use extended syntax table
- (set-syntax-table smarty-mode-ext-syntax-table)
- ;; remove `intangible' overlays
- (when (fboundp 'overlay-lists)
- (setq overlay-all-list (overlay-lists))
- (setq overlay-all-list
- (append (car overlay-all-list) (cdr overlay-all-list)))
- (while overlay-all-list
- (setq overlay (car overlay-all-list))
- (when (memq 'intangible (overlay-properties overlay))
- (setq overlay-intangible-list
- (cons overlay overlay-intangible-list))
- (overlay-put overlay 'intangible nil))
- (setq overlay-all-list (cdr overlay-all-list))))
- ;; execute BODY safely
- (setq result
- (condition-case info
- (progn ,@body)
- (error (eval restore-prog) ; restore environment on error
- (error (cadr info))))) ; pass error up
- ;; restore environment
- (eval restore-prog)
- result))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Enabling/disabling
-
-(defun smarty-mode-line-update ()
- "Update the modeline string for Smarty major mode."
- (setq mode-name (concat "Smarty"
- (and (or smarty-electric-mode smarty-stutter-mode) "/")
- (and smarty-electric-mode "e")
- (and smarty-stutter-mode "s")))
- (force-mode-line-update t))
-
-(defun smarty-electric-mode (arg)
- "Toggle Smarty electric mode.
-Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
- (interactive "P")
- (setq smarty-electric-mode
- (cond ((or (not arg) (zerop arg)) (not smarty-electric-mode))
- ((> arg 0) t) (t nil)))
- (smarty-mode-line-update))
-
-(defun smarty-stutter-mode (arg)
- "Toggle Smarty stuttering mode.
-Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
- (interactive "P")
- (setq smarty-stutter-mode
- (cond ((or (not arg) (zerop arg)) (not smarty-stutter-mode))
- ((> arg 0) t) (t nil)))
- (smarty-mode-line-update))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Smarty code delimitation
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-in-literal ()
- "Determine if point is in a Smarty literal."
- (save-excursion
- (let ((here (point))
- start state)
- (beginning-of-line)
- (setq start (point))
- (goto-char here)
- (setq state (parse-partial-sexp start (point)))
- (cond
- ((nth 3 state) 'string)
- ((nth 4 state) 'comment)
- (t nil)))))
-
-(defun smarty-in-comment-p ()
- "Check if point is in a comment."
- (let ((result nil) (here (point-marker)) found)
- (save-excursion
- (setq found (re-search-backward (regexp-quote (concat smarty-left-delimiter "*")) nil t))
- (when found
- (setq result (re-search-forward (regexp-quote (concat "*" smarty-right-delimiter)) here t))
- (setq result (not result))))
- result))
-
-(defun smarty-after-ldelim ()
- "Check that the previous character is the left delimiter."
- (let ((here (point-marker)) ldelim-found ldelim-point)
- (save-excursion
- (setq ldelim-found (re-search-backward (regexp-quote smarty-left-delimiter) nil t))
- (re-search-forward (regexp-quote smarty-left-delimiter) here t)
- (setq ldelim-point (point-marker))
- (goto-char here)
- (if (and (= here ldelim-point) ldelim-found)
- t
- nil))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Words to expand
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-words-init ()
- "Initialize reserved words."
- (setq smarty-functions smarty-01-functions)
- (setq smarty-modifiers smarty-01-modifiers)
- (setq smarty-plugins-functions smarty-01-plugins-functions)
- (setq smarty-plugins-modifiers smarty-01-plugins-modifiers)
- (setq smarty-functions-regexp (concat "\\<\\(" (regexp-opt smarty-functions) "\\)\\>"))
- (setq smarty-modifiers-regexp (concat "\\<\\(" (regexp-opt smarty-modifiers) "\\)\\>"))
- (setq smarty-plugins-functions-regexp (concat "\\<\\(" (regexp-opt smarty-plugins-functions) "\\)\\>"))
- (setq smarty-plugins-modifiers-regexp (concat "\\<\\(" (regexp-opt smarty-plugins-modifiers) "\\)\\>"))
- (smarty-abbrev-list-init))
-
-(defvar smarty-abbrev-list nil
- "Predefined abbreviations for Smarty.")
-
-(defun smarty-abbrev-list-init ()
- (setq smarty-abbrev-list
- (append
- (list nil) smarty-functions
- (list nil) smarty-modifiers
- (list nil) smarty-plugins-functions
- (list nil) smarty-plugins-modifiers)))
-
-(defvar smarty-expand-upper-case nil)
-
-(defun smarty-try-expand-abbrev (old)
- "Try expanding abbreviations from `smarty-abbrev-list'."
- (unless old
- (he-init-string (he-dabbrev-beg) (point))
- (setq he-expand-list
- (let ((abbrev-list smarty-abbrev-list)
- (sel-abbrev-list '()))
- (while abbrev-list
- ; (if (stringp (car abbrev-list))
- ; (insert (concat " " (car abbrev-list))))
- (when (or (not (stringp (car abbrev-list)))
- (string-match
- (concat "^" he-search-string) (car abbrev-list)))
- (setq sel-abbrev-list
- (cons (car abbrev-list) sel-abbrev-list)))
- (setq abbrev-list (cdr abbrev-list)))
- (nreverse sel-abbrev-list))))
- (while (and he-expand-list
- (or (not (stringp (car he-expand-list)))
- (he-string-member (car he-expand-list) he-tried-table t)))
- (unless (stringp (car he-expand-list))
- (setq smarty-expand-upper-case (car he-expand-list)))
- (setq he-expand-list (cdr he-expand-list)))
- (if (null he-expand-list)
- (progn (when old (he-reset-string))
- nil)
- (he-substitute-string
- (if smarty-expand-upper-case
- (upcase (car he-expand-list))
- (car he-expand-list))
- t)
- (setq he-expand-list (cdr he-expand-list))
- t))
-
-;; initialize reserved words for Smarty Mode
-(smarty-words-init)
-
-;; function for expanding abbrevs and dabbrevs
-(defun smarty-expand-abbrev (arg))
-(fset 'smarty-expand-abbrev (make-hippie-expand-function
- '(try-expand-dabbrev
- try-expand-dabbrev-all-buffers
- smarty-try-expand-abbrev)))
-
-;; function for expanding parenthesis
-(defun smarty-expand-paren (arg))
-(fset 'smarty-expand-paren (make-hippie-expand-function
- '(try-expand-list
- try-expand-list-all-buffers)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Stuttering
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-end-comment-column 80)
-
-(defvar found) ;; silence compiler, dyn var
-
-(defun smarty-electric-tab (&optional prefix-arg)
- "If preceding character is part of a word or a paren then hippie-expand,
-else if right of non whitespace on line then insert tab,
-else if last command was a tab or return then dedent one step or if a comment
-toggle between normal indent and inline comment indent,
-else indent `correctly'."
- (interactive "*P")
- (smarty-prepare-search-2
- (cond
- ;; expand word
- ((= (char-syntax (preceding-char)) ?w)
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil)
- (hippie-expand-only-buffers
- (or (and (boundp 'hippie-expand-only-buffers)
- hippie-expand-only-buffers)
- '(smarty-mode))))
- (smarty-expand-abbrev prefix-arg)))
- ;; expand parenthesis
- ((or (= (preceding-char) ?\() (= (preceding-char) ?\)))
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil))
- (smarty-expand-paren prefix-arg))))
- (setq this-command 'smarty-electric-tab)))
-
-(defun smarty-electric-space (count)
- "Expand abbreviations and self-insert space(s)."
- (interactive "p")
- (let ((here (point-marker)) ldelim-found ldelim-point rdelim-found rdelim-point
- delete-a)
- (setq ldelim-found (re-search-backward (regexp-quote smarty-left-delimiter) nil t))
- (re-search-forward (regexp-quote smarty-left-delimiter) here t)
- (setq ldelim-point (point-marker))
- (goto-char here)
- (setq rdelim-found (re-search-backward (regexp-quote (concat " " smarty-right-delimiter)) nil t))
- (re-search-forward (regexp-quote (concat " " smarty-right-delimiter)) here t)
- (setq rdelim-point (point-marker))
- (goto-char here)
- (cond ((and (= here ldelim-point) ldelim-found) (insert (concat "ldelim" smarty-right-delimiter)))
- ((and (= here rdelim-point) rdelim-found)
- (re-search-backward (regexp-quote (concat " " smarty-right-delimiter)) nil t)
- (delete-char 1)
- (insert (concat " " smarty-left-delimiter "rdelim"))
- (goto-char here))
- ((smarty-in-comment-p)
- (self-insert-command count)
- (cond ((>= (current-column) (+ 2 smarty-end-comment-column))
- (backward-char 1)
- (skip-chars-backward "^ \t\n")
- (indent-new-comment-line)
- (skip-chars-forward "^ \t\n")
- (forward-char 1))
- ((>= (current-column) smarty-end-comment-column)
- (indent-new-comment-line))
- (t nil)))
- ((or (and (>= (preceding-char) ?a) (<= (preceding-char) ?z))
- (and (>= (preceding-char) ?A) (<= (preceding-char) ?Z))
- (and (>= (preceding-char) ?0) (<= (preceding-char) ?9)))
- (progn
- (setq here (point-marker))
- (insert " ")
- (setq delete-a t)
- (if (re-search-backward "|" nil t)
- (progn
- (setq found (re-search-forward (regexp-quote "B2Smilies") here t))
- (if (and found (= here (point-marker)))
- (replace-match "btosmilies")
- (setq found (re-search-forward (regexp-quote "bbcode2html") here t))
- (if (and found (= here (point-marker)))
- (replace-match "bbcodetohtml")
- (setq found (re-search-forward (regexp-quote "date_format2") here t))
- (if (and found (= here (point-marker)))
- (replace-match "date_formatto")
- (goto-char here)
- (setq delete-a nil)
- (delete-char 1)))))
- (goto-char here)
- (setq delete-a nil)
- (delete-char 1)))
- (smarty-prepare-search-1 (expand-abbrev))
- (self-insert-command count)
- (if (and delete-a (looking-at " "))
- (delete-char 1)))
- (t (self-insert-command count)))))
-
-(defun smarty-electric-open-bracket (count)
- "'(' --> '(', '((' --> '[', '[(' --> '{'"
- (interactive "p")
- (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal)))
- (if (= (preceding-char) ?\()
- (progn (delete-char -1) (insert-char ?\[ 1))
- (if (= (preceding-char) ?\[)
- (progn (delete-char -1) (insert-char ?\{ 1))
- (insert-char ?\( 1)))
- (self-insert-command count)))
-
-(defun smarty-electric-close-bracket (count)
- "')' --> ')', '))' --> ']', '])' --> '}'"
- (interactive "p")
- (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal)))
- (progn
- (if (= (preceding-char) ?\))
- (progn (delete-char -1) (insert-char ?\] 1))
- (if (= (preceding-char) ?\])
- (progn (delete-char -1) (insert-char ?} 1))
- (insert-char ?\) 1)))
- (blink-matching-open))
- (self-insert-command count)))
-
-(defun smarty-electric-star (count)
- "After a left delimiter add a right delemiter to close the comment"
- (interactive "p")
- (let ((here (point-marker)) found)
- (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal)))
- (progn
- (setq found (re-search-backward (regexp-quote smarty-left-delimiter) nil t))
- (re-search-forward (regexp-quote smarty-left-delimiter) here t)
- (if (not (and (= here (point-marker)) found))
- (progn (goto-char here)
- (self-insert-command count))
- (self-insert-command count)
- (insert " ")
- (setq here (point-marker))
- (insert " *")
- (insert smarty-right-delimiter)
- (goto-char here)))
- (self-insert-command count))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Electrification
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defconst smarty-template-prompt-syntax "[^ =<>][^<>@.\n]*[^ =<>]"
- "Syntax of prompt inserted by template generators.")
-
-(defvar smarty-template-invoked-by-hook nil
- "Indicates whether a template has been invoked by a hook or by key or menu.
-Used for undoing after template abortion.")
-
-(defun smarty-minibuffer-tab (&optional prefix-arg)
- "If preceding character is part of a word or a paren then hippie-expand,
-else insert tab (used for word completion in Smarty minibuffer)."
- (interactive "P")
- (cond
- ;; expand word
- ((= (char-syntax (preceding-char)) ?w)
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil)
- (hippie-expand-only-buffers
- (or (and (boundp 'hippie-expand-only-buffers)
- hippie-expand-only-buffers)
- '(smarty-mode))))
- (smarty-expand-abbrev prefix-arg)))
- ;; expand parenthesis
- ((or (= (preceding-char) ?\() (= (preceding-char) ?\)))
- (let ((case-fold-search (not smarty-word-completion-case-sensitive))
- (case-replace nil))
- (smarty-expand-paren prefix-arg)))
- ;; insert tab
- (t (insert-tab))))
-
-;; correct different behavior of function `unread-command-events' in XEmacs
-(defun smarty-character-to-event (arg))
-(defalias 'smarty-character-to-event
- (if (fboundp 'character-to-event) 'character-to-event 'identity))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Abbrev ook bindings
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-mode-abbrev-table nil
- "Abbrev table to use in `smarty-mode' buffers.")
-
-(defun smarty-mode-abbrev-table-init ()
- "Initialize `smarty-mode-abbrev-table'."
- (when smarty-mode-abbrev-table (clear-abbrev-table smarty-mode-abbrev-table))
- (define-abbrev-table 'smarty-mode-abbrev-table
- (append
- '(
- ("capture" "" smarty-template-capture-hook 0)
- ("config_load" "" smarty-template-config-load-hook 0)
- ("else" "" smarty-template-else-hook 0)
- ("elseif" "" smarty-template-elseif-hook 0)
- ("foreach" "" smarty-template-foreach-hook 0)
- ("foreachelse" "" smarty-template-foreachelse-hook 0)
- ("if" "" smarty-template-if-hook 0)
- ("include" "" smarty-template-include-hook 0)
- ("include_php" "" smarty-template-include-php-hook 0)
- ("insert" "" smarty-template-insert-hook 0)
- ("ldelim" "" smarty-template-ldelim-hook 0)
- ("literal" "" smarty-template-literal-hook 0)
- ("php" "" smarty-template-php-hook 0)
- ("rdelim" "" smarty-template-rdelim-hook 0)
- ("section" "" smarty-template-section-hook 0)
- ("sectionelse" "" smarty-template-sectionelse-hook 0)
- ("strip" "" smarty-template-strip-hook 0)
- ("assign" "" smarty-template-assign-hook 0)
- ("counter" "" smarty-template-counter-hook 0)
- ("cycle" "" smarty-template-cycle-hook 0)
- ("debug" "" smarty-template-debug-hook 0)
- ("eval" "" smarty-template-eval-hook 0)
- ("fetch" "" smarty-template-fetch-hook 0)
- ("html_checkboxes" "" smarty-template-html-checkboxes-hook 0)
- ("html_image" "" smarty-template-html-image-hook 0)
- ("html_options" "" smarty-template-html-options-hook 0)
- ("html_radios" "" smarty-template-html-radios-hook 0)
- ("html_select_date" "" smarty-template-html-select-date-hook 0)
- ("html_select_time" "" smarty-template-html-select-time-hook 0)
- ("html_table" "" smarty-template-html-table-hook 0)
- ("mailto" "" smarty-template-mailto-hook 0)
- ("math" "" smarty-template-math-hook 0)
- ("popup" "" smarty-template-popup-hook 0)
- ("popup_init" "" smarty-template-popup-init-hook 0)
- ("textformat" "" smarty-template-textformat-hook 0)
- ("capitalize" "" smarty-template-capitalize-hook 0)
- ("cat" "" smarty-template-cat-hook 0)
- ("count_characters" "" smarty-template-count-characters-hook 0)
- ("count_paragraphs" "" smarty-template-count-paragraphs-hook 0)
- ("count_sentences" "" smarty-template-count-sentences-hook 0)
- ("count_words" "" smarty-template-count-words-hook 0)
- ("date_format" "" smarty-template-date-format-hook 0)
- ("default" "" smarty-template-default-hook 0)
- ("escape" "" smarty-template-escape-hook 0)
- ("indent" "" smarty-template-indent-hook 0)
- ("lower" "" smarty-template-lower-hook 0)
- ("nl2br" "" smarty-template-nl2br-hook 0)
- ("regex_replace" "" smarty-template-regex-replace-hook 0)
- ("replace" "" smarty-template-replace-hook 0)
- ("spacify" "" smarty-template-spacify-hook 0)
- ("string_format" "" smarty-template-string-format-hook 0)
- ("strip" "" smarty-template-vstrip-hook 0)
- ("strip_tags" "" smarty-template-strip-tags-hook 0)
- ("truncate" "" smarty-template-truncate-hook 0)
- ("upper" "" smarty-template-upper-hook 0)
- ("wordwrap" "" smarty-template-wordwrap-hook 0)
- ("validate" "" smarty-template-validate-hook 0)
- ("clipcache" "" smarty-template-clipcache-hook 0)
- ("repeat" "" smarty-template-repeat-hook 0)
- ("str_repeat" "" smarty-template-str-repeat-hook 0)
- ("include_clipcache" "" smarty-template-include-clipcache-hook 0)
- ("formtool_checkall" "" smarty-template-formtool-checkall-hook 0)
- ("formtool_copy" "" smarty-template-formtool-copy-hook 0)
- ("formtool_count_chars" "" smarty-template-formtool-count-chars-hook 0)
- ("formtool_init" "" smarty-template-formtool-init-hook 0)
- ("formtool_move" "" smarty-template-formtool-move-hook 0)
- ("formtool_moveall" "" smarty-template-formtool-moveall-hook 0)
- ("formtool_movedown" "" smarty-template-formtool-movedown-hook 0)
- ("formtool_moveup" "" smarty-template-formtool-moveup-hook 0)
- ("formtool_remove" "" smarty-template-formtool-remove-hook 0)
- ("formtool_rename" "" smarty-template-formtool-rename-hook 0)
- ("formtool_save" "" smarty-template-formtool-save-hook 0)
- ("formtool_selectall" "" smarty-template-formtool-selectall-hook 0)
- ("paginate_first" "" smarty-template-paginate-first-hook 0)
- ("paginate_last" "" smarty-template-paginate-last-hook 0)
- ("paginate_middle" "" smarty-template-paginate-middle-hook 0)
- ("paginate_next" "" smarty-template-paginate-next-hook 0)
- ("paginate_prev" "" smarty-template-paginate-prev-hook 0)
- ("btosmilies" "" smarty-template-btosmilies-hook 0)
- ("bbcodetohtml" "" smarty-template-bbcodetohtml-hook 0)
- ("date_formatto" "" smarty-template-date-formatto-hook 0)))))
-
-;; initialize abbrev table for Smarty Mode
-(smarty-mode-abbrev-table-init)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Abbrev hooks
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-hooked-abbrev (func)
- "Do function, if syntax says abbrev is a keyword, invoked by hooked abbrev,
-but not if inside a comment or quote)."
- (if (or (smarty-in-literal)
- (smarty-in-comment-p))
- (progn
- (insert " ")
- (unexpand-abbrev)
- (delete-char -1))
- (if (not smarty-electric-mode)
- (progn
- (insert " ")
- (unexpand-abbrev)
- (backward-word 1)
- (delete-char 1))
- (let ((invoke-char last-command-event)
- (abbrev-mode -1)
- (smarty-template-invoked-by-hook t))
- (let ((caught (catch 'abort
- (funcall func))))
- (when (stringp caught) (message caught)))
- (when (= invoke-char ?-) (setq abbrev-start-location (point)))
- ;; delete CR which is still in event queue
- (if (fboundp 'enqueue-eval-event)
- (enqueue-eval-event 'delete-char -1)
- (setq unread-command-events ; push back a delete char
- (list (smarty-character-to-event ?\177))))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Fontification
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-font-lock-keywords-1
- (list
-
- ;; Fontify built-in functions
- (cons
- (concat (regexp-quote smarty-left-delimiter) "[/]*" smarty-functions-regexp)
- '(1 font-lock-keyword-face))
-
- (cons
- (concat "\\<\\(" smarty-constants "\\)\\>")
- 'font-lock-constant-face)
-
- (cons (concat "\\(" (regexp-quote (concat smarty-left-delimiter "*")) "\\(\\s-\\|\\w\\|\\s.\\|\\s_\\|\\s(\\|\\s)\\|\\s\\\\)*" (regexp-quote (concat "*" smarty-right-delimiter)) "\\)")
- 'font-lock-comment-face)
-
- )
- "Subdued level highlighting for Smarty mode.")
-
-(defconst smarty-font-lock-keywords-2
- (append
- smarty-font-lock-keywords-1
- (list
-
- ;; Fontify variable names (\\sw\\|\\s_\\) matches any word character +
- ;; underscore
- '("\\$\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face)) ; $variable
- '("->\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; ->variable
- '("\\.\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; .variable
- '("->\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" (1 font-lock-function-name-face t t)) ; ->function_call
- '("\\<\\(\\(?:\\sw\\|\\s_\\)+\\s-*\\)(" (1 font-lock-function-name-face)) ; word(
- '("\\<\\(\\(?:\\sw\\|\\s_\\)+\\s-*\\)[[]" (1 font-lock-variable-name-face)) ; word[
- '("\\<[0-9]+" . 'default) ; number (also matches word)
-
- ;; Fontify strings
- ;;'("\"\\([^\"]*\\)\"[^\"]+" (1 font-lock-string-face t t))
- ))
-
- "Medium level highlighting for Smarty mode.")
-
-(defconst smarty-font-lock-keywords-3
- (append
- smarty-font-lock-keywords-2
- (list
- ;; Fontify modifiers
- (cons (concat "|\\(" smarty-modifiers-regexp "\\)[:|]+") '(1 font-lock-function-name-face))
- (cons (concat "|\\(" smarty-modifiers-regexp "\\)" (regexp-quote smarty-right-delimiter)) '(1 font-lock-function-name-face))
-
- ;; Fontify config vars
- (cons (concat (regexp-quote smarty-left-delimiter) "\\(#\\(?:\\sw\\|\\s_\\)+#\\)") '(1 font-lock-constant-face))))
- "Balls-out highlighting for Smarty mode.")
-
-(defconst smarty-font-lock-keywords-4
- (append
- smarty-font-lock-keywords-3
- (list
- ;; Fontify plugin functions
- (cons
- (concat (regexp-quote smarty-left-delimiter) "[/]*" smarty-plugins-functions-regexp)
- '(1 font-lock-keyword-face))
-
- (cons (concat "|\\(" smarty-plugins-modifiers-regexp "\\)[:|]+") '(1 font-lock-function-name-face))
- (cons (concat "|\\(" smarty-plugins-modifiers-regexp "\\)" (regexp-quote smarty-right-delimiter)) '(1 font-lock-function-name-face)))))
-
-(defvar smarty-font-lock-keywords smarty-font-lock-keywords-3
- "Default highlighting level for Smarty mode")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Mode map
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar smarty-template-map nil
- "Keymap for Smarty templates.")
-
-(defun smarty-template-map-init ()
- "Initialize `smarty-template-map'."
- (setq smarty-template-map (make-sparse-keymap))
- ;; key bindings for Smarty templates
- (define-key smarty-template-map "\C-ba" 'smarty-template-capture)
- (define-key smarty-template-map "\C-bc" 'smarty-template-config-load)
- (define-key smarty-template-map "\C-b\M-e" 'smarty-template-else)
- (define-key smarty-template-map "\C-b\C-e" 'smarty-template-elseif)
- (define-key smarty-template-map "\C-b\C-f" 'smarty-template-foreach)
- (define-key smarty-template-map "\C-b\M-f" 'smarty-template-foreachelse)
- (define-key smarty-template-map "\C-bf" 'smarty-template-if)
- (define-key smarty-template-map "\C-b\C-i" 'smarty-template-include)
- (define-key smarty-template-map "\C-b\M-i" 'smarty-template-include-php)
- (define-key smarty-template-map "\C-bi" 'smarty-template-insert)
- (define-key smarty-template-map "\C-bl" 'smarty-template-ldelim)
- (define-key smarty-template-map "\C-b\C-l" 'smarty-template-literal)
- (define-key smarty-template-map "\C-bp" 'smarty-template-php)
- (define-key smarty-template-map "\C-br" 'smarty-template-rdelim)
- (define-key smarty-template-map "\C-b\C-s" 'smarty-template-section)
- (define-key smarty-template-map "\C-b\M-s" 'smarty-template-sectionelse)
- (define-key smarty-template-map "\C-bs" 'smarty-template-strip)
- (define-key smarty-template-map "\C-ca" 'smarty-template-assign)
- (define-key smarty-template-map "\C-co" 'smarty-template-counter)
- (define-key smarty-template-map "\C-cc" 'smarty-template-cycle)
- (define-key smarty-template-map "\C-cd" 'smarty-template-debug)
- (define-key smarty-template-map "\C-ce" 'smarty-template-eval)
- (define-key smarty-template-map "\C-cf" 'smarty-template-fetch)
- (define-key smarty-template-map "\C-c\C-hc" 'smarty-template-html-checkboxes)
- (define-key smarty-template-map "\C-c\C-hi" 'smarty-template-html-image)
- (define-key smarty-template-map "\C-c\C-ho" 'smarty-template-html-options)
- (define-key smarty-template-map "\C-c\C-hr" 'smarty-template-html-radios)
- (define-key smarty-template-map "\C-c\C-hd" 'smarty-template-html-select-date)
- (define-key smarty-template-map "\C-c\C-hm" 'smarty-template-html-select-time)
- (define-key smarty-template-map "\C-c\C-ht" 'smarty-template-html-table)
- (define-key smarty-template-map "\C-ci" 'smarty-template-mailto)
- (define-key smarty-template-map "\C-ch" 'smarty-template-math)
- (define-key smarty-template-map "\C-c\C-p" 'smarty-template-popup)
- (define-key smarty-template-map "\C-c\M-p" 'smarty-template-popup-init)
- (define-key smarty-template-map "\C-ct" 'smarty-template-textformat)
- (define-key smarty-template-map "\C-vp" 'smarty-template-capitalize)
- (define-key smarty-template-map "\C-vc" 'smarty-template-cat)
- (define-key smarty-template-map "\C-v\C-cc" 'smarty-template-count-characters)
- (define-key smarty-template-map "\C-v\C-cp" 'smarty-template-count-paragraphs)
- (define-key smarty-template-map "\C-v\C-cs" 'smarty-template-count-sentences)
- (define-key smarty-template-map "\C-v\C-cw" 'smarty-template-count-words)
- (define-key smarty-template-map "\C-vf" 'smarty-template-date-format)
- (define-key smarty-template-map "\C-vd" 'smarty-template-default)
- (define-key smarty-template-map "\C-ve" 'smarty-template-escape)
- (define-key smarty-template-map "\C-vi" 'smarty-template-indent)
- (define-key smarty-template-map "\C-vl" 'smarty-template-lower)
- (define-key smarty-template-map "\C-vn" 'smarty-template-nl2br)
- (define-key smarty-template-map "\C-vx" 'smarty-template-regex-replace)
- (define-key smarty-template-map "\C-v\C-p" 'smarty-template-replace)
- (define-key smarty-template-map "\C-vy" 'smarty-template-spacify)
- (define-key smarty-template-map "\C-vs" 'smarty-template-string-format)
- (define-key smarty-template-map "\C-v\C-s" 'smarty-template-vstrip)
- (define-key smarty-template-map "\C-v\M-s" 'smarty-template-strip-tags)
- (define-key smarty-template-map "\C-vt" 'smarty-template-truncate)
- (define-key smarty-template-map "\C-vu" 'smarty-template-upper)
- (define-key smarty-template-map "\C-vw" 'smarty-template-wordwrap)
- (define-key smarty-template-map "\C-h" 'smarty-template-header)
- (define-key smarty-template-map "\C-f" 'smarty-template-footer)
- (define-key smarty-template-map "\C-di" 'smarty-template-insert-date)
- (define-key smarty-template-map "\C-dm" 'smarty-template-modify))
-
-;; initialize template map for Smarty Mode
-(smarty-template-map-init)
-
-(defun smarty-mode-map-init ()
- "Initialize `smarty-mode-map'."
- (setq smarty-mode-map (make-sparse-keymap))
- ;; template key bindings
- (define-key smarty-mode-map "\C-c\C-t" smarty-template-map)
- ;; mode specific key bindings
- (define-key smarty-mode-map "\C-c\C-m\C-e" 'smarty-electric-mode)
- (define-key smarty-mode-map "\C-c\C-m\C-s" 'smarty-stutter-mode)
- (define-key smarty-mode-map "\C-c\C-s\C-u" 'smarty-add-source-files-menu)
- (define-key smarty-mode-map "\C-c\M-m" 'smarty-show-messages)
- (define-key smarty-mode-map "\C-c\C-h" 'smarty-doc-mode)
- (define-key smarty-mode-map "\C-c\C-v" 'smarty-version)
- ;; electric key bindings
- (when smarty-intelligent-tab
- (define-key smarty-mode-map "\t" 'smarty-electric-tab))
- (define-key smarty-mode-map " " 'smarty-electric-space)
- (define-key smarty-mode-map "(" 'smarty-electric-open-bracket)
- (define-key smarty-mode-map ")" 'smarty-electric-close-bracket)
- (define-key smarty-mode-map "*" 'smarty-electric-star))
-
-;; initialize mode map for Smarty Mode
-(smarty-mode-map-init)
-
-(defvar smarty-minibuffer-local-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map minibuffer-local-map)
- (when smarty-word-completion-in-minibuffer
- (define-key map "\t" 'smarty-minibuffer-tab))
- map)
- "Keymap for minibuffer used in Smarty Mode.")
-
-(mapcar
- (function
- (lambda (sym)
- (put sym 'delete-selection t) ; for `delete-selection-mode' (Emacs)
- (put sym 'pending-delete t))) ; for `pending-delete-mode' (XEmacs)
- '(smarty-electric-space
- smarty-electric-tab
- smarty-electric-open-bracket
- smarty-electric-close-bracket
- smarty-electric-star))
-
-;;;###autoload
-(defun smarty-mode ()
- "Smarty Mode
-***********
-
-Smarty Mode is a GNU XEmacs major mode for editing Smarty templates.
-
-1 Introduction
-**************
-
-Smarty-Mode is a mode allowing easy edit of Smarty templates:
-highlight, templates, navigation into source files...
-
-
-
-Features (new features in bold) :
-
- * Completion
-
- * Customizable
-
- * Highlight
-
- * Menu
-
- * Stuttering
-
- * Templates
- - Built-in Functions
-
- - User Functions
-
- - Variable Modifiers
-
- - Plugin (Functions)
- * BlockRepeatPlugin
-
- * ClipCache
-
- * Smarty Formtool
-
- * Smarty Paginate
-
- * Smarty Validate
-
- - Plugin (Variable Modifiers)
- * AlternativeDateModifierPlugin
-
- * B2Smilies
-
- * BBCodePlugin
-
- - Fonctions Non-Smarty
-
-
-
-This manual describes Smarty Mode version 0.0.5.
-
-2 Installation
-**************
-
-2.1 Requirements
-================
-
-Smarty Mode is a XEmacs major mode that needs the following
-software/packages:
-
- * XEmacs (http://www.xemacs.org/).
-
- * `font-lock' mode generaly installed with XEmacs.
-
- * `assoc' mode generaly installed with XEmacs.
-
- * `easymenu' mode generaly installed with XEmacs.
-
- * `hippie-exp' mode generaly installed with XEmacs.
-
-Before continuing, you must be sure to have all this packages
-installed.
-
-2.2 Download
-============
-
-Two internet address to download Smarty Mode :
-
- * Principal: Smarty-Mode 0.0.5
- (http://deboutv.free.fr/lisp/smarty/download/smarty-0.0.5.tar.gz)
- (http://deboutv.free.fr/lisp/smarty/)
-
- * Secondary: Smarty-Mode 0.0.5
- (http://www.morinie.fr/lisp/smarty/download/smarty-0.0.5.tar.gz)
- (http://www.morinie.fr/lisp/smarty/)
-
- * Old releases: Smarty-Mode
- (http://deboutv.free.fr/lisp/smarty/download.php)
- (http://deboutv.free.fr/lisp/smarty/)
-
-2.3 Installation
-================
-
-2.3.1 Installation
-------------------
-
-To install Smarty Mode you need to choose an installation directory
-\(for example `/usr/local/share/lisp' or `c:\lisp'). The administrator
-must have the write rights on this directory.
-
-With your favorite unzip software, unzip the archive in the
-installation directory.
-
-Example:
- cd /usr/local/share/lisp
- tar zxvf smarty-0.0.5.tar.gz
-Now you have a `smarty' directory in the installation directory. This
-directory contains 2 files `smarty-mode.el' and `smarty-mode.elc' and
-another directory `docs' containing the documentation.
-
-You need to configure XEmacs. open you initialization file `init.el'
-\(open the file or start XEmacs then choose the Options menu and Edit
-Init File). Add the following lines (the installation directory in
-this example is `/usr/local/share/lisp') :
-
- (setq load-path
- (append (list \"/usr/local/share/lisp/\") load-path))
- (autoload 'smarty-mode \"smarty-mode\" \"Smarty Mode\" t)
-
-2.3.2 Update
-------------
-
-The update is easy. You need to unzip the archive in the installation
-directory to remove the old release.
-
-Example:
- cd /usr/local/share/lisp
- rm -rf smarty
- tar zxvf smarty-0.0.5.tar.gz
-
-2.4 Invoke Smarty-Mode
-======================
-
-You have two possibilities to invoke the Smarty Mode.
-
- - Manually: At each file opening you need to launch Smarty Mode
- with the following command:
-
- `M-x smarty-mode'
-
- - Automatically: Add the following linesin your initialization
- file `init.el' :
-
- (setq auto-mode-alist
- (append
- '((\"\\.tpl$\" . smarty-mode))
- auto-mode-alist))
-
-
-3 Customization
-***************
-
-This chapter describes the differents parameters and functions that
-you can change to customize Smarty Mode. To do that, open a Smarty
-file, click on the Smarty menu and choose Options then Browse
-Options....
-
-3.1 Parameters
-==============
-
-3.1.1 Mode
-----------
-
-Smarty Mode has 2 modes allowing to simplify the writing of Smarty
-templates. You can enable/disable each mode individually.
-
-`smarty-electric-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable automatic generation of template.
- If `nil'; template generators can still be invoked through key
- bindings and menu. Is indicated in the modeline by \"/e\" after
- the mode name and can be toggled by `smarty-electric-mode'.
-
-`smarty-stutter-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable the stuttering. Is indicated in the
- modeline by \"/s\" after the mode name and can be toggled by
- `smarty-stutter-mode'.
-
-3.1.2 Menu
-----------
-
-Smarty Mode has also 1 menu that you can enable/disable. The menu
-Sources is specific to each Smarty files opened.
-
-`smarty-source-file-menu'
- Type: boolean
- Default value: `t'
- Description: If `t'; the Sources menu is enabled. This menu
- contains the list of Smarty file located in the current
- directory. The Sources menu scans the directory when a file is
- opened.
-
-3.1.3 Menu
-----------
-
-`smarty-highlight-plugin-functions'
- Type: boolean
- Default value: `t'
- Description: If `t'; the functions described in the smarty
- plugins are highlighted.
-
-3.1.4 Templates
----------------
-
-3.1.4.1 Header
-..............
-
-`smarty-file-header'
- Type: string
- Default value: `\"\"'
- Description: String or file to insert as file header. If the
- string specifies an existing file name the contents of the file
- is inserted; otherwise the string itself is inserted as file
- header.
- Type `C-j' for newlines.
- The follonwing keywords are supported:
- <filename>: replaced by the file name.
- <author>: replaced by the user name and email address.
- <login>: replaced by `user-login-name'.
- <company>: replaced by `smarty-company-name' content.
- <date>: replaced by the current date.
- <year>: replaced by the current year.
- <copyright>: replaced by `smarty-copyright-string' content.
- <cursor>: final cursor position.
-
-`smarty-file-footer'
- Type: string
- Default value: `\"\"'
- Description: String or file to insert as file footer. See
- `smarty-file-header'
-
-`smarty-company-name'
- Type: string
- Default value: `\"\"'
- Description: Name of the company to insert in file header.
-
-`smarty-copyright-string'
- Type: string
- Default value: `\"\"'
- Description: Coryright string to insert in file header.
-
-`smarty-date-format'
- Type: string
- Default value: `\"%Y-%m-%d\"'
- Description: Date format.
-
-`smarty-modify-date-prefix-string'
- Type: string
- Default value: `\"\"'
- Description: Prefix string of modification date in Smarty file
- header.
-
-`smarty-modify-date-on-saving'
- Type: bool
- Default value: `nil'
- Description: If `t'; update the modification date when the
- buffer is saved.
-
-3.1.5 Miscellaneous
--------------------
-
-`smarty-left-delimiter'
- Type: string
- Default value: `\"\"'
- Description: Left escaping delimiter for Smarty templates.
-
-`smarty-right-delimiter'
- Type: string
- Default value: `\"\"'
- Description: Right escaping delimiter for Smarty templates.
-
-`smarty-intelligent-tab'
- Type: bool
- Default value: `t'
- Description: If `t'; TAB does indentation; completion and insert
- tabulations. If `nil'; TAB does only indentation.
-
-`smarty-word-completion-in-minibuffer'
- Type: bool
- Default value: `t'
- Description: If `t'; enable completion in the minibuffer.
-
-`smarty-word-completion-case-sensitive'
- Type: bool
- Default value: `nil'
- Description: If `t'; completion is case sensitive.
-
-3.2 Functions
-=============
-
-3.2.1 Mode
-----------
-
-`smarty-electric-mode'
- Menu: Smarty -> Options -> Mode -> Electric Mode
- Keybinding: `C-c C-m C-e'
- Description: This functions is used to enable/disable the
- electric mode.
-
-`smarty-stutter-mode'
- Menu: Smarty -> Options -> Mode -> Stutter Mode
- Keybinding: `C-c C-m C-s'
- Description: This function is used to enable/disable the stutter
- mode.
-
-4 Menus
-*******
-
-There are 2 menus: Smarty and Sources. All theses menus can be
-accessed from the menubar or from the right click. This chapter
-describes each menus.
-
-4.1 Smarty
-==========
-
-This is the main menu of Smarty Mode. It allows an easy access to the
-main features of the Smarty Mode: Templates (see *Note Templates::)
-and Options (see *Note Customization::).
-
-This menu contains also 3 functions that are discussed in the next
-part.
-
-4.1.1 Functions
----------------
-
-`smarty-show-messages'
- Menu: Smarty -> Show Messages
- Keybinding: `C-c M-m'
- Description: This function opens the *Messages* buffer to
- display previous error messages.
-
-`smarty-doc-mode'
- Menu: Smarty -> Smarty Mode Documentation
- Keybinding: `C-c C-h'
- Description: This function opens the *Help* buffer and prints in
- it the Smarty Mode documentation.
-
-`smarty-version'
- Menu: Smarty -> Version
- Keybinding: `C-c C-v'
- Description: This function displays in the minibuffer the
- current Smarty Mode version with the timestamp.
-
-4.2 Sources
-===========
-
-The Sources menu shows the Smarty files in the current directory. If
-you add or delete a file in the current directory, you need to
-refresh the menu.
-
-4.2.1 Customization
--------------------
-
-`smarty-source-file-menu'
- Type: boolean
- Default value: `t'
- Description: If `t'; the Sources menu is enabled. This menu
- contains the list of Smarty file located in the current
- directory. The Sources menu scans the directory when a file is
- opened.
-
-4.2.2 Functions
----------------
-
-`smarty-add-source-files-menu'
- Menu: Sources -> *Rescan*
- Keybinding: `C-c C-s C-u'
- Description: This function is used to refresh the Sources menu.
-
-5 Stuttering
-************
-
-The stutter mode is a mode that affects a function to a key. For
-example, when you use the `ENTER' key, the associated function will
-create a new line and indent it.
-
-5.1 Customization
-=================
-
-`smarty-stutter-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable the stuttering. Is indicated in the
- modeline by \"/s\" after the mode name and can be toggled by
- `smarty-stutter-mode'.
-
-5.2 Functions
-=============
-
-`SPACE'
- If in comment, indent the comment and add new line if necessary.
- In other case, add a space.
-
-`('
- If the previous character is a `(', the `((' will be replaced by
- `['.
- If the previous character is a `[', the `[(' will be replaced by
- `{'.
- In other case, insert a `('.
-
-`)'
- If the previous character is a `)', the `))' will be replaced by
- `]'.
- If the previous character is a `]', the `])' will be replaced by
- `}'.
- In other case, insert a `)'.
-
-6 Templates
-***********
-
-In the Smarty Mode, the Smarty functions (like if, while, for, fopen,
-fclose) are predefined in functions called \"Templates\".
-
-Each template can be invoked by the function name or by using the
-<SPACE> key after the Smarty function name in the buffer (Note, using
-`M-<SPACE>' disable the template).
-
-A template can be aborted by using the `C-g' or by lefting empty the
-tempate prompt (in the minibuffer).
-
-6.1 Customization
-=================
-
-`smarty-electric-mode'
- Type: boolean
- Default value: `t'
- Description: If `t'; enable automatic generation of template.
- If `nil'; template generators can still be invoked through key
- bindings and menu. Is indicated in the modeline by \"/e\" after
- the mode name and can be toggled by `smarty-electric-mode'.
-
-For a complete description of the template customizable variables,
-see *Note Cu01-Pa01-Template::
-
-6.2 Functions
-=============
-
-6.2.1 Smarty Functions
-----------------------
-
-For Smarty functions, see PDF or HTML documentation.
-
-6.2.2 Non-Smarty Functions
---------------------------
-
-`smarty-template-header'
- Menu: Smarty -> Templates -> Insert Header
- Keybinding: `C-c C-t C-h'
- Description: This function is used to insert a header in the
- current buffer.
-
-`smarty-template-footer'
- Menu: Smarty -> Templates -> Insert Footer
- Keybinding: `C-c C-t C-f'
- Description: This function is used to insert a footer in the
- current buffer.
-
-`smarty-template-insert-date'
- Menu: Smarty -> Templates -> Insert Date
- Keybinding: `C-c C-t C-d i'
- Description: This function is used to insert the date in the
- current buffer.
-
-`smarty-template-modify'
- Menu: Smarty -> Templates -> Modify Date
- Keybinding: `C-c C-t C-d m'
- Description: This function is used to modify the last
- modification date in the current buffer.
-
-7 Bugs, Help
-************
-
- * To report bugs: Bugtracker
- (http://bugtracker.morinie.fr/lisp/set_project.php?project_id=2)
-
- * To obtain help you can post on the dedicated forum: Forum
- (http://forum.morinie.fr/lisp/)
-
-8 Key bindings
-**************
-
-\\{smarty-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'smarty-mode)
- (setq mode-name "Smarty")
-
- (smarty-create-syntax-table)
-
- ;; set maps and tables
- (use-local-map smarty-mode-map)
- (set-syntax-table smarty-mode-syntax-table)
- (setq local-abbrev-table smarty-mode-abbrev-table)
-
- (set (make-local-variable 'comment-start) (concat smarty-left-delimiter "*"))
- (set (make-local-variable 'comment-end) (concat "*" smarty-right-delimiter))
- (set (make-local-variable 'comment-multi-line) t)
- (set (make-local-variable 'smarty-end-comment-column) 80)
-
- (make-local-variable 'font-lock-defaults)
- (if smarty-highlight-plugin-functions
- (setq smarty-font-lock-keywords smarty-font-lock-keywords-4)
- (setq smarty-font-lock-keywords smarty-font-lock-keywords-3))
- (setq font-lock-defaults
- '((smarty-font-lock-keywords)
- nil ; Keywords only (i.e. no comment or string highlighting
- t ; case fold
- nil ; syntax-alist
- nil ; syntax-begin
- ))
-
- (setq font-lock-maximum-decoration t
- case-fold-search t)
-
- ;; add source file menu
- (if smarty-source-file-menu (smarty-add-source-files-menu))
- ;; add Smarty menu
- (easy-menu-add smarty-mode-menu-list)
- (easy-menu-define smarty-mode-menu smarty-mode-map
- "Menu keymap for Smarty Mode." smarty-mode-menu-list)
-
- ;; (message "Smarty Mode %s.%s" smarty-version
- ;; (if noninteractive "" " See menu for documentation and release notes."))
- (smarty-mode-line-update)
- (run-hooks 'smarty-mode-hook))
-
-(defun smarty-doc-mode ()
- "Display Smarty Mode documentation in *Help* buffer."
- (interactive)
- (with-output-to-temp-buffer
- (if (fboundp 'help-buffer) (help-buffer) "*Help*")
- (princ mode-name)
- (princ " mode:\n")
- (princ (documentation 'smarty-mode))
- (with-current-buffer standard-output
- (help-mode))
- (print-help-return-message)))
-
-(defun smarty-activate-customizations ()
- "Activate all customizations on local variables."
- (interactive)
- (smarty-mode-map-init)
- (use-local-map smarty-mode-map)
- (set-syntax-table smarty-mode-syntax-table)
- (smarty-update-mode-menu)
- (run-hooks 'menu-bar-update-hook)
- (smarty-mode-line-update))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Templates
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun smarty-template-field (prompt &optional follow-string optional
- begin end is-string string-char default)
- "Prompt for string and insert it in buffer with optional FOLLOW-STRING.
-If OPTIONAL is nil, the prompt is left if an empty string is inserted. If
-an empty string is inserted, return nil and call `smarty-template-undo' for
-the region between BEGIN and END. IS-STRING indicates whether a string
-with double-quotes is to be inserted. DEFAULT specifies a default string."
- (let ((position (point))
- string)
- (insert "<" prompt ">")
- (if (not (> (length string-char) 0))
- (setq string-char "\""))
- (setq string
- (condition-case ()
- (read-from-minibuffer (concat prompt ": ")
- (or (and is-string (cons (concat string-char string-char) 1)) default)
- smarty-minibuffer-local-map)
- (quit (if (and optional begin end)
- (progn (beep) "")
- (keyboard-quit)))))
- (when (or (not (equal string "")) optional)
- (delete-region position (point)))
- (when (and (equal string "") optional begin end)
- (smarty-template-undo begin end)
- (message "Template aborted"))
- (unless (equal string "")
- (insert string))
- (when (or (not (equal string "")) (not optional))
- (insert (or follow-string "")))
- (if (equal string "") nil string)))
-
-(defun smarty-template-undo (begin end)
- "Undo aborted template by deleting region and unexpanding the keyword."
- (cond (smarty-template-invoked-by-hook
- (goto-char end)
- (insert " ")
- (delete-region begin end)
- (unexpand-abbrev))
- (t (delete-region begin end))))
-
-(defun smarty-template-generic-function (label close-label field mandatory-count &optional infinite special-field force-var)
- "Generic function template 'label field1= field2=..."
- (interactive)
- (let ((start (point)) found here result-value elt continue field-count stop prompt)
- (if smarty-template-invoked-by-hook
- (setq found (smarty-after-ldelim))
- (insert smarty-left-delimiter)
- (setq found t))
- (insert label)
- (setq here (point-marker))
- (insert " ")
- (when found
- (setq elt field)
- (setq continue t)
- (setq field-count 0)
- (setq stop nil)
- (while (and elt continue)
- (setq prompt (car elt))
- (when (not special-field)
- (insert prompt "="))
- (setq result-value (smarty-template-field prompt nil t))
- (if (and (not result-value)
- (< field-count mandatory-count))
- (progn (setq continue nil)
- (delete-region start (point))
- (insert (concat label " "))
- (setq stop t))
- (if (not result-value)
- (setq continue nil)
- (setq here (point-marker))
- (insert " ")))
- (setq field-count (+ 1 field-count))
- (setq elt (cdr elt)))
- (when (and infinite (or continue force-var))
- (when (not continue)
- (delete-region here (point))
- (insert " "))
- (setq continue t)
- (while continue
- (setq result-value (smarty-template-field "var_name" "=" t here))
- (if (not result-value)
- (setq continue nil)
- (setq continue (smarty-template-field "var_value" nil t here))
- (setq here (point-marker))
- (insert " "))))
- (when (not stop)
- (delete-region here (point))
- (if (> 0 mandatory-count)
- (delete-char -1))
- (insert smarty-right-delimiter)
- (setq here (point-marker))
- (if close-label
- (insert smarty-left-delimiter "/" label smarty-right-delimiter))
- (goto-char here)))))
-
-(defun smarty-template-generic-modifier (label field mandatory-count)
- "Generic modifier template '|label:field1:field2..."
- (interactive)
- (let ((start (point)) found here result-value elt continue field-count stop prompt)
- (setq found (re-search-backward (concat (regexp-quote smarty-left-delimiter) "\\$\\(\\sw\\|\\s.\\)+" (regexp-quote "|")) nil t))
- (if found
- (progn
- (setq found (re-search-forward (regexp-quote smarty-right-delimiter) start t))
- (if (not found)
- (progn
- (goto-char start)
- (insert label)
- (setq here (point-marker))
- (setq elt field)
- (setq continue t)
- (setq field-count 0)
- (setq stop nil)
- (while (and elt continue)
- (setq prompt (car elt))
- (insert ":")
- (setq result-value (smarty-template-field prompt nil t))
- (if (and (not result-value)
- (< field-count mandatory-count))
- (progn (setq continue nil)
- (delete-region start (point))
- (insert (concat label " "))
- (setq stop t))
- (if (not result-value)
- (setq continue nil)
- (setq here (point-marker))
- (insert ":")))
- (setq field-count (+ 1 field-count))
- (setq elt (cdr elt)))
- (when (not stop)
- (delete-region here (point))
- (if (not (or (looking-at smarty-right-delimiter)
- (looking-at "|")))
- (insert smarty-right-delimiter))))
- (goto-char start)
- (insert label " ")))
- (goto-char start)
- (insert label " "))))
-
-(defun smarty-template-capture-hook ()
- (smarty-hooked-abbrev 'smarty-template-capture))
-(defun smarty-template-config-load-hook ()
- (smarty-hooked-abbrev 'smarty-template-config-load))
-(defun smarty-template-else-hook ()
- (smarty-hooked-abbrev 'smarty-template-else))
-(defun smarty-template-elseif-hook ()
- (smarty-hooked-abbrev 'smarty-template-elseif))
-(defun smarty-template-foreach-hook ()
- (smarty-hooked-abbrev 'smarty-template-foreach))
-(defun smarty-template-foreachelse-hook ()
- (smarty-hooked-abbrev 'smarty-template-foreachelse))
-(defun smarty-template-if-hook ()
- (smarty-hooked-abbrev 'smarty-template-if))
-(defun smarty-template-include-hook ()
- (smarty-hooked-abbrev 'smarty-template-include))
-(defun smarty-template-include-php-hook ()
- (smarty-hooked-abbrev 'smarty-template-include-php))
-(defun smarty-template-insert-hook ()
- (smarty-hooked-abbrev 'smarty-template-insert))
-(defun smarty-template-ldelim-hook ()
- (smarty-hooked-abbrev 'smarty-template-ldelim))
-(defun smarty-template-literal-hook ()
- (smarty-hooked-abbrev 'smarty-template-literal))
-(defun smarty-template-php-hook ()
- (smarty-hooked-abbrev 'smarty-template-php))
-(defun smarty-template-rdelim-hook ()
- (smarty-hooked-abbrev 'smarty-template-rdelim))
-(defun smarty-template-section-hook ()
- (smarty-hooked-abbrev 'smarty-template-section))
-(defun smarty-template-sectionelse-hook ()
- (smarty-hooked-abbrev 'smarty-template-sectionelse))
-(defun smarty-template-strip-hook ()
- (smarty-hooked-abbrev 'smarty-template-strip))
-
-(defun smarty-template-assign-hook ()
- (smarty-hooked-abbrev 'smarty-template-assign))
-(defun smarty-template-counter-hook ()
- (smarty-hooked-abbrev 'smarty-template-counter))
-(defun smarty-template-cycle-hook ()
- (smarty-hooked-abbrev 'smarty-template-cycle))
-(defun smarty-template-debug-hook ()
- (smarty-hooked-abbrev 'smarty-template-debug))
-(defun smarty-template-eval-hook ()
- (smarty-hooked-abbrev 'smarty-template-eval))
-(defun smarty-template-fetch-hook ()
- (smarty-hooked-abbrev 'smarty-template-fetch))
-(defun smarty-template-html-checkboxes-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-checkboxes))
-(defun smarty-template-html-image-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-image))
-(defun smarty-template-html-options-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-options))
-(defun smarty-template-html-radios-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-radios))
-(defun smarty-template-html-select-date-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-select-date))
-(defun smarty-template-html-select-time-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-select-time))
-(defun smarty-template-html-table-hook ()
- (smarty-hooked-abbrev 'smarty-template-html-table))
-(defun smarty-template-mailto-hook ()
- (smarty-hooked-abbrev 'smarty-template-mailto))
-(defun smarty-template-math-hook ()
- (smarty-hooked-abbrev 'smarty-template-math))
-(defun smarty-template-popup-hook ()
- (smarty-hooked-abbrev 'smarty-template-popup))
-(defun smarty-template-popup-init-hook ()
- (smarty-hooked-abbrev 'smarty-template-popup-init))
-(defun smarty-template-textformat-hook ()
- (smarty-hooked-abbrev 'smarty-template-textformat))
-
-(defun smarty-template-capitalize-hook ()
- (smarty-hooked-abbrev 'smarty-template-capitalize))
-(defun smarty-template-cat-hook ()
- (smarty-hooked-abbrev 'smarty-template-cat))
-(defun smarty-template-count-characters-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-characters))
-(defun smarty-template-count-paragraphs-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-paragraphs))
-(defun smarty-template-count-sentences-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-sentences))
-(defun smarty-template-count-words-hook ()
- (smarty-hooked-abbrev 'smarty-template-count-words))
-(defun smarty-template-date-format-hook ()
- (smarty-hooked-abbrev 'smarty-template-date-format))
-(defun smarty-template-default-hook ()
- (smarty-hooked-abbrev 'smarty-template-default))
-(defun smarty-template-escape-hook ()
- (smarty-hooked-abbrev 'smarty-template-escape))
-(defun smarty-template-indent-hook ()
- (smarty-hooked-abbrev 'smarty-template-indent))
-(defun smarty-template-lower-hook ()
- (smarty-hooked-abbrev 'smarty-template-lower))
-(defun smarty-template-nl2br-hook ()
- (smarty-hooked-abbrev 'smarty-template-nl2br))
-(defun smarty-template-regex-replace-hook ()
- (smarty-hooked-abbrev 'smarty-template-regex-replace))
-(defun smarty-template-replace-hook ()
- (smarty-hooked-abbrev 'smarty-template-replace))
-(defun smarty-template-spacify-hook ()
- (smarty-hooked-abbrev 'smarty-template-spacify))
-(defun smarty-template-string-format-hook ()
- (smarty-hooked-abbrev 'smarty-template-string-format))
-(defun smarty-template-vstrip-hook ()
- (smarty-hooked-abbrev 'smarty-template-vstrip))
-(defun smarty-template-strip-tags-hook ()
- (smarty-hooked-abbrev 'smarty-template-strip-tags))
-(defun smarty-template-truncate-hook ()
- (smarty-hooked-abbrev 'smarty-template-truncate))
-(defun smarty-template-upper-hook ()
- (smarty-hooked-abbrev 'smarty-template-upper))
-(defun smarty-template-wordwrap-hook ()
- (smarty-hooked-abbrev 'smarty-template-wordwrap))
-
-(defun smarty-template-validate-hook ()
- (smarty-hooked-abbrev 'smarty-template-validate))
-(defun smarty-template-clipcache-hook ()
- (smarty-hooked-abbrev 'smarty-template-clipcache))
-(defun smarty-template-include-clipcache-hook ()
- (smarty-hooked-abbrev 'smarty-template-include-clipcache))
-(defun smarty-template-formtool-checkall-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-checkall))
-(defun smarty-template-formtool-copy-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-copy))
-(defun smarty-template-formtool-count-chars-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-count-chars))
-(defun smarty-template-formtool-init-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-init))
-(defun smarty-template-formtool-move-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-move))
-(defun smarty-template-formtool-moveall-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-moveall))
-(defun smarty-template-formtool-movedown-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-movedown))
-(defun smarty-template-formtool-moveup-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-moveup))
-(defun smarty-template-formtool-remove-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-remove))
-(defun smarty-template-formtool-rename-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-rename))
-(defun smarty-template-formtool-save-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-save))
-(defun smarty-template-formtool-selectall-hook ()
- (smarty-hooked-abbrev 'smarty-template-formtool-selectall))
-(defun smarty-template-paginate-first-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-first))
-(defun smarty-template-paginate-last-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-last))
-(defun smarty-template-paginate-middle-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-middle))
-(defun smarty-template-paginate-next-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-next))
-(defun smarty-template-paginate-prev-hook ()
- (smarty-hooked-abbrev 'smarty-template-paginate-prev))
-
-(defun smarty-template-btosmilies-hook ()
- (smarty-hooked-abbrev 'smarty-template-btosmilies))
-(defun smarty-template-bbcodetohtml-hook ()
- (smarty-hooked-abbrev 'smarty-template-bbcodetohtml))
-(defun smarty-template-date-formatto-hook ()
- (smarty-hooked-abbrev 'smarty-template-date-formatto))
-
-(defun smarty-template-capture ()
- "Insert a capture statement."
- (interactive)
- (smarty-template-generic-function "capture" t '("name" "assign") 0))
-
-(defun smarty-template-config-load ()
- "Insert a config_load statement."
- (interactive)
- (smarty-template-generic-function "config_load" nil '("file" "section" "scope" "global") 1))
-
-(defun smarty-template-else ()
- "Insert a else statement."
- (interactive)
- (smarty-template-generic-function "else" nil '() 0))
-
-(defun smarty-template-elseif ()
- "Insert a elseif statement."
- (interactive)
- (smarty-template-generic-function "elseif" nil '("condition") 1 nil t))
-
-(defun smarty-template-foreach ()
- "Insert a foreach statement."
- (interactive)
- (smarty-template-generic-function "foreach" t '("from" "item" "key" "name") 2))
-
-(defun smarty-template-foreachelse ()
- "Insert a foreachelse statement."
- (interactive)
- (smarty-template-generic-function "foreachelse" nil '() 0))
-
-(defun smarty-template-if ()
- "Insert a if statement."
- (interactive)
- (smarty-template-generic-function "if" t '("condition") 1 nil t))
-
-(defun smarty-template-include ()
- "Insert a include statement."
- (interactive)
- (smarty-template-generic-function "include" nil '("file" "assign") 1 t))
-
-(defun smarty-template-include-php ()
- "Insert a include_php statement."
- (interactive)
- (smarty-template-generic-function "include_php" nil '("file" "once" "assign") 1))
-
-(defun smarty-template-insert ()
- "Insert a insert statement."
- (interactive)
- (smarty-template-generic-function "insert" nil '("name" "assign" "script") 1 t))
-
-(defun smarty-template-ldelim ()
- "Insert a ldelim statement."
- (interactive)
- (smarty-template-generic-function "ldelim" nil '() 0))
-
-(defun smarty-template-literal ()
- "Insert a literal statement."
- (interactive)
- (smarty-template-generic-function "literal" t '() 0))
-
-(defun smarty-template-php ()
- "Insert a php statement."
- (interactive)
- (smarty-template-generic-function "php" t '() 0))
-
-(defun smarty-template-rdelim ()
- "Insert a rdelim statement."
- (interactive)
- (smarty-template-generic-function "rdelim" nil '() 0))
-
-(defun smarty-template-section ()
- "Insert a section statement."
- (interactive)
- (smarty-template-generic-function "section" t '("name" "loop" "start" "step" "max" "show") 2))
-
-(defun smarty-template-sectionelse ()
- "Insert a sectionelse statement."
- (interactive)
- (smarty-template-generic-function "sectionelse" nil '() 0))
-
-(defun smarty-template-strip ()
- "Insert a strip statement."
- (interactive)
- (smarty-template-generic-function "strip" t '() 0))
-
-
-(defun smarty-template-assign ()
- "Insert a assign statement."
- (interactive)
- (smarty-template-generic-function "assign" nil '("var" "value") 2))
-
-(defun smarty-template-counter ()
- "Insert a counter statement."
- (interactive)
- (smarty-template-generic-function "counter" nil '("name" "start" "skip" "direction" "print" "assign") 0))
-
-(defun smarty-template-cycle ()
- "Insert a cycle statement."
- (interactive)
- (smarty-template-generic-function "cycle" nil '("values" "name" "print" "advance" "delimiter" "assign" "reset") 1))
-
-(defun smarty-template-debug ()
- "Insert a debug statement."
- (interactive)
- (smarty-template-generic-function "debug" nil '("output") 0))
-
-(defun smarty-template-eval ()
- "Insert a eval statement."
- (interactive)
- (smarty-template-generic-function "eval" nil '("var" "assign") 1))
-
-(defun smarty-template-fetch ()
- "Insert a fetch statement."
- (interactive)
- (smarty-template-generic-function "fetch" nil '("file" "assign") 1))
-
-(defun smarty-template-html-checkboxes ()
- "Insert a html_checkboxes statement."
- (interactive)
- (smarty-template-generic-function "html_checkboxes" nil '("name" "values" "output" "selected" "options" "separator" "assign" "labels") 0))
-
-(defun smarty-template-html-image ()
- "Insert a html_image statement."
- (interactive)
- (smarty-template-generic-function "html_image" nil '("file" "height" "width" "basedir" "alt" "href" "path_prefix") 1))
-
-(defun smarty-template-html-options ()
- "Insert a html_options statement."
- (interactive)
- (smarty-template-generic-function "html_options" nil '("name" "values" "output" "selected" "options") 0))
-
-(defun smarty-template-html-radios ()
- "Insert a html_radios statement."
- (interactive)
- (smarty-template-generic-function "html_radios" nil '("name" "values" "output" "selected" "options" "separator" "assign") 0))
-
-(defun smarty-template-html-select-date ()
- "Insert a html_select_date statement."
- (interactive)
- (smarty-template-generic-function "html_select_date" nil '("prefix" "time" "start_year" "end_year" "display_days" "display_months" "display_years" "month_format" "day_format" "day_value_format" "year_as_text" "reverse_years" "field_array" "day_size" "month_size" "year_size" "all_extra" "day_extra" "month_extra" "year_extra" "field_order" "field_separator" "month_value_format" "year_empty" "month_empty" "day_empty") 0))
-
-(defun smarty-template-html-select-time ()
- "Insert a html_select_time statement."
- (interactive)
- (smarty-template-generic-function "html_select_time" nil '("prefix" "time" "display_hours" "display_minutes" "display_seconds" "display_meridian" "use_24_hours" "minute_interval" "second_interval" "field_array" "all_extra" "hour_extra" "minute_extra" "second_extra" "meridian_extra") 0))
-
-(defun smarty-template-html-table ()
- "Insert a html_table statement."
- (interactive)
- (smarty-template-generic-function "html_table" nil '("loop" "cols" "rows" "inner" "caption" "table_attr" "th_attr" "tr_attr" "td_attr" "trailpad" "hdir" "vdir") 1))
-
-(defun smarty-template-mailto ()
- "Insert a mailto statement."
- (interactive)
- (smarty-template-generic-function "mailto" nil '("address" "text" "encode" "cc" "bcc" "subject" "newsgroups" "followupto" "extra") 1))
-
-(defun smarty-template-math ()
- "Insert a math statement."
- (interactive)
- (smarty-template-generic-function "math" nil '("equation" "format" "assign") 1 t nil t))
-
-(defun smarty-template-popup ()
- "Insert a popup statement."
- (interactive)
- (smarty-template-generic-function "popup" nil '("text" "trigger" "sticky" "caption" "fgcolor" "bgcolor" "textcolor" "capcolor" "closecolor" "textfont" "captionfont" "closefont" "textsize" "captionsize" "closesize" "width" "height" "left" "right" "center" "above" "below" "border" "offsetx" "offsety" "fgbackground" "bgbackground" "closetext" "noclose" "status" "autostatus" "autostatuscap" "inarray" "caparray" "capicon" "snapx" "snapy" "fixx" "fixy" "background" "padx" "pady" "fullhtml" "frame" "function" "delay" "hauto" "vauto") 1))
-
-(defun smarty-template-popup-init ()
- "Insert a popup_init statement."
- (interactive)
- (smarty-template-generic-function "popup_init" nil '("src") 1))
-
-(defun smarty-template-textformat ()
- "Insert a textformat statement."
- (interactive)
- (smarty-template-generic-function "textformat" t '("style" "indent" "indent_first" "indent_char" "wrap" "wrap_char" "wrap_cut" "assign") 0))
-
-(defun smarty-template-capitalize ()
- "Insert a capitalize statement."
- (interactive)
- (smarty-template-generic-modifier "capitalize" '("upcase_numeric") 0))
-
-(defun smarty-template-cat ()
- "Insert a cat statement."
- (interactive)
- (smarty-template-generic-modifier "cat" '("value") 0))
-
-(defun smarty-template-count-characters ()
- "Insert a count_characters statement."
- (interactive)
- (smarty-template-generic-modifier "count_characters" '("include_whitespace") 0))
-
-(defun smarty-template-count-paragraphs ()
- "Insert a count_paragraphs statement."
- (interactive)
- (smarty-template-generic-modifier "count_paragraphs" '() 0))
-
-(defun smarty-template-count-sentences ()
- "Insert a count_sentences statement."
- (interactive)
- (smarty-template-generic-modifier "count_sentences" '() 0))
-
-(defun smarty-template-count-words ()
- "Insert a count_words statement."
- (interactive)
- (smarty-template-generic-modifier "count_words" '() 0))
-
-(defun smarty-template-date-format ()
- "Insert a date_format statement."
- (interactive)
- (smarty-template-generic-modifier "date_format" '("format" "default") 0))
-
-(defun smarty-template-default ()
- "Insert a default statement."
- (interactive)
- (smarty-template-generic-modifier "default" '("value") 0))
-
-(defun smarty-template-escape ()
- "Insert a escape statement."
- (interactive)
- (smarty-template-generic-modifier "escape" '("html|htmlall|url|urlpathinfo|quotes|hex|hexentity|javascript|mail" "charset") 0))
-
-(defun smarty-template-indent ()
- "Insert a indent statement."
- (interactive)
- (smarty-template-generic-modifier "indent" '("value" "character") 0))
-
-(defun smarty-template-lower ()
- "Insert a lower statement."
- (interactive)
- (smarty-template-generic-modifier "lower" '() 0))
-
-(defun smarty-template-nl2br ()
- "Insert a nl2br statement."
- (interactive)
- (smarty-template-generic-modifier "nl2br" '() 0))
-
-(defun smarty-template-regex-replace ()
- "Insert a regex_replace statement."
- (interactive)
- (smarty-template-generic-modifier "regex_replace" '("regexp" "string_to_replace") 2))
-
-(defun smarty-template-replace ()
- "Insert a replace statement."
- (interactive)
- (smarty-template-generic-modifier "replace" '("string" "string_to_replace_with") 2))
-
-(defun smarty-template-spacify ()
- "Insert a spacify statement."
- (interactive)
- (smarty-template-generic-modifier "spacify" '("character") 0))
-
-(defun smarty-template-string-format ()
- "Insert a string_format statement."
- (interactive)
- (smarty-template-generic-modifier "string_format" '("format") 1))
-
-(defun smarty-template-vstrip ()
- "Insert a strip statement."
- (interactive)
- (smarty-template-generic-modifier "strip" '() 0))
-
-(defun smarty-template-strip-tags ()
- "Insert a strip_tags statement."
- (interactive)
- (smarty-template-generic-modifier "strip_tags" '("replace_by_space") 0))
-
-(defun smarty-template-truncate ()
- "Insert a truncate statement."
- (interactive)
- (smarty-template-generic-modifier "truncate" '("count" "text_to_replace" "character_boundary" "middle_string") 0))
-
-(defun smarty-template-upper ()
- "Insert a upper statement."
- (interactive)
- (smarty-template-generic-modifier "upper" '() 0))
-
-(defun smarty-template-wordwrap ()
- "Insert a wordwrap statement."
- (interactive)
- (smarty-template-generic-modifier "wordwrap" '("count" "string" "character_boundary") 0))
-
-
-(defun smarty-template-validate ()
- "Insert a validate statement."
- (interactive)
- (smarty-template-generic-function "validate" nil '("field" "criteria" "message" "form" "transform" "trim" "empty" "halt" "assign" "append" "page") 3))
-
-(defun smarty-template-repeat ()
- "Insert a repeat statement."
- (interactive)
- (smarty-template-generic-function "repeat" nil '("count" "assign") 1))
-
-(defun smarty-template-str_repeat ()
- "Insert a str_repeat statement."
- (interactive)
- (smarty-template-generic-function "str_repeat" nil '("string" "count" "assign") 2))
-
-(defun smarty-template-clipcache ()
- "Insert a clipcache statement."
- (interactive)
- (smarty-template-generic-function "clipcache" nil '("id" "group" "ttl" "ldelim" "rdelim") 3))
-
-(defun smarty-template-include-clipcache ()
- "Insert a include_clipcache statement."
- (interactive)
- (smarty-template-generic-function "include_clipcache" nil '("file" "cache_id" "cache_lifetime" "ldelim" "rdelim") 3))
-
-(defun smarty-template-formtool-checkall ()
- "Insert a formtool_checkall statement."
- (interactive)
- (smarty-template-generic-function "formtool_checkall" nil '("name" "class" "style") 1))
-
-(defun smarty-template-formtool-copy ()
- "Insert a formtool_copy statement."
- (interactive)
- (smarty-template-generic-function "formtool_copy" nil '("from" "to" "save" "button_text" "all" "counter" "class" "style") 3))
-
-(defun smarty-template-formtool-count-chars ()
- "Insert a formtool_count_chars statement."
- (interactive)
- (smarty-template-generic-function "formtool_count_chars" nil '("name" "limit" "alert") 3))
-
-(defun smarty-template-formtool-init ()
- "Insert a formtool_init statement."
- (interactive)
- (smarty-template-generic-function "formtool_init" nil '("src") 1))
-
-(defun smarty-template-formtool-move ()
- "Insert a formtool_move statement."
- (interactive)
- (smarty-template-generic-function "formtool_move" nil '("from" "to" "save_from" "save_to" "all" "count_to" "count_from" "class" "style") 4))
-
-(defun smarty-template-formtool-moveall ()
- "Insert a formtool_moveall statement."
- (interactive)
- (smarty-template-generic-function "formtool_moveall" nil '("from" "to" "save_from" "save_to" "all" "count_to" "count_from" "class" "style") 4))
-
-(defun smarty-template-formtool-movedown ()
- "Insert a formtool_movedown statement."
- (interactive)
- (smarty-template-generic-function "formtool_movedown" nil '("save" "name" "class" "style") 2))
-
-(defun smarty-template-formtool-moveup ()
- "Insert a formtool_moveup statement."
- (interactive)
- (smarty-template-generic-function "formtool_moveup" nil '("save" "name" "class" "style") 2))
-
-(defun smarty-template-formtool-remove ()
- "Insert a formtool_remove statement."
- (interactive)
- (smarty-template-generic-function "formtool_remove" nil '("from" "save" "all" "counter" "class" "style") 2))
-
-(defun smarty-template-formtool-rename ()
- "Insert a formtool_rename statement."
- (interactive)
- (smarty-template-generic-function "formtool_rename" nil '("name" "from" "save" "class" "style") 3))
-
-(defun smarty-template-formtool-save ()
- "Insert a formtool_save statement."
- (interactive)
- (smarty-template-generic-function "formtool_save" nil '("from" "name" "save") 3))
-
-(defun smarty-template-formtool-selectall ()
- "Insert a formtool_selectall statement."
- (interactive)
- (smarty-template-generic-function "formtool_selectall" nil '("name" "class" "style") 1))
-
-(defun smarty-template-paginate-first ()
- "Insert a paginate_first statement."
- (interactive)
- (smarty-template-generic-function "paginate_first" nil '("id" "text") 0))
-
-(defun smarty-template-paginate-last ()
- "Insert a paginate_last statement."
- (interactive)
- (smarty-template-generic-function "paginate_last" nil '("id" "text") 0))
-
-(defun smarty-template-paginate-middle ()
- "Insert a paginate_middle statement."
- (interactive)
- (smarty-template-generic-function "paginate_middle" nil '("id" "format" "prefix" "page_limit" "link_prefix" "link_suffix") 0))
-
-(defun smarty-template-paginate-next ()
- "Insert a paginate_next statement."
- (interactive)
- (smarty-template-generic-function "paginate_next" nil '("id" "text") 0))
-
-(defun smarty-template-paginate-prev ()
- "Insert a paginate_prev statement."
- (interactive)
- (smarty-template-generic-function "paginate_prev" nil '("id" "text") 0))
-
-
-(defun smarty-template-btosmilies ()
- "Insert a B2Smilies statement."
- (interactive)
- (smarty-template-generic-modifier "B2Smilies" '() 0))
-
-(defun smarty-template-bbcodetohtml ()
- "Insert a bbcode2html statement."
- (interactive)
- (smarty-template-generic-modifier "bbcode2html" '() 0))
-
-(defun smarty-template-date-formatto ()
- "Insert a date_format2 statement."
- (interactive)
- (smarty-template-generic-modifier "date_format2" '("format" "default") 0))
-
-;;
-
-(defun smarty-resolve-env-variable (string)
- "Resolve environment variables in STRING."
- (while (string-match "\\(.*\\)${?\\(\\(\\w\\|_\\)+\\)}?\\(.*\\)" string)
- (setq string (concat (match-string 1 string)
- (getenv (match-string 2 string))
- (match-string 4 string))))
- string)
-
-(defun smarty-insert-string-or-file (string)
- "Insert STRING or file contents if STRING is an existing file name."
- (unless (equal string "")
- (let ((file-name
- (progn (string-match "^\\([^\n]+\\)" string)
- (smarty-resolve-env-variable (match-string 1 string)))))
- (if (file-exists-p file-name)
- (forward-char (cadr (insert-file-contents file-name)))
- (insert string)))))
-
-(defun smarty-template-insert-date ()
- "Insert date in appropriate format."
- (interactive)
- (insert
- (cond
- ;; 'american, 'european, 'scientific kept for backward compatibility
- ((eq smarty-date-format 'american) (format-time-string "%m/%d/%Y" nil))
- ((eq smarty-date-format 'european) (format-time-string "%d.%m.%Y" nil))
- ((eq smarty-date-format 'scientific) (format-time-string "%Y/%m/%d" nil))
- (t (format-time-string smarty-date-format nil)))))
-
-(defun smarty-template-header (&optional file-title)
- "Insert a Smarty file header."
- (interactive)
- (unless (equal smarty-file-header "")
- (let (pos)
- (save-excursion
- (smarty-insert-string-or-file smarty-file-header)
- (setq pos (point-marker)))
- (smarty-template-replace-header-keywords
- (point-min-marker) pos file-title))))
-
-(defun smarty-template-footer ()
- "Insert a Smarty file footer."
- (interactive)
- (unless (equal smarty-file-footer "")
- (let (pos)
- (save-excursion
- (setq pos (point-marker))
- (smarty-insert-string-or-file smarty-file-footer)
- (unless (= (preceding-char) ?\n)
- (insert "\n")))
- (smarty-template-replace-header-keywords pos (point-max-marker)))))
-
-(defun smarty-template-replace-header-keywords (beg end &optional file-title is-model)
- "Replace keywords in header and footer."
- (let ()
- (smarty-prepare-search-2
- (save-excursion
- (goto-char beg)
- (while (search-forward "<filename>" end t)
- (replace-match (buffer-name) t t))
- (goto-char beg)
- (while (search-forward "<copyright>" end t)
- (replace-match smarty-copyright-string t t))
- (goto-char beg)
- (while (search-forward "<author>" end t)
- (replace-match "" t t)
- (insert (user-full-name))
- (when user-mail-address (insert " <" user-mail-address ">")))
- (goto-char beg)
- (while (search-forward "<login>" end t)
- (replace-match (user-login-name) t t))
- (goto-char beg)
- (while (search-forward "<company>" end t)
- (replace-match smarty-company-name t t))
- (goto-char beg)
- ;; Replace <RCS> with $, so that RCS for the source is
- ;; not over-enthusiastic with replacements
- (while (search-forward "<RCS>" end t)
- (replace-match "$" nil t))
- (goto-char beg)
- (while (search-forward "<date>" end t)
- (replace-match "" t t)
- (smarty-template-insert-date))
- (goto-char beg)
- (while (search-forward "<year>" end t)
- (replace-match (format-time-string "%Y" nil) t t))
- (goto-char beg)
- (let (string)
- (while
- (re-search-forward "<\\(\\(\\w\\|\\s_\\)*\\) string>" end t)
- (setq string (read-string (concat (match-string 1) ": ")))
- (replace-match string t t)))
- (goto-char beg)
- (when (and (not is-model) (search-forward "<cursor>" end t))
- (replace-match "" t t))))))
-
-(provide 'smarty-mode)
-;;; smarty-mode.el ends here
diff --git a/emacs.d/nxhtml/related/tt-mode.el b/emacs.d/nxhtml/related/tt-mode.el
deleted file mode 100644
index cf01a47..0000000
--- a/emacs.d/nxhtml/related/tt-mode.el
+++ /dev/null
@@ -1,124 +0,0 @@
-;; tt-mode.el --- Emacs major mode for editing Template Toolkit files
-;;
-;; Copyright (c) 2002 Dave Cross, all rights reserved.
-;;
-;; This file may be distributed under the same terms as GNU Emacs.
-;;
-;; $Id: tt-mode.el 13 2008-01-27 09:35:16Z dave $
-;;
-;; This file adds simple font highlighting of TT directives when you are
-;; editing Template Toolkit files.
-;;
-;; I usually give these files an extension of .tt and in order to automatically
-;; invoke this mode for these files, I have the following in my .emacs file.
-;;
-;; (setq load-path
-;; (cons "/home/dave/xemacs" load-path))
-;; (autoload 'tt-mode "tt-mode")
-;; (setq auto-mode-alist
-;; (append '(("\\.tt$" . tt-mode)) auto-mode-alist ))
-;;
-;; Something similar may well work for you.
-;;
-;; Author: Dave Cross <dave@dave.org.uk>
-;;
-;; Modified by Lennart Borgman 2008-08-06
-
-(require 'font-lock)
-
-(defvar tt-mode-hook nil
- "List of functions to call when entering TT mode")
-
-(defvar tt-keywords
- (concat "\\b\\(?:"
- (regexp-opt (list "GET" "CALL" "SET" "DEFAULT" "INSERT" "INCLUDE"
- "BLOCK" "END" "PROCESS" "WRAPPER" "IF" "UNLESS"
- "ELSIF" "ELSE" "SWITCH" "CASE" "FOR" "FOREACH"
- "WHILE" "FILTER" "USE" "MACRO" "PERL" "RAWPERL"
- "TRY" "THROW" "CATCH" "FINAL" "LAST" "RETURN"
- "STOP" "CLEAR" "META" "TAGS"))
- "\\)\\b"))
-
-(defvar tt-font-lock-keywords
- (list
- ;; Fontify [& ... &] expressions
- '("\\(\\[%[-+]?\\)\\(\\(.\\|\n\\)+?\\)\\([-+]?%\\]\\)"
- (1 font-lock-string-face t)
- (2 font-lock-variable-name-face t)
- (4 font-lock-string-face t))
- ;; Look for keywords within those expressions
- ;;
- ;; Comment out whole directive tag
- '("\\[%\\(#.*?\\)%\\]"
- (1 font-lock-comment-face t))
- ;; Comments to end of line
-;;; '("\\[%\\(?:.\\|\n\\)*\\(#.*\\)"
-;;; (1 font-lock-comment-face t))
- '("\\[% *\\([a-z_0-9]*\\) *%\\]"
- (1 font-lock-constant-face t))
- (list (concat
- "\\(\\[%[-+]?\\|;\\)[ \n\t]*\\("
- tt-keywords
- "\\)")
- 2 font-lock-keyword-face t)
- )
- "Expressions to font-lock in tt-mode.")
-
-;; (defvar tt-font-lock-keywords
-;; ;; Since this is used in a multi major mode we
-;; (list
-;; ;; Fontify [& ... &] expressions
-;; ;;; '("^\\([-+]?\\)\\(\\(.\\|\n\\)+?\\)\\([-+]?\\)$"
-;; ;;; (1 font-lock-string-face t)
-;; ;;; (2 font-lock-variable-name-face t)
-;; ;;; (4 font-lock-string-face t))
-;; '("\\(#.*\\)$"
-;; (1 font-lock-comment-face t))
-;; '("^ *\\([a-z_0-9]*\\) *$"
-;; (1 font-lock-constant-face t))
-;; (list (concat
-;; "^\\(?:[-+]?\\|;\\)[ \n\t]*\\("
-;; tt-keywords
-;; "\\)")
-;; )
-;; 1 font-lock-keyword-face t)
-;; )
-;; "Expressions to font-lock in tt-mode.")
-
-(defvar tt-font-lock-defaults
- '(tt-font-lock-keywords nil t))
-
-(defun tt-mode-after-change (beg end pre-len)
- ;; add/remove font-lock-multiline
- ;; Fix-me: add variable for search lengths
- (let* ((here (point))
- (beg-is-ml (get-text-property beg 'font-lock-multiline))
- tt-beg
- tt-end
- )
- (when beg-is-ml
- (let ((beg-ok (not (previous-single-property-change
- here 'font-lock-multiline
- nil (- here 1))))
- )
- (when beg-ok
- (goto-char beg)
- (search-forward "%]" end t)
- )
- (search-forward "[%" end t)
- ))
- (when tt-end
- (remove-list-of-text-properties here tt-beg '(font-lock-multiline))
- (set-text-properties tt-beg tt-end '(font-lock-multiline t))))
- )
-
-
-;;;###autoload
-(define-derived-mode tt-mode fundamental-mode "TT"
- "Major mode for editing Template Toolkit files."
- (set (make-local-variable 'font-lock-defaults) tt-font-lock-defaults)
- (add-hook 'after-change-functions 'tt-mode-after-change nil t)
- )
-
-(provide 'tt-mode)
-;; tt-mode.el ends here
diff --git a/emacs.d/nxhtml/related/visual-basic-mode.el b/emacs.d/nxhtml/related/visual-basic-mode.el
deleted file mode 100644
index ca448a6..0000000
--- a/emacs.d/nxhtml/related/visual-basic-mode.el
+++ /dev/null
@@ -1,1263 +0,0 @@
-;;; visual-basic-mode.el
-;; This is free software.
-
-;; A mode for editing Visual Basic programs.
-;; Modified version of Fred White's visual-basic-mode.el
-
-;; Copyright (C) 1996 Fred White <fwhite@alum.mit.edu>
-;; Copyright (C) 1998 Free Software Foundation, Inc.
-;; (additions by Dave Love)
-;; Copyright (C) 2008-2009 Free Software Foundation, Inc.
-;; (additions by Randolph Fritz and Vincent Belaiche (VB1) )
-
-;; Author: Fred White <fwhite@alum.mit.edu>
-;; Adapted-by: Dave Love <d.love@dl.ac.uk>
-;; : Kevin Whitefoot <kevin.whitefoot@nopow.abb.no>
-;; : Randolph Fritz <rfritz@u.washington.edu>
-;; : Vincent Belaiche (VB1) <vincentb1@users.sourceforge.net>
-;; Version: 1.4.8 (2009-09-29)
-;; Serial Version: %Id: 17%
-;; Keywords: languages, basic, Evil
-
-
-;; (Old) LCD Archive Entry:
-;; basic-mode|Fred White|fwhite@alum.mit.edu|
-;; A mode for editing Visual Basic programs.|
-;; 18-Apr-96|1.0|~/modes/basic-mode.el.Z|
-
-;; This file is NOT part of GNU Emacs but the same permissions apply.
-;;
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published
-;; by the Free Software Foundation; either version 2, or (at your
-;; option) any later version.
-;;
-;; GNU Emacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of the
-;; License, or (at your option) any later version.
-
-;;; Commentary:
-
-;; Purpose of this package:
-;; This is a mode for editing programs written in The World's Most
-;; Successful Programming Language. It features automatic
-;; indentation, font locking, keyword capitalization, and some minor
-;; convenience functions.
-
-;; Installation instructions
-;; Put visual-basic-mode.el somewhere in your path, compile it, and add
-;; the following to your init file:
-
-;; (autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
-;; (setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\)$" .
-;; visual-basic-mode)) auto-mode-alist))
-;;
-;; If you are doing Rhino scripts, add:
-;; (setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\|rvb\\)$" .
-;; visual-basic-mode)) auto-mode-alist))
-
-;; If you had visual-basic-mode already installed, you may need to call
-;; visual-basic-upgrade-keyword-abbrev-table the first time that
-;; visual-basic-mode is loaded.
-
-;; Of course, under Windows 3.1, you'll have to name this file
-;; something shorter than visual-basic-mode.el
-
-;; Revisions:
-;; 1.0 18-Apr-96 Initial version
-;; 1.1 Accomodate emacs 19.29+ font-lock-defaults
-;; Simon Marshall <Simon.Marshall@esrin.esa.it>
-; 1.2 Rename to visual-basic-mode
-;; 1.3 Fix some indentation bugs.
-;; 1.3+ Changes by Dave Love: [No attempt at compatibility with
-;; anything other than Emacs 20, sorry, but little attempt to
-;; sanitize for Emacs 20 specifically.]
-;; Change `_' syntax only for font-lock and imenu, not generally;
-;; provide levels of font-locking in the current fashion;
-;; font-lock case-insensitively; use regexp-opt with the font-lok
-;; keywords; imenu support; `visual-basic-split-line', bound to
-;; C-M-j; account for single-statement `if' in indentation; add
-;; keyword "Global"; use local-write-file-hooks, not
-;; write-file-hooks.
-;; 1.4 September 1998
-;; 1.4 KJW Add begin..end, add extra keywords
-;; Add customisation for single line if. Disallow by default.
-;; Fix if regexp to require whitespace after if and require then.
-;; Add more VB keywords. Make begin..end work as if..endif so
-;; that forms are formatted correctly.
-;; 1.4.1 KJW Merged Dave Love and KJW versions.
-;; Added keywords suggested by Mickey Ferguson
-;; <MFerguson@peinc.com>
-;; Fixed imenu variable to find private variables and enums
-
-;; Changed syntax class of =, <, > to punctuation to allow dynamic
-;; abbreviations to pick up only the word at point rather than the
-;; whole expression.
-
-;; Fixed bug introduced by KJW adding suport for begin...end in
-;; forms whereby a single end outdented.
-
-;; Partially fixed failure to recognise if statements with
-;; continuations (still fails on 'single line' if with
-;; continuation, ugh).
-;; 1.4.2 RF added "class" and "null" keywords, "Rhino" script note.
-;; 1.4.3 VB1 added
-;; 1) function visual-basic-if-not-on-single-line to recognize single line
-;; if statements, even when line is broken. variable
-;; visual-basic-allow-single-line-if default set to t again.
-;; 2) use of 'words in calling regexp-opt rather than concat \\< ...\\>
-;; 3) new keywords Preserve and Explicit
-;; 1.4.4 VB1 added function visual-basic-close-block
-;; 1.4.5 VB1, (expand-abbrev) within (save-excusion...)
-;; 1.4.6 VB1 correct visual-basic-close-block (single line If case)
-;; 1.4.7 VB1 correct visual-basic-close-block (For/Next)
-;; 1.4.8 VB1 correct visual-basic-close-block (Property, + add With /End With)
-;; add command visual-basic-insert-item
-
-;; Lennart Borgman:
-;; 2009-11-20
-;; - Added eval-and-compile to visual-basic-label-regexp.
-;;
-;; Notes:
-;; Dave Love
-;; BTW, here's a script for making tags tables that I (Dave Love) have
-;; used with reasonable success. It assumes a hacked version of etags
-;; with support for case-folded regexps. I think this is now in the
-;; development version at <URL:ftp://fly.cnuce.cnr.it/pub/> and should
-;; make it into Emacs after 20.4.
-
-;; #! /bin/sh
-
-;; # etags-vb: (so-called) Visual (so-called) Basic TAGS generation.
-;; # Dave Love <d.love@dl.ac.uk>. Public domain.
-;; # 1997-11-21
-
-;; if [ $# -lt 1 ]; then
-;; echo "Usage: `basename $0` [etags options] VBfile ... [etags options] " 1>&2
-;; exit 1
-;; fi
-
-;; if [ $1 = "--help" ] || [ $1 = "-h" ]; then
-;; echo "Usage: `basename $0` [etags options] VBfile ... [etags options]
-
-;; "
-;; etags --help
-;; fi
-
-;; exec etags --lang=none -c '/\(global\|public\)[ \t]+\(\(const\|type\)[ \t]+\)*\([a-z_0-9]+\)/\4/' \
-;; -c '/public[ \t]+\(sub\|function\|class\)[ \t]+\([a-z_0-9]+\)/\2/' \
-;; "$@"
-
-;; End Notes Dave Love
-
-
-;; Known bugs:
-;; Doesn't know about ":" separated stmts
-
-
-
-;; todo:
-;; fwd/back-compound-statement
-;; completion over OCX methods and properties.
-;; IDE integration
-;; Change behaviour of ESC-q to recognise words used as paragraph
-;; titles and prevent them being dragged into the previous
-;; paragraph.
-;; etc.
-
-
-;;; Code:
-
-(provide 'visual-basic-mode)
-
-(defvar visual-basic-xemacs-p (string-match "XEmacs\\|Lucid" (emacs-version)))
-(defvar visual-basic-winemacs-p (string-match "Win-Emacs" (emacs-version)))
-(defvar visual-basic-win32-p (eq window-system 'w32))
-
-;; Variables you may want to customize.
-(defvar visual-basic-mode-indent 8 "*Default indentation per nesting level.")
-(defvar visual-basic-fontify-p t "*Whether to fontify Basic buffers.")
-(defvar visual-basic-capitalize-keywords-p t
- "*Whether to capitalize BASIC keywords.")
-(defvar visual-basic-wild-files "*.frm *.bas *.cls"
- "*Wildcard pattern for BASIC source files.")
-(defvar visual-basic-ide-pathname nil
- "*The full pathname of your Visual Basic exe file, if any.")
-;; VB
-(defvar visual-basic-allow-single-line-if t
- "*Whether to allow single line if")
-
-
-(defvar visual-basic-defn-templates
- (list "Public Sub ()\nEnd Sub\n\n"
- "Public Function () As Variant\nEnd Function\n\n"
- "Public Property Get ()\nEnd Property\n\n")
- "*List of function templates though which visual-basic-new-sub cycles.")
-
-(defvar visual-basic-imenu-generic-expression
- '((nil "^\\s-*\\(public\\|private\\)*\\s-+\\(declare\\s-+\\)*\\(sub\\|function\\)\\s-+\\(\\sw+\\>\\)"
- 4)
- ("Constants"
- "^\\s-*\\(private\\|public\\|global\\)*\\s-*\\(const\\s-+\\)\\(\\sw+\\>\\s-*=\\s-*.+\\)$\\|'"
- 3)
- ("Variables"
- "^\\(private\\|public\\|global\\|dim\\)+\\s-+\\(\\sw+\\>\\s-+as\\s-+\\sw+\\>\\)"
- 2)
- ("Types" "^\\(public\\s-+\\)*type\\s-+\\(\\sw+\\)" 2)))
-
-
-
-(defvar visual-basic-mode-syntax-table nil)
-(if visual-basic-mode-syntax-table
- ()
- (setq visual-basic-mode-syntax-table (make-syntax-table))
- (modify-syntax-entry ?\' "\<" visual-basic-mode-syntax-table) ; Comment starter
- (modify-syntax-entry ?\n ">" visual-basic-mode-syntax-table)
- (modify-syntax-entry ?\\ "w" visual-basic-mode-syntax-table)
- (modify-syntax-entry ?\= "." visual-basic-mode-syntax-table)
- (modify-syntax-entry ?\< "." visual-basic-mode-syntax-table)
- (modify-syntax-entry ?\> "." visual-basic-mode-syntax-table)) ; Make =, etc., punctuation so that dynamic abbreviations work properly
-
-
-(defvar visual-basic-mode-map nil)
-(if visual-basic-mode-map
- ()
- (setq visual-basic-mode-map (make-sparse-keymap))
- (define-key visual-basic-mode-map "\t" 'visual-basic-indent-line)
- (define-key visual-basic-mode-map "\r" 'visual-basic-newline-and-indent)
- (define-key visual-basic-mode-map "\M-\r" 'visual-basic-insert-item)
- (define-key visual-basic-mode-map "\C-c\C-j" 'visual-basic-insert-item)
- (define-key visual-basic-mode-map "\M-\C-a" 'visual-basic-beginning-of-defun)
- (define-key visual-basic-mode-map "\M-\C-e" 'visual-basic-end-of-defun)
- (define-key visual-basic-mode-map "\M-\C-h" 'visual-basic-mark-defun)
- (define-key visual-basic-mode-map "\M-\C-\\" 'visual-basic-indent-region)
- (define-key visual-basic-mode-map "\M-q" 'visual-basic-fill-or-indent)
- (define-key visual-basic-mode-map "\M-\C-j" 'visual-basic-split-line)
- (define-key visual-basic-mode-map "\C-c]" 'visual-basic-close-block)
- (cond (visual-basic-winemacs-p
- (define-key visual-basic-mode-map '(control C) 'visual-basic-start-ide))
- (visual-basic-win32-p
- (define-key visual-basic-mode-map (read "[?\\S-\\C-c]") 'visual-basic-start-ide)))
- (if visual-basic-xemacs-p
- (progn
- (define-key visual-basic-mode-map "\M-G" 'visual-basic-grep)
- (define-key visual-basic-mode-map '(meta backspace) 'backward-kill-word)
- (define-key visual-basic-mode-map '(control meta /) 'visual-basic-new-sub))))
-
-
-;; These abbrevs are valid only in a code context.
-(defvar visual-basic-mode-abbrev-table nil)
-
-(defvar visual-basic-mode-hook ())
-
-
-;; Is there a way to case-fold all regexp matches?
-;; Change KJW Add enum, , change matching from 0 or more to zero or one for public etc.
-(eval-and-compile
- (defconst visual-basic-defun-start-regexp
- (concat
- "^[ \t]*\\([Pp]ublic \\|[Pp]rivate \\|[Ss]tatic\\|[Ff]riend \\)?"
- "\\([Ss]ub\\|[Ff]unction\\|[Pp]roperty +[GgSsLl]et\\|[Tt]ype\\|[Ee]num\\|[Cc]lass\\)"
- "[ \t]+\\(\\w+\\)[ \t]*(?")))
-
-
-(defconst visual-basic-defun-end-regexp
- "^[ \t]*[Ee]nd \\([Ss]ub\\|[Ff]unction\\|[Pp]roperty\\|[Tt]ype\\|[Ee]num\\|[Cc]lass\\)")
-
-(defconst visual-basic-dim-regexp
- "^[ \t]*\\([Cc]onst\\|[Dd]im\\|[Pp]rivate\\|[Pp]ublic\\)\\_>" )
-
-
-;; Includes the compile-time #if variation.
-;; KJW fixed if to require a whitespace so as to avoid matching, for
-;; instance, iFileName and to require then.
-
-;; Two versions; one recognizes single line if just as though it were
-;; a multi-line and the other does not. Modified again to remove the
-;; requirement for then so as to allow it to match if statements that
-;; have continuations -- VB1 further elaborated on this for single line
-;; if statement to be recognized on broken lines.
-;;(defconst visual-basic-if-regexp
-;; "^[ \t]*#?[Ii]f[ \t]+.*[ \t]+[Tt]hen[ \t]*.*\\('\\|$\\)")
-(defconst visual-basic-if-regexp
- "^[ \t]*#?[Ii]f[ \t]+.*[ \t_]+")
-
-(defconst visual-basic-ifthen-regexp "^[ \t]*#?[Ii]f.+\\<[Tt]hen\\>\\s-\\S-+")
-
-(defconst visual-basic-else-regexp "^[ \t]*#?[Ee]lse\\([Ii]f\\)?")
-(defconst visual-basic-endif-regexp "[ \t]*#?[Ee]nd[ \t]*[Ii]f")
-
-(defconst visual-basic-looked-at-continuation-regexp "_[ \t]*$")
-
-(defconst visual-basic-continuation-regexp
- (concat "^.*" visual-basic-looked-at-continuation-regexp))
-
-(eval-and-compile
- (defconst visual-basic-label-regexp "^[ \t]*[a-zA-Z0-9_]+:$"))
-
-(defconst visual-basic-select-regexp "^[ \t]*[Ss]elect[ \t]+[Cc]ase")
-(defconst visual-basic-case-regexp "^[ \t]*[Cc]ase")
-(defconst visual-basic-select-end-regexp "^[ \t]*[Ee]nd[ \t]+[Ss]elect")
-
-
-(defconst visual-basic-for-regexp "^[ \t]*[Ff]or\\b")
-(defconst visual-basic-next-regexp "^[ \t]*[Nn]ext\\b")
-
-(defconst visual-basic-do-regexp "^[ \t]*[Dd]o\\b")
-(defconst visual-basic-loop-regexp "^[ \t]*[Ll]oop\\b")
-
-(defconst visual-basic-while-regexp "^[ \t]*[Ww]hile\\b")
-(defconst visual-basic-wend-regexp "^[ \t]*[Ww]end\\b")
-
-;; Added KJW Begin..end for forms
-(defconst visual-basic-begin-regexp "^[ \t]*[Bb]egin)?")
-;; This has created a bug. End on its own in code should not outdent.
-;; How can we fix this? They are used in separate Lisp expressions so
-;; add another one.
-(defconst visual-basic-end-begin-regexp "^[ \t]*[Ee]nd")
-
-(defconst visual-basic-with-regexp "^[ \t]*[Ww]ith\\b")
-(defconst visual-basic-end-with-regexp "^[ \t]*[Ee]nd[ \t]+[Ww]ith\\b")
-
-(defconst visual-basic-blank-regexp "^[ \t]*$")
-(defconst visual-basic-comment-regexp "^[ \t]*\\s<.*$")
-
-
-;; This is some approximation of the set of reserved words in Visual Basic.
-(eval-and-compile
- (defvar visual-basic-all-keywords
- '("Add" "Aggregate" "And" "App" "AppActivate" "Application" "Array" "As"
- "Asc" "AscB" "Atn" "Attribute"
- "Beep" "Begin" "BeginTrans" "Boolean" "ByVal" "ByRef"
- "CBool" "CByte" "CCur"
- "CDate" "CDbl" "CInt" "CLng" "CSng" "CStr" "CVErr" "CVar" "Call"
- "Case" "ChDir" "ChDrive" "Character" "Choose" "Chr" "ChrB" "Class"
- "ClassModule" "Clipboard" "Close" "Collection" "Column" "Columns"
- "Command" "CommitTrans" "CompactDatabase" "Component" "Components"
- "Const" "Container" "Containers" "Cos" "CreateDatabase" "CreateObject"
- "CurDir" "Currency"
- "DBEngine" "DDB" "Data" "Database" "Databases"
- "Date" "DateAdd" "DateDiff" "DatePart" "DateSerial" "DateValue" "Day"
- "Debug" "Declare" "Deftype" "DeleteSetting" "Dim" "Dir" "Do"
- "DoEvents" "Domain"
- "Double" "Dynaset" "EOF" "Each" "Else" "Empty" "End" "EndProperty"
- "Enum" "Environ" "Erase" "Err" "Error" "Exit" "Exp" "Explicit" "FV" "False" "Field"
- "Fields" "FileAttr" "FileCopy" "FileDateTime" "FileLen" "Fix" "Font" "For"
- "Form" "FormTemplate" "Format" "Forms" "FreeFile" "FreeLocks" "Friend"
- "Function"
- "Get" "GetAllSettings" "GetAttr" "GetObject" "GetSetting" "Global" "GoSub"
- "GoTo" "Group" "Groups" "Hex" "Hour" "IIf" "IMEStatus" "IPmt" "IRR"
- "If" "Implements" "InStr" "Input" "Int" "Integer" "Is" "IsArray" "IsDate"
- "IsEmpty" "IsError" "IsMissing" "IsNull" "IsNumeric" "IsObject" "Kill"
- "LBound" "LCase" "LOF" "LSet" "LTrim" "Left" "Len" "Let" "Like" "Line"
- "Load" "LoadPicture" "LoadResData" "LoadResPicture" "LoadResString" "Loc"
- "Lock" "Log" "Long" "Loop" "MDIForm" "MIRR" "Me" "MenuItems"
- "MenuLine" "Mid" "Minute" "MkDir" "Month" "MsgBox" "NPV" "NPer" "Name"
- "New" "Next" "Not" "Now" "Nothing" "Null" "Object" "Oct" "On" "Open"
- "OpenDatabase"
- "Operator" "Option" "Optional"
- "Or" "PPmt" "PV" "Parameter" "Parameters" "Partition"
- "Picture" "Pmt" "Preserve" "Print" "Printer" "Printers" "Private"
- "ProjectTemplate" "Property"
- "Properties" "Public" "Put" "QBColor" "QueryDef" "QueryDefs"
- "RSet" "RTrim" "Randomize" "Rate" "ReDim" "Recordset" "Recordsets"
- "RegisterDatabase" "Relation" "Relations" "Rem" "RepairDatabase"
- "Reset" "Resume" "Return" "Right" "RmDir" "Rnd" "Rollback" "RowBuffer"
- "SLN" "SYD" "SavePicture" "SaveSetting" "Screen" "Second" "Seek"
- "SelBookmarks" "Select" "SelectedComponents" "SendKeys" "Set"
- "SetAttr" "SetDataAccessOption" "SetDefaultWorkspace" "Sgn" "Shell"
- "Sin" "Single" "Snapshot" "Space" "Spc" "Sqr" "Static" "Step" "Stop" "Str"
- "StrComp" "StrConv" "String" "Sub" "SubMenu" "Switch" "Tab" "Table"
- "TableDef" "TableDefs" "Tan" "Then" "Time" "TimeSerial" "TimeValue"
- "Timer" "To" "Trim" "True" "Type" "TypeName" "UBound" "UCase" "Unload"
- "Unlock" "Val" "Variant" "VarType" "Verb" "Weekday" "Wend"
- "While" "Width" "With" "Workspace" "Workspaces" "Write" "Year")))
-
-(defvar visual-basic-font-lock-keywords-1
- (eval-when-compile
- (list
- ;; Names of functions.
- (list visual-basic-defun-start-regexp
- '(1 font-lock-keyword-face nil t)
- '(2 font-lock-keyword-face nil t)
- '(3 font-lock-function-name-face))
-
- ;; Statement labels
- (cons visual-basic-label-regexp 'font-lock-keyword-face)
-
- ;; Case values
- ;; String-valued cases get font-lock-string-face regardless.
- (list "^[ \t]*case[ \t]+\\([^'\n]+\\)" 1 'font-lock-keyword-face t)
-
- ;; Any keywords you like.
- (list (regexp-opt
- '("Dim" "If" "Then" "Else" "ElseIf" "End If") 'words)
- 1 'font-lock-keyword-face))))
-
-(defvar visual-basic-font-lock-keywords-2
- (append visual-basic-font-lock-keywords-1
- (eval-when-compile
- `((, (regexp-opt visual-basic-all-keywords 'words)
- 1 font-lock-keyword-face)))))
-
-(defvar visual-basic-font-lock-keywords visual-basic-font-lock-keywords-1)
-
-
-(put 'visual-basic-mode 'font-lock-keywords 'visual-basic-font-lock-keywords)
-
-;;;###autoload
-(defun visual-basic-mode ()
- "A mode for editing Microsoft Visual Basic programs.
-Features automatic indentation, font locking, keyword capitalization,
-and some minor convenience functions.
-Commands:
-\\{visual-basic-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (use-local-map visual-basic-mode-map)
- (setq major-mode 'visual-basic-mode)
- (setq mode-name "Visual Basic")
- (set-syntax-table visual-basic-mode-syntax-table)
-
- ;;; This does not work in multi major modes.
- ;;(add-hook 'local-write-file-hooks 'visual-basic-untabify)
-
- (setq local-abbrev-table visual-basic-mode-abbrev-table)
- (if visual-basic-capitalize-keywords-p
- (progn
- (make-local-variable 'pre-abbrev-expand-hook)
- (add-hook 'pre-abbrev-expand-hook 'visual-basic-pre-abbrev-expand-hook)
- (abbrev-mode 1)))
-
- (make-local-variable 'comment-start)
- (setq comment-start "' ")
- (make-local-variable 'comment-start-skip)
- (setq comment-start-skip "'+ *")
- (make-local-variable 'comment-column)
- (setq comment-column 40)
- (make-local-variable 'comment-end)
- (setq comment-end "")
-
- (make-local-variable 'indent-line-function)
- (setq indent-line-function 'visual-basic-indent-line)
-
- (if visual-basic-fontify-p
- (visual-basic-enable-font-lock))
-
- (make-local-variable 'imenu-generic-expression)
- (setq imenu-generic-expression visual-basic-imenu-generic-expression)
-
- (set (make-local-variable 'imenu-syntax-alist) `((,(string-to-char "_") . "w")))
- (set (make-local-variable 'imenu-case-fold-search) t)
-
- ;;(make-local-variable 'visual-basic-associated-files)
- ;; doing this here means we need not check to see if it is bound later.
- (add-hook 'find-file-hooks 'visual-basic-load-associated-files)
-
- (run-hooks 'visual-basic-mode-hook))
-
-
-(defun visual-basic-enable-font-lock ()
- ;; Emacs 19.29 requires a window-system else font-lock-mode errs out.
- (cond ((or visual-basic-xemacs-p window-system)
-
- ;; In win-emacs this sets font-lock-keywords back to nil!
- (if visual-basic-winemacs-p
- (font-lock-mode 1))
-
- ;; Accomodate emacs 19.29+
- ;; From: Simon Marshall <Simon.Marshall@esrin.esa.it>
- (cond ((boundp 'font-lock-defaults)
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults
- `((visual-basic-font-lock-keywords
- visual-basic-font-lock-keywords-1
- visual-basic-font-lock-keywords-2)
- nil t ((,(string-to-char "_") . "w")))))
- (t
- (make-local-variable 'font-lock-keywords)
- (setq font-lock-keywords visual-basic-font-lock-keywords)))
-
- (if visual-basic-winemacs-p
- (font-lock-fontify-buffer)
- (font-lock-mode 1)))))
-
-;; KJW should add some odds and bobs here to cover "end if" one way
-;; could be to create the abbreviations by removing whitespace then we
-;; could put "end if", "end with" and so on in the keyword table
-;; Another idea would be to make it intelligent enough to substitute
-;; the correct end for the construct (with, select, if)
-;; Is this what the abbrev table hook entry is for?
-(defun visual-basic-construct-keyword-abbrev-table ()
- (if visual-basic-mode-abbrev-table
- nil
- (let ((words visual-basic-all-keywords)
- (word nil)
- (list nil))
- (while words
- (setq word (car words)
- words (cdr words))
- (setq list (cons (list (downcase word) word) list)))
-
- (define-abbrev-table 'visual-basic-mode-abbrev-table list))))
-
-;; Would like to do this at compile-time.
-(visual-basic-construct-keyword-abbrev-table)
-
-
-(defun visual-basic-upgrade-keyword-abbrev-table ()
- "Use this in case of upgrading visual-basic-mode.el"
- (interactive)
-
- (let ((words visual-basic-all-keywords)
- (word nil)
- (list nil))
- (while words
- (setq word (car words)
- words (cdr words))
- (setq list (cons (list (downcase word) word) list)))
- (define-abbrev-table 'visual-basic-mode-abbrev-table list)))
-
-
-(defun visual-basic-in-code-context-p ()
- (if (fboundp 'buffer-syntactic-context) ; XEmacs function.
- (null (buffer-syntactic-context))
- ;; Attempt to simulate buffer-syntactic-context
- ;; I don't know how reliable this is.
- (let* ((beg (save-excursion
- (beginning-of-line)
- (point)))
- (list
- (parse-partial-sexp beg (point))))
- (and (null (nth 3 list)) ; inside string.
- (null (nth 4 list)))))) ; inside comment
-
-
-(defun visual-basic-pre-abbrev-expand-hook ()
- ;; Allow our abbrevs only in a code context.
- (setq local-abbrev-table
- (if (visual-basic-in-code-context-p)
- visual-basic-mode-abbrev-table)))
-
-
-(defun visual-basic-newline-and-indent (&optional count)
- "Insert a newline, updating indentation."
- (interactive)
- (save-excursion
- (expand-abbrev)
- (visual-basic-indent-line))
- (call-interactively 'newline-and-indent))
-
-(defun visual-basic-beginning-of-defun ()
- (interactive)
- (re-search-backward visual-basic-defun-start-regexp))
-
-(defun visual-basic-end-of-defun ()
- (interactive)
- (re-search-forward visual-basic-defun-end-regexp))
-
-(defun visual-basic-mark-defun ()
- (interactive)
- (beginning-of-line)
- (visual-basic-end-of-defun)
- (set-mark (point))
- (visual-basic-beginning-of-defun)
- (if visual-basic-xemacs-p
- (zmacs-activate-region)))
-
-(defun visual-basic-indent-defun ()
- (interactive)
- (save-excursion
- (visual-basic-mark-defun)
- (call-interactively 'visual-basic-indent-region)))
-
-
-(defun visual-basic-fill-long-comment ()
- "Fills block of comment lines around point."
- ;; Derived from code in ilisp-ext.el.
- (interactive)
- (save-excursion
- (beginning-of-line)
- (let ((comment-re "^[ \t]*\\s<+[ \t]*"))
- (if (looking-at comment-re)
- (let ((fill-prefix
- (buffer-substring
- (progn (beginning-of-line) (point))
- (match-end 0))))
-
- (while (and (not (bobp))
- (looking-at visual-basic-comment-regexp))
- (forward-line -1))
- (if (not (bobp)) (forward-line 1))
-
- (let ((start (point)))
-
- ;; Make all the line prefixes the same.
- (while (and (not (eobp))
- (looking-at comment-re))
- (replace-match fill-prefix)
- (forward-line 1))
-
- (if (not (eobp))
- (beginning-of-line))
-
- ;; Fill using fill-prefix
- (fill-region-as-paragraph start (point))))))))
-
-
-(defun visual-basic-fill-or-indent ()
- "Fill long comment around point, if any, else indent current definition."
- (interactive)
- (cond ((save-excursion
- (beginning-of-line)
- (looking-at visual-basic-comment-regexp))
- (visual-basic-fill-long-comment))
- (t
- (visual-basic-indent-defun))))
-
-
-(defun visual-basic-new-sub ()
- "Insert template for a new subroutine. Repeat to cycle through alternatives."
- (interactive)
- (beginning-of-line)
- (let ((templates (cons visual-basic-blank-regexp
- visual-basic-defn-templates))
- (tem nil)
- (bound (point)))
- (while templates
- (setq tem (car templates)
- templates (cdr templates))
- (cond ((looking-at tem)
- (replace-match (or (car templates)
- ""))
- (setq templates nil))))
-
- (search-backward "()" bound t)))
-
-
-;; (defun visual-basic-untabify ()
-;; "Do not allow any tabs into the file."
-;; (if (eq major-mode 'visual-basic-mode)
-;; (untabify (point-min) (point-max)))
-;; nil)
-
-(defun visual-basic-default-tag ()
- (if (and (not (bobp))
- (save-excursion
- (backward-sexp)
- (looking-at "\\w")))
- (backward-word 1))
- (let ((s (point))
- (e (save-excursion
- (forward-sexp)
- (point))))
- (buffer-substring s e)))
-
-(defun visual-basic-grep (tag)
- "Search BASIC source files in current directory for TAG."
- (interactive
- (list (let* ((def (visual-basic-default-tag))
- (tag (read-string
- (format "Grep for [%s]: " def))))
- (if (string= tag "") def tag))))
- (grep (format "grep -n %s %s" tag visual-basic-wild-files)))
-
-
-;;; IDE Connection.
-
-(defun visual-basic-buffer-project-file ()
- "Return a guess as to the project file associated with the current buffer."
- (car (directory-files (file-name-directory (buffer-file-name)) t "\\.vbp")))
-
-(defun visual-basic-start-ide ()
- "Start Visual Basic (or your favorite IDE, (after Emacs, of course))
-on the first project file in the current directory.
-Note: it's not a good idea to leave Visual Basic running while you
-are editing in Emacs, since Visual Basic has no provision for reloading
-changed files."
- (interactive)
- (let (file)
- (cond ((null visual-basic-ide-pathname)
- (error "No pathname set for Visual Basic. See visual-basic-ide-pathname"))
- ((null (setq file (visual-basic-buffer-project-file)))
- (error "No project file found"))
- ((fboundp 'win-exec)
- (iconify-emacs)
- (win-exec visual-basic-ide-pathname 'win-show-normal file))
- ((fboundp 'start-process)
- (iconify-frame (selected-frame))
- (start-process "*VisualBasic*" nil visual-basic-ide-pathname file))
- (t
- (error "No way to spawn process!")))))
-
-
-
-;;; Indentation-related stuff.
-
-(defun visual-basic-indent-region (start end)
- "Perform visual-basic-indent-line on each line in region."
- (interactive "r")
- (save-excursion
- (goto-char start)
- (beginning-of-line)
- (while (and (not (eobp))
- (< (point) end))
- (if (not (looking-at visual-basic-blank-regexp))
- (visual-basic-indent-line))
- (forward-line 1)))
-
- (cond ((fboundp 'zmacs-deactivate-region)
- (zmacs-deactivate-region))
- ((fboundp 'deactivate-mark)
- (deactivate-mark))))
-
-
-
-(defun visual-basic-previous-line-of-code ()
- (if (not (bobp))
- (forward-line -1)) ; previous-line depends on goal column
- (while (and (not (bobp))
- (or (looking-at visual-basic-blank-regexp)
- (looking-at visual-basic-comment-regexp)))
- (forward-line -1)))
-
-
-(defun visual-basic-find-original-statement ()
- "If the current line is a continuation, move back to the original stmt."
- (let ((here (point)))
- (visual-basic-previous-line-of-code)
- (while (and (not (bobp))
- (looking-at visual-basic-continuation-regexp))
- (setq here (point))
- (visual-basic-previous-line-of-code))
- (goto-char here)))
-
-(defun visual-find-matching-stmt (open-p close-p)
- ;; Searching backwards
- (let ((level 0))
- (while (and (>= level 0) (not (bobp)))
- (visual-basic-previous-line-of-code)
- (visual-basic-find-original-statement)
- (cond ((funcall close-p)
- (setq level (+ level 1)))
- ((funcall open-p)
- (setq level (- level 1)))))))
-
-(defun visual-basic-find-matching-stmt (open-regexp close-regexp)
- (visual-find-matching-stmt
- (lambda () (looking-at open-regexp))
- (lambda () (looking-at close-regexp))))
-
-(defun visual-basic-get-complete-tail-of-line ()
- "Return the tail of the current statement line, starting at
- point and going up to end of statement line. If you want the
- complete statement line, you have to call functions
- `visual-basic-find-original-statement' and then
- `beginning-of-line' before"
- (let* ((start-point (point))
- complete-line
- (line-beg start-point)
- line-end)
- (while (null line-end)
- (end-of-line)
- (setq line-end (point))
- (if (search-backward "_" line-beg t)
- (if (looking-at visual-basic-looked-at-continuation-regexp)
- ;; folded line
- (progn
- (setq line-end (1- (point))
- complete-line (cons
- (buffer-substring-no-properties
- line-beg line-end)
- complete-line)
- line-end nil)
- (beginning-of-line 2)
- (setq line-beg (point)))
- ;; _ found, but not a folded line (this is a syntax error)
- (setq complete-line
- (cons (buffer-substring-no-properties line-beg line-end) complete-line)))
- ;; not a folded line
- (setq complete-line
- (cons (buffer-substring-no-properties line-beg line-end)
- complete-line))))
- (mapconcat 'identity (nreverse complete-line) " ")))
-
-(defun visual-basic-if-not-on-single-line ()
- "Return non-`nil' when the If statement is not on a single statement
-line, i.e. requires a matching End if. Note that a statement line may
-be folded over several code lines."
- (if (looking-at visual-basic-if-regexp)
- (save-excursion
- (beginning-of-line)
- (let (p1
- p2
- ;; 1st reconstruct complete line
- (complete-line (visual-basic-get-complete-tail-of-line)) )
-
- ;; now complete line has been reconstructed, drop confusing elements
-
- ;; remove any VB string from complete line, as strings may disrupt : and ' detection
- (while (and (setq p1 (string-match "\"" complete-line))
- (setq p2 (string-match "\"" complete-line (1+ p1))))
- (setq complete-line (concat (substring complete-line 0 p1)
- (substring complete-line (1+ p2)))))
- ;; now drop tailing comment if any
- (when (setq p1 (string-match "'" complete-line))
- (setq complete-line (substring complete-line p1)))
- ;; now drop 1st concatenated instruction is any
- (when (setq p1 (string-match ":" complete-line))
- (setq complete-line (substring complete-line p1)))
- ;;
- (string-match "Then\\s-*$" complete-line))); end (save-excursion ...)
- ;; else, not a basic if
- nil))
-
-(defun visual-basic-find-matching-if ()
- (visual-find-matching-stmt 'visual-basic-if-not-on-single-line
- (lambda () (looking-at visual-basic-endif-regexp))))
-
-(defun visual-basic-find-matching-select ()
- (visual-basic-find-matching-stmt visual-basic-select-regexp
- visual-basic-select-end-regexp))
-
-(defun visual-basic-find-matching-for ()
- (visual-basic-find-matching-stmt visual-basic-for-regexp
- visual-basic-next-regexp))
-
-(defun visual-basic-find-matching-do ()
- (visual-basic-find-matching-stmt visual-basic-do-regexp
- visual-basic-loop-regexp))
-
-(defun visual-basic-find-matching-while ()
- (visual-basic-find-matching-stmt visual-basic-while-regexp
- visual-basic-wend-regexp))
-
-(defun visual-basic-find-matching-with ()
- (visual-basic-find-matching-stmt visual-basic-with-regexp
- visual-basic-end-with-regexp))
-
-;;; If this fails it must return the indent of the line preceding the
-;;; end not the first line because end without matching begin is a
-;;; normal simple statement
-(defun visual-basic-find-matching-begin ()
- (let ((original-point (point)))
- (visual-basic-find-matching-stmt visual-basic-begin-regexp
- visual-basic-end-begin-regexp)
- (if (bobp) ;failed to find a matching begin so assume that it is
- ;an end statement instead and use the indent of the
- ;preceding line.
- (progn (goto-char original-point)
- (visual-basic-previous-line-of-code)))))
-
-
-(defun visual-basic-calculate-indent ()
- (let ((original-point (point)))
- (save-excursion
- (beginning-of-line)
- ;; Some cases depend only on where we are now.
- (cond ((or (looking-at visual-basic-defun-start-regexp)
- (looking-at visual-basic-label-regexp)
- (looking-at visual-basic-defun-end-regexp))
- 0)
-
- ;; The outdenting stmts, which simply match their original.
- ((or (looking-at visual-basic-else-regexp)
- (looking-at visual-basic-endif-regexp))
- (visual-basic-find-matching-if)
- (current-indentation))
-
- ;; All the other matching pairs act alike.
- ((looking-at visual-basic-next-regexp) ; for/next
- (visual-basic-find-matching-for)
- (current-indentation))
-
- ((looking-at visual-basic-loop-regexp) ; do/loop
- (visual-basic-find-matching-do)
- (current-indentation))
-
- ((looking-at visual-basic-wend-regexp) ; while/wend
- (visual-basic-find-matching-while)
- (current-indentation))
-
- ((looking-at visual-basic-end-with-regexp) ; with/end with
- (visual-basic-find-matching-with)
- (current-indentation))
-
- ((looking-at visual-basic-select-end-regexp) ; select case/end select
- (visual-basic-find-matching-select)
- (current-indentation))
-
- ;; A case of a select is somewhat special.
- ((looking-at visual-basic-case-regexp)
- (visual-basic-find-matching-select)
- (+ (current-indentation) visual-basic-mode-indent))
-
- ;; Added KJW: Make sure that this comes after the cases
- ;; for if..endif, end select because end-regexp will also
- ;; match "end select" etc.
- ((looking-at visual-basic-end-begin-regexp) ; begin/end
- (visual-basic-find-matching-begin)
- (current-indentation))
-
- (t
- ;; Other cases which depend on the previous line.
- (visual-basic-previous-line-of-code)
-
- ;; Skip over label lines, which always have 0 indent.
- (while (looking-at visual-basic-label-regexp)
- (visual-basic-previous-line-of-code))
-
- (cond
- ((looking-at visual-basic-continuation-regexp)
- (visual-basic-find-original-statement)
- ;; Indent continuation line under matching open paren,
- ;; or else one word in.
- (let* ((orig-stmt (point))
- (matching-open-paren
- (condition-case ()
- (save-excursion
- (goto-char original-point)
- (beginning-of-line)
- (backward-up-list 1)
- ;; Only if point is now w/in cont. block.
- (if (<= orig-stmt (point))
- (current-column)))
- (error nil))))
- (cond (matching-open-paren
- (1+ matching-open-paren))
- (t
- ;; Else, after first word on original line.
- (back-to-indentation)
- (forward-word 1)
- (while (looking-at "[ \t]")
- (forward-char 1))
- (current-column)))))
- (t
- (visual-basic-find-original-statement)
-
- (let ((indent (current-indentation)))
- ;; All the various +indent regexps.
- (cond ((looking-at visual-basic-defun-start-regexp)
- (+ indent visual-basic-mode-indent))
-
- ((or (visual-basic-if-not-on-single-line)
- (and (looking-at visual-basic-else-regexp)
- (not (and visual-basic-allow-single-line-if
- (looking-at visual-basic-ifthen-regexp)))))
- (+ indent visual-basic-mode-indent))
-
- ((or (looking-at visual-basic-select-regexp)
- (looking-at visual-basic-case-regexp))
- (+ indent visual-basic-mode-indent))
-
- ((or (looking-at visual-basic-do-regexp)
- (looking-at visual-basic-for-regexp)
- (looking-at visual-basic-while-regexp)
- (looking-at visual-basic-with-regexp)
- (looking-at visual-basic-begin-regexp))
- (+ indent visual-basic-mode-indent))
-
- (t
- ;; By default, just copy indent from prev line.
- indent))))))))))
-
-(defun visual-basic-indent-to-column (col)
- (let* ((bol (save-excursion
- (beginning-of-line)
- (point)))
- (point-in-whitespace
- (<= (point) (+ bol (current-indentation))))
- (blank-line-p
- (save-excursion
- (beginning-of-line)
- (looking-at visual-basic-blank-regexp))))
-
- (cond ((/= col (current-indentation))
- (save-excursion
- (beginning-of-line)
- (back-to-indentation)
- (delete-region bol (point))
- (indent-to col))))
-
- ;; If point was in the whitespace, move back-to-indentation.
- (cond (blank-line-p
- (end-of-line))
- (point-in-whitespace
- (back-to-indentation)))))
-
-
-(defun visual-basic-indent-line ()
- "Indent current line for BASIC."
- (interactive)
- (visual-basic-indent-to-column (visual-basic-calculate-indent)))
-
-
-(defun visual-basic-split-line ()
- "Split line at point, adding continuation character or continuing a comment.
-In Abbrev mode, any abbrev before point will be expanded."
- (interactive)
- (let ((pps-list (parse-partial-sexp (save-excursion
- (beginning-of-line)
- (point))
- (point))))
- ;; Dispatch on syntax at this position.
- (cond ((equal t (nth 4 pps-list)) ; in comment
- (indent-new-comment-line))
- ((equal t (nth 4 pps-list)) ; in string
- (error "Can't break line inside a string"))
- (t (just-one-space) ; leading space on next line
- ; doesn't count, sigh
- (insert "_")
- (visual-basic-newline-and-indent)))))
-
-(defun visual-basic-detect-idom ()
- "Detects whether this is a VBA or VBS script. Returns symbol
- `vba' if it is VBA, `nil' otherwise"
- (let (ret)
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (cond
- ((looking-at "^[ \t]*Attribute\\s-+VB_Name\\s-+= ") (setq ret 'vba)))
- ))
- ret))
-
-(defun visual-basic-close-block ()
- "Insert `End If' is current block is a `If Then ...', `End
-With' if the block is a `With ...', etc..."
- (interactive)
- (let (end-statement end-indent)
- (save-excursion
- (save-match-data
- (while
- (unless (bobp)
- (visual-basic-previous-line-of-code)
- (visual-basic-find-original-statement)
- (cond
- ;; Cases where the current statement is a start-of-smthing statement
- ((looking-at visual-basic-defun-start-regexp)
- (let ((smt (match-string 2)))
- (when (string-match "\\`Prop" smt)
- (setq smt "Property"))
- (setq end-statement (concat "End " smt)
- end-indent 0))
- nil)
- ((looking-at visual-basic-select-regexp)
- (setq end-statement "End Select"
- end-indent (current-indentation))
- nil)
- ((looking-at visual-basic-with-regexp)
- (setq end-statement "End With"
- end-indent (current-indentation))
- nil)
- ((looking-at visual-basic-case-regexp)
- (setq end-statement "End Select"
- end-indent (max 0 (- (current-indentation) visual-basic-mode-indent)))
- nil)
- ((looking-at visual-basic-begin-regexp)
- (setq end-statement "End"
- end-indent (current-indentation))
- nil)
- ((or (visual-basic-if-not-on-single-line)
- (looking-at visual-basic-else-regexp))
- (setq end-statement "End If"
- end-indent (current-indentation))
- nil)
-
- ((looking-at visual-basic-do-regexp)
- (setq end-statement "Loop"
- end-indent (current-indentation))
- nil)
-
- ((looking-at visual-basic-for-regexp)
- (goto-char (match-end 0))
- (setq end-statement "Next"
- end-indent (current-indentation))
- (let ((vb-idom (visual-basic-detect-idom)))
- (cond
- ;; for VBA add the variable name after Next.
- ((eq vb-idom 'vba)
- (when (looking-at "\\s-+\\(Each\\s-+\\|\\)\\([^ \t\n\r]+\\)")
- (setq end-statement (concat end-statement " " (match-string 2)))))))
- nil)
- ;; Cases where the current statement is an end-of-smthing statement
- ((or (looking-at visual-basic-else-regexp)
- (looking-at visual-basic-endif-regexp))
- (visual-basic-find-matching-if)
- t)
- ((looking-at visual-basic-next-regexp) ; for/next
- (visual-basic-find-matching-for)
- t)
- ((looking-at visual-basic-loop-regexp) ; do/loop
- (visual-basic-find-matching-do)
- t)
- ((looking-at visual-basic-wend-regexp) ; while/wend
- (visual-basic-find-matching-while)
- t)
- ((looking-at visual-basic-end-with-regexp) ; with/end with
- (visual-basic-find-matching-with)
- t)
- ((looking-at visual-basic-select-end-regexp) ; select case/end select
- (visual-basic-find-matching-select)
- t)
-
-
- ;; default is to loop again back to previous line of code.
- (t t))))))
- (when end-statement
- (insert end-statement)
- (visual-basic-indent-to-column end-indent))))
-
-(defvar delta-split-to-cur-point) ;; Don't know what it is, just silence compiler
-
-(defun visual-basic-insert-item ()
- "Insert a new item in a block.
-
-This function is under developement, and for the time being only Dim items are handled.
-
-Interting an item means:
-
-* Add a `Case' or `Case Else' into a `Select ... End Select'
- block. Pressing again toggles between `Case' and `Case
- Else'. `Case Else' is possible only if there is not already a `Case Else'.
-
-* split a Dim declaration over several lines.
-
-* Add an `Else' or `ElseIf ... Then' into an `If ... Then ... End
- If' block. Pressing again toggles between `Else' and `ElseIf
- ... Then'. `Else' is possible only if therei s not already an
- `Else'.
-"
- (interactive)
- ;; possible cases are
- ;; dim-split-before => split before variable name
- ;; dim-split-after => split after type name if any
- ;; if-with-else
- ;; if-without-else
- ;; select-with-else
- ;; select-without-else
- ;; not-itemizable
- (let (item-case
- item-ident
- split-point
- cur-point-mark
- prefix
- tentative-split-point
- block-stack (cur-point (point)) previous-line-of-code)
- (save-excursion
- (save-match-data
- (beginning-of-line)
- (while
- (progn
- (visual-basic-find-original-statement)
- (cond
- ;; dim case
- ;;--------------------------------------------------------------
- ((and (null previous-line-of-code)
- (looking-at visual-basic-dim-regexp)
- (null (save-match-data (looking-at visual-basic-defun-start-regexp))))
- (setq prefix (buffer-substring-no-properties
- (point)
- (goto-char (setq split-point (match-end 0)))))
- (while
- (progn
- (if
- (looking-at "\\s-*\\sw+\\s-*")
- (progn
- (goto-char (setq tentative-split-point (match-end 0)))
- (if (>= tentative-split-point cur-point)
- nil
- (while (or
- (looking-at "([^)\n]+)\\s-*")
- (looking-at visual-basic-looked-at-continuation-regexp))
- (goto-char (setq tentative-split-point (match-end 0))))
- (when (looking-at "As\\s-+\\sw+\\s-*")
- (goto-char (setq tentative-split-point (match-end 0))))
- (when (looking-at visual-basic-looked-at-continuation-regexp)
- (beginning-of-line 2))
- (if (looking-at ",")
- (goto-char (setq split-point (match-end 0)))
- (setq split-point (point))
- nil)))
- nil)))
- (goto-char split-point)
- (setq item-case (if (<= split-point cur-point) 'dim-split-before 'dim-split-after))
- (setq delta-split-to-cur-point (- split-point cur-point))
- (setq cur-point-mark (make-marker))
- (set-marker cur-point-mark cur-point)
- (looking-at "\\s-*")
- (setq delta-split-to-cur-point (- delta-split-to-cur-point
- (- (match-end 0) (match-beginning 0))))
- (delete-region (point) (match-end 0))
- (when (looking-back ",")
- (delete-region split-point (1- split-point)))
- (insert "\n" prefix " ")
- (setq cur-point (marker-position cur-point-mark))
- (set-marker cur-point-mark nil)
- nil)
- ;; next
- ((looking-at visual-basic-next-regexp)
- (push (list 'next) block-stack))
- ;; default
- ;;--------------------------------------------------------------
- (t (if (bobp)
- (setq item-case 'not-itemizable)))
- )
- (when (null item-case)
- (visual-basic-previous-line-of-code)
- (setq previous-line-of-code t))
- (null item-case)))))
- (cond
- ((eq item-case 'dim-split-after)
- (goto-char cur-point))
- )
- ))
-
-;;; Some experimental functions
-
-;;; Load associated files listed in the file local variables block
-(defun visual-basic-load-associated-files ()
- "Load files that are useful to have around when editing the source of the file that has just been loaded.
-The file must have a local variable that lists the files to be loaded.
-If the file name is relative it is relative to the directory
-containing the current buffer. If the file is already loaded nothing
-happens, this prevents circular references causing trouble. After an
-associated file is loaded its associated files list will be
-processed."
- (if (boundp 'visual-basic-associated-files)
- (let ((files visual-basic-associated-files)
- (file nil))
- (while files
- (setq file (car files)
- files (cdr files))
- (message "Load associated file: %s" file)
- (visual-basic-load-file-ifnotloaded file default-directory)))))
-
-
-
-(defun visual-basic-load-file-ifnotloaded (file default-directory)
- "Load file if not already loaded.
-If file is relative then default-directory provides the path"
- (let((file-absolute (expand-file-name file default-directory)))
- (if (get-file-buffer file-absolute); don't do anything if the buffer is already loaded
- ()
- (find-file-noselect file-absolute ))))
-
-
-
-;;; visual-basic-mode.el ends here
-
-
-;External Links
-;* [http://visualbasic.freetutes.com/ Visual Basic tutorials]
-
diff --git a/emacs.d/nxhtml/related/wikipedia-mode.el b/emacs.d/nxhtml/related/wikipedia-mode.el
deleted file mode 100644
index c219e19..0000000
--- a/emacs.d/nxhtml/related/wikipedia-mode.el
+++ /dev/null
@@ -1,2296 +0,0 @@
-;;; wikipedia-mode.el --- Mode for editing Wikipedia articles off-line
-;; Copyright (C) 2003, 2004, 2006 Chong Yidong, Uwe Brauer
-
-;; Author: Chong Yidong <cyd at stupidchicken com>
-;; Maintainer: Uwe Brauer <oub at mat.ucm.es>
-;; Version: 0.51
-;; Keywords: wiki
-;; $Id: wikipedia-mode.el,v 1.5 2006/05/30 15:16:45 oub Exp oub $
-
-
-;; This file is not part of GNU Emacs.
-
-;;{{{ GPL2
-
-;; This file is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of
-;; the License, or (at your option) any later version.
-
-;; This file is distributed in the hope that it will be
-;; useful, but WITHOUT ANY WARRANTY; without even the implied
-;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE. See the GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public
-;; License along with GNU Emacs; if not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-;; MA 02111-1307 USA
-
-;;}}}
-
-;;; Commentary:
-
-;; This is `wikipedia-mode', a major mode for editing articles written
-;; in the markup language used by Wikipedia, the free on-line
-;; encyclopedia (http://www.wikipedia.org). It is intended to work
-;; with GNU Emacs 21.x, and Xemacs 21.4.x. See below for details.
-
-;; wikipedia mode can be found also at:
-;; http://en.wikipedia.org/wiki/Wikipedia:Wikipedia-mode.el
-
-;;{{{ INSTALLING WIKIPEDIA-MODE
-
-;; Installing wikipedia-mode
-;; =========================
-;;
-;; Save wikipedia-mode.el in a convenient directory, preferably in
-;; your `load-path'. Add the following to your `user-init-file':
-;;
-;; (autoload 'wikipedia-mode
-;; "wikipedia-mode.el"
-;; "Major mode for editing documents in Wikipedia markup." t)
-;;
-;; If you did not save wikipedia-mode.el in your `load-path', you must
-;; use the full pathname. On MS Windows, use forward slashes (/)
-;; rather than back slashes (\) to indicate the directory, e.g.:
-;;
-;; (autoload 'wikipedia-mode
-;; "C:/Documents and Settings/USERNAME/.emacs.d/Wikipedia-mode.el"
-;; "Major mode for editing documents in Wikipedia markup." t)
-;;
-;; If you want to associate filenames ending in ".wiki" with
-;; wikipedia-mode, add the following to your init file:
-;;
-;; (setq auto-mode-alist
-;; (cons '("\\.wiki\\'" . wikipedia-mode) auto-mode-alist))
-
-;;}}}
-
-;;{{{ REQUIREMENTS
-
-;; This is not a real requirements but I highly recommend to use
-;; outline-magic written by Carsten Dominik. If you don't want to use it
-;; you have to comment out the relevant reference to outline magic.
-;; It can be found at
-;; http://www.astro.uva.nl/~dominik/Tools/outline-magic.el
-
-
-
-
-;;}}}
-
-;;{{{ RECOMMENDATIONS INSTALLING LONGLINES-MODE
-
-;; Installing longlines-mode
-;; =========================
-;;
-;; If you are using Emacs 22 or later longlines-mode is included so
-;; please skip this section!
-;;
-;; Wikipedia articles don't use newline characters to break paragraphs
-;; into lines, so each paragraph looks like a super-long line to
-;; Emacs. To let Emacs handle "soft word wrapping", you need to
-;; download a third-party package, longlines-mode.
-;;
-;; Download longlines.el, saving into your `load-path':
-;;
-;; http://www.emacswiki.org/elisp/longlines.el
-;;
-;; Add the following to your `user-init-file':
-;;
-;; (autoload 'longlines-mode "longlines.el"
-;; "Minor mode for editing long lines." t)
-;;
-;;
-;; WARNING: if you insert text from one file in wikipedia-mode to
-;; another file in wikipedia-mode I strongly recommend, to turn
-;; longlines-mode off, before the copying!
-
-;;}}}
-
-;;{{{ RECOMMENDATIONS INSTALLING PABBREV-MODE
-
-;; Installing pabbrev-mode
-;; =========================
-;;
-;; You may find pabbrev.el useful, which can be found at
-;; http://www.russet.org.uk/download/emacs/pabbrev.el
-
-
-;;}}}
-
-;;{{{ Xemacs or (GNU) Emacs
-
-;; Xemacs or (GNU) Emacs
-;; =====================
-;; Usually that is a question of taste. However almost all wikipedia
-;; articles nowadays use UTF8 coding, so the question which of the
-;; Macsen to use, boils down to which degree UTF8 support is
-;; implemented (no mule Xemacs is ruled out). While Xemacs has the
-;; better font support, the UTF8 support still is not complete and
-;; hence at the time being it is sad for the maintainer (a long time
-;; Xemacs user) to recommend NOT to use Xemacs, even not 21.5.x, which
-;; has a much better implemented UTF8 coding engine. That might
-;; however change in the foreseeable future....
-;; WARNING: at least for me in Debian testing/unstable Emacs does not
-;; ship all fonts necessary for a flawless editing of UTF8 files. For
-;; example you can chose Greek input, write Greek text, but then when
-;; you close and open the file again, the Greek symbol are not
-;; displayed but you see empty blocks. The reason seems that emacs
-;; chooses for the input fonts other fonts as for the display (don't
-;; ask me). However for installing the (ugly) UTF8 compatible fonts
-;; from ..... solved that problem.
-
-
-;;}}}
-
-;;{{{ INSTALLING EE-HELPER or MOZEX
-
-;; Installing the helper programs.
-;; =========================
-;; Helper Programs: MozEx and EE-HELPER. There are three possibilities
-;; in order to use Emacs as an external editor
-;;
-;; (1) Firefox add-on It's All Text: Recommended. The elisp
-;; library its-all-text.el makes it easier to use this.
-;;
-;; PROS: Easy to intall, supported. (You need to add Emacs
-;; client as the editor.) Can be used for editing other
-;; text fields with Emacs too.
-;;
-;; (2) EE-HELPER: This is perl script which will communicate with
-;; the wikipedia server. However that sometimes be slow.
-
-;; PROS: if the editor supports UTF8, then ee-helper will
-;; pass the coding flawlessly.
-;;
-;; CONTRA: the problem with this script is that it directly
-;; communicates with the wikipedia site and does not
-;; warn you about simultaneous editing. Use it with
-;; care!!! Moreover section editing is not implemented.
-
-;; (3) MozEx: this is a Java-script which allows to communicate
-;; Mozilla (or Firefox) directly with Emacs.
-
-;; PROS: After finishing editing you use the wikipedia
-;; software to submit your changes and not the script,
-;; so you are warned about possible conflicting editing.
-;;
-;; CONTRA: the official version does not support UTF8,
-;; however there is now a new semi official version which
-;; does support UTF8.
-
-;; Installing It's All Text
-;; ========================
-;;
-;; Go to the home page and follow the instructions there:
-;;
-;; https://addons.mozilla.org/en-US/firefox/addon/4125
-;;
-;; Then open It's All Text preferences from the Firefox Add-ons page
-;; and choose emacsclient as your editor (emacsclientw.exe on
-;; Windows).
-
-;; Installing ee-helper
-;; ====================
-;;
-;; Download the perl script from
-;;
-;; http://meta.wikimedia.org/wiki/Help:External_editors
-;;
-;; and follow the instructions. configure the .ee-ini file. chance in
-;; your personal wikipedia-mode-map account setting the editing
-;; functions: activate the `external editor' option.
-
-;; Installing MozEx
-;; ================
-;;
-;; If your web browser is Mozilla or Firefox, take a look at the MozEx
-;; extension, which allows you to call Emacs for editing text boxes:
-;;
-;; http://mozex.mozdev.org/development.html
-;;
-;; See also
-;;
-;; http://www.emacswiki.org/cgi-bin/wiki/FireFox
-;;
-;; If you mostly use MozEx to edit Wikipedia articles, it might be
-;; worthwhile to tell Emacs to enter wikipedia-mode whenever it is
-;; called by MozEx. Just add this to your `user-init-file':
-;;
-;; (add-to-list 'auto-mode-alist '("mozex.\\.*" . wikipedia-mode))
-
-;; Recall: you have to click on edit (either edit article or edit
-;; section), then use mouse3 (or shift f10), then select
-;; mozex, then edit textarea: Edit-->mouse3-->mozex-->Edit
-;; Textarea. After editing, you have to _click_ on the
-;; text in the browser otherwise Mozilla will ignore your
-;; typing.
-
-;;}}}
-
-;;{{{ NEWS
-
-
-;; NEWS
-;; ==================================
-;; (1) Font setting has changed.
-;; (2) Some makeup formats have been added: italics, bold, strong
-;; emphasise, links.
-;; (3) outline-cycle from Carsten Dominiks outline-magic has been
-;; added.
-;; (4) "Draft", "send" and "reply" (for discussion pages)
-;; abilities 'based' on ideas of John Wigleys remember.el: see
-;; the functions wikipedia-draft-*
-;; RATIONALE: This comes handy in 2 situations
-;; 1. You are editing articles which various authors (this I
-;; think is the usual case), you then want not to submit
-;; your edit immediately but want to copy it somewhere and
-;; to continue later. You can use the following functions
-;; for doing that:
-;; wikipedia-draft-buffer \C-c\C-b
-;; wikipedia-draft-region \C-c\C-r
-;; then the buffer/region will be appended to the
-;; wikipedia-draft-data-file (default is
-;; "~/Wiki/discussions/draft.wiki", which you can visit via
-;; wikipedia-draft-view-draft) and it will be
-;; surrounded by the ^L marks in order to set a page.
-;; moreover on top on that a section header == will be
-;; inserted, which consists of the Word Draft, a subject
-;; you are asked for and a date stamp.
-;;
-;; Another possibility consists in using the function
-;; wikipedia-draft, bound to \C-c \C-m then a new buffer
-;; will opened already in wikipedia mode. You edit and then
-;; either can send the content of the buffer to the
-;; wikipedia-draft-data-file in the same manner as
-;; described above using the function
-;; wikipedia-draft-buffer (bound to \C-c\C-k)
-;;
-;; BACK: In order to copy/send the content of temporary
-;; buffer or of a page in the wikipedia-draft-data-file
-;; back in to your wikipedia file, use the function
-;; `wikipedia-send-to-mozex'. You
-;; will be asked to which buffer to copy your text!
-;;
-;;
-;; 2. You want to reply in a discussion page to a specific
-;; contribution, you can use either the function
-;;
-;; \\[wikipedia-reply-at-point-simple] bound to [(meta shift r)]
-;; which inserts a newline, a hline, and the signature of
-;; the author. Or can use
-;; \\[wikipedia-draft-reply] bound [(meta r)]
-;; which does the same as wikipedia-reply-at-point-simple
-;; but in a temporary draft buffer.
-;;
-;; BACK: In order to copy/send the content of that buffer
-;; back in to your wikipedia file, use the function
-;; \\[wikipedia-send-to-mozex] bound to "\C-c\C-c". You
-;; will be asked to which buffer to copy your text! If
-;; you want a copy to be send to your draft file, use
-;; the variable wikipedia-draft-send-archive
-;;
-
-;;}}}
-
-;;{{{ NEW FUNCTIONS AND VARIABLES
-
-
-;; VERSION 0.4
-;;==================
-;; NEW FUNCTIONS
-;; ------------------
-;; wikipedia-insert-enumerate
-;; wikipedia-insert-itemize
-;; wikipedia-insert-strong-emphasis (renamed to wikipedia-insert-bold-italic)
-;; wikipedia-insert-bold
-;; wikipedia-insert-italics
-;; wikipedia-insert-header
-;; wikipedia-insert-link-wiki
-;; wikipedia-turn-on-outline-minor-mode
-;; wikipedia-insert-signature
-;; wikipedia-insert-hline
-;; wikipedia-unfill-paragraph-or-region
-;; wikipedia-start-paragraph
-;; wikipedia-hardlines
-;; wikipedia-outline-magic-keys
-;; wikipedia-enhance-indent
-;; wikipedia-yank-prefix
-;; wikipedia-simple-outline-promote
-;; wikipedia-simple-outline-demote
-;; wikipedia-next-long-line
-;; wikipedia-unfill-paragraph
-;; wikipedia-rename-buffer
-;; wikipedia-draft
-;; wikipedia-draft-buffer-desc
-;; wikipedia-draft-append-to-file
-;; wikipedia-draft-page
-;; wikipedia-draft-region (&optional beg end)
-;; wikipedia-draft-buffer
-;; wikipedia-draft-clipboard
-;; wikipedia-draft-mode
-;; wikipedia-draft-view-draft
-;; wikipedia-mark-section
-;; wikipedia-activate-region
-;; wikipedia-copy-page-to-register
-;; wikipedia-insert-page-to-register
-;; wikipedia-send-to-mozex (target-buffer)
-;; wikipedia-reply-at-point-simple
-;; wikipedia-draft-reply
-;; wikipedia-insert-quotation-with-signature
-;; wikipedia-insert-quotation
-
-;; NEW VARIABLES
-;;---------------------
-;; wikipedia-enumerate-with-terminate-paragraph
-;; wikipedia-draft-buffer "*Wikipedia-Draft*"
-;; wikipedia-draft-mode-map
-;; wikipedia-draft-mode-hook
-;; wikipedia-draft-register ?R
-;; wikipedia-draft-filter-functions
-;; wikipedia-draft-handler-functions '(wikipedia-draft-append-to-file)
-;; wikipedia-draft-data-file "~/Wiki/discussions/draft.wiki"
-;; wikipedia-draft-leader-text "== "
-;; wikipedia-draft-page ?S
-;; wikipedia-draft-send-archive
-;; wikipedia-reply-with-quote
-
-
-;; VERSION 0.5
-;;====================================
-;; NEW FUNCTIONS
-;; ------------------------------------
-;; wikipedia-insert-audio
-;; wikipedia-insert-image
-;; wikipedia-insert-link-www (renamed to wikipedia-insert-link-external)
-;; wikipedia-insert-user
-;; wikipedia-mark-signature
-;; wikipedia-outline-cycle
-;; wikipedia-reply-at-signature
-;; wikipedia-terminate-paragraph-and-indent
-;; wikipedia-yank-prefix
-
-;; NEW VARIABLES (defvar, defcustom, defconst)
-;; ----------------------
-;; wikipedia-reply-with-hline
-;; wikipedia-user-simplify-signature
-;; wikipedia-english-or-german
-;; wikipedia-draft-reply-register ?M
-;; wikipedia-mode-version
-
-;; VERSION 0.51
-;;====================================
-;;
-;; - Now requires Emacs 22 or higher.
-;; - Cleaned the code in various ways.
-;; - Removed wikipedia-english-or-german
-;; - Removed some private stuff
-;; - Simplified some key bindings.
-;; - Changed some key bindings to those used in org-mode.
-;; - Added wikipedia-lang etc
-;; - Added support for templates
-;; - Adjusted header end after inserting heading/promoting/demoting
-;; - Removed some functions that are already supported by outline.el
-;; - Changed wikipedia-mode menus
-;; - Added support for bullets and numbering
-
-;;}}}
-
-;;{{{ TODO
-
-;; Todo
-;; ----
-
-
-;; * Implement TeX highlighting in <math> environment
-;; * Implement (La)TeX input syntax, following the ideas of CDlatex.el
-;; * Make outline-cycle work correctly
-;; * wikipedia-reply-at-point-simple should use regexp!
-
-;;}}}
-
-
-
-;;; Code:
-
-(require 'org)
-
-(defconst wikipedia-mode-version (concat "0." (substring "$Revision: 1.5 $" 13 14))
- "$Id: wikipedia-mode.el,v 1.5 2006/05/30 15:16:45 oub Exp oub $
-
-Report bugs to: Uwe Brauer oub at mat.ucm.es")
-
-;;{{{ LANGS
-
-;; (defvar wikipedia-english-or-german t
-;; "*Variable in order to set the english (t) or german (nil) environment.")
-
-(require 'tutorial) ;; for lang strings
-
-(defvar wikipedia-lang "English")
-
-(defvar wikipedia-langs-added nil)
-;;(defconst xlang-strings nil)
-
-(unless wikipedia-langs-added
- (defun add-lang-strings (lang new-strings)
- (let ((lang-rec (assoc lang lang-strings)))
- (if lang-rec
- (dolist (str new-strings)
- (nconc (cdr lang-rec) (list str)))
- (setq lang-rec (cons lang new-strings))
- (add-to-list 'lang-strings lang-rec))))
-
- (add-lang-strings "English"
- '(
- (wikip-username-prompt . "Name of user: ")
- (wikip-image-mark . "[[Image:")
- (wikip-media-mark . "[[Media:")
- (wikip-utc . "(UTC)")
- (wikip-user-mark . "[[User:")
- ))
- (add-lang-strings "Deutsch"
- '(
- (wikip-username-prompt . "Name des Benutzers: ")
- (wikip-image-mark . "[[Bild:")
- (wikip-media-mark . "[[Bild:")
- (wikip-utc . "(CET)")
- (wikip-user-mark . "[[Benutzer:")
- ))
- (setq wikipedia-langs-added t))
-
-;;}}}
-
-;;{{{ TAGS
-
-(defvar wikipedia-simple-tags
- '("b" "big" "blockquote" "br" "caption" "code" "center" "cite" "del"
- "dfn" "dl" "em" "i" "ins" "kbd" "math" "nowiki" "ol" "pre" "samp"
- "small" "strike" "strong" "sub" "sup" "tt" "u" "ul" "var")
- "Tags that do not accept arguments.")
-
-(defvar wikipedia-complex-tags
- '("a" "div" "font" "table" "td" "th" "tr")
- "Tags that accept arguments.")
-
-(defvar wikipedia-url-protocols
- '("ftp" "gopher" "http" "https" "mailto" "news")
- "Valid protocols for URLs in Wikipedia articles.")
-
-;;}}}
-
-;;{{{ FACES
-
-(defvar font-wikipedia-sedate-face 'font-wikipedia-sedate-face
- "Face to use for Wikipedia minor keywords.")
-
-(defvar font-wikipedia-italic-face 'font-wikipedia-italic-face
- "Face to use for Wikipedia italics.")
-(defvar font-wikipedia-bold-face 'font-wikipedia-bold-face
- "Face to use for Wikipedia bolds.")
-(defvar font-wikipedia-math-face 'font-wikipedia-math-face
- "Face to use for Wikipedia math environments.")
-(defvar font-wikipedia-string-face 'font-wikipedia-string-face
- "Face to use for strings. This is set by Font Wikipedia.")
-(defvar font-wikipedia-verbatim-face 'font-wikipedia-verbatim-face
- "Face to use for text in verbatim macros or environments.")
-
-
-
-
-(defface font-wikipedia-bold-face
- (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit bold))
- ((assq :weight custom-face-attributes) '(:weight bold))
- (t '(:bold t)))))
- `((((class grayscale) (background light))
- (:foreground "DimGray" ,@font))
- (((class grayscale) (background dark))
- (:foreground "LightGray" ,@font))
- (((class color) (background light))
- (:foreground "DarkOliveGreen" ,@font))
- (((class color) (background dark))
- (:foreground "OliveDrab" ,@font))
- (t (,@font))))
- "Face used to highlight text to be typeset in bold."
- :group 'font-wikipedia-highlighting-faces)
-
-(defface font-wikipedia-italic-face
- (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit italic))
- ((assq :slant custom-face-attributes) '(:slant italic))
- (t '(:italic t)))))
- `((((class grayscale) (background light))
- (:foreground "DimGray" ,@font))
- (((class grayscale) (background dark))
- (:foreground "LightGray" ,@font))
- (((class color) (background light))
- (:foreground "DarkOliveGreen" ,@font))
- (((class color) (background dark))
- (:foreground "OliveDrab" ,@font))
- (t (,@font))))
- "Face used to highlight text to be typeset in italic."
- :group 'font-wikipedia-highlighting-faces)
-
-(defface font-wikipedia-math-face
- (let ((font (cond ((assq :inherit custom-face-attributes)
- '(:inherit underline))
- (t '(:underline t)))))
- `((((class grayscale) (background light))
- (:foreground "DimGray" ,@font))
- (((class grayscale) (background dark))
- (:foreground "LightGray" ,@font))
- (((class color) (background light))
- (:foreground "SaddleBrown"))
- (((class color) (background dark))
- (:foreground "burlywood"))
- (t (,@font))))
- "Face used to highlight math."
- :group 'font-wikipedia-highlighting-faces)
-
-(defface font-wikipedia-sedate-face
- '((((class grayscale) (background light)) (:foreground "DimGray"))
- (((class grayscale) (background dark)) (:foreground "LightGray"))
- (((class color) (background light)) (:foreground "DimGray"))
- (((class color) (background dark)) (:foreground "LightGray"))
-;;;(t (:underline t))
- )
- "Face used to highlight sedate stuff."
- :group 'font-wikipedia-highlighting-faces)
-
-(defface font-wikipedia-string-face
- (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit italic))
- ((assq :slant custom-face-attributes) '(:slant italic))
- (t '(:italic t)))))
- `((((type tty) (class color))
- (:foreground "green"))
- (((class grayscale) (background light))
- (:foreground "DimGray" ,@font))
- (((class grayscale) (background dark))
- (:foreground "LightGray" ,@font))
- (((class color) (background light))
- (:foreground "RosyBrown"))
- (((class color) (background dark))
- (:foreground "LightSalmon"))
- (t (,@font))))
- "Face used to highlight strings."
- :group 'font-wikipedia-highlighting-faces)
-
-(defface font-wikipedia-warning-face
- (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit bold))
- ((assq :weight custom-face-attributes) '(:weight bold))
- (t '(:bold t)))))
- `((((class grayscale)(background light))
- (:foreground "DimGray" ,@font))
- (((class grayscale)(background dark))
- (:foreground "LightGray" ,@font))
- (((class color)(background light))
- (:foreground "red" ,@font))
- (((class color)(background dark))
- (:foreground "red" ,@font))
- (t (,@font))))
- "Face for important keywords."
- :group 'font-wikipedia-highlighting-faces)
-
-(defface font-wikipedia-verbatim-face
- (let ((font (if (and (assq :inherit custom-face-attributes)
- (if (featurep 'xemacs)
- (find-face 'fixed-pitch)
- (facep 'fixed-pitch)))
- '(:inherit fixed-pitch)
- '(:family "courier"))))
- `((((class grayscale) (background light))
- (:foreground "DimGray" ,@font))
- (((class grayscale) (background dark))
- (:foreground "LightGray" ,@font))
- (((class color) (background light))
- (:foreground "SaddleBrown" ,@font))
- (((class color) (background dark))
- (:foreground "burlywood" ,@font))
- (t (,@font))))
- "Face used to highlight TeX verbatim environments."
- :group 'font-wikipedia-highlighting-faces)
-
-
-(defvar wikipedia-font-lock-keywords
- (list
-
- ;; Apostrophe-style text markup
- (cons "''''\\([^']\\|[^']'\\)*?\\(''''\\|\n\n\\)"
- 'font-lock-builtin-face)
- (cons "'''\\([^']\\|[^']'\\)*?\\('''\\|\n\n\\)"
- ; 'font-lock-builtin-face)
- 'font-wikipedia-bold-face)
- (cons "''\\([^']\\|[^']'\\)*?\\(''\\|\n\n\\)"
- 'font-wikipedia-italic-face)
-
- ;; Headers and dividers
- (list "^\\(==+\\)\\(.*\\)\\(\\1\\)"
- '(1 font-lock-builtin-face)
- ; '(2 wikipedia-header-face)
- '(2 font-wikipedia-sedate-face)
- '(3 font-lock-builtin-face))
- (cons "^-----*" 'font-lock-builtin-face)
-
- ;; Bare URLs and ISBNs
- (cons (concat "\\(^\\| \\)" (regexp-opt wikipedia-url-protocols t)
- "://[-A-Za-z0-9._\/~%+&#?!=()@]+")
- 'font-lock-variable-name-face)
- (cons "\\(^\\| \\)ISBN [-0-9A-Z]+" 'font-lock-variable-name-face)
-
- ;; Colon indentation, lists, definitions, and tables
- (cons "^\\(:+\\|[*#]+\\||[}-]?\\|{|\\)" 'font-lock-builtin-face)
-
- (list "^\\(;\\)\\([^:\n]*\\)\\(:?\\)"
- '(1 font-lock-builtin-face)
- '(2 font-lock-keyword-face)
- '(3 font-lock-builtin-face))
-
-
-
- ;; Tags and comments
-
- (list (concat "\\(</?\\)"
- (regexp-opt wikipedia-simple-tags t) "\\(>\\)")
- '(1 font-lock-builtin-face t t)
- '(2 font-lock-function-name-face t t)
- '(3 font-lock-builtin-face t t))
- (list (concat "\\(</?\\)"
- (regexp-opt wikipedia-complex-tags t)
- "\\(\\(?: \\(?:[^\"'/><]\\|\"[^\"]*\"\\|'[^']*'\\)*\\)?\\)\\(>\\)")
- '(1 font-lock-builtin-face t t)
- '(2 font-lock-function-name-face t t)
- '(3 font-lock-keyword-face t t)
- '(4 font-lock-builtin-face t t))
- (cons (concat "<!-- \\([^->]\\|>\\|-\\([^-]\\|-[^>]\\)\\)*-->")
- '(0 font-lock-comment-face t t))
-
-
-
- ;; External Links
-
- (list (concat "\\(\\[\\)\\(\\(?:"
- (regexp-opt wikipedia-url-protocols)
- "\\)://[-A-Za-z0-9._\/~%-+&#?!=()@]+\\)\\(\\(?: [^]\n]*\\)?\\)\\(\\]\\)")
- '(1 font-lock-builtin-face t t)
- '(2 font-lock-variable-name-face t t)
- '(3 font-lock-keyword-face t t)
- '(4 font-lock-builtin-face t t))
-
-
-
-
- ;; Wiki links
- '("\\(\\[\\[\\)\\([^]\n|]*\\)\\(|?\\)\\([^]\n]*\\)\\(\\]\\]\\)"
- (1 font-lock-builtin-face t t)
- (2 font-lock-variable-name-face t t)
- (3 font-lock-builtin-face t t)
- (4 font-lock-keyword-face t t)
- (5 font-lock-builtin-face t t))
-
- ;; Wiki variables
- '("\\({{\\)\\(.+?\\)\\(}}\\)"
- (1 font-lock-builtin-face t t)
- (2 font-lock-variable-name-face t t)
- (3 font-lock-builtin-face t t))
-
- ;; Character entity references
- (cons "&#?[a-zA-Z0-9]+;" '(0 font-lock-type-face t t))
-
- ;; Preformatted text
- (cons "^ .*$" '(0 font-lock-constant-face t t))
-
- ;; Math environment (uniform highlight only, no TeX markup)
- (list "<math>\\(\\(\n?.\\)*\\)</math>"
- '(1 font-lock-keyword-face t t))))
-
- ; )
-
-;;}}}
-
-;;{{{ Menu and header stuff
-
-(defvar wikipedia-imenu-generic-expression
- ;;(list '(nil "^==+ *\\(.*[^\n=]\\)==+" 1))
- (list '(nil "^=+ *\\(.*[^\n=]\\)=+" 1))
- "Imenu expression for `wikipedia-mode'. See `imenu-generic-expression'.")
-
-;; (defun wikipedia-next-header ()
-;; "Move point to the end of the next section header."
-;; (interactive)
-;; (let ((oldpoint (point)))
-;; (end-of-line)
-;; (if (re-search-forward "\\(^==+\\).*\\1" (point-max) t)
-;; (beginning-of-line)
-;; (goto-char oldpoint)
-;; (message "No section headers after point."))))
-
-;; (defun wikipedia-prev-header ()
-;; "Move point to the start of the previous section header."
-;; (interactive)
-;; (unless (re-search-backward "\\(^==+\\).*\\1" (point-min) t)
-;; (message "No section headers before point.")))
-
-;;}}}
-
-;;{{{ Paragraph terminate and filling stuff (Chong)
-
-(defun wikipedia-terminate-paragraph () ;Version:1.58
- "New list item or paragraph.
-In a list, start a new list item. In a paragraph, start a new
-paragraph.
-
-If the current paragraph is colon indented, the new paragraph
-will be indented in the same way."
- (interactive)
- (let (indent-chars)
- (save-excursion
- (beginning-of-line)
- (while (cond ((looking-at "^$") nil)
- ((looking-at "^\\(\\(?: \\|:+\\|[#*]+\\) *\\)")
- (setq indent-chars (match-string 1)) nil)
- ((eq (point) (point-min)) nil)
- ((progn (forward-line -1) t)))
- t))
- (newline) (if (not indent-chars) (newline)
- (insert indent-chars))))
-
-(defun wikipedia-terminate-paragraph-and-indent ()
- "New list item or paragraph, ignore *,#.
-In a list, start a new list item. In a paragraph, start a new
-paragraph but *,# will be ignored.
-
-If the current paragraph is colon ; indented, the new paragraph
-will be indented in the same way."
- (interactive)
- (let (indent-chars)
- (save-excursion
- (beginning-of-line)
- (while (cond ((looking-at "^$") nil)
- ((looking-at "^\\(\\(?: \\|:+\\) *\\)")
- (setq indent-chars (match-string 1)) nil)
- ((eq (point) (point-min)) nil)
- ((progn (forward-line -1) t)))
- t))
- (newline) (if (not indent-chars) (newline)
- (insert indent-chars))))
-
-
-(defun wikipedia-link-fill-nobreak-p ()
- "Function for `fill-nobreak-predicate'.
-When filling, don't break the line for preformatted (fixed-width)
-text or inside a Wiki link."
- (save-excursion
- (let ((pos (point)))
- (or (eq (char-after (line-beginning-position)) ? )
- (if (re-search-backward "\\[\\[" (line-beginning-position) t)
- ;; Break if the link is really really long.
- ;; You often get this with captioned images.
- (null (or (> (- pos (point)) fill-column)
- (re-search-forward "\\]\\]" pos t))))))))
-
-(defun wikipedia-fill-article ()
- "Fill the entire article."
- (interactive)
- (save-excursion
- (fill-region (point-min) (point-max))))
-
-(defun wikipedia-unfill-article ()
- "Unfill article.
-Undo filling, deleting stand-alone newlines (newlines that do not
-end paragraphs, list entries, etc.)"
- (interactive)
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward ".\\(\n\\)\\([^# *;:|!\n]\\|----\\)" nil t)
- (replace-match " " nil nil nil 1)))
- (message "Stand-alone newlines deleted"))
-
-
-(defun wikipedia-unfill-paragraph-with-newline (&optional justifyp)
- (interactive "P")
- (let ((before (point))) ;Version:1.3
- (save-excursion
- (forward-paragraph)
- (or (bolp) (newline 1))
- (let ((end (point))
- (start (progn (backward-paragraph) (point))))
- (goto-char before)
- (while (re-search-forward ".\\(\n\\)\\([^# *;:|!\n]\\|----\\)" nil t)
- (replace-match " " nil nil nil 1))))))
- ; (message "Stand-alone newlines IN PARAGRAPH deleted"))
-
-(defun wikipedia-unfill-region ()
- "Unfill region.
-Undo filling, deleting stand-alone newlines (newlines that do not
-end paragraphs, list entries, etc.) see also the function
-\\[wikipedia-unfill-paragraph-or-region] and the even simpler
-function \\[wikipedia-unfill-paragraph-simple]."
- (interactive)
- (save-excursion
- (narrow-to-region (point) (mark))
- (goto-char (point-min))
- (while (re-search-forward ".\\(\n\\)\\([^# *;:|!\n]\\|----\\)" nil t)
- (replace-match " " nil nil nil 1)))
- (message "Stand-alone newlines deleted")
- (widen))
-
-;;}}}
-
-;;{{{ Main function wikipedia mode (using define-derived mode)
-
-;;{{{ KEY SETTING
-;; (defvar wikipedia-outline-map
-;; (let ((map (make-sparse-keymap)))
-;; (define-key map [(down)] 'outline-next-visible-heading)
-;; (define-key map [(up)] 'outline-previous-visible-heading)
-;; (define-key map "n" 'outline-next-visible-heading)
-;; (define-key map "p" 'outline-previous-visible-heading)
-;; (define-key map "f" 'outline-forward-same-level)
-;; (define-key map "b" 'outline-backward-same-level)
-;; (define-key map "u" 'outline-up-heading)
-;; (define-key map "/" 'org-occur)
-;; (define-key map "\C-c\C-n" 'outline-next-visible-heading)
-;; (define-key map "\C-c\C-p" 'outline-previous-visible-heading)
-;; (define-key map "\C-c\C-f" 'outline-forward-same-level)
-;; (define-key map "\C-c\C-b" 'outline-backward-same-level)
-;; (define-key map "\C-c\C-u" 'outline-up-heading)
-;; map))
-
-
-(defvar wikipedia-mode-map
- (let ((map (make-sparse-keymap)))
- ;;(define-key map "\M-n" 'wikipedia-next-header)
- (define-key map "\C-c\C-n" 'wikipedia-next-long-line)
- ;; (define-key map "\M-p" 'wikipedia-prev-header)
- ;; (define-key map [(meta down)] 'wikipedia-next-header)
- ;; (define-key map [(meta up)] 'wikipedia-prev-header)
- (define-key map "\C-j" 'wikipedia-terminate-paragraph)
- ;;(define-key map "RET" 'wikipedia-newline)
- (define-key map [(shift return)] 'wikipedia-newline)
-
- ;;(define-key mm [separator-format] '("--"))
-;; (define-key mm [outline]
-;; '("Toggle Outline Mode..." . outline-minor-mode))
- ;;(define-key mm [separator-edit-structure] '("--"))
-
-
- ;; Use some mnemonic
- ;;(define-key map "\C-c\C-q" 'wikipedia-unfill-article)
- (define-key map "\C-c\M-qua" 'wikipedia-unfill-article)
- ;;(define-key map "\C-c\M-q" 'wikipedia-fill-article)
- (define-key map "\C-c\M-qfa" 'wikipedia-fill-article)
- ;;(define-key map "\M-u" 'wikipedia-unfill-paragraph-or-region)
- (define-key map "\C-c\M-qur" 'wikipedia-unfill-paragraph-or-region)
- ;;(define-key map "\C-c\C-u" 'wikipedia-unfill-paragraph-simple)
- (define-key map "\C-c\M-qup" 'wikipedia-unfill-paragraph-simple)
-
- (define-key map "\C-c\C-fs" 'wikipedia-insert-bold-italic)
- (define-key map "\C-c\C-fb" 'wikipedia-insert-bold) ;Version:1.3
- (define-key map "\C-c\C-fi" 'wikipedia-insert-italics)
- (define-key map "\C-c\C-fn" 'wikipedia-insert-nowiki)
-
- (define-key map "\C-c\C-ts" 'wikipedia-insert-signature)
- (define-key map "\C-c\C-tt" 'wikipedia-insert-template)
- (define-key map "\C-c\C-tu" 'wikipedia-insert-user)
- ;;(define-key map "\C-c\C-fq" 'wikipedia-insert-quotation)
- ;;(define-key map "\C-c\C-fh" 'wikipedia-insert-header)
- (define-key map "\C-c\C-fr" 'wikipedia-insert-hline) ;Version:1.30
- (define-key map "\C-c\C-li" 'wikipedia-insert-link-wiki)
- (define-key map "\C-c\C-le" 'wikipedia-insert-link-external)
-
- ;; Breaks key binding conventions:
- ;;(define-key map [(meta f7)] 'wikipedia-draft)
- ;;(define-key map [(meta f8)] 'wikipedia-reply-at-point-simple)
- ;;(define-key map [(meta f9)] 'wikipedia-draft-view-draft)
-
- (define-key map "\C-c\C-r" 'wikipedia-reply-at-point-simple)
-
- ;; Breaks key binding conventions:
- ;;(define-key map "\C-cr" 'wikipedia-draft-region)
-
- (define-key map [(meta r)] 'wikipedia-draft-reply)
- (define-key map "\C-c\C-m" 'wikipedia-draft) ;Version:1.25
- (define-key map "\C-c\C-b" 'wikipedia-draft-region)
- (define-key map "\C-c\C-d" 'wikipedia-draft-buffer)
- (define-key map "\C-c\C-k" 'wikipedia-draft-buffer)
- (define-key map "\C-c\C-p" 'wikipedia-draft-copy-page-to-register) ;Version:1.39
- ;; (define-key map "\C-c\C-c" 'wikipedia-draft-send-to-mozex)
- (define-key map "\C-c\C-s" 'wikipedia-draft-yank-page-to-register)
-
- (define-key map [(control meta prior)] 'wikipedia-enhance-indent)
- (define-key map [(control meta next)] 'wikipedia-yank-prefix)
- (define-key map [(meta return)] 'wikipedia-insert-enumerate)
- (define-key map [(meta control return)] 'wikipedia-insert-enumerate-nonewline)
- ;; private setting
- ;; This is bound to C-j by default:
- ;;(define-key map [(shift return)] 'newline-and-indent) ;Version:1.24
- (define-key map "\C-\\" 'wikipedia-insert-itemize) ;Version:1.28
- (define-key map [(control return)] 'wikipedia-insert-itemize)
-
- ;; The next three breaks Emacs key binding conventions, are they really necessary?
- ;;(define-key map "\C-ca" 'auto-capitalize-mode)
- ;;(define-key map "\C-ci" 'set-input-method)
- ;;(define-key map "\C-ct" 'toggle-input-method) ;Version:1.23
-
- (define-key map [(shift tab)] 'org-shifttab)
- (define-key map [backtab] 'org-shifttab)
- (define-key map [tab] 'org-cycle)
-
- map))
-
-(defvar wikipedia-org-menu nil)
-;; From org.el:
-(easy-menu-define wikipedia-org-menu wikipedia-mode-map "Wikipedia menu"
- '("Wikipedia"
- ("Show/Hide"
- ["Cycle Visibility" org-cycle (or (bobp) (outline-on-heading-p))]
- ["Cycle Global Visibility" org-shifttab]
- ["Sparse Tree" org-occur t]
- ["Reveal Context" org-reveal t]
- ["Show All" show-all t]
- "--"
- ["Subtree to indirect buffer" org-tree-to-indirect-buffer t])
- "--"
- ["New Heading" outline-insert-heading t]
- ("Navigate Headings"
- ["Up" outline-up-heading t]
- ["Next" outline-next-visible-heading t]
- ["Previous" outline-previous-visible-heading t]
- ["Next Same Level" outline-forward-same-level t]
- ["Previous Same Level" outline-backward-same-level t]
- "--"
- ["Jump" org-goto t])
- ("Edit Structure"
- ["Move Subtree Up" outline-move-subtree-up]
- ["Move Subtree Down" outline-move-subtree-down]
- "--"
- ["Copy Subtree" org-copy-special]
- ["Cut Subtree" org-cut-special]
- ["Paste Subtree" org-paste-special]
- "--"
- ["Promote Heading" wikipedia-simple-outline-promote]
- ["Promote Subtree" outline-promote]
- ["Demote Heading" wikipedia-simple-outline-demote]
- ["Demote Subtree" outline-demote])
- ("Filling"
- ["Unfill article" wikipedia-unfill-article]
- ["Fill article" wikipedia-fill-article])
- "--"
- ("Format"
- ["Horizontal line" wikipedia-insert-hline]
- "--"
- ["Indent Paragraph" wikipedia-indent-paragraph]
- ["Deindent Paragraph" wikipedia-deindent-paragraph]
- "--"
- ["Insert No Wiki Formatting" wikipedia-insert-nowiki]
- ["Bold-Italic" wikipedia-insert-bold-italic]
- ["Italic" wikipedia-insert-italics]
- ["Bold" wikipedia-insert-bold]
- "--"
- ("Insert"
- ("Templates"
- ["Site Specific Template" wikipedia-insert-template]
- ["Signature" wikipedia-insert-signature]
- )
- ("Links"
- ["External Link" wikipedia-insert-link-external]
- ["Internal Wiki Link" wikipedia-insert-link-wiki]
- )
- ("Bullets and numbering"
- ["Bullet" wikipedia-insert-bullet]
- ["Numbering" wikipedia-insert-numbering]
- )
- ))
- ))
-;;}}}
-
-
-;;;###autoload
-;;{{{ Main function wikipedia-mode
-
-(define-derived-mode wikipedia-mode outline-mode "Wikipedia"
- "Major mode for editing wikimedia style wikis.
-Major mode for editing articles written in the markup language
-used by Wikipedia, the free on-line
-encyclopedia (see URL `http://www.wikipedia.org').
-
-There are several ways to use wikipedia-mode:
-
-- You can simply cut and paste articles between Emacs and your
- web browser's text box.
-- If you are using Firefox you can use the It's All Text add-on
- for Firefox.
-- You can use MozEx, a Mozilla/Firefox web browser extension that
- allows you to call Emacs from a text
- box (see URL `http://mozex.mozdev.org/').
-- Another way is to use the PERL script ee-helper, which allows
- you to up and download wiki texts.
-
-Wikipedia articles are usually unfilled: newline characters are not
-used for breaking paragraphs into lines. Unfortunately, Emacs does not
-handle word wrapping yet. As a workaround, wikipedia-mode turns on
-longlines-mode automatically. In case something goes wrong, the
-following commands may come in handy:
-
-\\[wikipedia-fill-article] fills the buffer.
-\\[wikipedia-unfill-article] unfills the buffer.
-Be warned that function can be dead slow, better use wikipedia-unfill-paragraph-or-region.
-\\[wikipedia-unfill-paragraph-or-region] unfills the paragraph
-\\[wikipedia-unfill-paragraph-simple] doehe same but simpler.
-
-
-
-The following commands put in markup structures.
-
-\\[wikipedia-insert-bold-italic] bold+italic
-\\[wikipedia-insert-bold] bold text
-\\[wikipedia-insert-italics] italics
-\\[wikipedia-insert-nowiki] no wiki markup
-\\[wikipedia-insert-link-wiki] inserts a link
-
-The following commands are also defined:
-\\[wikipedia-insert-user] inserts user name
-\\[wikipedia-insert-signature] inserts ~~~~
-\\[wikipedia-insert-enumerate] inserts enumerate type structures
-\\[wikipedia-insert-itemize] inserts itemize type structures
-\\[wikipedia-insert-hline] inserts a hline
-
-The draft functionality
-\\[wikipedia-draft]
-\\[wikipedia-draft-region]
-\\[wikipedia-draft-view-draft]
-\\[wikipedia-draft-page]
-\\[wikipedia-draft-buffer]
-
-Replying and sending functionality
-\\[wikipedia-reply-at-point-simple]
-\\[wikipedia-draft-reply]
-
-
-The register functionality
-\\[wikipedia-copy-page-to-register]
-\\[defun wikipedia-insert-page-to-register]
-
-
-Some simple editing commands.
-\\[wikipedia-enhance-indent]
-\\[wikipedia-yank-prefix]
-\\[wikipedia-unfill-paragraph-or-region]
-
-
-
-\\[wikipedia-terminate-paragraph] starts a new list item or paragraph in a context-aware manner."
-
- (set (make-local-variable 'adaptive-fill-regexp) "[ ]*")
- (set (make-local-variable 'comment-start-skip) "\\(?:<!\\)?-- *")
- (set (make-local-variable 'comment-end-skip) " *--\\([ \n]*>\\)?")
- (set (make-local-variable 'comment-start) "<!-- ")
- (set (make-local-variable 'comment-end) " -->")
- (set (make-local-variable 'paragraph-start)
- "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$")
- (set (make-local-variable 'sentence-end-double-space) nil)
- (set (make-local-variable 'font-lock-multiline) t)
- (set (make-local-variable 'font-lock-defaults)
- '(wikipedia-font-lock-keywords t nil nil nil))
- (set (make-local-variable 'fill-nobreak-predicate)
- 'wikipedia-link-fill-nobreak-p)
- (set (make-local-variable 'auto-fill-inhibit-regexp) "^[ *#:|;]")
-
- ;; Support for outline-minor-mode. No key conflicts, so we'll use
- ;; the normal outline-mode prefix.
- ;;(set (make-local-variable 'outline-regexp) "==+")
- (set (make-local-variable 'outline-regexp) "=+")
- ;;(set (make-local-variable 'outline-heading-end-regexp) "=+") ;; For betting fixing
- ;; (set (make-local-variable 'outline-regexp) "=+")
- ;; (set (make-local-variable 'outline-regexp) ":")
-
- ;; Fix-me: Why change this?? Should not the user do this globally instead?
- ;;(set (make-local-variable 'outline-minor-mode-prefix) "\C-c\C-o")
-
- ;; Fix-mde For longlines-mode??:
- (set (make-local-variable 'auto-fill-inhibit-regexp) "^[ *#:|;]")
-
- ;: From org.el:
- ;; Get rid of Outline menus, they are not needed
- ;; Need to do this here because define-derived-mode sets up
- ;; the keymap so late. Still, it is a waste to call this each time
- ;; we switch another buffer into org-mode.
- (if (featurep 'xemacs)
- (when (boundp 'outline-mode-menu-heading)
- ;; Assume this is Greg's port, it used easymenu
- (easy-menu-remove outline-mode-menu-heading)
- (easy-menu-remove outline-mode-menu-show)
- (easy-menu-remove outline-mode-menu-hide))
- (define-key wikipedia-mode-map [menu-bar headings] 'undefined)
- (define-key wikipedia-mode-map [menu-bar hide] 'undefined)
- (define-key wikipedia-mode-map [menu-bar show] 'undefined))
-
- (easy-menu-add wikipedia-org-menu)
-
- ;; Turn on the Imenu automatically.
-;; (when menu-bar-mode
-;; (set (make-local-variable 'imenu-generic-expression)
-;; wikipedia-imenu-generic-expression)
-;; (imenu-add-to-menubar "TOC"))
-
- (modify-syntax-entry ?< "(>" wikipedia-mode-syntax-table)
- (modify-syntax-entry ?> ")<" wikipedia-mode-syntax-table)
-
- ;;}}}
-
- ;;; This is the wrong way to do it, see add-hook:
- ;; (make-local-variable 'change-major-mode-hook)
-
- ;; Check if our version of outline.el has the new header hooks:
- (require 'outline)
- (when (boundp 'outline-demote-hook)
- (add-hook 'outline-demote-hook 'wikipedia-outline-insert-heading-f nil t)
- (add-hook 'outline-promote-hook 'wikipedia-outline-insert-heading-f nil t)
- (add-hook 'outline-insert-heading-hook 'wikipedia-outline-insert-heading-f nil t)
- )
- )
-
-(defun wikipedia-outline-insert-heading-f ()
- (insert " ")
- (backward-char)
- (wikipedia-adjust-header-end))
-
-;; wikipedia-mode ends here
-;;}}}
-
-;;{{{ longlines-mode
-
-(defun wikipedia-turn-on-longlines () ;Version:1.58
- "Turn on longlines-mode if it is defined."
- (if (functionp 'longlines-mode)
- (longlines-mode 1)))
-
-(defcustom wikipedia-use-longlines-mode nil
- "Turn on longlines-mode' if non-nil.
-Unfortunately there are some bugs in `longlines-mode' so turning
-it on is an option currently."
- :type 'boolean
- :set (lambda (sym val)
- (set-default sym val)
- (if val
- (add-hook 'wikipedia-mode-hook 'wikipedia-turn-on-longlines)
- (remove-hook 'wikipedia-mode-hook 'wikipedia-turn-on-longlines)))
- :group 'wikipedia)
-
-;;}}}
-
-;; New formating stuff for inserting simple formating structures such
-
-;;{{{ Insert makeup and templates
-
-(defvar wikipedia-enumerate-with-terminate-paragraph nil
- "*Before insert enumerate/itemize do \\[wikipedia-terminate-paragraph].")
-
-(defun wikipedia-region-active-p ()
- (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
- (and (boundp 'transient-mark-mode) transient-mark-mode mark-active)))
-
-(defun wikipedia-insert-around-region (before after)
- (if (wikipedia-region-active-p)
- (save-excursion
- (let ((beginning (region-beginning))
- (end (region-end))
- (check (= (string-to-char before) ?')))
- ;; When we are inserting ' do not mix them:
- (if (or (not check)
- (not (memq ?'
- (append (buffer-substring-no-properties
- beginning end) nil))))
- (progn
- (goto-char end)
- (insert after)
- (goto-char beginning)
- (insert before))
- (message "Sorry, the region already contains the char '.")
- )))
- (insert before)
- (insert after)
- (backward-char (length after))))
-
-(defun wikipedia-insert-enumerate ()
- "Insert enumerated items.
-Format depends on `wikipedia-enumerate-with-terminate-paragraph'.
-Note however that `wikipedia-terminate-paragraph' does not work
-very well will longlines-mode."
- (interactive)
- (if wikipedia-enumerate-with-terminate-paragraph
- (progn
- (wikipedia-terminate-paragraph)
- (insert "#"))
- (newline nil)
- (insert ":#")))
-
-
-
-
-
-(defun wikipedia-insert-itemize ()
- "Insert not enumerated items.
-Format depends on `wikipedia-enumerate-with-terminate-paragraph'.
-Note however that the `wikipedia-terminate-paragraph' does not
-work very well will longlines-mode."
- (interactive)
- (if wikipedia-enumerate-with-terminate-paragraph
- (progn
- (wikipedia-terminate-paragraph)
- (insert "*"))
- (newline nil)
- (insert ":*")))
-
-
-(defun wikipedia-insert-bold-italic ()
- "Insert strong emphasis.
-Uses four apostrophes (e.g. ''''FOO''''.) When mark is active, surrounds region."
- (interactive)
- (wikipedia-insert-around-region "''''" "''''"))
-
-
-(defun wikipedia-insert-bold ()
- "Insert bold.
-Uses three apostrophes (e.g. '''FOO'''.) When mark is active,
-surrounds region."
- (interactive)
- (wikipedia-insert-around-region "'''" "'''"))
-
-
-(defun wikipedia-insert-italics ()
- "Insert italics.
-Uses two apostrophes (e.g. ''FOO''.) When mark is active,
-surrounds region."
- (interactive)
- (wikipedia-insert-around-region "''" "''"))
-
-(defun wikipedia-indent-paragraph ()
- (interactive)
- (backward-paragraph)
- )
-(defun wikipedia-deindent-paragraph ()
- (interactive)
- )
-;;}}}
-;;{{{ Templates
-
-;; http://en.wikipedia.org/wiki/Template:Quotation
-;; http://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates
-(defvar wikipedia-site nil)
-(make-variable-buffer-local 'wikipedia-site)
-(defvar wikipedia-site-history nil)
-
-(defcustom wikipedia-templates nil
- "Templates for different wikis."
- :type '(repeat (list
- (string :tag "Wiki site")
- (repeat
- (list
- (string :tag "Template name")
- (string :tag "Template code")))))
- :group 'wikipedia)
-
-(defun wikipedia-insert-template ()
- "Prompts for a template and inserts it."
- (interactive)
- (let* ((t-name-code (wikipedia-get-template))
- (t-name (car t-name-code))
- ;; Ask how to insert:
- (choices '("Evaluate when page is created"
- "Substitute when saving this source page"
- "Show template when page is fetched"
- "Insert template itself"))
- (hist (copy-sequence choices))
- (default (car choices))
- (choice (completing-read
- "How do you want to insert the template? "
- choices
- nil
- t
- default
- (cons 'hist 1))))
-;; (lwarn 't :warning "t-name=%s" t-name)
-;; (lwarn 't :warning "choice=%s" choice)
-;; (lwarn 't :warning "0=%s" (nth 0 choices))
-;; (lwarn 't :warning "1=%s" (nth 1 choices))
-;; (lwarn 't :warning "2=%s" (nth 2 choices))
- (cond
- ((string= choice (nth 0 choices))
- ;;(lwarn 't :warning "evaluate=>%s" (concat "{{" t-name "}}"))
- (insert "{{" t-name "}}")
- )
- ((string= choice (nth 1 choices))
- ;;(lwarn 't :warning "subst=>%s" (concat "{{subst:" t-name "}}"))
- (insert "{{subst:" t-name "}}")
- )
- ((string= choice (nth 2 choices))
- ;;(lwarn 't :warning "raw=>%s" (concat "{{msgnw:" t-name "}}"))
- (insert "{{msgnw:" t-name "}}")
- )
- ((string= choice (nth 3 choices))
- (insert (cdr t-name-code))
- ))))
-
-(defun wikipedia-get-template ()
- (let* ((sites (mapcar (lambda (t-sites)
- (car t-sites))
- wikipedia-templates))
- (hist (copy-sequence sites))
- (default-site wikipedia-site)
- (histpos (if (not default-site)
- 1
- (catch 'pos
- (let ((n 0))
- (dolist (elt sites)
- (setq n (1+ n))
- (when (string= default-site elt)
- (throw 'pos n)))))))
- (site (if (= 1 (length sites))
- (car sites)
- (completing-read "Wiki site: "
- sites
- nil
- t
- default-site
- (cons 'hist histpos))))
- (s-t (assoc site wikipedia-templates))
- (templates (car (cdr s-t)))
- (t-names (mapcar (lambda (t-for-site)
- ;;(lwarn 't :warning "t-for-site=%s" t-for-site)
- (car t-for-site))
- templates))
- (t-name (wikipedia-get-template-name site templates))
- (code (car (cdr (assoc t-name templates))))
- )
- (setq wikipedia-site site)
-;; (lwarn 't :warning "site=%s" site)
-;; (lwarn 't :warning "s-t=%s" s-t)
-;; (lwarn 't :warning "templates=%s" templates)
-;; (lwarn 't :warning "t-names=%s" t-names)
-;; (lwarn 't :warning "t-name=%s" t-name)
-;; (lwarn 't :warning "code=%s" code)
- (cons t-name code)))
-
-(defun wikipedia-get-template-name (site templates)
- ""
- (let* ((prompt "Template: ")
- (minibuffer-local-must-match-map (copy-keymap minibuffer-local-must-match-map))
- (hist (mapcar (lambda (elt)
- (car elt))
- templates))
- (desc-fun (lambda ()
- (let ((s (minibuffer-contents-no-properties)))
- (when (< 0 (length s))
- (wikipedia-describe-template s site templates)))))
- (up-fun (lambda () (interactive)
- (previous-history-element 1)
- (funcall desc-fun)))
- (down-fun (lambda () (interactive)
- (next-history-element 1)
- (funcall desc-fun)))
- (default nil)
- (histpos (if (not default) 1))
- (default-name (if default
- default
- (car (nth (1- histpos) templates))))
- (tpl-name nil)
- )
- (define-key minibuffer-local-must-match-map [up] up-fun)
- (define-key minibuffer-local-must-match-map [down] down-fun)
- (save-window-excursion
- (wikipedia-describe-template default-name site templates)
- (setq tpl-name (completing-read prompt
- templates
- nil ; predicate
- t ; require-match
- default-name ;; initial-input
- (cons 'hist histpos) ;; hist
- )))
- (when (= 0 (length tpl-name))
- (error "No template name given"))
- (let ((tpl (assoc tpl-name templates)))
- (unless tpl
- (error "There is no template named %s for site %s" tpl-name site))
- ;;(lwarn 't :warning "tpl=%s" tpl)
- )
- tpl-name))
-
-(defun wikipedia-describe-template (name site templates)
- (let ((tpl-rec (assoc name templates)))
- (with-output-to-temp-buffer (help-buffer)
- (with-current-buffer (help-buffer)
- (help-setup-xref (list #'wikipedia-describe-template name site templates) (interactive-p))
- (let ((inhibit-read-only t)
- start end
- here
- (tpl (assoc name templates)))
- ;;(insert (format "%S\n\n" family))
- (insert (format "%s - a wiki template for site %s" name site))
- (insert "\n\n")
- (setq start (point))
- (insert (cadr tpl))
- (setq end (point))
- (with-no-warnings (print-help-return-message))
- ;;(put-text-property start end 'face 'highlight)
- (goto-char start)
- (setq here (point))
- (while (re-search-forward "\\(?:<onlyinclude>\\|</onlyinclude>\\|<noinclude>.*</noinclude>\\)" end t)
- (put-text-property here (match-beginning 0) 'face 'highlight)
- (setq here (point))
- )
- (put-text-property (point) end 'face 'highlight)
- )))))
-
-(defun wikipedia-insert-nowiki ()
- "Mark the region as 'nowiki'.
-When mark is active, surrounds region."
- (interactive)
- (wikipedia-insert-around-region "<nowiki>" "</nowiki>"))
-
-
-
-(defun wikipedia-insert-user ()
- "Prompt for a user name, insert [[User:foo]]"
- (interactive)
- (let ((user (read-string (get-lang-string wikipedia-lang 'wikip-username-prompt)))
- (user-mark (get-lang-string wikipedia-lang 'wikip-user-mark)))
- (insert (concat user-mark user "|" user "]]"))))
-
-(defun wikipedia-insert-signature () ;Version:1.4
- "Insert \"~~~~\".
-This will be shown as your user identity when showing the page."
- (interactive)
- (insert "~~~~"))
-
-
-
-(defun wikipedia-insert-reply-prefix () ;Version:1.60
- "Quotation box of the form {{Quotation}}{{}}. When mark is active,
-surrounds region."
- (interactive)
- (beginning-of-line 1)
- (search-forward "[[")
- (backward-char 2)
- (mark-sexp 1)
- (copy-to-register wikipedia-draft-reply-register (region-beginning) (region-end) nil)
- (end-of-line 1)
- (wikipedia-terminate-paragraph)
- (beginning-of-line 1)
- (kill-line nil)
- (insert "----")
- (newline 1)
- (yank)
- (insert ":'''Re: ")
- (insert-register wikipedia-draft-reply-register 1)
- (insert "''' ")
- (end-of-line 1))
-
-;; (defun wikipedia-insert-header ()
-;; "Insert subheader via == (e.g. == FOO ==.)"
-;; (interactive)
-;; (unless (bolp)
-;; (beginning-of-line))
-;; (insert "== ")
-;; (end-of-line)
-;; (insert " ==")
-;; (backward-char 3))
-
-(defvar wikipedia-link-wiki-history nil)
-
-(defun wikipedia-insert-link-wiki ()
- "Insert link via [[ (e.g. [[FOO]].) When mark is active, surround region."
- (interactive)
- (if (wikipedia-region-active-p)
- (wikipedia-insert-around-region "[[" "]]")
- (let* ((link (read-string "Wiki link: " nil wikipedia-link-wiki-history))
- (name (read-string "Name (optional): ")))
- (insert "[[" link)
- (when (< 0 (length name))
- (insert "|" name))
- (insert "]]"))))
-
-(defun wikipedia-insert-link-external ()
- "Insert link via [[ (e.g. [http://FOO].) When mark is active, surround region."
- (interactive)
- (if (wikipedia-region-active-p)
- (wikipedia-insert-around-region "[" "]")
- (let* ((choices '("Plain" "Footnote" "Named"))
- (hist (copy-sequence choices))
- (style (completing-read
- "Link style: " ; prompt
- choices ; collection
- nil ; predicate
- t ; requite-match
- "Plain" ; initial-input
- (cons 'hist 1) ; hist
- ))
- (url (read-string "URL: "))
- name)
- ;;(lwarn 't :warning "style=%s" style)
- (cond
- ((string= style "Plain")
- (insert url))
- ((string= style "Footnote")
- (insert "[" url "]"))
- ((string= style "Named")
- (let ((name (read-string "Link name: ")))
- (insert "[" url)
- (when (< 0 (length name))
- (insert " " name))
- (insert "]")))
- (t
- (error "Internal error, bad style=%s" style))))))
-
-
-(defun wikipedia-insert-image ()
- "Insert link image, e.g. [[Image:FOO]].
-When mark is active, surround region."
- (interactive)
- (let ((img-mark (get-lang-string wikipedia-lang 'wikip-image-mark)))
- (wikipedia-insert-around-region img-mark "]]")))
-
-(defun wikipedia-insert-audio ()
- "Insert audio link, e.g. [[Media:FOO]].
-When mark is active, surround region."
- (interactive)
- (let ((aud-mark (get-lang-string wikipedia-lang 'wikip-audio-mark)))
- (wikipedia-insert-around-region aud-mark "]]")))
-
-
-
-
-;; (defun wikipedia-turn-on-outline-minor-mode ()
-;; "Turn on outline minor mode."
-;; ;;(interactive)
-;; (outline-minor-mode nil))
-
-
-
-
-
-
-(defun wikipedia-insert-hline () ;Version:1.29
- "Insert \"----\" "
- (interactive)
- (end-of-line)
- (insert hard-newline "----" hard-newline))
-
-(defun wikipedia-newline (&optional arg)
- "Insert newline and check for bullets and numbering."
- (interactive "*P")
- (let ((here (point))
- (line-type nil))
- (beginning-of-line)
- (when (eq ?* (char-after))
- (setq line-type 'bullet))
- (when (eq ?# (char-after))
- (setq line-type 'numbered))
- (if (and line-type
- (looking-at ".\\s-*$"))
- (progn
- (delete-region (match-beginning 0) (match-end 0))
- (newline arg))
- (goto-char here)
- (newline arg)
- (cond
- ((eq line-type 'bullet)
- (insert "* "))
- ((eq line-type 'numbered)
- (insert "# "))))))
-
-;;}}}
-
-;;{{{ bullets and numbering
-
-;; Fix-me: Seems like this and my newline stuff already was there ... ;-)
-(defun wikipedia-insert-bullet ()
- "Insert a bullet."
- (interactive)
- (end-of-line)
- (newline)
- (insert "* "))
-
-(defun wikipedia-insert-numbering ()
- "Insert numbering."
- (interactive)
- (end-of-line)
- (newline)
- (insert "# "))
-
-;;}}}
-
-;;{{{ filling and longline
-
-(defun wikipedia-unfill-paragraph-or-region () ;Version:1.7
- "Unfill region.
-This function does NOT explicitly search for \"soft newlines\" as
-does wikipedia-unfill-region."
- (interactive)
- (when use-hard-newlines
- ;; (backward-paragraph 1)
- ;; (next-line 1)
- (beginning-of-line 1)
- (set-fill-prefix)
- ;; Fix-me: The use of make-local-variable here looks incorrect,
- ;; use lexical binding instead:
-;; (set (make-local-variable 'use-hard-newlines) nil)
-;; (set (make-local-variable 'sentence-end-double-space) t)
-;; (set (make-local-variable 'paragraph-start) "[   \n ]")
- (let ((use-hard-newlines nil)
- (sentence-end-double-space t)
- (paragraph-start nil))
- (when (featurep 'xemacs)
- (let ((fill-column (point-max)))
- (fill-paragraph-or-region nil)))
- (unless (featurep 'xemacs)
- (let ((fill-column (point-max)))
- (fill-paragraph nil)))))
-;; (set (make-local-variable 'use-hard-newlines) t)
-;; (set (make-local-variable 'sentence-end-double-space) nil)
-;; (set (make-local-variable 'paragraph-start) "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$"))
- (unless use-hard-newlines
- ;; (backward-paragraph 1)
- ;; (next-line 1)
- (beginning-of-line 1)
- (set-fill-prefix)
-;; (set (make-local-variable 'sentence-end-double-space) t)
-;; (set (make-local-variable 'paragraph-start)
- (let ((sentence-end-double-space t)
- (paragraph-start nil))
- (when (featurep 'xemacs)
- (let ((fill-column (point-max)))
- (fill-paragraph-or-region nil)))
- (unless (featurep 'xemacs)
- (let ((fill-column (point-max)))
- (fill-paragraph nil))))
-;; (set (make-local-variable 'sentence-end-double-space) nil)
-;; (set (make-local-variable 'paragraph-start) "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$")
- ))
-
-
-
-
-;; (defun wikipedia-start-paragraph ()
-;; (interactive)
-;; (set (make-local-variable 'paragraph-start)
-;; "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$"))
-
-;; Use function use-hard-newlines instead:
-;; (defun wikipedia-hardlines ()
-;; "Set use-hard-newlines to NIL."
-;; (interactive)
-;; (setq use-hard-newlines nil))
-
-;; from emacs wiki
-(defun wikipedia-next-long-line ()
- "Move forward to the next long line with column-width greater
- than `fill-column'.
-
- TODO: When function reaches end of buffer, save-excursion to
- starting point.
- Generalise to make `previous-long-line'."
- (interactive)
- ;; global-variable: fill-column
- (if (= (forward-line) 0)
- (let ((line-length
- (save-excursion
- (end-of-line)
- (current-column))))
- (if (<= line-length fill-column)
- (wikipedia-next-long-line)
- (message "Long line found")))
- ;; Stop, end of buffer reached.
- (error "Long line not found")))
-
-
-(defun wikipedia-unfill-paragraph-simple ()
- "A very simple function for unfilling a paragraph."
- (interactive)
- (if (functionp 'filladapt-mode)
- (filladapt-mode nil))
- (let ((fill-column (point-max)))
- (fill-paragraph nil)
- (if (functionp 'filladapt-mode)
- (filladapt-mode nil))))
-
-;;}}}
-
-;;{{{ outline and outline-magic stuff
-
-;;(add-hook 'wikipedia-mode-hook 'wikipedia-turn-on-outline-minor-mode)
-;;(remove-hook 'wikipedia-mode-hook 'wikipedia-turn-on-outline-minor-mode)
-
-(defun wikipedia-outline-cycle ()
- (interactive)
- (if (functionp 'outline-cycle)
- (outline-cycle)))
-
-;; Fix-me: Unfortunately outline maybe does not take care of the
-;; heading endings when promoting and demoting (I have submitted a bug
-;; report for this and hooks will be added). To work around this we
-;; defadvice outline-demote/promote:
-
-(require 'outline)
-(unless (boundp 'outline-demote-hook)
-
- (defadvice outline-demote (after wikipedia-outline-demote-advice
- (&optional which))
- "Adjust heading after demote."
- (unless which
- (wikipedia-adjust-header-end)))
-
- (defadvice outline-promote (after wikipedia-outline-promote-advice
- (&optional which))
- "Adjust heading after promote."
- (unless which
- (wikipedia-adjust-header-end)))
-
- (defadvice outline-insert-heading (after wikipedia-outline-insert-heading-advice
- ())
- "Adjust heading after insert new heading."
- (wikipedia-adjust-header-end))
-
- )
-
-(defun wikipedia-adjust-header-end ()
- (when (eq major-mode 'wikipedia-mode)
- (let ((here (point))
- (end-pos (line-end-position))
- bgn-mark
- bgn-len
- end-mark
- end-len
- )
- (beginning-of-line)
- (when (looking-at outline-regexp)
- (setq bgn-mark (match-string-no-properties 0))
- (setq bgn-len (length bgn-mark))
- (end-of-line)
- (if (looking-back outline-regexp nil t)
- (when (progn
- (setq end-mark (match-string-no-properties 0))
- (setq end-len (length end-mark))
- (/= end-len bgn-len))
- (replace-match bgn-mark))
- (insert bgn-mark)))
- ;;(lwarn 't :warning "bgn-len=%s, end-len=%s" bgn-len end-len)
- (goto-char here))))
-
-
-
-;;(add-hook 'outline-minor-mode-hook 'wikipedia-outline-magic-keys)
-(add-hook 'wikipedia-mode-hook 'wikipedia-outline-magic-keys)
-
-(defun wikipedia-outline-magic-keys ()
- (interactive)
- (unless (featurep 'xemacs)
- (local-set-key [(shift iso-lefttab)] 'wikipedia-outline-cycle))
- (local-set-key [iso-left-tab] 'wikipedia-outline-cycle)
- ;;(local-set-key [(meta left)] 'outline-promote)
- (local-set-key [(meta shift left)] 'outline-promote)
- ;;(local-set-key [(meta right)] 'outline-demote)
- (local-set-key [(meta shift right)] 'outline-demote)
- ;;(local-set-key [(control left)] 'wikipedia-simple-outline-promote)
- (local-set-key [(meta left)] 'wikipedia-simple-outline-promote)
- ;;(local-set-key [(control right)] 'wikipedia-simple-outline-demote)
- (local-set-key [(meta right)] 'wikipedia-simple-outline-demote)
- (local-set-key [(shift return)] 'newline-and-indent)
- ;;(local-set-key [(control up)] 'outline-move-subtree-up)
- (local-set-key [(meta shift up)] 'outline-move-subtree-up)
- ;;(local-set-key [(control down)] 'outline-move-subtree-down))
- (local-set-key [(meta shift down)] 'outline-move-subtree-down))
-
-(defun wikipedia-enhance-indent () ;Version:1.26
- (interactive)
- (string-rectangle (region-beginning) (region-end) ":"))
-
-(defun wikipedia-yank-prefix () ;Version:1.26
- (interactive)
- (string-rectangle (region-beginning) (region-end) ":"))
-
-;; modification for outline-magic
-
-(defun wikipedia-simple-outline-promote ()
- "Function simple deletes \"=\" and the end and the beginning of line,
-does not promote the whole tree!"
- (interactive)
- (save-excursion
- (progn
- (beginning-of-line 1)
- (search-forward "=")
- (delete-char 1 nil)
- (end-of-line 1)
- (search-backward "=")
- (delete-char 1 nil))))
-
-(defun wikipedia-simple-outline-demote ()
- "Function simple adds \"=\" and the end and the beginning of line,
-does not promote the whole tree!"
- (interactive)
- (save-excursion
- (progn
- (beginning-of-line 1)
- (search-forward "=")
- (insert "=")
- (end-of-line 1)
- (search-backward "=")
- (insert "="))))
-
-
-(defun wikipedia-rename-buffer () ;Version:1.5
- "Make sure that the option UNIQUE is used."
- (interactive)
- (rename-buffer (read-string "Name of new buffer (unique): " ) 1))
-
-;;}}}
-
-;;{{{ wikipedia drafts functionality: `stolen' from remember.el:
-
-(defgroup wikipedia-draft nil
- "A mode to wikipedia-draft information."
- :group 'data)
-
-;;; User Variables:
-
-(defcustom wikipedia-draft-mode-hook nil
- "*Functions run upon entering wikipedia-draft-mode."
- :type 'hook
- :group 'wikipedia-draft)
-
-(defcustom wikipedia-draft-register ?R
- "The register in which the window configuration is stored."
- :type 'character
- :group 'wikipedia-draft)
-
-(defcustom wikipedia-draft-filter-functions nil
- "*Functions run to filter wikipedia-draft data.
-All functions are run in the wikipedia-draft buffer."
- :type 'hook
- :group 'wikipedia-draft)
-
-(defcustom wikipedia-draft-handler-functions '(wikipedia-draft-append-to-file)
- "*Functions run to process wikipedia-draft data.
-Each function is called with the current buffer narrowed to what the
-user wants wikipedia-drafted.
-If any function returns non-nil, the data is assumed to have been
-recorded somewhere by that function. "
- :type 'hook
- :group 'wikipedia-draft)
-
-(defcustom wikipedia-draft-data-file "~/Wiki/discussions/draft.wiki"
- "*The file in which to store the wikipedia drafts."
- :type 'file
- :group 'wikipedia-draft)
-
-(defcustom wikipedia-draft-reply-register ?M
- "The register in which the window configuration is stored."
- :type 'character
- :group 'wikipedia-draft)
-
-(defcustom wikipedia-draft-page ?S ;Version:1.37
- "The register in which the a page of the wiki draft file is stored."
- :type 'character
- :group 'wikipedia-draft)
-
-
-(defcustom wikipedia-draft-leader-text "== "
- "*The text used to begin each wikipedia-draft item."
- :type 'string
- :group 'wikipedia-draft)
-
-
-;;; Internal Variables:
-
-(defvar wikipedia-draft-buffer "*Wikipedia-Draft*"
- "The name of the wikipedia-draft (temporary) data entry buffer.")
-
-;;; User Functions:
-
-;;;###autoload
-(defun wikipedia-draft ()
- "Open a temporary buffer in wikipedia mode for editing an
- wikipedia draft, which an arbitrary piece of data. After
- finishing the editing either use \\[wikipedia-draft-buffer] to
- send the data into the wikipedia-draft-data-file, or send the
- buffer using `wikipedia-draft-send-to-mozex' and insert it later
- into a wikipedia article."
- (interactive)
- (window-configuration-to-register wikipedia-draft-register)
- (let ((buf (get-buffer-create wikipedia-draft-buffer)))
- (switch-to-buffer-other-window buf)
- (wikipedia-mode)
- (message " C-c C-k sends to draft file, C-c C-c sends to org buffer.")))
-
-
-
-
-
-(defsubst wikipedia-draft-time-to-seconds (time)
- "Convert TIME to a floating point number."
- (+ (* (car time) 65536.0)
- (cadr time)
- (/ (or (car (cdr (cdr time))) 0) 1000000.0)))
-
-(defsubst wikipedia-draft-mail-date (&optional rfc822-p)
- "Return a simple date. Nothing fancy."
- (if rfc822-p
- (format-time-string "%a, %e %b %Y %T %z" (current-time))
- (format-time-string "%c" (current-time))))
-
-(defun wikipedia-draft-buffer-desc ()
- "Using the first line of the current buffer, create a short description."
- (buffer-substring (point-min)
- (save-excursion
- (goto-char (point-min))
- (end-of-line)
- (if (> (- (point) (point-min)) 60)
- (goto-char (+ (point-min) 60)))
- (point))))
-
-
-;; Wikipedia-Drafting to plain files:
-
-
-(defun wikipedia-draft-append-to-file ()
- "Add a header together with a subject to the text and add it to the
-draft file. It might be better if longlines-mode is off."
- (let ((text (buffer-string))
- (desc (wikipedia-draft-buffer-desc)))
- (with-temp-buffer
- (insert "\n\n")
- (insert wikipedia-draft-leader-text)
- (insert "Draft: ") ;Version:1.39
- (insert (read-string "Enter Subject: "))
- (insert " ")
- (insert (current-time-string))
- (insert " ")
- (insert wikipedia-draft-leader-text)
- (insert "\n\n") ;Version:1.27
- (insert " ")
- (insert "\n\n")
- (insert text)
- (insert "\n")
- (insert " ")
- (insert "\n")
- (if (not (bolp))
- (insert "\n\n"))
- (if (find-buffer-visiting wikipedia-draft-data-file)
- (let ((wikipedia-draft-text (buffer-string)))
- (set-buffer (get-file-buffer wikipedia-draft-data-file))
- (save-excursion
- (goto-char (point-max))
- (insert "\n")
- (insert wikipedia-draft-text)
- (insert "\n")
- (save-buffer)))
- (append-to-file (point-min) (point-max) wikipedia-draft-data-file)))))
-
-
-(setq wikipedia-draft-handler-functions 'wikipedia-draft-append-to-file)
-
-
-(custom-add-option 'wikipedia-draft-handler-functions 'wikipedia-draft-append-to-file)
-
-;;;###autoload
-(defun wikipedia-draft-page () ;Version:1.32
- (interactive)
- (mark-page)
- (copy-region-as-kill (region-beginning) (region-end))
- (wikipedia-draft)
- (yank nil))
-
-
-(defun wikipedia-draft-region (&optional beg end)
- "Wikipedia-Draft the data from BEG to END.
-If called from within the wikipedia-draft buffer, BEG and END are ignored,
-and the entire buffer will be wikipedia-drafted. If called from any other
-buffer, that region, plus any context information specific to that
-region, will be wikipedia-drafted."
- (interactive)
- (let ((b (or beg (min (point) (or (mark) (point-min)))))
- (e (or end (max (point) (or (mark) (point-max))))))
- (save-restriction
- (narrow-to-region b e)
- (run-hook-with-args-until-success 'wikipedia-draft-handler-functions)
- (when (equal wikipedia-draft-buffer (buffer-name))
- (kill-buffer (current-buffer))
- (jump-to-register wikipedia-draft-register)))))
-
-;;
-;;;###autoload
-(defun wikipedia-draft-buffer ()
- "Wikipedia-draft-buffer sends the contents of the current (temporary)
-buffer to the wikipedia-draft-buffer, see the variable
-wikipedia-draft-data-file."
- (interactive)
- (wikipedia-draft-region (point-min) (point-max)))
-
-(defun wikipedia-draft-clipboard ()
- "Wikipedia-Draft the contents of the current clipboard.
-Most useful for wikipedia-drafting things from Netscape or other X Windows
-application."
- (interactive)
- (with-temp-buffer
- (insert (x-get-clipboard))
- (run-hook-with-args-until-success 'wikipedia-draft-handler-functions)))
-
-;;;###autoload
-
-
-;;; Internal Functions:
-(defvar wikipedia-draft-send-archive t ;Version:1.56
- "*Archive the reply.")
-
-(defvar wikipedia-draft-mode-map
- (let ((m (make-sparse-keymap)))
- (define-key m "\C-c\C-k" 'wikipedia-draft-buffer)
- (define-key m "\C-c\C-d" 'wikipedia-draft-buffer)
- m))
-
-(defun wikipedia-draft-mode ()
- "Major mode for output from \\[wikipedia-draft].
-\\<wikipedia-draft-mode-map> This buffer is used to collect data that
-you want wikipedia-draft. Just hit \\[wikipedia-draft-region] when
-you're done entering, and it will go ahead and file the data for
-latter retrieval, and possible indexing.
-\\{wikipedia-draft-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (indented-text-mode)
- (use-local-map wikipedia-draft-mode-map)
- (setq major-mode 'wikipedia-draft-mode
- mode-name "Wikipedia-Draft")
- (run-hooks 'wikipedia-draft-mode-hook))
-
-
-(defun wikipedia-draft-view-draft ()
- (interactive)
- "Simple shortcut to visit the file, which contains the wikipedia drafts."
- (find-file wikipedia-draft-data-file))
-
-;;}}}
-
-;;{{{ functions for marking regions
-
-(defun wikipedia-mark-section () ;Version:1.36
- "Set mark at end of current logical section, and point at top."
- (interactive)
- (re-search-forward (concat "== " "[a-z,A-z \t]*"
- " =="))
- (re-search-backward "^")
- (set-mark (point))
- (re-search-backward (concat "== " "[a-z,A-z \t]*"
- " "))
- (wikipedia-activate-region))
-
-(defun wikipedia-mark-signature () ;Version:1.36
- "Set mark at end of current logical section, and point at top."
- (interactive)
- (re-search-forward "]]") ;;[[ ]]
- (re-search-backward "^")
- (set-mark (point))
- (re-search-backward "[[")
- (wikipedia-activate-region))
-
-(when (featurep 'xemacs)
- (fset 'wikipedia-activate-region (symbol-function 'zmacs-activate-region)))
-
-(unless (featurep 'xemacs)
- (defun wikipedia-activate-region ()
- nil))
-
-;;}}}
-
-;;{{{ `reply' and `send' functions
-
-(defun wikipedia-draft-copy-page-to-register () ;Version:1.47
- "Copy a page via the wikipedia-draft-register."
- (interactive)
- (save-excursion
- (narrow-to-page nil)
- (copy-to-register wikipedia-draft-page (point-min) (point-max) nil)
- (message "draft page copied to wikipedia register wikipedia-draft-page.")
- (widen)))
-
- ;aux function
-(defun wikipedia-draft-yank-page-to-register () ;Version:1.50
- "Insert a page via the wikipedia-draft-register."
- (interactive)
- (insert-register wikipedia-draft-page nil))
-
-
-
-(defun wikipedia-draft-send-to-mozex (target-buffer) ;Version:1.56
- "Copy the current page from the wikipedia draft file to
- TARGET-BUFFER, this buffer is named something like mozex.textarea.
-Check the variable wikipedia-draft-send-archive. If it is t, then
-additionally the text will be archived in the draft.wiki file. Check
-longlines-mode, it might be better if it is set off."
- (interactive "bTarget buffer: ")
- (let ((src-buf (current-buffer)))
- (wikipedia-draft-copy-page-to-register)
- (switch-to-buffer target-buffer)
- (end-of-line 1)
- (newline 1)
- (wikipedia-draft-yank-page-to-register)
- (message "The page has been sent (copied) to the mozex file!")
- (switch-to-buffer "*Wikipedia-Draft*")
- (when wikipedia-draft-send-archive ;Version:1.56
- (let ((text (buffer-string)) ;Version:1.59
- (desc (wikipedia-draft-buffer-desc)))
- (with-temp-buffer
- (insert "\n\n")
- (insert wikipedia-draft-leader-text)
- (insert-register wikipedia-draft-reply-register 1)
- (insert " ")
- (insert (current-time-string))
- (insert " ")
- (insert wikipedia-draft-leader-text)
- (insert "\n\n")
- (insert " ")
- (insert "\n\n")
- (insert text)
- (insert "\n")
- (insert " ")
- (insert "\n")
- (if (not (bolp))
- (insert "\n\n"))
- (if (find-buffer-visiting wikipedia-draft-data-file)
- (let ((wikipedia-draft-text (buffer-string)))
- (set-buffer (get-file-buffer wikipedia-draft-data-file))
- (save-excursion
- (goto-char (point-max))
- (insert "\n")
- (insert wikipedia-draft-text)
- (insert "\n")
- (save-buffer)))
- (append-to-file (point-min) (point-max) wikipedia-draft-data-file)))))
- (when (equal wikipedia-draft-buffer (buffer-name))
- (kill-buffer (current-buffer)))
- (switch-to-buffer target-buffer)))
-
-
-;;Apr_22_2006
-(defvar wikipedia-reply-with-hline nil
- "*Whether to use a hline as a header seperator in the reply.")
-
-(defvar wikipedia-reply-with-quote nil ;Version:1.60
- "*Whether to use a quotation tempalate or not.")
-
-(defvar wikipedia-user-simplify-signature t
- "*Simple varible in order to threat complicated signatures of users, which uses
-fonts and other makeup.")
-
-(defun wikipedia-reply-at-signature () ;Version:1.40
- "Very simple function to add the reply prefix to the signature,
-sorrounded by the boldface makeup. You have to set the point BEFORE
-the signature, then the functions inserts the following
-:'''Re: [[User:foo]]'''."
- (interactive)
- (beginning-of-line 1)
- (search-forward "[[")
- (mark-word 3)
- (yank)
- (end-of-line 1)
- (wikipedia-terminate-paragraph)
- (insert ":'''Re: ")
- (insert "[[")
- (yank)
- (insert "]]")
- (insert "'''"))
-
-
-
-
-(defun wikipedia-draft-reply () ;Version:1.62
- "Open a temporary buffer in wikipedia mode for editing an wikipedia
-draft, with an arbitrary piece of data. After finishing the editing
-|]]:either use \"C-c C-k\" \\[wikipedia-draft-buffer] to send the data into
-the wikipedia-draft-data-file, or send the buffer \"C-c\C-c\",
-\\[wikipedia-draft-send-to-mozex] to the current wikipedia article via
-mozex. Check the varibale wikipedia-draft-send-archive."
- (interactive)
- (wikipedia-reply-at-point-simple)
- (beginning-of-line 1)
- (kill-line nil)
- (save-excursion
- (window-configuration-to-register wikipedia-draft-register)
- (let ((buf (get-buffer-create wikipedia-draft-buffer)))
- (switch-to-buffer-other-window buf)
- (wikipedia-mode)
- (if (functionp 'pabbrev-mode)
- (pabbrev-mode))
- (when (not wikipedia-reply-with-quote)
- (when wikipedia-reply-with-hline
- (insert "----")
- (newline 1))
- (yank)
- (end-of-line 1))
- (when wikipedia-reply-with-quote
- (insert "{{Quotation|")
- (yank)
- (insert "'''Re: ")
- (insert-register wikipedia-draft-reply-register 1)
- (insert "''' |~~~~}}")
- (backward-char 7))
- (message " C-c C-k sends to draft, C-c C-c sends to org buffer."))))
-
-(defun wikipedia-reply-at-point-simple () ;Version:1.65
- "Reply to posts in discussion forums.
-You have to put the region around the signature, then the
-functions inserts the following
-:'''Re: [[User:foo]]'''."
- (interactive)
- (beginning-of-line 1)
- (search-forward (get-lang-string wikipedia-lang 'wikip-utc))
- (search-backward (get-lang-string wikipedia-lang 'wikip-user-mark))
- (when (not wikipedia-user-simplify-signature)
- (mark-word 3))
- (when wikipedia-user-simplify-signature
- (mark-word 2))
- (copy-to-register wikipedia-draft-reply-register (region-beginning) (region-end) nil)
- (end-of-line 1)
- (wikipedia-terminate-paragraph-and-indent)
- (insert ":'''Re: ")
- (insert-register wikipedia-draft-reply-register 1)
- (when wikipedia-user-simplify-signature
- (insert "|]]''' "))
- (when (not wikipedia-user-simplify-signature)
- (insert "]]''' ")))
-
-;;}}}
-
-;;{{{ Optional private stuff:
-
-;; (defun wikipedia-insert-quotation-with-signature () ;Version:1.60
-;; "Insert quotation with signature.
-;; When mark is active, surrounds region."
-;; (interactive)
-;; (wikipedia-insert-around-region "{{Quotation|" "}}{{~~~~}}"))
-
-;; (defun wikipedia-insert-quotation () ;Version:1.60
-;; "Insert quotation box.
-;; When mark is active, surrounds region."
-;; (interactive)
-;; ;; Fix-me: This uses a template, is that really always available???
-;; (wikipedia-insert-around-region "{{Quotation|" "}}"))
-
-;; (define-key wikipedia-mode-map "\C-c\C-fv" 'wikipedia-insert-bible-verse-template)
-;;
-;; (defun wikipedia-insert-bible-verse-template ()
-;; "Insert a template for the quotation of bible verses."
-;; (interactive)
-;; (insert "({{niv|")
-;; (let ((name (read-string "Name: ")))
-;; (insert (concat name "|"))
-;; (let ((verse (read-string "Verse: ")))
-;; (insert (concat verse "|" name " " verse "}})")))))
-
-;;}}}
-
-(provide 'wikipedia-mode)
-;;; wikipedia-mode.el ends here.
-
-
diff --git a/emacs.d/nxhtml/tests/angus77-setup-jde.el b/emacs.d/nxhtml/tests/angus77-setup-jde.el
deleted file mode 100644
index dd8f9ac..0000000
--- a/emacs.d/nxhtml/tests/angus77-setup-jde.el
+++ /dev/null
@@ -1,90 +0,0 @@
-;;; angus77-setup-jde.el ---
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-20T16:57:35+0200 Wed
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Question #42407 on nXhtml changed:
-;; https://answers.launchpad.net/nxhtml/+question/42407
-
-;; Angus77 posted a new comment:
-
-(eval-when-compile (require 'cl))
-(let (
- ;;(jde-lisp-dir "C:/jdee/jdee/trunk/jde/lisp/")
- (jde-lisp-dir "C:/jdee/jdee/branches/phil_lord/dimitre_liotev_new_build/jde/lisp")
- (cedet-root "c:/cedet/cedet/")
- (elib-dir "C:/DL/emacs/elib-1.0")
- )
- (assert (file-directory-p jde-lisp-dir) t)
- ;;(add-to-list 'load-path (expand-file-name "~/elisp/jde-2.3.5.1/lisp"))
- (add-to-list 'load-path jde-lisp-dir)
- ;;(add-to-list 'load-path (expand-file-name "~/elisp/cedet-1.0pre4/semantic"))
- (add-to-list 'load-path (expand-file-name "semantic" cedet-root))
- ;;(add-to-list 'load-path (expand-file-name "~/elisp/cedet-1.0pre4/speedbar"))
- (add-to-list 'load-path (expand-file-name "speedbar" cedet-root))
- ;;(add-to-list 'load-path (expand-file-name "~/elisp/elib"))
- (add-to-list 'load-path elib-dir)
- ;;(add-to-list 'load-path (expand-file-name "~/elisp/cedet-1.0pre4/eieio"))
- (add-to-list 'load-path (expand-file-name "eieio" cedet-root))
- ;;(add-to-list 'load-path (expand-file-name "~/elisp/cedet-1.0pre4/common"))
- (add-to-list 'load-path (expand-file-name "common" cedet-root)))
-
-;; Initialize CEDET.
-;;(load-file (expand-file-name "~/elisp/cedet-1.0pre4/common/cedet.el"))
-(load-library "cedet.el")
-
-(setq defer-loading-jde t)
-
-(if defer-loading-jde
- (progn
- (autoload 'jde-mode "jde" "JDE mode." t)
- (setq auto-mode-alist
- (append
- '(("\\.java\\'" . jde-mode))
- auto-mode-alist)))
- (require 'jde))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; angus77-setup-jde.el ends here
diff --git a/emacs.d/nxhtml/tests/emacstest-suites.el b/emacs.d/nxhtml/tests/emacstest-suites.el
deleted file mode 100644
index 5953fac..0000000
--- a/emacs.d/nxhtml/tests/emacstest-suites.el
+++ /dev/null
@@ -1,102 +0,0 @@
-;;; emacstest-suites.el --- Some unit tests for Emacs
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-09-21T22:34:11+0200 Sun
-;; Version:
-;; Last-Updated: 2008-09-22T00:36:11+0200 Sun
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `button', `cl', `debug', `ert', `ert2', `ewoc', `find-func',
-;; `help-fns', `help-mode', `view'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Unit tests for some Emacs bug reports.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile
- (let* ((this-file (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- (this-dir (file-name-directory this-file))
- (load-path (cons this-dir load-path)))
- (require 'ert2)))
-
-(setq debug-on-error t)
-
-(defvar emacstest-bin
- (file-name-directory (if load-file-name load-file-name buffer-file-name)))
-
-(pushnew emacstest-bin load-path)
-
-
-
-(defvar emacstest-files-root
- (let* ((this-dir emacstest-bin)
- (root (expand-file-name "inemacs/" this-dir)))
- (unless (file-accessible-directory-p root)
- (error (if (file-exists-p root)
- "Can't read files in test directory %s"
- "Can't find test directory %s")
- root))
- root))
-
-(let ((distr-in "c:/EmacsW32/nxhtml/tests/inemacs/"))
- (when (file-directory-p distr-in)
- (setq emacstest-files-root distr-in)))
-
-(defun emacstest-run ()
- "Run Emacs tests."
- (interactive)
- (setq message-log-max t)
- (setq ert-test-files-root emacstest-files-root)
- (let ((selector "emacs-"))
- (if noninteractive
- (ert-run-tests-batch selector)
- (ert-kill-temp-test-buffers)
- (ert-run-tests-interactively selector)
- (other-window 1)
- (ert-list-temp-test-buffers))))
-
-(ert-deftest emacs-bug1013 ()
- "Emacs bug 1013.
-See URL
-`http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1013'."
- (ert-with-temp-buffer-include-file "bug1013.el"
- (eval-buffer)))
-
-(provide 'emacstest-suites)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; emacstest-suites.el ends here
diff --git a/emacs.d/nxhtml/tests/ert.el b/emacs.d/nxhtml/tests/ert.el
deleted file mode 100644
index 491d79f..0000000
--- a/emacs.d/nxhtml/tests/ert.el
+++ /dev/null
@@ -1,2418 +0,0 @@
-;;; ert.el --- Emacs Lisp Regression Testing
-
-;; Modified by Lennart Borgman 2008-07-13 to make all global symbols
-;; use the "ert-" prefix.
-
-;; Copyright (C) 2007, 2008 Christian M. Ohler
-
-;; Author: Christian M. Ohler
-;; Version: 0.2
-;; Keywords: lisp, tools
-
-;; This file is NOT part of GNU Emacs.
-
-;; This program is free software: you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation, either version 3 of the
-;; License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see `http://www.gnu.org/licenses/'.
-
-;;; Commentary:
-
-;; ERT is a tool for automated testing in Emacs Lisp. Its main
-;; features are facilities for defining and running test cases and
-;; reporting the results as well as for debugging test failures
-;; interactively.
-;;
-;; The main entry points are `ert-deftest', which is similar to
-;; `defun' but defines a test, and `ert-run-tests-interactively',
-;; which runs tests and offers an interactive interface for inspecting
-;; results and debugging. There is also `ert-run-tests-batch' for
-;; non-interactive use.
-;;
-;; The body of `ert-deftest' forms resembles a function body, but the
-;; additional operators `should', `should-not' and `should-error' are
-;; available. `should' is similar to cl's `assert', but signals a
-;; different error when its condition is violated that is caught and
-;; processed by ERT. In addition, it analyzes its argument form and
-;; records information that helps debugging (`assert' tries to do
-;; something similar when its second argument SHOW-ARGS is true, but
-;; `should' is more sophisticated). For information on `should-not'
-;; and `should-error', see their docstrings.
-;;
-;; For example,
-;;
-;; ;; Define a test named `foo'.
-;; (ert-deftest foo ()
-;; (ert-should (= (+ 1 2) 4)))
-;;
-;; ;; Run it.
-;; (ert-run-tests-interactively 'foo)
-;;
-;; generates the following output (in addition to some statistics) in
-;; the *ert* results buffer:
-;;
-;; F foo
-;; (ert-test-failed
-;; ((ert-should
-;; (=
-;; (+ 1 2)
-;; 4))
-;; :form
-;; (= 3 4)
-;; :value nil))
-;;
-;; This indicates that the test failed. The `should' form that failed
-;; was (ert-should (= (+ 1 2) 4)), because its inner form, after
-;; evaluation of its arguments, was the function call (= 3 4), which
-;; returned nil.
-;;
-;; Obviously, this is a bug in the test case, not in the functions `+'
-;; or `='. In the results buffer, with point on the test result, the
-;; key "." can be used to jump to the definition of the test to modify
-;; it to correct the bug. After evaluating the modified definition
-;; and switching back to the results buffer, the key "r" will re-run
-;; the test and show the new result.
-
-
-;; Test selectors
-;;
-;; Functions like `ert-run-tests-interactively' accept a test
-;; selector, which is a Lisp expression specifying a set of tests.
-;; Each test name is a selector that refers to that test, the selector
-;; `t' refers to all tests, and the selector `:failed' refers to all
-;; tests that failed; but more complex selectors are available. Test
-;; selector syntax is similar to cl's type specifier syntax. See the
-;; docstring of `ert-select-tests' for details.
-
-
-;; Comparison with other testing tools
-;;
-;; ERT allows test-driven development similar to *Unit frameworks for
-;; other languages. However, two common *Unit features are notably
-;; absent from ERT: fixtures and test suites.
-;;
-;; Fixtures, as used e.g. in SUnit or JUnit, have two main purposes:
-;; Setting up (and tearing down) an environment for a set of test
-;; cases, and making that environment accessible through object
-;; attributes that can be used like local variables.
-;;
-;; While fixtures are a great syntactic simplification in other
-;; languages, they are not very useful in Lisp, where higher-order
-;; functions and `unwind-protect' are available. One way to implement
-;; and use a fixture in ERT is
-;;
-;; (defun my-fixture (body)
-;; (unwind-protect
-;; (progn ...set up...
-;; (funcall body))
-;; ...tear down...))
-;;
-;; (ert-deftest my-test ()
-;; (my-fixture
-;; (lambda ()
-;; ...test code...)))
-;;
-;; (Another way would be a `with-my-fixture' macro.) This solves the
-;; set-up and tear-down part, and additionally allows any test case to
-;; use any combination of fixtures, so it is more general than what
-;; other tools typically allow.
-;;
-;; If the test case needs access to the environment the fixture sets
-;; up, the fixture can be modified to pass arguments to the body.
-;;
-;; These are standard Lisp idioms. Special syntax for them could be
-;; added easily enough, but would provide only a minor simplification.
-;;
-;; (Note that splitting set-up and tear-down into separate functions,
-;; like *Unit tools usually do, makes it impossible to establish
-;; dynamic `let' bindings as part of the fixture. So, blindly
-;; imitating the way fixtures are implemented in other languages would
-;; be counter-productive in Lisp.)
-;;
-;;
-;; The purpose of test suites is to group related test cases together.
-;; The most common use of this is to run just the tests for one
-;; particular module. Since symbol prefixes are the usual way of
-;; separating module namespaces in Emacs Lisp, test selectors already
-;; solve this by allowing regexp matching on test names; e.g., the
-;; selector "^ert-" selects ERT's self-tests.
-;;
-;; If test suites containing arbitrary sets of tests are found to be
-;; desirable, it would be easy to add a `define-test-selector'
-;; mechanism that introduces a new selector, defined in terms of
-;; existing ones; e.g.
-;;
-;; ;; Note that `define-test-selector' does not exist yet.
-;; (define-test-selector my-test-suite () `(member foo-test bar-test))
-;;
-;; would define a test suite named `my-test-suite' consisting of
-;; `foo-test' and `bar-test'. See also `deftype' in Common Lisp.
-
-
-;; TODO: Add `skip' feature for tests that can't run in current environment.
-
-
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(require 'ewoc)
-(require 'find-func)
-(require 'debug)
-
-(defvar ert-debug-on-error nil
- "Non-nil means enter debugger when a test fails or terminates with an error.")
-
-
-;;; Defining and locating tests.
-
-;; The data structure that represents a test case.
-(defstruct ert-test
- (name nil)
- (documentation nil)
- (body (assert nil))
- (most-recent-result nil)
- (expected-result-type 'ert-test-passed))
-
-(defun ert-test-boundp (symbol)
- "Return non-nil if SYMBOL names a test."
- (and (get symbol 'ert-test) t))
-
-(defun ert-get-test (symbol)
- "If SYMBOL names a test, return that. Signal an error otherwise."
- (assert (ert-test-boundp symbol) t)
- (get symbol 'ert-test))
-
-(defun ert-set-test (symbol doc definition)
- "Make SYMBOL name the test DEFINITION, and return DEFINITION."
- (when doc
- (put symbol 'ert-test-documentation doc))
- (put symbol 'ert-test definition)
- definition)
-
-(defun ert-make-test-unbound (symbol)
- "Make SYMBOL name no test. Return SYMBOL."
- (remprop symbol 'ert-test)
- symbol)
-
-(defun ert-test-result-expected-p (test result)
- "Return non-nil if RESULT matches the expected result type for TEST."
- (typep result (ert-test-expected-result-type test)))
-
-(defvar ert-find-test-regexp
- (concat "^\\s-*(ert-deftest"
- find-function-space-re
- "%s\\(\\s-\\|$\\)")
- "The regexp the `find-function' mechanisms use for locating test definitions.")
-
-(eval-and-compile
- (defun ert-parse-keys-and-body (docstr keys-and-body)
- "Split KEYS-AND-BODY into keyword-and-value pairs and the remaining body.
-
-KEYS-AND-BODY should have the form of a property list, with the
-exception that only keywords are permitted as keys and that the
-tail -- the body -- is a list of forms that does not start with a
-keyword.
-
-Returns a two-element list containing the keys-and-values plist
-and the body."
- (unless (stringp docstr)
- (when docstr
- (setq keys-and-body (cons docstr keys-and-body))
- (setq docstr nil)))
- (let ((extracted-key-accu '())
- (remaining keys-and-body))
- (while (and (consp remaining) (keywordp (first remaining)))
- (let ((keyword (pop remaining)))
- (unless (consp remaining)
- (error "Value expected after keyword %S in %S"
- keyword keys-and-body))
- (when (assoc keyword extracted-key-accu)
- (warn "Keyword %S appears more than once in %S" keyword
- keys-and-body))
- (push (cons keyword (pop remaining)) extracted-key-accu)))
- (setq extracted-key-accu (nreverse extracted-key-accu))
- (list (loop for (key . value) in extracted-key-accu
- collect key
- collect value)
- docstr
- remaining))))
-
-(defvar ert-error-on-test-redefinition nil)
-
-;;;###autoload
-(defmacro* ert-deftest (name ()
- &optional docstr
- &body keys-and-body)
- "Define NAME (a symbol) as a test.
-
-\(fn NAME () [:documentation DOCSTRING] [:expected-result TYPE] BODY...)"
- ;; The :documentation would be unreadable. I have therefore added
- ;; docstr that will look like documentation use to in Emacs. Maybe
- ;; add function ert-describe-test?
- (declare (indent 2)
- (debug (&define :name test name sexp
- [&optional [":documentation" stringp]]
- [&optional [":expected-result" sexp]]
- def-body)))
- (destructuring-bind ((&key (expected-result nil expected-result-supplied-p)
- (documentation nil documentation-supplied-p))
- doc
- body)
- (ert-parse-keys-and-body docstr keys-and-body)
- `(progn
- ;; Guard against missing/badly named tests:
- (when (and ert-error-on-test-redefinition
- (symbolp ',name)
- (get ',name 'ert-test))
- (with-output-to-temp-buffer "*Ert Error*"
- (with-current-buffer "*Ert Error*"
- (insert "Test "
- (format "%s" ',name)
- " is already defined in "
- (format "%s" (find-definition-noselect ',name 'ert-deftest))
- "\n\n"
- "Tip: Use `ert-delete-all-tests' or `ert-delete-test' before redefining tests."
- )))
- (if (y-or-n-p "Do you want to call ert-delete-all-tests and then continue? ")
- ;; Fix-me: This does not work, why?
- (ert-delete-all-tests)
- (error "Test %s is already defined in %s"
- ',name
- (find-definition-noselect ',name 'ert-deftest))))
- (ert-set-test ',name
- nil ;;doc
- (make-ert-test
- :name ',name
- :body (lambda () ,@body)
- ,@(when expected-result-supplied-p
- `(:expected-result-type ,expected-result))
- ,@(when documentation-supplied-p
- `(:documentation ,documentation))))
- ;; This hack allows `symbol-file' to associate `ert-deftest'
- ;; forms with files, and therefore enables `find-function' to
- ;; work with tests. However, it leads to warnings in
- ;; `unload-feature', which doesn't know how to undefine tests
- ;; and has no mechanism for extension.
- (push '(ert-deftest . ,name) current-load-list)
- ',name)))
-
-(defun ert-read-test-name (prompt &optional default-value history)
- "Read the name of a test and return it as a symbol.
-Prompt with PROMPT. By default, return DEFAULT-VALUE."
- (when (symbolp default-value) (setq default-value (symbol-name default-value)))
- (intern (completing-read prompt obarray #'ert-test-boundp
- t nil history default-value nil)))
-
-(defun ert-find-test-other-window (test-name)
- "Find, in another window, the definition of TEST-NAME."
- (interactive (list (ert-read-test-name "Find test definition: ")))
- (find-function-do-it test-name 'ert-deftest 'switch-to-buffer-other-window))
-
-(defun ert-delete-test (test-name)
- "An interactive interface to `ert-make-test-unbound'."
- (interactive (list (let ((default (thing-at-point 'symbol)))
- (when default
- (set-text-properties 0 (length default) nil default)
- (when (or (string= default "nil") (intern-soft default))
- (setq default (intern default)))
- (unless (ert-test-boundp default)
- (setq default nil)))
- (completing-read (if (null default)
- "Delete test: "
- (format "Delete test (default %s): "
- default))
- obarray #'ert-test-boundp
- 'really-require-match
- nil nil default nil))))
- (ert-make-test-unbound test-name))
-
-(defun ert-delete-all-tests ()
- "Make all symbols in `obarray' name no test."
- (interactive)
- (when (interactive-p)
- (unless (y-or-n-p "Delete all tests? ")
- (error "Aborted")))
- (mapc #'ert-delete-test (mapcar #'ert-test-name (ert-select-tests t t)))
- t)
-
-
-(defun ert-make-end-marker (buffer must-exist)
- "Return a marker to the end of buffer BUFFER.
-BUFFER may be a string or a buffer. If BUFFER does not exist
-return nil.
-
-The buffer must exist if MUST-EXIST is non-nil.
-
-See also:
- `ert-end-of-messages'
- `ert-end-of-warnings'"
- (let ((buf (if must-exist
- (get-buffer buffer)
- (get-buffer-create buffer))))
- (when (and buf
- (bufferp buf)
- (buffer-live-p buf))
- (with-current-buffer buf
- (save-restriction
- (widen)
- (point-max-marker))))))
-
-(defun ert-end-of-messages ()
- "Return a marker to the end of *Messages* buffer."
- (ert-make-end-marker "*Messages*" nil))
-
-(defun ert-end-of-warnings ()
- "Return a marker to the end of *Warnings* buffer."
- (ert-make-end-marker "*Warnings*" nil))
-
-(defun ert-search-after (after regexp)
- "Search after marker in AFTER for regular expression REGEXP.
-Return a alist of position and matches. AFTER should have been
-created with `ert-make-end-marker'.
-
-This is supposed to be used for messages and trace buffers.
-
-See also
- `ert-get-messages'"
- (let ((buf (marker-buffer after)))
- (with-current-buffer buf
- (let ((here (point))
- res)
- (goto-char after)
- (save-match-data
- (while (re-search-forward regexp nil t)
- (setq res (cons (match-data) res))))
- (goto-char here)
- (reverse res)))))
-;; fix-me: add a conventient way to look at the result of
-;; `ert-search-after'. Probably this means adding something more to
-;; the returned result.
-
-(defvar ert-messages-mark)
-(defun ert-get-messages (regexp)
- "Search *Messages* buffer for regular expression REGEXP.
-This should be used within `ert-deftest'. Search begins where
-the buffer ended when test started.
-
-See also:
- `ert-get-warnings'
- `ert-search-after'"
- (ert-search-after ert-messages-mark regexp))
-
-(defvar ert-warnings-mark)
-(defun ert-get-warnings (regexp)
- "Search *Warnings* buffer for regular expression REGEXP.
-See `ert-get-messages' for more information."
- (ert-search-after ert-warnings-mark regexp))
-
-
-;;; Test selectors.
-
-(defun ert-select-tests (selector universe)
- "Select, from UNIVERSE, a set of tests according to SELECTOR.
-
-UNIVERSE should be a list of tests, or t, which refers to all
-tests named by symbols in `obarray'.
-
-Returns the set of tests as a list.
-
-Valid selectors:
-
-nil -- Selects the empty set.
-t -- Selects UNIVERSE.
-:new -- Selects all tests that have not been run yet.
-:failed, :passed, :error -- Select tests according to their most recent result.
-:expected, :unexpected -- Select tests according to their most recent result.
-a string -- Selects all tests that have a name that matches the string, a regexp.
-a test -- Selects that test.
-a symbol -- Selects the test that the symbol names, errors if none.
-\(member TESTS...\) -- Selects TESTS, a list of tests or symbols naming tests.
-\(eql TEST\) -- Selects TEST, a test or a symbol naming a test.
-\(and SELECTORS...\) -- Selects the tests that match all SELECTORS.
-\(or SELECTORS...\) -- Selects the tests that match any SELECTOR.
-\(not SELECTOR\) -- Selects all tests that do not match SELECTOR.
-\(satisfies PREDICATE\) -- Selects all tests that satisfy PREDICATE.
-
-Only selectors that require a superset of tests, such
-as (satisfies ...), strings, :new, etc. make use of UNIVERSE.
-Selectors that do not, such as \(member ...\), just return the
-set implied by them without checking whether it is really
-contained in UNIVERSE."
- ;; This code needs to match the etypecase in
- ;; `ert-insert-human-readable-selector'.
- (etypecase selector
- ((member nil) nil)
- ((member t) (etypecase universe
- (list universe)
- ((member t) (ert-select-tests "" universe))))
- ((member :new) (ert-select-tests
- `(satisfies ,(lambda (test)
- (typep (ert-test-most-recent-result test)
- 'null)))
- universe))
- ((member :failed) (ert-select-tests
- `(satisfies ,(lambda (test)
- (typep (ert-test-most-recent-result test)
- 'ert-test-failed)))
- universe))
- ((member :passed) (ert-select-tests
- `(satisfies ,(lambda (test)
- (typep (ert-test-most-recent-result test)
- 'ert-test-passed)))
- universe))
- ((member :error) (ert-select-tests
- `(satisfies ,(lambda (test)
- (typep (ert-test-most-recent-result test)
- 'ert-test-error)))
- universe))
- ((member :expected) (ert-select-tests
- `(satisfies
- ,(lambda (test)
- (ert-test-result-expected-p
- test
- (ert-test-most-recent-result test))))
- universe))
- ((member :unexpected) (ert-select-tests `(not :expected) universe))
- (string
- (etypecase universe
- ((member t) (mapcar #'ert-get-test
- (apropos-internal selector #'ert-test-boundp)))
- (list (remove-if-not (lambda (test)
- (and (ert-test-name test)
- (string-match selector (ert-test-name test))))
- universe))))
- (ert-test (list selector))
- (symbol
- (assert (ert-test-boundp selector))
- (list (ert-get-test selector)))
- (cons
- (destructuring-bind (operator &rest operands) selector
- (ecase operator
- (member
- (mapcar (lambda (purported-test)
- (etypecase purported-test
- (symbol (assert (ert-test-boundp purported-test))
- (ert-get-test purported-test))
- (ert-test purported-test)))
- operands))
- (eql
- (assert (eql (length operands) 1))
- (ert-select-tests `(member ,@operands) universe))
- (and
- ;; Do these definitions of AND, NOT and OR satisfy de
- ;; Morgan's rules? Should they?
- (case (length operands)
- (0 (ert-select-tests 't universe))
- (t (ert-select-tests `(and ,@(rest operands))
- (ert-select-tests (first operands) universe)))))
- (not
- (assert (eql (length operands) 1))
- (set-difference (ert-select-tests 't universe)
- (ert-select-tests (first operands) universe)))
- (or
- (case (length operands)
- (0 (ert-select-tests 'nil universe))
- (t (union (ert-select-tests (first operands) universe)
- (ert-select-tests `(or ,@(rest operands)) universe)))))
- (satisfies
- (assert (eql (length operands) 1))
- (remove-if-not (first operands) (ert-select-tests 't universe))))))))
-
-(defun ert-insert-human-readable-selector (selector)
- "Insert a human-readable presentation of SELECTOR into the current buffer."
- ;; This is needed to avoid printing the (huge) contents of the
- ;; `backtrace' slot of the result objects in the
- ;; `most-recent-result' slots of test case objects in (eql ...) or
- ;; (member ...) selectors.
- (labels ((rec (selector)
- ;; This code needs to match the etypecase in `ert-select-tests'.
- (etypecase selector
- ((or (member nil t
- :new :failed :passed :error
- :expected :unexpected)
- string
- symbol)
- selector)
- (ert-test
- (if (ert-test-name selector)
- (make-symbol (format "<%S>" (ert-test-name selector)))
- (make-symbol "<unnamed test>")))
- (cons
- (destructuring-bind (operator &rest operands) selector
- (ecase operator
- ((member eql and not or)
- `(,operator ,@(mapcar #'rec operands)))
- (satisfies
- selector)))))))
- (insert (format "%S" (rec selector)))))
-
-
-;;; Running tests.
-
-(put 'ert-test-failed 'error-conditions '(error ert-test-failed))
-(put 'ert-test-failed 'error-message "Test failed")
-
-(defun ert-pass ()
- "Terminate the current test and mark it passed. Does not return."
- (throw 'ert-pass nil))
-
-(defun ert-fail (data)
- "Terminate the current test and mark it failed. Does not return.
-DATA is displayed to the user and should state the reason of the failure."
- (signal 'ert-test-failed (list data)))
-
-;; The data structures that represent the result of running a test.
-(defstruct ert-test-result
- (messages nil)
- )
-(defstruct (ert-test-passed (:include ert-test-result)))
-(defstruct (ert-test-result-with-condition (:include ert-test-result))
- (condition (assert nil))
- (backtrace (assert nil)))
-(defstruct (ert-test-error (:include ert-test-result-with-condition)))
-(defstruct (ert-test-quit (:include ert-test-result-with-condition)))
-(defstruct (ert-test-failed (:include ert-test-result-with-condition)))
-(defstruct (ert-test-aborted-with-non-local-exit (:include ert-test-result)))
-
-
-(defun ert-record-backtrace ()
- "Record the current backtrace (as a list) and return it."
- ;; Since the backtrace is stored in the result object, result
- ;; objects must only be printed with appropriate limits
- ;; (`print-level' and `print-length') in place. For interactive
- ;; use, the cost of ensuring this possibly outweighs the advantage
- ;; of storing the backtrace for
- ;; `ert-results-pop-to-backtrace-for-test-at-point' given that we
- ;; already have `ert-results-rerun-test-debugging-errors-at-point'.
- ;; For batch use, however, printing the backtrace may be useful.
- (loop
- ;; 6 is the number of frames our own debugger adds (when
- ;; compiled; more when interpreted). FIXME: Need to describe a
- ;; procedure for determining this constant.
- for i from 6
- for frame = (backtrace-frame i)
- while frame
- collect frame))
-
-;; A container for the state of the execution of a single test and
-;; environment data needed during its execution.
-(defstruct ert-test-execution-info
- (test (assert nil))
- (result (assert nil))
- ;; A thunk that may be called when RESULT has been set to its final
- ;; value and test execution should be terminated. Should not
- ;; return.
- (exit-continuation (assert nil))
- ;; The binding of `debugger' outside of the execution of the test.
- next-debugger
- ;; The binding of `ert-debug-on-error' that is in effect for the
- ;; execution of the current test. We store it to avoid being
- ;; affected by any new bindings the test itself may establish. (I
- ;; don't remember whether this feature is important.)
- ert-debug-on-error)
-
-(defun ert-run-test-debugger (info debugger-args)
- "The function that `debugger' is bound to during the execution of tests.
-
-Records failures and errors and either terminates the test
-silently or calls the interactive debugger, as appropriate."
- (destructuring-bind (first-debugger-arg &rest more-debugger-args) debugger-args
- (ecase first-debugger-arg
- ((lambda debug t exit nil)
- (apply (ert-test-execution-info-next-debugger info) debugger-args))
- (error
- (let* ((condition (first more-debugger-args))
- (type (case (car condition)
- ((quit) 'quit)
- ((ert-test-failed) 'failed)
- (otherwise 'error)))
- (backtrace (ert-record-backtrace)))
- (setf (ert-test-execution-info-result info)
- (ecase type
- (quit
- (make-ert-test-quit :condition condition
- :backtrace backtrace))
- (failed
- (make-ert-test-failed :condition condition
- :backtrace backtrace))
- (error
- (make-ert-test-error :condition condition
- :backtrace backtrace))))
- ;; Work around Emacs' heuristic (in eval.c) for detecting
- ;; errors in the debugger.
- (incf num-nonmacro-input-events)
- ;; FIXME: We should probably implement more fine-grained
- ;; control a la non-t `debug-on-error' here.
- (cond
- ((ert-test-execution-info-ert-debug-on-error info)
- (apply (ert-test-execution-info-next-debugger info) debugger-args))
- (t))
- (funcall (ert-test-execution-info-exit-continuation info)))))))
-
-(defun ert-run-test-internal (ert-test-execution-info)
- (lexical-let ((info ert-test-execution-info))
- (setf (ert-test-execution-info-next-debugger info) debugger
- (ert-test-execution-info-ert-debug-on-error info) ert-debug-on-error)
- (catch 'ert-pass
- ;; For now, each test gets its own temp buffer and its own
- ;; window excursion, just to be safe. If this turns out to be
- ;; too expensive, we can remove it.
- (with-temp-buffer
- (save-window-excursion
- (let ((debugger (lambda (&rest debugger-args)
- (ert-run-test-debugger info debugger-args)))
- (debug-on-error t)
- (debug-on-quit t)
- ;; FIXME: Do we need to store the old binding of this
- ;; and consider it in `ert-run-test-debugger'?
- (debug-ignored-errors nil)
- (ert-messages-mark (ert-end-of-messages))
- (ert-warnings-mark (ert-end-of-warnings)))
- (funcall (ert-test-body (ert-test-execution-info-test info))))))
- (ert-pass))
- (setf (ert-test-execution-info-result info) (make-ert-test-passed)))
- nil)
-
-(defun ert-make-marker-in-messages-buffer ()
- (with-current-buffer (get-buffer-create "*Messages*")
- (set-marker (make-marker) (point-max))))
-
-(defun ert-force-message-log-buffer-truncation ()
- (with-current-buffer (get-buffer-create "*Messages*")
- ;; This is a reimplementation of this part of message_dolog() in xdisp.c:
- ;; if (NATNUMP (Vmessage_log_max))
- ;; {
- ;; scan_newline (Z, Z_BYTE, BEG, BEG_BYTE,
- ;; -XFASTINT (Vmessage_log_max) - 1, 0);
- ;; del_range_both (BEG, BEG_BYTE, PT, PT_BYTE, 0);
- ;; }
- (when (and (integerp message-log-max) (>= message-log-max 0))
- (let ((begin (point-min))
- (end (save-excursion
- (goto-char (point-max))
- (forward-line (- message-log-max))
- (point))))
- (delete-region begin end)))))
-
-(defun ert-run-test (test)
- "Run TEST. Return the result and store it in TEST's `most-recent-result' slot."
- (setf (ert-test-most-recent-result test) nil)
- (block error
- (lexical-let* ((begin-marker (ert-make-marker-in-messages-buffer))
- (info (make-ert-test-execution-info
- :test test
- :result (make-ert-test-aborted-with-non-local-exit)
- :exit-continuation (lambda ()
- (return-from error nil)))))
- (unwind-protect
- (let ((message-log-max t))
- (ert-run-test-internal info))
- (let ((result (ert-test-execution-info-result info)))
- (setf (ert-test-result-messages result)
- (with-current-buffer (get-buffer-create "*Messages*")
- (buffer-substring begin-marker (point-max))))
- (ert-force-message-log-buffer-truncation)
- (setf (ert-test-most-recent-result test) result)))))
- (ert-test-most-recent-result test))
-
-
-;;; The `should' macros.
-
-(eval-and-compile
- (defun ert-special-operator-p (thing)
- "Return non-nil if THING is a symbol naming a special operator."
- (and (symbolp thing)
- (let ((definition (indirect-function thing t)))
- (and (subrp definition)
- (eql (cdr (subr-arity definition)) 'unevalled)))))
- (defun ert-expand-should (whole form env inner-expander)
- "Helper function for the `should' macro and its variants.
-
-Analyzes FORM and produces an expression that has the same
-semantics under evaluation but records additional debugging
-information. INNER-EXPANDER adds the actual checks specific to
-the particular variant of `should'."
- (let ((form (macroexpand form env)))
- ;; It's sort of a wart that `inner-expander' can't influence the
- ;; value the expansion returns.
- (cond
- ((atom form)
- (funcall inner-expander form `(list ',whole :form ',form :value ,form)))
- ((ert-special-operator-p (car form))
- (let ((value (gensym "value-")))
- `(let ((,value (make-symbol "ert-form-evaluation-aborted")))
- ,(funcall inner-expander
- `(setq ,value ,form)
- `(list ',whole :form ',form :value ,value))
- ,value)))
- (t
- (let ((fn-name (car form))
- (arg-forms (cdr form)))
- (assert (or (symbolp fn-name)
- (and (consp fn-name)
- (eql (car fn-name) 'lambda)
- (listp (cdr fn-name)))))
- (let ((fn (gensym "fn-"))
- (args (gensym "args-"))
- (value (gensym "value-"))
- (default-value (gensym "ert-form-evaluation-aborted-")))
- `(let ((,fn (function ,fn-name))
- (,args (list ,@arg-forms)))
- (let ((,value ',default-value))
- ,(funcall inner-expander
- `(setq ,value (apply ,fn ,args))
- `(nconc (list ',whole)
- (list :form `(,,fn ,@,args))
- (unless (eql ,value ',default-value)
- (list :value ,value))
- (let ((-explainer-
- (and (symbolp ',fn-name)
- (get ',fn-name
- 'ert-explainer))))
- (when -explainer-
- (list :explanation
- (apply -explainer- ,args))))))
- ,value)))))))))
-
-(defmacro* ert-should (form &environment env)
- "Evaluate FORM. If it returns nil, abort the current test as failed.
-
-Returns the value of FORM."
- (ert-expand-should `(ert-should ,form) form env
- (lambda (inner-form form-description-form)
- `(unless ,inner-form
- (ert-fail ,form-description-form)))))
-
-(defmacro* ert-should-not (form &environment env)
- "Evaluate FORM. If it returns non-nil, abort the current test as failed.
-
-Returns nil."
- (ert-expand-should `(ert-should-not ,form) form env
- (lambda (inner-form form-description-form)
- `(unless (not ,inner-form)
- (ert-fail ,form-description-form)))))
-
-(defun ert-should-error-handle-error (form-description-fn
- condition type exclude-subtypes test)
- "Helper function for `should-error'.
-
-Determines whether CONDITION matches TYPE, EXCLUDE-SUBTYPES and
-TEST, and aborts the current test as failed if it doesn't."
- (let ((signalled-conditions (get (car condition) 'error-conditions))
- (handled-conditions (etypecase type
- (list type)
- (symbol (list type)))))
- (assert signalled-conditions)
- (unless (intersection signalled-conditions handled-conditions)
- (ert-fail (append
- (funcall form-description-fn)
- (list
- :condition condition
- :fail-reason (concat "the error signalled did not"
- " have the expected type")))))
- (when exclude-subtypes
- (unless (member (car condition) handled-conditions)
- (ert-fail (append
- (funcall form-description-fn)
- (list
- :condition condition
- :fail-reason (concat "the error signalled was a subtype"
- " of the expected type"))))))
- (unless (funcall test condition)
- (ert-fail (append
- (funcall form-description-fn)
- (list
- :condition condition
- :fail-reason "the error signalled did not pass the test"))))))
-
-;; FIXME: The expansion will evaluate the keyword args (if any) in
-;; nonstandard order.
-(defmacro* ert-should-error (form &rest keys &key type exclude-subtypes test
- &environment env)
- "Evaluate FORM. Unless it signals an error, abort the current test as failed.
-
-The error signalled additionally needs to match TYPE and satisfy
-TEST. TYPE should be a condition name or a list of condition
-names. If EXCLUDE-SUBTYPES is nil, the error matches TYPE if one
-of its condition names is an element of TYPE. If
-EXCLUDE-SUBTYPES is non-nil, the error matches TYPE if it is an
-element of TYPE. TEST should be a predicate."
- ;; Returns a gensym named `ert-form-evaluation-aborted-XXX', but
- ;; that's a wart, so let's not document it.
- (unless type (setq type ''error))
- (unless test (setq test '(lambda (condition) t)))
- (ert-expand-should
- `(ert-should-error ,form ,@keys)
- form env
- (lambda (inner-form form-description-form)
- (let ((errorp (gensym "errorp"))
- (form-description-fn (gensym "form-description-fn-")))
- `(let ((,errorp nil)
- (,form-description-fn (lambda () ,form-description-form)))
- (condition-case -condition-
- ,inner-form
- ;; We can't use ,type here because we want to evaluate it.
- (error
- (setq ,errorp t)
- (ert-should-error-handle-error ,form-description-fn
- -condition-
- ,type ,exclude-subtypes ,test)
- ;; It would make sense to have the `should-error' form
- ;; return the error in this case, but `ert-expand-should'
- ;; doesn't allow that at the moment.
- ))
- (unless ,errorp
- (ert-fail (append
- (funcall ,form-description-fn)
- (list
- :fail-reason "did not signal an error")))))))))
-
-
-;;; Explanation of `should' failures.
-
-(defun ert-proper-list-p (x)
- "Return non-nil if X is a proper list, nil otherwise."
- (loop
- for firstp = t then nil
- for fast = x then (cddr fast)
- for slow = x then (cdr slow) do
- (when (null fast) (return t))
- (when (not (consp fast)) (return nil))
- (when (null (cdr fast)) (return t))
- (when (not (consp (cdr fast))) (return nil))
- (when (and (not firstp) (eq fast slow)) (return nil))))
-
-(defun ert-explain-not-equal (a b)
- "Return a programmer-readable explanation of why A and B are not `equal'.
-
-Returns nil if they are equal."
- (if (not (equal (type-of a) (type-of b)))
- `(different-types ,a ,b)
- (etypecase a
- (cons
- (let ((a-proper-p (ert-proper-list-p a))
- (b-proper-p (ert-proper-list-p b)))
- (if (not (eql (not a-proper-p) (not b-proper-p)))
- `(one-list-proper-one-improper ,a ,b)
- (if a-proper-p
- (if (not (equal (length a) (length b)))
- ;; This would be even more helpful if it showed
- ;; something like what `set-difference' would
- ;; return.
- `(proper-lists-of-different-length ,a ,b)
- (loop for i from 0
- for ai in a
- for bi in b
- for xi = (ert-explain-not-equal ai bi)
- do (when xi (return `(list-elt ,i ,xi)))))
- (let ((car-x (ert-explain-not-equal (car a) (car b))))
- (if car-x
- `(car ,car-x)
- (let ((cdr-x (ert-explain-not-equal (cdr a) (cdr b))))
- (if cdr-x
- `(cdr ,cdr-x))
- nil)))))))
- (array (if (not (equal (length a) (length b)))
- `(arrays-of-different-length ,a ,b)
- (loop for i from 0
- for ai across a
- for bi across b
- for xi = (ert-explain-not-equal ai bi)
- do (when xi (return `(array-elt ,i ,xi))))))
- (atom (if (not (equal a b))
- `(different-atoms ,a ,b)
- nil)))))
-(put 'equal 'ert-explainer 'ert-explain-not-equal)
-
-
-;;; Results display.
-
-;; The data structure that contains the set of tests being executed
-;; during one particular test run, their results, the state of the
-;; execution, and some statistics.
-;;
-;; The data about results and expected results of tests may seem
-;; redundant here, since the test objects also carry such information.
-;; However, the information in the test objects may be more recent, it
-;; may correspond to a different test run. We need the information
-;; that corresponds to this run in order to be able to update the
-;; statistics correctly when a test is re-run interactively and has a
-;; different result than before.
-(defstruct ert-stats
- (selector (assert nil))
- ;; The tests, in order.
- (tests (assert nil) :type vector)
- ;; A map of test names (or the test objects themselves for unnamed
- ;; tests) to indices into the `tests' vector.
- (test-map (assert nil) :type hash-table)
- ;; The results of the tests during this run, in order.
- (test-results (assert nil) :type vector)
- ;; The expected result types of the tests, in order.
- (test-results-expected (assert nil) :type vector)
- (total (assert nil))
- (passed-expected 0)
- (passed-unexpected 0)
- (failed-expected 0)
- (failed-unexpected 0)
- (error-expected 0)
- (error-unexpected 0)
- (start-time (assert nil))
- (end-time nil)
- (aborted-p nil)
- (current-test nil))
-
-;; An entry in the results buffer ewoc. There is one entry per test.
-(defstruct ert-ewoc-entry
- (test (assert nil))
- (result nil)
- ;; If the result of this test was expected, its ewoc entry is hidden
- ;; initially.
- (hidden-p (assert nil))
- ;; An ewoc entry may be collapsed to hide details such as the error
- ;; condition.
- ;;
- ;; I'm not sure the ability to expand and collapse entries is still
- ;; a useful feature.
- (expanded-p t)
- ;; By default, the ewoc entry presents the error condition with
- ;; certain limits on how much to print (`print-level',
- ;; `print-length'). The user can interactively switch to a set of
- ;; higher limits.
- (extended-printer-limits-p nil))
-
-;; Variables local to the results buffer.
-
-;; The ewoc.
-(defvar ert-results-ewoc)
-;; The stats object.
-(defvar ert-results-stats)
-;; A string with one character per test. Each character represents
-;; the result of the corresponding test. The string is displayed near
-;; the top of the buffer and serves as a progress bar.
-(defvar ert-results-progress-bar-string)
-;; The position where the progress bar button begins.
-(defvar ert-results-progress-bar-button-begin)
-;; The test result listener that updates the buffer when tests are run.
-(defvar ert-results-listener)
-
-;; The same as `ert-results-stats', but dynamically bound. Used for
-;; the mode line progress indicator.
-(defvar ert-current-run-stats nil)
-
-(defun ert-format-time-iso8601 (time)
- "Format TIME in the particular variant of ISO 8601 used for timestamps in ERT."
- (format-time-string "%Y-%m-%d %T%z" time))
-
-(defun ert-insert-test-name-button (test-name)
- (insert-text-button (format "%S" test-name)
- :type 'ert-test-name-button
- 'ert-test-name test-name))
-
-(defun ert-results-update-ewoc-hf (ewoc stats)
- "Update the header and footer of EWOC to show certain information from STATS.
-
-Also sets `ert-results-progress-bar-button-begin'."
- (let ((run-count (+ (ert-stats-passed-expected stats)
- (ert-stats-passed-unexpected stats)
- (ert-stats-failed-expected stats)
- (ert-stats-failed-unexpected stats)
- (ert-stats-error-expected stats)
- (ert-stats-error-unexpected stats)))
- (results-buffer (current-buffer)))
- (ewoc-set-hf
- ewoc
- ;; header
- (with-temp-buffer
- (insert "Selector: ")
- (ert-insert-human-readable-selector (ert-stats-selector stats))
- (insert "\n")
- (insert
- (format (concat "Passed: %s (%s unexpected)\n"
- "Failed: %s (%s unexpected)\n"
- "Error: %s (%s unexpected)\n"
- "Total: %s/%s\n\n")
- (+ (ert-stats-passed-expected stats)
- (ert-stats-passed-unexpected stats))
- (ert-stats-passed-unexpected stats)
- (+ (ert-stats-failed-expected stats)
- (ert-stats-failed-unexpected stats))
- (ert-stats-failed-unexpected stats)
- (+ (ert-stats-error-expected stats)
- (ert-stats-error-unexpected stats))
- (ert-stats-error-unexpected stats)
- run-count
- (ert-stats-total stats)))
- (insert
- (format "Started at: %s\n"
- (ert-format-time-iso8601 (ert-stats-start-time stats))))
- ;; FIXME: This is ugly. Need to properly define invariants of
- ;; the `stats' data structure.
- (let ((state (cond ((ert-stats-aborted-p stats)
- 'aborted)
- ((ert-stats-current-test stats)
- 'running)
- ((ert-stats-end-time stats)
- 'finished)
- (t
- 'preparing))))
- (ecase state
- (preparing
- (insert ""))
- (aborted
- (cond ((ert-stats-current-test stats)
- (insert "Aborted during test: ")
- (ert-insert-test-name-button
- (ert-test-name (ert-stats-current-test stats))))
- (t
- (insert "Aborted."))))
- (running
- (assert (ert-stats-current-test stats))
- (insert "Running test: ")
- (ert-insert-test-name-button (ert-test-name
- (ert-stats-current-test stats))))
- (finished
- (assert (not (ert-stats-current-test stats)))
- (insert "Finished.")))
- (insert "\n")
- (if (ert-stats-end-time stats)
- (insert
- (format "%s%s\n"
- (if (ert-stats-aborted-p stats)
- "Aborted at: "
- "Finished at: ")
- (ert-format-time-iso8601 (ert-stats-end-time stats))))
- (insert "\n"))
- (insert "\n"))
- (let ((progress-bar-string (with-current-buffer results-buffer
- ert-results-progress-bar-string)))
- (let ((progress-bar-button-begin
- (insert-text-button (substring progress-bar-string 0 run-count)
- :type 'ert-results-progress-bar-button)))
- (with-current-buffer results-buffer
- (set (make-local-variable 'ert-results-progress-bar-button-begin)
- progress-bar-button-begin)))
- (insert (substring progress-bar-string run-count)))
- (insert "\n\n")
- (buffer-string))
- ;; footer
- ;;
- ;; We actually want an empty footer, but that would trigger a bug
- ;; in ewoc, sometimes clearing the entire buffer.
- "\n")))
-
-(defun ert-results-update-stats-display (ewoc stats)
- "Update EWOC and the mode line to show data from STATS."
- (ert-results-update-ewoc-hf ewoc stats)
- (force-mode-line-update)
- (redisplay t))
-
-(defun ert-char-for-test-result (result expectedp)
- "Return a character that represents the test result RESULT."
- (let ((char
- (etypecase result
- (ert-test-passed ?.)
- (ert-test-failed ?f)
- (ert-test-error ?e)
- (null ?-)
- (ert-test-aborted-with-non-local-exit ?a))))
- (if expectedp
- char
- (upcase char))))
-
-(defun ert-string-for-test-result (result expectedp)
- "Return a string that represents the test result RESULT."
- (etypecase result
- (ert-test-passed "passed")
- (ert-test-failed "failed")
- (ert-test-error "error")
- (null "unknown")
- (ert-test-aborted-with-non-local-exit "aborted")))
-
-(defun ert-tests-running-mode-line-indicator ()
- (let* ((stats ert-current-run-stats)
- (tests-total (ert-stats-total stats))
- (tests-completed (+ (ert-stats-passed-expected stats)
- (ert-stats-passed-unexpected stats)
- (ert-stats-failed-expected stats)
- (ert-stats-failed-unexpected stats)
- (ert-stats-error-expected stats)
- (ert-stats-error-unexpected stats))))
- (if (>= tests-completed tests-total)
- (format " ERT(%s/%s,finished)" tests-completed tests-total)
- (format " ERT(%s/%s):%s"
- (1+ tests-completed)
- tests-total
- (if (null (ert-stats-current-test stats))
- "?"
- (format "%S"
- (ert-test-name (ert-stats-current-test stats))))))))
-
-(defun ert-pp-with-indentation-and-newline (object)
- "Pretty-print OBJECT, indenting it to the current column of point.
-Ensures a final newline is inserted."
- (let ((begin (point)))
- (pp object (current-buffer))
- (unless (bolp) (insert "\n"))
- (save-excursion
- (goto-char begin)
- (indent-sexp))))
-
-(defun ert-print-test-for-ewoc (entry)
- "The ewoc print function for ewoc test entries."
- (let* ((test (ert-ewoc-entry-test entry))
- (result (ert-ewoc-entry-result entry))
- (hiddenp (ert-ewoc-entry-hidden-p entry))
- (expandedp (ert-ewoc-entry-expanded-p entry))
- (extended-printer-limits-p (ert-ewoc-entry-extended-printer-limits-p
- entry)))
- (cond (hiddenp)
- (t
- (insert-text-button (format "%c"
- (ert-char-for-test-result
- result
- (ert-test-result-expected-p test
- result)))
- :type 'ert-results-expand-collapse-button)
- (insert " ")
- (ert-insert-test-name-button (ert-test-name test))
- (insert "\n")
- (when (and expandedp (not (eql result 'nil)))
- (etypecase result
- (ert-test-passed
- (insert " passed\n")
- (insert ""))
- (ert-test-result-with-condition
- (insert " ")
- (let ((print-escape-newlines t)
- (print-level (if extended-printer-limits-p 10 5))
- (print-length (if extended-printer-limits-p 100 10)))
- (let ((begin (point)))
- (ert-pp-with-indentation-and-newline
- (ert-test-result-with-condition-condition result))
- (save-restriction
- (narrow-to-region begin (point))
- ;; Inhibit optimization in `debugger-make-xrefs'
- ;; that sometimes inserts unrelated backtrace
- ;; info into our buffer.
- (let ((debugger-previous-backtrace nil))
- (debugger-make-xrefs))))))
- (ert-test-aborted-with-non-local-exit
- (insert " aborted\n")))
- (insert "\n")))))
- nil)
-
-(defun ert-setup-results-buffer (stats listener buffer-name)
- "Set up a test results buffer."
- (unless buffer-name (setq buffer-name "*ert*"))
- (let ((buffer (let ((default-major-mode 'fundamental-mode))
- (get-buffer-create buffer-name))))
- (with-current-buffer buffer
- (setq buffer-read-only t)
- (let ((inhibit-read-only t))
- (buffer-disable-undo)
- (erase-buffer)
- (ert-results-mode)
- (set (make-local-variable 'ert-results-ewoc)
- (ewoc-create 'ert-print-test-for-ewoc nil nil t))
- (set (make-local-variable 'ert-results-stats) stats)
- (set (make-local-variable 'ert-results-progress-bar-string)
- (make-string (ert-stats-total stats)
- (ert-char-for-test-result nil t)))
- (set (make-local-variable 'ert-results-listener) listener)
- (ert-results-update-ewoc-hf ert-results-ewoc ert-results-stats)
- (goto-char (1- (point-max)))
- buffer))))
-
-(defun ert-run-or-rerun-test (stats test listener)
- "Run the single test TEST and record the result using STATS and LISTENER."
- (let ((ert-current-run-stats stats)
- (pos (ert-stats-test-index stats test))
- (results (ert-stats-test-results stats))
- (expected (ert-stats-test-results-expected stats)))
- ;; Adjust stats to remove previous result.
- (if (aref expected pos)
- (etypecase (aref results pos)
- (ert-test-passed (decf (ert-stats-passed-expected stats)))
- (ert-test-failed (decf (ert-stats-failed-expected stats)))
- (ert-test-error (decf (ert-stats-error-expected stats)))
- (null)
- (ert-test-aborted-with-non-local-exit))
- (etypecase (aref results pos)
- (ert-test-passed (decf (ert-stats-passed-unexpected stats)))
- (ert-test-failed (decf (ert-stats-failed-unexpected stats)))
- (ert-test-error (decf (ert-stats-error-unexpected stats)))
- (null)
- (ert-test-aborted-with-non-local-exit)))
- (setf (aref results pos) nil)
- ;; Call listener after setting/before resetting
- ;; (ert-stats-current-test stats); the listener might refresh the
- ;; mode line display, and if the value is not set yet/any more
- ;; during this refresh, the mode line will flicker unnecessarily.
- (setf (ert-stats-current-test stats) test)
- (funcall listener 'test-started stats test)
- (setf (ert-test-most-recent-result test) nil)
- (unwind-protect
- (ert-run-test test)
- (let* ((result (ert-test-most-recent-result test))
- (expectedp (typep result (ert-test-expected-result-type test))))
- ;; Adjust stats to add new result.
- (if expectedp
- (etypecase result
- (ert-test-passed (incf (ert-stats-passed-expected stats)))
- (ert-test-failed (incf (ert-stats-failed-expected stats)))
- (ert-test-error (incf (ert-stats-error-expected stats)))
- (null)
- (ert-test-aborted-with-non-local-exit))
- (etypecase result
- (ert-test-passed (incf (ert-stats-passed-unexpected stats)))
- (ert-test-failed (incf (ert-stats-failed-unexpected stats)))
- (ert-test-error (incf (ert-stats-error-unexpected stats)))
- (null)
- (ert-test-aborted-with-non-local-exit)))
- (setf (aref results pos) result
- (aref expected pos) expectedp)
- (funcall listener 'test-ended stats test result))
- (setf (ert-stats-current-test stats) nil))))
-
-(defun ert-run-tests (selector listener)
- "Run the tests specified by SELECTOR, sending progress updates to LISTENER."
- (let* ((tests (coerce (ert-select-tests selector t) 'vector))
- (map (let ((map (make-hash-table :size (length tests))))
- (loop for i from 0
- for test across tests
- for key = (or (ert-test-name test) test) do
- (assert (not (gethash key map)))
- (setf (gethash key map) i))
- map))
- (stats (make-ert-stats :selector selector
- :tests tests
- :test-map map
- :test-results (make-vector (length tests) nil)
- :test-results-expected (make-vector
- (length tests) nil)
- :total (length tests)
- :start-time (current-time))))
- (funcall listener 'run-started stats)
- (let ((abortedp t))
- (let ((ert-current-run-stats stats))
- (force-mode-line-update)
- (unwind-protect
- (progn
- (loop for test across tests do
- (ert-run-or-rerun-test stats test listener))
- (setq abortedp nil))
- (setf (ert-stats-aborted-p stats) abortedp)
- (setf (ert-stats-end-time stats) (current-time))
- (funcall listener 'run-ended stats abortedp)))
- stats)))
-
-(defun ert-stats-test-index (stats test)
- "Return the index of TEST in the run represented by STATS."
- (gethash (or (ert-test-name test) test) (ert-stats-test-map stats)))
-
-(defvar ert-selector-history nil
- "List of recent test selectors read from terminal.")
-
-;; Fix-me: return (regep (list of matches))?
-;; Fix-me: Add prompt parameter?
-(defun ert-read-test-selector ()
- "Read a regexp for test selection from minibuffer.
-The user can use TAB to see which tests match."
- (let* ((all-tests
- (mapcar (lambda (rec) (format "%s" (elt rec 1)))
- (ert-select-tests "" t))
- ;;'("ert-group1-1" "ert-group1-2" "ert-other")
- )
- regexp
- ret
- (get-completions
- (lambda ()
- (let* ((ret (save-match-data
- (mapcar (lambda (alt)
- (when (string-match regexp alt)
- alt))
- all-tests))))
- (setq ret (delq nil ret))
- ret))))
- (setq all-tests (append all-tests
- '(":new"
- ":failed" ":passed" ":error"
- )
- nil))
- (let ((mini-map (copy-keymap minibuffer-local-map)))
- (define-key mini-map [?\t]
- (lambda () (interactive)
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list
- (progn
- (setq regexp (minibuffer-contents))
- (set-text-properties 0 (length regexp) nil regexp)
- (funcall get-completions))))))
- (setq regexp
- (let* ((sym-here (thing-at-point 'symbol))
- (test-here (when (and sym-here
- (memq sym-here all-tests))
- sym-here))
- (default (if sym-here
- (substring-no-properties sym-here)
- (if ert-selector-history
- (first ert-selector-history)
- "t"))))
- (read-from-minibuffer
- (if (null default)
- "Run tests, use TAB to see matches: "
- (format "Run tests, use TAB to see matches (default %s): "
- default))
- nil ;; initial-contents
- mini-map ;; keymap
- nil ;; read
- 'ert-selector-history
- default nil))))
- (setq ret regexp)
- (when (string= "t" ret)
- (setq ret t))
- ret))
-
-;; Should OUTPUT-BUFFER-NAME and MESSAGE-FN really be arguments here?
-;; They are needed only for our automated self-tests at the moment.
-;; Or should there be some other mechanism?
-;;;###autoload
-(defun ert-run-tests-interactively (selector
- &optional output-buffer-name message-fn)
- "Run the tests specified by SELECTOR and display the results in a buffer."
- (interactive
-;;; (list (let ((default (if ert-selector-history
-;;; (first ert-selector-history)
-;;; "t")))
-;;; (read-from-minibuffer (if (null default)
-;;; "Run tests: "
-;;; (format "Run tests (default %s): " default))
-;;; ;;nil nil t 'ert-selector-history
-;;; ;;
-;;; ;; fix-me: seems like I am misunderstanding Christians intent here.
-;;; nil nil nil 'ert-selector-history
-;;; default nil))
-;;; nil nil))
- (list (ert-read-test-selector)
- nil nil))
- (unless message-fn (setq message-fn 'message))
- (lexical-let ((output-buffer-name output-buffer-name)
- buffer
- listener
- (message-fn message-fn))
- (setq listener
- (lambda (event-type &rest event-args)
- (ecase event-type
- (run-started
- (destructuring-bind (stats) event-args
- (setq buffer (ert-setup-results-buffer stats
- listener
- output-buffer-name))
- (pop-to-buffer buffer)))
- (run-ended
- (destructuring-bind (stats abortedp) event-args
- (funcall message-fn
- "%sRan %s tests, %s results were as expected%s"
- (if (not abortedp)
- ""
- "Aborted: ")
- (ert-stats-total stats)
- (+ (ert-stats-passed-expected stats)
- (ert-stats-failed-expected stats)
- (ert-stats-error-expected stats))
- (let ((unexpected
- (+ (ert-stats-passed-unexpected stats)
- (ert-stats-failed-unexpected stats)
- (ert-stats-error-unexpected stats))))
- (if (zerop unexpected)
- ""
- (format ", %s unexpected" unexpected))))
- (ert-results-update-stats-display (with-current-buffer buffer
- ert-results-ewoc)
- stats)))
- (test-started
- (destructuring-bind (stats test) event-args
- (with-current-buffer buffer
- (let* ((ewoc ert-results-ewoc)
- (pos (ert-stats-test-index stats test))
- (node (ewoc-nth ewoc pos)))
- (unless node
- ;; FIXME: How expensive is this assertion?
- (assert (or (zerop pos) (ewoc-nth ewoc (1- pos)))
- t)
- (setq node (ewoc-enter-last
- ewoc
- (make-ert-ewoc-entry :test test
- :hidden-p t))))
- (setf (ert-ewoc-entry-test (ewoc-data node)) test)
- (setf (ert-ewoc-entry-result (ewoc-data node)) nil)
- (aset ert-results-progress-bar-string pos
- (ert-char-for-test-result nil t))
- (ert-results-update-stats-display ewoc stats)
- (ewoc-invalidate ewoc node)))))
- (test-ended
- (destructuring-bind (stats test result) event-args
- (with-current-buffer buffer
- (let* ((ewoc ert-results-ewoc)
- (pos (ert-stats-test-index stats test))
- (node (ewoc-nth ewoc pos)))
- (setf (ert-ewoc-entry-result (ewoc-data node)) result)
- (when (ert-ewoc-entry-hidden-p (ewoc-data node))
- (setf (ert-ewoc-entry-hidden-p (ewoc-data node))
- (ert-test-result-expected-p test result)))
- (aset ert-results-progress-bar-string pos
- (ert-char-for-test-result result
- (ert-test-result-expected-p
- test result)))
- (ert-results-update-stats-display ewoc stats)
- (ewoc-invalidate ewoc node))))))))
- (ert-run-tests
- selector
- listener)))
-
-(defvar ert-batch-backtrace-right-margin 70
- "*The maximum line length for printing backtraces in `ert-run-tests-batch'.")
-
-(defun ert-run-tests-batch (selector)
- "Run the tests specified by SELECTOR, printing results to the terminal.
-
-Returns the stats object."
- (ert-run-tests
- selector
- (lambda (event-type &rest event-args)
- (ecase event-type
- (run-started
- (destructuring-bind (stats) event-args
- (message "Running %s tests (%s)"
- (length (ert-stats-tests stats))
- (ert-format-time-iso8601 (ert-stats-start-time stats)))))
- (run-ended
- (destructuring-bind (stats abortedp) event-args
- (let ((unexpected (+ (ert-stats-passed-unexpected stats)
- (ert-stats-failed-unexpected stats)
- (ert-stats-error-unexpected stats))))
- (message "\n%sRan %s tests, %s results were as expected%s (%s)\n"
- (if (not abortedp)
- ""
- "Aborted: ")
- (ert-stats-total stats)
- (+ (ert-stats-passed-expected stats)
- (ert-stats-failed-expected stats)
- (ert-stats-error-expected stats))
- (if (zerop unexpected)
- ""
- (format ", %s unexpected" unexpected))
- (ert-format-time-iso8601 (ert-stats-end-time stats)))
- (unless (zerop unexpected)
- (message "%s unexpected results:" unexpected)
- (loop for test across (ert-stats-tests stats)
- for result = (ert-test-most-recent-result test) do
- (when (not (ert-test-result-expected-p test result))
- (message "%9s %S"
- (ert-string-for-test-result result nil)
- (ert-test-name test))))
- (message "%s" "")))))
- (test-started
- )
- (test-ended
- (destructuring-bind (stats test result) event-args
- (etypecase result
- (ert-test-passed)
- (ert-test-result-with-condition
- (message "Test %S backtrace:" (ert-test-name test))
- (with-temp-buffer
- (ert-print-backtrace (ert-test-result-with-condition-backtrace result))
- (goto-char (point-min))
- (while (not (eobp))
- (let ((start (point))
- (end (progn (end-of-line) (point))))
- (setq end (min end
- (+ start ert-batch-backtrace-right-margin)))
- (message "%s" (buffer-substring-no-properties
- start end)))
- (forward-line 1)))
- (with-temp-buffer
- (insert " ")
- (let ((print-escape-newlines t)
- (print-level 5)
- (print-length 10))
- (let ((begin (point)))
- (ert-pp-with-indentation-and-newline
- (ert-test-result-with-condition-condition result))))
- (goto-char (1- (point-max)))
- (assert (looking-at "\n"))
- (delete-char 1)
- (message "Test %S condition:" (ert-test-name test))
- (message "%s" (buffer-string))))
- (ert-test-aborted-with-non-local-exit))
- (let* ((max (prin1-to-string (length (ert-stats-tests stats))))
- (format-string (concat "%9s %"
- (prin1-to-string (length max))
- "s/" max " %S")))
- (message format-string
- (ert-string-for-test-result result
- (ert-test-result-expected-p
- test result))
- (1+ (ert-stats-test-index stats test))
- (ert-test-name test)))))))))
-
-
-;;; Commands and button actions for the results buffer.
-
-(define-derived-mode ert-results-mode fundamental-mode "ERT-Results"
- "Major mode for viewing results of ERT test runs.")
-
-(loop for (key binding) in
- '(("j" ert-results-jump-between-summary-and-result)
- ("." ert-results-find-test-at-point-other-window)
- ("r" ert-results-rerun-test-at-point)
- ("d" ert-results-rerun-test-at-point-debugging-errors)
- ("b" ert-results-pop-to-backtrace-for-test-at-point)
- ("m" ert-results-pop-to-messages-for-test-at-point)
- ("p" ert-results-toggle-printer-limits-for-test-at-point)
- ("D" ert-delete-test)
- ([?\t] forward-button)
- ([backtab] backward-button)
- )
- do
- (define-key ert-results-mode-map key binding))
-
-(define-button-type 'ert-results-progress-bar-button
- 'action #'ert-results-progress-bar-button-action
- 'help-echo "mouse-2, RET: Reveal test result")
-
-(define-button-type 'ert-test-name-button
- 'action #'ert-test-name-button-action
- 'help-echo "mouse-2, RET: Find test definition")
-
-(define-button-type 'ert-results-expand-collapse-button
- 'action #'ert-results-expand-collapse-button-action
- 'help-echo "mouse-2, RET: Expand/collapse test result")
-
-(defun ert-results-test-node-or-null-at-point ()
- "If point is on a valid ewoc node, return it; return nil otherwise.
-
-To be used in the ERT results buffer."
- (let* ((ewoc ert-results-ewoc)
- (node (ewoc-locate ewoc)))
- ;; `ewoc-locate' will return an arbitrary node when point is on
- ;; header or footer, or when all nodes are invisible. So we need
- ;; to validate its return value here.
- (if (and (>= (point) (ewoc-location node))
- (not (ert-ewoc-entry-hidden-p (ewoc-data node))))
- node
- nil)))
-
-(defun ert-results-test-node-at-point ()
- "If point is on a valid ewoc node, return it; signal an error otherwise.
-
-To be used in the ERT results buffer."
- (or (ert-results-test-node-or-null-at-point)
- (error "No test at point")))
-
-(defun ert-results-expand-collapse-button-action (button)
- "Expand or collapse the test node BUTTON belongs to."
- (let* ((ewoc ert-results-ewoc)
- (node (save-excursion
- (goto-char (ert-button-action-position))
- (ert-results-test-node-at-point)))
- (entry (ewoc-data node)))
- (setf (ert-ewoc-entry-expanded-p entry)
- (not (ert-ewoc-entry-expanded-p entry)))
- (ewoc-invalidate ewoc node)))
-
-(defun ert-results-find-test-at-point-other-window ()
- "Find the definition of the test at point in another window.
-
-To be used in the ERT results buffer."
- (interactive)
- (let* ((node (ert-results-test-node-at-point))
- (entry (ewoc-data node))
- (test (ert-ewoc-entry-test entry))
- (name (ert-test-name test)))
- (ert-find-test-other-window name)))
-
-(defun ert-test-name-button-action (button)
- "Find the definition of the test BUTTON belongs to, in another window."
- (let ((name (button-get button 'ert-test-name)))
- (ert-find-test-other-window name)))
-
-(defun ert-ewoc-position (ewoc node)
- "Return the position of NODE in EWOC, or nil if NODE is not in EWOC."
- (loop for i from 0
- for node-here = (ewoc-nth ewoc 0) then (ewoc-next ewoc node-here)
- do (when (eql node node-here)
- (return i))
- finally (return nil)))
-
-(defun ert-results-jump-between-summary-and-result ()
- "Jump back and forth between the test run summary and individual test results.
-
-From an ewoc node, jumps to the character that represents the
-same test in the progress bar, and vice versa.
-
-To be used in the ERT results buffer."
- ;; Maybe this command isn't actually needed much, but if it is, it
- ;; seems like an indication that the UI design is not optimal. If
- ;; jumping back and forth between a summary at the top of the buffer
- ;; and the error log in the remainder of the buffer is useful, then
- ;; the summary apparently needs to be easily accessible from the
- ;; error log, and perhaps it would be better to have it in a
- ;; separate buffer to keep it visible.
- (interactive)
- (let ((ewoc ert-results-ewoc)
- (progress-bar-begin ert-results-progress-bar-button-begin))
- (cond ((ert-results-test-node-or-null-at-point)
- (let* ((node (ert-results-test-node-at-point))
- (pos (ert-ewoc-position ewoc node)))
- (goto-char (+ progress-bar-begin pos))))
- ((and (<= progress-bar-begin (point))
- (< (point) (button-end (button-at progress-bar-begin))))
- (let* ((node (ewoc-nth ewoc (- (point) progress-bar-begin)))
- (entry (ewoc-data node)))
- (when (ert-ewoc-entry-hidden-p entry)
- (setf (ert-ewoc-entry-hidden-p entry) nil)
- (ewoc-invalidate ewoc node))
- (ewoc-goto-node ewoc node)))
- (t
- (goto-char progress-bar-begin)))))
-
-(defun ert-button-action-position ()
- "The buffer position where the last button action was triggered."
- (cond ((integerp last-command-event)
- (point))
- ((eventp last-command-event)
- (posn-point (event-start last-command-event)))
- (t (assert nil))))
-
-(defun ert-results-progress-bar-button-action (button)
- "Find the ewoc node that represents the same test as the character clicked on."
- (goto-char (ert-button-action-position))
- (ert-results-jump-between-summary-and-result))
-
-(defun ert-results-rerun-test-at-point ()
- "Re-run the test at point.
-
-To be used in the ERT results buffer."
- (interactive)
- (let* ((ewoc ert-results-ewoc)
- (node (ert-results-test-node-at-point))
- (entry (ewoc-data node))
- (old-test (ert-ewoc-entry-test entry))
- (test-name (ert-test-name old-test))
- ;; FIXME: Write a test for this lookup.
- (test (if test-name
- (if (ert-test-boundp test-name)
- (ert-get-test test-name)
- (error "No such test: %S" test-name))
- old-test))
- (stats ert-results-stats)
- (pos (gethash test (ert-stats-test-map stats)))
- (progress-message (format "Running test %S" (ert-test-name test))))
- ;; Need to save and restore point manually here: When point is on
- ;; the first visible ewoc entry while the header is updated, point
- ;; moves to the top of the buffer. This is undesirable, and a
- ;; simple `save-excursion' doesn't prevent it.
- (let ((point (point)))
- (unwind-protect
- (unwind-protect
- (progn
- (message "%s..." progress-message)
- (ert-run-or-rerun-test stats test
- ert-results-listener))
- (ert-results-update-stats-display ewoc stats)
- (message "%s...%s"
- progress-message
- (let ((result (ert-test-most-recent-result test)))
- (ert-string-for-test-result
- result (ert-test-result-expected-p test result)))))
- (goto-char point)))))
-
-(defun ert-results-rerun-test-at-point-debugging-errors ()
- "Re-run the test at point with `ert-debug-on-error' bound to t.
-
-To be used in the ERT results buffer."
- (interactive)
- (let ((ert-debug-on-error t))
- (ert-results-rerun-test-at-point)))
-
-(defun ert-print-backtrace (backtrace)
- "Format the backtrace BACKTRACE to the current buffer."
- ;; This is essentially a reimplementation of Fbacktrace
- ;; (src/eval.c), but for a saved backtrace, not the current one.
- (let ((print-escape-newlines t)
- (print-level 8)
- (print-length 50))
- (dolist (frame backtrace)
- (ecase (first frame)
- ((nil)
- ;; Special operator.
- (destructuring-bind (special-operator &rest arg-forms)
- (cdr frame)
- (insert
- (format " %S\n" (list* special-operator arg-forms)))))
- ((t)
- ;; Function call.
- (destructuring-bind (fn &rest args) (cdr frame)
- (insert (format " %S(" fn))
- (loop for firstp = t then nil
- for arg in args do
- (unless firstp
- (insert " "))
- (insert (format "%S" arg)))
- (insert ")\n")))))))
-
-(defun ert-results-pop-to-backtrace-for-test-at-point ()
- "Display the backtrace for the test at point.
-
-To be used in the ERT results buffer."
- (interactive)
- (let* ((node (ert-results-test-node-at-point))
- (entry (ewoc-data node))
- (test (ert-ewoc-entry-test entry))
- (result (ert-ewoc-entry-result entry)))
- (etypecase result
- (ert-test-passed (error "Test passed, no backtrace available"))
- (ert-test-result-with-condition
- (let ((backtrace (ert-test-result-with-condition-backtrace result))
- (buffer
- (let ((default-major-mode 'fundamental-mode))
- (get-buffer-create "*ERT Backtrace*"))))
- (pop-to-buffer buffer)
- (setq buffer-read-only t)
- (let ((inhibit-read-only t))
- (erase-buffer)
- ;; Use unibyte because `debugger-setup-buffer' also does so.
- (set-buffer-multibyte nil)
- (setq truncate-lines t)
- (ert-print-backtrace backtrace)
- (debugger-make-xrefs)
- (goto-char (point-min))))))))
-
-(defun ert-results-pop-to-messages-for-test-at-point ()
- "Display the part of the *Messages* buffer generated during the test at point.
-
-To be used in the ERT results buffer."
- (interactive)
- (let* ((node (ert-results-test-node-at-point))
- (entry (ewoc-data node))
- (test (ert-ewoc-entry-test entry))
- (result (ert-ewoc-entry-result entry)))
- (let ((buffer
- (let ((default-major-mode 'fundamental-mode))
- (get-buffer-create "*ERT Messages*"))))
- (pop-to-buffer buffer)
- (setq buffer-read-only t)
- (let ((inhibit-read-only t))
- (erase-buffer)
- (insert (ert-test-result-messages result))
- (goto-char (point-min))
- (insert "Messages for test `")
- (ert-insert-test-name-button (ert-test-name test))
- (insert "':\n")))))
-
-(defun ert-results-toggle-printer-limits-for-test-at-point ()
- "Toggle how much of the condition to print for the test at point.
-
-To be used in the ERT results buffer."
- (interactive)
- (let* ((ewoc ert-results-ewoc)
- (node (ert-results-test-node-at-point))
- (entry (ewoc-data node)))
- (setf (ert-ewoc-entry-extended-printer-limits-p entry)
- (not (ert-ewoc-entry-extended-printer-limits-p entry)))
- (ewoc-invalidate ewoc node)))
-
-(defun ert-activate-font-lock-keywords ()
- (font-lock-add-keywords
- nil
- '(("(\\(\\<ert-deftest\\)\\>\\s *\\(\\sw+\\)?"
- (1 font-lock-keyword-face nil t)
- (2 font-lock-function-name-face nil t)))))
-
-(defun* ert-remove-from-list (list-var element &key key test)
- "Remove ELEMENT from the value of LIST-VAR if present.
-
-This is an inverse of `add-to-list'."
- (unless key (setq key #'identity))
- (unless test (setq test #'equal))
- (setf (symbol-value list-var)
- (remove* element
- (symbol-value list-var)
- :key key
- :test test)))
-
-
-;;; Actions on load/unload.
-
-(add-to-list 'find-function-regexp-alist '(ert-deftest . ert-find-test-regexp))
-(add-to-list 'minor-mode-alist '(ert-current-run-stats
- (:eval
- (ert-tests-running-mode-line-indicator))))
-(add-to-list 'emacs-lisp-mode-hook 'ert-activate-font-lock-keywords)
-
-(defun ert-unload-function ()
- (ert-remove-from-list 'find-function-regexp-alist 'ert-deftest :key #'car)
- (ert-remove-from-list 'minor-mode-alist 'ert-current-run-stats :key #'car)
- (ert-remove-from-list 'emacs-lisp-mode-hook 'ert-activate-font-lock-keywords)
- nil)
-
-(defvar ert-unload-hook '())
-(add-hook 'ert-unload-hook 'ert-unload-function)
-
-
-;;; Self-tests.
-
-(ert-delete-all-tests)
-
-;; Test that test bodies are actually run.
-(defvar ert-test-body-was-run)
-(ert-deftest ert-test-body-runs ()
- (setq ert-test-body-was-run t))
-
-
-;; Test that nested test bodies run.
-(ert-deftest ert-nested-test-body-runs ()
- (lexical-let ((was-run nil))
- (let ((test (make-ert-test :body (lambda ()
- (setq was-run t)))))
- (assert (not was-run))
- (ert-run-test test)
- (assert was-run))))
-
-
-;; Test that pass/fail works.
-(ert-deftest ert-test-pass ()
- (let ((test (make-ert-test :body (lambda ()))))
- (let ((result (ert-run-test test)))
- (assert (typep result 'ert-test-passed)))))
-
-(ert-deftest ert-test-fail ()
- (let ((test (make-ert-test :body (lambda () (ert-fail "failure message")))))
- (let ((result (let ((ert-debug-on-error nil))
- (ert-run-test test))))
- (assert (typep result 'ert-test-failed) t)
- (assert (equal (ert-test-result-with-condition-condition result)
- '(ert-test-failed "failure message"))
- t))))
-
-(ert-deftest ert-test-fail-debug-with-condition-case ()
- (let ((test (make-ert-test :body (lambda () (ert-fail "failure message")))))
- (condition-case condition
- (progn
- (let ((ert-debug-on-error t))
- (ert-run-test test))
- (assert nil))
- ((error)
- (assert (equal condition '(ert-test-failed "failure message")) t)))))
-
-(ert-deftest ert-test-fail-debug-with-debugger-1 ()
- (let ((test (make-ert-test :body (lambda () (ert-fail "failure message")))))
- (let ((debugger (lambda (&rest debugger-args)
- (assert nil))))
- (let ((ert-debug-on-error nil))
- (ert-run-test test)))))
-
-(ert-deftest ert-test-fail-debug-with-debugger-2 ()
- (let ((test (make-ert-test :body (lambda () (ert-fail "failure message")))))
- (block nil
- (let ((debugger (lambda (&rest debugger-args)
- (return-from nil nil))))
- (let ((ert-debug-on-error t))
- (ert-run-test test))
- (assert nil)))))
-
-(ert-deftest ert-test-fail-debug-nested-with-debugger ()
- (let ((test (make-ert-test :body (lambda ()
- (let ((ert-debug-on-error t))
- (ert-fail "failure message"))))))
- (let ((debugger (lambda (&rest debugger-args)
- (assert nil nil "Assertion a"))))
- (let ((ert-debug-on-error nil))
- (ert-run-test test))))
- (let ((test (make-ert-test :body (lambda ()
- (let ((ert-debug-on-error nil))
- (ert-fail "failure message"))))))
- (block nil
- (let ((debugger (lambda (&rest debugger-args)
- (return-from nil nil))))
- (let ((ert-debug-on-error t))
- (ert-run-test test))
- (assert nil nil "Assertion b")))))
-
-(ert-deftest ert-test-error ()
- (let ((test (make-ert-test :body (lambda () (error "error message")))))
- (let ((result (let ((ert-debug-on-error nil))
- (ert-run-test test))))
- (assert (typep result 'ert-test-error) t)
- (assert (equal (ert-test-result-with-condition-condition result)
- '(error "error message"))
- t))))
-
-(ert-deftest ert-test-error-debug ()
- (let ((test (make-ert-test :body (lambda () (error "error message")))))
- (condition-case condition
- (progn
- (let ((ert-debug-on-error t))
- (ert-run-test test))
- (assert nil))
- ((error)
- (assert (equal condition '(error "error message")) t)))))
-
-
-;; Test that `should' works.
-(ert-deftest ert-test-should ()
- (let ((test (make-ert-test :body (lambda () (ert-should nil)))))
- (let ((result (let ((ert-debug-on-error nil))
- (ert-run-test test))))
- (assert (typep result 'ert-test-failed) t)
- (assert (equal (ert-test-result-with-condition-condition result)
- '(ert-test-failed ((ert-should nil) :form nil :value nil)))
- t)))
- (let ((test (make-ert-test :body (lambda () (ert-should t)))))
- (let ((result (ert-run-test test)))
- (assert (typep result 'ert-test-passed) t))))
-
-(ert-deftest ert-test-should-value ()
- (ert-should (eql (ert-should 'foo) 'foo))
- (ert-should (eql (ert-should 'bar) 'bar)))
-
-(ert-deftest ert-test-should-not ()
- (let ((test (make-ert-test :body (lambda () (ert-should-not t)))))
- (let ((result (let ((ert-debug-on-error nil))
- (ert-run-test test))))
- (assert (typep result 'ert-test-failed) t)
- (assert (equal (ert-test-result-with-condition-condition result)
- '(ert-test-failed ((ert-should-not t) :form t :value t)))
- t)))
- (let ((test (make-ert-test :body (lambda () (ert-should-not nil)))))
- (let ((result (ert-run-test test)))
- (assert (typep result 'ert-test-passed)))))
-
-
-(ert-deftest ert-test-should-error ()
- ;; No error.
- (let ((test (make-ert-test :body (lambda () (ert-should-error (progn))))))
- (let ((result (let ((ert-debug-on-error nil))
- (ert-run-test test))))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (progn))
- :form (progn)
- :value nil
- :fail-reason "did not signal an error"))))))
- ;; A simple error.
- (let ((test (make-ert-test :body (lambda () (ert-should-error (error "foo"))))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-passed))))
- ;; Error of unexpected type, no test.
- (let ((test (make-ert-test :body (lambda ()
- (ert-should-error (error "foo")
- :type 'singularity-error)))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal
- (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (error "foo") :type 'singularity-error)
- :form (error "foo")
- :condition (error "foo")
- :fail-reason
- "the error signalled did not have the expected type"))))))
- ;; Error of the expected type, no test.
- (let ((test (make-ert-test :body (lambda ()
- (ert-should-error (signal 'singularity-error
- nil)
- :type 'singularity-error)))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-passed))))
- ;; Error that fails the test, no type.
- (let ((test (make-ert-test :body (lambda ()
- (ert-should-error
- (error "foo")
- :test (lambda (error) nil))))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (error "foo") :test (lambda (error) nil))
- :form (error "foo")
- :condition (error "foo")
- :fail-reason
- "the error signalled did not pass the test"))))))
- ;; Error that passes the test, no type.
- (let ((test (make-ert-test :body (lambda ()
- (ert-should-error (error "foo")
- :test (lambda (error) t))))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-passed))))
- ;; Error that has the expected type but fails the test.
- (let ((test (make-ert-test :body (lambda ()
- (ert-should-error
- (signal 'singularity-error nil)
- :type 'singularity-error
- :test (lambda (error) nil))))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (signal 'singularity-error nil)
- :type 'singularity-error
- :test (lambda (error) nil))
- :form (signal singularity-error nil)
- :condition (singularity-error)
- :fail-reason
- "the error signalled did not pass the test"))))))
- ;; Error that has the expected type and passes the test.
- (let ((test (make-ert-test :body (lambda ()
- (ert-should-error
- (signal 'singularity-error nil)
- :type 'singularity-error
- :test (lambda (error) t))))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-passed))))
- )
-
-(ert-deftest ert-test-should-error-subtypes ()
- (let ((test (make-ert-test
- :body (lambda ()
- (ert-should-error (signal 'singularity-error nil)
- :type 'singularity-error
- :exclude-subtypes t)))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-passed))))
- (let ((test (make-ert-test
- :body (lambda ()
- (ert-should-error (signal 'arith-error nil)
- :type 'singularity-error)))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal
- (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (signal 'arith-error nil)
- :type 'singularity-error)
- :form (signal arith-error nil)
- :condition (arith-error)
- :fail-reason
- "the error signalled did not have the expected type"))))))
- (let ((test (make-ert-test
- :body (lambda ()
- (ert-should-error (signal 'arith-error nil)
- :type 'singularity-error
- :exclude-subtypes t)))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal
- (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (signal 'arith-error nil)
- :type 'singularity-error
- :exclude-subtypes t)
- :form (signal arith-error nil)
- :condition (arith-error)
- :fail-reason
- "the error signalled did not have the expected type"))))))
- (let ((test (make-ert-test
- :body (lambda ()
- (ert-should-error (signal 'singularity-error nil)
- :type 'arith-error
- :exclude-subtypes t)))))
- (let ((result (ert-run-test test)))
- (ert-should (typep result 'ert-test-failed))
- (ert-should (equal
- (ert-test-result-with-condition-condition result)
- '(ert-test-failed
- ((ert-should-error (signal 'singularity-error nil)
- :type 'arith-error
- :exclude-subtypes t)
- :form (signal singularity-error nil)
- :condition (singularity-error)
- :fail-reason
- "the error signalled was a subtype of the expected type"))))))
- )
-
-;; Test that `should' errors contain the information we expect them to.
-(defmacro ert-test-my-list (&rest args)
- `(list ,@args))
-
-(ert-deftest ert-test-should-failure-debugging ()
- (loop for (body expected-condition) in
- `((,(lambda () (let ((x nil)) (ert-should x)))
- (ert-test-failed ((ert-should x) :form x :value nil)))
- (,(lambda () (let ((x t)) (ert-should-not x)))
- (ert-test-failed ((ert-should-not x) :form x :value t)))
- (,(lambda () (let ((x t)) (ert-should (not x))))
- (ert-test-failed ((ert-should (not x)) :form (not t) :value nil)))
- (,(lambda () (let ((x nil)) (ert-should-not (not x))))
- (ert-test-failed ((ert-should-not (not x)) :form (not nil) :value t)))
- (,(lambda () (let ((x t) (y nil)) (ert-should-not (ert-test-my-list x y))))
- (ert-test-failed
- ((ert-should-not (ert-test-my-list x y))
- :form (list t nil)
- :value (t nil))))
- (,(lambda () (let ((x t)) (ert-should (error "foo"))))
- (error "foo")))
- do
- (let ((test (make-ert-test :body body)))
- (condition-case actual-condition
- (progn
- (let ((ert-debug-on-error t))
- (ert-run-test test))
- (assert nil))
- ((error)
- (ert-should (equal actual-condition expected-condition)))))))
-
-(ert-deftest ert-test-messages ()
- (let* ((message-string "Test message")
- (messages-buffer (get-buffer-create "*Messages*"))
- (test (make-ert-test :body (lambda () (message "%s" message-string)))))
- (with-current-buffer messages-buffer
- (let ((result (ert-run-test test)))
- (ert-should (equal (concat message-string "\n")
- (ert-test-result-messages result)))))))
-
-(defun ert-call-with-temporary-messages-buffer (thunk)
- (lexical-let ((new-buffer-name (generate-new-buffer-name
- "*Messages* orig buffer")))
- (unwind-protect
- (progn
- (with-current-buffer (get-buffer-create "*Messages*")
- (rename-buffer new-buffer-name))
- (get-buffer-create "*Messages*")
- (funcall thunk))
- (kill-buffer "*Messages*")
- (with-current-buffer new-buffer-name
- (rename-buffer "*Messages*")))))
-
-(ert-deftest ert-test-messages-on-log-truncation ()
- (let ((test (make-ert-test
- :body (lambda ()
- ;; Emacs would combine messages if we
- ;; generate the same message multiple
- ;; times.
- (message "a")
- (message "b")
- (message "c")
- (message "d")))))
- (let (result)
- (ert-call-with-temporary-messages-buffer
- (lambda ()
- (let ((message-log-max 2))
- (setq result (ert-run-test test)))
- (ert-should (equal (with-current-buffer "*Messages*"
- (buffer-string))
- "c\nd\n"))))
- (ert-should (equal (ert-test-result-messages result) "a\nb\nc\nd\n")))))
-
-;; Test `ert-select-tests'.
-(ert-deftest ert-test-select-regexp ()
- (ert-should (equal (ert-select-tests "^ert-test-select-regexp$" t)
- (list (ert-get-test 'ert-test-select-regexp)))))
-
-(ert-deftest ert-test-test-boundp ()
- (ert-should (ert-test-boundp 'ert-test-test-boundp))
- (ert-should-not (ert-test-boundp (make-symbol "ert-not-a-test"))))
-
-(ert-deftest ert-test-select-member ()
- (ert-should (equal (ert-select-tests '(member ert-test-select-member) t)
- (list (ert-get-test 'ert-test-select-member)))))
-
-(ert-deftest ert-test-select-test ()
- (ert-should (equal (ert-select-tests (ert-get-test 'ert-test-select-test) t)
- (list (ert-get-test 'ert-test-select-test)))))
-
-(ert-deftest ert-test-select-symbol ()
- (ert-should (equal (ert-select-tests 'ert-test-select-symbol t)
- (list (ert-get-test 'ert-test-select-symbol)))))
-
-(ert-deftest ert-test-select-and ()
- (let ((test (make-ert-test
- :name nil
- :body nil
- :most-recent-result (make-ert-test-failed
- :condition nil
- :backtrace nil))))
- (ert-should (equal (ert-select-tests `(and (member ,test) :failed) t)
- (list test)))))
-
-
-;; Test utility functions.
-(ert-deftest ert-proper-list-p ()
- (ert-should (ert-proper-list-p '()))
- (ert-should (ert-proper-list-p '(1)))
- (ert-should (ert-proper-list-p '(1 2)))
- (ert-should (ert-proper-list-p '(1 2 3)))
- (ert-should (ert-proper-list-p '(1 2 3 4)))
- (ert-should (not (ert-proper-list-p 'a)))
- (ert-should (not (ert-proper-list-p '(1 . a))))
- (ert-should (not (ert-proper-list-p '(1 2 . a))))
- (ert-should (not (ert-proper-list-p '(1 2 3 . a))))
- (ert-should (not (ert-proper-list-p '(1 2 3 4 . a))))
- (let ((a (list 1)))
- (setf (cdr (last a)) a)
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2)))
- (setf (cdr (last a)) a)
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3)))
- (setf (cdr (last a)) a)
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3 4)))
- (setf (cdr (last a)) a)
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2)))
- (setf (cdr (last a)) (cdr a))
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3)))
- (setf (cdr (last a)) (cdr a))
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3 4)))
- (setf (cdr (last a)) (cdr a))
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3)))
- (setf (cdr (last a)) (cddr a))
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3 4)))
- (setf (cdr (last a)) (cddr a))
- (ert-should (not (ert-proper-list-p a))))
- (let ((a (list 1 2 3 4)))
- (setf (cdr (last a)) (cdddr a))
- (ert-should (not (ert-proper-list-p a)))))
-
-(ert-deftest ert-parse-keys-and-body ()
- (ert-should (equal (ert-parse-keys-and-body "doc" '(foo))
- '(nil "doc" (foo))))
- (ert-should (equal (ert-parse-keys-and-body "doc" '(:bar foo))
- '((:bar foo) "doc" nil)))
- (ert-should (equal (ert-parse-keys-and-body nil '(:bar foo))
- '((:bar foo) nil nil)))
- (ert-should (equal (ert-parse-keys-and-body "doc" '(:bar foo))
- '((:bar foo) "doc" nil)))
- (ert-should (equal (ert-parse-keys-and-body nil '(:bar foo a (b)))
- '((:bar foo) nil (a (b)))))
- (ert-should (equal (ert-parse-keys-and-body nil '(:bar foo :a (b)))
- '((:bar foo :a (b)) nil nil)))
- (ert-should (equal (ert-parse-keys-and-body nil '(bar foo :a (b)))
- '(nil nil (bar foo :a (b)))))
- (ert-should-error (ert-parse-keys-and-body nil '(:bar foo :a))))
-
-
-
-;; Test `ert-run-tests'.
-(ert-deftest ert-test-run-tests ()
- (let ((passing-test (make-ert-test :name 'passing-test
- :body (lambda () (ert-pass))))
- (failing-test (make-ert-test :name 'failing-test
- :body (lambda () (ert-fail
- "failure message"))))
- )
- (let ((ert-debug-on-error nil))
- (let* ((buffer-name (generate-new-buffer-name " *ert-test-run-tests*"))
- (messages nil)
- (mock-message-fn
- (lambda (format-string &rest args)
- (push (apply #'format format-string args) messages))))
- (save-window-excursion
- (unwind-protect
- (let ((case-fold-search nil))
- (ert-run-tests-interactively
- `(member ,passing-test ,failing-test) buffer-name
- mock-message-fn)
- (ert-should (equal messages `(,(concat
- "Ran 2 tests, 1 results were "
- "as expected, 1 unexpected"))))
- (with-current-buffer buffer-name
- (goto-char (point-min))
- (ert-should (equal
- (buffer-substring (point-min)
- (save-excursion
- (forward-line 5)
- (point)))
- (concat
- "Selector: (member <passing-test> <failing-test>)\n"
- "Passed: 1 (0 unexpected)\n"
- "Failed: 1 (1 unexpected)\n"
- "Error: 0 (0 unexpected)\n"
- "Total: 2/2\n")))))
- (when (get-buffer buffer-name)
- (kill-buffer buffer-name))))))))
-
-(ert-deftest ert-test-special-operator-p ()
- (ert-should (ert-special-operator-p 'if))
- (ert-should-not (ert-special-operator-p 'car))
- (ert-should-not (ert-special-operator-p 'ert-special-operator-p))
- (let ((b (gensym)))
- (ert-should-not (ert-special-operator-p b))
- (fset b 'if)
- (ert-should (ert-special-operator-p b))))
-
-;; This test attempts to demonstrate that there is no way to force
-;; immediate truncation of the *Messages* buffer from Lisp (and hence
-;; justifies the existence of
-;; `ert-force-message-log-buffer-truncation'): The only way that came
-;; to my mind was (message ""), which doesn't have the desired effect.
-(ert-deftest ert-test-builtin-message-log-flushing ()
- (ert-call-with-temporary-messages-buffer
- (lambda ()
- (with-current-buffer "*Messages*"
- (let ((message-log-max 2))
- (let ((message-log-max t))
- (loop for i below 4 do
- (message "%s" i))
- (ert-should (eql (count-lines (point-min) (point-max)) 4)))
- (ert-should (eql (count-lines (point-min) (point-max)) 4))
- (message "")
- (ert-should (eql (count-lines (point-min) (point-max)) 4))
- (message "Test message")
- (ert-should (eql (count-lines (point-min) (point-max)) 2)))))))
-
-(ert-deftest ert-test-force-message-log-buffer-truncation ()
- (labels ((body ()
- (loop for i below 5 do
- (message "%s" i)))
- (c (x)
- (ert-call-with-temporary-messages-buffer
- (lambda ()
- (let ((message-log-max x))
- (body))
- (with-current-buffer "*Messages*"
- (buffer-string)))))
- (lisp (x)
- (ert-call-with-temporary-messages-buffer
- (lambda ()
- (let ((message-log-max t))
- (body))
- (let ((message-log-max x))
- (ert-force-message-log-buffer-truncation))
- (with-current-buffer "*Messages*"
- (buffer-string))))))
- (loop for x in '(0 1 2 3 4 5 6 t) do
- (ert-should (equal (c x) (lisp x))))))
-
-(defun ert-run-self-tests ()
- ;; Run tests and make sure they actually ran.
- (let ((window-configuration (current-window-configuration)))
- (let ((ert-test-body-was-run nil))
- ;; The buffer name chosen here should not compete with the default
- ;; results buffer name for completion in `switch-to-buffer'.
- (let ((stats (ert-run-tests-interactively "^ert-" " *ert self-tests*")))
- (assert ert-test-body-was-run)
- (when (zerop (+ (ert-stats-passed-unexpected stats)
- (ert-stats-failed-unexpected stats)
- (ert-stats-error-unexpected stats)))
- ;; Hide results window only when everything went well.
- (set-window-configuration window-configuration))))))
-
-(provide 'ert)
-
-;;; ert.el ends here
diff --git a/emacs.d/nxhtml/tests/ert2.el b/emacs.d/nxhtml/tests/ert2.el
deleted file mode 100644
index 1fe971c..0000000
--- a/emacs.d/nxhtml/tests/ert2.el
+++ /dev/null
@@ -1,268 +0,0 @@
-;;; ert2.el --- Additions to ert.el
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-09-02T11:46:03+0200 Tue
-;; Version:
-;; Last-Updated: 2009-01-06 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; Cannot open load file: ert2.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile
- (let* ((this-file (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
- (this-dir (file-name-directory this-file))
- (load-path (cons this-dir load-path)))
- (require 'ert)))
-
-(let* ((this-dir
- (file-name-directory (if load-file-name load-file-name buffer-file-name)))
- ;;(load-path (copy-list load-path)))
- (load-path (copy-sequence load-path)))
- (add-to-list 'load-path this-dir)
- (require 'ert))
-
-
-(defvar ert-temp-test-buffer-test nil)
-(make-variable-buffer-local 'ert-temp-test-buffer-test)
-(put 'ert-temp-test-buffer-test 'permanent-local t)
-
-(defvar ert-temp-test-buffer-file nil)
-(make-variable-buffer-local 'ert-temp-test-buffer-file)
-(put 'ert-temp-test-buffer-file 'permanent-local t)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Test buffers
-
-(defvar ert-failed-tests-temp-buffers nil)
-
-(defvar ert-list-failed-buffers-name "*Ert Failed Test Buffers*")
-
-(defun ert-kill-temp-test-buffers ()
- "Delete test buffers from unsuccessful tests."
- (interactive)
- (let ((failed (get-buffer ert-list-failed-buffers-name)))
- (when failed (kill-buffer failed)))
- (dolist (buf ert-failed-tests-temp-buffers)
- (when (buffer-live-p buf)
- (kill-buffer buf)))
- (setq ert-failed-tests-temp-buffers nil))
-
-(defun ert-list-temp-test-buffers ()
- "List test buffers from unsuccessful tests."
- (interactive)
- (setq ert-failed-tests-temp-buffers
- (delq nil
- (mapcar (lambda (buf)
- (when (buffer-live-p buf)
- buf))
- ert-failed-tests-temp-buffers)))
- (let ((ert-buffer (get-buffer "*ert*"))
- (buffers ert-failed-tests-temp-buffers))
- (when ert-buffer (setq buffers (cons ert-buffer buffers)))
- (switch-to-buffer
- (let ((Buffer-menu-buffer+size-width 40))
- (list-buffers-noselect nil buffers)))
- (rename-buffer ert-list-failed-buffers-name t))
- (unless ert-failed-tests-temp-buffers
- (message "No test buffers from unsuccessful tests")))
-
-(defvar ert-temp-test-buffer-minor-mode-map
- (let ((map (make-sparse-keymap)))
- ;; Add menu bar entries for test buffer and test function
- (define-key map [(control ?c) ?? ?t] 'ert-temp-test-buffer-go-test)
- (define-key map [(control ?c) ?? ?f] 'ert-temp-test-buffer-go-file)
- map))
-(defun ert-temp-test-buffer-go-test ()
- (interactive)
- (ert-find-test-other-window ert-temp-test-buffer-test))
-(defun ert-temp-test-buffer-go-file ()
- (interactive)
- (find-file-other-window ert-temp-test-buffer-file))
-
-(define-minor-mode ert-temp-test-buffer-minor-mode
- "Helpers for those buffers ..."
- )
-(put 'ert-temp-test-buffer-minor-mode 'permanent-local t)
-
-;; Fix-me: doc
-(defvar ert-test-files-root nil)
-(defun ert-get-test-file-name (file-name)
- (unless ert-test-files-root
- (error "Please set ert-test-files-root for your tests"))
- (unless (file-directory-p ert-test-files-root)
- (error "Can't find directory %s" ert-test-files-root))
- (expand-file-name file-name ert-test-files-root))
-
-(defmacro* ert-with-temp-buffer-include-file (file-name-form &body body)
- "Insert FILE-NAME-FORM in a temporary buffer and eval BODY.
-If success then delete the temporary buffer, otherwise keep it.
-
-To access these temporary test buffers use
-- `ert-list-temp-test-buffers': list them
-- `ert-kill-temp-test-buffers': delete them"
- (declare (indent 1) (debug t))
- (let ((file-name (make-symbol "file-name-")))
- `(let* ((,file-name (ert-get-test-file-name ,file-name-form))
- (mode-line-buffer-identification (list (propertize "%b" 'face 'highlight)))
- ;; Give the buffer a name that allows us to switch to it
- ;; quickly when debugging a failure.
- (temp-buf
- (generate-new-buffer
- (format "%s" (ert-this-test)))))
- (unless (file-readable-p ,file-name)
- (if (file-exists-p ,file-name)
- (error "Can't read %s" ,file-name)
- (error "Can't find %s" ,file-name)))
- (message "Testing with file %s" ,file-name)
- (setq ert-failed-tests-temp-buffers (cons temp-buf ert-failed-tests-temp-buffers))
- (with-current-buffer temp-buf
- (ert-temp-test-buffer-minor-mode 1)
- (setq ert-temp-test-buffer-file ,file-name)
- (setq ert-temp-test-buffer-test (ert-this-test))
- ;; Avoid global font lock
- (let ((font-lock-global-modes nil))
- ;; Turn off font lock in buffer
- (font-lock-mode -1)
- (when (> emacs-major-version 22)
- (assert (not font-lock-mode) t "%s %s" "in ert-with-temp-buffer-include-file"))
- (insert-file-contents ,file-name)
- (save-window-excursion
- ;; Switch to buffer so it will show immediately when
- ;; debugging a failure.
- (switch-to-buffer-other-window (current-buffer))
- ,@body)
- ;; Fix-me: move to success list?
- (kill-buffer temp-buf))))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Simulate commands
-
-(defvar ert-simulate-command-delay nil)
-
-(defvar ert-simulate-command-post-hook nil
- "Normal hook to be run at end of `ert-simulate-command'.")
-
-;; Fix-me: use this in all tests where applicable.
-(defun ert-simulate-command (command run-idle-timers)
- ;; Fix-me: run-idle-timers - use seconds
- ;; Fix-me: add unread-events
- "Simulate calling command COMMAND as in Emacs command loop.
-If RUN-IDLE-TIMERS is non-nil then run the idle timers after
-calling everything involved with the command.
-
-COMMAND should be a list where the car is the command symbol and
-the rest are arguments to the command.
-
-NOTE: Since the command is not called by `call-interactively'
-test for `called-interactively' in the command will fail.
-
-Return the value of calling the command, ie
-
- (apply (car COMMAND) (cdr COMMAND)).
-
-Run the hook `ert-simulate-command-post-hook' at the very end."
-
- (message "command=%s" command)
- (ert-should (listp command))
- (ert-should (commandp (car command)))
- (ert-should (not unread-command-events))
- (let (return-value
- (font-lock-mode t))
- ;; For the order of things here see command_loop_1 in keyboard.c
- ;;
- ;; The command loop will reset the command related variables so
- ;; there is no reason to let bind them. They are set here however
- ;; to be able to test several commands in a row and how they
- ;; affect each other.
- (setq deactivate-mark nil)
- (setq this-original-command (car command))
- ;; remap through active keymaps
- (setq this-command (or (command-remapping this-original-command)
- this-original-command))
- (run-hooks 'pre-command-hook)
- (setq return-value (apply (car command) (cdr command))) ;; <-----
- (message "post-command-hook=%s" post-command-hook)
- (run-hooks 'post-command-hook)
- (when deferred-action-list
- (run-hooks 'deferred_action_function))
- (setq real-last-command (car command))
- (setq last-repeatable-command real-last-command)
- (setq last-command this-command)
- (when (and deactivate-mark transient-mark-mode) (deactivate-mark))
- ;;(message "ert-simulate-command.before idle-timers, point=%s" (point))
- (when run-idle-timers
- ;;(dolist (timer (copy-list timer-idle-list))
- (dolist (timer (copy-sequence timer-idle-list))
- (timer-event-handler timer)
- ;;(message " after timer=%s, point=%s" timer (point))
- )
- (redisplay t))
- ;;(message "ert-simulate-command.after idle-timers, point=%s" (point))
- (when ert-simulate-command-delay
- ;; Show user
- ;;(message "After M-x %s" command)
- (let ((old-buffer-name (buffer-name)))
- (rename-buffer (propertize (format "After M-x %s" (car command))
- 'face 'highlight)
- t)
- (sit-for ert-simulate-command-delay)
- (rename-buffer old-buffer-name)))
- (ert-should (not unread-command-events))
- (run-hooks 'ert-simulate-command-post-hook)
- return-value))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Misc
-
-(defun ert-this-test ()
- "Return current `ert-deftest' function."
- (elt test 1))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Self tests
-
-(provide 'ert2)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ert2.el ends here
diff --git a/emacs.d/nxhtml/tests/hfy-test.el b/emacs.d/nxhtml/tests/hfy-test.el
deleted file mode 100644
index 4592d7b..0000000
--- a/emacs.d/nxhtml/tests/hfy-test.el
+++ /dev/null
@@ -1,102 +0,0 @@
-;;; hfy-test.el --- Test for htmlfontify + hfyview
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-10-17 Fri
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-(require 'winsav)
-(require 'emacsw32 nil t)
-(require 'grep)
-
-(defun hfy-test-setup-frame ()
- (find-library "htmlfontify")
- (occur "hfy-tmpfont-stack")
- (unless grep-template (grep-compute-defaults))
- (lgrep "hfy-tmpfont-stack" "*.el" ".")
- (list-faces-display)
- (list-colors-display)
- (describe-function 'describe-function)
- (delete-other-windows)
-
- (split-window-vertically)
- (split-window-vertically)
- (balance-windows)
- (split-window-vertically)
- (balance-windows)
- (split-window-vertically)
- (balance-windows)
-
- ;;(winsav-upper-left-window)
- (frame-first-window)
- (split-window-horizontally)
- ;;(winsav-upper-left-window)
- (frame-first-window)
- (switch-to-buffer "*scratch*")
-
- (select-window (next-window))
- (switch-to-buffer "*Help*")
-
- (select-window (next-window))
- (switch-to-buffer "*Faces*")
- (split-window-horizontally)
-
- (select-window (next-window))
- (switch-to-buffer "*Colors*")
-
- (select-window (next-window))
- (when (fboundp 'emacsw32-show-custstart)
- (emacsw32-show-custstart))
-
- (select-window (next-window))
- (info)
-
- (select-window (next-window))
- (split-window-horizontally)
- (switch-to-buffer "*grep*")
-
- (select-window (next-window))
- (switch-to-buffer "*Occur*")
- )
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; hfy-test.el ends here
diff --git a/emacs.d/nxhtml/tests/in/3-heights.html b/emacs.d/nxhtml/tests/in/3-heights.html
deleted file mode 100644
index 339b5c2..0000000
--- a/emacs.d/nxhtml/tests/in/3-heights.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>patika</title>
-<meta name="generator" content="emacs 23.0.60.1; htmlfontify 0.20" />
-<style type="text/css"><!--
-body { font-family: Courier New; font-stretch: normal; font-weight: 500; font-style: normal; color: #f5deb3; background: #2f4f4f; font-size: 10pt; text-decoration: none; }
-span.default { font-family: Courier New; font-stretch: normal; font-weight: 500; font-style: normal; color: #f5deb3; background: #2f4f4f; font-size: 10pt; text-decoration: none; }
-span.default a { font-family: Courier New; font-stretch: normal; font-weight: 500; font-style: normal; color: #f5deb3; background: #2f4f4f; font-size: 10pt; text-decoration: underline; }
-span.default-0004 { text-decoration: none; }
-span.default-0004 a { text-decoration: underline; }
-span.default-0002 { text-decoration: none; }
-span.default-0002 a { text-decoration: underline; }
- --></style>
-
- </head>
- <body>
-
- <script type="text/javascript">
- // <![CDATA[
-
-function getObj(name) {
- if (document.getElementById) {
- this.obj = document.getElementById(name);
- this.style = document.getElementById(name).style;
- }
-}
-function hfy_toggle_display(name) {
- var x = new getObj("hfy_invis_" + name);
- var flag = x.style.display == 'inline';
- x.style.display = (flag) ? 'none' : 'inline'
-}
-
- // ]]>
- </script>
-
-<pre>ajsha a<span class="default-0002">hsahs</span>jha<span class="default-0004">j sah</span>sja </pre>
-
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/400415-index.phtml b/emacs.d/nxhtml/tests/in/400415-index.phtml
deleted file mode 100644
index de950e7..0000000
--- a/emacs.d/nxhtml/tests/in/400415-index.phtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<h2>CLEO Memorandum Assignment #1. What&apos;s Next?</h2>
-<table cellpadding="0" cellspacing="0">
- <thead>
- <tr>
- <th class="first author">Activity</th>
-<!-- <th class="time">Progress</th> -->
- </tr>
- </thead>
-
- <tbody>
- <?php
- $AM = $this->activity_model;
- foreach ($this->focus_transitions as $tran => $satisfied) {
- $props = $AM->getTransitionProps($tran);
- $url_params = $props['url_params'];
- $link_text = $props['link_text'];
- if (null !== $url_params and null !== $link_text) {
- // TODO Add $sat class to <td>, style accordingly.
- ?>
- <tr>
- <td class="first author"><a href="<?=
- $this->url($url_params) ?>"><?= $link_text ?></a></td>
-<!-- <td><?=
- // TODO $props['allotted']
- $satisfied ? '&#x2714;' : '&nbsp;'
- ?></td> -->
- </tr>
- <?php }} ?>
- </tbody>
-</table>
-<!--
-<?php
-print_r($this->acts);
-print_r($this->states);
-print_r($this->payload);
-print_r($this->activity_model);
-?>
--->
-<?php
-$foo = <<<MY_FOO
-I am a heredoc
-MY_FOO;
-?>
diff --git a/emacs.d/nxhtml/tests/in/asp.asp b/emacs.d/nxhtml/tests/in/asp.asp
deleted file mode 100644
index a557cb6..0000000
--- a/emacs.d/nxhtml/tests/in/asp.asp
+++ /dev/null
@@ -1,40 +0,0 @@
-
-<%@LANGUAGE="VBScript"%>
-
-<SCRIPT LANGUAGE="JavaScript" RUNAT="Server">
-function JSGreeting()
- {
- return "Greetings from a JavaScript Function";
- }
-</SCRIPT>
-
-<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
-Function VBGreeting()
- VBGreeting="Greetings from a VBScript Function"
-End Function
-
-Function toDollars(x)
- toDollars=FormatCurrency(x)
-End Function
-</SCRIPT>
-
-<%
-var a = 2;
-var b = 2;
-var c = add(a,b)
-c += " (Two numbers are added by JavaScript, "
-c += "and then formatted into currency by VBScript.)"
-
-function add(x,y)
- {
- result = x + y;
- result = toDollars(result);
- return result;
- }
-
-Response.Write("<HTML>\r")
-Response.Write(JSGreeting() + "<BR>\r")
-Response.Write(VBGreeting() + "<BR>\r")
-Response.Write(c + " <BR>\r")
-Response.Write("</HTML>\r")
-%>
diff --git a/emacs.d/nxhtml/tests/in/bastien-test.mm b/emacs.d/nxhtml/tests/in/bastien-test.mm
deleted file mode 100644
index 1494a62..0000000
--- a/emacs.d/nxhtml/tests/in/bastien-test.mm
+++ /dev/null
@@ -1,38 +0,0 @@
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node BACKGROUND_COLOR="#00bfff" CREATED="1248161883687" ID="ID_4621171" MODIFIED="1248162997000" TEXT="test.org">
-<richcontent TYPE="NOTE"><html>
- <head>
-
- </head>
- <body>
- <p>
- --org-mode: WHOLE FILE
- </p>
- </body>
-</html>
-</richcontent>
-<node CREATED="1248161883687" MODIFIED="1248161883687" POSITION="left" TEXT="Bonjour">
-<node CREATED="1248161883687" MODIFIED="1248161883687" TEXT="Ceci est un test">
-<node BACKGROUND_COLOR="#eeee00" CREATED="1248161883687" MODIFIED="1248161883687" STYLE="bubble">
-<richcontent TYPE="NODE"><html>
-<head>
-<style type="text/css">
-<!--
-p { margin-top: 0 }
--->
-</style>
-</head>
-<body>
-<p><br/> lkxjdflkdsz _lskfdsdf_ alskdjf<br/></p>
-</body>
-</html></richcontent>
-<richcontent TYPE="NOTE"><html><head/><body><p>-- This is more about "Ceci est un test" --</p></body></html></richcontent>
-</node>
-</node>
-</node>
-<node CREATED="1248161883687" HGAP="-88" ID="ID_901848166" MODIFIED="1248162974171" POSITION="right" TEXT="Rebonjour" VSHIFT="76">
-<node CREATED="1248161883687" HGAP="85" ID="ID_1570634894" MODIFIED="1248162978203" TEXT="Ceci est un autre test" VSHIFT="-109"/>
-</node>
-</node>
-</map>
diff --git a/emacs.d/nxhtml/tests/in/bigfile-stringerr-64000.html b/emacs.d/nxhtml/tests/in/bigfile-stringerr-64000.html
deleted file mode 100644
index e42ab6e..0000000
--- a/emacs.d/nxhtml/tests/in/bigfile-stringerr-64000.html
+++ /dev/null
@@ -1,1850 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News and Notes about nXhtml</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
-<style type="text/css">
-#nxhtml-home a {
- /* Image */
- display: block;
- background: transparent url("img/getitbuttons.png") 0 0 no-repeat;
- overflow: hidden;
- width: 200px;
- xheight: 35px;
- /* Text placement and size, etc */
- text-align: center;
- padding-top: 11px;
- font-size: 12px;
- padding-bottom: 9px;
- text-decoration: none;
- white-space: nowrap;
- margin: 0;
- border: none;
-}
-#nxhtml-home a:hover {
- background-position: 0 -35px;
- color: yellow;
-}
-
-</style>
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home"><a href="nxhtml.html">To nXhtml main page</a></p>
-
- <h1>News and Notes about nXhtml</h1>
-
- <dl>
-
- <dt id="hadron-bugs" style="margin-top:1em;">Thanks for testing!</dt>
- <dd>
- <p>
- I want to thanks the testers (who have been many now),
- especially to my first testers Hadron Quark and Eric
- Lilja, for helping me by testing and pointing out bugs
- and weaknesses, most of them related to editing of PHP.
- </p>
- <p>
- Without testers all kind of problems I just can't
- imagine myself would still be there in nXhtml. For
- example Hadron told me once that he got the error
- <i>(wrong-type-argument stringp nil)</i>. Eh, I replied, are
- you sure. Yes he was. I tried the same file as him. No
- error.
- </p>
- <p>
- The error happened during fontification so the error
- message above was all we had. A real black box for
- me. Or perhaps black magic? After much confusion and
- some hard work we finally found out what it was and I
- implemented a better way to catch such errors. If Hadron
- would have given up the problem would still have been
- there. Some problems are just impossible to solve
- without good cooperation. So, again, thanks Hadron.
- </p>
- <p>
- BTW, I will perhaps add some even better way to Emacs to
- catch these errors so other can benefit from our
- insights too, but that requires some time and effort
- which I can't afford right now.
- </p>
- </dd>
-
- <dt id="state-of-the-art" style="margin-top:1em;
- background-color: #66cd5c;
- background-color: #96cd5c;
- padding: 0.5em;
- ">The State of the Art</dt>
- <dd style="background-color: #f9e529; padding: 0.5em">
- <p>
- I wrote earlier that I thought that there were two parts
- in nXhtml, nxhtml-mode and mumamo with a bit different
- degree of maturity. I believe that is not that valid
- any more. To my delight the second part, mumamo is now
- also quite stable (from version 1.27).
- </p>
- </dd>
-
- <dt id="magic-problems" style="margin-top:1em;">Magic major mode selection</dt>
- <dd>
- <p>
- Sometimes the major mode that Emacs opens a file in is
- not what you expect. This can happen with files like PHP
- files. The reason might be that magic-mode-alist have
- choosen a mode based on the content of the file. The way
- this is done does not take files with mixes a mix of for
- example XHTML and PHP into account.
- </p>
- <p>
- You may try setting magic-mode-alist to nil if this is a
- problem for you.
- </p>
- <p>
- <em>
- This is now no longer necessary since the introduction
- of magic-fallback-mode-alist in CVS Emacs on 2007-05-16.
- (If you have an Emacs newer than that, of course.)
- </em>
- </p>
- </dd>
-
- <dt id="underline-bug" style="margin-top:1em;">Long Red Underlines</dt>
- <dd>
- <p>
- Because of a bug in Emacs 22.1 you can sometimes (at the
- end of a line) get long red lines instead of just a
- single underlined character. Many users (me included)
- find this quite a bit disturbing. I have therefore added
- a command to quickly hide/show the underlines. This is
- on <em>C-c C-w</em>.
- </p>
- <p>
- This is particular useful for example in the case where
- you edit a PHP file and are bound to get a lot of XHTML
- validation errors.
- </p>
- </dd>
-
- <dt id="php-attribute-values" style="margin-top:1em;">Attribute values computed by PHP</dt>
- <dd>
- <p>
- If you want to have attribute values computed by PHP
- here is a way how to structure that to avoid breaking
- completion and validation in the XHTML part unnessecary:
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&lt;?php foo(&quot;bar&quot;);?&gt;&quot;/&gt;
- </p>
- <p>
- Unfortunately that still breaks XHTML validation since
- &lt; is not allowed in strings. In the long run I
- believe the XML validator has to be broken up so that it
- avoids parsing the string here (in PHP files).
- </p>
- <p>
- For now I have implemented a workaround.
- If you are using constructs like those above then turn on <em>nxhtml-strval-mode</em>.
- This will temporarily replace the above with
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&#171;?php foo(&quot;bar&quot;);?&#187;&quot;/&gt;
- </p>
- <p>
- However on the screen you will still see the original
- string and when writing to file the correct characters
- will be used.
- </p>
- </dd>
-
- <dt id="pi-note" style="margin-top:1em;">A note for PHP and its cousins</dt>
- <dd>
- <p>
- The rules for a process instruction in XML, like &lt;?php
- ... ?&gt; says that the text can contain any text except
- <em>?&gt;</em>. So if you want to output that string
- from PHP then break it up so it does not look as ?&gt; in
- the source file.
- </p>
- <p>
- It might be good to break up the beginning part of the
- process instructions too. And please note that to use
- XHTML validation or completion you should avoid using
- &lt; in strings, since it is not allowed there.
- </p>
- </dd>
-
-<!-- <dt id="pi-note" style="margin-top:1em;">Perl Mode slow with Mumamo Mode</dt> -->
-<!-- <dd> -->
-<!-- <p> -->
-<!-- Perl mode used with MuMaMo mode sometimes makes the -->
-<!-- fontification slow for big files. I do not know the -->
-<!-- reason, but I am trying to find a solution for this. If -->
-<!-- you encounter this problem, just turn off mumamo-mode in -->
-<!-- that buffer. -->
-<!-- </p> -->
-<!-- </dd> -->
-
- <dt id="tab-width-problems" style="margin-top:1em;">Tab width</dt>
- <dd>
- <p>
- Do you have <em>tab-width</em> to something different than 8
- (the default)? Then please change this to 8. I have got
- reports of problem with indentation when it is not 8.
- </p>
- </dd>
-
- <dt id="mmm-compat" style="margin-top:1em;">Why the chunks are not compatible with mmm</dt>
- <dd>
- <p>
- Some people have asked why the way to specify chunks in
- mumamo-mode is not compatible with the old mmm-mode. The
- answer is that I was not sure that the way used in
- mmm-mode for specifying the chunks was flexible enough.
- </p>
- <p>
- And I am sure that even the way used in mumamo-mode is
- not good enough for all cases, but I let it be the way
- it is until I have a better understanding of the
- problem. Suggestions and comments are welcome!
- </p>
- </dd>
-
- </dl>
-
- <h1 id="change-history">nXhtml Changes</h1>
-
- <div>
- <a href="#v0.89">v0.89</a>
- <a href="#v0.90">v0.90</a>
- <a href="#v0.91">v0.91</a>
- <a href="#v0.92">v0.92</a>
- <a href="#v0.93">v0.93</a>
- <a href="#v0.94">v0.94</a>
- <a href="#v0.95">v0.95</a>
- <a href="#v0.96">v0.96</a>
- <a href="#v0.97">v0.97</a>
- <a href="#v0.98">v0.98</a>
- <a href="#v0.99">v0.99</a>
- <a href="#v1.00">v1.00</a>
- <a href="#v1.01">v1.01</a>
- <a href="#v1.02">v1.02</a>
- <a href="#v1.03">v1.03</a>
- <a href="#v1.04">v1.04</a>
- <a href="#v1.10">v1.10</a>
- <a href="#v1.11">v1.11</a>
- <a href="#v1.12">v1.12</a>
- <a href="#v1.13">v1.13</a>
- <a href="#v1.14">v1.14</a>
- <a href="#v1.15">v1.15</a>
- <a href="#v1.16">v1.16</a>
- <a href="#v1.17">v1.17</a>
- <a href="#v1.18">v1.18</a>
- <a href="#v1.19">v1.19</a>
- <a href="#v1.20">v1.20</a>
- <a href="#v1.21">v1.21</a>
- <a href="#v1.22">v1.22</a>
- <a href="#v1.23">v1.23</a>
- <a href="#v1.24">v1.24</a>
- <a href="#v1.25">v1.25</a>
- <a href="#v1.26">v1.26</a>
- <a href="#v1.27">v1.27</a>
- <a href="#v1.28">v1.28</a>
- <a href="#v1.29">v1.29</a>
- <a href="#v1.30">v1.30</a>
- <a href="#v1.31">v1.31</a>
- <a href="#v1.32">v1.32</a>
- <a href="#v1.33">v1.33</a>
- <a href="#v1.34">v1.34</a>
- <a href="#v1.35">v1.35</a>
- <a href="#v1.36">v1.36</a>
- <a href="#v1.37">v1.37</a>
- <a href="#v1.38">v1.38</a>
- <a href="#v1.39">v1.39</a>
- </div>
-
- <dl>
- <dt id="v0.89">0.89</dt>
- <dd>
- <ul>
- <li>
- Corrected autostart for nXhtml when not used together with EmacsW32.
- </li>
- </ul>
- </dd>
- <dt id="v0.90">0.90</dt>
- <dd>
- <ul>
- <li>
- Improved display of XML path.
- </li>
- <li>
- Discontinued xmple-mode.
- </li>
- <li>
- New major modes nxhtml-part-mode/nxml-part-mode replaces
- minor mode xmlpe-mode. (While moving the code to
- nxhtml-part.el I also fixed a bug in Xmple minor mode that
- made Emacs take 99% of the CPU.)
- </li>
- </ul>
- </dd>
- <dt id="v0.91">0.91</dt>
- <dd>
- <ul>
- <li>
- Fixed some calls to perl which prevented uploading of
- a site of you did not have perl in the same location
- as me.
- </li>
- <li>
- Glued together things so that editing PHP files works
- as I intended. (This means that Emacs switches between
- php-mode and nxhtml-part-mode automatically when
- moving point. And that you can use completion.)
- </li>
- <li>
- Starting working on the documentation for nXhtml.
- New layout to the documentation files.
- Examples with images.
- </li>
- </ul>
- </dd>
- <dt id="v0.92">0.92</dt>
- <dd>
- <ul>
- <li>
- Fixes to make the switching between php and xhtml
- style editing work better.
- </li>
- </ul>
- </dd>
- <dt id="v0.93">0.93</dt>
- <dd>
- <ul>
- <li>
- Better error handling when switching to editing
- embedded JavaScript and CSS.
- </li>
- <li>
- Removed PHP spec from embedded switching since they
- interfered with the automatic switching between php
- and xhtml.
- </li>
- <li>
- Gives an error message if web host is not defined in
- site when trying to use View Uploaded File and
- cousins.
- </li>
- <li>
- Gives a ready message when finished uploading a single
- file.
- </li>
- <li>
- When using Mode Switching at &lt;? ... ?&gt; mode
- switching could occur in wrong buffer. Fixed together
- with some other buffer problems.
- </li>
- </ul>
- </dd>
- <dt id="v0.94">0.94</dt>
- <dd>
- <ul>
- <li>
- Add http://www.w3.org/ to the help sites for CSS.
- </li>
- <li>
- Included a CSS mode.
- </li>
- <li>
- Added a menu entry for bug reporting.
- </li>
- <li>
- Renamed menu bar entry from XHTML to nXhtml for clarity.
- (But nXml menu bar entry is still called XML.)
- </li>
- <li>
- Added work around for globalized minor modes in the
- cases of MLinks, XML Path and mode switching at &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt id="v0.95">0.95</dt>
- <dd>
- <ul>
- <li>
- Added workaround for the problem with the first
- keyboard key after automatically switching of mode at
- &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt id="v0.96">0.96</dt>
- <dd>
- <ul>
- <li>
- Added support for multiple major modes with mumamo.el.
- </li>
- <li>
- More conventient handling of links. They can now be
- opened in the same window, 'other window' or in a new
- frame.
- </li>
- </ul>
- </dd>
- <dt id="v0.97">0.97</dt>
- <dd>
- <ul>
- <li>
- Schema was not setup after starting new page so
- completion did not work. Fixed.
- </li>
- <li>
- Added http://xhtml.com/ to help sites for XHTML.
- </li>
- <li>
- Added the concept of <em>fictive XML validation
- headers</em>. These are just text parsed by the nXml
- validation parser to get a start state before starting
- parsing a buffer. This allows the use of the nXml
- completion in buffers where there are no XML header.
- Such a header is often lacking for example in PHP code
- since the XHTML header is often generated dynamically.
- </li>
- <li>
- Because of the change above <em>nxhtml-part-mode</em>
- is no longer needed and is therefore declared
- obsolete.
- </li>
- <li>
- Corrected a bug in mlinks.el that prevented opening an
- HTML link in a other window or a new frame.
- </li>
- <li>
- Added support for JSP, eRuby and some support for perl
- in mumamo.el.
- </li>
- </ul>
- </dd>
- <dt id="v0.98">0.98</dt>
- <dd>
- <ul>
- <li>
- Mumamo was not found when nXhtml was installed with
- just the zip file. Corrected. (nXhtml is also
- installed when you install EmacsW32.)
- </li>
- <li>
- Enhancement to mumamo error handling when a bad mode
- specifier for an embedded mode is found.
- </li>
- <li>
- Introduced a bug for empty XHTML documents in
- 0.97. Corrected.
- </li>
- <li>
- Corrected a bug for chunks 1 character long.
- </li>
- <li>
- There is what I consider is a bug in Emacs 22.1 in the
- handling of global minor mode that are not distributed
- with Emacs. If they are turned on by customization,
- but loaded after Emacs have loaded the customizations
- (usually in .emacs) then they are not turned on
- correctly. Added work-around for this.
- </li>
- <li>
- <em>Fictive XHTML Validation Header</em>:
- <ul>
- <li>
- <em>Fictive XHTML Validation Header</em> state was not saved when moving between chunks. Fixed.
- </li>
- <li>
- Tried to make the concept of <em>Fictive XHTML Validation Header</em>
- more clear. Added this visually to the buffer.
- </li>
- <li>
- <em>Fictive XHTML Validation Headers</em> can now be turned on
- automatically based on file name.
- </li>
- </ul>
- </li>
- <li>
- <em>nXhtml menu:</em>
- <ul>
- <li>
- Reorganized the nXhtml menu.
- </li>
- <li>
- Added <em>customization</em> groups for help libraries to nXhtml.
- </li>
- <li>
- Added an entry for customization of nXhtml to the menus.
- </li>
- <li>
- Added <em>Tidy</em> to the menus again.
- </li>
- </ul>
- </li>
- <li>
- Corrected bug in <em>XML Path</em> (nxml-where) for single tags.
- Other small fixes to nxhtml-where.
- </li>
- <li>
- Documentation enhancements.
- Added <em>The Quick Guide</em>.
- </li>
- </ul>
- </dd>
- <dt id="v0.99">0.99</dt>
- <dd>
- <ul>
- <li>
- Fixed a serious bug in the cooperation between nxhtml-mode and mumamo-mode.
- </li>
- <li>
- Turn on mumamo-mode by file name (mumamo-global-mode).
- </li>
- <li>
- Fictive XHTML Validation Header:
- <ul>
- <li>
- The Fictive XHTML Validation Header state were not saved when changing major mode in MuMaMo. Corrected.
- </li>
- <li>
- Added more alternatives to the Fictive XHTML Validation Header list.
- This should make it easier to use completion with for example PHP.
- </li>
- <li>
- Added default value for the Fictive XHTML Validation Header.
- </li>
- <li>
- Tried to make the use of Fictive XHTML Validation Header more automatic and therefore useful.
- Also tried to make it play better with setting schema file.
- (There is no need normally to set schema file by hand.)
- </li>
- <li>
- To turn this on by default customize nxhtml-global-validation-header-mode.
- </li>
- </ul>
- </li>
- <li>
- Possible to hide validation warnings without turning
- on validation (which would make completion in the
- XHTML part impossible).
- </li>
- <li>
- Some fixes to php-mode:
- <ul>
- <li>Using the character # for comments now works for most cases.</li>
- <li>Now uses the fontification faces in a more standard way which calms down the look.</li>
- <li>Initialization bug fixes.</li>
- <li>Renamed php-mode-user-hook to php-mode-hook to follow standard.</li>
- </ul>
- </li>
- <li>
- Indentation fixes:
- <ul>
- <li>
- Various corrections to indentation in mumamo.
- </li>
- <li>
- Added the possibility to use TAB to indent regions
- (indent-region-mode).
- </li>
- <li>
- Warn about bad indentation in mixed PHP/HTML code
- when using php-mode only.
- </li>
- </ul>
- </li>
- <li>
- Fontification now fontifies all text first in main
- major mode and thereafter applies submodes. (This
- avoids some problems with around a submode chunk.)
- </li>
- <li>
- Reorganized the nXhtml menu:
- <ul>
- <li>
- There is now a minor mode for the nXhtml
- menu. This makes it possible to easier use common
- features when in buffers not in nxhtml-mode.
- </li>
- <li>
- The nXhtml menu does not disappear when moving
- into a chunk where the major mode is not
- nxhtml-mode. The changes also makes it easy to
- access uploading functions functions etc from
- other modes than nxhtml-mode since the
- <em>nXhtml</em> may also be shown in them.
- </li>
- <li>
- The nXhtml menu can be turned on globally by default.
- Customize nxhtml-menu-mode for that.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.00">1.00</dt>
- <dd>
- <ul>
- <li>
- Reached version number 1.00 - which you maybe believe
- means the bugs should be gone? Sorry, it is just that
- I ran out of version numbers. However it looks like
- much fewer bugs at least.
- </li>
- <li>
- Fixed problems mostly related to global turn on of different features in nXhtml.
- </li>
- <li>
- Small fixes to indentation.
- <ul>
- <li>
- nxhtml-mode could get confused by php tags.
- </li>
- <li>
- nxhtml-mode did not indent &lt;!DOCTYPE in a sensible way.
- </li>
- <li>
- Electric keys now works in embedded php when using mumamo-mode.
- </li>
- </ul>
- </li>
- <li>
- Tidy was very misbehaving since the output buffer was
- not erased between different files. But I have got no
- bug reports on this.
- </li>
- <li>
- Fixed a bug in validation that should up when using muamo-mode.
- </li>
- <li>
- Fixed bug in &lt;script ...&gt; and &lt;style ...&gt; chunk dividing.
- </li>
- <li>
- Added support for OpenLaszlo.
- </li>
- <li>
- Corrections to mlinks-mode (visible mostly as links in
- XHTML buffers):
- <ul>
- <li>
- Links disappeared when a new file was
- opened. Corrected.
- </li>
- <li>
- Links were not correctly updated at changes in the
- buffer when mumamo-mode was used. Fixed.
- </li>
- </ul>
- </li>
- <li>
- The welcome message for nXhtml could be shown too
- early sometimes when loading, before nXhtml actually
- knew if it should be shown or not. Tried to fix it.
- </li>
- </ul>
- </dd>
- <dt id="v1.01">1.01</dt>
- <dd>
- <ul>
- <li>
- Reported wrong version number for nXhtml in the menus. Fixed.
- </li>
- <li>
- <em>If you use the zip file to install nXhtml please
- notice that it has now a top level nxml.</em> Sorry for not
- having zipped it like that before!
- </li>
- <li>
- The url links in <em>Welcome to nXhtml</em> was a bit
- incorrect and did not work on all OS:es. Fixed.
- </li>
- <li>
- Added customization of popup completion to the 'nxhtml
- customization group so they are easier to find.
- </li>
- <li>
- MuMaMo
- <ul>
- <li>
- Struggled a bit with the load sequences of the elisp
- libraries used by nXhtml when using MuMaMo.
- </li>
- <li>
- Tried to get the global turn on of mumam-mode to work
- in all cases.
- </li>
- <li>
- The screen was blinking when changing overlays after
- changes in the buffer. Tried to fix this.
- </li>
- <li>
- Minor fixes do syntax highlighting, like taking care of single ':s.
- </li>
- <li>
- Fixes to the support for JSP and eRuby.
- </li>
- <li>
- Made the support for perl here documents a bit better.
- Large perl documents are however still quite slow when
- using mumamo-mode. I do not know the reason yet.
- </li>
- <li>
- Refontification could miss some parts when buffer
- changes caused chunk division changes. Complex,
- tried to fix it, but I am a bit unsure that it
- always works.
- </li>
- <li>
- Cleaned up mumamo.el a bit.
- </li>
- <li>
- Rewrote mumamo-test.el and functions called from it in
- mumamo.el a bit to make tracebacks from errors more
- useful. Changed keybindings in mumamo-test.el from
- global to a minor mode <em>mumamo-test-mode</em>.
- Renamed mumamo-notest.el to mumamo-test.el. Added it
- to the zipped distribution of nXhtml.
- </li>
- </ul>
- </li>
- <li>
- Fixed a bug related to links and buffer changes.
- </li>
- </ul>
- </dd>
- <dt id="v1.02">1.02</dt>
- <dd>
- <ul>
- <li>
- Fixed a refontification bug that occured after changes.
- </li>
- </ul>
- </dd>
- <dt id="v1.03">1.03</dt>
- <dd>
- <ul>
- <li>
- Added the possibility to call GIMP.
- </li>
- <li>
- Reworked the messages for fontification errors to try
- to catch an error that shows up sometimes. Tried to
- avoid disturbing normal use in spite of that error.
- </li>
- <li>
- Reverted to using a short delay before switching major
- mode when moving between buffers.
- </li>
- </ul>
- </dd>
- <dt id="v1.04">1.04</dt>
- <dd id="v1.04-dd">
- <ul>
- <li>
- Enhanced the documentation for nXhtml. Starting from
- <i>C-h f nxhtml-mode</i> it should now be easier to
- get an overview.
- </li>
- <li>
- Bug fixes etc:
- <ul id="v1.04-bugs">
- <li>
- Completion on an empty page gave a faulty frameset page. Fixed.
- </li>
- <li>
- Insert end tag did not work with a fictive
- validation header. Fixed.
- </li>
- <li>
- Insert end tag when all preceding tags where
- closed gave a strange error message. Fixed.
- </li>
- <li>
- Changed some key bindings to comply with
- <i>(info "(elisp) Key Binding Conventions")</i>
- </li>
- <li>
- Completion in empty buffers with a completion
- header did not work. Fixed.
- </li>
- <li id="mumamo-bugs">
- Multiple major modes:
- <ul>
- <li>
- Fixed a bug that prevented mumamo-global-mode from
- beeing turned on in a file opened in
- fundamental-mode.
- </li>
- <li>
- Better error tracing for some functions,
- including the call of major mode functions.
- </li>
- <li>
- Position was garbled when a ;-char was inserted in php-mode chunk. Fixed.
- </li>
- <li>
- A bad check for if mlinks-mode where available was fixed.
- </li>
- <li>
- Some bugs concerning turning off mumamo-mode was fixed.
- </li>
- <li>
- Fixed a bug in <i>perl here doc</i> chunks. Suddenly the
- problem with slowness when using mumamo-mode in
- perl buffers seems gone. (Note quite sure, but I
- can't see any problems now.)
- </li>
- <li>
- Fixed a bug in mumamo-mode when current buffer was
- switched before the major mode had been set from
- the current chunk.
- </li>
- <li>
- Fixed a long standing bug in php fontification of
- strings and comments.
- </li>
- <li>
- Fixed a bug where <i>sgml-xml-mode</i> was not defined.
- </li>
- <li>
- Fixed a bug related to get-text-property which
- gives an error when buffer is narrowed.
- </li>
- <li>
- Tried to refontify things outside of a narrowed part. Fixed.
- </li>
- <li>
- Too little where refontified after changes. I hope I have fixed this.
- </li>
- </ul>
- </li>
- <li>
- Fictive XHTML Validation Header:
- <ul id="v1.04-fic-bugs">
- <li>
- View File did not work correctly when a fictive
- XHTML validation header was used. Corrected.
- </li>
- <li>
- Fictive XHTML validation headers are no longer
- turned on by default in any buffers.
- </li>
- </ul>
- </li>
- <li>
- Indentation:
- <ul>
- <li>
- Tried to fix a problem when using
- newline-and-indent. When this was in a mode
- derived from C the indentation sometimes became 0.
- </li>
- <li>
- Speeded up the indentation of regions a bit when
- using <i>mumamo-mode</i>.
- </li>
- <li>
- Indentation: TAB now only indents a region if it
- is visibly marked (see transient-mark-mode and
- cua-mode).
- </li>
- <li>
- Simplified the indentation code.
- </li>
- </ul>
- </li>
- <li>
- Fixed a problem where string fontification got out
- of phase so that wrong parts of buffer could be
- fontified as a string.
- </li>
- <li>
- Added a workaround for <a
- href="#php-attribute-values">Attribute values
- computed by PHP</a>
- </li>
- <li>
- Added .nosearch to subdirectories with no elisp files.
- </li>
- <li>
- Fixed incorrect checks for mlinks-mode in menu building.
- </li>
- <li>
- File extensions where used in a case sensitive way
- in some places. Fixed.
- </li>
- <li>
- appmenu: Worked only in html files. Fixed.
- </li>
- <li>
- html-site: Fixed the error <em>Error
- (html-site-current): Can't find site:
- your-site-name</em>.
- </li>
- <li>
- Fixed a problem with longlines-mode in the support
- for Firefox add-on It's All Text. (Note however
- that there are some bugs in longlines-mode
- itself.) Rewrote the support to be more
- general. It is now in the file as-external.el, see
- this file.
- </li>
- <li>
- Fixed an encoding problem in
- <i>tidy-buffer</i>. Output from tidy was not read
- using the same coding system as tidy was using.
- </li>
- <li>
- Fixed some problems with face definitions, possibly bugs (not sure).
- </li>
- <li>
- Made the fontification faster when using mumamo-mode.
- (It is still slower than single mode fontification of course.)
- </li>
- <li>
- nxml-where.el: Made it aware of mumamo.el.
- </li>
- </ul>
- </li>
- <li>
- Menu changes:
- <ul>
- <li>
- Completion menu: Renamed to <i>Completion and
- Validation</i> menu and reorganized a little bit to
- make it more clear.
- </li>
- <li>
- Renamed <i>view</i> to <i>browse</i> since this is
- the normal emacs name for showing files in a web
- browser. Also made corresponding changes to
- function names. Put back the possibility to view
- only the region in a web browser.
- </li>
- </ul>
- </li>
- <li>
- Uploading:
- <ul>
- <li>
- Added remote dired to the menus.
- </li>
- <li>
- Fixed problems with file names starting with ~.
- </li>
- <li>
- Fixed more problems with file names with spaces.
- </li>
- </ul>
- </li>
- <li>
- nxml-where:
- <ul>
- <li>
- nxml-where now uses a timeout for more smooth performance.
- </li>
- <li>
- nxml-where can now recognizes both id and name attribute.
- </li>
- <li>
- Hyphens are now accepted in tag names.
- </li>
- </ul>
- </li>
- <li>
- Ruby
- <ul>
- <li>
- Multiple major mode turned on by default for .rhtml files when this mode is global.
- </li>
- <li>
- Multiple major mode is no longer turned on when rub-mode is turned on.
- </li>
- </ul>
- </li>
- <li>
- Added support for switching major mode dependent on if
- Emacs was called as an external editor. This makes it
- possible for example to switch to relevant major and
- minor modes when Firefox add-on It's All Text.
- </li>
- <li>
- Added the possibility to easily view the output of scripts on the server (if they require no parameters).
- You can now do that from the nXhtml menu.
- Previously only html files on the server could be viewed that way.
- Image files can also be viewed this way.
- </li>
- <li>
- Filling:
- <ul>
- <li>
- Added functions for unfilling.
- </li>
- <li>
- Added keybindings and menu entries for longlines-mode, fill-paragraph and unfill-paragraph.
- </li>
- </ul>
- </li>
- <li>
- Quoting:
- Added HTML quoting of &amp; and &lt; in text areas. Bound to C-c C-q.
- </li>
- <li>
- Images:
- <ul>
- <li>
- Added image-mode to those that are encompassed by
- nxhtml-global-minor-mode so that images can be
- uploaded more easily.
- </li>
- <li>
- Added <em>edit with GIMP</em> and <em>upload</em> to the popup menu for links.
- This avoids the need to load the linked files in Emacs first.
- </li>
- </ul>
- </li>
- <li>
- Added <em>nxml-untag-element</em>.
- </li>
- <li>
- Added a modified version of wikipedia-mode.el. Seems likely to be useful if you are doing web editing.
- </li>
- <li>
- Added html-imenu.el
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Removed the lighter <i>"MuMaMo"</i> for
- mumamo-mode. Instead the active major mode now has
- <b>"/m"</b> appended to mode-name (that is what you see
- in the mode line).
- </li>
- <li>
- The normal way to turn on <i>mumamo-mode</i> has
- changed. There are now functions that you can use
- in <i>auto-mode-alist</i> to directly set up the
- buffer for mumamo-mode. The available functions
- are in the
- variable <i>mumamo-defined-turn-on-functions</i>.
- <p>
- You are not supposed to call mumamo-mode
- yourself any more and mumamo-global-mode is
- gone. So is also mumamo-chunk-family-by-mode and
- mumamo-filenames-list. The functionality those
- gave are all replaced by the new functions for
- turning on mumamo mode.
- </p>
- </li>
- <li>
- Added support for buffer local values in
- hooks. This is necessary for example to support
- minor modes that are meant to be buffer local but
- not major mode specific. Instructions for authors
- of this kind of minor modes are in the file
- mumamo.el.
- </li>
- <li>
- Added support for Django.
- </li>
- <li>
- Added support for Embperl.
- </li>
- <li>
- Added support for PHP Smarty. The <i>{literal}
- ... {/literal}</i> construct is not supported.
- This mean that you can not use &lt;style ..&gt; or &lt;script ..&gt;.
- </li>
- <li>
- Added support for imenu for the main major mode.
- Turned on this by default in nxhtml-mode.
- </li>
- <li>
- Made the temporary replacement of the
- attr="&lt;?php ... ?&gt;" a bit better. They are
- now more visible and also still mumamo chunks
- during the temporary replacement.
- </li>
- <li>
- Added support for <i>flymake-mode</i>.
- Maybe add support for checking chunks?
- </li>
- <li>
- Printing: Added htmlfontify.el and
- hfyview.el. These makes if possible to print a
- buffer fontified with <i>mumamo-mode</i> on in
- colors (through your web browser). There is an
- example of the capabilities of htmlfontify <a
- href="htmlfontify-example.html">here</a> (made
- with a little function in hfyview.el).
- </li>
- </ul>
- </li>
- <li>
- PHP:
- <ul>
- <li>
- Did a first merge with Aaron Hawleys fixes for php-mode.el.
- </li>
- </ul>
- </li>
- <li>
- CSS: Upgraded to Stefan's latest css-mode.el.
- </li>
- <li>
- Fictive XHTML Validation Headers: Changed the way they
- are turned on. They may now be turned on when
- mumamo-mode is turned on.
- </li>
- <li>
- Some users want to use their own patched version of
- nXml. Next version of Emacs will come with
- nXml. Therefore, the loading routine for nXhtml now
- checks if nXml is is already loaded. Thanks to Eric
- Lilja for testing this. Eric also made me aware of
- that if nXhtml was placed in the site-lisp directory
- tree then things did not work as I expected. I think I
- have corrected that by placing a <i>.nosearch</i> file
- at the top of the nxml tree in nXhtml.
- </li>
- <li>
- Restructured the directories. Moved some files out of
- the <i>nxhtml</i> subdir. Some of them went into the
- <i>util</i> subdir (those are written by me) and some
- to the new subdir <i>related</i> (those that are
- inherited from others, maybe changed by me - most
- often to work with mumamo-mode).
- </li>
- <li>
- Changed all licenses to be GNU GPL.
- </li>
- <li>
- Additions to tidy support: It is now possible to use
- the tidy support to tidy the XHTML part of php etc.
- (Thanks to Hadron for this suggestion.)
- </li>
- <li>
- Added <i>winsize.el</i> which allows interactive resizing of
- windows. Also added <i>winsav.el</i> which adds the
- capability to rotate window configurations and also to
- save window configuration to file.
- </li>
- <li>
- Made nXhtml work with CVS Emacs 23.0.50.1.
- </li>
- <li>
- Added freemind.el to the parcel. After all FreeMind
- supports web publishing too so why not have the Emacs
- support here ...
- </li>
- </ul>
- </dd>
- <dt id="v1.10">1.10</dt>
- <dd id="v1.10-dd">
- Just jumped the version number for the new release of
- nXhtml. There are really significant changes in this
- release, not only minor bug fixes.
- </dd>
- <dt id="v1.11">1.11</dt>
- <dd id="v1.11-dd">
- Minor bug fixes to completion. Added fictive validation
- header to completion alternatives when buffer is empty and
- mumamo is used.
- </dd>
- <dt id="v1.12">1.12</dt>
- <dd id="v1.12-dd">
- <ul>
- <li>
- Fixed a bug in image link insertion in nxhtml-mode, thanks Niels Giesen!
- </li>
- <li>
- Restructured, reordered and documented mumamo.el. It is now two
- separate files, mumamo.el and mumamo-fun.el.
- </li>
- <li>
- Added move by chunk to the nXhtml menu.
- </li>
- </ul>
- </dd>
- <dt id="v1.13">1.13</dt>
- <dd id="v1.13-dd">
- <ul>
- <li>
- Better handling of the case when no validation header
- is needed and the user tries to turn it on.
- </li>
- <li>
- Added .phtml as php file.
- </li>
- </ul>
- </dd>
- <dt id="v1.14">1.14</dt>
- <dd id="v1.14-dd">
- <ul>
- <li>
- Completion of links in XHTML was broken. Fixed, thanks
- to Niels Giesen.
- </li>
- </ul>
- </dd>
- <dt id="v1.15">1.15</dt>
- <dd id="v1.15-dd">
- <ul>
- <li>
- Added `mumamo-map' keymap.
- </li>
- <li>
- Added a keymap to all multi major modes.
- </li>
- <li>
- Some more refinement to fictive validation headers.
- </li>
- </ul>
- </dd>
- <dt id="v1.16">1.16</dt>
- <dd id="v1.16-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Changes to indentation:
- <ul>
- <li>
- Removed indent-region-mode since that
- functionality is now in indent-for-tab-command in
- Emacs 22.
- </li>
- <li>
- Removed some code that checked if indentation was 0.
- </li>
- <li>
- Added indent-for-tab-command to mumamo-map.
- </li>
- </ul>
- </li>
- <li>
- Reordering and renaming:
- <ul>
- <li>
- Reordered and move some functions in mumamo.el et al.
- Added new file nxhtml-mumamo.el.
- </li>
- <li>
- Renamed <i>define-mumamo-turn-on</i> to
- <i>define-mumamo-multi-major-mode</i>.
- </li>
- <li>
- Removed the ending <i>-turn-on</i> from the
- functions defined by the macro above.
- </li>
- <li>
- Introduced <i>multi major mode</i> as a name for
- the functions defined by the macro above. Those
- works in many respects like major mode functions,
- but they support multiple major modes in a buffer.
- </li>
- </ul>
- </li>
- <li>
- Added support for noweb as multiple major mode.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.17">1.17</dt>
- <dd id="v1.17-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support for flyspell.
- </li>
- </ul>
- </li>
- <li>
- Bug fixes to the version of find-recursive.el that
- ships with nXhtml. Thanks to Cezar Halmagean.
- </li>
- <li>
- Added tabkey2.el which tries to make it easy to use
- the Tab key for completion. (You must load it and turn
- on tabkey2-mode to use it.)
- </li>
- <li>
- Folding:
- <ul>
- <li>
- Added <i>nxhtml-heading-element-name-regexp</i> as
- default for nxml style folding.
- </li>
- <li>
- Some changes to fold-dwim.el.
- </li>
- </ul>
- </li>
- <li>
- AppMenu:
- <ul>
- <li>
- Simplified: Removed the possibility to
- automatically show minor and major mode menus.
- There is now only one list, <i>appmenu-alist</i>.
- </li>
- <li>
- Added menu item <i>At Current Point</i> for
- bindings found in character and overlay keymaps at
- point. Those you always forget.
- </li>
- </ul>
- </li>
- <li>
- Physical line:
- <ul>
- <li>
- Added physical-line.el to nXhtml.
- </li>
- <li>
- Added new functions to move to beginning and end
- of line to ourcomments-util.el that supports
- physical-line.el.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.18">1.18</dt>
- <dd id="v1.18-dd">
- <ul>
- <li>
- Better Tab completion in tabkey2.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.19">1.19</dt>
- <dd id="v1.19-dd">
- <ul>
- <li>
- Even better Tab completion in tabkey2.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.20">1.20</dt>
- <dd id="v1.20-dd">
- <ul>
- <li>
- Once again even better Tab completion in tabkey2.el.
- </li>
- <li>
- Fixed bug in hiding of validation errors (they could
- disappear totally).
- </li>
- <li>
- Cleaned up menus in nXhtml.
- </li>
- </ul>
- </dd>
- <dt id="v1.21">1.21</dt>
- <dd id="v1.21-dd">
- <ul>
- <li>
- Added a bit support for dired (upload, browse, browse
- remote).
- </li>
- <li>
- Fixed some strange menu problems (i hope).
- </li>
- </ul>
- </dd>
- <dt id="v1.22">1.22</dt>
- <dd id="v1.22-dd">
- <ul>
- <li>
- Bug fix.
- </li>
- </ul>
- </dd>
- <dt id="v1.23">1.23</dt>
- <dd id="v1.23-dd">
- <ul>
- <li>
- Bug fix.
- </li>
- </ul>
- </dd>
- <dt id="v1.24">1.24</dt>
- <dd id="v1.24-dd">
- <ul>
- <li>
- Tried again to make hexcolor-mode more readable.
- </li>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support for <i>hi-lock-mode</i>. At present
- it might however be very puzzling. The hilight
- added by hi-lock-mode may be hidden by the
- overlays used by mumamo. Tip: you can always use
- the face <span
- style="font-size:1.5em;">hi-black-hb</span>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.25">1.25</dt>
- <dd id="v1.25-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Handle hi-lock-mode in a more general way
- using <i>font-lock-mode-hook</i>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.26">1.26</dt>
- <dd id="v1.26-dd">
- <ul>
- <li>
- nxhtml-mode:
- <ul>
- <li>
- Removed the indent line patch for nxml-mode.
- </li>
- <li>
- Better test for empty page during completion.
- </li>
- </ul>
- </li>
- <li>
- tabkey2-mode:
- <ul>
- <li>
- A lot of improvements.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.27">1.27</dt>
- <dd id="v1.27-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Worked with bugs in mumamo.el that was due to bad
- handling of syntax-ppss et el. Looks like most of
- them are fixed.
- </li>
- <li>
- Fixed documentation and reordered code in mumamo.el
- and mumamo-fun.el.
- </li>
- <li>
- Changed javascript.el indentation to make it work with
- mumamo.el.
- </li>
- <li>
- Introduced the function
- <i>mumamo-make-variable-buffer-permanent</i> as an aid for
- minor mode authors.
- </li>
- <li>
- Fixed quite a few indentation bugs.
- There was one bug that could make Emacs loop after indentation.
- </li>
- </ul>
- </li>
- <li>
- nxml-where, mlinks
- <ul>
- <li>
- Fixed bugs with left over idle timers when buffer had
- been killed (nxml-where.el, mlinks.el).
- </li>
- </ul>
- </li>
- <li>
- html-site
- <ul>
- <li>
- Fixed a bug in html-site when comparing file
- names. File names where not made unique before
- comparision.
- </li>
- </ul>
- </li>
- <li>
- Tabkey2
- <ul>
- <li>
- Fixed tabkey2 bugs.
- </li>
- </ul>
- </li>
- <li>
- freemind.el
- <ul>
- <li>
- Fixed a problem in freemind-to-org-mode that
- caused the error "wrong-type-argument string: nil"
- in string-match("\\(?:^--org-mode: WHOLE FILE$\\)"
- nil).
- </li>
- </ul>
- </li>
- <li>
- Made nXhtml menu available in sub-chunks.
- </li>
- <li>
- Included a slightly changed version of Steve Yegge's
- js2.el + js2-fl-mode.el from 2008-04-24 with support for
- jit-lock-mode. This support has some flaws and maybe
- js2 is not ready for use, I am not sure. However if you want
- to use this instead of Karl Landströms javascript-mode
- then please customize <i>mumamo-major-modes</i>.
- </li>
- </ul>
- </dd>
- <dt id="v1.28">1.28</dt>
- <dd id="v1.28-dd">
- <ul>
- <li>
- New version with mostly minor bug fixes from 1.27.
- Unfortunately I put out 1.27 a bit too early.
- Please upgrade.
- </li>
- </ul>
- </dd>
- <dt id="v1.29">1.29</dt>
- <dd id="v1.29-dd">
- <ul>
- <li>
- MuMaMo:
- <ul>
- <li>
- Fixed a bug causing emacs to loop when &lt;?&gt;
- was encountered in an html style buffer.
- </li>
- <li>
- Fixed some problems with &lt;? and ?&gt; in
- strings in html style buffers.
- </li>
- <li>
- Tried to avoid chunk dividers in strings and comments. (There are still some bugs there.)
- </li>
- <li>
- Fixed an error that prevented byte compiling nxhtml-mumamo.el.
- (Thanks Christoph Conrad.)
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.30">1.30</dt>
- <dd id="v1.30-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support to handle specific rng
- schemacs. With the help of this Genshi and MJT
- templating languages are now handled.
- </li>
- <li>
- Let the rng schema file name survive mumamo major
- mode changes.
- </li>
- <li>
- Added support for to let nxml-mode skip chunks it
- can not parse. (This requires a patch to
- rng-valid.el too which is not included, but which
- I hope can go into Emacs soon.)
- </li>
- <li>
- Chunk dividers can now be a part on their own. (Ie
- there will be no parsing or syntax highlighting of
- them by the chunk major mode. This is optional and
- specified for each chunk types.)
- </li>
- <li>
- Added support for Genshi and MJT. These multi
- major modes support completion and error checking
- in the XML/XHTML part according to their DTD
- (which has some additions to the XHTML DTD).
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.31">1.31</dt>
- <dd id="v1.31-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed a bug that caused multi major modes to loop sometimes.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.32">1.32</dt>
- <dd id="v1.32-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed a bug in syntax-ppss advice.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.33">1.33</dt>
- <dd id="v1.33-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed another bug in syntax-ppss advice.
- </li>
- <li>
- Added support for <i>fill-forward-paragraph-function</i>.
- </li>
- <li>
- Made <i>longlines-mode</i> survive major mode changes in mumamo buffers.
- </li>
- <li>
- Fixed a bug that made Emacs loop when it found
- &lt;??&gt; in for example nxhtml-mumamo.
- </li>
- <li>
- Made it usable with Emacs 22 again.
- </li>
- <li>
- Moved some changes from rng-valid.el to
- mumamo.el. This makes it possible to let nxml-mode
- (and derivates) jump over parts when parsing the
- buffer even if not using the patched version of
- Emacs+EmacsW32.
- </li>
- </ul>
- </li>
- <li>
- nxhtml:
- <ul>
- <li>
- Added command to add CSS rollover images.
- </li>
- </ul>
- </li>
- <li>
- mlinks:
- <ul>
- <li>
- Tried to fix the error <i>invalid-read-syntax &quot;]
- in a list&quot;</i> when loading <i>mlinks.el</i>
- reported by some Asian users.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.34">1.34</dt>
- <dd id="v1.34-dd">
- <ul>
- <li>
- <span style="font-size: 1.2em; color: red ()"
- >Changed top directory name from nxml to nxhtml</span>
- <p>
- This will of course case some problems if you do not
- notice it when you upgrade nXhtml. If you are using
- EmacsW32 and upgrade nXhtml you should change the
- file <i>emacsw32.el</i>.
- </p>
- <p>
- The reason for this change is that nXml will soon
- normally not be part of nXhtml so keeping the old
- top directory name would be confusing.
- </p>
- </li>
- <li>
- Added a test suite. See the file <i>nxml/tests/test-Q.el</i>.
- </li>
- <li>
- Mumamo:
- <ul>
- <li>
- Fixed indentation when the whole line is a sub chunk.
- </li>
- <li>
- Tried a bit more to stop nxml from parsing non-xml
- mode chunks. Because of this php support was
- changed a bit (for the better I hope).
- </li>
- </ul>
- </li>
- <li>
- GIMP:
- <ul>
- <li>
- Registry value location for GIMP had changed.
- </li>
- </ul>
- </li>
- <li>
- nXhtml:
- <ul>
- <li>
- Added support for
- <a href="http://hyperstruct.net/projects/mozlab">MozLab</a>. If
- you install MozLab in Firefox then you can
- directly use it from javascript mode without any
- additional setup.
- </li>
- <li>
- Added <a href="http://www.oak.homeunix.org/~marcel/blog/articles/2008/07/18/nested-imenu-for-php">php-imenu.el</a>.
- </li>
- <li>
- Fixed a bug where I inadvertently
- added <i>../../lisp</i> to load-path.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.35">1.35</dt>
- <dd id="v1.35-dd">
- <ul>
- <li>
- Fixed a small bug in sex-mode.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.36">1.36</dt>
- <dd id="v1.36-dd">
- <ul>
- <li>
- Added the function <i>emacs-Q-nxhtml</i> for easier
- testing. It does the equivalent of <i>emacs -Q --load
- PATH-TO/nxhtml/autostart.el</i>.
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Forgot to return php-mode in php short tags. Fixed.
- </li>
- <li>
- Borders where not correctly calculated with php short tags. Fixed.
- </li>
- <li>
- Subchunks not parseable by nxml-mode where marked as parseable. Fixed.
- </li>
- <li>
- Debug messages from mumamo where not silenced.
- </li>
- <li>
- Forgot font-lock-syntactic-keywords. This showed up in
- bad fontification for strings sometimes. Fixed.
- </li>
- <li>
- To fontify keywords font-lock-syntactically-fontified
- must be set in each chunk. Fixed.
- </li>
- <li>
- Find a way to at least temporarily work around the
- problem with the last &quote; char in
- syntax=&quote;...&quote; that could be seen in
- large XHTML files, for example this file. The
- drawback with the work around is that it bypasses
- the cache for syntax-ppss, but this happens only
- in multi major mode buffers and I notice no
- performance problems here.
- </li>
- <li>
- Fixed a number of problems with the defadvice for the syntax functions.
- (I am afraid there are more left.)
- </li>
- <li>
- Took a new grab on the indentation problems.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.37">1.37</dt>
- <dd id="v1.37-dd">
- <ul>
- <li>
- The command <i>emacs-Q-nxhtml</i> and cousins did not
- work on all platform. Tried to fix it.
- </li>
- <li>
- Got a report that editing Django was to slow. Tried to fix this.
- </li>
- <li>
- Added a test to the unit test suite that test
- scrolling and jumping.
- </li>
- </ul>
- </dd>
- <dt id="v1.38">1.38</dt>
- <dd id="v1.38-dd">
- <ul>
- <li>
- Added a workaround that removes validation error marking in non-xhtml chunks.
- </li>
- </ul>
- </dd>
- <dt id="v1.39">1.39</dt>
- <dd id="v1.39-dd">
- <ul>
- <li>
- Multi major modes where not allowed in defcustoms
- nxhtml-magic-mode-alist and
- nxhtml-auto-mode-alist. Fixed.
- </li>
- <li>
- Added tests for the use of the lists above.
- </li>
- <li>
- Fixed some bugs that could make a buffer became
- modified during mumamo fontification actions.
- </li>
- </ul>
- </dd>
- </dl>
- </div>
- </div>
-
- <hr class="footer"/>
- <p class="footer">
- Copyright &copy; <!-- this year -->2008<!-- end this year --> OurComments.org
- --
- Latest update <!-- today -->2008-06-28<!-- end today -->
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/blorgit.rb b/emacs.d/nxhtml/tests/in/blorgit.rb
deleted file mode 100644
index 5ec40e5..0000000
--- a/emacs.d/nxhtml/tests/in/blorgit.rb
+++ /dev/null
@@ -1,313 +0,0 @@
-# blorgit --- blogging with org-mode
-require 'rubygems'
-require 'sinatra'
-require 'backend/rewrite_content_disposition'
-require 'yaml'
-$global_config ||= YAML.load(File.read(File.join(File.dirname(__FILE__), 'blorgit.yml')))
-$blogs_dir ||= File.expand_path($global_config[:blogs_dir])
-$url_prefix ||= $global_config[:url_prefix]
-require 'backend/init.rb'
-
-# Configuration (http://sinatra.rubyforge.org/book.html#configuration)
-#--------------------------------------------------------------------------------
-use RewriteContentDisposition, {"org" => "attachment"}
-set(:public, $blogs_dir)
-enable(:static)
-set(:app_file, __FILE__)
-set(:haml, { :format => :html5, :attr_wrapper => '"' })
-set(:url_prefix, $url_prefix)
-use_in_file_templates!
-mime(:org, 'text/org')
-
-# Routes (http://sinatra.rubyforge.org/book.html#routes)
-#--------------------------------------------------------------------------------
-get('/') do
- if config['index']
- redirect(path_for(config['index']))
- else
- "It seems you haven't yet configured a blogs directory. Try"+
- " running <tt>rake new</tt> from the root. of your blorgit directory"
- end
-end
-
-post(/^\/.search/) do
- @query = params[:query]
- @results = Blog.search(params[:query])
- haml :results
-end
-
-get(/^\/\.edit\/(.*)?$/) do
- pass unless config['editable']
- path, format = split_format(params[:captures].first)
- if @blog = Blog.find(path)
- @title = @blog.title
- @files = (Blog.files(path) or [])
- haml :edit
- else
- "Nothing here to edit."
- end
-end
-
-get(/^\/(.*)?$/) do
- path, format = split_format(params[:captures].first)
- @files = (Blog.files(path) or [])
- @blog = Blog.find(path)
- if @blog or File.directory?(Blog.expand(path))
- if format == 'html'
- @title = @blog ? @blog.title : path
- haml :blog
- elsif @blog
- content_type(format)
- attachment extension(@blog.path, format)
- @blog.send("to_#{format}")
- else
- pass
- end
- elsif config['editable'] and extension(path, 'org').match(Blog.location_regexp)
- pass if path.match(/^\./)
- protected!
- @path = path
- haml :confirm_create
- else
- "Can't create a new page at #{path}"
- end
-end
-
-post(/^\/(.*)?$/) do
- path, format = split_format(params[:captures].first)
- @blog = Blog.find(path)
- if params[:comment]
- pass unless (@blog and config['commentable'])
- return "Sorry, review your math..." unless params[:checkout] == params[:captca]
- @blog.add_comment(Comment.build(2, params[:title], params[:author], params[:body]))
- @blog.save
- redirect(path_for(@blog))
- elsif config['editable']
- protected!
- if @blog and params[:edit]
- @blog.body = params[:body]
- @blog.change_log = params[:change_log] if params[:change_log]
- @blog.save
- redirect(path_for(@blog))
- elsif extension(path, 'org').match(Blog.location_regexp)
- @blog = Blog.new(:path => extension(path, 'org'),
- :body => "# -*- mode: org -*-\n#+TITLE: #{File.basename(path)}\n#+OPTIONS: toc:nil ^:nil\n\n")
- @blog.save
- redirect(path_for(@blog))
- elsif path.match(/^\./)
- pass
- else
- "Can't create a new page at #{path}"
- end
- else
- pass
- end
-end
-
-# Helpers (http://sinatra.rubyforge.org/book.html#helpers)
-#--------------------------------------------------------------------------------
-helpers do
- def config
- $local_config_file ||= File.join($blogs_dir, '.blorgit.yml')
- $local_config ||= $global_config[:config].merge(File.exists?($local_config_file) ? YAML.load(File.read($local_config_file)) : {})
- config_file = File.join(File.dirname(File.join($blogs_dir, (params[:captures] ? params[:captures].first : ''))), '.blorgit.yml')
- $local_config.merge((File.exists?(config_file)) ? YAML.load(File.read(config_file)) : {})
- end
-
- def split_format(url) url.match(/(.+)\.(.+)/) ? [$1, $2] : [url, 'html'] end
-
- def path_for(path, opts ={})
- path = (path.class == Blog ? path.path : path)
- File.join(options.url_prefix, extension(path, (opts[:format] or nil)))
- end
-
- def show(blog, options={}) haml("%a{ :href => '#{path_for(blog)}' } #{blog.title}", :layout => false) end
-
- def comment(blog, parent_comment) end
-
- def extension(path, format = nil) (path.match(/^(.+)\..+$/) ? $1 : path)+(format ? "."+format : '') end
-
- def time_ago(from_time)
- distance_in_minutes = (((Time.now - from_time.to_time).abs)/60).round
- case distance_in_minutes
- when 0..1 then 'about a minute'
- when 2..44 then "#{distance_in_minutes} minutes"
- when 45..89 then 'about 1 hour'
- when 90..1439 then "about #{(distance_in_minutes.to_f / 60.0).round} hours"
- when 1440..2879 then '1 day'
- when 2880..43199 then "#{(distance_in_minutes / 1440).round} days"
- when 43200..86399 then 'about 1 month'
- when 86400..525599 then "#{(distance_in_minutes / 43200).round} months"
- when 525600..1051199 then 'about 1 year'
- else "over #{(distance_in_minutes / 525600).round} years"
- end
- end
-
- # from http://www.sinatrarb.com/faq.html#auth
- def protected!
- response['WWW-Authenticate'] = %(Basic realm="username and password required") and \
- throw(:halt, [401, "Not authorized\n"]) and \
- return unless ((not config['auth']) or authorized?)
- end
-
- def authorized?
- @auth ||= Rack::Auth::Basic::Request.new(request.env)
- @auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == config['auth']
- end
-
-end
-
-# HAML Templates (http://haml.hamptoncatlin.com/)
-#--------------------------------------------------------------------------------
-__END__
-@@ layout
-!!!
-%html
- %head
- %meta{'http-equiv' => "content-type", :content => "text/html;charset=UTF-8"}
- :javascript
- function toggle(item) {
- el = document.getElementById(item);
- if(el.style.display == "none") { document.getElementById(item).style.display = "block" }
- else { document.getElementById(item).style.display = "none" }
- }
- - if config['favicon']
- %link{:rel => "icon", :type => "image/x-icon", :href => path_for(config['favicon'], :format => 'ico')}
- %link{:rel => "stylesheet", :type => "text/css", :href => path_for(config['style'], :format => 'css')}
- %title= "#{config['title']}: #{@title}"
- %body
- #container
- #titlebar= render(:haml, :titlebar, :layout => false)
- #insides
- #sidebar= render(:haml, :sidebar, :locals => { :files => @files }, :layout => false)
- #contents= yield
-
-@@ titlebar
-#title_pre
-#title
- %a{ :href => path_for(''), :title => 'home' }= config['title']
-#title_post
-#search= haml :search, :layout => false
-- if @blog
- #actions
- %ul
- - if config['editable']
- %li
- %a{ :href => path_for(File.join(".edit", @blog.path)), :title => "edit #{@title}" } edit
- %li
- %a{ :href => path_for(@blog, :format => 'org'), :title => 'download as org-mode' } .org
- %li
- %a{ :href => path_for(@blog, :format => 'tex'), :title => 'download as LaTeX' } .tex
- %li
- %a{ :href => path_for(@blog, :format => 'pdf'), :title => 'download as PDF' } .pdf
-#title_separator
-
-@@ sidebar
-- if (config['recent'] and (config['recent'] > 0))
- #recent= haml :recent, :layout => false
-- if (config['dir_list'] and @files)
- #dir= haml :dir, :locals => { :files => files }, :layout => false
-
-@@ search
-%form{ :action => path_for('.search'), :method => :post, :id => :search }
- %ul
- %li
- %input{ :id => :query, :name => :query, :type => :text, :size => 12 }
- %li
- %input{ :id => :search, :name => :search, :value => :search, :type => :submit }
-
-@@ recent
-%label Recent
-%ul
- - Blog.all.sort_by(&:ctime).reverse[(0..(config['recent'] - 1))].each do |blog|
- %li
- %a{ :href => path_for(blog)}= blog.title
-
-@@ dir
-%label Directory
-%ul
- - files.each do |file|
- %li
- %a{ :href => path_for(file) + (File.directory?(Blog.expand(file)) ? "/" : "") }= File.basename(file)
-
-@@ results
-#results_list
- %h1
- Search Results for
- %em= "/" + @query + "/"
- %ul
- - @results.sort_by{ |b,h| -h }.each do |blog, hits|
- %li
- %a{ :href => path_for(blog) }= blog.name
- = "(#{hits})"
-
-@@ edit
-%h1= "Edit #{@title}"
-%form{ :action => path_for(@blog), :method => :post, :id => :comment_form }
- %textarea{ :id => :body, :name => :body, :rows => 28, :cols => 82 }= @blog.body
- %br
- Change log:
- %input{ :id => :change_log, :name => :change_log, :type => :text }
- %input{ :id => :submit, :name => :edit, :value => :update, :type => :submit }
- %a{ :href => path_for(@blog) } Cancel
-
-@@ blog
-- if @blog
- #blog_body= @blog.to_html
- - if (config['commentable'] and (not @blog.commentable == 'disabled'))
- #comments= render(:haml, :comments, :locals => {:comments => @blog.comments, :commentable => @blog.commentable}, :layout => false)
-- else
- #dir= haml :dir, :locals => { :files => @files }, :layout => false
-
-@@ comments
-#existing_commment
- %label= "Comments (#{comments.size})"
- %ul
- - comments.each do |comment|
- %li
- %ul
- %li
- %label title
- = comment.title
- %li
- %label author
- = comment.author
- %li
- %label date
- = time_ago(comment.date) + " ago"
- %li
- %label comment
- %div= Blog.string_to_html(comment.body)
-- unless commentable == 'closed'
- #new_comment
- %label{ :onclick => "toggle('comment_form');"} Post a new Comment
- %form{ :action => path_for(@blog), :method => :post, :id => :comment_form, :style => 'display:none' }
- - equation = "#{rand(10)} #{['+', '*', '-'].sort_by{rand}.first} #{rand(10)}"
- %ul
- %li
- %label name
- %input{ :id => :author, :name => :author, :type => :text }
- %li
- %label title
- %input{ :id => :title, :name => :title, :type => :text, :size => 36 }
- %li
- %label comment
- %textarea{ :id => :body, :name => :body, :rows => 8, :cols => 68 }
- %li
- %input{ :id => :checkout, :name => :checkout, :type => :hidden, :value => eval(equation) }
- %span
- %p to protect against spam, please answer the following
- = equation + " = "
- %input{ :id => :captca, :name => :captca, :type => :text, :size => 4 }
- %li
- %input{ :id => :submit, :name => :comment, :value => :comment, :type => :submit }
-
-@@ confirm_create
-%form{ :action => path_for(@path), :method => 'post', :id => 'creation_form'}
- %label
- Create a new page at
- %em= @path
- ?
- %input{ :id => 'submit', :name => 'submit', :value => 'create', :type => 'submit' }
- %a{ :href => path_for('/') } cancel
-
diff --git a/emacs.d/nxhtml/tests/in/bug-080609.html b/emacs.d/nxhtml/tests/in/bug-080609.html
deleted file mode 100644
index 708a00a..0000000
--- a/emacs.d/nxhtml/tests/in/bug-080609.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
- <head>
- <script>
- function x () { return 1 > 0; }
- </script>
- </head>
- <body class="foo">
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug-1908494.php b/emacs.d/nxhtml/tests/in/bug-1908494.php
deleted file mode 100644
index 778fb61..0000000
--- a/emacs.d/nxhtml/tests/in/bug-1908494.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$parent_id = 5;
-var_dump($parent_id);
-
-?>
diff --git a/emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.mm b/emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.mm
deleted file mode 100644
index 990d000..0000000
--- a/emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.mm
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node text="Title">
-<node text="Node 1">
-</node><!-- a -->
-<node text="Node 2">
-</node><!-- b -->
-</node><!-- c cl=3, bl=1, odd=t -->
-</map>
diff --git a/emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.org b/emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.org
deleted file mode 100644
index 5b9c3d5..0000000
--- a/emacs.d/nxhtml/tests/in/bug-2010-02-17-delgado.org
+++ /dev/null
@@ -1,3 +0,0 @@
-* Title
-*** Node 1
-*** Node 2
diff --git a/emacs.d/nxhtml/tests/in/bug-290364.php b/emacs.d/nxhtml/tests/in/bug-290364.php
deleted file mode 100644
index 190b230..0000000
--- a/emacs.d/nxhtml/tests/in/bug-290364.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-include 'HTML/QuickForm.php';
-
-echo '<script type="text/javascript" src="library/javascript/prototype.js" language="javascript"></script>';
-echo '<script type="text/javascript" src="library/javascript/scriptaculous.js" language="javascript"></script>';
-echo '<script type="text/javascript" src="library/cropper/cropper.js" language="javascript"></script>';
-
-
-
-echo ' <img src="test.jpg" alt="Test image" id="testImage" width="500" height="333" />';
-
-echo ' <script type="text/javascript" language="javascript">';
-
-echo ' function onEndCrop( coords, dimensions ) {';
-// echo ' $( "x1" ).value = coords.x1;';
-// echo ' $( "y1" ).value = coords.y1;';
-// echo ' $( "x2" ).value = coords.x2;';
-// echo ' $( "y2" ).value = coords.y2;';
-// echo ' $( "width" ).value = dimensions.width;';
-// echo ' $( "height" ).value = dimensions.height;';
-// echo 'console.log(coords.x1);';
-// echo 'console.log(coords.x2);';
-// echo ' style = clip:rect( + coords.x1 + "px " + coords.y1 + "px " + coords.x2 + "px " + coords.y2 + "px)\n"';
-?>
-style = "clip:rect(0px 130px 130px 0px)";
-$("hidden_0").value = new Array (coords.x1, coords.x2, coords.y1, coords.y2);
-$("testImage").writeAttribute("style=" style);
-}
-function js_init () {
- Event.observe( "button_0", "click", function() { } );
- // $("file_0").writeAttribute("src", "")
-
- new Cropper.Img("testImage", {minWidth: 220,previewWrap: "previewWrap", onEndCrop: onEndCrop });
-}
-
-
-
-Event.observe( window, "load", function() {
- js_init ();
- } );
-?>
-echo ' </script>';
-
-echo '<h1> Cropper votre image v0.1</h1>';
-
-$label = 'file_default';
-
-$form = new HTML_QuickForm ('cropper_form', "", "img-cropped.php", '', 'enctype=multipart/form-data');
-
-$form->addElement ('file', 'file_0', $label);
-$form->addElement ('hidden', 'hidden_0');
-$form->addElement ('button', 'button_0');
-$form->updateElementAttr(array('button_0'), array ('id' => 'button_0'));
-$form->addElement ('submit', 'submit_0', 'Envoyer!');
-$form->updateElementAttr(array('file_0'), array ('id' => 'file_0'));
-$form->updateElementAttr(array('hidden_0'), array ('id' => 'hidden_0'));
-echo $form->toHtml ();
-
-if (isset ($_POST['file_0'])):
-$image = $_POST['file_0'];
-tmpfile ($image);
-echo $_POST['file_0'];
-endif;
-echo sys_get_temp_dir ();
-var_dump ($_POST);
-?> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug-300946-index.html b/emacs.d/nxhtml/tests/in/bug-300946-index.html
deleted file mode 100644
index a90814a..0000000
--- a/emacs.d/nxhtml/tests/in/bug-300946-index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-
-<head>
-<meta http-equiv="expires" content="Monday, February 2nd, 2004 7:51:17pm">
-<title>The ACSys Group Home Page</title>
-</head>
- <frameset rows="113,*" framespacing="0" frameborder="0">
-
- <frame name="logo" target="logo" src="logo.htm" marginwidth="4" marginheight="0">
-
- <frameset cols="17%,*" framespacing="0" frameborder="0">
- <frame name="menu" target="content" src="menu.htm" marginwidth="4" marginheight="0">
- <frame name="content" target="_self" src="mission.htm" marginwidth="0" marginheight="0">
- </frameset>
-
- <noframes>
- <body>
- <p>This page uses frames, but your browser doesn't support them.</p>
- </body>
- </noframes>
-
- </frameset>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug-311640-index.html b/emacs.d/nxhtml/tests/in/bug-311640-index.html
deleted file mode 100644
index 64bb09b..0000000
--- a/emacs.d/nxhtml/tests/in/bug-311640-index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<script type="text/javascript">
- // Set this to the URL you used to fetch recommendations, whether you
- // fetched them on the client or the server.
- var request_url = '%(json_url)s';
-
- // This function is used track click-throughs by fetching a web
- // beacon.n
- function trackClickThrough(elem) {
- var img = new Image();
- img.src = '%(beacon_url)s' +
- '?request_url=' + escape(request_url) +
- '&click_through_url=' + escape(elem.href);
- return true;
- }
-</script>
-
-<p>
- <!--
- Imagine this is one of the recommendations that was returned.
- Just add an onclick handler that calls trackClickThrough.
- -->
- <a href="http://www.google.com"
- onclick="return trackClickThrough(this);">Click me!</a>
-</p>
diff --git a/emacs.d/nxhtml/tests/in/bug-311641.php b/emacs.d/nxhtml/tests/in/bug-311641.php
deleted file mode 100644
index 96109ba..0000000
--- a/emacs.d/nxhtml/tests/in/bug-311641.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?
-
-try {
-} catch (PDOException $e) {
- }
-
-?> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug-373106-flipbook.html b/emacs.d/nxhtml/tests/in/bug-373106-flipbook.html
deleted file mode 100644
index 658d391..0000000
--- a/emacs.d/nxhtml/tests/in/bug-373106-flipbook.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <title>Flipbook (draft)</title>
- <style type="text/css">
- body {
- background-color: black;
- color: white;
- }
-
- .ui-effects-transfer {
- border: 2px dotted gray;
- }
- </style>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="jquery-ui.js"></script>
- <script type="text/javascript" src="jquery.event.special.gesture.js"></script>
- <script type="text/javascript" src="jquery.gestureable.js"></script>
- <script type="text/javascript">
- /* Code to do some fancy book-like effects
- */
-
- /* a closure-based class */
- var ImageManager = function (images) {
- var self = this;
- var currentPage = 0;
-
- self.getCurrentPages = function () {
- return [images[currentPage],
- images[currentPage+1]];
- };
-
- self.turnNext = function () {
- currentPage += 2;
- return self.getCurrentPages();
- };
-
- self.turnPrevious = function () {
- currentPage -= 2;
- return self.getCurrentPages();
- };
- };
-
- function style_element(element) {
- element.css('background-color', 'black');
- element.css('width', '900px');
- element.css('height', '650px');
- element.css('border', '2px dashed white');
- }
-
- function small_gesture(event) {
- /* called in mousedown of small images */
- var container = $(event.target).closest('div');
- var manager = container.data('manager');
- var large = $(event.target).
- attr('src').
- replace(/small/, 'large');
-
- switch (event.gesture) {
- case 'U':
- case 'D':
- container.data('left').hide();
- container.data('right').hide();
- container.data('spacer').hide();
- container.data('zoomed').attr('src', large).show('clip');
- break;
- case 'L':
- var images = manager.turnPrevious();
- container.data('left').attr('src', images[0] + '_small.jpg');
- container.data('right').attr('src', images[1] + '_small.jpg');
- break;
- case 'R':
- var images = manager.turnNext();
- container.data('left').attr('src', images[0] + '_small.jpg');
- container.data('right').attr('src', images[1] + '_small.jpg');
- break;
- }
- }
-
- function large_gesture(event) {
- var container = $(event.target).closest('div');
- switch (event.gesture) {
- case 'U':
- case 'D':
- $(event.target).hide();
- container.data('spacer').show();
- container.data('left').show();
- container.data('right').show();
- }
- }
-
- function disable_scroll(event) {
- /* Simply disables the dragging of elements */
- return false;
- }
-
- function flipbook(element, images) {
- var manager = new ImageManager(images);
- element.data('manager', manager);
-
- // apply the style
- style_element(element);
-
- // create a spacer div and attach it
- var spacer = $('<div class="spacer"></div>');
- spacer.css('height', '162px');
- element.data('spacer', spacer);
- element.append(spacer);
-
- var zoomed = $('<img />');
- zoomed.gestureable();
- zoomed.mouseup(large_gesture).
- mousedown(disable_scroll).
- hide();
-
- element.data('zoomed', zoomed);
- element.append(zoomed);
-
- // create the images
- var currentImages = manager.getCurrentPages();
- var left = $('<img src="' + currentImages[0] + '_small.jpg" />');
- var right = $('<img src="' + currentImages[1] + '_small.jpg" />');
- element.data('left', left);
- element.data('right', right);
-
- $([left, right]).each(function (key, value) {
- // enable gestures
- value.gestureable();
- value.mouseup(small_gesture);
- value.mousedown(disable_scroll);
- // add to the display
- element.append(value);
- });
- }
-
- $(document).ready(function () {
- flipbook($('#flipbook'),
- ['image_01', 'image_02', 'image_03', 'image_04',
- 'image_05', 'image_06', 'image_07', 'image_08',
- 'image_09', 'image_10', 'image_11', 'image_12',
- 'image_13', 'image_14', 'image_15']);
- });
- </script>
- </head>
- <body>
- <div id="flipbook"></div>
- <p>Usage: gesture left/right to change images, up/down to zoom in/out</p>
- <p>The flipbook uses a number of libs:</p>
- <p>
- <ul>
- <li>jQuery</li>
- <li>jQuery UI</li>
- <li>jQuery Special Event Gestures</li>
- </ul>
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug-381191-dh-test.el b/emacs.d/nxhtml/tests/in/bug-381191-dh-test.el
deleted file mode 100644
index d960a10..0000000
--- a/emacs.d/nxhtml/tests/in/bug-381191-dh-test.el
+++ /dev/null
@@ -1,23 +0,0 @@
-;; 3. Add a new c-indentation-style:
-
-(defconst drupal
- '((c-basic-offset . 2)
- (c-offsets-alist . ((arglist-close . c-lineup-close-paren)
- (case-label . +)
- (arglist-intro . +)
- (arglist-cont-nonempty . c-lineup-math))))
- "My Drupal Programming style")
-
-(c-add-style "drupal" drupal)
-
-;; 4. Open file test.php, attached.
-
-;; 5. Run `c-set-style' and select "drupal"
-
-;; 6. Select the whole buffer and press "C-M-\" (or any other indentation command,
-;; for that matter) and watch as the array elements are lined up with "array(",
-;; whereas they should be indented by 2.
-
-;; 7. Run M-x php-mode and c-set-style to drupal
-
-;; 8. Try indenting again to see that indentation now works properly.
diff --git a/emacs.d/nxhtml/tests/in/bug-381191-dh-test.php b/emacs.d/nxhtml/tests/in/bug-381191-dh-test.php
deleted file mode 100644
index c9e450c..0000000
--- a/emacs.d/nxhtml/tests/in/bug-381191-dh-test.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$a = array(
- 'foo' => 'bar',
- 'gaz' => 'gazonk',
-);
-?> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-12.rhtml b/emacs.d/nxhtml/tests/in/bug-johan-2010-02-12.rhtml
deleted file mode 100644
index 758a4b0..0000000
--- a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-12.rhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
- <link rel="icon" href="/favicon.ico" />
-
- <%= include_stylesheets :blueprint, :application, :media => 'all' %>
-<!--[if lt IE 8]>
- <%= include_stylesheets :ie, :media => 'all' %>
- <![endif]-->
-<%= include_javascripts :mootools, :application %>
- </head>
- <body>
- <div id="container">
- <%= render :partial => "layouts/application/header" %>
-<%= render :partial => "layouts/application/menu" %>
- <%= render :partial => "layouts/application/search_bar" %>
-<%= render :partial => "layouts/application/contents" %>
- <%= render :partial => "layouts/application/footer" %>
-</div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-16.html.haml b/emacs.d/nxhtml/tests/in/bug-johan-2010-02-16.html.haml
deleted file mode 100644
index 4184a32..0000000
--- a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-16.html.haml
+++ /dev/null
@@ -1,34 +0,0 @@
-!!! Strict
-%html
- %head
- %title= t("site.title")
- %meta{"http-equiv" => "Content-Type", :content => "text/html;charset=utf-8"}
- = javascript_include_merged :mootools, :application
- = stylesheet_link_merged :application
- /[if lt IE 8]
- = stylesheet_link_merged :ie
-
- %body
- = render :partial => "shared/fork"
- #container
- #logo
- = link_to image_tag("logo.png"), root_url
-
- = render :partial => "shared/user_panel"
- = render :partial => "shared/menu"
-
- #body
- #contents
- = render :partial => "shared/flash", :object => flash
-
- .padder
- #search_results
-
- = yield
-
- #sidebar
- .padder
- = render :partial => "shared/sidebar"
-
- #footer
- %p= t("site.copyright")
diff --git a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-17-2.erb b/emacs.d/nxhtml/tests/in/bug-johan-2010-02-17-2.erb
deleted file mode 100644
index 67411a9..0000000
--- a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-17-2.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-
-<% semantic_form_for @user_session do |form| %>
-<%= form.error_messages :header_tag => :h3 %>
-<%#= authlogic_facebook_login_button %>
-
-<% form.inputs do %>
-<%= form.input :email %>
-<%= form.input :password %>
-<% end %>
-
-<% form.buttons do %>
-<%= form.commit_button %>
-<% end %>
-<% end %>
diff --git a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-17.erb b/emacs.d/nxhtml/tests/in/bug-johan-2010-02-17.erb
deleted file mode 100644
index ebb5094..0000000
--- a/emacs.d/nxhtml/tests/in/bug-johan-2010-02-17.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<% collection.each do |item| %>
-<%= item.method %>
-<% end %>
-
diff --git a/emacs.d/nxhtml/tests/in/bug261792.ghtml b/emacs.d/nxhtml/tests/in/bug261792.ghtml
deleted file mode 100644
index faec7f9..0000000
--- a/emacs.d/nxhtml/tests/in/bug261792.ghtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:py="http://genshi.edgewall.org/"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- lang="en">
- <xi:include href="../layout.html" />
- <head>
diff --git a/emacs.d/nxhtml/tests/in/bug271497.el b/emacs.d/nxhtml/tests/in/bug271497.el
deleted file mode 100644
index 7abe02e..0000000
--- a/emacs.d/nxhtml/tests/in/bug271497.el
+++ /dev/null
@@ -1,14 +0,0 @@
-;;; bug271497.el --- For bug report 271497 at Launchpad
-(require 'ada-mode)
-(require 'mumamo)
-
-(eval-and-compile
- (defun mumamo-chunk-embjava (pos min max)
- "Find JAVA_ON ... JAVA_OFF, return range and java-mode."
- (mumamo-quick-static-chunk pos min max "JAVA_ON" "JAVA_OFF" nil 'java-mode nil))
- )
-
-(define-mumamo-multi-major-mode bug271497-mumamo
- "docstring"
- ("ADA Mode" ada-mode
- (mumamo-chunk-embjava)))
diff --git a/emacs.d/nxhtml/tests/in/bug271497.txt b/emacs.d/nxhtml/tests/in/bug271497.txt
deleted file mode 100644
index 7e4e8e5..0000000
--- a/emacs.d/nxhtml/tests/in/bug271497.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-This is supposed to be ada code
-
-JAVA_ON
-and this is supposed to be java code
-JAVA_OFF
-
-This is also supposed to be ada code
diff --git a/emacs.d/nxhtml/tests/in/bug272871.php b/emacs.d/nxhtml/tests/in/bug272871.php
deleted file mode 100644
index c205383..0000000
--- a/emacs.d/nxhtml/tests/in/bug272871.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-function a()
-{
- b($a, $b);
- c($b, $c);
-}
-?> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug290364-messages.txt b/emacs.d/nxhtml/tests/in/bug290364-messages.txt
deleted file mode 100644
index 4aaae9a..0000000
--- a/emacs.d/nxhtml/tests/in/bug290364-messages.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-("/usr/bin/emacs22-gtk")
-Loading 00debian-vars...
-No /etc/mailname. Reverting to default...
-Loading 00debian-vars...done
-Loading /etc/emacs/site-start.d/20apel.el (source)...done
-Loading /etc/emacs/site-start.d/50cedet-common.el (source)...
-Loading advice...done
-Loading /etc/emacs/site-start.d/50cedet-common.el (source)...done
-Loading /etc/emacs/site-start.d/50css-mode.el (source)...done
-Loading /etc/emacs/site-start.d/50devhelp.el (source)...done
-Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
-Loading debian-ispell...
-Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
-Loading debian-ispell...done
-Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
-Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
-Loading /etc/emacs/site-start.d/50eieio.el (source)...done
-Loading /etc/emacs/site-start.d/50eldav.el (source)...done
-Loading /etc/emacs/site-start.d/50elserv.el (source)...done
-Loading /etc/emacs/site-start.d/50emacs-extra.el (source)...done
-Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...done
-Loading /etc/emacs/site-start.d/50erc.el (source)...
-Loading erc-auto...done
-Loading /etc/emacs/site-start.d/50erc.el (source)...done
-Loading /etc/emacs/site-start.d/50flim.el (source)...done
-Loading /etc/emacs/site-start.d/50gettext.el (source)...done
-Loading /etc/emacs/site-start.d/50html-helper-mode.el (source)...done
-Loading /etc/emacs/site-start.d/50mmm-mode.el (source)...done
-Loading /etc/emacs/site-start.d/50php-elisp.el (source)...done
-Loading /etc/emacs/site-start.d/50php-mode.el (source)...done
-Loading /etc/emacs22/site-start.d/50psgml-init.el (source)...done
-Loading /etc/emacs/site-start.d/50psvn.el (source)...done
-Loading /etc/emacs/site-start.d/50tramp.el (source)...done
-Loading /etc/emacs/site-start.d/50w3m-el.el (source)...done
-Loading /etc/emacs/site-start.d/51ede.el (source)...done
-Loading /etc/emacs/site-start.d/51speedbar.el (source)...done
-Loading /etc/emacs/site-start.d/52semantic.el (source)...done
-Loading /etc/emacs/site-start.d/53cedet-contrib.el (source)...done
-Loading /etc/emacs/site-start.d/53cogre.el (source)...done
-Loading /etc/emacs/site-start.d/55ecb.el (source)...
-"/usr/share/emacs22/site-lisp/cedet-common/" added to `load-path'
-Setting up cedet...done
-Setting up cogre...done
-Setting up ede...
-Loading ede...
-Loading ede-speedbar...done
-Loading ede...done
-Setting up ede...done
-Setting up eieio...done
-Setting up semantic...
-Loading derived...done
-Setting up semantic...done
-Setting up speedbar...done
-Setting up cedet-contrib...done
-Loading /etc/emacs/site-start.d/55ecb.el (source)...done
-Loading /etc/emacs22/site-start.d/60nxml-mode.el (source)...
-Loading /usr/share/emacs22/site-lisp/nxml-mode/rng-auto.el (source)...done
-Loading /etc/emacs22/site-start.d/60nxml-mode.el (source)...done
-Loading /etc/emacs/site-start.d/60wysihtml-el.el (source)...done
-Loading /home/guillaume/elisp/nxhtml/autostart.el (source)...
-Nxml/Nxhtml Autostart.el loading ...
-Loading edmacro...done
-Loading easy-mmode...done
-Loading /home/guillaume/elisp/nxhtml/nxhtml-loaddefs.el (source)...done
-Loading /home/guillaume/elisp/nxhtml/etc/schema/schema-path-patch.el (source)...done
-xhtml-loader.rnc was ok
-(No changes need to be saved)
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml-autoload.el (source)...
-Loading /home/guillaume/elisp/nxhtml/util/majmodpri.el (source)...done
-majmodpri-sort-lists running ...
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml-autoload.el (source)...done
-Loading /home/guillaume/elisp/nxhtml/autostart.el (source)...done
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml.el (source)...
-html-site-current (information): No current site set
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml.el (source)...done
-Loading nxml-uchnm...done
-Loading rng-nxml...done
-Loading rng-cmpct...done
-Loading rng-xsd...done
-Using vacuous schema
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml-menu.el (source)...done
-Loading /home/guillaume/elisp/nxhtml/util/mlinks.el (source)...done
-Loading imenu...done
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml-mumamo.el (source)...
-Loading byte-opt...done
-Loading /home/guillaume/elisp/nxhtml/nxhtml/nxhtml-mumamo.el (source)...done
-Showing all blocks ... done
-Loading semantic-html...done
-Loading /home/guillaume/elisp/geben/geben.el (source)...done
-ispell.el is already loaded
-Using vacuous schema [4 times]
-Loading semantic-el...done
-let: Wrong type argument: stringp, nil [2 times]
-Making completion list...
-Loading eieio-opt...done
-Making completion list...
-let: Wrong type argument: stringp, nil \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug354363-index.php b/emacs.d/nxhtml/tests/in/bug354363-index.php
deleted file mode 100644
index 3644f5d..0000000
--- a/emacs.d/nxhtml/tests/in/bug354363-index.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
- define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/'));
-set_include_path(
- APPLICATION_PATH . '/../library'
- . PATH_SEPARATOR . get_include_path()
- );
-
-if(true){
- echo 'test';
- }
-else
- {
-
- }
-
-require_once "Zend/Loader.php";
-Zend_Loader::registerAutoload();
-
-try
-{
- require '../application/bootstrap.php';
- }
-catch(Exception $exception)
-{
- echo '<html><body><center>'
- . 'An exception occured while bootstrapping the application.';
- if(defined('APPLICATION_ENVIRONMENT')
- && APPLICATION_ENVIRONMENT != 'production'
- ) {
- echo '<br /><br />' . $exception->getMessage() . '<br />'
- . '<div align="left">Stack Trace:'
- . '<pre>' . $exception->getTraceAsString() . '</pre></div>';
- }
- echo '</center><body></html>';
- exit(1);
- }
-
-Zend_Controller_Front::getInstance()->dispatch();
diff --git a/emacs.d/nxhtml/tests/in/bug354363-test.php b/emacs.d/nxhtml/tests/in/bug354363-test.php
deleted file mode 100644
index 10e2c0d..0000000
--- a/emacs.d/nxhtml/tests/in/bug354363-test.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-echo 'test';
-?>
diff --git a/emacs.d/nxhtml/tests/in/bug369800-load-history.txt b/emacs.d/nxhtml/tests/in/bug369800-load-history.txt
deleted file mode 100644
index aad863d..0000000
--- a/emacs.d/nxhtml/tests/in/bug369800-load-history.txt
+++ /dev/null
@@ -1,9483 +0,0 @@
-load-history is a variable defined in `C source code'.
-Its value is shown below.
-
-Documentation:
-Alist mapping file names to symbols and features.
-Each alist element is a list that starts with a file name,
-except for one element (optional) that starts with nil and describes
-definitions evaluated from buffers not visiting files.
-
-The file name is absolute and is the true file name (i.e. it doesn't
-contain symbolic links) of the loaded file.
-
-The remaining elements of each list are symbols defined as variables
-and cons cells of the form `(provide . FEATURE)', `(require . FEATURE)',
-`(defun . FUNCTION)', `(autoload . SYMBOL)', `(defface . SYMBOL)'
-and `(t . SYMBOL)'. An element `(t . SYMBOL)' precedes an entry
-`(defun . FUNCTION)', and means that SYMBOL was an autoload before
-this file redefined it as a function.
-
-During preloading, the file name recorded is relative to the main Lisp
-directory. These file names are converted to absolute at startup.
-
-Value:
-(("/home/hobbes/nxhtml/autostart.el" nxhtml-install-dir
- (defun . nxhtml-custom-autoload)
- (defun . nxhtml-list-loaded-features)
- (provide . nxhtml-autostart))
- ("/home/hobbes/nxhtml/nxhtml/nxhtml-autoload.el"
- (require . majmodpri)
- (require . moz)
- (defun . javascript-moz-setup)
- nxhtml-src-dir
- (provide . nxhtml-autoload))
- ("/home/hobbes/nxhtml/related/moz.el"
- (require . comint)
- (require . cc-cmds)
- moz-minor-mode-map moz-minor-mode
- (t . moz-minor-mode)
- (defun . moz-minor-mode)
- (defun . run-mozilla)
- moz-repl-name moz-input-separator moz-repl-host moz-repl-port moz-temporary-file
- (defun . moz-temporary-file)
- (defun . moz-send-region)
- (defun . moz-send-defun)
- (defun . moz-send-defun-and-go)
- (defun . moz-save-buffer-and-send)
- inferior-moz-buffer
- (defun . inferior-moz-insert-moz-repl)
- inferior-moz-mode-map inferior-moz-mode-map inferior-moz-mode-syntax-table inferior-moz-mode-abbrev-table inferior-moz-mode-abbrev-table
- (t . inferior-moz-mode)
- (defun . inferior-moz-mode)
- (defun . inferior-moz-track-repl-name)
- (defun . inferior-moz-self-insert-or-repl-name)
- (defun . inferior-moz-input-sender)
- (defun . inferior-moz-switch-to-mozilla)
- (defun . inferior-moz-process)
- (defun . inferior-moz-start-process)
- (provide . moz))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/cc-cmds.elc"
- (require . cc-defs)
- (require . cc-vars)
- (require . cc-engine)
- c-fix-backslashes
- (defun . c-indent-line)
- (defun . c-newline-and-indent)
- (defun . c-show-syntactic-information)
- (defun . c-syntactic-information-on-region)
- (defun . c-update-modeline)
- (defun . c-toggle-syntactic-indentation)
- (defun . c-toggle-auto-newline)
- (defun . c-toggle-auto-state)
- (defun . c-toggle-hungry-state)
- (defun . c-toggle-auto-hungry-state)
- (defun . c-toggle-electric-state)
- (defun . c-electric-backspace)
- (defun . c-hungry-delete-backwards)
- (defun . c-hungry-backspace)
- (defun . c-electric-delete-forward)
- (defun . c-hungry-delete-forward)
- (defun . c-electric-delete)
- (defun . c-hungry-delete)
- (defun . c-electric-pound)
- (defun . c-point-syntax)
- (defun . c-brace-newlines)
- (defun . c-try-one-liner)
- (defun . c-electric-brace)
- (defun . c-electric-slash)
- (defun . c-electric-star)
- (defun . c-electric-semi&comma)
- (defun . c-electric-colon)
- (defun . c-electric-lt-gt)
- (defun . c-electric-paren)
- (defun . c-electric-continued-statement)
- (defun . c-forward-into-nomenclature)
- (defun . c-backward-into-nomenclature)
- (defun . c-scope-operator)
- (defun . c-in-function-trailer-p)
- (defun . c-where-wrt-brace-construct)
- (defun . c-backward-to-nth-BOF-{)
- (defun . c-beginning-of-defun)
- (defun . c-forward-to-nth-EOF-})
- (defun . c-end-of-defun)
- (defun . c-defun-name)
- (defun . c-declaration-limits)
- (defun . c-mark-function)
- (defun . c-cpp-define-name)
- (defun . c-in-comment-line-prefix-p)
- (defun . c-narrow-to-comment-innards)
- (defun . c-beginning-of-sentence-in-comment)
- (defun . c-end-of-sentence-in-comment)
- (defun . c-beginning-of-sentence-in-string)
- (defun . c-end-of-sentence-in-string)
- (defun . c-ascertain-preceding-literal)
- (defun . c-ascertain-following-literal)
- (defun . c-after-statement-terminator-p)
- (defun . c-back-over-illiterals)
- (defun . c-forward-over-illiterals)
- (defun . c-one-line-string-p)
- (defun . c-beginning-of-statement)
- (defun . c-end-of-statement)
- (defun . c-calc-comment-indent)
- (defun . c-comment-indent)
- (defun . c-outline-level)
- (defun . c-up-conditional)
- (defun . c-up-conditional-with-else)
- (defun . c-down-conditional)
- (defun . c-down-conditional-with-else)
- (defun . c-backward-conditional)
- (defun . c-forward-conditional)
- (defun . c-indent-command)
- (defun . c-indent-exp)
- (defun . c-indent-defun)
- (defun . c-indent-region)
- (defun . c-fn-region-is-active-p)
- (defun . c-indent-line-or-region)
- c-progress-info
- (defun . c-progress-init)
- (defun . c-progress-update)
- (defun . c-progress-fini)
- (defun . c-backslash-region)
- (defun . c-append-backslashes-forward)
- (defun . c-delete-backslashes-forward)
- c-auto-fill-prefix c-lit-limits c-lit-type
- (defun . c-guess-fill-prefix)
- (defun . c-mask-paragraph)
- (defun . c-fill-paragraph)
- (defun . c-do-auto-fill)
- (defun . c-indent-new-comment-line)
- (defun . c-comment-line-break-function)
- (defun . c-context-line-break)
- (defun . c-context-open-line)
- (provide . cc-cmds))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/cc-engine.elc"
- (require . cc-defs)
- (require . cc-vars)
- (defun . c-declare-lang-variables)
- c++-template-syntax-table c-identifier-syntax-modifications c-identifier-syntax-table c-get-state-before-change-function c-before-font-lock-function c-symbol-start c-symbol-key c-nonsymbol-chars c-opt-identifier-concat-key c-identifier-start c-identifier-key c-string-escaped-newlines c-multiline-string-start-char c-opt-cpp-prefix c-anchored-cpp-prefix c-opt-cpp-start c-opt-cpp-macro-define-start c-opt-cpp-macro-define-id c-overloadable-operators-regexp c-opt-op-identifier-prefix c-nonsymbol-token-regexp c-assignment-op-regexp c-<>-multichar-token-regexp c-<-op-cont-regexp c->-op-cont-regexp c-stmt-delim-chars c-stmt-delim-chars-with-comma c-line-comment-starter c-comment-start-regexp c-block-comment-start-regexp c-literal-start-regexp c-doc-comment-start-regexp c-syntactic-ws-start c-syntactic-ws-end c-syntactic-eol c-at-vsemi-p-fn c-vsemi-status-unknown-p-fn c-paragraph-start c-paragraph-separate c-primitive-type-key c-type-prefix-key c-opt-type-modifier-key c-opt-type-component-key c-class-key c-brace-list-key c-other-decl-block-key c-other-decl-block-key-in-symbols-alist c-decl-hangon-key c-prefix-spec-kwds-re c-specifier-key c-not-decl-init-keywords c-opt-block-decls-with-vars-key c-colon-type-list-re c-opt-<>-sexp-key c-block-stmt-1-key c-block-stmt-2-key c-opt-block-stmt-key c-simple-stmt-key c-paren-stmt-key c-opt-asm-stmt-key c-case-kwds-regexp c-label-kwds-regexp c-opt-inexpr-brace-list-key c-decl-block-key c-opt-bitfield-key c-keywords-regexp c-keywords-obarray c-regular-keywords-regexp c-primary-expr-regexp c-decl-prefix-re c-decl-start-re c-decl-prefix-or-start-re c-cast-parens c-block-prefix-charset c-type-decl-prefix-key c-type-decl-suffix-key c-after-suffixed-type-decl-key c-after-suffixed-type-maybe-decl-key c-opt-type-concat-key c-opt-type-suffix-key c-known-type-key c-special-brace-lists c-recognize-knr-p c-recognize-typeless-decls c-recognize-<>-arglists c-recognize-paren-inits c-recognize-paren-inexpr-blocks c-opt-<>-arglist-start c-opt-<>-arglist-start-in-paren c-opt-postfix-decl-spec-key c-recognize-colon-labels c-label-prefix-re c-nonlabel-token-key c-opt-extra-label-key c-opt-friend-key c-opt-method-key c-type-decl-end-used c-hungry-delete-key c-electric-flag c-auto-newline
- (defun . c-calculate-state)
- c-in-literal-cache c-macro-start
- (defun . c-query-and-set-macro-start)
- (defun . c-query-macro-start)
- (defun . c-beginning-of-macro)
- (defun . c-end-of-macro)
- (defun . c-forward-over-cpp-define-id)
- (defun . c-forward-to-cpp-define-body)
- (defun . c-syntactic-content)
- (defun . c-shift-line-indentation)
- (defun . c-keyword-sym)
- (defun . c-keyword-member)
- c-string-syntax c-string-syntax c-string-limit-regexp c-string-limit-regexp c-ws*-string-limit-regexp c-ws*-string-limit-regexp c-parsing-error
- (defun . c-echo-parsing-error)
- c-literal-faces
- (defun . c-put-c-type-property)
- (defun . c-clear-c-type-property)
- (defun . c-debug-add-face)
- (defun . c-debug-remove-face)
- (defun . c-bos-push-state)
- (defun . c-bos-pop-state)
- (defun . c-bos-pop-state-and-retry)
- (defun . c-bos-save-pos)
- (defun . c-bos-restore-pos)
- (defun . c-bos-save-error-info)
- (defun . c-bos-report-error)
- (defun . c-beginning-of-statement-1)
- (defun . c-crosses-statement-barrier-p)
- (defun . c-at-statement-start-p)
- (defun . c-at-expression-start-p)
- (defun . c-forward-single-comment)
- (defun . c-forward-comments)
- (defun . c-backward-single-comment)
- (defun . c-backward-comments)
- (defun . c-debug-sws-msg)
- (defun . c-put-is-sws)
- (defun . c-put-in-sws)
- (defun . c-remove-is-sws)
- (defun . c-remove-in-sws)
- (defun . c-remove-is-and-in-sws)
- (defun . c-invalidate-sws-region-after)
- (defun . c-forward-sws)
- (defun . c-backward-sws)
- (defun . c-partial-ws-p)
- c-state-cache c-state-cache-start c-state-cache-good-pos
- (defun . c-invalidate-state-cache)
- (defun . c-get-fallback-start-pos)
- (defun . c-parse-state)
- c-debug-parse-state
- (defun . c-debug-parse-state)
- (defun . c-toggle-parse-state-debug)
- (defun . c-whack-state-before)
- (defun . c-whack-state-after)
- (defun . c-most-enclosing-brace)
- (defun . c-least-enclosing-brace)
- (defun . c-safe-position)
- (defun . c-beginning-of-syntax)
- (defun . c-on-identifier)
- (defun . c-simple-skip-symbol-backward)
- (defun . c-beginning-of-current-token)
- (defun . c-end-of-current-token)
- c-jump-syntax-balanced c-jump-syntax-balanced c-jump-syntax-unbalanced c-jump-syntax-unbalanced
- (defun . c-forward-token-2)
- (defun . c-backward-token-2)
- (defun . c-forward-token-1)
- (defun . c-backward-token-1)
- (defun . c-syntactic-re-search-forward)
- (defun . c-syntactic-skip-backward)
- (defun . c-slow-in-literal)
- (defun . c-fast-in-literal)
- (defun . c-in-literal)
- (defun . c-literal-limits)
- (defun . c-literal-limits-fast)
- (defun . c-collect-line-comments)
- (defun . c-literal-type)
- c-find-decl-syntactic-pos c-find-decl-match-pos
- (defun . c-invalidate-find-decl-cache)
- (defun . c-debug-put-decl-spot-faces)
- (defun . c-debug-remove-decl-spot-faces)
- (defun . c-find-decl-prefix-search)
- (defun . c-find-decl-spots)
- c-found-types
- (defun . c-clear-found-types)
- (defun . c-add-type)
- (defun . c-unfind-type)
- (defun . c-check-type)
- (defun . c-list-found-types)
- (defun . c-trim-found-types)
- (defun . c-after-change-check-<>-operators)
- c-promote-possible-types c-parse-and-markup-<>-arglists c-restricted-<>-arglists c-record-type-identifiers c-record-ref-identifiers c-last-identifier-range
- (defun . c-record-type-id)
- (defun . c-record-ref-id)
- c-record-found-types
- (defun . c-forward-keyword-prefixed-id)
- (defun . c-forward-id-comma-list)
- (defun . c-forward-keyword-clause)
- (defun . c-forward-<>-arglist)
- (defun . c-forward-<>-arglist-recur)
- (defun . c-backward-<>-arglist)
- (defun . c-forward-name)
- (defun . c-forward-type)
- (defun . c-fdoc-shift-type-backward)
- (defun . c-forward-decl-or-cast-1)
- (defun . c-forward-label)
- (defun . c-forward-objc-directive)
- (defun . c-beginning-of-inheritance-list)
- (defun . c-in-method-def-p)
- (defun . c-in-gcc-asm-p)
- (defun . c-at-toplevel-p)
- (defun . c-just-after-func-arglist-p)
- (defun . c-in-knr-argdecl)
- (defun . c-skip-conditional)
- (defun . c-after-conditional)
- (defun . c-after-special-operator-id)
- (defun . c-backward-to-block-anchor)
- (defun . c-backward-to-decl-anchor)
- (defun . c-search-decl-header-end)
- (defun . c-beginning-of-decl-1)
- (defun . c-end-of-decl-1)
- (defun . c-looking-at-decl-block)
- (defun . c-search-uplist-for-classkey)
- (defun . c-inside-bracelist-p)
- (defun . c-looking-at-special-brace-list)
- (defun . c-looking-at-bos)
- (defun . c-looking-at-inexpr-block)
- (defun . c-looking-at-inexpr-block-backward)
- c-auto-newline-analysis
- (defun . c-brace-anchor-point)
- (defun . c-add-syntax)
- (defun . c-append-syntax)
- (defun . c-add-stmt-syntax)
- (defun . c-add-class-syntax)
- (defun . c-guess-continued-construct)
- (t . c-guess-basic-syntax)
- (defun . c-guess-basic-syntax)
- (defun . c-evaluate-offset)
- (defun . c-calc-offset)
- (defun . c-get-offset)
- (defun . c-get-syntactic-indentation)
- (provide . cc-engine))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/cc-vars.elc"
- (require . cc-defs)
- (defun . c-constant-symbol)
- c-style-variables c-fallback-style
- (defun . c-set-stylevar-fallback)
- (defun . defcustom-c-stylevar)
- (defun . c-valid-offset)
- c-strict-syntax-p c-echo-syntactic-information-p c-report-syntactic-errors c-basic-offset c-tab-always-indent c-insert-tab-function c-syntactic-indentation c-syntactic-indentation-in-macros c-comment-only-line-offset c-indent-comment-alist c-indent-comments-syntactically-p c-block-comment-prefix c-comment-prefix-regexp c-doc-comment-style c-ignore-auto-fill c-cleanup-list c-hanging-braces-alist c-max-one-liner-length c-hanging-colons-alist c-hanging-semi&comma-criteria c-backslash-column c-backslash-max-column c-auto-align-backslashes c-backspace-function c-delete-function c-require-final-newline c-electric-pound-behavior c-special-indent-hook c-label-minimum-indentation c-progress-interval c-objc-method-arg-min-delta-to-bracket c-objc-method-arg-unfinished-offset c-objc-method-parameter-offset c-default-style c-offsets-alist c-inside-block-syms c-inside-block-syms c-style-variables-are-local-p c-mode-hook c++-mode-hook objc-mode-hook java-mode-hook idl-mode-hook pike-mode-hook awk-mode-hook c-mode-common-hook c-initialization-hook c-enable-xemacs-performance-kludge-p c-old-style-variable-behavior
- (defun . c-make-font-lock-extra-types-blurb)
- c-font-lock-extra-types c++-font-lock-extra-types objc-font-lock-extra-types java-font-lock-extra-types idl-font-lock-extra-types pike-font-lock-extra-types c-file-style c-file-offsets c-indentation-style c-current-comment-prefix c-string-par-start c-string-par-separate c-sentence-end-with-esc-eol
- (provide . cc-vars))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/cc-defs.elc"
- (require . regexp-opt)
- c-version c-version-sym c-version-sym c-buffer-is-cc-mode c-inside-eval-when-compile
- (defun . cc-eval-when-compile)
- (defun . c-point)
- (defun . c-region-is-active-p)
- (defun . c-set-region-active)
- (defun . c-delete-and-extract-region)
- (defun . c-safe)
- (defun . c-int-to-char)
- (defun . c-sentence-end)
- (defun . c-default-value-sentence-end)
- (defun . c-save-buffer-state)
- (defun . c-tentative-buffer-changes)
- (defun . c-tnt-chng-record-state)
- (defun . c-tnt-chng-cleanup)
- (defun . c-forward-syntactic-ws)
- (defun . c-backward-syntactic-ws)
- (defun . c-forward-sexp)
- (defun . c-backward-sexp)
- (defun . c-safe-scan-lists)
- (defun . c-go-list-forward)
- (defun . c-go-list-backward)
- (defun . c-up-list-forward)
- (defun . c-up-list-backward)
- (defun . c-down-list-forward)
- (defun . c-down-list-backward)
- (defun . c-go-up-list-forward)
- (defun . c-go-up-list-backward)
- (defun . c-go-down-list-forward)
- (defun . c-go-down-list-backward)
- (defun . c-beginning-of-defun-1)
- (defun . c-at-vsemi-p)
- (defun . c-vsemi-status-unknown-p)
- (defun . c-benign-error)
- (defun . c-with-syntax-table)
- (defun . c-skip-ws-forward)
- (defun . c-skip-ws-backward)
- c-langs-are-parametric
- (defun . c-major-mode-is)
- c-use-extents c-use-extents
- (defun . c-put-char-property-fun)
- (defun . c-put-char-property)
- (defun . c-get-char-property)
- (defun . c-clear-char-property-fun)
- (defun . c-clear-char-property)
- (defun . c-clear-char-properties)
- (defun . c-clear-char-property-with-value-function)
- (defun . c-clear-char-property-with-value)
- (defun . c-put-overlay)
- (defun . c-delete-overlay)
- (defun . c-end-of-defun-1)
- c-<-as-paren-syntax c-<-as-paren-syntax
- (defun . c-mark-<-as-paren)
- c->-as-paren-syntax c->-as-paren-syntax
- (defun . c-mark->-as-paren)
- (defun . c-intersect-lists)
- (defun . c-lookup-lists)
- (defun . c-langelem-sym)
- (defun . c-langelem-pos)
- (defun . c-langelem-col)
- (defun . c-langelem-2nd-pos)
- (defun . c-keep-region-active)
- (defun . c-mode-symbol)
- (defun . c-mode-var)
- (defun . c-got-face-at)
- (defun . c-face-name-p)
- (defun . c-concat-separated)
- (defun . c-make-keywords-re)
- (defun . c-make-bare-char-alt)
- (defun . c-regexp-opt)
- (defun . c-regexp-opt-depth)
- c-emacs-features c-alpha c-alpha c-alnum c-alnum c-digit c-digit c-upper c-upper c-lower c-lower
- (defun . c-add-language)
- c-lang-constants c-lang-const-expansion
- (defun . c-get-current-file)
- (defun . c-lang-defconst-eval-immediately)
- (defun . c-lang-defconst)
- (defun . c-define-lang-constant)
- (defun . c-lang-const)
- c-lang-constants-under-evaluation
- (defun . c-get-lang-constant)
- (defun . c-find-assignment-for-mode)
- (defun . c-lang-major-mode-is)
- (provide . cc-defs))
- ("/home/hobbes/nxhtml/util/majmodpri.el" majmodpri:version majmodpri-idle-sort-timer
- (defun . majmodpri-cancel-idle-sort)
- (defun . majmodpri-start-idle-sort)
- (defun . majmodpri-sort-lists-in-timer)
- majmodpri-schwarzian-ordnum
- (defun . majmodpri-schwarzian-in)
- (defun . majmodpri-schwarzian-out)
- majmodpri-no-nxml
- (defun . majmodpri-priority)
- (defun . majmodpri-compare-auto-modes)
- (defun . majmodpri-sort-auto-mode-alist)
- (defun . majmodpri-sort-magic-list)
- (t . majmodpri-sort-lists)
- (defun . majmodpri-sort-lists)
- (t . majmodpri-apply)
- (defun . majmodpri-apply)
- (defun . majmodpri-sort-apply-to-current)
- (t . majmodpri-apply-priorities)
- (defun . majmodpri-apply-priorities)
- majmodpri-mode-priorities majmodpri-lists-to-sort majmodpri-sort-after-load
- (provide . majmodpri))
- ("/home/hobbes/nxhtml/etc/schema/schema-path-patch.el" rncpp-this-dir
- (defun . rncpp-get-nxml-schema-dir)
- (defun . rncpp-patch-xhtml-loader))
- ("/home/hobbes/nxhtml/nxhtml/nxhtml-menu.el" nxhtml-menu:version
- (require . cl)
- (require . cus-edit)
- (require . dired)
- (require . gimp)
- (require . html-site)
- (require . nxhtml-mode)
- (require . css-color)
- (require . flymake)
- (require . flymake-php)
- (require . flymake-js)
- (require . udev-ecb)
- (require . udev-cedet)
- (require . udev-rinari)
- (defun . nxhtml-nxhtml-in-buffer)
- (defun . nxhtml-nxml-in-buffer)
- (defun . nxhtml-html-in-buffer)
- (defun . nxhtml-nxml-html-in-buffer)
- (defun . nxhtml-this-file-can-have-toc)
- (defun . nxhtml-buffer-possibly-local-viewable)
- (defun . nxhtml-buffer-possibly-remote-viewable)
- (defun . nxhtml-insert-menu-dynamically)
- (defun . nxhtml-menu-image-file)
- (defun . nxhtml-gimp-can-edit)
- (t . nxhtml-edit-with-gimp)
- (defun . nxhtml-edit-with-gimp)
- (t . nxhtml-browse-file)
- (defun . nxhtml-browse-file)
- (t . nxhtml-browse-region)
- (defun . nxhtml-browse-region)
- nxhtml-browseable-buffer-file
- (defun . nxhtml-save-browseable-temp-file)
- nxhtml-minor-mode-menu-map nxhtml-minor-mode-map nxhtml-minor-mode
- (defun . nxhtml-minor-mode)
- nxhtml-minor-mode-modes
- (defun . nxhtml-maybe-turn-on-minor-mode)
- nxhtml-minor-mode-major-mode nxhtml-global-minor-mode
- (t . nxhtml-global-minor-mode)
- (defun . nxhtml-global-minor-mode)
- nxhtml-global-minor-mode-buffers
- (defun . nxhtml-global-minor-mode-enable-in-buffers)
- (defun . nxhtml-global-minor-mode-check-buffers)
- (defun . nxhtml-global-minor-mode-cmhh)
- (defun . nxhtml-docfile)
- (defun . nxhtml-docfile-url)
- (defun . nxhtml-overview)
- (defun . nxhtml-tutorials)
- (defun . nxhtml-custom-valfaced)
- (defun . nxhtml-custom-insert-nxhtml-row)
- (defun . nxhtml-custom-h1)
- (defun . widget-button-notify)
- (defun . widget-insert-link)
- (defun . widget-insert-button)
- (defun . nxhtml-custom-url-link)
- (defun . nxhtml-custom-describe-defun)
- (defun . custom-set-and-prepare-save)
- (defun . nxhtml-welcome)
- nxhtml-skip-welcome
- (defun . nxhtml-skip-welcome)
- (defun . nxhtml-say-welcome-unless-skip)
- (provide . nxhtml-menu))
- ("/home/hobbes/nxhtml/util/udev-rinari.el" udev-rinari:version
- (require . udev)
- udev-rinari-dir udev-rinari-load-rinari udev-rinari-steps udev-rinari-update-buffer
- (defun . udev-rinari-buffer-name)
- (defun . udev-rinari-check-conflicts)
- (defun . udev-rinari-setup-when-finished)
- (t . udev-rinari-update)
- (defun . udev-rinari-update)
- udev-rinari-fetch-buffer
- (defun . udev-rinari-fetch)
- udev-rinari-diff-file udev-rinari-fetch-diff-buffer
- (defun . udev-rinari-fetch-diff)
- (defun . udev-rinari-check-diff)
- (provide . udev-rinari))
- ("/home/hobbes/nxhtml/util/udev-cedet.el" udev-cedet:version
- (require . udev)
- udev-cedet-dir
- (defun . udev-cedet-load-cedet)
- udev-cedet-load-cedet udev-cedet-steps
- (defun . udev-cedet-buffer-name)
- udev-cedet-update-buffer
- (defun . udev-cedet-setup-when-finished)
- (t . udev-cedet-update)
- (defun . udev-cedet-update)
- (defun . udev-cedet-fetch)
- (defun . udev-cedet-cvs-dir)
- (defun . udev-cedet-fetch-diff)
- (defun . udev-cedet-check-diff)
- (defun . udev-cedet-install-add-debug)
- (defun . udev-cedet-install)
- (provide . udev-cedet))
- ("/home/hobbes/nxhtml/util/udev-ecb.el" udev-ecb:version
- (require . udev)
- udev-ecb-dir
- (defun . udev-ecb-load-ecb)
- udev-ecb-load-ecb udev-ecb-steps
- (defun . udev-ecb-buffer-name)
- udev-ecb-update-buffer
- (defun . udev-ecb-check-cedet)
- (defun . udev-ecb-setup-when-finished)
- (t . udev-ecb-update)
- (defun . udev-ecb-update)
- (defun . udev-ecb-fetch)
- (defun . udev-ecb-cvs-dir)
- (defun . udev-ecb-fetch-diff)
- (defun . udev-ecb-check-diff)
- (defun . udev-ecb-install)
- (provide . udev-ecb))
- ("/home/hobbes/nxhtml/util/udev.el" udev:version
- (require . cl)
- (require . cus-edit)
- udev-log-buffer udev-is-log-buffer
- (defun . udev-check-is-log-buffer)
- udev-this-chain udev-last-error
- (defun . udev-set-last-error)
- (defun . udev-chain)
- (defun . udev-this-step)
- (defun . udev-goto-next-step)
- (defun . udev-num-steps)
- (defun . udev-step-num)
- (defun . udev-finish-function)
- udev-control-mode-map udev-control-mode-map udev-control-mode-syntax-table udev-control-mode-abbrev-table udev-control-mode-abbrev-table
- (defun . udev-control-mode)
- (defun . udev-call-first-step)
- udev-step-keymap
- (defun . udev-step-at-point)
- (defun . udev-rerun-this-step)
- (defun . udev-continue-from-this-step)
- (defun . udev-goto-this-step-source)
- (defun . udev-call-this-step)
- (defun . udev-call-next-step)
- udev-orig-sentinel
- (defun . udev-compilation-sentinel)
- (defun . udev-set-compilation-end-message)
- udev-continue-on-error-function
- (defun . udev-buffer-name)
- udev-this-dir
- (defun . udev-batch-compile)
- (defun . udev-fetch-cvs-diff)
- (defun . udev-cvs-diff-continue)
- (defun . udev-check-cvs-diff)
- (defun . udev-send-buffer-process)
- (provide . udev))
- ("/home/hobbes/nxhtml/related/flymake-js.el"
- (require . flymake)
- flymake-allowed-js-file-name-masks flymake-js-err-line-pattern-re flymake-js-rhino-jar flymake-js-rhino-js flymake-js-engine
- (defun . flymake-js-init)
- (defun . flymake-js-load)
- flymake-js-has-engine
- (defun . flymake-js-has-engine)
- (defun . flymake-js-turn-on)
- flymake-js-on
- (provide . flymake-js))
- ("/home/hobbes/nxhtml/related/flymake-php.el"
- (require . flymake)
- flymake-allowed-php-file-name-masks flymake-php-err-line-pattern-re
- (defun . flymake-php-init)
- flymake-php-has-engine
- (defun . flymake-php-has-engine)
- (defun . flymake-php-turn-on)
- flymake-php-on
- (defun . flymake-php-load)
- (provide . flymake-php))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/flymake.elc" flymake-is-running flymake-timer flymake-last-change-time flymake-check-start-time flymake-check-was-interrupted flymake-err-info flymake-new-err-info
- (defun . flymake-makehash)
- (defun . flymake-float-time)
- (defun . flymake-replace-regexp-in-string)
- (defun . flymake-split-string)
- (defun . flymake-get-temp-dir)
- (defun . flymake-line-beginning-position)
- (defun . flymake-line-end-position)
- (defun . flymake-posn-at-point-as-event)
- (defun . flymake-popup-menu)
- (defun . flymake-make-emacs-menu)
- flymake-log-level
- (defun . flymake-log)
- (defun . flymake-ins-after)
- (defun . flymake-set-at)
- flymake-processes flymake-output-residual flymake-allowed-file-name-masks
- (defun . flymake-get-file-name-mode-and-masks)
- (defun . flymake-can-syntax-check-file)
- (defun . flymake-get-init-function)
- (defun . flymake-get-cleanup-function)
- (defun . flymake-get-real-file-name-function)
- flymake-find-buildfile-cache
- (defun . flymake-get-buildfile-from-cache)
- (defun . flymake-add-buildfile-to-cache)
- (defun . flymake-clear-buildfile-cache)
- (defun . flymake-find-buildfile)
- (defun . flymake-fix-file-name)
- (defun . flymake-same-files)
- flymake-master-file-dirs flymake-master-file-count-limit
- (defun . flymake-find-possible-master-files)
- (defun . flymake-master-file-compare)
- flymake-check-file-limit
- (defun . flymake-check-patch-master-file-buffer)
- (defun . flymake-replace-region)
- (defun . flymake-read-file-to-temp-buffer)
- (defun . flymake-copy-buffer-to-temp-buffer)
- (defun . flymake-check-include)
- (defun . flymake-find-buffer-for-file)
- (defun . flymake-create-master-file)
- (defun . flymake-save-buffer-in-file)
- (defun . flymake-save-string-to-file)
- (defun . flymake-read-file-to-string)
- (defun . flymake-process-filter)
- (defun . flymake-process-sentinel)
- (defun . flymake-post-syntax-check)
- (defun . flymake-parse-output-and-residual)
- (defun . flymake-parse-residual)
- (defun . flymake-er-make-er)
- (defun . flymake-er-get-line)
- (defun . flymake-er-get-line-err-info-list)
- (defun . flymake-ler-file)
- (defun . flymake-ler-line)
- (defun . flymake-ler-type)
- (defun . flymake-ler-text)
- (defun . flymake-ler-full-file)
- (defun . flymake-ler-p)
- (defun . copy-flymake-ler)
- (defun . flymake-ler-make-ler)
- (defun . flymake-ler-set-file)
- (defun . flymake-ler-set-full-file)
- (defun . flymake-ler-set-line)
- (defun . flymake-get-line-err-count)
- (defun . flymake-get-err-count)
- (defun . flymake-fix-line-numbers)
- (defun . flymake-highlight-err-lines)
- (defun . flymake-overlay-p)
- (defun . flymake-make-overlay)
- (defun . flymake-delete-own-overlays)
- (defun . flymake-region-has-flymake-overlays)
- (defface . flymake-errline)
- (defface . flymake-warnline)
- (defun . flymake-highlight-line)
- (defun . flymake-parse-err-lines)
- (defun . flymake-split-output)
- (defun . flymake-reformat-err-line-patterns-from-compile-el)
- (require . compile)
- flymake-err-line-patterns
- (defun . flymake-parse-line)
- (defun . flymake-find-err-info)
- (defun . flymake-line-err-info-is-less-or-equal)
- (defun . flymake-add-line-err-info)
- (defun . flymake-add-err-info)
- (defun . flymake-get-project-include-dirs-imp)
- flymake-get-project-include-dirs-function
- (defun . flymake-get-project-include-dirs)
- (defun . flymake-get-system-include-dirs)
- flymake-project-include-dirs-cache
- (defun . flymake-get-project-include-dirs-from-cache)
- (defun . flymake-add-project-include-dirs-to-cache)
- (defun . flymake-clear-project-include-dirs-cache)
- (defun . flymake-get-include-dirs)
- (defun . flymake-safe-delete-file)
- (defun . flymake-safe-delete-directory)
- flymake-compilation-prevents-syntax-check
- (defun . flymake-start-syntax-check)
- (defun . flymake-start-syntax-check-process)
- (defun . flymake-kill-process)
- (defun . flymake-stop-all-syntax-checks)
- (defun . flymake-compilation-is-running)
- (defun . flymake-compile)
- flymake-no-changes-timeout
- (defun . flymake-on-timer-event)
- (defun . flymake-current-line-no)
- (defun . flymake-count-lines)
- (defun . flymake-display-err-menu-for-current-line)
- (defun . flymake-make-err-menu-data)
- (defun . flymake-goto-file-and-line)
- flymake-mode-line flymake-mode-line-e-w flymake-mode-line-status
- (defun . flymake-report-status)
- (defun . flymake-display-warning)
- flymake-gui-warnings-enabled
- (defun . flymake-report-fatal-status)
- flymake-start-syntax-check-on-find-file flymake-mode
- (t . flymake-mode)
- (defun . flymake-mode)
- (t . flymake-mode-on)
- (defun . flymake-mode-on)
- (t . flymake-mode-off)
- (defun . flymake-mode-off)
- flymake-start-syntax-check-on-newline
- (defun . flymake-after-change-function)
- (defun . flymake-after-save-hook)
- (defun . flymake-kill-buffer-hook)
- (defun . flymake-find-file-hook)
- (defun . flymake-get-first-err-line-no)
- (defun . flymake-get-last-err-line-no)
- (defun . flymake-get-next-err-line-no)
- (defun . flymake-get-prev-err-line-no)
- (defun . flymake-skip-whitespace)
- (defun . flymake-goto-line)
- (defun . flymake-goto-next-error)
- (defun . flymake-goto-prev-error)
- (defun . flymake-patch-err-text)
- (defun . flymake-create-temp-inplace)
- (defun . flymake-create-temp-with-folder-structure)
- (defun . flymake-delete-temp-directory)
- flymake-temp-source-file-name flymake-master-file-name flymake-temp-master-file-name flymake-base-dir
- (defun . flymake-init-create-temp-buffer-copy)
- (defun . flymake-simple-cleanup)
- (defun . flymake-get-real-file-name)
- (defun . flymake-get-full-patched-file-name)
- (defun . flymake-get-full-nonpatched-file-name)
- (defun . flymake-init-find-buildfile-dir)
- (defun . flymake-init-create-temp-source-and-master-buffer-copy)
- (defun . flymake-master-cleanup)
- (defun . flymake-get-syntax-check-program-args)
- (defun . flymake-get-make-cmdline)
- (defun . flymake-get-ant-cmdline)
- (defun . flymake-simple-make-init-impl)
- (defun . flymake-simple-make-init)
- (defun . flymake-master-make-init)
- (defun . flymake-find-make-buildfile)
- (defun . flymake-master-make-header-init)
- (defun . flymake-simple-make-java-init)
- (defun . flymake-simple-ant-java-init)
- (defun . flymake-simple-java-cleanup)
- (defun . flymake-perl-init)
- (defun . flymake-php-init)
- (defun . flymake-get-tex-args)
- (defun . flymake-simple-tex-init)
- (defun . flymake-master-tex-init)
- (defun . flymake-get-include-dirs-dot)
- (defun . flymake-xml-init)
- (provide . flymake))
- ("/home/hobbes/nxhtml/util/css-color.el" css-color:version
- (require . cl)
- (defun . css-color-turn-on-in-buffer)
- css-color-mode-major-mode css-color-global-mode
- (t . css-color-global-mode)
- (defun . css-color-global-mode)
- css-color-global-mode-buffers
- (defun . css-color-global-mode-enable-in-buffers)
- (defun . css-color-global-mode-check-buffers)
- (defun . css-color-global-mode-cmhh)
- css-color-hex-chars css-color-hex-re css-color-hsl-re css-color-rgb-re css-color-html-colors css-color-html-re css-color-color-re css-color-keywords css-color-mode
- (t . css-color-mode)
- (defun . css-color-mode)
- (defun . css-color-font-lock-hook-fun)
- css-color-map css-color-generic-map
- (defun . css-color-pal-lumsig)
- (defun . css-color-foreground-color)
- (defun . css-color-normalize-hue)
- (defun . css-color-within-bounds)
- (defun . css-color-hex-to-rgb)
- (defun . css-color-hex-to-hsv)
- (defun . css-color-rgb-to-hex)
- (defun . css-color-rgb-to-hsv)
- (defun . css-color-rgb-to-hsl)
- (defun . css-color-hsv-to-hsl)
- (defun . css-color-hsv-to-hex)
- (defun . css-color-hsv-to-rgb)
- (defun . css-color-hsv-to-prop-hexstring)
- (defun . css-color-hsl-to-rgb-fractions)
- (defun . css-color-hsl-to-rgb)
- (defun . css-color-hsl-to-hex)
- (defun . css-color-hue-to-rgb)
- (defun . css-color-parse-hsl)
- (defun . css-color-inchue)
- (defun . css-color-incsat)
- (defun . css-color-incval)
- (defun . css-color-hexval-beginning)
- (defun . css-color-replcolor-at-p)
- (defun . css-color-get-color-at-point)
- (defun . css-color-adj-hue-at-p)
- (defun . css-color-adj-saturation-at-p)
- (defun . css-color-adj-value-at-p)
- (defun . css-color-what-channel)
- (defun . css-color-adjust-hex-at-p)
- (defun . css-color-up)
- (defun . css-color-down)
- (defun . css-color-hue-up)
- (defun . css-color-hue-down)
- (defun . css-color-saturation-up)
- (defun . css-color-saturation-down)
- (defun . css-color-value-up)
- (defun . css-color-value-down)
- (defun . css-color-num-up)
- (defun . css-color-num-down)
- (defun . css-color-beginning-of-color)
- (defun . css-color-end-of-color)
- (defun . css-color-color-info)
- css-color-type-circle
- (defun . css-color-next-type)
- (defun . css-color-cycle-type)
- (defun . css-color-string-hex-to-hsl)
- (defun . css-color-string-hsl-to-rgb)
- (defun . css-color-string-rgb-to-name)
- (defun . css-color-string-name-to-hex)
- (defun . css-color-string-rgb-to-hex)
- (defun . css-color-string-hsl-to-hex)
- (defun . css-color-next-channel)
- (defun . css-color-hexify-anystring)
- (defun . css-color-toggle-percentage)
- css-color-fg-history css-color-bg-history
- (defun . css-color-test)
- (defun . css-color-run-tests)
- (provide . css-color))
- ("/home/hobbes/nxhtml/nxhtml/nxhtml-mode.el"
- (require . mumamo)
- (require . cl)
- (require . appmenu-fold)
- (require . fold-dwim)
- (require . typesetter)
- (require . button)
- (require . loadhist)
- (require . nxml-mode)
- (require . rngalt)
- (require . url-parse)
- (require . url-expand)
- (require . popcmp)
- (require . html-imenu)
- (require . tidy-xhtml)
- (require . html-quote)
- (defun . nxhtml-version)
- (defun . nxhtml-setup-for-fold-dwim)
- (defun . nxhtml-outline-level)
- (defun . nxhtml-hs-forward-element)
- nxhtml-use-imenu nxhtml-default-encoding
- (defun . nxhtml-insert-empty-frames-page)
- (defun . nxhtml-insert-empty-page)
- (defun . nxhtml-empty-page-completion)
- nxhtml-mode-hook
- (defun . nxhtml-help)
- nxhtml-current-validation-header tidy-menu-symbol
- (defun . tidy-menu-symbol)
- (defun . nxhtml-change-mode)
- nxhtml-heading-element-name-regexp nxhtml-mode-map nxhtml-mode-syntax-table nxhtml-mode-abbrev-table nxhtml-mode-abbrev-table
- (t . nxhtml-mode)
- (defun . nxhtml-mode)
- (defun . nxhtml-quote-html)
- nxhtml-single-tags
- (defun . nxthml-is-single-tag)
- nxhtml-help-attribute-name nxhtml-help-attribute-name-tag nxhtml-help-tag
- (t . nxhtml-short-tag-help)
- (defun . nxhtml-short-tag-help)
- nxhtml-no-single-tags nxhtml-no-end-tags nxhtml-predicate-error
- (defun . nxhtml-find-ids)
- (defun . nxhtml-read-url)
- (defun . nxhtml-read-url-type)
- nxhtml-read-url-history nxhtml-read-web-url-history nxhtml-read-mail-url-history nxhtml-in-xml-attribute-value-regex
- (defun . nxhtml-mailto-predicate)
- nxhtml-image-completion-pattern
- (defun . nxhtml-image-url-predicate)
- nxhtml-css-completion-pattern
- (defun . nxhtml-css-url-predicate)
- nxhtml-script-completion-pattern
- (defun . nxhtml-script-url-predicate)
- (defun . nxhtml-coding-systems-complete)
- nxhtml-in-proc-instr-back-regex nxhtml-in-proc-instr-forw-regex rngalt-in-pre-attribute-value-regex
- (defun . nxhtml-check-where)
- nxhtml-tag-sets nxhtml-attr-sets
- (defun . nxhtml-complete-last-try)
- (defun . nxhtml-img-tag-do-also)
- (defun . nxhtml-redisplay-complete)
- (defun . nxhtml-read-from-minibuffer)
- (defun . nxhtml-meta-tag-do-also)
- (defun . nxhtml-style-tag-do-also)
- (defun . nxhtml-script-tag-do-also)
- (defun . nxhtml-link-tag-do-also)
- (defun . nxhtml-input-tag-do-also)
- (defun . nxhtml-do-also-value)
- (defun . nxhtml-form-tag-do-also)
- nxhtml-complete-tag-do-also
- (defun . nxhtml-complete-tag-do-also)
- (defun . nxhtml-turn-onoff-tag-do-also)
- nxhtml-tag-do-also
- (defun . nxhtml-tag-do-also-toggle)
- (defun . nxhtml-check-tag-do-also)
- nxhtml-validation-header-mode
- (t . nxhtml-validation-header-mode)
- (defun . nxhtml-validation-header-mode)
- (defun . nxhtml-can-insert-page-here)
- (defun . nxhtml-complete-first-try)
- (defun . nxhtml-completing-read-tag)
- (defun . nxhtml-add-required-to-attr-set)
- (defun . nxhtml-get-tag-specific-attr-help)
- nxhtml-in-start-tag-regex
- (defun . nxhtml-completing-read-attribute-name)
- (defun . nxhtml-completing-read-attribute-value)
- (defun . nxhtml-read-link-type)
- (defun . nxhtml-read-link-media)
- (defun . nxhtml-read-link-rel)
- (defun . nxhtml-read-meta-name)
- (defun . nxhtml-read-meta-content)
- (defun . nxhtml-read-meta-scheme)
- (defun . nxhtml-read-meta-http-equiv)
- nxhtml-validation-headers nxhtml-default-validation-header
- (defun . nxhtml-must-have-validation-headers)
- nxhtml-set-validation-header-hist nxhtml-guess-validation-header-alist
- (defun . nxhtml-guess-validation-header)
- (defun . nxhtml-open-dir-saved-validation-headers)
- (defun . nxhtml-get-saved-validation-header)
- (defun . nxhtml-remove-saved-validation-header)
- (defun . nxhtml-save-validation-header)
- (defun . nxhtml-update-saved-validation-header)
- (defun . nxhtml-get-default-validation-header)
- (defun . nxhtml-set-validation-header)
- (defun . nxhtml-apply-validation-header)
- (defun . nxhtml-update-validation-header)
- (defun . nxhtml-vhm-change-major)
- (defun . nxhtml-recheck-validation-header)
- (defun . nxhtml-validation-header-empty)
- (defun . nxhtml-turn-on-validation-header-mode)
- (defun . nxhtml-vhm-mumamo-change-major)
- (defun . nxhtml-vhm-mumamo-after-change-major)
- nxhtml-validation-headers-check nxhtml-validation-header-mumamo-modes
- (defun . nxhtml-add-validation-header-if-mumamo)
- nxhtml-validation-header-if-mumamo
- (defun . nxhtml-validation-header-if-mumamo-toggle)
- (defun . nxhtml-warnings-are-visible)
- nxhtml-old-rng-error-face
- (defun . nxhtml-toggle-visible-warnings)
- nxml-untag-select
- (defun . nxml-untag-element)
- (defun . nxhtml-rollover-insert-2v)
- (provide . nxhtml-mode))
- ("/home/hobbes/nxhtml/nxhtml/html-quote.el" html-quote-html
- (defun . html-quote-html-char)
- (defun . html-quote-html-string)
- (provide . html-quote))
- ("/home/hobbes/nxhtml/nxhtml/tidy-xhtml.el" tidy-xhtml:version
- (require . cl)
- (require . ediff)
- (require . mumamo)
- (require . html-site)
- (require . easymenu)
- (require . compile)
- (require . cus-edit)
- (require . help-mode)
- (defun . tidy-xemacs-p)
- (defun . tidy-windows-p)
- (defun . tidy-x-event-function)
- (defun . tidy-x-event-object)
- (defun . tidy-x-find-menu-item)
- (defun . tidy-x-get-popup-menu-response)
- (defun . tidy-x-make-event)
- (defun . tidy-x-misc-user-event-p)
- tidy-warnings tidy-errors tidy-message tidy-batch-last-file tidy-default-config-file tidy-config-file-parsed tidy-config-file tidy-shell-program tidy-temp-directory tidy-menu-lock tidy-menu-x-position tidy-debug
- (defun . tidy-toggle-debug)
- tidy-options-alist
- (defun . tidy-build-options-alist)
- tidy-xhtml-values
- (defun . tidy-xhtml-options-ok)
- (defun . tidy-show-xhtml-options)
- (defun . tidy-set-xhtml-options)
- current-menubar
- (defun . tidy-menu-position)
- (defun . tidy-menu-lock)
- (defun . tidy-menu-lookup)
- tidy-menu tidy-menu-position tidy-menu-state
- (defun . tidy-menu-position)
- (defun . tidy-menu-lock)
- (defun . tidy-menu-lookup)
- (defun . tidy-set)
- (defun . tidy-boolean-entry)
- (defun . tidy-list-entry)
- (defun . tidy-set-string)
- (defun . tidy-set-integer)
- (defun . tidy-string-entry)
- (defun . tidy-integer-entry)
- (defun . tidy-exe-found)
- tidy-top-menu tidy-newline-menu tidy-doctype-menu tidy-emacs-encoding-lbl
- (defun . tidy-create-encoding-menu)
- tidy-output-encoding-menu tidy-menu-symbol
- (t . tidy-build-menu)
- (defun . tidy-build-menu)
- (defun . event-point)
- (defun . tidy-describe-this-option-mouse)
- (defun . tidy-describe-this-option)
- (defun . tidy-quit-describe-options)
- (defun . tidy-current-line)
- (defun . tidy-describe-options)
- (defun . tidy-parse-config-file)
- (defun . tidy-save-settings)
- tidy-markup
- (defun . tidy-set-buffer-unmodified)
- tidy-encodings-mime-charset-list
- (defun . tidy-get-buffer-encoding)
- (defun . tidy-get-tidy-encoding)
- (defun . tidy-temp-config-file)
- tidy-output-buf-name tidy-tidied-buffer
- (defun . tidy-check-is-tidied)
- tidy-control-buffer-name
- (defun . tidy-buffer)
- (defun . tidy-after-ediff)
- (defun . tidy-ediff-buffers)
- (defun . tidy-remove-ctrl-m)
- tidy-html-files-re
- (defun . tidy-is-html-file)
- (defun . tidy-contains)
- tidy-tree-files
- (defun . tidy-tree-next)
- (defun . tidy-tree)
- (defun . tidy-html-site)
- (defun . tidy-batch-sentinel)
- (defun . tidy-batch-output-filter)
- (defun . tidy-batch)
- (defun . wab-compilation-button-at)
- (defun . wab-click)
- wab-errors-supress
- (defun . wab-fb-errmsg)
- (defun . wab-fb-helper)
- wab-button-list
- (defun . wab-fb)
- (defun . wab-backward)
- (defun . wab-forward)
- wab-compilation-mode-map wab-compilation-mode-syntax-table wab-compilation-mode-abbrev-table wab-compilation-mode-abbrev-table
- (defun . wab-compilation-mode)
- tidy-menu-mode-map tidy-menu-mode
- (defun . tidy-menu-mode)
- (provide . tidy-xhtml))
- ("/usr/share/emacs/23.0.93/lisp/ediff.elc" ediff-version ediff-date
- (provide . ediff)
- (require . ediff-init)
- (require . ediff-mult)
- ediff-use-last-dir ediff-last-dir-A ediff-last-dir-B ediff-last-dir-C ediff-last-dir-ancestor ediff-last-merge-autostore-dir
- (defun . ediff-set-read-only-in-buf-A)
- (defun . ediff-get-default-file-name)
- (t . ediff-files)
- (defun . ediff-files)
- (t . ediff-files3)
- (defun . ediff-files3)
- (defun . ediff3)
- (defun . ediff-find-file)
- (defun . ediff-files-internal)
- (defun . ediff)
- (t . ediff-backup)
- (defun . ediff-backup)
- (t . ediff-buffers)
- (defun . ediff-buffers)
- (defun . ebuffers)
- (t . ediff-buffers3)
- (defun . ediff-buffers3)
- (defun . ebuffers3)
- (defun . ediff-buffers-internal)
- (defun . ediff-get-default-directory-name)
- (t . ediff-directories)
- (defun . ediff-directories)
- (defun . edirs)
- (t . ediff-directory-revisions)
- (defun . ediff-directory-revisions)
- (defun . edir-revisions)
- (t . ediff-directories3)
- (defun . ediff-directories3)
- (defun . edirs3)
- (t . ediff-merge-directories)
- (defun . ediff-merge-directories)
- (defun . edirs-merge)
- (t . ediff-merge-directories-with-ancestor)
- (defun . ediff-merge-directories-with-ancestor)
- (t . ediff-merge-directory-revisions)
- (defun . ediff-merge-directory-revisions)
- (defun . edir-merge-revisions)
- (t . ediff-merge-directory-revisions-with-ancestor)
- (defun . ediff-merge-directory-revisions-with-ancestor)
- (defun . edir-merge-revisions-with-ancestor)
- (defun . edirs-merge-with-ancestor)
- (defun . ediff-directories-internal)
- (defun . ediff-directory-revisions-internal)
- (t . ediff-windows-wordwise)
- (defun . ediff-windows-wordwise)
- (t . ediff-windows-linewise)
- (defun . ediff-windows-linewise)
- (defun . ediff-windows)
- (t . ediff-regions-wordwise)
- (defun . ediff-regions-wordwise)
- (t . ediff-regions-linewise)
- (defun . ediff-regions-linewise)
- (defun . ediff-regions-internal)
- (defun . ediff-merge)
- (defun . ediff-merge-on-startup)
- (t . ediff-merge-files)
- (defun . ediff-merge-files)
- (t . ediff-merge-files-with-ancestor)
- (defun . ediff-merge-files-with-ancestor)
- (defun . ediff-merge-with-ancestor)
- (t . ediff-merge-buffers)
- (defun . ediff-merge-buffers)
- (t . ediff-merge-buffers-with-ancestor)
- (defun . ediff-merge-buffers-with-ancestor)
- (t . ediff-merge-revisions)
- (defun . ediff-merge-revisions)
- (t . ediff-merge-revisions-with-ancestor)
- (defun . ediff-merge-revisions-with-ancestor)
- (t . ediff-patch-file)
- (defun . ediff-patch-file)
- (t . ediff-patch-buffer)
- (defun . ediff-patch-buffer)
- (defun . epatch)
- (defun . epatch-buffer)
- (t . ediff-revision)
- (defun . ediff-revision)
- (defun . erevision)
- (defun . ediff-load-version-control)
- (t . ediff-version)
- (defun . ediff-version)
- (t . ediff-documentation)
- (defun . ediff-documentation)
- (require . ediff-util))
- ("/usr/share/emacs/23.0.93/lisp/ediff-util.elc"
- (provide . ediff-util)
- ediff-after-quit-hook-internal
- (require . ediff-init)
- (require . ediff-help)
- (require . ediff-mult)
- (require . ediff-wind)
- (require . ediff-diff)
- (require . ediff-merg)
- (defun . ediff-mode)
- ediff-mode-map
- (defun . ediff-set-keys)
- (defun . ediff-reload-keymap)
- (defun . ediff-setup-keymap)
- (defun . ediff-setup)
- (defun . ediff-setup-control-buffer)
- (defun . ediff-arrange-autosave-in-merge-jobs)
- (defun . ediff-update-diffs)
- (defun . ediff-revert-buffers-then-recompute-diffs)
- (defun . ediff-recenter)
- (defun . ediff-recenter-one-window)
- (defun . ediff-recenter-ancestor)
- (defun . ediff-toggle-split)
- (defun . ediff-toggle-hilit)
- (defun . ediff-toggle-autorefine)
- (defun . ediff-show-ancestor)
- (defun . ediff-make-or-kill-fine-diffs)
- (defun . ediff-toggle-help)
- (defun . ediff-toggle-read-only)
- (defun . ediff-maybe-checkout)
- (defun . ediff-file-checked-out-p)
- (defun . ediff-file-checked-in-p)
- (defun . ediff-file-compressed-p)
- (defun . ediff-swap-buffers)
- (defun . ediff-toggle-wide-display)
- (t . ediff-toggle-multiframe)
- (defun . ediff-toggle-multiframe)
- (t . ediff-toggle-use-toolbar)
- (defun . ediff-toggle-use-toolbar)
- (defun . ediff-kill-bottom-toolbar)
- (defun . ediff-make-bottom-toolbar)
- (defun . ediff-toggle-show-clashes-only)
- (defun . ediff-toggle-skip-changed-regions)
- (defun . ediff-toggle-narrow-region)
- (defun . ediff-visible-region)
- (defun . ediff-operate-on-windows)
- (defun . ediff-scroll-vertically)
- (defun . ediff-scroll-horizontally)
- (defun . ediff-position-region)
- (defun . ediff-get-lines-to-region-end)
- (defun . ediff-get-lines-to-region-start)
- (defun . ediff-get-region-size-coefficient)
- (defun . ediff-next-difference)
- (defun . ediff-previous-difference)
- (defun . ediff-jump-to-difference)
- (defun . ediff-jump-to-difference-at-point)
- (defun . ediff-diff-at-point)
- (defun . ediff-diff-to-diff)
- (defun . ediff-copy-A-to-B)
- (defun . ediff-copy-B-to-A)
- (defun . ediff-copy-A-to-C)
- (defun . ediff-copy-B-to-C)
- (defun . ediff-copy-C-to-B)
- (defun . ediff-copy-C-to-A)
- (defun . ediff-copy-diff)
- (defun . ediff-save-diff-region)
- (defun . ediff-test-save-region)
- (defun . ediff-pop-diff)
- (defun . ediff-restore-diff)
- (defun . ediff-restore-diff-in-merge-buffer)
- (defun . ediff-toggle-regexp-match)
- (defun . ediff-toggle-skip-similar)
- (defun . ediff-focus-on-regexp-matches)
- (defun . ediff-hide-regexp-matches)
- (defun . ediff-quit)
- (defun . ediff-really-quit)
- (defun . ediff-good-frame-under-mouse)
- (defun . ediff-delete-temp-files)
- (defun . ediff-cleanup-mess)
- (defun . ediff-janitor)
- (defun . ediff-dispose-of-variant-according-to-user)
- (defun . ediff-maybe-save-and-delete-merge)
- (defun . ediff-write-merge-buffer-and-maybe-kill)
- (defun . ediff-default-suspend-function)
- (defun . ediff-suspend)
- (defun . ediff-status-info)
- (defun . ediff-select-difference)
- (defun . ediff-unselect-difference)
- (defun . ediff-unselect-and-select-difference)
- (defun . ediff-highlight-diff-in-one-buffer)
- (defun . ediff-unhighlight-diff-in-one-buffer)
- (defun . ediff-unhighlight-diffs-totally-in-one-buffer)
- (defun . ediff-highlight-diff)
- (defun . ediff-unhighlight-diff)
- (defun . ediff-unhighlight-diffs-totally)
- (defun . ediff-read-file-name)
- (defun . ediff-make-temp-file)
- (defun . ediff-make-empty-tmp-file)
- (defun . ediff-verify-file-buffer)
- (defun . ediff-verify-file-merge-buffer)
- (defun . ediff-filename-magic-p)
- (defun . ediff-save-buffer)
- (defun . ediff-clone-buffer-for-region-comparison)
- (defun . ediff-clone-buffer-for-window-comparison)
- (defun . ediff-clone-buffer-for-current-diff-comparison)
- (defun . ediff-make-cloned-buffer)
- (defun . ediff-make-indirect-buffer)
- (defun . ediff-compute-custom-diffs-maybe)
- (defun . ediff-show-diff-output)
- (defun . ediff-inferior-compare-regions)
- (defun . ediff-remove-flags-from-buffer)
- (defun . ediff-place-flags-in-buffer)
- (defun . ediff-place-flags-in-buffer1)
- (defun . ediff-empty-diff-region-p)
- (defun . ediff-whitespace-diff-region-p)
- (defun . ediff-get-region-contents)
- (defun . ediff-get-diff-posn)
- (defun . ediff-restore-highlighting)
- (defun . ediff-clear-diff-vector)
- (defun . ediff-make-bullet-proof-overlay)
- (defun . ediff-make-current-diff-overlay)
- (defun . ediff-other-buffer)
- (defun . ediff-get-selected-buffers)
- (defun . ediff-unique-buffer-name)
- (defun . ediff-submit-report)
- (defun . ediff-choose-syntax-table)
- (defun . ediff-deactivate-mark)
- (defun . ediff-activate-mark)
- (defun . ediff-nuke-selective-display)
- (defun . ediff-save-variables)
- (defun . ediff-restore-variables)
- (defun . ediff-change-saved-variable)
- (defun . ediff-save-protected-variables)
- (defun . ediff-restore-protected-variables)
- (defun . ediff-save-buffer-in-file)
- ediff-command-begin-time
- (defun . ediff-calc-command-time)
- (defun . ediff-save-time)
- (defun . ediff-profile)
- (defun . ediff-print-diff-vector)
- (defun . ediff-debug-info)
- (defun . ediff-member)
- (defun . ediff-format-bindings-of)
- (defun . ediff-intersection)
- (defun . ediff-union)
- (defun . ediff-set-difference)
- (defun . ediff-add-to-history)
- (defun . ediff-copy-list))
- ("/usr/share/emacs/23.0.93/lisp/ediff-merg.elc"
- (require . ediff-init)
- ediff-quit-merge-hook ediff-default-variant ediff-combination-pattern ediff-show-clashes-only ediff-skip-merge-regions-that-differ-from-default
- (defun . ediff-merge-region-is-non-clash)
- (defun . ediff-merge-region-is-non-clash-to-skip)
- (defun . ediff-skip-merge-region-if-changed-from-default-p)
- (defun . ediff-get-combined-region)
- (defun . ediff-set-state-of-all-diffs-in-all-buffers)
- (defun . ediff-set-state-of-diff-in-all-buffers)
- (defun . ediff-set-merge-mode)
- (defun . ediff-do-merge)
- (defun . ediff-re-merge)
- (defun . ediff-shrink-window-C)
- (defun . ediff-combine-diffs)
- (defun . ediff-looks-like-combined-merge)
- (defun . ediff-merge-changed-from-default-p)
- (provide . ediff-merg))
- ("/usr/share/emacs/23.0.93/lisp/ediff-diff.elc"
- (provide . ediff-diff)
- (require . ediff-init)
- ediff-diff-program ediff-diff3-program ediff-shell ediff-cmp-program ediff-cmp-options
- (defun . ediff-set-diff-options)
- ediff-diff-options ediff-ignore-case ediff-ignore-case-option ediff-ignore-case-option3 ediff-actual-diff-options ediff-custom-diff-program ediff-custom-diff-options ediff-match-diff3-line ediff-diff3-options ediff-actual-diff3-options ediff-diff3-ok-lines-regexp ediff-diff-status ediff-auto-refine ediff-ignore-similar-regions ediff-auto-refine-limit ediff-diff-ok-lines-regexp ediff-match-diff-line ediff-setup-diff-regions-function
- (defun . ediff-setup-diff-regions)
- (defun . ediff-make-diff2-buffer)
- (defun . ediff-setup-fine-diff-regions)
- (defun . ediff-prepare-error-list)
- (defun . ediff-extract-diffs)
- (defun . ediff-convert-diffs-to-overlays)
- (defun . ediff-set-diff-overlays-in-one-buffer)
- (defun . ediff-make-fine-diffs)
- (defun . ediff-install-fine-diff-if-necessary)
- (defun . ediff-set-fine-diff-properties)
- (defun . ediff-set-fine-diff-properties-in-one-buffer)
- (defun . ediff-set-fine-overlays-for-combined-merge)
- (defun . ediff-set-fine-overlays-in-one-buffer)
- (defun . ediff-convert-fine-diffs-to-overlays)
- (defun . ediff-get-diff3-group)
- (defun . ediff-extract-diffs3)
- (defun . ediff-setup-diff-regions3)
- (defun . ediff-exec-process)
- (defun . ediff-process-filter)
- (defun . ediff-process-sentinel)
- ediff-forward-word-function ediff-whitespace ediff-word-1 ediff-word-2 ediff-word-3 ediff-word-4
- (defun . ediff-forward-word)
- (defun . ediff-wordify)
- (defun . ediff-copy-to-buffer)
- (defun . ediff-goto-word)
- (defun . ediff-same-file-contents)
- (defun . ediff-same-contents)
- (defun . ediff-same-file-contents-lists)
- (defun . ediff-delete-all-matches)
- (defun . ediff-set-actual-diff-options)
- (defun . ediff-toggle-ignore-case))
- ("/usr/share/emacs/23.0.93/lisp/ediff-wind.elc"
- (require . ediff-init)
- (defun . ediff-compute-toolbar-width)
- (defun . ediff-choose-window-setup-function-automatically)
- ediff-window-setup-function ediff-multiframe ediff-merge-window-share ediff-control-window ediff-window-A ediff-window-B ediff-window-C ediff-window-config-saved ediff-window-alist ediff-window-alist ediff-split-window-function ediff-merge-split-window-function ediff-control-frame-parameters ediff-mouse-pixel-position ediff-mouse-pixel-threshold ediff-grab-mouse ediff-control-frame-position-function ediff-control-frame-upward-shift ediff-narrow-control-frame-leftward-shift ediff-wide-control-frame-rightward-shift ediff-wide-display-p ediff-wide-display-orig-parameters ediff-wide-display-frame ediff-make-wide-display-function ediff-control-frame ediff-prefer-iconified-control-frame
- (defun . ediff-get-window-by-clicking)
- (defun . ediff-select-lowest-window)
- (defun . ediff-setup-windows)
- (defun . ediff-setup-windows-plain)
- (defun . ediff-setup-windows-plain-merge)
- (defun . ediff-setup-windows-plain-compare)
- (defun . ediff-setup-windows-multiframe)
- (defun . ediff-setup-windows-multiframe-merge)
- (defun . ediff-setup-windows-multiframe-compare)
- (defun . ediff-skip-unsuitable-frames)
- (defun . ediff-frame-has-dedicated-windows)
- (defun . ediff-window-ok-for-display)
- (defun . ediff-setup-control-frame)
- (defun . ediff-destroy-control-frame)
- (defun . ediff-make-frame-position)
- (defun . ediff-xemacs-select-frame-hook)
- (defun . ediff-make-wide-display)
- (defun . ediff-refresh-mode-lines)
- (defun . ediff-refresh-control-frame)
- (defun . ediff-make-narrow-control-buffer-id)
- (defun . ediff-make-base-title)
- (defun . ediff-make-wide-control-buffer-id)
- (defun . ediff-get-visible-buffer-window)
- (defun . ediff-keep-window-config)
- (provide . ediff-wind))
- ("/usr/share/emacs/23.0.93/lisp/ediff-help.elc"
- (require . ediff-init)
- ediff-long-help-message-head ediff-long-help-message-tail ediff-long-help-message-compare3 ediff-long-help-message-compare2 ediff-long-help-message-narrow2 ediff-long-help-message-word-mode ediff-long-help-message-merge ediff-long-help-message ediff-brief-message-string ediff-brief-help-message ediff-brief-help-message-function ediff-long-help-message-function ediff-use-long-help-message ediff-help-message ediff-help-region-map
- (defun . ediff-set-help-overlays)
- (defun . ediff-help-for-quick-help)
- (defun . ediff-help-message-line-length)
- (defun . ediff-indent-help-message)
- (defun . ediff-set-help-message)
- (t . ediff-customize)
- (defun . ediff-customize)
- (provide . ediff-help))
- ("/usr/share/emacs/23.0.93/lisp/ediff-mult.elc"
- (provide . ediff-mult)
- (require . ediff-init)
- ediff-meta-buffer ediff-parent-meta-buffer ediff-registry-buffer ediff-meta-buffer-brief-message ediff-meta-buffer-brief-message ediff-meta-buffer-verbose-message ediff-meta-buffer-verbose-message ediff-meta-buffer-map ediff-dir-diffs-buffer-map ediff-meta-action-function ediff-meta-redraw-function ediff-session-action-function ediff-metajob-name ediff-meta-diff-buffer ediff-recurse-to-subdirectories ediff-filtering-regexp-history ediff-default-filtering-regexp ediff-meta-list ediff-meta-session-number ediff-dir-difference-list ediff-dir-diffs-buffer ediff-session-registry ediff-meta-truncate-filenames ediff-meta-mode-hook ediff-registry-setup-hook ediff-before-session-group-setup-hooks ediff-after-session-group-setup-hook ediff-quit-session-group-hook ediff-show-registry-hook ediff-show-session-group-hook ediff-meta-buffer-keymap-setup-hook ediff-meta-patchbufer
- (defun . ediff-get-group-buffer)
- (defun . ediff-get-group-regexp)
- (defun . ediff-get-group-objA)
- (defun . ediff-get-group-objB)
- (defun . ediff-get-group-objC)
- (defun . ediff-get-group-merge-autostore-dir)
- (defun . ediff-get-group-comparison-func)
- (defun . ediff-get-session-buffer)
- (defun . ediff-get-session-status)
- (defun . ediff-set-session-status)
- (defun . ediff-get-session-objA)
- (defun . ediff-get-session-objB)
- (defun . ediff-get-session-objC)
- (defun . ediff-get-session-objA-name)
- (defun . ediff-get-session-objB-name)
- (defun . ediff-get-session-objC-name)
- (defun . ediff-get-file-eqstatus)
- (defun . ediff-set-file-eqstatus)
- (defun . ediff-make-new-meta-list-element)
- (defun . ediff-make-new-meta-list-header)
- (defun . ediff-get-session-activity-marker)
- (defun . ediff-meta-session-p)
- ediff-verbose-help-enabled
- (defun . ediff-toggle-verbose-help-meta-buffer)
- (defun . ediff-setup-meta-map)
- (defun . ediff-meta-mode)
- (defun . ediff-next-meta-item)
- (defun . ediff-next-meta-item1)
- (defun . ediff-previous-meta-item)
- (defun . ediff-previous-meta-item1)
- (defun . ediff-add-slash-if-directory)
- (defun . ediff-toggle-filename-truncation)
- ediff-membership-code1 ediff-membership-code2 ediff-membership-code3 ediff-product-of-memcodes
- (defun . ediff-intersect-directories)
- (defun . ediff-get-directory-files-under-revision)
- (defun . ediff-prepare-meta-buffer)
- (defun . ediff-insert-session-activity-marker-in-meta-buffer)
- (defun . ediff-insert-session-status-in-meta-buffer)
- (defun . ediff-replace-session-activity-marker-in-meta-buffer)
- (defun . ediff-replace-session-status-in-meta-buffer)
- (defun . ediff-insert-session-info-in-meta-buffer)
- (defun . ediff-redraw-directory-group-buffer)
- (defun . ediff-update-markers-in-dir-meta-buffer)
- (defun . ediff-update-session-marker-in-dir-meta-buffer)
- (defun . ediff-problematic-session-p)
- (defun . ediff-meta-insert-file-info1)
- ediff-months
- (defun . ediff-fill-leading-zero)
- (defun . ediff-format-date)
- (defun . ediff-insert-dirs-in-meta-buffer)
- (defun . ediff-draw-dir-diffs)
- (defun . ediff-bury-dir-diffs-buffer)
- (defun . ediff-show-dir-diffs)
- (defun . ediff-dir-diff-copy-file)
- (defun . ediff-up-meta-hierarchy)
- (defun . ediff-redraw-registry-buffer)
- (defun . ediff-set-meta-overlay)
- (defun . ediff-mark-for-hiding-at-pos)
- (defun . ediff-mark-session-for-hiding)
- (defun . ediff-mark-for-operation-at-pos)
- (defun . ediff-mark-session-for-operation)
- (defun . ediff-hide-marked-sessions)
- (defun . ediff-operate-on-marked-sessions)
- (defun . ediff-append-custom-diff)
- (defun . ediff-collect-custom-diffs)
- (defun . ediff-meta-show-patch)
- (defun . ediff-filegroup-action)
- (defun . ediff-registry-action)
- (defun . ediff-show-meta-buffer)
- (defun . ediff-show-current-session-meta-buffer)
- (defun . ediff-show-meta-buff-from-registry)
- (t . ediff-show-registry)
- (defun . ediff-show-registry)
- (defun . eregistry)
- (defun . ediff-update-meta-buffer)
- (defun . ediff-update-registry)
- (defun . ediff-cleanup-meta-buffer)
- (defun . ediff-safe-to-quit)
- (defun . ediff-quit-meta-buffer)
- (defun . ediff-dispose-of-meta-buffer)
- (defun . ediff-get-meta-info)
- (defun . ediff-get-meta-overlay-at-pos)
- (defun . ediff-get-session-number-at-pos)
- (defun . ediff-next-meta-overlay-start)
- (defun . ediff-previous-meta-overlay-start)
- (defun . ediff-patch-file-form-meta)
- (defun . ediff-unmark-all-for-operation)
- (defun . ediff-unmark-all-for-hiding)
- (defun . ediff-meta-mark-equal-files)
- (defun . ediff-mark-if-equal))
- ("/usr/share/emacs/23.0.93/lisp/ediff-init.elc" ediff-force-faces
- (defun . ediff-device-type)
- (defun . ediff-window-display-p)
- (defun . ediff-has-face-support-p)
- (defun . ediff-has-toolbar-support-p)
- (defun . ediff-has-gutter-support-p)
- (defun . ediff-use-toolbar-p)
- (defun . ediff-defvar-local)
- ediff-buffer-A ediff-buffer-B ediff-buffer-C ediff-ancestor-buffer ediff-control-buffer ediff-temp-indirect-buffer ediff-buffer-alist ediff-buffer-alist
- (defun . ediff-odd-p)
- (defun . ediff-buffer-live-p)
- (defun . ediff-get-buffer)
- (defun . ediff-get-value-according-to-buffer-type)
- (defun . ediff-char-to-buftype)
- (defun . ediff-get-symbol-from-alist)
- ediff-difference-vector-alist ediff-difference-vector-alist
- (defun . ediff-get-difference)
- (defun . ediff-no-fine-diffs-p)
- (defun . ediff-get-diff-overlay-from-diff-record)
- (defun . ediff-get-diff-overlay)
- (defun . ediff-get-fine-diff-vector-from-diff-record)
- (defun . ediff-set-fine-diff-vector)
- (defun . ediff-get-state-of-diff)
- (defun . ediff-set-state-of-diff)
- (defun . ediff-get-state-of-merge)
- (defun . ediff-set-state-of-merge)
- (defun . ediff-get-state-of-ancestor)
- (defun . ediff-mark-diff-as-space-only)
- (defun . ediff-get-fine-diff-vector)
- (defun . ediff-with-current-buffer)
- (defun . ediff-multiframe-setup-p)
- (defun . ediff-narrow-control-frame-p)
- (defun . ediff-3way-comparison-job)
- ediff-3way-comparison-job
- (defun . ediff-merge-job)
- ediff-merge-job
- (defun . ediff-patch-job)
- (defun . ediff-merge-with-ancestor-job)
- ediff-merge-with-ancestor-job
- (defun . ediff-3way-job)
- ediff-3way-job
- (defun . ediff-diff3-job)
- ediff-diff3-job
- (defun . ediff-windows-job)
- ediff-windows-job
- (defun . ediff-word-mode-job)
- ediff-word-mode-job
- (defun . ediff-narrow-job)
- ediff-narrow-job
- (defun . ediff-ancestor-metajob)
- (defun . ediff-revision-metajob)
- (defun . ediff-patch-metajob)
- (defun . ediff-one-filegroup-metajob)
- (defun . ediff-collect-diffs-metajob)
- (defun . ediff-merge-metajob)
- (defun . ediff-metajob3)
- (defun . ediff-comparison-metajob3)
- (defun . ediff-in-control-buffer-p)
- (defun . ediff-barf-if-not-control-buffer)
- ediff-before-setup-hook ediff-before-setup-windows-hook ediff-after-setup-windows-hook ediff-before-setup-control-frame-hook ediff-after-setup-control-frame-hook ediff-startup-hook ediff-select-hook ediff-unselect-hook ediff-prepare-buffer-hook ediff-load-hook ediff-mode-hook ediff-keymap-setup-hook ediff-display-help-hook ediff-suspend-hook ediff-quit-hook ediff-cleanup-hook ediff-KILLED-VITAL-BUFFER ediff-KILLED-VITAL-BUFFER ediff-NO-DIFFERENCES ediff-NO-DIFFERENCES ediff-BAD-DIFF-NUMBER ediff-BAD-DIFF-NUMBER ediff-BAD-INFO ediff-BAD-INFO ediff-skip-diff-region-function ediff-hide-regexp-matches-function ediff-focus-on-regexp-matches-function ediff-regexp-focus-A ediff-regexp-focus-B ediff-regexp-focus-C ediff-focus-regexp-connective ediff-regexp-hide-A ediff-regexp-hide-B ediff-regexp-hide-C ediff-hide-regexp-connective ediff-killed-diffs-alist ediff-syntax-table ediff-before-flag-bol ediff-after-flag-eol ediff-before-flag-mol ediff-after-flag-mol ediff-use-faces ediff-use-faces ediff-word-mode ediff-job-name ediff-narrow-bounds ediff-wide-bounds ediff-visible-bounds ediff-start-narrowed ediff-quit-widened ediff-keep-variants ediff-highlight-all-diffs ediff-highlight-all-diffs ediff-control-buffer-suffix ediff-control-buffer-number ediff-buffer-values-orig-A ediff-buffer-values-orig-B ediff-buffer-values-orig-C ediff-buffer-values-orig-Ancestor ediff-buffer-values-orig-alist ediff-buffer-values-orig-alist ediff-protected-variables ediff-protected-variables ediff-difference-vector-A ediff-difference-vector-B ediff-difference-vector-C ediff-difference-vector-Ancestor ediff-difference-vector-alist ediff-difference-vector-alist ediff-state-of-merge ediff-current-difference ediff-number-of-differences ediff-diff-buffer ediff-custom-diff-buffer ediff-fine-diff-buffer ediff-tmp-buffer ediff-msg-buffer ediff-error-buffer ediff-debug-buffer ediff-this-buffer-ediff-sessions ediff-disturbed-overlays ediff-shadow-overlay-priority ediff-version-control-package ediff-coding-system-for-read ediff-coding-system-for-write
- (defun . ediff-read-event)
- (defun . ediff-overlayp)
- (defun . ediff-make-overlay)
- (defun . ediff-delete-overlay)
- (defun . ediff-check-version)
- (defun . ediff-color-display-p)
- ediff-highlighting-style
- (defun . ediff-valid-color-p)
- (defun . ediff-get-face)
- (defun . ediff-display-pixel-width)
- (defun . ediff-display-pixel-height)
- ediff-current-diff-overlay-alist ediff-current-diff-overlay-alist ediff-current-diff-face-alist ediff-current-diff-face-alist
- (defun . ediff-set-overlay-face)
- (defun . ediff-region-help-echo)
- (defun . ediff-set-face-pixmap)
- (defun . ediff-hide-face)
- (defface . ediff-current-diff-A)
- ediff-current-diff-face-A
- (defface . ediff-current-diff-B)
- ediff-current-diff-face-B
- (defface . ediff-current-diff-C)
- ediff-current-diff-face-C
- (defface . ediff-current-diff-Ancestor)
- ediff-current-diff-face-Ancestor
- (defface . ediff-fine-diff-A)
- ediff-fine-diff-face-A
- (defface . ediff-fine-diff-B)
- ediff-fine-diff-face-B
- (defface . ediff-fine-diff-C)
- ediff-fine-diff-face-C
- (defface . ediff-fine-diff-Ancestor)
- ediff-fine-diff-face-Ancestor stipple-pixmap
- (defface . ediff-even-diff-A)
- ediff-even-diff-face-A
- (defface . ediff-even-diff-B)
- ediff-even-diff-face-B
- (defface . ediff-even-diff-C)
- ediff-even-diff-face-C
- (defface . ediff-even-diff-Ancestor)
- ediff-even-diff-face-Ancestor ediff-even-diff-face-alist ediff-even-diff-face-alist
- (defface . ediff-odd-diff-A)
- ediff-odd-diff-face-A
- (defface . ediff-odd-diff-B)
- ediff-odd-diff-face-B
- (defface . ediff-odd-diff-C)
- ediff-odd-diff-face-C
- (defface . ediff-odd-diff-Ancestor)
- ediff-odd-diff-face-Ancestor ediff-odd-diff-face-alist ediff-odd-diff-face-alist ediff-fine-diff-face-alist ediff-fine-diff-face-alist ediff-current-diff-overlay-A ediff-current-diff-overlay-B ediff-current-diff-overlay-C ediff-current-diff-overlay-Ancestor
- (defun . ediff-highest-priority)
- ediff-toggle-read-only-function ediff-make-buffers-readonly-at-startup ediff-verbose-p ediff-autostore-merges ediff-merge-store-file ediff-merge-filename-prefix ediff-no-emacs-help-in-control-buffer ediff-temp-file-prefix ediff-temp-file-mode ediff-metachars ediff-H-glyph ediff-temp-file-A ediff-temp-file-B ediff-temp-file-C
- (defun . ediff-file-remote-p)
- (defun . ediff-listable-file)
- (defun . ediff-frame-unsplittable-p)
- (defun . ediff-get-next-window)
- (defun . ediff-kill-buffer-carefully)
- (defun . ediff-background-face)
- (defun . ediff-paint-background-regions-in-one-buffer)
- (defun . ediff-paint-background-regions)
- (defun . ediff-clear-fine-diff-vector)
- (defun . ediff-clear-fine-differences-in-one-buffer)
- (defun . ediff-clear-fine-differences)
- (defun . ediff-mouse-event-p)
- (defun . ediff-key-press-event-p)
- (defun . ediff-event-point)
- (defun . ediff-event-buffer)
- (defun . ediff-event-key)
- (defun . ediff-frame-iconified-p)
- (defun . ediff-window-visible-p)
- (defun . ediff-frame-char-width)
- (defun . ediff-reset-mouse)
- (defun . ediff-spy-after-mouse)
- (defun . ediff-user-grabbed-mouse)
- (defun . ediff-frame-char-height)
- (defun . ediff-overlay-start)
- (defun . ediff-overlay-end)
- (defun . ediff-empty-overlay-p)
- (defun . ediff-overlay-buffer)
- (defun . ediff-overlay-get)
- (defun . ediff-move-overlay)
- (defun . ediff-overlay-put)
- (defun . ediff-abbreviate-file-name)
- (defun . ediff-strip-last-dir)
- (defun . ediff-truncate-string-left)
- (defun . ediff-nonempty-string-p)
- (defun . ediff-abbrev-jobname)
- (defun . ediff-strip-mode-line-format)
- (defun . ediff-valid-difference-p)
- (defun . ediff-show-all-diffs)
- (defun . ediff-message-if-verbose)
- (defun . ediff-file-attributes)
- (defun . ediff-file-size)
- (defun . ediff-file-modtime)
- (defun . ediff-convert-standard-filename)
- (defun . ediff-with-syntax-table)
- (provide . ediff-init))
- ("/home/hobbes/nxhtml/nxhtml/html-imenu.el" html-imenu:version
- (require . imenu)
- html-imenu-title html-imenu-regexp
- (defun . html-imenu-index)
- (defun . html-imenu-setup)
- (defun . html-imenu-update-menubar)
- (defun . html-imenu-update-menubar-1)
- (provide . html-imenu))
- ("/usr/share/emacs/23.0.93/lisp/imenu.elc" imenu-use-markers imenu-max-item-length imenu-auto-rescan imenu-auto-rescan-maxout imenu-always-use-completion-buffer-p imenu-use-popup-menu imenu-eager-completion-buffer imenu-after-jump-hook imenu-sort-function imenu-max-items imenu-space-replacement imenu-level-separator imenu-generic-expression imenu-create-index-function imenu-prev-index-position-function imenu-extract-index-name-function imenu-name-lookup-function imenu-default-goto-function
- (defun . imenu--subalist-p)
- (defun . imenu-progress-message)
- (defun . imenu-example--name-and-position)
- (defun . imenu-example--lisp-extract-index-name)
- (defun . imenu-example--create-lisp-index)
- imenu-example--function-name-regexp-c
- (defun . imenu-example--create-c-index)
- imenu--rescan-item imenu--rescan-item imenu--index-alist imenu--last-menubar-index-alist imenu--history-list
- (defun . imenu--sort-by-name)
- (defun . imenu--sort-by-position)
- (defun . imenu--relative-position)
- (defun . imenu--split)
- (defun . imenu--split-menu)
- (defun . imenu--split-submenus)
- (defun . imenu--truncate-items)
- (defun . imenu--make-index-alist)
- (defun . imenu--cleanup)
- (defun . imenu--create-keymap)
- (defun . imenu--in-alist)
- imenu-syntax-alist
- (defun . imenu-default-create-index-function)
- imenu-case-fold-search
- (defun . imenu--generic-function)
- (defun . imenu-find-default)
- (defun . imenu--completion-buffer)
- (defun . imenu--mouse-menu)
- (defun . imenu-choose-buffer-index)
- (t . imenu-add-to-menubar)
- (defun . imenu-add-to-menubar)
- (t . imenu-add-menubar-index)
- (defun . imenu-add-menubar-index)
- imenu-buffer-menubar imenu-menubar-modified-tick
- (defun . imenu-update-menubar)
- (defun . imenu--menubar-select)
- (defun . imenu-default-goto-function)
- (t . imenu)
- (defun . imenu)
- (provide . imenu))
- ("/home/hobbes/nxhtml/util/popcmp.el"
- (require . ourcomments-util)
- popcmp-popup-completion
- (defun . popcmp-popup-completion-toggle)
- popcmp-short-help-beside-alts
- (defun . popcmp-short-help-beside-alts-toggle)
- popcmp-group-alternatives
- (defun . popcmp-group-alternatives-toggle)
- (defun . popcmp-getsets)
- (defun . popcmp-getset-alts)
- popcmp-completing-with-help
- (defun . popcmp-add-help)
- (defun . popcmp-remove-help)
- (defun . popcmp-completing-read-nopop)
- (defun . popcmp-completing-read-pop)
- (defun . popcmp-completing-read)
- popcmp-mark-completing-ovl
- (defun . popcmp-mark-completing)
- (defun . popcmp-unmark-completing)
- (provide . popcmp))
- ("/home/hobbes/nxhtml/nxhtml/rngalt.el" rngalt:version
- (require . rng-valid)
- (require . rng-nxml)
- rngalt-complete-first-try rngalt-complete-last-try rngalt-completing-read-tag rngalt-completing-read-attribute-name rngalt-completing-read-attribute-value
- (defun . rngalt-finish-element)
- (defun . rngalt-finish-element-1)
- (defun . rngalt-complete)
- (defun . rngalt-validate)
- rngalt-region-ovl rngalt-region-prepared
- (defun . rngalt-complete-tag-region-prepare)
- (defun . rngalt-complete-tag-region-cleanup)
- (defun . rngalt-complete-tag-region-finish)
- (defun . rngalt-complete-tag)
- rngalt-complete-tag-hooks
- (defun . rngalt-complete-attribute-name)
- (defun . rngalt-complete-attribute-value)
- (defun . rngalt-complete-before-point)
- (defun . rngalt-get-missing-required-attr)
- rngalt-validation-header rngalt-current-schema-file-name rngalt-validation-header-overlay rngalt-major-mode
- (defun . rngalt-after-change-major)
- rngalt-validation-header-keymap
- (defun . rngalt-update-validation-header-overlay)
- (defun . rngalt-update-validation-header-overlay-everywhere)
- rngalt-display-validation-header
- (defun . rngalt-display-validation-header-toggle)
- rngalt-minimal-validation-header
- (defun . rngalt-minimal-validation-header-toggle)
- (defface . rngalt-validation-header-top)
- (defface . rngalt-validation-header-bottom)
- (require . bytecomp)
- (defun . advice-compilation)
- (t . rngalt-set-validation-header)
- (defun . rngalt-set-validation-header)
- (defun . rngalt-reapply-validation-header)
- (defun . rngalt-get-validation-header-buffer)
- (defun . rngalt-get-state-after)
- (defun . rngalt-show-validation-header)
- (defun . rngalt-update-validation-header-buffer)
- (provide . rngalt))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-nxml.elc"
- (require . easymenu)
- (require . xmltok)
- (require . nxml-util)
- (require . nxml-ns)
- (require . rng-match)
- (require . rng-util)
- (require . rng-valid)
- (require . nxml-mode)
- (require . rng-loc)
- rng-nxml-auto-validate-flag rng-preferred-prefix-alist rng-complete-end-tags-after-< rng-nxml-easy-menu
- (t . rng-nxml-mode-init)
- (defun . rng-nxml-mode-init)
- rng-tag-history rng-attribute-name-history rng-attribute-value-history rng-complete-target-names rng-complete-name-attribute-flag rng-complete-extra-strings
- (defun . rng-complete)
- rng-in-start-tag-name-regex rng-in-start-tag-name-regex
- (defun . rng-complete-tag)
- rng-in-end-tag-name-regex rng-in-end-tag-name-regex
- (defun . rng-complete-end-tag)
- rng-in-attribute-regex rng-in-attribute-regex rng-undeclared-prefixes
- (defun . rng-complete-attribute-name)
- rng-in-attribute-value-regex rng-in-attribute-value-regex
- (defun . rng-complete-attribute-value)
- (defun . rng-possible-namespace-uris)
- rng-qname-regexp rng-qname-regexp
- (defun . rng-qname-p)
- (defun . rng-expand-qname)
- (defun . rng-start-tag-expand-recover)
- (defun . rng-split-qname)
- (defun . rng-in-mixed-content-p)
- (defun . rng-set-state-after)
- (defun . rng-adjust-state-for-attribute)
- (defun . rng-find-undeclared-prefixes)
- (defun . rng-prune-attribute-at)
- (defun . rng-adjust-state-for-attribute-value)
- (defun . rng-complete-qname-function)
- (defun . rng-generate-qname-list)
- (defun . rng-get-preferred-unused-prefix)
- (defun . rng-strings-to-completion-alist)
- (provide . rng-nxml))
- ("/usr/share/emacs/23.0.93/lisp/loadhist.elc"
- (defun . feature-symbols)
- (defun . feature-file)
- (defun . file-loadhist-lookup)
- (defun . file-provides)
- (defun . file-requires)
- (defun . file-set-intersect)
- (defun . file-dependents)
- (defun . read-feature)
- loadhist-hook-functions unload-feature-special-hooks unload-function-defs-list unload-hook-features-list
- (t . unload-feature)
- (defun . unload-feature)
- (provide . loadhist))
- ("/home/hobbes/nxhtml/util/appmenu-fold.el" appmenu-fold:version
- (require . fold-dwim)
- (require . appmenu)
- (defun . appmenu-fold-no-hs-minor-mode)
- (defun . appmenu-fold-no-outline-minor-mode)
- (defun . appmenu-fold-setup)
- (provide . appmenu-fold))
- ("/home/hobbes/nxhtml/related/fold-dwim.el" fold-dwim:version
- (require . outline)
- (require . hideshow)
- fold-dwim-outline-style-default fold-dwim-toggle-selective-display
- (defun . fold-dwim-maybe-recenter)
- (defun . fold-dwim-toggle-selective-display)
- (defun . fold-dwim-hide-all)
- (defun . fold-dwim-show-all)
- (defun . fold-dwim-hide)
- (defun . fold-dwim-show)
- (defun . fold-dwim-toggle)
- (defun . fold-dwim-auctex-env-or-macro)
- (defun . fold-dwim-outline-invisible-p)
- (defun . fold-dwim-outline-nested-p)
- (provide . fold-dwim))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/hideshow.elc" hs-hide-comments-when-hiding-all hs-minor-mode-hook hs-isearch-open hs-special-modes-alist hs-hide-all-non-comment-function hs-allow-nesting hs-hide-hook hs-show-hook hs-set-up-overlay hs-minor-mode hs-minor-mode-map hs-minor-mode-menu
- (defun . hs-minor-mode-menu)
- hs-c-start-regexp hs-block-start-regexp hs-block-start-mdata-select hs-block-end-regexp hs-forward-sexp-func hs-adjust-block-beginning hs-headline
- (defun . hs-discard-overlays)
- (defun . hs-make-overlay)
- (defun . hs-isearch-show)
- (defun . hs-isearch-show-temporary)
- (defun . hs-forward-sexp)
- (defun . hs-hide-comment-region)
- (defun . hs-hide-block-at-point)
- (defun . hs-inside-comment-p)
- (defun . hs-grok-mode-type)
- (defun . hs-find-block-beginning)
- (defun . hs-hide-level-recursive)
- (defun . hs-life-goes-on)
- (defun . hs-overlay-at)
- (defun . hs-already-hidden-p)
- (defun . hs-c-like-adjust-block-beginning)
- (defun . hs-hide-all)
- (defun . hs-show-all)
- (defun . hs-hide-block)
- (defun . hs-show-block)
- (defun . hs-hide-level)
- (defun . hs-toggle-hiding)
- (defun . hs-mouse-toggle-hiding)
- (defun . hs-hide-initial-comment-block)
- hs-minor-mode
- (t . hs-minor-mode)
- (defun . hs-minor-mode)
- (t . turn-off-hideshow)
- (defun . turn-off-hideshow)
- (provide . hideshow))
- ("/usr/share/emacs/23.0.93/lisp/outline.elc" outline-regexp outline-heading-end-regexp outline-mode-prefix-map outline-mode-menu-bar-map outline-minor-mode-menu-bar-map outline-mode-map outline-font-lock-keywords
- (defface . outline-1)
- (defface . outline-2)
- (defface . outline-3)
- (defface . outline-4)
- (defface . outline-5)
- (defface . outline-6)
- (defface . outline-7)
- (defface . outline-8)
- outline-font-lock-faces
- (defun . outline-font-lock-face)
- outline-view-change-hook outline-mode-hook outline-blank-line outline-mode-map outline-mode-syntax-table outline-mode-abbrev-table outline-mode-abbrev-table
- (t . outline-mode)
- (defun . outline-mode)
- outline-minor-mode-prefix outline-minor-mode
- (t . outline-minor-mode)
- (defun . outline-minor-mode)
- outline-minor-mode-map outline-level outline-heading-alist
- (defun . outline-level)
- (defun . outline-next-preface)
- (defun . outline-next-heading)
- (defun . outline-previous-heading)
- (defun . outline-invisible-p)
- (defun . outline-visible)
- (defun . outline-back-to-heading)
- (defun . outline-on-heading-p)
- (defun . outline-insert-heading)
- (defun . outline-invent-heading)
- (defun . outline-promote)
- (defun . outline-demote)
- (defun . outline-head-from-level)
- (defun . outline-map-region)
- (defun . outline-move-subtree-up)
- (defun . outline-move-subtree-down)
- (defun . outline-end-of-heading)
- (defun . outline-next-visible-heading)
- (defun . outline-previous-visible-heading)
- (defun . outline-mark-subtree)
- outline-isearch-open-invisible-function
- (defun . outline-flag-region)
- (defun . outline-reveal-toggle-invisible)
- (defun . outline-isearch-open-invisible)
- (defun . hide-entry)
- (defun . show-entry)
- (defun . hide-body)
- (defun . hide-region-body)
- (defun . show-all)
- (defun . hide-subtree)
- (defun . hide-leaves)
- (defun . show-subtree)
- (defun . outline-show-heading)
- (defun . hide-sublevels)
- (defun . hide-other)
- (defun . outline-toggle-children)
- (defun . outline-flag-subtree)
- (defun . outline-end-of-subtree)
- (defun . show-branches)
- (defun . show-children)
- (defun . outline-up-heading)
- (defun . outline-forward-same-level)
- (defun . outline-get-next-sibling)
- (defun . outline-backward-same-level)
- (defun . outline-get-last-sibling)
- (defun . outline-headers-as-kill)
- (provide . outline)
- (provide . noutline))
- ("/home/hobbes/nxhtml/util/mumamo.el" mumamo:version
- (require . cl)
- (require . flyspell)
- (require . mlinks)
- (require . nxml-mode)
- (require . rng-valid)
- (require . sgml-mode)
- msgtrc-buffer
- (defun . msgtrc)
- mumamo-message-file-buffer
- (defun . mumamo-msgtrc-to-file)
- (defun . mumamo-msgfntfy)
- (defun . mumamo-msgindent)
- mumamo-display-error-lwarn mumamo-display-error-stop
- (defun . mumamo-message-with-face)
- (defun . mumamo-show-report-message)
- (defun . mumamo-display-error)
- (defun . mumamo-debug-to-backtrace)
- mumamo-use-condition-case mumamo-debugger
- (defun . mumamo-condition-case)
- mumamo-warned-once
- (defun . mumamo-warn-once)
- (defun . mumamo-add-help-tabs)
- (defun . mumamo-insert-describe-button)
- (defface . mumamo-border-face-in)
- (defface . mumamo-border-face-out)
- mumamo-set-major-mode-delay
- (defface . mumamo-background-chunk-submode)
- mumamo-background-chunk-major
- (defface . mumamo-background-chunk-major)
- mumamo-background-chunk-submode mumamo-background-colors
- (defun . mumamo-background-color)
- mumamo-chunk-coloring mumamo-submode-indent-offset mumamo-submode-indent-offset-0 mumamo-major-mode-indent-specials mumamo-check-chunk-major-same mumamo-major-modes
- (defun . mumamo-jit-lock-function)
- (defun . mumamo-jit-lock-register)
- (defun . mumamo-jit-with-buffer-unmodified)
- (defun . mumamo-with-buffer-prepared-for-jit-lock)
- mumamo-find-chunks-timer mumamo-find-chunk-delay
- (defun . mumamo-stop-find-chunks-timer)
- (defun . mumamo-start-find-chunks-timer)
- (defun . mumamo-find-chunks-in-timer)
- mumamo-last-chunk mumamo-last-new-chunk mumamo-last-chunk-change-pos mumamo-old-chunks mumamo-find-chunk-is-active mumamo-use-new-chunks
- (defun . mumamo-toggle-use-new-chunks)
- mumamo-use-both-chunks
- (defun . mumamo-toggle-use-both-chunks)
- (defun . mumamo-make-old-chunks)
- (defun . mumamo-make-new-chunks)
- (defun . mumamo-toggle-and-normal-mode-and-what-at-cursor)
- mumamo-find-chunks-level
- (defun . mumamo-find-chunks)
- (defun . mumamo-find-chunk-after-change)
- (defun . mumamo-after-change)
- (defun . mumamo-jit-lock-after-change)
- (defun . mumamo-jit-lock-after-change-1)
- (defun . mumamo-mark-chunk)
- (defun . mumamo-save-buffer-state)
- (t . mumamo-mark-for-refontification)
- (defun . mumamo-mark-for-refontification)
- mumamo-internal-major-modes-alist mumamo-ppss-last-chunk mumamo-ppss-last-major mumamo-major-mode-substitute
- (defun . mumamo-get-major-mode-substitute)
- (defun . mumamo-with-major-mode-setup)
- (defun . mumamo-with-major-mode-fontification)
- (defun . mumamo-with-major-mode-indentation)
- (defun . mumamo-assert-fontified-t)
- (defun . mumamo-do-fontify)
- (defun . mumamo-do-unfontify)
- (defun . mumamo-fontify-region-with)
- (defun . mumamo-unfontify-region-with)
- (defun . mumamo-unfontify-buffer)
- (defun . mumamo-fontify-buffer)
- (defun . mumamo-unfontify-chunk)
- mumamo-just-changed-major
- (defun . mumamo-fontify-region)
- mumamo-dbg-pretend-fontified
- (defun . mumamo-exc-mode)
- (defun . mumamo-chunk-value-set-min)
- (defun . mumamo-chunk-value-set-max)
- (defun . mumamo-chunk-value-set-syntax-min)
- (defun . mumamo-chunk-value-set-syntax-max)
- (defun . mumamo-chunk-value-min)
- (defun . mumamo-chunk-value-max)
- (defun . mumamo-chunk-value-major)
- (defun . mumamo-chunk-value-syntax-min)
- (defun . mumamo-chunk-value-syntax-max)
- (defun . mumamo-chunk-value-parseable-by)
- (defun . mumamo-chunk-value-fw-exc-fun)
- mumamo-chunks-to-remove
- (defun . mumamo-flush-chunk-syntax)
- (defun . mumamo-fontify-region-1)
- (defun . mumamo-remove-old-overlays)
- mumamo-known-buffer-local-fontifications mumamo-irrelevant-buffer-local-vars
- (defun . mumamo-get-relevant-buffer-local-vars)
- mumamo-major-modes-local-maps
- (defun . mumamo-fetch-major-mode-setup)
- (defun . mumamo-bad-mode)
- (defun . mumamo-get-major-mode-setup)
- (defun . mumamo-remove-chunk-overlays)
- (defun . mumamo-remove-all-chunk-overlays)
- (defun . mumamo-create-chunk-values-at)
- (defun . mumamo-define-no-mode)
- (defun . mumamo-major-mode-from-modespec)
- (defun . mumamo-chunk-equal-chunk-values)
- (defun . mumamo-create-chunk-from-chunk-values)
- (defun . mumamo-create-chunk-at)
- (defun . mumamo-get-existing-chunk-at)
- (defun . mumamo-get-existing-new-chunk-at)
- (defun . mumamo-get-chunk-save-buffer-state)
- (defun . mumamo-chunk-major-mode)
- (defun . mumamo-chunk-syntax-min)
- (defun . mumamo-chunk-syntax-max)
- (defun . mumamo-syntax-maybe-completable)
- mumamo-current-chunk-family
- (defun . mumamo-main-major-mode)
- (defun . mumamo-chunk-start-fw-str)
- (defun . mumamo-chunk-start-fw-re)
- (defun . mumamo-chunk-start-fw-str-inc)
- (defun . mumamo-chunk-start-bw-str)
- (defun . mumamo-chunk-start-bw-re)
- (defun . mumamo-chunk-start-bw-str-inc)
- (defun . mumamo-chunk-end-fw-str)
- (defun . mumamo-chunk-end-fw-re)
- (defun . mumamo-chunk-end-fw-str-inc)
- (defun . mumamo-chunk-end-bw-str)
- (defun . mumamo-chunk-end-bw-re)
- (defun . mumamo-chunk-end-bw-str-inc)
- mumamo-string-syntax-table
- (defun . mumamo-guess-in-string)
- mumamo-find-possible-chunk-new
- (defun . mumamo-find-possible-chunk)
- (defun . mumamo-find-possible-chunk-new)
- (defun . mumamo-find-possible-chunk-old)
- (defun . temp-overlays-here)
- (defun . temp-cursor-pos)
- (defun . temp-test-new-create-chunk)
- (defun . temp-create-last-chunk)
- (defun . mumamo-delete-new-chunks)
- (defun . mumamo-new-create-chunk)
- (defun . mumamo-new-chunk-value-min)
- (defun . mumamo-new-chunk-value-max)
- (defun . mumamo-new-chunk-equal-chunk-values)
- (defun . mumamo-find-next-chunk-values)
- (defun . mumamo-valid-nxml-point)
- (defun . mumamo-valid-nxml-chunk)
- (defun . mumamo-end-chunk-is-valid)
- (defun . mumamo-quick-static-chunk)
- mumamo-unread-command-events-timer
- (defun . mumamo-unread-command-events)
- mumamo-idle-set-major-mode-timer
- (defun . mumamotemp-pre-command)
- (defun . mumamotemp-post-command)
- (defun . mumamotemp-start)
- (defun . mumamo-idle-set-major-mode)
- (defun . mumamo-request-idle-set-major-mode)
- mumamo-done-first-set-major mumamo-multi-major-mode mumamo-safe-commands-in-wrong-major
- (defun . mumamo-set-major-pre-command)
- (defun . mumamo-fetch-local-map)
- (defun . mumamo-set-major-post-command)
- (defun . mumamo-post-command-1)
- (defun . mumamo-post-command)
- mumamo-set-major-running
- (defun . mumamo-change-major-function)
- (defun . mumamo-derived-from-mode)
- mumamo-test-add-hook mumamo-survive-hooks mumamo-survive
- (defun . mumamo-make-variable-buffer-permanent)
- mumamo-survive-done-by-me
- (defun . mumamo-hook-p)
- mumamo-major-mode mumamo-change-major-mode-no-nos mumamo-after-change-major-mode-no-nos mumamo-removed-from-hook
- (defun . mumamo-remove-from-hook)
- (defun . mumamo-addback-to-hooks)
- (defun . mumamo-addback-to-hook)
- mumamo-buffer-locals-dont-set
- (defun . mumamo-save-most-buffer-locals)
- mumamo-restore-most-buffer-locals-in-hook-major
- (defun . mumamo-restore-most-buffer-locals-in-hook)
- (defun . mumamo-restore-most-buffer-locals)
- mumamo-buffer-locals-per-major
- (defun . mumamo-get-hook-value)
- (defun . mumamo-set-major)
- (defun . mumamo-setup-local-fontification-vars)
- (defun . mumamo-set-fontification-functions)
- (defun . mumamo-initialize-state)
- (defun . mumamo-turn-on-actions)
- (defun . mumamo-turn-off-actions)
- mumamo-turn-on-hook mumamo-change-major-mode-hook mumamo-after-change-major-mode-hook mumamo-defined-turn-on-functions
- (defun . mumamo-describe-chunks)
- (defun . mumamo-add-multi-keymap)
- mumamo-map
- (defun . define-mumamo-multi-major-mode)
- (defun . mumamo-indent-line-function)
- (defun . mumamo-indent-line-chunks)
- (defun . mumamo-indent-line-function-1)
- (defun . mumamo-indent-use-widen)
- (defun . mumamo-indent-special-or-default)
- (defun . mumamo-call-indent-line)
- (defun . mumamo-indent-region-function)
- (defun . mumamo-fill-forward-paragraph-function)
- (defun . mumamo-fill-paragraph-function)
- (defun . mumamo-forward-chunk)
- (defun . mumamo-backward-chunk)
- (defun . mumamo-flyspell-verify)
- (defun . flyspell-mumamo-mode)
- (require . bytecomp)
- (defun . advice-compilation)
- mumamo-syntax-chunk-at-pos
- (defun . advice-compilation)
- mumamo-syntax-ppss-major
- (defun . advice-compilation)
- rng-get-major-mode-chunk-function rng-valid-nxml-major-mode-chunk-function rng-end-major-mode-chunk-function
- (defun . advice-compilation)
- (defun . advice-compilation)
- (defun . advice-compilation)
- (provide . mumamo))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/byte-opt.elc"
- (require . bytecomp)
- (defun . byte-compile-log-lap-1)
- (defun . byte-compile-log-lap)
- (defun . byte-optimize-inline-handler)
- (defun . byte-inline-lapcode)
- (t . byte-compile-inline-expand)
- (defun . byte-compile-inline-expand)
- (t . byte-compile-unfold-lambda)
- (defun . byte-compile-unfold-lambda)
- (defun . byte-optimize-form-code-walker)
- (defun . byte-optimize-all-constp)
- (t . byte-optimize-form)
- (defun . byte-optimize-form)
- (defun . byte-optimize-body)
- (defun . byte-compile-trueconstp)
- (defun . byte-compile-nilconstp)
- (defun . byte-optimize-associative-math)
- (defun . byte-optimize-nonassociative-math)
- (defun . byte-optimize-approx-equal)
- (defun . byte-optimize-delay-constants-math)
- (defun . byte-compile-butlast)
- (defun . byte-optimize-plus)
- (defun . byte-optimize-minus)
- (defun . byte-optimize-multiply)
- (defun . byte-optimize-divide)
- (defun . byte-optimize-logmumble)
- (defun . byte-optimize-binary-predicate)
- (defun . byte-optimize-predicate)
- (defun . byte-optimize-identity)
- (defun . byte-optimize-quote)
- (defun . byte-optimize-zerop)
- (defun . byte-optimize-and)
- (defun . byte-optimize-or)
- (defun . byte-optimize-cond)
- (defun . byte-optimize-if)
- (defun . byte-optimize-while)
- (defun . byte-optimize-funcall)
- (defun . byte-optimize-apply)
- (defun . byte-optimize-letX)
- (defun . byte-optimize-nth)
- (defun . byte-optimize-nthcdr)
- (defun . byte-optimize-featurep)
- (defun . byte-optimize-set)
- (defun . byte-compile-splice-in-already-compiled-code)
- byte-constref-ops byte-constref-ops
- (defun . disassemble-offset)
- (t . byte-decompile-bytecode)
- (defun . byte-decompile-bytecode)
- (defun . byte-decompile-bytecode-1)
- byte-tagref-ops byte-tagref-ops byte-conditional-ops byte-conditional-ops byte-after-unbind-ops byte-compile-side-effect-and-error-free-ops byte-compile-side-effect-and-error-free-ops byte-compile-side-effect-free-ops byte-compile-side-effect-free-ops
- (t . byte-optimize-lapcode)
- (defun . byte-optimize-lapcode)
- (provide . byte-opt))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/bytecomp.elc"
- (require . backquote)
- (defun . byte-compile-single-version)
- (defun . byte-compile-version-cond)
- emacs-lisp-file-regexp
- (defun . byte-compiler-base-file-name)
- (defun . byte-compile-dest-file)
- (autoload . byte-compile-inline-expand)
- (autoload . byte-optimize-form)
- (autoload . byte-optimize-lapcode)
- (autoload . byte-compile-unfold-lambda)
- (autoload . byte-decompile-bytecode)
- byte-compile-verbose byte-compile-compatibility byte-optimize byte-compile-delete-errors byte-compile-dynamic byte-compile-disable-print-circle byte-compile-dynamic-docstrings byte-optimize-log byte-compile-error-on-warn byte-compile-warning-types byte-compile-warnings
- (t . byte-compile-warnings-safe-p)
- (defun . byte-compile-warnings-safe-p)
- (defun . byte-compile-warning-enabled-p)
- (t . byte-compile-disable-warning)
- (defun . byte-compile-disable-warning)
- (t . byte-compile-enable-warning)
- (defun . byte-compile-enable-warning)
- byte-compile-interactive-only-functions byte-compile-not-obsolete-var byte-compile-generate-call-tree byte-compile-call-tree byte-compile-call-tree-sort byte-compile-debug byte-compile-constants byte-compile-variables byte-compile-bound-variables byte-compile-const-variables byte-compile-initial-macro-environment byte-compile-macro-environment byte-compile-function-environment byte-compile-unresolved-functions byte-compile-noruntime-functions byte-compile-tag-number byte-compile-output byte-compile-depth byte-compile-maxdepth byte-code-vector byte-stack+-info
- (defun . byte-defop)
- (defun . byte-extrude-byte-code-vectors)
- byte-varref byte-varset byte-varbind byte-call byte-unbind byte-nth byte-nth byte-symbolp byte-symbolp byte-consp byte-consp byte-stringp byte-stringp byte-listp byte-listp byte-eq byte-eq byte-memq byte-memq byte-not byte-not byte-car byte-car byte-cdr byte-cdr byte-cons byte-cons byte-list1 byte-list1 byte-list2 byte-list2 byte-list3 byte-list3 byte-list4 byte-list4 byte-length byte-length byte-aref byte-aref byte-aset byte-aset byte-symbol-value byte-symbol-value byte-symbol-function byte-symbol-function byte-set byte-set byte-fset byte-fset byte-get byte-get byte-substring byte-substring byte-concat2 byte-concat2 byte-concat3 byte-concat3 byte-concat4 byte-concat4 byte-sub1 byte-sub1 byte-add1 byte-add1 byte-eqlsign byte-eqlsign byte-gtr byte-gtr byte-lss byte-lss byte-leq byte-leq byte-geq byte-geq byte-diff byte-diff byte-negate byte-negate byte-plus byte-plus byte-max byte-max byte-min byte-min byte-mult byte-mult byte-point byte-point byte-goto-char byte-goto-char byte-insert byte-insert byte-point-max byte-point-max byte-point-min byte-point-min byte-char-after byte-char-after byte-following-char byte-following-char byte-preceding-char byte-preceding-char byte-current-column byte-current-column byte-indent-to byte-indent-to byte-scan-buffer-OBSOLETE byte-scan-buffer-OBSOLETE byte-eolp byte-eolp byte-eobp byte-eobp byte-bolp byte-bolp byte-bobp byte-bobp byte-current-buffer byte-current-buffer byte-set-buffer byte-set-buffer byte-save-current-buffer byte-set-mark-OBSOLETE byte-set-mark-OBSOLETE byte-interactive-p byte-interactive-p byte-forward-char byte-forward-char byte-forward-word byte-forward-word byte-skip-chars-forward byte-skip-chars-forward byte-skip-chars-backward byte-skip-chars-backward byte-forward-line byte-forward-line byte-char-syntax byte-char-syntax byte-buffer-substring byte-buffer-substring byte-delete-region byte-delete-region byte-narrow-to-region byte-narrow-to-region byte-widen byte-widen byte-end-of-line byte-end-of-line byte-constant2 byte-goto byte-goto-if-nil byte-goto-if-not-nil byte-goto-if-nil-else-pop byte-goto-if-not-nil-else-pop byte-return byte-discard byte-dup byte-save-excursion byte-save-window-excursion byte-save-restriction byte-catch byte-unwind-protect byte-condition-case byte-condition-case byte-temp-output-buffer-setup byte-temp-output-buffer-setup byte-temp-output-buffer-show byte-temp-output-buffer-show byte-unbind-all byte-unbind-all byte-set-marker byte-set-marker byte-match-beginning byte-match-beginning byte-match-end byte-match-end byte-upcase byte-upcase byte-downcase byte-downcase byte-string= byte-string= byte-string< byte-string< byte-equal byte-equal byte-nthcdr byte-nthcdr byte-elt byte-elt byte-member byte-member byte-assq byte-assq byte-nreverse byte-nreverse byte-setcar byte-setcar byte-setcdr byte-setcdr byte-car-safe byte-car-safe byte-cdr-safe byte-cdr-safe byte-nconc byte-nconc byte-quo byte-quo byte-rem byte-rem byte-numberp byte-numberp byte-integerp byte-integerp byte-listN byte-listN byte-concatN byte-concatN byte-insertN byte-insertN byte-constant byte-constant-limit byte-goto-ops byte-goto-always-pop-ops byte-goto-always-pop-ops
- (defun . byte-compile-lapcode)
- (defun . byte-compile-eval)
- (defun . byte-compile-eval-before-compile)
- byte-compile-current-form byte-compile-dest-file byte-compile-current-file byte-compile-current-group byte-compile-current-buffer
- (defun . byte-compile-log)
- (defun . byte-compile-log-1)
- byte-compile-read-position byte-compile-last-position
- (defun . byte-compile-delete-first)
- (defun . byte-compile-set-symbol-position)
- byte-compile-last-warned-form byte-compile-last-logged-file
- (defun . byte-compile-warning-prefix)
- (defun . byte-compile-warning-series)
- (defun . byte-compile-log-file)
- (defun . byte-compile-log-warning)
- (defun . byte-compile-warn)
- (defun . byte-compile-warn-obsolete)
- (defun . byte-compile-report-error)
- (defun . byte-compile-obsolete)
- (defun . byte-compile-fdefinition)
- (defun . byte-compile-arglist-signature)
- (defun . byte-compile-arglist-signatures-congruent-p)
- (defun . byte-compile-arglist-signature-string)
- (defun . byte-compile-callargs-warn)
- (defun . byte-compile-format-warn)
- (defun . byte-compile-nogroup-warn)
- (defun . byte-compile-arglist-warn)
- byte-compile-cl-functions
- (defun . byte-compile-find-cl-functions)
- (defun . byte-compile-cl-warn)
- (defun . byte-compile-print-syms)
- (defun . byte-compile-warn-about-unresolved-functions)
- (defun . byte-compile-const-symbol-p)
- (defun . byte-compile-constp)
- (defun . byte-compile-close-variables)
- (defun . displaying-byte-compile-warnings)
- (t . byte-force-recompile)
- (defun . byte-force-recompile)
- (t . byte-recompile-directory)
- (defun . byte-recompile-directory)
- no-byte-compile
- (t . byte-compile-file)
- (defun . byte-compile-file)
- (t . compile-defun)
- (defun . compile-defun)
- (defun . byte-compile-from-buffer)
- (defun . byte-compile-fix-header)
- (defun . byte-compile-insert-header)
- (defun . byte-compile-output-file-form)
- (defun . byte-compile-output-docform)
- (defun . byte-compile-keep-pending)
- (defun . byte-compile-flush-pending)
- (defun . byte-compile-file-form)
- (defun . byte-compile-file-form-defsubst)
- (defun . byte-compile-file-form-autoload)
- (defun . byte-compile-file-form-defvar)
- (defun . byte-compile-file-form-define-abbrev-table)
- (defun . byte-compile-file-form-custom-declare-variable)
- (defun . byte-compile-file-form-require)
- (defun . byte-compile-file-form-progn)
- (defun . byte-compile-file-form-eval)
- (defun . byte-compile-file-form-defun)
- (defun . byte-compile-file-form-defmacro)
- (defun . byte-compile-file-form-defmumble)
- (defun . byte-compile-output-as-comment)
- (t . byte-compile)
- (defun . byte-compile)
- (defun . byte-compile-sexp)
- (defun . byte-compile-byte-code-maker)
- (defun . byte-compile-byte-code-unmake)
- (defun . byte-compile-check-lambda-list)
- (defun . byte-compile-lambda)
- (defun . byte-compile-constants-vector)
- (defun . byte-compile-top-level)
- (defun . byte-compile-out-toplevel)
- (defun . byte-compile-top-level-body)
- (defun . byte-compile-declare-function)
- (defun . byte-compile-form)
- (defun . byte-compile-normal-call)
- (defun . byte-compile-variable-ref)
- (defun . byte-compile-get-constant)
- (defun . byte-compile-constant)
- (defun . byte-compile-push-constant)
- (defun . byte-defop-compiler)
- (defun . byte-defop-compiler19)
- (defun . byte-defop-compiler-1)
- (defun . byte-compile-subr-wrong-args)
- (defun . byte-compile-no-args)
- (defun . byte-compile-one-arg)
- (defun . byte-compile-two-args)
- (defun . byte-compile-three-args)
- (defun . byte-compile-zero-or-one-arg)
- (defun . byte-compile-one-or-two-args)
- (defun . byte-compile-two-or-three-args)
- (defun . byte-compile-noop)
- (defun . byte-compile-discard)
- (defun . byte-compile-associative)
- (defun . byte-compile-char-before)
- (defun . byte-compile-backward-char)
- (defun . byte-compile-backward-word)
- (defun . byte-compile-list)
- (defun . byte-compile-concat)
- (defun . byte-compile-minus)
- (defun . byte-compile-quo)
- (defun . byte-compile-nconc)
- (defun . byte-compile-fset)
- (defun . byte-compile-funarg)
- (defun . byte-compile-funarg-2)
- (defun . byte-compile-function-form)
- (defun . byte-compile-indent-to)
- (defun . byte-compile-insert)
- (defun . byte-compile-setq)
- (defun . byte-compile-setq-default)
- (defun . byte-compile-quote)
- (defun . byte-compile-quote-form)
- (defun . byte-compile-body)
- (defun . byte-compile-body-do-effect)
- (defun . byte-compile-form-do-effect)
- (defun . byte-compile-progn)
- (defun . byte-compile-prog1)
- (defun . byte-compile-prog2)
- (defun . byte-compile-goto-if)
- (defun . byte-compile-find-bound-condition)
- (defun . byte-compile-maybe-guarded)
- (defun . byte-compile-if)
- (defun . byte-compile-cond)
- (defun . byte-compile-and)
- (defun . byte-compile-and-recursion)
- (defun . byte-compile-or)
- (defun . byte-compile-or-recursion)
- (defun . byte-compile-while)
- (defun . byte-compile-funcall)
- (defun . byte-compile-let)
- (defun . byte-compile-let*)
- (defun . byte-compile-negated)
- (defun . byte-compile-negation-optimizer)
- (defun . byte-compile-catch)
- (defun . byte-compile-unwind-protect)
- (defun . byte-compile-track-mouse)
- (defun . byte-compile-condition-case)
- (defun . byte-compile-save-excursion)
- (defun . byte-compile-save-restriction)
- (defun . byte-compile-save-current-buffer)
- (defun . byte-compile-save-window-excursion)
- (defun . byte-compile-with-output-to-temp-buffer)
- (defun . byte-compile-defun)
- (defun . byte-compile-defmacro)
- (defun . byte-compile-defvar)
- (defun . byte-compile-autoload)
- (defun . byte-compile-lambda-form)
- (defun . byte-compile-file-form-defalias)
- (defun . byte-compile-defalias-warn)
- (defun . byte-compile-no-warnings)
- (defun . byte-compile-make-variable-buffer-local)
- (defun . byte-compile-form-make-variable-buffer-local)
- (defun . byte-compile-make-tag)
- (defun . byte-compile-out-tag)
- (defun . byte-compile-goto)
- (defun . byte-compile-out)
- (defun . byte-compile-annotate-call-tree)
- (t . display-call-tree)
- (defun . display-call-tree)
- (t . batch-byte-compile-if-not-done)
- (defun . batch-byte-compile-if-not-done)
- (t . batch-byte-compile)
- (defun . batch-byte-compile)
- (defun . batch-byte-compile-file)
- (t . batch-byte-recompile-directory)
- (defun . batch-byte-recompile-directory)
- (provide . byte-compile)
- (provide . bytecomp)
- (defun . byte-compile-report-ops))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/cl-macs.elc"
- (require . cl)
- (defun . cl-pop2)
- (require . bytecomp)
- cl-old-bc-file-form cl-simple-funcs cl-simple-funcs cl-safe-funcs cl-safe-funcs
- (defun . cl-simple-expr-p)
- (defun . cl-simple-exprs-p)
- (defun . cl-safe-expr-p)
- (defun . cl-const-expr-p)
- (defun . cl-const-exprs-p)
- (defun . cl-const-expr-val)
- (defun . cl-expr-access-order)
- (defun . cl-expr-contains)
- (defun . cl-expr-contains-any)
- (defun . cl-expr-depends-p)
- (defun . gensym)
- (defun . gentemp)
- (defun . defun*)
- (defun . defmacro*)
- (defun . function*)
- (defun . cl-transform-function-property)
- lambda-list-keywords lambda-list-keywords cl-macro-environment
- (defun . cl-transform-lambda)
- (defun . cl-do-arglist)
- (defun . cl-arglist-args)
- (defun . destructuring-bind)
- cl-not-toplevel
- (defun . eval-when)
- (defun . cl-compile-time-too)
- (defun . load-time-value)
- (defun . case)
- (defun . ecase)
- (defun . typecase)
- (defun . etypecase)
- (defun . block)
- cl-active-block-names
- (defun . cl-byte-compile-block)
- (defun . cl-byte-compile-throw)
- (defun . return)
- (defun . return-from)
- (defun . loop)
- (defun . cl-parse-loop-clause)
- (defun . cl-loop-let)
- (defun . cl-loop-handle-accum)
- (defun . cl-loop-build-ands)
- (defun . do)
- (defun . do*)
- (defun . cl-expand-do-loop)
- (defun . dolist)
- (defun . dotimes)
- (defun . do-symbols)
- (defun . do-all-symbols)
- (defun . psetq)
- (defun . progv)
- (defun . flet)
- (defun . labels)
- (defun . macrolet)
- (defun . symbol-macrolet)
- cl-closure-vars
- (defun . lexical-let)
- (defun . lexical-let*)
- (defun . cl-defun-expander)
- (defun . multiple-value-bind)
- (defun . multiple-value-setq)
- (defun . locally)
- (defun . the)
- cl-proclaim-history cl-declare-stack
- (defun . cl-do-proclaim)
- (defun . declare)
- (defun . define-setf-method)
- (defun . define-setf-expander)
- (defun . defsetf)
- (defun . cl-setf-make-apply)
- (defun . get-setf-method)
- (defun . cl-setf-do-modify)
- (defun . cl-setf-do-store)
- (defun . cl-setf-simple-store-p)
- (defun . setf)
- (defun . psetf)
- (defun . cl-do-pop)
- (defun . remf)
- (defun . shiftf)
- (defun . rotatef)
- (defun . letf)
- (defun . letf*)
- (defun . callf)
- (defun . callf2)
- (defun . define-modify-macro)
- (defun . defstruct)
- (defun . cl-struct-setf-expander)
- (defun . deftype)
- (defun . cl-make-type-test)
- (defun . typep)
- (defun . check-type)
- (defun . assert)
- (defun . define-compiler-macro)
- (defun . compiler-macroexpand)
- (defun . cl-byte-compile-compiler-macro)
- (defun . defsubst*)
- (defun . cl-defsubst-expand))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/sgml-mode.elc" sgml-basic-offset sgml-transformation-function sgml-transformation sgml-mode-hook sgml-specials sgml-quick-keys sgml-mode-map
- (defun . sgml-make-syntax-table)
- sgml-mode-syntax-table sgml-tag-syntax-table sgml-name-8bit-mode sgml-char-names sgml-char-names-table sgml-validate-command sgml-saved-validate-command sgml-slash-distance sgml-namespace-re sgml-namespace-re sgml-name-re sgml-name-re sgml-tag-name-re sgml-tag-name-re sgml-attrs-re sgml-attrs-re sgml-start-tag-regex
- (defface . sgml-namespace)
- sgml-namespace-face sgml-font-lock-keywords-1 sgml-font-lock-keywords-1 sgml-font-lock-keywords-2 sgml-font-lock-keywords-2 sgml-font-lock-keywords sgml-font-lock-syntactic-keywords sgml-face-tag-alist sgml-tag-face-alist sgml-display-text sgml-tags-invisible sgml-tag-alist sgml-tag-help sgml-xml-mode sgml-empty-tags sgml-unclosed-tags
- (defun . sgml-xml-guess)
- (defun . sgml-comment-indent-new-line)
- (defun . sgml-mode-facemenu-add-face-function)
- (defun . sgml-fill-nobreak)
- sgml-mode-map sgml-mode-syntax-table sgml-mode-abbrev-table sgml-mode-abbrev-table
- (t . sgml-mode)
- (defun . sgml-mode)
- (defun . xml-mode)
- (defun . sgml-comment-indent)
- (defun . sgml-slash)
- (defun . sgml-slash-matching)
- (defun . sgml-name-char)
- (defun . sgml-namify-char)
- (defun . sgml-name-self)
- (defun . sgml-maybe-name-self)
- (defun . sgml-name-8bit-mode)
- sgml-tag-last sgml-tag-history
- (defun . sgml-tag)
- (autoload . skeleton-read)
- (defun . sgml-attributes)
- (defun . sgml-auto-attributes)
- (defun . sgml-tag-help)
- (defun . sgml-maybe-end-tag)
- (defun . sgml-skip-tag-backward)
- sgml-electric-tag-pair-overlays sgml-electric-tag-pair-timer
- (defun . sgml-electric-tag-pair-before-change-function)
- (defun . sgml-electric-tag-pair-flush-overlays)
- sgml-electric-tag-pair-mode
- (defun . sgml-electric-tag-pair-mode)
- (defun . sgml-skip-tag-forward)
- (defun . sgml-delete-tag)
- (defun . sgml-tags-invisible)
- (defun . sgml-point-entered)
- (defun . sgml-validate)
- (defun . sgml-at-indentation-p)
- (defun . sgml-lexical-context)
- (defun . sgml-beginning-of-tag)
- (defun . sgml-value)
- (defun . sgml-quote)
- (defun . sgml-pretty-print)
- (defun . sgml-tag-type)
- (defun . sgml-tag-start)
- (defun . sgml-tag-end)
- (defun . sgml-tag-name)
- (defun . sgml-tag-p)
- (defun . copy-sgml-tag)
- (defun . make-sgml-tag)
- (defun . sgml-make-tag)
- (defun . sgml-parse-tag-name)
- (defun . sgml-looking-back-at)
- (defun . sgml-tag-text-p)
- (defun . sgml-parse-tag-backward)
- (defun . sgml-get-context)
- (defun . sgml-show-context)
- (defun . sgml-close-tag)
- (defun . sgml-empty-tag-p)
- (defun . sgml-unclosed-tag-p)
- (defun . sgml-calculate-indent)
- (defun . sgml-indent-line)
- (defun . sgml-guess-indent)
- (defun . sgml-parse-dtd)
- html-mode-hook html-quick-keys html-mode-map html-face-tag-alist html-tag-face-alist html-display-text html-tag-alist html-tag-help html-mode-map html-mode-syntax-table html-mode-abbrev-table html-mode-abbrev-table
- (t . html-mode)
- (defun . html-mode)
- html-imenu-regexp
- (defun . html-imenu-index)
- html-autoview-mode
- (defun . html-autoview-mode)
- (defun . html-href-anchor)
- (defun . html-name-anchor)
- (defun . html-headline-1)
- (defun . html-headline-2)
- (defun . html-headline-3)
- (defun . html-headline-4)
- (defun . html-headline-5)
- (defun . html-headline-6)
- (defun . html-horizontal-rule)
- (defun . html-image)
- (defun . html-line)
- (defun . html-ordered-list)
- (defun . html-unordered-list)
- (defun . html-list-item)
- (defun . html-paragraph)
- (defun . html-checkboxes)
- (defun . html-radio-buttons)
- (provide . sgml-mode))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-valid.elc"
- (require . xmltok)
- (require . nxml-enc)
- (require . nxml-util)
- (require . nxml-ns)
- (require . rng-match)
- (require . rng-util)
- (require . rng-loc)
- (defface . rng-error)
- rng-state-cache-distance rng-validate-chunk-size rng-validate-delay rng-validate-quick-delay rng-validate-timer rng-validate-quick-timer rng-error-count rng-message-overlay rng-message-overlay-inhibit-point rng-message-overlay-current rng-open-elements rng-pending-contents rng-collecting-text rng-validate-up-to-date-end rng-conditional-up-to-date-start rng-conditional-up-to-date-end rng-parsing-for-state rng-validate-mode rng-dtd
- (t . rng-validate-mode)
- (defun . rng-validate-mode)
- (defun . rng-set-schema-file-and-validate)
- (defun . rng-set-document-type-and-validate)
- (defun . rng-auto-set-schema-and-validate)
- (defun . rng-after-change-function)
- (defun . rng-compute-mode-line-string)
- (defun . rng-cancel-timers)
- (defun . rng-kill-timers)
- (defun . rng-activate-timers)
- (defun . rng-validate-clear)
- rng-validate-display-point rng-validate-display-modified-p
- (defun . rng-validate-while-idle-continue-p)
- (defun . rng-validate-while-idle)
- (defun . rng-validate-quick-while-idle)
- (defun . rng-validate-done)
- (defun . rng-do-some-validation)
- (defun . rng-validate-prepare)
- (defun . rng-do-some-validation-1)
- (defun . rng-clear-conditional-region)
- (defun . rng-clear-cached-state)
- (defun . rng-cache-state)
- (defun . rng-state-matches-current)
- (defun . rng-get-state)
- (defun . rng-restore-state)
- (defun . rng-set-initial-state)
- (defun . rng-clear-overlays)
- (defun . rng-mark-xmltok-dependent-regions)
- (defun . rng-mark-xmltok-dependent-region)
- (defun . rng-dependent-region-changed)
- (defun . rng-mark-xmltok-errors)
- (defun . rng-mark-invalid)
- (defun . rng-mark-not-well-formed)
- (defun . rng-mark-error)
- (defun . rng-error-modified)
- (defun . rng-echo-area-clear-function)
- (defun . rng-maybe-echo-error-at-point)
- (defun . rng-error-overlay-after)
- (defun . rng-first-error)
- (defun . rng-mouse-first-error)
- (defun . rng-next-error)
- (defun . rng-previous-error)
- (defun . rng-next-error-1)
- (defun . rng-previous-error-1)
- (defun . rng-goto-error-overlay)
- (defun . rng-error-overlay-message)
- (defun . rng-current-message-from-error-overlay-p)
- (defun . rng-find-next-error-overlay)
- (defun . rng-find-previous-error-overlay)
- (defun . rng-forward)
- (defun . rng-process-start-tag)
- (defun . rng-process-namespaces)
- (defun . rng-process-tag-name)
- (defun . rng-process-attributes)
- (defun . rng-process-start-tag-close)
- (defun . rng-mark-start-tag-close)
- (defun . rng-recover-bad-element-prefix)
- (defun . rng-recover-bad-attribute-prefix)
- (defun . rng-recover-duplicate-attribute-name)
- (defun . rng-recover-start-tag-open)
- (defun . rng-recover-attribute-value)
- (defun . rng-recover-attribute-name)
- (defun . rng-missing-attributes-message)
- (defun . rng-process-end-tag)
- (defun . rng-end-element)
- (defun . rng-missing-element-message)
- (defun . rng-recover-mismatched-end-tag)
- (defun . rng-mark-missing-end-tags)
- (defun . rng-mark-mismatched-end-tag)
- (defun . rng-push-tag)
- (defun . rng-pop-tag)
- (defun . rng-contents-string)
- (defun . rng-segment-string)
- (defun . rng-segment-blank-p)
- (defun . rng-contents-region)
- (defun . rng-process-text)
- (defun . rng-process-unknown-char)
- (defun . rng-process-unknown-entity)
- (defun . rng-region-blank-p)
- (defun . rng-flush-text)
- (defun . rng-process-end-document)
- (defun . rng-process-encoding-name)
- (defun . rng-name-to-string)
- (provide . rng-valid))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-loc.elc"
- (require . nxml-util)
- (require . nxml-parse)
- (require . rng-parse)
- (require . rng-uri)
- (require . rng-util)
- (require . xmltok)
- rng-current-schema-file-name rng-schema-locating-files-default rng-schema-locating-file-schema-file rng-schema-locating-file-schema rng-schema-locating-files rng-schema-loader-alist rng-cached-document-element rng-document-type-history
- (defun . rng-set-document-type)
- (defun . rng-read-type-id)
- (defun . rng-set-schema-file)
- (defun . rng-set-vacuous-schema)
- (defun . rng-set-schema-file-1)
- (defun . rng-load-schema)
- (defun . rng-what-schema)
- (defun . rng-auto-set-schema)
- (defun . rng-locate-schema-file)
- (defun . rng-possible-type-ids)
- (defun . rng-locate-schema-file-using)
- (defun . rng-match-document-element-rule)
- (defun . rng-match-namespace-rule)
- (defun . rng-document-element)
- (defun . rng-get-start-tag-namespace)
- (defun . rng-match-transform-uri-rule)
- (defun . rng-match-uri-rule)
- (defun . rng-file-name-matches-uri-pattern-p)
- (defun . rng-match-default-rule)
- (defun . rng-possible-type-ids-using)
- (defun . rng-locate-schema-file-from-type-id)
- rng-schema-locating-file-alist
- (defun . rng-get-parsed-schema-locating-file)
- rng-locate-namespace-uri rng-locate-namespace-uri
- (defun . rng-parse-schema-locating-file)
- (defun . rng-save-schema-location)
- (defun . rng-save-schema-location-1)
- (provide . rng-loc))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-uri.elc"
- (defun . rng-file-name-uri)
- (defun . rng-uri-escape-multibyte)
- (defun . rng-percent-encode)
- (defun . rng-uri-file-name)
- (defun . rng-uri-pattern-file-name-regexp)
- (defun . rng-uri-pattern-file-name-replace-match)
- (defun . rng-uri-file-name-1)
- (defun . rng-uri-error)
- (defun . rng-uri-split)
- (defun . rng-uri-join)
- (defun . rng-uri-resolve)
- (defun . rng-resolve-path)
- (defun . rng-relative-uri)
- (defun . rng-relative-path)
- (defun . rng-split-path)
- (defun . rng-join-path)
- (defun . rng-uri-unescape-multibyte)
- (defun . rng-multibyte-percent-decode)
- (defun . rng-uri-unescape-unibyte)
- (defun . rng-uri-unescape-unibyte-match)
- (defun . rng-uri-unescape-unibyte-replace)
- (provide . rng-uri))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-parse.elc"
- (require . nxml-parse)
- (require . rng-match)
- (require . rng-dt)
- rng-parse-prev-was-start-tag
- (defun . rng-parse-validate-file)
- (defun . rng-parse-do-validate)
- (defun . rng-parse-to-match-name)
- (provide . rng-parse))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-parse.elc"
- (require . nxml-util)
- (require . xmltok)
- (require . nxml-enc)
- (require . nxml-ns)
- nxml-parse-file-name nxml-validate-function
- (defun . nxml-parse-file)
- (defun . nxml-parse-find-file)
- (defun . nxml-parse-instance)
- (defun . nxml-parse-instance-1)
- (defun . nxml-parse-start-tag)
- (defun . nxml-validate-tag)
- (defun . nxml-validate-error-position)
- (defun . nxml-make-name)
- (defun . nxml-current-text-string)
- (defun . nxml-parse-error)
- (defun . nxml-check-xmltok-errors)
- (provide . nxml-parse))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-match.elc"
- (require . rng-pttrn)
- (require . rng-util)
- (require . rng-dt)
- rng-not-allowed-ipattern rng-empty-ipattern rng-text-ipattern rng-compile-table rng-being-compiled rng-ipattern-table rng-last-ipattern-index rng-match-state
- (defun . rng-update-match-state)
- (defun . rng-ipattern-defslot)
- (defun . rng-ipattern-get-type)
- (defun . rng-ipattern-set-type)
- (defun . rng-ipattern-get-index)
- (defun . rng-ipattern-set-index)
- (defun . rng-ipattern-get-name-class)
- (defun . rng-ipattern-set-name-class)
- (defun . rng-ipattern-get-datatype)
- (defun . rng-ipattern-set-datatype)
- (defun . rng-ipattern-get-after)
- (defun . rng-ipattern-set-after)
- (defun . rng-ipattern-get-child)
- (defun . rng-ipattern-set-child)
- (defun . rng-ipattern-get-value-object)
- (defun . rng-ipattern-set-value-object)
- (defun . rng-ipattern-get-nullable)
- (defun . rng-ipattern-set-nullable)
- (defun . rng-ipattern-get-memo-text-typed)
- (defun . rng-ipattern-set-memo-text-typed)
- (defun . rng-ipattern-get-memo-map-start-tag-open-deriv)
- (defun . rng-ipattern-set-memo-map-start-tag-open-deriv)
- (defun . rng-ipattern-get-memo-map-start-attribute-deriv)
- (defun . rng-ipattern-set-memo-map-start-attribute-deriv)
- (defun . rng-ipattern-get-memo-start-tag-close-deriv)
- (defun . rng-ipattern-set-memo-start-tag-close-deriv)
- (defun . rng-ipattern-get-memo-text-only-deriv)
- (defun . rng-ipattern-set-memo-text-only-deriv)
- (defun . rng-ipattern-get-memo-mixed-text-deriv)
- (defun . rng-ipattern-set-memo-mixed-text-deriv)
- (defun . rng-ipattern-get-memo-map-data-deriv)
- (defun . rng-ipattern-set-memo-map-data-deriv)
- (defun . rng-ipattern-get-memo-end-tag-deriv)
- (defun . rng-ipattern-set-memo-end-tag-deriv)
- rng-memo-map-alist-max rng-memo-map-alist-max
- (defun . rng-memo-map-get)
- (defun . rng-memo-map-add)
- (defun . rng-make-ipattern)
- (defun . rng-ipattern-maybe-init)
- (defun . rng-ipattern-clear)
- (defun . rng-gen-ipattern-index)
- (defun . rng-put-ipattern)
- (defun . rng-get-ipattern)
- rng-const-ipatterns rng-const-ipatterns
- (defun . rng-intern-after)
- (defun . rng-intern-attribute)
- (defun . rng-intern-data)
- (defun . rng-intern-data-except)
- (defun . rng-intern-value)
- (defun . rng-intern-one-or-more)
- (defun . rng-intern-one-or-more-shortcut)
- (defun . rng-intern-list)
- (defun . rng-intern-group)
- (defun . rng-intern-group-shortcut)
- (defun . rng-normalize-group-list)
- (defun . rng-intern-interleave)
- (defun . rng-normalize-interleave-list)
- (defun . rng-intern-choice)
- (defun . rng-intern-optional)
- (defun . rng-intern-choice1)
- (defun . rng-intern-choice-shortcut)
- (defun . rng-normalize-choice-list)
- (defun . rng-compare-ipattern)
- (defun . rng-name-class-contains)
- (defun . rng-name-class-contains1)
- (defun . rng-name-class-possible-names)
- (defun . rng-ipattern-to-string)
- (defun . rng-name-class-to-string)
- (defun . rng-compile-maybe-init)
- (defun . rng-compile-clear)
- (defun . rng-compile)
- (defun . rng-compile-not-allowed)
- (defun . rng-compile-empty)
- (defun . rng-compile-text)
- (defun . rng-compile-element)
- (defun . rng-element-get-child)
- (defun . rng-compile-attribute)
- (defun . rng-compile-ref)
- (defun . rng-compile-one-or-more)
- (defun . rng-compile-zero-or-more)
- (defun . rng-compile-optional)
- (defun . rng-compile-mixed)
- (defun . rng-compile-list)
- (defun . rng-compile-choice)
- (defun . rng-compile-group)
- (defun . rng-compile-interleave)
- (defun . rng-compile-dt)
- (defun . rng-compile-data)
- (defun . rng-compile-data-except)
- (defun . rng-compile-value)
- (defun . rng-compile-name-class)
- (defun . rng-map-element-attribute)
- (defun . rng-find-element-content-pattern)
- (defun . rng-search-name)
- (defun . rng-find-name-class-uris)
- (defun . rng-accum-namespace-uri)
- (defun . rng-ipattern-text-typed-p)
- (defun . rng-ipattern-compute-text-typed-p)
- (defun . rng-start-tag-open-deriv)
- (defun . rng-ipattern-memo-start-tag-open-deriv)
- (defun . rng-compute-start-tag-open-deriv)
- (defun . rng-start-attribute-deriv)
- (defun . rng-ipattern-memo-start-attribute-deriv)
- (defun . rng-compute-start-attribute-deriv)
- (defun . rng-cons-group-after)
- (defun . rng-subst-group-after)
- (defun . rng-subst-interleave-after)
- (defun . rng-apply-after)
- (defun . rng-start-tag-close-deriv)
- rng-transform-map rng-transform-map
- (defun . rng-compute-start-tag-close-deriv)
- (defun . rng-ignore-attributes-deriv)
- (defun . rng-text-only-deriv)
- (defun . rng-compute-text-only-deriv)
- (defun . rng-mixed-text-deriv)
- (defun . rng-compute-mixed-text-deriv)
- (defun . rng-end-tag-deriv)
- (defun . rng-compute-end-tag-deriv)
- (defun . rng-data-deriv)
- (defun . rng-namespace-context-tracer)
- (defun . rng-namespace-context-get-no-trace)
- rng-memo-data-deriv-max-length
- (defun . rng-ipattern-memo-data-deriv)
- (defun . rng-compute-data-deriv)
- (defun . rng-transform-multi)
- (defun . rng-transform-choice)
- (defun . rng-transform-group)
- (defun . rng-transform-interleave)
- (defun . rng-transform-one-or-more)
- (defun . rng-transform-after-child)
- (defun . rng-transform-interleave-single)
- (defun . rng-transform-group-nullable)
- (defun . rng-transform-group-nullable-gen-choices)
- (defun . rng-members-eq)
- (defun . rng-ipattern-after)
- (defun . rng-unknown-start-tag-open-deriv)
- (defun . rng-ipattern-optionalize-elements)
- (defun . rng-ipattern-empty-before-p)
- (defun . rng-ipattern-possible-start-tags)
- (defun . rng-ipattern-start-tag-possible-p)
- (defun . rng-ipattern-possible-attributes)
- (defun . rng-ipattern-possible-values)
- (defun . rng-ipattern-required-element)
- (defun . rng-ipattern-required-attributes)
- (defun . rng-compile-error)
- (defun . rng-match-state)
- (defun . rng-set-match-state)
- (defun . rng-match-state-equal)
- (defun . rng-schema-changed)
- (defun . rng-match-init-buffer)
- (defun . rng-match-start-document)
- (defun . rng-match-start-tag-open)
- (defun . rng-match-attribute-name)
- (defun . rng-match-attribute-value)
- (defun . rng-match-element-value)
- (defun . rng-match-start-tag-close)
- (defun . rng-match-mixed-text)
- (defun . rng-match-end-tag)
- (defun . rng-match-after)
- (defun . rng-match-out-of-context-start-tag-open)
- (defun . rng-match-possible-namespace-uris)
- (defun . rng-match-unknown-start-tag-open)
- (defun . rng-match-optionalize-elements)
- (defun . rng-match-ignore-attributes)
- (defun . rng-match-text-typed-p)
- (defun . rng-match-empty-content)
- (defun . rng-match-empty-before-p)
- (defun . rng-match-infer-start-tag-namespace)
- (defun . rng-match-nullable-p)
- (defun . rng-match-possible-start-tag-names)
- (defun . rng-match-start-tag-possible-p)
- (defun . rng-match-possible-attribute-names)
- (defun . rng-match-possible-value-strings)
- (defun . rng-match-required-element-name)
- (defun . rng-match-required-attribute-names)
- (defun . rng-match-save)
- (defun . rng-match-with-schema)
- (provide . rng-match))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-dt.elc"
- (require . rng-util)
- rng-dt-error-reporter
- (defun . rng-dt-error)
- rng-dt-namespace-context-getter
- (defun . rng-dt-make-value)
- (defun . rng-dt-builtin-compile)
- (provide . rng-dt))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-util.elc"
- (defun . rng-make-datatypes-uri)
- rng-xsd-datatypes-uri rng-xsd-datatypes-uri rng-builtin-datatypes-uri rng-builtin-datatypes-uri
- (defun . rng-uniquify-eq)
- (defun . rng-uniquify-equal)
- (defun . rng-blank-p)
- (defun . rng-substq)
- (defun . rng-complete-before-point)
- (defun . rng-completion-exact-p)
- (defun . rng-quote-string)
- (defun . rng-escape-string)
- (defun . rng-collapse-space)
- (provide . rng-util))
- ("/usr/share/emacs/23.0.93/lisp/nxml/rng-pttrn.elc" rng-schema-change-hook rng-current-schema
- (defun . rng-make-ref)
- (defun . rng-ref-set)
- (defun . rng-ref-get)
- (defun . rng-make-choice)
- (defun . rng-make-group)
- (defun . rng-make-interleave)
- (defun . rng-make-zero-or-more)
- (defun . rng-make-one-or-more)
- (defun . rng-make-optional)
- (defun . rng-make-mixed)
- (defun . rng-make-value)
- (defun . rng-make-data)
- (defun . rng-make-data-except)
- (defun . rng-make-list)
- (defun . rng-make-element)
- (defun . rng-make-attribute)
- (defun . rng-make-text)
- (defun . rng-make-empty)
- (defun . rng-make-not-allowed)
- (defun . rng-make-any-name-name-class)
- (defun . rng-make-any-name-except-name-class)
- (defun . rng-make-ns-name-name-class)
- (defun . rng-make-ns-name-except-name-class)
- (defun . rng-make-name-name-class)
- (defun . rng-make-choice-name-class)
- rng-any-content rng-any-element
- (defun . rng-make-name)
- (defun . rng-make-datatype)
- (provide . rng-pttrn))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-ns.elc"
- (require . nxml-util)
- nxml-ns-state nxml-ns-initial-state
- (defun . nxml-ns-state)
- (defun . nxml-ns-set-state)
- (defun . nxml-ns-state-equal)
- (defun . nxml-ns-save)
- (defun . nxml-ns-init)
- (defun . nxml-ns-push-state)
- (defun . nxml-ns-pop-state)
- (defun . nxml-ns-get-prefix)
- (defun . nxml-ns-set-prefix)
- (defun . nxml-ns-get-default)
- (defun . nxml-ns-set-default)
- (defun . nxml-ns-get-context)
- (defun . nxml-ns-prefixes-for)
- (defun . nxml-ns-prefix-for)
- (defun . nxml-ns-changed-prefixes)
- (provide . nxml-ns))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-mode.elc"
- (require . xmltok)
- (require . nxml-enc)
- (require . nxml-glyph)
- (require . nxml-util)
- (require . nxml-rap)
- (require . nxml-outln)
- nxml-char-ref-display-glyph-flag nxml-mode-hook nxml-sexp-element-flag nxml-slash-auto-complete-flag nxml-child-indent nxml-attribute-indent nxml-bind-meta-tab-to-complete-flag nxml-prefer-utf-16-to-utf-8-flag nxml-prefer-utf-16-little-to-big-endian-flag nxml-default-buffer-file-coding-system nxml-auto-insert-xml-declaration-flag
- (defface . nxml-delimited-data)
- (defface . nxml-name)
- (defface . nxml-ref)
- (defface . nxml-delimiter)
- (defface . nxml-text)
- (defface . nxml-comment-content)
- (defface . nxml-comment-delimiter)
- (defface . nxml-processing-instruction-delimiter)
- (defface . nxml-processing-instruction-target)
- (defface . nxml-processing-instruction-content)
- (defface . nxml-cdata-section-delimiter)
- (defface . nxml-cdata-section-CDATA)
- (defface . nxml-cdata-section-content)
- (defface . nxml-char-ref-number)
- (defface . nxml-char-ref-delimiter)
- (defface . nxml-entity-ref-name)
- (defface . nxml-entity-ref-delimiter)
- (defface . nxml-tag-delimiter)
- (defface . nxml-tag-slash)
- (defface . nxml-element-prefix)
- (defface . nxml-element-colon)
- (defface . nxml-element-local-name)
- (defface . nxml-attribute-prefix)
- (defface . nxml-attribute-colon)
- (defface . nxml-attribute-local-name)
- (defface . nxml-namespace-attribute-xmlns)
- (defface . nxml-namespace-attribute-colon)
- (defface . nxml-namespace-attribute-prefix)
- (defface . nxml-attribute-value)
- (defface . nxml-attribute-value-delimiter)
- (defface . nxml-namespace-attribute-value)
- (defface . nxml-namespace-attribute-value-delimiter)
- (defface . nxml-prolog-literal-delimiter)
- (defface . nxml-prolog-literal-content)
- (defface . nxml-prolog-keyword)
- (defface . nxml-markup-declaration-delimiter)
- (defface . nxml-hash)
- (defface . nxml-glyph)
- nxml-prolog-regions nxml-last-fontify-end nxml-degraded nxml-completion-hook nxml-in-mixed-content-hook nxml-mixed-scan-distance nxml-end-tag-indent-scan-distance nxml-char-ref-extra-display nxml-mode-map nxml-font-lock-keywords
- (defun . nxml-set-face)
- (t . nxml-mode)
- (defun . nxml-mode)
- (defun . nxml-cleanup)
- (defun . nxml-degrade)
- (defun . nxml-debug-region)
- (defun . nxml-after-change)
- (defun . nxml-after-change1)
- (defun . nxml-insert-xml-declaration)
- (defun . nxml-prepare-to-save)
- (defun . nxml-select-coding-system)
- (defun . nxml-unsuitable-coding-system-message)
- nxml-utf-16-coding-systems nxml-utf-16-coding-systems nxml-utf-coding-systems nxml-utf-coding-systems
- (defun . nxml-coding-system-unicode-p)
- (defun . nxml-coding-system-name)
- (defun . nxml-fix-encoding-declaration)
- (defun . nxml-choose-suitable-coding-system)
- (defun . nxml-choose-utf-coding-system)
- (defun . nxml-choose-utf-16-coding-system)
- (defun . nxml-coding-system-member)
- (defun . nxml-unfontify-region)
- (defun . nxml-extend-region)
- (defun . nxml-extend-after-change-region)
- (defun . nxml-extend-after-change-region1)
- (defun . nxml-fontify-matcher)
- (defun . nxml-fontify-prolog)
- (defun . nxml-apply-fontify-rule)
- (defun . nxml-fontify-attributes)
- (defun . nxml-fontify-attribute)
- (defun . nxml-fontify-qname)
- (defun . nxml-electric-slash)
- (defun . nxml-balanced-close-start-tag-block)
- (defun . nxml-balanced-close-start-tag-inline)
- (defun . nxml-balanced-close-start-tag)
- (defun . nxml-finish-element)
- nxml-last-split-position
- (defun . nxml-split-element)
- (defun . nxml-finish-element-1)
- (defun . nxml-indent-line)
- (defun . nxml-compute-indent)
- (defun . nxml-compute-indent-from-matching-start-tag)
- (defun . nxml-compute-indent-from-previous-line)
- (defun . nxml-merge-indent-context-type)
- (defun . nxml-compute-indent-in-token)
- (defun . nxml-compute-indent-in-start-tag)
- (defun . nxml-attribute-value-boundary)
- (defun . nxml-compute-indent-in-delimited-token)
- (defun . nxml-complete)
- (defun . nxml-forward-balanced-item)
- (defun . nxml-forward-single-balanced-item)
- (defun . nxml-backward-single-balanced-item)
- (defun . nxml-scan-forward-within)
- (defun . nxml-scan-backward-within)
- (defun . nxml-scan-forward-in-attribute-value)
- (defun . nxml-scan-backward-in-attribute-value)
- (defun . nxml-find-following-attribute)
- (defun . nxml-find-preceding-attribute)
- (defun . nxml-up-element)
- (defun . nxml-backward-up-element)
- (defun . nxml-down-element)
- (defun . nxml-backward-down-element)
- (defun . nxml-forward-element)
- (defun . nxml-backward-element)
- (defun . nxml-mark-token-after)
- (defun . nxml-mark-paragraph)
- (defun . nxml-forward-paragraph)
- (defun . nxml-backward-paragraph)
- (defun . nxml-forward-single-paragraph)
- (defun . nxml-backward-single-paragraph)
- (defun . nxml-token-contains-data-p)
- (defun . nxml-paragraph-end-pos)
- (defun . nxml-paragraph-start-pos)
- (defun . nxml-token-ends-line-p)
- (defun . nxml-token-begins-line-p)
- (defun . nxml-in-mixed-content-p)
- (defun . nxml-preceding-sibling-data-p)
- (defun . nxml-following-sibling-data-p)
- (defun . nxml-do-fill-paragraph)
- (defun . nxml-newline-and-indent)
- nxml-dynamic-markup-prev-pos nxml-dynamic-markup-prev-lengths nxml-dynamic-markup-prev-found-marker nxml-dynamic-markup-prev-start-tags
- (defun . nxml-dynamic-markup-word)
- (defun . nxml-try-copy-markup)
- nxml-char-name-ignore-case nxml-char-name-alist nxml-char-name-table nxml-autoload-char-name-set-list
- (defun . nxml-enable-char-name-set)
- (defun . nxml-disable-char-name-set)
- (defun . nxml-char-name-set-enabled-p)
- (defun . nxml-autoload-char-name-set)
- (defun . nxml-define-char-name-set)
- (defun . nxml-get-char-name)
- nxml-named-char-history
- (defun . nxml-insert-named-char)
- (defun . nxml-maybe-load-char-name-set)
- (defun . nxml-toggle-char-ref-extra-display)
- (defun . nxml-char-ref-display-extra)
- (defun . nxml-clear-char-ref-extra-display)
- (defun . nxml-start-delimiter-length)
- (defun . nxml-end-delimiter-length)
- (defun . nxml-token-type-friendly-name)
- (provide . nxml-mode))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-outln.elc"
- (require . xmltok)
- (require . nxml-util)
- (require . nxml-rap)
- nxml-section-element-name-regexp nxml-heading-element-name-regexp nxml-outline-child-indent
- (defface . nxml-heading)
- (defface . nxml-outline-indicator)
- (defface . nxml-outline-active-indicator)
- (defface . nxml-outline-ellipsis)
- nxml-heading-scan-distance nxml-outline-prefix-map
- (defun . nxml-show-all)
- (defun . nxml-hide-all-text-content)
- (defun . nxml-show-direct-text-content)
- (defun . nxml-show-direct-subheadings)
- (defun . nxml-hide-direct-text-content)
- (defun . nxml-hide-subheadings)
- (defun . nxml-show)
- (defun . nxml-hide-text-content)
- (defun . nxml-show-subheadings)
- (defun . nxml-hide-other)
- nxml-outline-state-transform-exceptions nxml-target-section-pos nxml-depth-in-target-section nxml-outline-state-transform-alist
- (defun . nxml-transform-buffer-outline)
- (defun . nxml-transform-subtree-outline)
- (defun . nxml-outline-pre-adjust-point)
- (defun . nxml-outline-adjust-point)
- (defun . nxml-transform-outline-state)
- (defun . nxml-section-tag-transform-outline-state)
- (defun . nxml-get-outline-state)
- (defun . nxml-set-outline-state)
- (defun . nxml-mouse-show-direct-text-content)
- (defun . nxml-mouse-hide-direct-text-content)
- (defun . nxml-mouse-hide-subheadings)
- (defun . nxml-mouse-show-direct-subheadings)
- (defun . nxml-mouse-set-point)
- (defun . nxml-token-start-tag-p)
- (defun . nxml-token-end-tag-p)
- (defun . nxml-refresh-outline)
- nxml-outline-display-section-tag-function
- (defun . nxml-outline-display-rest)
- nxml-highlighted-less-than nxml-highlighted-less-than nxml-highlighted-greater-than nxml-highlighted-greater-than nxml-highlighted-colon nxml-highlighted-colon nxml-highlighted-slash nxml-highlighted-slash nxml-highlighted-ellipsis nxml-highlighted-ellipsis nxml-highlighted-empty-end-tag nxml-highlighted-empty-end-tag nxml-highlighted-inactive-minus nxml-highlighted-inactive-minus nxml-highlighted-active-minus nxml-highlighted-active-minus nxml-highlighted-active-plus nxml-highlighted-active-plus
- (defun . nxml-display-section)
- (defun . nxml-highlighted-qname)
- (defun . nxml-outline-display-single-line-end-tag)
- (defun . nxml-outline-display-multi-line-end-tag)
- nxml-outline-show-map nxml-outline-show-help nxml-outline-hiding-tag-map nxml-outline-hiding-tag-help nxml-outline-showing-tag-map nxml-outline-showing-tag-help
- (defun . nxml-outline-set-overlay)
- (defun . nxml-end-of-heading)
- (defun . nxml-token-starts-line-p)
- nxml-cached-section-tag-regexp nxml-cached-section-element-name-regexp
- (defun . nxml-make-section-tag-regexp)
- (defun . nxml-make-section-tag-regexp-1)
- (defun . nxml-section-tag-forward)
- (defun . nxml-section-tag-backward)
- (defun . nxml-section-start-position)
- (defun . nxml-back-to-section-start)
- (defun . nxml-after-section-start-tag)
- (defun . nxml-heading-start-position)
- (defun . nxml-report-outline-error)
- (defun . nxml-outline-error)
- (defun . nxml-debug-overlays)
- (provide . nxml-outln))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-rap.elc"
- (require . xmltok)
- (require . nxml-util)
- nxml-prolog-end nxml-scan-end
- (defun . nxml-get-inside)
- (defun . nxml-clear-inside)
- (defun . nxml-set-inside)
- (defun . nxml-inside-end)
- (defun . nxml-inside-start)
- (defun . nxml-scan-after-change)
- (defun . nxml-scan-prolog)
- (defun . nxml-adjust-start-for-dependent-regions)
- (defun . nxml-mark-parse-dependent-regions)
- (defun . nxml-mark-parse-dependent-region)
- (defun . nxml-clear-dependent-regions)
- (defun . nxml-token-after)
- (defun . nxml-token-before)
- (defun . nxml-tokenize-forward)
- (defun . nxml-move-tag-backwards)
- (defun . nxml-move-outside-backwards)
- (defun . nxml-ensure-scan-up-to-date)
- (defun . nxml-scan-element-forward)
- (defun . nxml-scan-element-backward)
- (defun . nxml-scan-error)
- (provide . nxml-rap))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-util.elc" nxml-debug
- (defun . nxml-debug)
- (defun . nxml-debug-change)
- (defun . nxml-debug-set-inside)
- (defun . nxml-debug-clear-inside)
- (defun . nxml-make-namespace)
- (defun . nxml-namespace-name)
- nxml-xml-namespace-uri nxml-xml-namespace-uri nxml-xmlns-namespace-uri nxml-xmlns-namespace-uri
- (defun . nxml-with-degradation-on-error)
- (defun . nxml-with-unmodifying-text-property-changes)
- (defun . nxml-with-invisible-motion)
- (defun . nxml-display-file-parse-error)
- (defun . nxml-signal-file-parse-error)
- (provide . nxml-util))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-glyph.elc" nxml-ascii-glyph-set nxml-ascii-glyph-set nxml-latin1-glyph-set nxml-latin1-glyph-set nxml-misc-fixed-1-glyph-set nxml-misc-fixed-2-glyph-set nxml-misc-fixed-3-glyph-set nxml-wgl4-glyph-set nxml-glyph-set-hook nxml-glyph-set
- (defun . nxml-x-set-glyph-set)
- (defun . nxml-w32-set-glyph-set)
- (defun . nxml-window-system-set-glyph-set)
- (defun . nxml-terminal-set-glyph-set)
- (t . nxml-glyph-display-string)
- (defun . nxml-glyph-display-string)
- (defun . nxml-glyph-set-contains-p)
- (provide . nxml-glyph))
- ("/usr/share/emacs/23.0.93/lisp/nxml/nxml-enc.elc" nxml-file-name-ignore-case nxml-cached-file-name-auto-coding-regexp nxml-cached-auto-mode-alist
- (defun . nxml-file-name-auto-coding-regexp)
- nxml-non-xml-set-auto-coding-function
- (defun . nxml-set-auto-coding)
- (defun . nxml-set-xml-coding)
- (defun . nxml-detect-coding-system)
- (defun . nxml-mime-charset-coding-system)
- (defun . nxml-start-auto-coding)
- (defun . nxml-stop-auto-coding)
- (provide . nxml-enc))
- ("/usr/share/emacs/23.0.93/lisp/nxml/xmltok.elc" xmltok-type xmltok-start xmltok-name-colon xmltok-name-end xmltok-replacement xmltok-attributes xmltok-namespace-attributes xmltok-dtd xmltok-dependent-regions xmltok-errors
- (defun . xmltok-save)
- (defun . xmltok-attribute-name-start)
- (defun . xmltok-attribute-name-colon)
- (defun . xmltok-attribute-name-end)
- (defun . xmltok-attribute-value-start)
- (defun . xmltok-attribute-value-end)
- (defun . xmltok-attribute-raw-normalized-value)
- (defun . xmltok-attribute-refs)
- (defun . xmltok-attribute-prefix)
- (defun . xmltok-attribute-local-name)
- (defun . xmltok-attribute-value)
- (defun . xmltok-start-tag-prefix)
- (defun . xmltok-start-tag-local-name)
- (defun . xmltok-end-tag-prefix)
- (defun . xmltok-end-tag-local-name)
- (defun . xmltok-start-tag-qname)
- (defun . xmltok-end-tag-qname)
- (defun . xmltok-make-attribute)
- (defun . xmltok-error-message)
- (defun . xmltok-error-start)
- (defun . xmltok-error-end)
- (defun . xmltok-make-error)
- (defun . xmltok-add-error)
- (defun . xmltok-add-dependent)
- (defun . xmltok-forward)
- (defun . xmltok-forward-special)
- xmltok-ncname-regexp xmltok-ncname-regexp
- (defun . xmltok-scan-after-lt)
- (defun . xmltok-scan-after-processing-instruction-open)
- (defun . xmltok-scan-after-comment-open)
- (defun . xmltok-scan-attributes)
- (defun . xmltok-add-attribute)
- (defun . xmltok-normalize-attribute)
- (defun . xmltok-scan-after-amp)
- xmltok-entity-error-messages xmltok-entity-error-messages
- (defun . xmltok-handle-entity)
- (defun . xmltok-scan-char-ref)
- (defun . xmltok-char-number)
- (defun . xmltok-unclosed-reparse-p)
- (defun . xmltok-semi-closed-reparse-p)
- (defun . xmltok-valid-char-p)
- (defun . xmltok-unicode-to-char)
- xmltok-contains-doctype xmltok-doctype-external-subset-flag xmltok-internal-subset-start xmltok-had-param-entity-ref xmltok-prolog-regions xmltok-standalone xmltok-markup-declaration-doctype-flag xmltok-predefined-entity-alist xmltok-predefined-entity-alist
- (defun . xmltok-forward-prolog)
- xmltok-bad-xml-decl-regexp xmltok-bad-xml-decl-regexp
- (t . xmltok-get-declared-encoding-position)
- (defun . xmltok-get-declared-encoding-position)
- (defun . xmltok-scan-xml-declaration)
- xmltok-markup-declaration-alist xmltok-markup-declaration-alist
- (defun . xmltok-parse-prolog-item)
- (defun . xmltok-parse-doctype)
- (defun . xmltok-parse-attlist-declaration)
- (defun . xmltok-parse-nmtoken-group)
- (defun . xmltok-parse-element-declaration)
- (defun . xmltok-parse-model-group)
- (defun . xmltok-parse-model-group-member)
- (defun . xmltok-parse-entity-declaration)
- (defun . xmltok-define-entity)
- (defun . xmltok-parse-entity-value)
- (defun . xmltok-parse-notation-declaration)
- (defun . xmltok-parse-external-id)
- (defun . xmltok-require-next-token)
- (defun . xmltok-require-token)
- (defun . xmltok-current-token-string)
- (defun . xmltok-markup-declaration-parse-error)
- (defun . xmltok-skip-markup-declaration)
- (defun . xmltok-prolog-region-type)
- (defun . xmltok-next-prolog-token)
- (defun . xmltok-scan-prolog-literal)
- (defun . xmltok-scan-prolog-after-processing-instruction-open)
- (defun . xmltok-parse-entities)
- (defun . xmltok-parse-entity)
- (defun . xmltok-parse-entity-replacement)
- (defun . xmltok-handle-nested-entity)
- (defun . xmltok-append-entity-def)
- (defun . xmltok-add-prolog-region)
- (defun . xmltok-merge-attributes)
- (defun . xmltok-forward-test)
- (defun . xmltok-next-prolog-token-test)
- (provide . xmltok))
- ("/home/hobbes/nxhtml/util/mlinks.el" mlinks:version
- (require . cl)
- (require . ourcomments-util)
- (require . url-parse)
- (require . url-expand)
- (require . appmenu)
- mlinks-mode-functions mlinks-mode-map
- (defun . mlinks-want-marked-links)
- (defun . mlinks-after-change-major-mode)
- mlinks-hilight-this-buffer mlinks-hilight-point-ovl mlinks-hilighter-timer
- (defun . mlinks-toggle-hilight)
- (defun . mlinks-stop-hilighter)
- (defun . mlinks-start-hilighter)
- (defun . mlinks-make-point-ovl)
- (defun . mlinks-link-at-point)
- (defun . mlinks-hilighter)
- mlinks-active-hilight-keymap mlinks-inactive-hilight-keymap
- (defun . mlinks-pre-command)
- (defun . mlinks-activate-hilight)
- (defun . mlinks-deactivate-hilight)
- (defun . mlinks-someactivate-hilight)
- (defun . mlinks-backward-link)
- (defun . mlinks-forward-link)
- (defun . mlinks-goto)
- (defun . mlinks-goto-other-window)
- (defun . mlinks-goto-other-frame)
- (defun . mlinks-goto-1)
- (defun . mlinks-get-boolean)
- (defun . mlinks-get-action)
- (defun . mlinks-prev-saved-position)
- (defun . mlinks-next-saved-position)
- (defun . mlinks-goto-n)
- mlinks-places-n mlinks-places mlinks-temp-buffer-where
- (defun . mlinks-switch-to-buffer)
- (defun . mlinks-switch-to-buffer-1)
- (defun . mlinks-custom)
- (defun . mlinks-appmenu)
- (defun . mlinks-add-appmenu)
- (defun . mlinks-remove-overlays)
- mlinks-mode
- (t . mlinks-mode)
- (defun . mlinks-mode)
- (defun . mlinks-turn-on-in-buffer)
- mlinks-mode-major-mode mlinks-global-mode
- (defun . mlinks-global-mode)
- mlinks-global-mode-buffers
- (defun . mlinks-global-mode-enable-in-buffers)
- (defun . mlinks-global-mode-check-buffers)
- (defun . mlinks-global-mode-cmhh)
- mlinks-active-links
- (defun . mlinks-active-links-toggle)
- (defface . mlinks-link)
- mlinks-link
- (defun . mlinks-mark-link)
- mlinks-mark-links-timer
- (defun . mlinks-mark-next-link)
- mlinks-link-update-pos-min mlinks-link-update-pos-max
- (defun . mlinks-stop-marking-links)
- (defun . mlinks-start-marking-links)
- mlinks-after-change-extra
- (defun . mlinks-after-change)
- (defun . mlinks-html-style-goto)
- (defun . mlinks-html-style-hili)
- (require . rx)
- mlinks-html-link-regex
- (defun . mlinks-html-forward-link)
- (defun . mlinks-html-backward-link)
- (defun . mlinks-html-style-mode-fun)
- (defun . mlink-check-file-to-edit)
- (defun . mlinks-html-edit-at)
- (defun . mlinks-html-mail-to)
- (defun . mlinks-html-href-act-on)
- (defun . mlinks-html-possible-href-actions)
- (defun . mlinks-html-find-base-href)
- (defun . mlinks-elisp-custom-goto)
- (defun . mlinks-custom-next-mark)
- (defun . mlinks-elisp-goto)
- (defun . mlinks-elisp-hili)
- (defun . mlinks-elisp-mode-fun)
- (defun . mlinks-elisp-function)
- (defun . mlinks-elisp-mode-symbol)
- (defun . mlinks-elisp-mode-require)
- (defun . mlinks-hit-test)
- (defun . mlinks-handle-reg-fun-list)
- (provide . mlinks))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/rx.elc" rx-constituents rx-syntax rx-categories rx-greedy-flag
- (defun . rx-info)
- (defun . rx-check)
- (defun . rx-group-if)
- (defun . rx-and)
- (defun . rx-or)
- (defun . rx-anything)
- (defun . rx-any-delete-from-range)
- (defun . rx-any-condense-range)
- (defun . rx-check-any-string)
- (defun . rx-check-any)
- (defun . rx-any)
- (defun . rx-check-not)
- (defun . rx-not)
- (defun . rx-not-char)
- (defun . rx-not-syntax)
- (defun . rx-trans-forms)
- (defun . rx-=)
- (defun . rx->=)
- (defun . rx-**)
- (defun . rx-repeat)
- (defun . rx-submatch)
- (defun . rx-backref)
- (defun . rx-check-backref)
- (defun . rx-kleene)
- (defun . rx-atomic-p)
- (defun . rx-syntax)
- (defun . rx-check-category)
- (defun . rx-category)
- (defun . rx-eval)
- (defun . rx-greedy)
- (defun . rx-regexp)
- (defun . rx-form)
- (t . rx-to-string)
- (defun . rx-to-string)
- (t . rx)
- (defun . rx)
- (provide . rx))
- ("/home/hobbes/nxhtml/util/appmenu.el" appmenu:version
- (require . cl)
- appmenu-show-help appmenu-show-point-menu appmenu-alist
- (defun . appmenu-sort-by-priority)
- (t . appmenu-add)
- (defun . appmenu-add)
- (defun . appmenu-remove)
- (defun . appmenu-help)
- (defun . appmenu-keymap-len)
- appmenu-mouse-only
- (defun . appmenu-make-menu-for-point)
- (defun . appmenu-map)
- (defun . appmenu-popup)
- appmenu-mode-map appmenu-mode
- (defun . appmenu-mode)
- (provide . appmenu))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/flyspell.elc"
- (require . ispell)
- flyspell-highlight-flag flyspell-mark-duplications-flag flyspell-mark-duplications-exceptions flyspell-sort-corrections flyspell-duplicate-distance flyspell-delay flyspell-persistent-highlight flyspell-highlight-properties flyspell-default-delayed-commands flyspell-delayed-commands flyspell-default-deplacement-commands flyspell-deplacement-commands flyspell-issue-welcome-flag flyspell-issue-message-flag flyspell-incorrect-hook flyspell-default-dictionary flyspell-tex-command-regexp flyspell-check-tex-math-command flyspell-dictionaries-that-consider-dash-as-word-delimiter flyspell-abbrev-p flyspell-use-global-abbrev-table-p flyspell-mode-line-string flyspell-large-region flyspell-insert-function flyspell-before-incorrect-word-string flyspell-after-incorrect-word-string flyspell-use-meta-tab flyspell-auto-correct-binding flyspell-generic-check-word-predicate flyspell-generic-check-word-p
- (defun . mail-mode-flyspell-verify)
- (defun . texinfo-mode-flyspell-verify)
- (defun . tex-mode-flyspell-verify)
- (defun . sgml-mode-flyspell-verify)
- flyspell-prog-text-faces
- (defun . flyspell-generic-progmode-verify)
- (t . flyspell-prog-mode)
- (defun . flyspell-prog-mode)
- flyspell-mouse-map flyspell-mode-map flyspell-consider-dash-as-word-delimiter-flag flyspell-dash-dictionary flyspell-dash-local-dictionary
- (defface . flyspell-incorrect)
- (defface . flyspell-duplicate)
- flyspell-overlay flyspell-mode
- (t . flyspell-mode)
- (defun . flyspell-mode)
- (t . turn-on-flyspell)
- (defun . turn-on-flyspell)
- (t . turn-off-flyspell)
- (defun . turn-off-flyspell)
- flyspell-buffers
- (defun . flyspell-minibuffer-p)
- flyspell-last-buffer
- (defun . flyspell-accept-buffer-local-defs)
- (defun . flyspell-hack-local-variables-hook)
- (defun . flyspell-kill-ispell-hook)
- (defun . flyspell-mode-on)
- (defun . flyspell-delay-commands)
- (defun . flyspell-delay-command)
- (defun . flyspell-deplacement-commands)
- (defun . flyspell-deplacement-command)
- flyspell-word-cache-start flyspell-word-cache-end flyspell-word-cache-word flyspell-word-cache-result flyspell-pre-buffer flyspell-pre-point flyspell-pre-column flyspell-pre-pre-buffer flyspell-pre-pre-point flyspell-previous-command
- (defun . flyspell-pre-command-hook)
- (t . flyspell-mode-off)
- (defun . flyspell-mode-off)
- (defun . flyspell-check-pre-word-p)
- flyspell-changes
- (defun . flyspell-after-change-function)
- (defun . flyspell-check-changed-word-p)
- (defun . flyspell-check-word-p)
- (defun . flyspell-debug-signal-no-check)
- (defun . flyspell-debug-signal-pre-word-checked)
- (defun . flyspell-debug-signal-word-checked)
- (defun . flyspell-debug-signal-changed-checked)
- (defun . flyspell-post-command-hook)
- (defun . flyspell-notify-misspell)
- (defun . flyspell-word-search-backward)
- (defun . flyspell-word-search-forward)
- (defun . flyspell-word)
- (defun . flyspell-math-tex-command-p)
- (defun . flyspell-tex-command-p)
- flyspell-casechars-cache flyspell-ispell-casechars-cache
- (defun . flyspell-get-casechars)
- flyspell-not-casechars-cache flyspell-ispell-not-casechars-cache
- (defun . flyspell-get-not-casechars)
- (defun . flyspell-get-word)
- (defun . flyspell-small-region)
- flyspell-external-ispell-process flyspell-external-ispell-buffer flyspell-large-region-buffer flyspell-large-region-beg flyspell-large-region-end
- (defun . flyspell-external-point-words)
- (defun . flyspell-process-localwords)
- (defun . flyspell-check-region-doublons)
- (defun . flyspell-large-region)
- (t . flyspell-region)
- (defun . flyspell-region)
- (t . flyspell-buffer)
- (defun . flyspell-buffer)
- flyspell-old-buffer-error flyspell-old-pos-error
- (defun . flyspell-goto-next-error)
- (defun . flyspell-overlay-p)
- (defun . flyspell-delete-region-overlays)
- (defun . flyspell-delete-all-overlays)
- (defun . flyspell-unhighlight-at)
- (defun . flyspell-properties-at-p)
- (defun . make-flyspell-overlay)
- (defun . flyspell-highlight-incorrect-region)
- (defun . flyspell-highlight-duplicate-region)
- flyspell-auto-correct-pos flyspell-auto-correct-region flyspell-auto-correct-ring flyspell-auto-correct-word
- (defun . flyspell-check-previous-highlighted-word)
- (defun . flyspell-display-next-corrections)
- (defun . flyspell-abbrev-table)
- (defun . flyspell-define-abbrev)
- (defun . flyspell-auto-correct-word)
- flyspell-auto-correct-previous-pos
- (defun . flyspell-auto-correct-previous-hook)
- (defun . flyspell-auto-correct-previous-word)
- (defun . flyspell-correct-word)
- (defun . flyspell-correct-word-before-point)
- (defun . flyspell-do-correct)
- (defun . flyspell-ajust-cursor-point)
- (defun . flyspell-emacs-popup)
- (defun . flyspell-xemacs-popup)
- (defun . flyspell-maybe-correct-transposition)
- (defun . flyspell-maybe-correct-doubling)
- (defun . flyspell-already-abbrevp)
- (defun . flyspell-change-abbrev)
- (provide . flyspell))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/ispell.elc"
- (defun . ispell-check-minver)
- (defun . check-ispell-version)
- ispell-highlight-p ispell-lazy-highlight ispell-highlight-face ispell-check-comments ispell-query-replace-choices ispell-skip-tib ispell-tib-ref-beginning ispell-tib-ref-end ispell-keep-choices-win ispell-choices-win-default-height ispell-program-name ispell-alternate-dictionary ispell-complete-word-dict ispell-message-dictionary-alist ispell-message-fcc-skip ispell-grep-command ispell-grep-options ispell-look-command ispell-look-p ispell-have-new-look ispell-look-options ispell-use-ptys-p ispell-following-word ispell-help-in-bufferp ispell-quietly ispell-format-word-function ispell-format-word ispell-use-framepop-p ispell-personal-dictionary ispell-silently-savep ispell-local-dictionary-overridden ispell-local-dictionary ispell-extra-args ispell-skip-html ispell-local-dictionary-alist ispell-dictionary-base-alist ispell-dictionary-alist ispell-really-aspell ispell-really-hunspell ispell-encoding8-command ispell-aspell-supports-utf8 ispell-required-version ispell-offset ispell-version ispell-version
- (defun . ispell-check-version)
- (defun . ispell-call-process)
- (defun . ispell-call-process-region)
- ispell-menu-map ispell-menu-xemacs ispell-menu-map-needed ispell-library-directory ispell-process ispell-async-processp ispell-aspell-dictionary-alist
- (defun . ispell-find-aspell-dictionaries)
- ispell-aspell-data-dir ispell-aspell-dict-dir
- (defun . ispell-get-aspell-config-value)
- (defun . ispell-aspell-find-dictionary)
- (defun . ispell-aspell-add-aliases)
- ispell-last-program-name ispell-initialize-spellchecker-hook
- (defun . ispell-set-spellchecker-params)
- (defun . ispell-valid-dictionary-list)
- (defun . ispell-int-char)
- ispell-current-dictionary ispell-current-personal-dictionary ispell-dictionary
- (defun . ispell-decode-string)
- (defun . ispell-get-decoded-string)
- (defun . ispell-get-casechars)
- (defun . ispell-get-not-casechars)
- (defun . ispell-get-otherchars)
- (defun . ispell-get-many-otherchars-p)
- (defun . ispell-get-ispell-args)
- (defun . ispell-get-extended-character-mode)
- (defun . ispell-get-coding-system)
- ispell-pdict-modified-p ispell-quit ispell-process-directory ispell-filter ispell-filter-continue ispell-output-buffer ispell-session-buffer ispell-cmd-args ispell-query-replace-marker ispell-recursive-edit-marker ispell-checking-message ispell-choices-buffer ispell-choices-buffer ispell-overlay ispell-words-keyword ispell-dictionary-keyword ispell-pdict-keyword ispell-parsing-keyword ispell-skip-region-alist ispell-tex-skip-alists ispell-html-skip-alists ispell-local-pdict ispell-buffer-local-name ispell-parser ispell-region-end ispell-check-only
- (defun . ispell-accept-output)
- (defun . ispell-send-replacement)
- (defun . ispell-send-string)
- (defun . ispell-insert-word)
- (t . ispell-word)
- (defun . ispell-word)
- (defun . ispell-get-word)
- (t . ispell-pdict-save)
- (defun . ispell-pdict-save)
- (defun . ispell-command-loop)
- (defun . ispell-show-choices)
- (t . ispell-help)
- (defun . ispell-help)
- (defun . lookup-words)
- (defun . ispell-filter)
- (defun . ispell-highlight-spelling-error-generic)
- (defun . ispell-highlight-spelling-error-xemacs)
- (defun . ispell-highlight-spelling-error-overlay)
- (defun . ispell-highlight-spelling-error)
- (defun . ispell-adjusted-window-height)
- (defun . ispell-overlay-window)
- (defun . ispell-parse-output)
- (defun . ispell-process-status)
- (defun . ispell-start-process)
- (defun . ispell-init-process)
- (t . ispell-kill-ispell)
- (defun . ispell-kill-ispell)
- (t . ispell-change-dictionary)
- (defun . ispell-change-dictionary)
- (defun . ispell-internal-change-dictionary)
- (t . ispell-region)
- (defun . ispell-region)
- (defun . ispell-begin-skip-region-regexp)
- (defun . ispell-begin-skip-region)
- (defun . ispell-begin-tex-skip-regexp)
- (defun . ispell-skip-region-list)
- (defun . ispell-tex-arg-end)
- (defun . ispell-ignore-fcc)
- (defun . ispell-skip-region)
- (defun . ispell-get-line)
- (defun . ispell-looking-at)
- (defun . ispell-process-line)
- (t . ispell-comments-and-strings)
- (defun . ispell-comments-and-strings)
- (t . ispell-buffer)
- (defun . ispell-buffer)
- (t . ispell-continue)
- (defun . ispell-continue)
- (defun . ispell-horiz-scroll)
- (t . ispell-complete-word)
- (defun . ispell-complete-word)
- (t . ispell-complete-word-interior-frag)
- (defun . ispell-complete-word-interior-frag)
- (t . ispell)
- (defun . ispell)
- ispell-minor-mode ispell-minor-keymap
- (t . ispell-minor-mode)
- (defun . ispell-minor-mode)
- (defun . ispell-minor-check)
- ispell-message-text-end
- (defun . ispell-mime-multipartp)
- (defun . ispell-mime-skip-part)
- (t . ispell-message)
- (defun . ispell-message)
- (defun . ispell-non-empty-string)
- (defun . ispell-accept-buffer-local-defs)
- (defun . ispell-buffer-local-parsing)
- (defun . ispell-buffer-local-dict)
- (defun . ispell-buffer-local-words)
- (defun . ispell-add-per-file-word-list)
- (provide . ispell))
- ("/home/hobbes/nxhtml/nxhtml/html-site.el" html-site:version
- (require . ourcomments-util)
- (require . cl)
- (require . dired)
- (require . ffip)
- (require . grep)
- (defun . html-site-looks-like-local-url)
- (require . url-parse)
- (require . url-http)
- (defun . html-site-dir-contains)
- (defun . html-site-lwarn)
- (defun . html-site-chk-wtocdir)
- (t . html-site-buffer-or-dired-file-name)
- (defun . html-site-buffer-or-dired-file-name)
- (t . html-site-set-site)
- (defun . html-site-set-site)
- (t . html-site-dired-current)
- (defun . html-site-dired-current)
- (t . html-site-find-file)
- (defun . html-site-find-file)
- (t . html-site-rgrep)
- (defun . html-site-rgrep)
- (t . html-site-query-replace)
- (defun . html-site-query-replace)
- (defun . html-site-ensure-site-defined)
- (defun . html-site-current-ensure-site-defined)
- (defun . html-site-remote-contains)
- (defun . html-site-current-remote-contains)
- (defun . html-site-ensure-file-in-site)
- (defun . html-site-current-ensure-file-in-site)
- (defun . html-site-ensure-buffer-in-site)
- (defun . html-site-current-ensure-buffer-in-site)
- (defun . html-site-site-dir)
- (defun . html-site-current-site-dir)
- (defun . html-site-contains)
- (defun . html-site-current-contains)
- (defun . html-site-page-list)
- (defun . html-site-current-page-list)
- (defun . html-site-frames-file)
- (defun . html-site-current-frames-file)
- (defun . html-site-toc-file)
- (defun . html-site-current-toc-file)
- (defun . html-site-merge-dir)
- (defun . html-site-current-merge-dir)
- (defun . html-site-merge-template)
- (defun . html-site-current-merge-template)
- (defun . html-site-extra-fun)
- (defun . html-site-current-extra-fun)
- (defun . html-site-ftp-host)
- (defun . html-site-current-ftp-host)
- (defun . html-site-ftp-user)
- (defun . html-site-current-ftp-user)
- (defun . html-site-ftp-password)
- (defun . html-site-current-ftp-password)
- (defun . html-site-ftp-dir)
- (defun . html-site-current-ftp-dir)
- (defun . html-site-ftp-wtoc-dir)
- (defun . html-site-current-ftp-wtoc-dir)
- (defun . html-site-web-host)
- (defun . html-site-current-web-host)
- (defun . html-site-web-dir)
- (defun . html-site-current-web-dir)
- (defun . html-site-web-wtoc-dir)
- (defun . html-site-current-web-wtoc-dir)
- (defun . html-site-web-full)
- (defun . html-site-current-web-full)
- html-site-ftp-temporary-passwords
- (defun . html-site-get-ftp-pw)
- (defun . html-site-path-in-mirror)
- (defun . html-site-local-to-web)
- (defun . html-site-current-local-to-web)
- (defun . html-site-remote-root)
- (defun . html-site-current-remote-root)
- (defun . html-site-local-to-remote)
- (defun . html-site-current-local-to-remote)
- (defun . html-site-remote-to-local)
- (defun . html-site-current-remote-to-local)
- html-site-files-re
- (defun . html-site-edit-pages-file)
- (defun . html-site-get-sub-files)
- (defun . html-site-file-is-local)
- html-site-list html-site-current noshell-procbuf-name noshell-proc-name
- (defun . noshell-procbuf-setup)
- (defun . noshell-procbuf-teardown)
- (defun . noshell-procbuf-run)
- (defun . noshell-sentinel)
- (defun . noshell-procbuf-syncrun)
- noshell-process-mode-map noshell-process-mode-syntax-table noshell-process-mode-abbrev-table noshell-process-mode-abbrev-table
- (defun . noshell-process-mode)
- (defun . noshell-quit)
- (defun . noshell-kill-subprocess)
- (provide . html-site)
- (require . html-upl)
- html-site-mode-menu-map html-site-mode-map html-site-mode
- (defun . html-site-mode)
- html-site-mode-off-list html-site-mode-major-mode html-site-global-mode
- (defun . html-site-global-mode)
- html-site-global-mode-buffers
- (defun . html-site-global-mode-enable-in-buffers)
- (defun . html-site-global-mode-check-buffers)
- (defun . html-site-global-mode-cmhh))
- ("/home/hobbes/nxhtml/nxhtml/html-upl.el" html-upl:version
- (require . html-site)
- html-upl-dir
- (defun . html-upl-browse-remote)
- (defun . html-upl-browse-remote-with-toc)
- (defun . html-upl-browse-remote-frames)
- (defun . html-upl-upload-site-with-toc)
- (defun . html-upl-upload-site)
- (defun . html-upl-upload-site1)
- (defun . html-upl-ensure-site-has-host)
- (defun . html-upl-remote-dired)
- (defun . html-upl-upload-file)
- (defun . html-upl-edit-remote-file)
- (defun . html-upl-edit-remote-file-with-toc)
- (defun . html-upl-edit-remote-file1)
- (defun . html-upl-ediff-file)
- (provide . html-upl))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/derived.elc"
- (defun . derived-mode-hook-name)
- (defun . derived-mode-map-name)
- (defun . derived-mode-syntax-table-name)
- (defun . derived-mode-abbrev-table-name)
- (t . define-derived-mode)
- (defun . define-derived-mode)
- (defun . derived-mode-class)
- (defun . derived-mode-make-docstring)
- (defun . derived-mode-setup-function-name)
- (t . derived-mode-init-mode-variables)
- (defun . derived-mode-init-mode-variables)
- (defun . derived-mode-set-keymap)
- (defun . derived-mode-set-syntax-table)
- (defun . derived-mode-set-abbrev-table)
- (defun . derived-mode-run-hooks)
- (defun . derived-mode-merge-keymaps)
- (defun . derived-mode-merge-syntax-tables)
- (defun . derived-mode-merge-abbrev-tables)
- (provide . derived))
- ("/usr/share/emacs/23.0.93/lisp/url/url-http.elc"
- (require . url-gw)
- (require . url-util)
- (require . url-parse)
- (require . url-cookie)
- (require . mail-parse)
- (require . url-auth)
- (require . url)
- (autoload . url-cache-create-filename)
- url-http-default-port url-http-asynchronous-p
- (defun . url-http-expand-file-name)
- url-http-real-basic-auth-storage url-http-proxy-basic-auth-storage url-http-open-connections url-http-version url-http-attempt-keepalives
- (defun . url-http-debug)
- (defun . url-http-mark-connection-as-busy)
- (defun . url-http-mark-connection-as-free)
- (defun . url-http-find-free-connection)
- (defun . url-http-user-agent-string)
- (defun . url-http-create-request)
- (defun . url-http-clean-headers)
- (defun . url-http-handle-authentication)
- (defun . url-http-parse-response)
- (defun . url-http-handle-cookies)
- (defun . url-http-parse-headers)
- (defun . url-http-activate-callback)
- (defun . url-http-idle-sentinel)
- (defun . url-http-end-of-document-sentinel)
- (defun . url-http-simple-after-change-function)
- (defun . url-http-content-length-after-change-function)
- (defun . url-http-chunked-encoding-after-change-function)
- (defun . url-http-wait-for-headers-change-function)
- (t . url-http)
- (defun . url-http)
- (defun . url-http-async-sentinel)
- (defun . url-http-generic-filter)
- (defun . url-http-symbol-value-in-buffer)
- (defun . url-http-head)
- (t . url-http-file-exists-p)
- (defun . url-http-file-exists-p)
- (defun . url-http-file-readable-p)
- (defun . url-http-head-file-attributes)
- (t . url-http-file-attributes)
- (defun . url-http-file-attributes)
- (t . url-http-options)
- (defun . url-http-options)
- (require . tls)
- url-https-default-port url-https-asynchronous-p
- (defun . url-https-expand-file-name)
- (defun . url-https-create-secure-wrapper)
- (t . url-https)
- (defun . url-https)
- (t . url-https-file-exists-p)
- (defun . url-https-file-exists-p)
- (t . url-https-file-readable-p)
- (defun . url-https-file-readable-p)
- (t . url-https-file-attributes)
- (defun . url-https-file-attributes)
- (provide . url-http))
- ("/usr/share/emacs/23.0.93/lisp/net/tls.elc"
- (autoload . format-spec)
- (autoload . format-spec-make)
- tls-end-of-info tls-program tls-process-connection-type tls-success tls-checktrust tls-untrusted tls-hostmismatch tls-certtool-program
- (defun . tls-certificate-information)
- (t . open-tls-stream)
- (defun . open-tls-stream)
- (provide . tls))
- ("/usr/share/emacs/23.0.93/lisp/url/url.elc"
- (require . mailcap)
- (require . url-vars)
- (require . url-cookie)
- (require . url-history)
- (require . url-expand)
- (require . url-privacy)
- (require . url-methods)
- (require . url-proxy)
- (require . url-parse)
- (require . url-util)
- url-configuration-directory
- (t . url-do-setup)
- (defun . url-do-setup)
- url-redirect-buffer
- (t . url-retrieve)
- (defun . url-retrieve)
- (defun . url-retrieve-internal)
- (t . url-retrieve-synchronously)
- (defun . url-retrieve-synchronously)
- (defun . url-mm-callback)
- (defun . url-mm-url)
- url-dead-buffer-list
- (defun . url-mark-buffer-as-dead)
- (defun . url-gc-dead-buffers)
- (t . url-warn)
- (defun . url-warn)
- (provide . url))
- ("/usr/share/emacs/23.0.93/lisp/url/url-proxy.elc"
- (require . url-parse)
- (autoload . url-warn)
- (defun . url-default-find-proxy-for-url)
- url-proxy-locator
- (defun . url-find-proxy-for-url)
- (defun . url-proxy)
- (provide . url-proxy))
- ("/usr/share/emacs/23.0.93/lisp/url/url-privacy.elc"
- (require . url-vars)
- (defun . url-device-type)
- (t . url-setup-privacy-info)
- (defun . url-setup-privacy-info)
- (provide . url-privacy))
- ("/usr/share/emacs/23.0.93/lisp/url/url-expand.elc"
- (require . url-methods)
- (require . url-util)
- (require . url-parse)
- (defun . url-expander-remove-relative-links)
- (defun . url-expand-file-name)
- (defun . url-identity-expander)
- (t . url-default-expander)
- (defun . url-default-expander)
- (provide . url-expand))
- ("/usr/share/emacs/23.0.93/lisp/url/url-history.elc"
- (require . url-parse)
- (autoload . url-do-setup)
- url-history-track url-history-file url-history-save-interval url-history-timer url-history-changed-since-last-save url-history-hash-table
- (defun . url-history-setup-save-timer)
- (defun . url-history-parse-history)
- (defun . url-history-update-url)
- (defun . url-history-save-history)
- (defun . url-have-visited-url)
- (defun . url-completion-function)
- (provide . url-history))
- ("/usr/share/emacs/23.0.93/lisp/gnus/mailcap.elc"
- (defun . mailcap-delete-duplicates)
- (defun . mailcap-replace-in-string)
- mailcap-parse-args-syntax-table mailcap-print-command mailcap-mime-data mailcap-download-directory mailcap-poor-system-types
- (defun . mailcap-save-binary-file)
- mailcap-maybe-eval-warning
- (defun . mailcap-maybe-eval)
- (defun . mailcap-replace-regexp)
- mailcap-parsed-p
- (defun . mailcap-parse-mailcaps)
- (defun . mailcap-parse-mailcap)
- (defun . mailcap-parse-mailcap-extras)
- (defun . mailcap-mailcap-entry-passes-test)
- (defun . mailcap-possible-viewers)
- (defun . mailcap-unescape-mime-test)
- mailcap-viewer-test-cache
- (defun . mailcap-viewer-passes-test)
- (defun . mailcap-add-mailcap-entry)
- (defun . mailcap-add)
- (defun . mailcap-viewer-lessp)
- (defun . mailcap-mime-info)
- mailcap-mime-extensions mailcap-mimetypes-parsed-p
- (defun . mailcap-parse-mimetypes)
- (defun . mailcap-parse-mimetype-file)
- (defun . mailcap-extension-to-mime)
- (defun . mailcap-command-p)
- (defun . mailcap-mime-types)
- (defun . mailcap-file-default-commands)
- (provide . mailcap))
- ("/usr/share/emacs/23.0.93/lisp/url/url-auth.elc"
- (require . url-vars)
- (require . url-parse)
- (autoload . url-warn)
- (autoload . auth-source-user-or-password)
- (defun . url-auth-user-prompt)
- url-basic-auth-storage
- (defun . url-basic-auth)
- url-digest-auth-storage
- (defun . url-digest-auth-create-key)
- (defun . url-digest-auth)
- url-registered-auth-schemes
- (t . url-get-authentication)
- (defun . url-get-authentication)
- (t . url-register-auth-scheme)
- (defun . url-register-auth-scheme)
- (defun . url-auth-registered)
- (provide . url-auth))
- ("/usr/share/emacs/23.0.93/lisp/gnus/mail-parse.elc"
- (require . mail-prsvr)
- (require . ietf-drums)
- (require . rfc2231)
- (require . rfc2047)
- (require . rfc2045)
- (defun . mail-header-parse-content-type)
- (defun . mail-header-parse-content-disposition)
- (defun . mail-content-type-get)
- (defun . mail-header-encode-parameter)
- (t . mail-header-remove-comments)
- (defun . mail-header-remove-comments)
- (t . mail-header-remove-whitespace)
- (defun . mail-header-remove-whitespace)
- (defun . mail-header-strip)
- (defun . mail-header-get-comment)
- (defun . mail-header-parse-address)
- (defun . mail-header-parse-addresses)
- (defun . mail-header-parse-date)
- (defun . mail-narrow-to-head)
- (defun . mail-quote-string)
- (defun . mail-header-make-address)
- (defun . mail-header-fold-field)
- (defun . mail-header-unfold-field)
- (defun . mail-header-narrow-to-field)
- (defun . mail-header-field-value)
- (defun . mail-encode-encoded-word-region)
- (defun . mail-encode-encoded-word-buffer)
- (defun . mail-encode-encoded-word-string)
- (defun . mail-decode-encoded-word-region)
- (defun . mail-decode-encoded-word-string)
- (defun . mail-decode-encoded-address-region)
- (defun . mail-decode-encoded-address-string)
- (provide . mail-parse))
- ("/usr/share/emacs/23.0.93/lisp/gnus/rfc2231.elc"
- (require . ietf-drums)
- (require . rfc2047)
- (autoload . mm-encode-body)
- (autoload . mail-header-remove-whitespace)
- (autoload . mail-header-remove-comments)
- (defun . rfc2231-get-value)
- (defun . rfc2231-parse-qp-string)
- (defun . rfc2231-parse-string)
- (defun . rfc2231-decode-encoded-string)
- (defun . rfc2231-encode-string)
- (provide . rfc2231))
- ("/usr/share/emacs/23.0.93/lisp/gnus/rfc2047.elc"
- (require . qp)
- (require . mm-util)
- (require . ietf-drums)
- (require . mail-prsvr)
- (require . rfc2045)
- (autoload . mm-body-7-or-8)
- rfc2047-header-encoding-alist rfc2047-charset-encoding-alist rfc2047-encode-function-alist rfc2047-encode-encoded-words rfc2047-allow-irregular-q-encoded-words rfc2047-encoded-word-regexp rfc2047-encoded-word-regexp-loose
- (defun . rfc2047-qp-or-base64)
- (defun . rfc2047-narrow-to-field)
- (defun . rfc2047-field-value)
- (defun . rfc2047-quote-special-characters-in-quoted-strings)
- rfc2047-encoding-type
- (defun . rfc2047-encode-message-header)
- (defun . rfc2047-encodable-p)
- rfc2047-syntax-table rfc2047-syntax-table
- (defun . rfc2047-encode-region)
- (defun . rfc2047-encode-string)
- rfc2047-encode-max-chars
- (defun . rfc2047-encode-1)
- (defun . rfc2047-encode)
- (defun . rfc2047-fold-field)
- (defun . rfc2047-fold-region)
- (defun . rfc2047-unfold-field)
- (defun . rfc2047-unfold-region)
- (defun . rfc2047-b-encode-string)
- (defun . rfc2047-q-encode-string)
- (defun . rfc2047-encode-parameter)
- rfc2047-quote-decoded-words-containing-tspecials rfc2047-allow-incomplete-encoded-text
- (defun . rfc2047-strip-backslashes-in-quoted-strings)
- (defun . rfc2047-charset-to-coding-system)
- (defun . rfc2047-decode-encoded-words)
- (defun . rfc2047-decode-region)
- (defun . rfc2047-decode-address-region)
- (defun . rfc2047-decode-string)
- (defun . rfc2047-decode-address-string)
- (defun . rfc2047-pad-base64)
- (provide . rfc2047))
- ("/usr/share/emacs/23.0.93/lisp/gnus/rfc2045.elc"
- (require . ietf-drums)
- (defun . rfc2045-encode-string)
- (provide . rfc2045))
- ("/usr/share/emacs/23.0.93/lisp/gnus/qp.elc"
- (require . mm-util)
- (t . quoted-printable-decode-region)
- (defun . quoted-printable-decode-region)
- (defun . quoted-printable-decode-string)
- (defun . quoted-printable-encode-region)
- (defun . quoted-printable-encode-string)
- (provide . qp))
- ("/usr/share/emacs/23.0.93/lisp/gnus/ietf-drums.elc"
- (require . time-date)
- (require . mm-util)
- ietf-drums-no-ws-ctl-token ietf-drums-text-token ietf-drums-specials-token ietf-drums-quote-token ietf-drums-wsp-token ietf-drums-fws-regexp ietf-drums-atext-token ietf-drums-dot-atext-token ietf-drums-qtext-token ietf-drums-tspecials ietf-drums-syntax-table
- (defun . ietf-drums-token-to-list)
- (defun . ietf-drums-init)
- (defun . ietf-drums-remove-comments)
- (defun . ietf-drums-remove-whitespace)
- (defun . ietf-drums-get-comment)
- (defun . ietf-drums-strip)
- (defun . ietf-drums-parse-address)
- (defun . ietf-drums-parse-addresses)
- (defun . ietf-drums-unfold-fws)
- (defun . ietf-drums-parse-date)
- (defun . ietf-drums-narrow-to-header)
- (defun . ietf-drums-quote-string)
- (defun . ietf-drums-make-address)
- (provide . ietf-drums))
- ("/usr/share/emacs/23.0.93/lisp/calendar/time-date.elc"
- (defun . with-decoded-time-value)
- (defun . encode-time-value)
- (autoload . parse-time-string)
- (t . date-to-time)
- (defun . date-to-time)
- (t . time-to-seconds)
- (defun . time-to-seconds)
- (t . seconds-to-time)
- (defun . seconds-to-time)
- (t . time-less-p)
- (defun . time-less-p)
- (t . days-to-time)
- (defun . days-to-time)
- (t . time-since)
- (defun . time-since)
- (defun . subtract-time)
- (t . time-subtract)
- (defun . time-subtract)
- (t . time-add)
- (defun . time-add)
- (t . date-to-day)
- (defun . date-to-day)
- (t . days-between)
- (defun . days-between)
- (t . date-leap-year-p)
- (defun . date-leap-year-p)
- (t . time-to-day-in-year)
- (defun . time-to-day-in-year)
- (t . time-to-days)
- (defun . time-to-days)
- (defun . time-to-number-of-days)
- (t . safe-date-to-time)
- (defun . safe-date-to-time)
- (t . format-seconds)
- (defun . format-seconds)
- (provide . time-date))
- ("/usr/share/emacs/23.0.93/lisp/url/url-cookie.elc"
- (require . timezone)
- (require . url-util)
- (require . url-parse)
- (defun . url-cookie-tag)
- (defun . url-cookie-name)
- (defun . url-cookie-value)
- (defun . url-cookie-expires)
- (defun . url-cookie-localpart)
- (defun . url-cookie-domain)
- (defun . url-cookie-secure)
- (defun . url-cookie-create)
- url-cookie-storage url-cookie-secure-storage url-cookie-file url-cookie-confirmation url-cookie-multiple-line url-cookies-changed-since-last-save
- (defun . url-cookie-parse-file)
- (defun . url-cookie-clean-up)
- (defun . url-cookie-write-file)
- (defun . url-cookie-store)
- (defun . url-cookie-expired-p)
- (defun . url-cookie-retrieve)
- (defun . url-cookie-generate-header-lines)
- url-cookie-two-dot-domains url-cookie-trusted-urls url-cookie-untrusted-urls
- (defun . url-cookie-host-can-set-p)
- (defun . url-cookie-handle-set-cookie)
- url-cookie-timer url-cookie-save-interval
- (defun . url-cookie-setup-save-timer)
- (provide . url-cookie))
- ("/usr/share/emacs/23.0.93/lisp/timezone.elc" timezone-world-timezones timezone-months-assoc
- (t . timezone-make-date-arpa-standard)
- (defun . timezone-make-date-arpa-standard)
- (defun . timezone-make-date-sortable)
- (defun . timezone-make-arpa-date)
- (defun . timezone-make-sortable-date)
- (defun . timezone-make-time-string)
- (t . timezone-parse-date)
- (defun . timezone-parse-date)
- (defun . timezone-parse-time)
- (defun . timezone-zone-to-minute)
- (defun . timezone-time-from-absolute)
- (defun . timezone-time-zone-from-absolute)
- (defun . timezone-fix-time)
- (defun . timezone-last-day-of-month)
- (defun . timezone-leap-year-p)
- (defun . timezone-day-number)
- (defun . timezone-absolute-from-gregorian)
- (provide . timezone))
- ("/usr/share/emacs/23.0.93/lisp/url/url-util.elc"
- (require . url-parse)
- (autoload . timezone-parse-date)
- (autoload . timezone-make-date-arpa-standard)
- (autoload . mail-header-extract)
- url-parse-args-syntax-table url-debug
- (t . url-debug)
- (defun . url-debug)
- (t . url-parse-args)
- (defun . url-parse-args)
- (t . url-insert-entities-in-string)
- (defun . url-insert-entities-in-string)
- (t . url-normalize-url)
- (defun . url-normalize-url)
- (t . url-lazy-message)
- (defun . url-lazy-message)
- (t . url-get-normalized-date)
- (defun . url-get-normalized-date)
- (t . url-eat-trailing-space)
- (defun . url-eat-trailing-space)
- (t . url-strip-leading-spaces)
- (defun . url-strip-leading-spaces)
- (t . url-pretty-length)
- (defun . url-pretty-length)
- (t . url-display-percentage)
- (defun . url-display-percentage)
- (t . url-percentage)
- (defun . url-percentage)
- (defun . url-basepath)
- (t . url-file-directory)
- (defun . url-file-directory)
- (t . url-file-nondirectory)
- (defun . url-file-nondirectory)
- (t . url-parse-query-string)
- (defun . url-parse-query-string)
- (defun . url-unhex)
- (t . url-unhex-string)
- (defun . url-unhex-string)
- url-unreserved-chars
- (t . url-hexify-string)
- (defun . url-hexify-string)
- (t . url-file-extension)
- (defun . url-file-extension)
- (t . url-truncate-url-for-viewing)
- (defun . url-truncate-url-for-viewing)
- (t . url-view-url)
- (defun . url-view-url)
- url-get-url-filename-chars
- (defun . url-get-url-at-point)
- (defun . url-generate-unique-filename)
- (defun . url-extract-mime-headers)
- (defun . url-make-private-file)
- (provide . url-util))
- ("/usr/share/emacs/23.0.93/lisp/url/url-gw.elc"
- (require . url-vars)
- (autoload . socks-open-network-stream)
- (autoload . open-ssl-stream)
- (autoload . open-tls-stream)
- url-gateway-local-host-regexp url-gateway-prompt-pattern url-gateway-rlogin-host url-gateway-rlogin-user-name url-gateway-rlogin-parameters url-gateway-telnet-host url-gateway-telnet-parameters url-gateway-telnet-login-prompt url-gateway-telnet-password-prompt url-gateway-telnet-user-name url-gateway-telnet-password url-gateway-broken-resolution url-gateway-nslookup-program
- (t . url-gateway-nslookup-host)
- (defun . url-gateway-nslookup-host)
- (defun . url-wait-for-string)
- (defun . url-open-rlogin)
- (defun . url-open-telnet)
- (t . url-open-stream)
- (defun . url-open-stream)
- (provide . url-gw))
- ("/usr/share/emacs/23.0.93/lisp/url/url-methods.elc"
- (require . url-parse)
- url-scheme-registry url-scheme-methods url-scheme-default-properties url-scheme-default-properties
- (defun . url-scheme-default-loader)
- (defun . url-scheme-register-proxy)
- (t . url-scheme-get-property)
- (defun . url-scheme-get-property)
- (provide . url-methods))
- ("/usr/share/emacs/23.0.93/lisp/url/url-parse.elc"
- (require . url-vars)
- (autoload . url-scheme-get-property)
- (defun . url-type)
- (defun . url-user)
- (defun . url-password)
- (defun . url-host)
- (defun . url-portspec)
- (defun . url-filename)
- (defun . url-target)
- (defun . url-attributes)
- (defun . url-fullness)
- (defun . url-p)
- (defun . url-parse-make-urlobj)
- (defun . url-port)
- (t . url-recreate-url)
- (defun . url-recreate-url)
- (defun . url-recreate-url-attributes)
- (t . url-generic-parse-url)
- (defun . url-generic-parse-url)
- (provide . url-parse))
- ("/usr/share/emacs/23.0.93/lisp/url/url-vars.elc"
- (require . mm-util)
- url-version url-current-object url-current-mime-headers url-honor-refresh-requests url-automatic-caching url-cache-expired url-bug-address url-personal-mail-address url-directory-index-file url-privacy-level url-inhibit-uncompression url-uncompressor-alist url-mail-command url-proxy-services url-standalone-mode url-mime-separator-chars url-bad-port-list url-mime-content-type-charset-regexp url-request-data url-request-extra-headers url-request-method url-mime-encoding-string
- (defun . url-mime-charset-string)
- url-mime-charset-string
- (defun . url-set-mime-charset-string)
- url-mime-language-string url-mime-accept-string url-package-version url-package-name url-system-type url-os-type url-max-password-attempts url-temporary-directory url-show-status url-using-proxy url-news-server url-nonrelative-link url-max-redirections url-confirmation-func url-gateway-method url-setup-done url-weekday-alist url-weekday-alist url-monthabbrev-alist url-monthabbrev-alist url-lazy-message-time url-extensions-header url-parse-syntax-table url-load-hook url-working-buffer url-working-buffer url-gateway-unplugged
- (provide . url-vars))
- ("/usr/share/emacs/23.0.93/lisp/gnus/mm-util.elc"
- (require . mail-prsvr)
- (require . timer)
- (defun . mm-coding-system-list)
- (defun . mm-char-int)
- (defun . mm-coding-system-equal)
- (defun . mm-annotationp)
- (defun . mm-set-buffer-file-coding-system)
- (defun . mm-read-charset)
- (defun . mm-subst-char-in-string)
- (defun . mm-replace-in-string)
- (defun . mm-string-as-unibyte)
- (defun . mm-string-make-unibyte)
- (defun . mm-string-as-multibyte)
- (defun . mm-multibyte-string-p)
- (defun . mm-insert-byte)
- (defun . mm-multibyte-char-to-unibyte)
- (defun . mm-set-buffer-multibyte)
- (defun . mm-special-display-p)
- (defun . mm-substring-no-properties)
- (defun . mm-line-number-at-pos)
- (defun . mm-decode-coding-string)
- (defun . mm-encode-coding-string)
- (defun . mm-decode-coding-region)
- (defun . mm-encode-coding-region)
- (defun . mm-string-to-multibyte)
- (defun . mm-char-or-char-int-p)
- (defun . mm-ucs-to-char)
- (defun . mm-read-coding-system)
- mm-coding-system-list
- (defun . mm-get-coding-system-list)
- (defun . mm-coding-system-p)
- (defun . mm-codepage-setup)
- mm-charset-synonym-alist mm-codepage-iso-8859-list mm-codepage-ibm-list
- (defun . mm-setup-codepage-iso-8859)
- (defun . mm-setup-codepage-ibm)
- mm-charset-eval-alist
- (defun . mm-charset-to-coding-system)
- mm-charset-override-alist mm-binary-coding-system mm-text-coding-system mm-text-coding-system-for-write mm-auto-save-coding-system mm-universal-coding-system mm-mime-mule-charset-alist
- (defun . mm-enrich-utf-8-by-mule-ucs)
- mm-hack-charsets mm-iso-8859-15-compatible mm-iso-8859-x-to-15-table mm-coding-system-priorities mm-use-find-coding-systems-region
- (defun . mm-mule-charset-to-mime-charset)
- mm-emacs-mule
- (defun . mm-enable-multibyte)
- (defun . mm-disable-multibyte)
- (defun . mm-preferred-coding-system)
- (defun . mm-guess-charset)
- (defun . mm-charset-after)
- (defun . mm-mime-charset)
- (defun . mm-delete-duplicates)
- (defun . mm-multibyte-p)
- (defun . mm-default-multibyte-p)
- (defun . mm-iso-8859-x-to-15-region)
- (defun . mm-sort-coding-systems-predicate)
- (defun . mm-xemacs-find-mime-charset-1)
- (defun . mm-xemacs-find-mime-charset)
- (defun . mm-find-mime-charset-region)
- (defun . mm-with-unibyte-buffer)
- (defun . mm-with-multibyte-buffer)
- (defun . mm-with-unibyte-current-buffer)
- (defun . mm-find-charset-region)
- (defun . mm-auto-mode-alist)
- mm-inhibit-file-name-handlers
- (defun . mm-insert-file-contents)
- (defun . mm-append-to-file)
- (defun . mm-write-region)
- (autoload . gmm-write-region)
- (defun . mm-make-temp-file)
- (defun . mm-image-load-path)
- (defun . mm-detect-coding-region)
- (defun . mm-detect-mime-charset-region)
- (defun . mm-coding-system-to-mime-charset)
- (defun . mm-decompress-buffer)
- (defun . mm-find-buffer-file-coding-system)
- (provide . mm-util))
- ("/usr/share/emacs/23.0.93/lisp/gnus/mail-prsvr.elc" mail-parse-charset mail-parse-mule-charset mail-parse-ignored-charsets
- (provide . mail-prsvr))
- ("/home/hobbes/nxhtml/util/ffip.el"
- (require . cl)
- ffip-project-name ffip-project-roots ffip-project-type ffip-project-file-types ffip-project-file-matcher ffip-project-files-table
- (defun . ffip-reset-project)
- (defun . ffip-is-current)
- (defun . ffip-set-current-project)
- (defun . ffip-cache-project-files)
- (defun . ffip-file-matcher)
- (defun . ffip-project-files)
- (defun . ffip-project-root)
- (defun . ffip-populate-files-table)
- (defun . ffip-get-unique-directory-names)
- (defun . ffip-file-is-in-project)
- (defun . ffip-add-file-if-in-project)
- (defun . ffip-after-save)
- (defun . ffip-find-file-in-dirtree)
- (defun . ffip-find-file-in-project)
- (provide . ffip))
- ("/home/hobbes/nxhtml/util/ourcomments-util.el" ourcomments-util:version
- (require . apropos)
- (require . cl)
- (require . grep)
- (require . ido)
- (require . recentf)
- (defun . point-to-coord)
- (t . popup-menu-at-point)
- (defun . popup-menu-at-point)
- (t . define-toggle)
- (defun . define-toggle)
- (t . unfill-paragraph)
- (defun . unfill-paragraph)
- (t . unfill-region)
- (defun . unfill-region)
- (t . unfill-individual-paragraphs)
- (defun . unfill-individual-paragraphs)
- (defun . with-unfilling)
- (t . major-or-multi-majorp)
- (defun . major-or-multi-majorp)
- (t . multi-major-modep)
- (defun . multi-major-modep)
- (t . major-modep)
- (defun . major-modep)
- (t . ourcomments-move-beginning-of-line)
- (defun . ourcomments-move-beginning-of-line)
- (t . ourcomments-move-end-of-line)
- (defun . ourcomments-move-end-of-line)
- (defun . ourcomments-find-keymap-variables)
- (defun . key-bindings)
- (defun . describe-keymap-placement)
- (t . describe-key-and-map-briefly)
- (defun . describe-key-and-map-briefly)
- wrap-to-fill-left-marg wrap-to-fill-left-marg-use wrap-to-fill-left-marg-modes
- (defun . wrap-to-fill-set-prefix)
- (defun . wrap-to-fill-after-change)
- (defun . wrap-to-fill-scroll-fun)
- (defun . wrap-to-fill-wider)
- (defun . wrap-to-fill-narrower)
- wrap-to-fill-column-mode-map wrap-to-fill-column-mode
- (t . wrap-to-fill-column-mode)
- (defun . wrap-to-fill-column-mode)
- (defun . wrap-to-fill-set-values)
- (defun . wrap-to-fill-set-values-1)
- better-bottom-angles-defaults
- (defun . better-fringes-bottom-angles)
- (defun . better-fringes-faces)
- (defface . better-fringes-bitmap)
- (defface . better-fringes-important-bitmap)
- better-fringes-mode
- (t . better-fringes-mode)
- (defun . better-fringes-mode)
- (t . find-emacs-other-file)
- (defun . find-emacs-other-file)
- (t . ourcomments-ediff-files)
- (defun . ourcomments-ediff-files)
- (defun . ourcomments-latest-changelog)
- (defun . ourcomments-read-symbol)
- (defun . ourcomments-command-at-point)
- (t . describe-command)
- (defun . describe-command)
- (defun . buffer-narrowed-p)
- describe-symbol-alist
- (defun . describe-symbol-add-known)
- (defun . property-list-keys)
- (defun . ourcomments-symbol-type)
- (defun . ourcomments-defstruct-p)
- (defun . ourcomments-defstruct-slots)
- (defun . ourcomments-defstruct-file)
- (defun . ourcomments-member-defstruct)
- (defun . ourcomments-custom-group-p)
- (t . describe-custom-group)
- (defun . describe-custom-group)
- (t . describe-defstruct)
- (defun . describe-defstruct)
- (t . describe-symbol)
- (defun . describe-symbol)
- (defun . ourcomments-format-plist)
- ourcomments-ido-visit-method
- (t . ourcomments-ido-buffer-other-window)
- (defun . ourcomments-ido-buffer-other-window)
- (t . ourcomments-ido-buffer-other-frame)
- (defun . ourcomments-ido-buffer-other-frame)
- (t . ourcomments-ido-buffer-raise-frame)
- (defun . ourcomments-ido-buffer-raise-frame)
- (defun . ourcomments-ido-mode-advice)
- ourcomments-ido-adviced ourcomments-ido-old-state
- (defun . ourcomments-ido-ctrl-tab-activate)
- ourcomments-ido-ctrl-tab
- (defun . ourcomments-find-emacs)
- (t . emacs)
- (defun . emacs)
- (t . emacs-buffer-file)
- (defun . emacs-buffer-file)
- (t . emacs--debug-init)
- (defun . emacs--debug-init)
- (t . emacs-Q)
- (defun . emacs-Q)
- (t . emacs-Q-nxhtml)
- (defun . emacs-Q-nxhtml)
- (defun . grep-get-buffer-files)
- grep-query-replace-defaults
- (t . grep-query-replace)
- (defun . grep-query-replace)
- (defun . ldir-query-replace)
- (defun . rdir-query-replace)
- (defun . rdir-get-files)
- (defun . dir-replace-read-parameters)
- replace-read-files-history
- (defun . replace-read-files)
- (t . info-open-file)
- (defun . info-open-file)
- (provide . ourcomments-util))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/advice.elc"
- (provide . advice-preload)
- (require . advice-preload)
- ad-version ad-version ad-redefinition-action ad-default-compilation-action
- (defun . ad-substitute-tree)
- (defun . ad-copy-tree)
- (defun . ad-dolist)
- (defun . ad-do-return)
- (defun . ad-save-real-definition)
- (defun . ad-save-real-definitions)
- ad-advised-functions
- (defun . ad-pushnew-advised-function)
- (defun . ad-pop-advised-function)
- (defun . ad-do-advised-functions)
- (defun . ad-get-advice-info)
- (defun . ad-get-advice-info-macro)
- (defun . ad-set-advice-info)
- (defun . ad-copy-advice-info)
- (defun . ad-is-advised)
- (defun . ad-initialize-advice-info)
- (defun . ad-get-advice-info-field)
- (defun . ad-set-advice-info-field)
- (defun . ad-is-active)
- (defun . ad-make-advice)
- (defun . ad-advice-name)
- (defun . ad-advice-protected)
- (defun . ad-advice-enabled)
- (defun . ad-advice-definition)
- (defun . ad-advice-set-enabled)
- (defun . ad-class-p)
- (defun . ad-name-p)
- (defun . ad-position-p)
- ad-advice-classes
- (defun . ad-has-enabled-advice)
- (defun . ad-has-redefining-advice)
- (defun . ad-has-any-advice)
- (defun . ad-get-enabled-advices)
- (defun . ad-activate-internal)
- (defun . ad-activate-internal-off)
- ad-activate-on-top-level
- (defun . ad-with-auto-activation-disabled)
- (defun . ad-safe-fset)
- (defun . ad-make-origname)
- (defun . ad-get-orig-definition)
- (defun . ad-set-orig-definition)
- (defun . ad-clear-orig-definition)
- (defun . ad-read-advised-function)
- ad-advice-class-completion-table
- (defun . ad-read-advice-class)
- (defun . ad-read-advice-name)
- (defun . ad-read-advice-specification)
- ad-last-regexp
- (defun . ad-read-regexp)
- (defun . ad-find-advice)
- (defun . ad-advice-position)
- (defun . ad-find-some-advice)
- (defun . ad-enable-advice-internal)
- (t . ad-enable-advice)
- (defun . ad-enable-advice)
- (t . ad-disable-advice)
- (defun . ad-disable-advice)
- (defun . ad-enable-regexp-internal)
- (defun . ad-enable-regexp)
- (defun . ad-disable-regexp)
- (defun . ad-remove-advice)
- (t . ad-add-advice)
- (defun . ad-add-advice)
- (defun . ad-macrofy)
- (defun . ad-lambdafy)
- (defun . ad-special-form-p)
- (defun . ad-subr-p)
- (defun . ad-macro-p)
- (defun . ad-lambda-p)
- (defun . ad-advice-p)
- (defun . ad-compiled-p)
- (defun . ad-compiled-code)
- (defun . ad-lambda-expression)
- (defun . ad-arglist)
- (defun . ad-define-subr-args)
- (defun . ad-undefine-subr-args)
- (defun . ad-subr-args-defined-p)
- (defun . ad-get-subr-args)
- (defun . ad-subr-arglist)
- (defun . ad-docstring)
- (defun . ad-interactive-form)
- (defun . ad-body-forms)
- (defun . ad-make-advised-definition-docstring)
- (defun . ad-advised-definition-p)
- (defun . ad-definition-type)
- (defun . ad-has-proper-definition)
- (defun . ad-real-definition)
- (defun . ad-real-orig-definition)
- (defun . ad-is-compilable)
- (defun . ad-compile-function)
- (defun . ad-prognify)
- (defun . ad-parse-arglist)
- (defun . ad-retrieve-args-form)
- (defun . ad-arg-binding-field)
- (defun . ad-list-access)
- (defun . ad-element-access)
- (defun . ad-access-argument)
- (defun . ad-get-argument)
- (defun . ad-set-argument)
- (defun . ad-get-arguments)
- (defun . ad-set-arguments)
- (defun . ad-insert-argument-access-forms)
- (defun . ad-map-arglists)
- (defun . ad-make-mapped-call)
- (defun . ad-make-single-advice-docstring)
- (require . help-fns)
- (defun . ad-make-advised-docstring)
- (defun . ad-make-plain-docstring)
- (defun . ad-make-freeze-docstring)
- (defun . ad-advised-arglist)
- (defun . ad-advised-interactive-form)
- (defun . ad-make-advised-definition)
- (defun . ad-assemble-advised-definition)
- (defun . ad-make-hook-form)
- (defun . ad-get-cache-definition)
- (defun . ad-get-cache-id)
- (defun . ad-set-cache)
- (defun . ad-clear-cache)
- (defun . ad-make-cache-id)
- (defun . ad-get-cache-class-id)
- (defun . ad-verify-cache-class-id)
- (defun . ad-cache-id-verification-code)
- (defun . ad-verify-cache-id)
- (defun . ad-preactivate-advice)
- (defun . ad-make-freeze-definition)
- (defun . ad-should-compile)
- (defun . ad-activate-advised-definition)
- (defun . ad-handle-definition)
- (t . ad-activate)
- (defun . ad-activate)
- (defun . ad-activate-on)
- (defun . ad-deactivate)
- (defun . ad-update)
- (defun . ad-unadvise)
- (defun . ad-recover)
- (defun . ad-activate-regexp)
- (defun . ad-deactivate-regexp)
- (defun . ad-update-regexp)
- (defun . ad-activate-all)
- (defun . ad-deactivate-all)
- (defun . ad-update-all)
- (defun . ad-unadvise-all)
- (defun . ad-recover-all)
- ad-defadvice-flags
- (t . defadvice)
- (defun . defadvice)
- (defun . ad-with-originals)
- (defun . ad-start-advice)
- (defun . ad-stop-advice)
- (defun . ad-recover-normality)
- (provide . advice))
- ("/usr/share/emacs/23.0.93/lisp/help-fns.elc"
- (require . help-mode)
- (t . describe-function)
- (defun . describe-function)
- (defun . help-split-fundoc)
- (defun . help-add-fundoc-usage)
- (defun . help-function-arglist)
- (defun . help-make-usage)
- (t . help-C-file-name)
- (defun . help-C-file-name)
- (defface . help-argument-name)
- (defun . help-default-arg-highlight)
- (defun . help-do-arg-highlight)
- (defun . help-highlight-arguments)
- (t . find-lisp-object-file-name)
- (defun . find-lisp-object-file-name)
- (t . describe-function-1)
- (defun . describe-function-1)
- (t . variable-at-point)
- (defun . variable-at-point)
- (defun . describe-variable-custom-version-info)
- (t . describe-variable)
- (defun . describe-variable)
- (t . describe-syntax)
- (defun . describe-syntax)
- (defun . help-describe-category-set)
- (t . describe-categories)
- (defun . describe-categories)
- (provide . help-fns))
- ("/usr/share/emacs/23.0.93/lisp/help-mode.elc"
- (require . button)
- (require . view)
- help-mode-map help-mode-menu
- (defun . help-mode-menu)
- help-xref-stack help-xref-forward-stack help-xref-stack-item help-xref-stack-forward-item help-mode-hook
- (defun . help-button-action)
- (t . help-mode)
- (defun . help-mode)
- (t . help-mode-setup)
- (defun . help-mode-setup)
- (t . help-mode-finish)
- (defun . help-mode-finish)
- help-back-label help-forward-label help-xref-symbol-regexp help-xref-mule-regexp help-xref-info-regexp help-xref-url-regexp
- (t . help-setup-xref)
- (defun . help-setup-xref)
- help-xref-following
- (t . help-buffer)
- (defun . help-buffer)
- help-xref-override-view-map
- (t . help-make-xrefs)
- (defun . help-make-xrefs)
- (t . help-xref-button)
- (defun . help-xref-button)
- (t . help-insert-xref-button)
- (defun . help-insert-xref-button)
- (t . help-xref-on-pp)
- (defun . help-xref-on-pp)
- (defun . help-xref-interned)
- (defun . help-xref-go-back)
- (defun . help-xref-go-forward)
- (defun . help-go-back)
- (defun . help-go-forward)
- (defun . help-do-xref)
- (defun . help-follow-mouse)
- (defun . help-follow)
- (defun . help-follow-symbol)
- (defun . help-insert-string)
- (provide . help-mode))
- ("/usr/share/emacs/23.0.93/lisp/view.elc" view-highlight-face view-scroll-auto-exit view-try-extend-at-buffer-end view-remove-frame-by-deleting view-exits-all-viewing-windows view-inhibit-help-message view-mode view-mode-hook view-old-buffer-read-only view-page-size view-half-page-size view-last-regexp view-return-to-alist view-exit-action view-no-disable-on-exit view-overlay view-mode-map
- (t . kill-buffer-if-not-modified)
- (defun . kill-buffer-if-not-modified)
- (t . view-file)
- (defun . view-file)
- (t . view-file-other-window)
- (defun . view-file-other-window)
- (t . view-file-other-frame)
- (defun . view-file-other-frame)
- (t . view-buffer)
- (defun . view-buffer)
- (t . view-buffer-other-window)
- (defun . view-buffer-other-window)
- (t . view-buffer-other-frame)
- (defun . view-buffer-other-frame)
- (t . view-mode)
- (defun . view-mode)
- (defun . view-mode-enable)
- (defun . view-mode-disable)
- (t . view-return-to-alist-update)
- (defun . view-return-to-alist-update)
- (t . view-mode-enter)
- (defun . view-mode-enter)
- (defun . view-mode-exit)
- (defun . View-exit)
- (t . View-exit-and-edit)
- (defun . View-exit-and-edit)
- (defun . View-leave)
- (defun . View-quit)
- (defun . View-quit-all)
- (defun . View-kill-and-leave)
- (defun . view-window-size)
- (defun . view-recenter)
- (defun . view-page-size-default)
- (defun . view-set-half-page-size-default)
- (defun . View-goto-percent)
- (defun . View-goto-line)
- (defun . View-back-to-mark)
- (defun . view-scroll-lines)
- (defun . view-really-at-end)
- (defun . view-end-message)
- (defun . View-scroll-to-buffer-end)
- (defun . View-scroll-page-forward)
- (defun . View-scroll-page-backward)
- (defun . View-scroll-page-forward-set-page-size)
- (defun . View-scroll-page-backward-set-page-size)
- (defun . View-scroll-line-forward)
- (defun . View-scroll-line-backward)
- (defun . View-scroll-half-page-forward)
- (defun . View-scroll-half-page-backward)
- (defun . View-revert-buffer-scroll-page-forward)
- (defun . View-search-regexp-forward)
- (defun . View-search-regexp-backward)
- (defun . View-search-last-regexp-forward)
- (defun . View-search-last-regexp-backward)
- (defun . view-search)
- (defun . view-search-no-match-lines)
- (provide . view))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/easy-mmode.elc"
- (defun . easy-mmode-pretty-mode-name)
- (defun . easy-mmode-define-minor-mode)
- (t . define-minor-mode)
- (defun . define-minor-mode)
- (defun . easy-mmode-define-global-mode)
- (defun . define-global-minor-mode)
- (t . define-globalized-minor-mode)
- (defun . define-globalized-minor-mode)
- (defun . easy-mmode-set-keymap-parents)
- (t . easy-mmode-define-keymap)
- (defun . easy-mmode-define-keymap)
- (t . easy-mmode-defmap)
- (defun . easy-mmode-defmap)
- (defun . easy-mmode-define-syntax)
- (t . easy-mmode-defsyntax)
- (defun . easy-mmode-defsyntax)
- (defun . easy-mmode-define-navigation)
- (provide . easy-mmode))
- ("/usr/share/emacs/23.0.93/lisp/recentf.elc"
- (require . easymenu)
- (require . tree-widget)
- (require . timer)
- recentf-list
- (defun . recentf-enabled-p)
- recentf-max-saved-items recentf-save-file recentf-save-file-modes recentf-exclude
- (defun . recentf-keep-default-predicate)
- recentf-keep
- (defun . recentf-menu-customization-changed)
- recentf-menu-title recentf-menu-path recentf-menu-before recentf-menu-action recentf-max-menu-items recentf-menu-filter recentf-menu-open-all-flag recentf-menu-append-commands-p recentf-menu-append-commands-flag recentf-auto-cleanup recentf-initialize-file-name-history recentf-load-hook recentf-filename-handlers recentf-show-file-shortcuts-flag recentf-case-fold-search
- (defun . recentf-string-equal)
- (defun . recentf-string-lessp)
- (defun . recentf-string-member)
- (defun . recentf-trunc-list)
- (defun . recentf-dump-variable)
- recentf-auto-cleanup-timer
- (defun . recentf-auto-cleanup)
- (defun . recentf-push)
- (defun . recentf-apply-filename-handlers)
- (defun . recentf-expand-file-name)
- (defun . recentf-include-p)
- (defun . recentf-keep-p)
- (defun . recentf-add-file)
- (defun . recentf-remove-if-non-kept)
- (defun . recentf-directory-compare)
- (defun . recentf-digit-shortcut-command-name)
- (defun . recentf-open-most-recent-file-0)
- (defun . recentf-open-most-recent-file-9)
- (defun . recentf-open-most-recent-file-8)
- (defun . recentf-open-most-recent-file-7)
- (defun . recentf-open-most-recent-file-6)
- (defun . recentf-open-most-recent-file-5)
- (defun . recentf-open-most-recent-file-4)
- (defun . recentf-open-most-recent-file-3)
- (defun . recentf-open-most-recent-file-2)
- (defun . recentf-open-most-recent-file-1)
- recentf--shortcuts-keymap recentf-menu-items-for-commands recentf-menu-filter-commands
- (defun . recentf-elements)
- (defun . recentf-make-menu-element)
- (defun . recentf-menu-element-item)
- (defun . recentf-menu-element-value)
- (defun . recentf-set-menu-element-item)
- (defun . recentf-set-menu-element-value)
- (defun . recentf-sub-menu-element-p)
- (defun . recentf-make-default-menu-element)
- (defun . recentf-menu-elements)
- (defun . recentf-apply-menu-filter)
- (defun . recentf-make-menu-items)
- (defun . recentf-menu-value-shortcut)
- (defun . recentf-make-menu-item)
- (defun . recentf-menu-bar)
- (defun . recentf-show-menu)
- (defun . recentf-hide-menu)
- (defun . recentf-sort-ascending)
- (defun . recentf-sort-descending)
- (defun . recentf-sort-basenames-ascending)
- (defun . recentf-sort-basenames-descending)
- (defun . recentf-sort-directories-ascending)
- (defun . recentf-sort-directories-descending)
- (defun . recentf-show-basenames)
- (defun . recentf-show-basenames-ascending)
- (defun . recentf-show-basenames-descending)
- (defun . recentf-relative-filter)
- recentf-arrange-rules recentf-arrange-by-rule-others recentf-arrange-by-rules-min-items recentf-arrange-by-rule-subfilter
- (defun . recentf-match-rule)
- (defun . recentf-arrange-by-rule)
- (defun . recentf-indirect-mode-rule)
- (defun . recentf-build-mode-rules)
- (defun . recentf-arrange-by-mode)
- (defun . recentf-file-name-nondir)
- (defun . recentf-dir-rule)
- (defun . recentf-arrange-by-dir)
- recentf-filter-changer-current recentf-filter-changer-alist
- (defun . recentf-filter-changer-select)
- (defun . recentf-filter-changer)
- (defun . recentf-track-opened-file)
- (defun . recentf-track-closed-file)
- recentf-used-hooks
- (defun . recentf-cancel-dialog)
- (defun . recentf-dialog-goto-first)
- recentf-dialog-mode-map recentf-dialog-mode-map
- (defun . recentf-dialog-mode)
- (defun . recentf-dialog)
- recentf-edit-list
- (defun . recentf-edit-list-select)
- (defun . recentf-edit-list-validate)
- (defun . recentf-edit-list)
- (defun . recentf-open-files-action)
- recentf--files-with-key
- (defun . recentf-show-digit-shortcut-filter)
- (defun . recentf-open-files-item)
- (defun . recentf-open-files-items)
- (defun . recentf-open-files)
- (defun . recentf-open-more-files)
- (defun . recentf-open-most-recent-file)
- recentf-save-file-header recentf-save-file-coding-system
- (defun . recentf-save-list)
- (defun . recentf-load-list)
- (defun . recentf-cleanup)
- recentf-mode-map recentf-mode
- (t . recentf-mode)
- (defun . recentf-mode)
- (provide . recentf))
- ("/usr/share/emacs/23.0.93/lisp/tree-widget.elc"
- (require . wid-edit)
- tree-widget-image-enable tree-widget-themes-load-path tree-widget-themes-directory tree-widget-theme tree-widget-image-properties-emacs tree-widget-image-properties-xemacs tree-widget-space-width
- (defun . tree-widget-use-image-p)
- (defun . tree-widget-create-image)
- (defun . tree-widget-image-formats)
- tree-widget--theme
- (defun . tree-widget-theme-name)
- (defun . tree-widget-set-parent-theme)
- (defun . tree-widget-set-theme)
- (defun . tree-widget--locate-sub-directory)
- (defun . tree-widget-themes-path)
- tree-widget--cursors tree-widget--cursors
- (defun . tree-widget-set-image-properties)
- (defun . tree-widget-image-properties)
- (defun . tree-widget-lookup-image)
- (defun . tree-widget-find-image)
- (defun . tree-widget-button-click)
- tree-widget-button-keymap
- (defun . tree-widget-p)
- (defun . tree-widget-node)
- (defun . tree-widget-keep)
- (defun . tree-widget-children-value-save)
- tree-widget-before-create-icon-functions
- (defun . tree-widget-icon-create)
- (defun . tree-widget-convert-widget)
- (defun . tree-widget-value-create)
- (defun . tree-widget-leaf-node-icon-p)
- (defun . tree-widget-icon-action)
- (defun . tree-widget-icon-help-echo)
- tree-widget-after-toggle-functions
- (defun . tree-widget-action)
- (defun . tree-widget-help-echo)
- (defun . tree-widget-expander-p)
- (provide . tree-widget))
- ("/usr/share/emacs/23.0.93/lisp/ido.elc"
- (defun . ido-fractionp)
- ido-mode ido-everywhere ido-case-fold ido-ignore-buffers ido-ignore-files ido-ignore-extensions ido-show-dot-for-dired ido-file-extensions-order ido-ignore-directories ido-ignore-directories-merge ido-default-file-method ido-default-buffer-method ido-enable-flex-matching ido-enable-regexp ido-enable-prefix ido-enable-dot-prefix ido-confirm-unique-completion ido-cannot-complete-command ido-record-commands ido-max-prospects ido-max-file-prompt-width ido-max-window-height ido-enable-last-directory-history ido-max-work-directory-list ido-work-directory-list-ignore-regexps ido-use-filename-at-point ido-use-url-at-point ido-enable-tramp-completion ido-record-ftp-work-directories ido-merge-ftp-work-directories ido-cache-ftp-work-directory-time ido-slow-ftp-hosts ido-slow-ftp-host-regexps ido-unc-hosts-cache ido-unc-hosts ido-downcase-unc-hosts ido-ignore-unc-host-regexps ido-cache-unc-host-shares-time ido-max-work-file-list ido-work-directory-match-only ido-auto-merge-work-directories-length ido-auto-merge-delay-time ido-auto-merge-inhibit-characters-regexp ido-merged-indicator ido-max-dir-file-cache ido-max-directory-size ido-rotate-file-list-default ido-enter-matching-directory ido-create-new-buffer ido-setup-hook ido-separator ido-decorations ido-use-faces
- (defface . ido-first-match)
- (defface . ido-only-match)
- (defface . ido-subdir)
- (defface . ido-indicator)
- (defface . ido-incomplete-regexp)
- ido-make-file-list-hook ido-make-dir-list-hook ido-make-buffer-list-hook ido-rewrite-file-prompt-functions ido-rewrite-file-prompt-rules ido-completion-buffer ido-completion-buffer-all-completions ido-all-frames ido-minibuffer-setup-hook ido-save-directory-list-file ido-read-file-name-as-directory-commands ido-read-file-name-non-ido ido-before-fallback-functions ido-completion-map ido-common-completion-map ido-file-completion-map ido-file-dir-completion-map ido-buffer-completion-map ido-file-history ido-buffer-history ido-last-directory-list ido-work-directory-list ido-work-file-list ido-dir-file-cache ido-ignore-item-temp-list ido-eoinput ido-common-match-string ido-rescan ido-rotate ido-text ido-text-init ido-input-stack ido-matches ido-report-no-match ido-exit ido-current-directory ido-auto-merge-timer ido-use-mycompletion-depth ido-incomplete-regexp ido-initial-position
- (defun . ido-active)
- ido-trace-enable
- (defun . ido-trace)
- (defun . ido-toggle-trace)
- (defun . ido-local-file-exists-p)
- (defun . ido-unc-hosts)
- (defun . ido-unc-hosts-net-view)
- (defun . ido-is-tramp-root)
- (defun . ido-is-unc-root)
- (defun . ido-is-unc-host)
- (defun . ido-is-root-directory)
- (defun . ido-is-ftp-directory)
- (defun . ido-is-slow-ftp-host)
- (defun . ido-time-stamp)
- (defun . ido-cache-ftp-valid)
- (defun . ido-cache-unc-valid)
- (defun . ido-may-cache-directory)
- (defun . ido-pp)
- (defun . ido-save-history)
- (defun . ido-load-history)
- (defun . ido-wash-history)
- (defun . ido-kill-emacs-hook)
- ido-minor-mode-map-entry
- (t . ido-mode)
- (defun . ido-mode)
- (defun . ido-everywhere)
- (defun . ido-init-completion-maps)
- (defun . ido-setup-completion-map)
- (defun . ido-final-slash)
- (defun . ido-no-final-slash)
- (defun . ido-nonreadable-directory-p)
- (defun . ido-directory-too-big-p)
- (defun . ido-set-current-directory)
- (defun . ido-set-current-home)
- (defun . ido-record-command)
- (defun . ido-make-prompt)
- (defun . ido-read-internal)
- (defun . ido-edit-input)
- (defun . ido-buffer-internal)
- (defun . ido-record-work-directory)
- (defun . ido-forget-work-directory)
- (defun . ido-record-work-file)
- (defun . ido-expand-directory)
- (defun . ido-file-internal)
- (defun . ido-existing-item-p)
- (defun . ido-set-common-completion)
- (defun . ido-complete)
- (defun . ido-complete-space)
- (defun . ido-undo-merge-work-directory)
- (defun . ido-magic-forward-char)
- (defun . ido-magic-backward-char)
- (defun . ido-magic-delete-char)
- (defun . ido-toggle-case)
- (defun . ido-toggle-regexp)
- (defun . ido-toggle-prefix)
- (defun . ido-toggle-ignore)
- (defun . ido-toggle-vc)
- (defun . ido-toggle-literal)
- (defun . ido-reread-directory)
- (defun . ido-exit-minibuffer)
- (defun . ido-select-text)
- (defun . ido-fallback-command)
- (defun . ido-enter-find-file)
- (defun . ido-enter-switch-buffer)
- (defun . ido-enter-dired)
- (defun . ido-enter-insert-buffer)
- (defun . ido-enter-insert-file)
- (defun . ido-up-directory)
- (defun . ido-delete-backward-updir)
- (defun . ido-delete-backward-word-updir)
- (defun . ido-get-work-directory)
- (defun . ido-prev-work-directory)
- (defun . ido-next-work-directory)
- (defun . ido-merge-work-directories)
- (defun . ido-wide-find-file)
- (defun . ido-wide-find-dir)
- (defun . ido-wide-find-dir-or-delete-dir)
- (defun . ido-take-first-match)
- (defun . ido-push-dir)
- (defun . ido-push-dir-first)
- (defun . ido-pop-dir)
- (defun . ido-wide-find-file-or-pop-dir)
- (defun . ido-make-directory)
- (defun . ido-get-work-file)
- (defun . ido-prev-work-file)
- (defun . ido-next-work-file)
- (defun . ido-copy-current-file-name)
- (defun . ido-copy-current-word)
- (defun . ido-next-match)
- (defun . ido-prev-match)
- (defun . ido-next-match-dir)
- (defun . ido-prev-match-dir)
- (defun . ido-restrict-to-matches)
- (defun . ido-chop)
- (defun . ido-name)
- (defun . ido-all-completions)
- (defun . ido-file-lessp)
- (defun . ido-file-extension-lessp)
- (defun . ido-file-extension-aux)
- (defun . ido-file-extension-order)
- (defun . ido-sort-merged-list)
- (defun . ido-wide-find-dirs-or-files)
- (defun . ido-flatten-merged-list)
- (defun . ido-make-merged-file-list-1)
- (defun . ido-make-merged-file-list)
- (defun . ido-make-buffer-list-1)
- (defun . ido-make-buffer-list)
- (defun . ido-make-choice-list)
- (defun . ido-to-end)
- (defun . ido-file-name-all-completions-1)
- (defun . ido-file-name-all-completions)
- (defun . ido-remove-cached-dir)
- (defun . ido-make-file-list-1)
- (defun . ido-make-file-list)
- (defun . ido-make-dir-list-1)
- (defun . ido-make-dir-list)
- (defun . ido-get-buffers-in-frames)
- (defun . ido-get-bufname)
- (defun . ido-set-matches-1)
- (defun . ido-set-matches)
- (defun . ido-ignore-item-p)
- (defun . ido-find-common-substring)
- (defun . ido-word-matching-substring)
- (defun . ido-makealist)
- (defun . ido-choose-completion-string)
- (defun . ido-completion-help)
- (defun . ido-kill-buffer-at-head)
- (defun . ido-delete-file-at-head)
- (defun . ido-visit-buffer)
- (defun . ido-buffer-window-other-frame)
- (t . ido-switch-buffer)
- (defun . ido-switch-buffer)
- (t . ido-switch-buffer-other-window)
- (defun . ido-switch-buffer-other-window)
- (t . ido-display-buffer)
- (defun . ido-display-buffer)
- (t . ido-kill-buffer)
- (defun . ido-kill-buffer)
- (t . ido-insert-buffer)
- (defun . ido-insert-buffer)
- (t . ido-switch-buffer-other-frame)
- (defun . ido-switch-buffer-other-frame)
- (t . ido-find-file-in-dir)
- (defun . ido-find-file-in-dir)
- (t . ido-find-file)
- (defun . ido-find-file)
- (t . ido-find-file-other-window)
- (defun . ido-find-file-other-window)
- (t . ido-find-alternate-file)
- (defun . ido-find-alternate-file)
- (t . ido-find-file-read-only)
- (defun . ido-find-file-read-only)
- (t . ido-find-file-read-only-other-window)
- (defun . ido-find-file-read-only-other-window)
- (t . ido-find-file-read-only-other-frame)
- (defun . ido-find-file-read-only-other-frame)
- (t . ido-display-file)
- (defun . ido-display-file)
- (t . ido-find-file-other-frame)
- (defun . ido-find-file-other-frame)
- (t . ido-write-file)
- (defun . ido-write-file)
- (t . ido-insert-file)
- (defun . ido-insert-file)
- (t . ido-dired)
- (defun . ido-dired)
- (defun . ido-list-directory)
- (defun . ido-initiate-auto-merge)
- (defun . ido-exhibit)
- (defun . ido-completions)
- (defun . ido-minibuffer-setup)
- (defun . ido-tidy)
- (defun . ido-summary-buffers-to-end)
- (t . ido-read-buffer)
- (defun . ido-read-buffer)
- (t . ido-read-file-name)
- (defun . ido-read-file-name)
- (t . ido-read-directory-name)
- (defun . ido-read-directory-name)
- (t . ido-completing-read)
- (defun . ido-completing-read)
- (defun . ido-unload-function)
- (provide . ido))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/grep.elc"
- (require . compile)
- grep-window-height grep-highlight-matches grep-scroll-output grep-command grep-template grep-use-null-device grep-find-command grep-find-template grep-files-aliases grep-find-ignored-directories grep-error-screen-columns grep-setup-hook grep-mode-map grep-mode-tool-bar-map
- (defun . kill-grep)
- grep-last-buffer grep-regexp-alist grep-error grep-hit-face grep-error-face grep-match-face grep-context-face grep-mode-font-lock-keywords grep-program find-program xargs-program grep-find-use-xargs grep-history grep-find-history grep-regexp-history grep-files-history grep-host-defaults-alist
- (t . grep-process-setup)
- (defun . grep-process-setup)
- (defun . grep-probe)
- (t . grep-compute-defaults)
- (defun . grep-compute-defaults)
- (defun . grep-tag-default)
- (defun . grep-default-command)
- grep-mode-map grep-mode-syntax-table grep-mode-abbrev-table grep-mode-abbrev-table
- (t . grep-mode)
- (defun . grep-mode)
- (t . grep)
- (defun . grep)
- (t . grep-find)
- (defun . grep-find)
- (defun . find-grep)
- grep-expand-keywords
- (defun . grep-expand-template)
- (defun . grep-read-regexp)
- (defun . grep-read-files)
- (t . lgrep)
- (defun . lgrep)
- (t . rgrep)
- (defun . rgrep)
- (provide . grep))
- ("/usr/share/emacs/23.0.93/lisp/progmodes/compile.elc"
- (require . tool-bar)
- (require . comint)
- compilation-mode-hook compilation-start-hook compilation-window-height compilation-first-column compilation-parse-errors-filename-function compilation-process-setup-function compilation-buffer-name-function compilation-finish-function compilation-finish-functions compilation-in-progress compilation-error compilation-arguments compilation-error-regexp-alist-alist compilation-error-regexp-alist compilation-directory compilation-directory-matcher compilation-page-delimiter compilation-mode-font-lock-keywords compilation-highlight-regexp compilation-highlight-overlay compilation-error-screen-columns compilation-read-command compilation-ask-about-save compilation-search-path compile-command compilation-disable-input compilation-locs compilation-debug compilation-exit-message-function compilation-environment compile-history
- (defface . compilation-error)
- (defface . compilation-warning)
- (defface . compilation-info)
- (defface . compilation-line-number)
- (defface . compilation-column-number)
- compilation-message-face compilation-error-face compilation-warning-face compilation-info-face compilation-line-face compilation-column-face compilation-enter-directory-face compilation-leave-directory-face compilation-last-buffer compilation-parsing-end compilation-parse-errors-function compilation-error-list compilation-old-error-list compilation-auto-jump-to-first-error compilation-auto-jump-to-next compilation-skip-to-next-location compilation-skip-threshold compilation-skip-visited
- (defun . compilation-face)
- (defun . compilation-directory-properties)
- (defun . compilation-auto-jump)
- (defun . compilation-error-properties)
- (defun . compilation-move-to-column)
- (defun . compilation-internal-error-properties)
- (defun . compilation-mode-font-lock-keywords)
- (defun . compilation-read-command)
- (t . compile)
- (defun . compile)
- (defun . recompile)
- compilation-scroll-output
- (defun . compilation-buffer-name)
- (defun . compile-internal)
- (t . compilation-start)
- (defun . compilation-start)
- (defun . compilation-set-window-height)
- compilation-menu-map compilation-minor-mode-map compilation-shell-minor-mode-map compilation-button-map compilation-mode-map compilation-mode-tool-bar-map
- (t . compilation-mode)
- (defun . compilation-mode)
- (defun . define-compilation-mode)
- (defun . compilation-revert-buffer)
- compilation-current-error compilation-messages-start compilation-turn-on-font-lock compilation-turn-on-font-lock
- (defun . compilation-setup)
- compilation-shell-minor-mode
- (t . compilation-shell-minor-mode)
- (defun . compilation-shell-minor-mode)
- compilation-minor-mode
- (t . compilation-minor-mode)
- (defun . compilation-minor-mode)
- (defun . compilation-handle-exit)
- (defun . compilation-sentinel)
- (defun . compilation-filter)
- (defun . compilation-buffer-internal-p)
- (defun . compilation-buffer-p)
- (defun . compilation-loop)
- (defun . compilation-next-error)
- (defun . compilation-previous-error)
- (defun . compilation-next-file)
- (defun . compilation-previous-file)
- (defun . kill-compilation)
- (defun . compile-mouse-goto-error)
- (defun . compile-goto-error)
- (defun . compilation-find-buffer)
- (t . compilation-next-error-function)
- (defun . compilation-next-error-function)
- compilation-gcpro
- (defun . compilation-fake-loc)
- compilation-context-lines
- (defun . compilation-set-window)
- (defun . compilation-goto-locus)
- (defun . compilation-goto-locus-delete-o)
- (defun . compilation-find-file)
- (defun . compilation-get-file-structure)
- (defun . compile-buffer-substring)
- (defun . compilation-compat-error-properties)
- (defun . compilation-compat-parse-errors)
- (defun . compilation-forget-errors)
- (provide . compile))
- ("/usr/share/emacs/23.0.93/lisp/comint.elc"
- (require . ring)
- comint-prompt-regexp comint-prompt-read-only comint-delimiter-argument-list comint-input-autoexpand
- (defface . comint-highlight-input)
- (defface . comint-highlight-prompt)
- comint-input-ignoredups comint-input-ring-file-name comint-scroll-to-bottom-on-input comint-move-point-for-output comint-scroll-to-bottom-on-output comint-scroll-show-maximum-output comint-buffer-maximum-size comint-input-ring-size comint-input-ring-separator comint-input-history-ignore comint-process-echoes comint-password-prompt-regexp comint-get-old-input comint-dynamic-complete-functions comint-input-filter comint-input-filter-functions comint-output-filter-functions comint-input-sender-no-newline comint-input-sender comint-eol-on-send comint-use-prompt-regexp comint-use-prompt-regexp-instead-of-fields comint-mode-hook comint-exec-hook comint-mode-map comint-ptyp comint-input-ring comint-last-input-start comint-last-input-end comint-last-output-start comint-input-ring-index comint-matching-input-from-input-string comint-save-input-ring-index comint-accum-marker comint-stored-incomplete-input comint-mode-map comint-mode-syntax-table comint-mode-abbrev-table comint-mode-abbrev-table
- (defun . comint-mode)
- (defun . comint-check-proc)
- (t . make-comint-in-buffer)
- (defun . make-comint-in-buffer)
- (t . make-comint)
- (defun . make-comint)
- (t . comint-run)
- (defun . comint-run)
- (defun . comint-exec)
- (defun . comint-exec-1)
- (defun . comint-insert-input)
- (defun . comint-read-input-ring)
- (defun . comint-write-input-ring)
- (defun . comint-dynamic-list-input-ring-select)
- (defun . comint-dynamic-list-input-ring)
- (defun . comint-regexp-arg)
- (defun . comint-search-arg)
- (defun . comint-restore-input)
- (defun . comint-search-start)
- (defun . comint-previous-input-string)
- (defun . comint-previous-input)
- (defun . comint-next-input)
- (defun . comint-previous-matching-input-string)
- (defun . comint-previous-matching-input-string-position)
- (defun . comint-delete-input)
- (defun . comint-previous-matching-input)
- (defun . comint-next-matching-input)
- (defun . comint-previous-matching-input-from-input)
- (defun . comint-next-matching-input-from-input)
- (defun . comint-replace-by-expanded-history)
- (defun . comint-replace-by-expanded-history-before-point)
- (defun . comint-magic-space)
- (defun . comint-within-quotes)
- (defun . comint-how-many-region)
- (defun . comint-args)
- (defun . comint-delim-arg)
- (defun . comint-arguments)
- (defun . comint-add-to-input-history)
- (defun . comint-send-input)
- comint-preoutput-filter-functions comint-inhibit-carriage-motion comint-last-prompt-overlay
- (defun . comint-snapshot-last-prompt)
- (defun . comint-carriage-motion)
- (defun . comint-output-filter)
- (defun . comint-preinput-scroll-to-bottom)
- (defun . comint-postoutput-scroll-to-bottom)
- (defun . comint-truncate-buffer)
- (defun . comint-strip-ctrl-m)
- (defun . shell-strip-ctrl-m)
- (defun . comint-show-maximum-output)
- (defun . comint-get-old-input-default)
- (defun . comint-copy-old-input)
- (defun . comint-skip-prompt)
- (defun . comint-after-pmark-p)
- (defun . comint-simple-send)
- (defun . comint-line-beginning-position)
- (defun . comint-bol)
- (defun . comint-read-noecho)
- (defun . send-invisible)
- (defun . comint-watch-for-password-prompt)
- (defun . comint-send-string)
- (defun . comint-send-region)
- (defun . comint-delete-output)
- (defun . comint-kill-output)
- (defun . comint-write-output)
- (defun . comint-append-output-to-file)
- (defun . comint-show-output)
- (defun . comint-interrupt-subjob)
- (defun . comint-kill-subjob)
- (defun . comint-quit-subjob)
- (defun . comint-stop-subjob)
- (defun . comint-continue-subjob)
- (defun . comint-skip-input)
- (defun . comint-kill-input)
- (defun . comint-delchar-or-maybe-eof)
- (defun . comint-send-eof)
- (defun . comint-backward-matching-input)
- (defun . comint-forward-matching-input)
- (defun . comint-next-prompt)
- (defun . comint-previous-prompt)
- comint-insert-previous-argument-last-start-pos comint-insert-previous-argument-last-index
- (defun . comint-insert-previous-argument)
- (defun . comint-update-fence)
- (defun . comint-kill-whole-line)
- (defun . comint-kill-region)
- (defun . comint-source-default)
- (defun . comint-check-source)
- (defun . comint-extract-string)
- (defun . comint-get-source)
- (defun . comint-proc-query)
- comint-completion-autolist comint-completion-addsuffix comint-completion-recexact comint-completion-fignore comint-file-name-prefix comint-file-name-chars comint-file-name-quote-list
- (defun . comint-directory)
- (defun . comint-word)
- (defun . comint-substitute-in-file-name)
- (defun . comint-match-partial-filename)
- (defun . comint-quote-filename)
- (defun . comint-unquote-filename)
- (defun . comint-dynamic-complete)
- (defun . comint-dynamic-complete-filename)
- (defun . comint-dynamic-complete-as-filename)
- (defun . comint-replace-by-expanded-filename)
- (defun . comint-dynamic-simple-complete)
- (defun . comint-dynamic-list-filename-completions)
- comint-displayed-dynamic-completions comint-dynamic-list-completions-config
- (defun . comint-dynamic-list-completions)
- (defun . comint-get-next-from-history)
- (defun . comint-accumulate)
- (defun . comint-goto-process-mark)
- (defun . comint-bol-or-process-mark)
- (defun . comint-set-process-mark)
- comint-redirect-verbose comint-redirect-filter-functions comint-redirect-output-buffer comint-redirect-finished-regexp comint-redirect-insert-matching-regexp comint-redirect-echo-input comint-redirect-completed comint-redirect-original-mode-line-process comint-redirect-perform-sanity-check comint-redirect-original-filter-function comint-redirect-subvert-readonly
- (defun . comint-redirect-setup)
- (defun . comint-redirect-cleanup)
- (defun . comint-redirect-remove-redirection)
- (defun . comint-redirect-filter)
- (defun . comint-redirect-preoutput-filter)
- (t . comint-redirect-send-command)
- (defun . comint-redirect-send-command)
- (t . comint-redirect-send-command-to-process)
- (defun . comint-redirect-send-command-to-process)
- (t . comint-redirect-results-list)
- (defun . comint-redirect-results-list)
- (t . comint-redirect-results-list-from-process)
- (defun . comint-redirect-results-list-from-process)
- (provide . comint))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/ring.elc"
- (t . ring-p)
- (defun . ring-p)
- (t . make-ring)
- (defun . make-ring)
- (defun . ring-insert-at-beginning)
- (defun . ring-plus1)
- (defun . ring-minus1)
- (defun . ring-length)
- (defun . ring-index)
- (defun . ring-empty-p)
- (defun . ring-size)
- (defun . ring-copy)
- (defun . ring-insert)
- (defun . ring-remove)
- (defun . ring-ref)
- (defun . ring-elements)
- (defun . ring-member)
- (defun . ring-next)
- (defun . ring-previous)
- (defun . ring-insert+extend)
- (defun . ring-remove+insert+extend)
- (defun . ring-convert-sequence-to-ring)
- (provide . ring))
- ("/usr/share/emacs/23.0.93/lisp/apropos.elc"
- (require . button)
- apropos-do-all apropos-symbol-face apropos-keybinding-face apropos-label-face apropos-property-face apropos-match-face apropos-sort-by-scores apropos-documentation-sort-by-scores apropos-mode-map apropos-mode-hook apropos-pattern apropos-pattern-quoted apropos-words apropos-all-words apropos-regexp apropos-all-words-regexp apropos-files-scanned apropos-accumulator apropos-item apropos-synonyms
- (defun . apropos-symbol-button-display-help)
- (defun . apropos-next-label-button)
- (defun . apropos-words-to-regexp)
- (t . apropos-read-pattern)
- (defun . apropos-read-pattern)
- (defun . apropos-parse-pattern)
- (defun . apropos-calc-scores)
- (defun . apropos-score-str)
- (defun . apropos-score-doc)
- (defun . apropos-score-symbol)
- (defun . apropos-true-hit)
- (defun . apropos-false-hit-symbol)
- (defun . apropos-false-hit-str)
- (defun . apropos-true-hit-doc)
- apropos-mode-map apropos-mode-syntax-table apropos-mode-abbrev-table apropos-mode-abbrev-table
- (defun . apropos-mode)
- apropos-multi-type
- (t . apropos-variable)
- (defun . apropos-variable)
- (defun . command-apropos)
- (t . apropos-command)
- (defun . apropos-command)
- (t . apropos-documentation-property)
- (defun . apropos-documentation-property)
- (t . apropos)
- (defun . apropos)
- (defun . apropos-library-button)
- (t . apropos-library)
- (defun . apropos-library)
- (defun . apropos-symbols-internal)
- (t . apropos-value)
- (defun . apropos-value)
- (t . apropos-documentation)
- (defun . apropos-documentation)
- (defun . apropos-value-internal)
- (defun . apropos-documentation-internal)
- (defun . apropos-format-plist)
- (defun . apropos-documentation-check-doc-file)
- (defun . apropos-documentation-check-elc-file)
- (defun . apropos-safe-documentation)
- apropos-compact-layout
- (defun . apropos-print)
- (defun . apropos-macrop)
- (defun . apropos-print-doc)
- (defun . apropos-follow)
- (defun . apropos-describe-plist)
- (provide . apropos))
- ("/home/hobbes/nxhtml/util/gimp.el" gimp:version
- (require . w32-regdat)
- (defun . gimp-get-remote-command)
- gimp-remote-command
- (defun . gimp-get-gimp-exe)
- gimp-exe gimp-remote-command-list
- (t . gimp-edit-file)
- (defun . gimp-edit-file)
- (t . gimp-edit-buffer)
- (defun . gimp-edit-buffer)
- (t . gimp-can-edit)
- (defun . gimp-can-edit)
- gimp-point-key-bindings
- (defun . gimp-add-point-bindings)
- (provide . gimp))
- ("/usr/share/emacs/23.0.93/lisp/dired.elc" dired-listing-switches dired-subdir-switches dired-chown-program dired-use-ls-dired dired-chmod-program dired-touch-program dired-ls-F-marks-symlinks dired-trivial-filenames dired-keep-marker-rename dired-keep-marker-copy dired-keep-marker-hardlink dired-keep-marker-symlink dired-dwim-target dired-copy-preserve-time dired-free-space-program dired-free-space-args dired-load-hook dired-mode-hook dired-before-readin-hook dired-after-readin-hook dired-dnd-protocol-alist dired-marker-char dired-del-marker dired-shrink-to-fit dired-flagging-regexp dired-directory dired-actual-switches dired-re-inode-size dired-re-mark dired-re-maybe-mark dired-re-dir dired-re-sym dired-re-exe dired-re-perms dired-re-dot dired-subdir-alist dired-switches-alist dired-move-to-filename-regexp dired-subdir-regexp
- (defface . dired-header)
- dired-header-face
- (defface . dired-mark)
- dired-mark-face
- (defface . dired-marked)
- dired-marked-face
- (defface . dired-flagged)
- dired-flagged-face
- (defface . dired-warning)
- dired-warning-face
- (defface . dired-perm-write)
- dired-perm-write-face
- (defface . dired-directory)
- dired-directory-face
- (defface . dired-symlink)
- dired-symlink-face
- (defface . dired-ignored)
- dired-ignored-face dired-font-lock-keywords
- (defun . dired-mark-if)
- (defun . dired-map-over-marks)
- (defun . dired-get-marked-files)
- (defun . dired-read-dir-and-switches)
- (t . dired)
- (defun . dired)
- (t . dired-other-window)
- (defun . dired-other-window)
- (t . dired-other-frame)
- (defun . dired-other-frame)
- (t . dired-noselect)
- (defun . dired-noselect)
- (defun . dired-directory-changed-p)
- (defun . dired-buffer-stale-p)
- (defun . dired-internal-noselect)
- dired-buffers
- (defun . dired-find-buffer-nocreate)
- (defun . dired-readin)
- (defun . dired-readin-insert)
- (defun . dired-align-file)
- (defun . dired-insert-directory)
- (defun . dired-insert-set-properties)
- (defun . dired-revert)
- (defun . dired-remember-marks)
- (defun . dired-mark-remembered)
- (defun . dired-remember-hidden)
- (defun . dired-insert-old-subdirs)
- (defun . dired-uncache)
- dired-mode-map
- (t . dired-mode)
- (defun . dired-mode)
- (defun . dired-summary)
- (defun . dired-undo)
- (defun . dired-toggle-read-only)
- (defun . dired-next-line)
- (defun . dired-previous-line)
- (defun . dired-next-dirline)
- (defun . dired-prev-dirline)
- (defun . dired-up-directory)
- (defun . dired-get-file-for-visit)
- (defun . dired-advertised-find-file)
- (defun . dired-find-file)
- (defun . dired-find-alternate-file)
- (defun . dired-mouse-find-file-other-window)
- (defun . dired-view-file)
- (defun . dired-find-file-other-window)
- (defun . dired-display-file)
- (defun . dired-get-filename)
- (defun . dired-string-replace-match)
- (defun . dired-make-absolute)
- (defun . dired-make-relative)
- dired-permission-flags-regexp
- (defun . dired-move-to-filename)
- (defun . dired-move-to-end-of-filename)
- (defun . dired-copy-filename-as-kill)
- (defun . dired-buffers-for-dir)
- (defun . dired-glob-regexp)
- (defun . dired-advertise)
- (defun . dired-unadvertise)
- (defun . dired-in-this-tree)
- (defun . dired-normalize-subdir)
- (defun . dired-get-subdir)
- (defun . dired-get-subdir-min)
- (defun . dired-get-subdir-max)
- (defun . dired-clear-alist)
- (defun . dired-subdir-index)
- (defun . dired-next-subdir)
- (defun . dired-build-subdir-alist)
- (defun . dired-alist-add-1)
- (defun . dired-goto-next-nontrivial-file)
- (defun . dired-goto-next-file)
- (defun . dired-goto-file)
- (defun . dired-initial-position)
- (defun . dired-current-directory)
- (defun . dired-subdir-max)
- dired-recursive-deletes dired-re-no-dot
- (defun . dired-delete-file)
- (defun . dired-do-flagged-delete)
- (defun . dired-do-delete)
- dired-deletion-confirmer
- (defun . dired-internal-do-deletions)
- (defun . dired-fun-in-all-buffers)
- (defun . dired-delete-entry)
- (defun . dired-clean-up-after-deletion)
- (defun . dired-marker-regexp)
- (defun . dired-plural-s)
- (defun . dired-mark-prompt)
- (defun . dired-pop-to-buffer)
- dired-no-confirm
- (defun . dired-mark-pop-up)
- (defun . dired-format-columns-of-files)
- (defun . dired-repeat-over-lines)
- (defun . dired-between-files)
- (defun . dired-next-marked-file)
- (defun . dired-prev-marked-file)
- (defun . dired-file-marker)
- (defun . dired-mark-files-in-region)
- (defun . dired-mark)
- (defun . dired-unmark)
- (defun . dired-flag-file-deletion)
- (defun . dired-unmark-backward)
- (defun . dired-toggle-marks)
- dired-regexp-history
- (defun . dired-read-regexp)
- (defun . dired-mark-files-regexp)
- (defun . dired-mark-files-containing-regexp)
- (defun . dired-flag-files-regexp)
- (defun . dired-mark-symlinks)
- (defun . dired-mark-directories)
- (defun . dired-mark-executables)
- (defun . dired-flag-auto-save-files)
- dired-garbage-files-regexp
- (defun . dired-flag-garbage-files)
- (defun . dired-flag-backup-files)
- (defun . dired-change-marks)
- (defun . dired-unmark-all-marks)
- (defun . dired-unmark-all-files)
- dired-log-buffer
- (defun . dired-why)
- (defun . dired-log)
- (defun . dired-log-summary)
- dired-ls-sorting-switches dired-sort-by-date-regexp dired-sort-by-name-regexp dired-sort-inhibit
- (defun . dired-sort-set-modeline)
- (defun . dired-sort-toggle-or-edit)
- (defun . dired-sort-toggle)
- (defun . dired-replace-in-string)
- (defun . dired-sort-other)
- dired-subdir-alist-pre-R
- (defun . dired-sort-R-check)
- dired-recursive-copies
- (defun . dired-dnd-popup-notice)
- (defun . dired-dnd-do-ask-action)
- (defun . dired-dnd-handle-local-file)
- (defun . dired-dnd-handle-file)
- (defun . dired-desktop-buffer-misc-data)
- (defun . dired-restore-desktop-buffer)
- (provide . dired))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/regexp-opt.elc"
- (t . regexp-opt)
- (defun . regexp-opt)
- (t . regexp-opt-depth)
- (defun . regexp-opt-depth)
- (defun . regexp-opt-group)
- (defun . regexp-opt-charset)
- (provide . regexp-opt))
- ("/usr/share/emacs/23.0.93/lisp/cus-edit.elc"
- (require . cus-face)
- (require . wid-edit)
- (require . cus-load)
- (require . cus-start)
- custom-mode-map custom-mode-link-map custom-field-keymap
- (defun . custom-split-regexp-maybe)
- (defun . custom-variable-prompt)
- (defun . custom-menu-filter)
- custom-prefix-list custom-unlispify-menu-entries custom-unlispify-remove-prefixes
- (defun . custom-unlispify-menu-entry)
- custom-unlispify-tag-names
- (defun . custom-unlispify-tag-name)
- (defun . custom-prefix-add)
- custom-guess-name-alist custom-guess-doc-alist
- (defun . custom-guess-type)
- custom-browse-sort-alphabetically custom-browse-order-groups custom-browse-only-groups custom-buffer-sort-alphabetically custom-buffer-order-groups custom-menu-sort-alphabetically custom-menu-order-groups
- (defun . custom-sort-items)
- custom-commands
- (defun . Custom-help)
- custom-reset-menu custom-options
- (defun . custom-command-apply)
- (defun . Custom-set)
- (defun . Custom-save)
- (defun . custom-reset)
- (defun . Custom-reset-current)
- (defun . Custom-reset-saved)
- custom-reset-standard-variables-list custom-reset-standard-faces-list
- (defun . custom-reset-standard-save-and-update)
- (defun . Custom-reset-standard)
- (defun . custom-prompt-variable)
- (t . customize-set-value)
- (defun . customize-set-value)
- (t . customize-set-variable)
- (defun . customize-set-variable)
- (t . customize-save-variable)
- (defun . customize-save-variable)
- (t . customize)
- (defun . customize)
- (t . customize-mode)
- (defun . customize-mode)
- (defun . customize-read-group)
- (t . customize-group)
- (defun . customize-group)
- (t . customize-group-other-window)
- (defun . customize-group-other-window)
- (defun . customize-variable)
- (t . customize-option)
- (defun . customize-option)
- (defun . customize-variable-other-window)
- (t . customize-option-other-window)
- (defun . customize-option-other-window)
- customize-changed-options-previous-release customize-package-emacs-version-alist
- (defun . customize-changed)
- (t . customize-changed-options)
- (defun . customize-changed-options)
- (defun . customize-package-emacs-version)
- (defun . customize-version-lessp)
- (t . customize-face)
- (defun . customize-face)
- (t . customize-face-other-window)
- (defun . customize-face-other-window)
- (defun . customize-customized)
- (t . customize-unsaved)
- (defun . customize-unsaved)
- (t . customize-rogue)
- (defun . customize-rogue)
- (t . customize-saved)
- (defun . customize-saved)
- (t . customize-apropos)
- (defun . customize-apropos)
- (t . customize-apropos-options)
- (defun . customize-apropos-options)
- (t . customize-apropos-faces)
- (defun . customize-apropos-faces)
- (t . customize-apropos-groups)
- (defun . customize-apropos-groups)
- custom-buffer-style custom-buffer-done-kill custom-buffer-indent
- (defun . custom-get-fresh-buffer)
- (t . custom-buffer-create)
- (defun . custom-buffer-create)
- (t . custom-buffer-create-other-window)
- (defun . custom-buffer-create-other-window)
- custom-reset-button-menu custom-buffer-verbose-help
- (defun . Custom-buffer-done)
- custom-button custom-button-mouse custom-button-pressed custom-raised-buttons
- (defun . custom-buffer-create-internal)
- (t . customize-browse)
- (defun . customize-browse)
- (defun . custom-browse-visibility-action)
- (defun . custom-browse-group-tag-action)
- (defun . custom-browse-variable-tag-action)
- (defun . custom-browse-face-tag-action)
- custom-browse-alist custom-browse-alist
- (defun . custom-browse-insert-prefix)
- (defface . custom-invalid)
- (defface . custom-rogue)
- (defface . custom-modified)
- (defface . custom-set)
- (defface . custom-changed)
- (defface . custom-themed)
- (defface . custom-saved)
- custom-magic-alist custom-magic-show custom-magic-show-hidden custom-magic-show-button
- (defun . widget-magic-mouse-down-action)
- (defun . custom-magic-value-create)
- (defun . custom-magic-reset)
- (defface . custom-button)
- (defface . custom-button-mouse)
- (defface . custom-button-unraised)
- (defface . custom-button-pressed)
- (defface . custom-button-pressed-unraised)
- (defface . custom-documentation)
- (defface . custom-state)
- (defface . custom-link)
- (defun . custom-convert-widget)
- (defun . custom-notify)
- (defun . custom-redraw)
- (defun . custom-redraw-magic)
- (defun . custom-show)
- (defun . custom-load-widget)
- (defun . custom-unloaded-symbol-p)
- (defun . custom-unloaded-widget-p)
- (defun . custom-toggle-hide)
- (defun . custom-toggle-parent)
- (defun . custom-add-see-also)
- (defun . custom-add-parent-links)
- (defface . custom-comment)
- (defface . custom-comment-tag)
- (defun . custom-comment-create)
- (defun . custom-comment-hide)
- (defun . custom-comment-show)
- (defun . custom-comment-invisible-p)
- (defface . custom-variable-tag)
- (defface . custom-variable-button)
- custom-variable-default-form
- (defun . custom-variable-documentation)
- (defun . custom-variable-type)
- (defun . custom-variable-value-create)
- (defun . custom-tag-action)
- (defun . custom-tag-mouse-down-action)
- (defun . custom-variable-state-set)
- (defun . custom-variable-standard-value)
- custom-variable-menu
- (defun . custom-variable-action)
- (defun . custom-variable-edit)
- (defun . custom-variable-edit-lisp)
- (defun . custom-variable-set)
- (defun . custom-variable-mark-to-save)
- (defun . custom-variable-state-set-and-redraw)
- (defun . custom-variable-save)
- (defun . custom-variable-reset-saved)
- (defun . custom-variable-mark-to-reset-standard)
- (defun . custom-variable-reset-standard)
- (defun . custom-variable-backup-value)
- (defun . custom-variable-reset-backup)
- (defface . custom-visibility)
- (defun . custom-face-edit-fix-value)
- (defun . custom-face-edit-convert-widget)
- (defun . custom-face-edit-deactivate)
- (defun . custom-face-edit-activate)
- (defun . custom-face-edit-delete)
- (defun . custom-face-edit-attribute-tag)
- (defface . custom-face-tag)
- custom-face-default-form custom-face-all
- (defun . custom-display-unselected-match)
- custom-face-selected
- (defun . custom-filter-face-spec)
- (defun . custom-pre-filter-face-spec)
- (defun . custom-post-filter-face-spec)
- (defun . custom-face-value-create)
- custom-face-menu
- (defun . custom-face-edit-selected)
- (defun . custom-face-edit-all)
- (defun . custom-face-edit-lisp)
- (defun . custom-face-state-set)
- (defun . custom-face-action)
- (defun . custom-face-set)
- (defun . custom-face-mark-to-save)
- (defun . custom-face-state-set-and-redraw)
- (defun . custom-face-save)
- (defun . custom-face-save-command)
- (defun . custom-face-reset-saved)
- (defun . custom-face-standard-value)
- (defun . custom-face-mark-to-reset-standard)
- (defun . custom-face-reset-standard)
- widget-face-prompt-value-history
- (defun . widget-face-sample-face-get)
- (defun . widget-face-notify)
- (defun . custom-hook-convert-widget)
- (defun . custom-group-link-action)
- custom-group-tag-faces
- (defface . custom-group-tag-1)
- (defface . custom-group-tag)
- (defun . custom-group-sample-face-get)
- (defun . custom-group-visibility-create)
- (defun . custom-group-members)
- (defun . custom-group-value-create)
- custom-group-menu
- (defun . custom-group-action)
- (defun . custom-group-set)
- (defun . custom-group-mark-to-save)
- (defun . custom-group-state-set-and-redraw)
- (defun . custom-group-save)
- (defun . custom-group-reset-current)
- (defun . custom-group-reset-saved)
- (defun . custom-group-reset-standard)
- (defun . custom-group-mark-to-reset-standard)
- (defun . custom-group-state-update)
- custom-file
- (defun . custom-file)
- (t . custom-save-all)
- (defun . custom-save-all)
- (t . customize-save-customized)
- (defun . customize-save-customized)
- (defun . custom-save-delete)
- (defun . custom-save-variables)
- (defun . custom-save-faces)
- custom-menu-nesting
- (defun . custom-face-menu-create)
- (defun . custom-variable-menu-create)
- (defun . custom-group-menu-create)
- (t . custom-menu-create)
- (defun . custom-menu-create)
- (t . customize-menu-create)
- (defun . customize-menu-create)
- Custom-mode-menu
- (defun . Custom-mode-menu)
- custom-tool-bar-map
- (defun . Custom-no-edit)
- (defun . Custom-newline)
- (defun . Custom-goto-parent)
- Custom-mode-hook
- (defun . custom-state-buffer-message)
- Custom-mode-map Custom-mode-syntax-table Custom-mode-abbrev-table Custom-mode-abbrev-table
- (defun . Custom-mode)
- (defun . custom-mode)
- custom-mode-hook
- (provide . cus-edit))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/easymenu.elc" easy-menu-precalculate-equivalent-keybindings
- (defun . easy-menu-intern)
- (t . easy-menu-define)
- (defun . easy-menu-define)
- (defun . easy-menu-binding)
- (t . easy-menu-do-define)
- (defun . easy-menu-do-define)
- (defun . easy-menu-filter-return)
- easy-menu-avoid-duplicate-keys
- (t . easy-menu-create-menu)
- (defun . easy-menu-create-menu)
- easy-menu-button-prefix easy-menu-converted-items-table
- (defun . easy-menu-convert-item)
- (defun . easy-menu-convert-item-1)
- (defun . easy-menu-define-key)
- (defun . easy-menu-name-match)
- (defun . easy-menu-always-true-p)
- easy-menu-item-count
- (defun . easy-menu-make-symbol)
- (t . easy-menu-change)
- (defun . easy-menu-change)
- (defun . easy-menu-remove)
- (defun . easy-menu-add)
- (defun . add-submenu)
- (defun . easy-menu-add-item)
- (defun . easy-menu-item-present-p)
- (defun . easy-menu-remove-item)
- (defun . easy-menu-return-item)
- (defun . easy-menu-lookup-name)
- (defun . easy-menu-get-map)
- (provide . easymenu))
- ("/usr/share/emacs/23.0.93/lisp/cus-start.elc"
- (provide . cus-start))
- ("/usr/share/emacs/23.0.93/lisp/cus-load.el"
- (defun . custom-put-if-not)
- custom-versions-load-alist
- (provide . cus-load))
- ("/usr/share/emacs/23.0.93/lisp/wid-edit.elc"
- (defun . widget-event-point)
- (defun . widget-button-release-event-p)
- widget-documentation-face
- (defface . widget-documentation)
- widget-button-face
- (defface . widget-button)
- widget-mouse-face
- (defface . widget-field)
- (defface . widget-single-line-field)
- (defun . widget-princ-to-string)
- (defun . widget-clear-undo)
- widget-menu-max-size widget-menu-max-shortcuts widget-menu-minibuffer-flag
- (defun . widget-choose)
- (defun . widget-remove-if)
- widget-field-add-space widget-field-use-before-change
- (defun . widget-specify-field)
- (defun . widget-specify-secret)
- (defun . widget-specify-button)
- (defun . widget-mouse-help)
- (defun . widget-specify-sample)
- (defun . widget-specify-doc)
- (defun . widget-specify-insert)
- (defface . widget-inactive)
- (defun . widget-specify-inactive)
- (defun . widget-overlay-inactive)
- (defun . widget-specify-active)
- (defun . widget-type)
- (t . widgetp)
- (defun . widgetp)
- (defun . widget-get-indirect)
- (defun . widget-member)
- (t . widget-value)
- (defun . widget-value)
- (defun . widget-value-set)
- (defun . widget-default-get)
- (defun . widget-match-inline)
- (defun . widget-apply-action)
- (t . widget-prompt-value)
- (defun . widget-prompt-value)
- (defun . widget-get-sibling)
- (defun . widget-map-buttons)
- widget-image-directory widget-image-enable widget-image-conversion
- (defun . widget-image-find)
- widget-button-pressed-face
- (defun . widget-image-insert)
- (defun . widget-move-and-invoke)
- widget-button-prefix widget-button-suffix
- (t . widget-create)
- (defun . widget-create)
- (defun . widget-create-child-and-convert)
- (defun . widget-create-child)
- (defun . widget-create-child-value)
- (t . widget-delete)
- (defun . widget-delete)
- (defun . widget-copy)
- (defun . widget-convert)
- (t . widget-insert)
- (defun . widget-insert)
- (defun . widget-convert-text)
- (defun . widget-convert-button)
- (defun . widget-leave-text)
- (defun . advertised-widget-backward)
- widget-keymap widget-global-map widget-field-keymap widget-text-keymap
- (defun . widget-field-activate)
- (defface . widget-button-pressed)
- widget-button-click-moves-point
- (defun . widget-button-click)
- (defun . widget-button-press)
- (defun . widget-tabable-at)
- widget-use-overlay-change
- (defun . widget-move)
- (defun . widget-forward)
- (defun . widget-backward)
- (defun . widget-beginning-of-line)
- (defun . widget-end-of-line)
- (defun . widget-kill-line)
- widget-complete-field
- (defun . widget-narrow-to-field)
- (defun . widget-complete)
- widget-field-new widget-field-list
- (defun . widget-at)
- (t . widget-setup)
- (defun . widget-setup)
- widget-field-last widget-field-was
- (defun . widget-field-at)
- (defun . widget-field-buffer)
- (defun . widget-field-start)
- (defun . widget-field-end)
- (defun . widget-field-find)
- (defun . widget-before-change)
- (defun . widget-add-change)
- (defun . widget-after-change)
- (defun . widget-parent-action)
- (defun . widget-children-value-delete)
- (defun . widget-children-validate)
- (defun . widget-child-value-get)
- (defun . widget-child-value-inline)
- (defun . widget-child-validate)
- (defun . widget-type-value-create)
- (defun . widget-type-default-get)
- (defun . widget-type-match)
- (defun . widget-types-copy)
- (defun . widget-types-convert-widget)
- (defun . widget-value-convert-widget)
- (defun . widget-value-value-get)
- (defun . widget-default-complete)
- (defun . widget-default-create)
- (defun . widget-default-format-handler)
- (defun . widget-default-button-face-get)
- (defun . widget-default-mouse-face-get)
- (defun . widget-default-sample-face-get)
- (defun . widget-default-delete)
- (defun . widget-default-value-set)
- (defun . widget-default-value-inline)
- (defun . widget-default-default-get)
- (defun . widget-default-menu-tag-get)
- (defun . widget-default-active)
- (defun . widget-default-deactivate)
- (defun . widget-default-action)
- (defun . widget-default-notify)
- (defun . widget-default-prompt-value)
- (defun . widget-docstring)
- (defun . widget-item-value-create)
- (defun . widget-item-match)
- (defun . widget-item-match-inline)
- (defun . widget-sublist)
- (defun . widget-item-action)
- widget-push-button-prefix widget-push-button-suffix
- (defun . widget-push-button-value-create)
- widget-link-prefix widget-link-suffix
- (defun . widget-info-link-action)
- (defun . widget-url-link-action)
- (defun . widget-function-link-action)
- (defun . widget-variable-link-action)
- (defun . widget-file-link-action)
- (defun . widget-emacs-library-link-action)
- (defun . widget-emacs-commentary-link-action)
- widget-field-history
- (defun . widget-field-prompt-internal)
- (defun . widget-field-prompt-value)
- widget-edit-functions
- (defun . widget-field-action)
- (defun . widget-field-validate)
- (defun . widget-field-value-create)
- (defun . widget-field-value-delete)
- (defun . widget-field-value-get)
- (defun . widget-field-match)
- (defun . widget-choice-value-create)
- (defun . widget-choice-default-get)
- widget-choice-toggle
- (defun . widget-choice-mouse-down-action)
- (defun . widget-choice-action)
- (defun . widget-choice-validate)
- (defun . widget-choice-match)
- (defun . widget-choice-match-inline)
- (defun . widget-toggle-value-create)
- (defun . widget-toggle-action)
- (defun . widget-checkbox-action)
- (defun . widget-checklist-value-create)
- (defun . widget-checklist-add-item)
- (defun . widget-checklist-match)
- (defun . widget-checklist-match-inline)
- (defun . widget-checklist-match-find)
- (defun . widget-checklist-match-up)
- (defun . widget-checklist-value-get)
- (defun . widget-checklist-validate)
- (defun . widget-radio-button-notify)
- (defun . widget-radio-value-create)
- (defun . widget-radio-add-item)
- (defun . widget-radio-value-get)
- (defun . widget-radio-chosen)
- (defun . widget-radio-value-inline)
- (defun . widget-radio-value-set)
- (defun . widget-radio-validate)
- (defun . widget-radio-action)
- (defun . widget-insert-button-action)
- (defun . widget-delete-button-action)
- (defun . widget-editable-list-format-handler)
- (defun . widget-editable-list-value-create)
- (defun . widget-editable-list-value-get)
- (defun . widget-editable-list-match)
- (defun . widget-editable-list-match-inline)
- (defun . widget-editable-list-insert-before)
- (defun . widget-editable-list-delete-at)
- (defun . widget-editable-list-entry-create)
- (defun . widget-group-value-create)
- (defun . widget-group-default-get)
- (defun . widget-group-match)
- (defun . widget-group-match-inline)
- (defun . widget-visibility-value-create)
- (defun . widget-documentation-link-action)
- widget-documentation-links widget-documentation-link-regexp widget-documentation-link-p widget-documentation-link-type
- (defun . widget-documentation-link-add)
- (defun . widget-documentation-string-value-create)
- (defun . widget-documentation-string-action)
- (defun . widget-add-documentation-string-button)
- (defun . widget-const-prompt-value)
- widget-string-prompt-value-history
- (defun . widget-string-complete)
- (defun . widget-regexp-match)
- (defun . widget-regexp-validate)
- (defun . widget-file-complete)
- (defun . widget-file-prompt-value)
- widget-symbol-prompt-value-history
- (defun . widget-symbol-prompt-internal)
- widget-function-prompt-value-history widget-variable-prompt-value-history
- (defun . widget-coding-system-prompt-value)
- (defun . widget-coding-system-action)
- widget-key-sequence-prompt-value-history widget-key-sequence-default-value widget-key-sequence-map
- (defun . widget-key-sequence-read-event)
- (defun . widget-key-sequence-validate)
- (defun . widget-key-sequence-value-to-internal)
- (defun . widget-key-sequence-value-to-external)
- (defun . widget-sexp-value-to-internal)
- (defun . widget-sexp-validate)
- widget-sexp-prompt-value-history
- (defun . widget-sexp-prompt-value)
- (defun . widget-restricted-sexp-match)
- (defun . widget-vector-match)
- (defun . widget-cons-match)
- (defun . widget-plist-convert-widget)
- (defun . widget-plist-convert-option)
- (defun . widget-alist-convert-widget)
- (defun . widget-alist-convert-option)
- (defun . widget-choice-prompt-value)
- (defun . widget-boolean-prompt-value)
- (defun . widget-color-complete)
- (defun . widget-color-sample-face-get)
- (defun . widget-color-action)
- (defun . widget-color-notify)
- (defun . widget-echo-help)
- (provide . wid-edit))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/cl.elc" cl-optimize-speed cl-optimize-safety custom-print-functions
- (defun . cl-unload-function)
- (defun . incf)
- (defun . decf)
- (defun . pop)
- (defun . push)
- (defun . pushnew)
- (defun . cl-set-elt)
- (defun . cl-set-nthcdr)
- (defun . cl-set-buffer-substring)
- (defun . cl-set-substring)
- (defun . cl-map-extents)
- (defun . cl-block-wrapper)
- (defun . cl-block-throw)
- (defun . values)
- (defun . values-list)
- (defun . multiple-value-list)
- (defun . multiple-value-apply)
- (defun . multiple-value-call)
- (defun . nth-value)
- cl-macro-environment cl-old-macroexpand
- (defun . macroexpand)
- (defun . cl-macroexpand)
- cl-compiling-file
- (defun . cl-compiling-file)
- cl-proclaims-deferred
- (defun . proclaim)
- (defun . declaim)
- (defun . cl-random-time)
- *gensym-counter*
- (defun . floatp-safe)
- (defun . plusp)
- (defun . minusp)
- (defun . oddp)
- (defun . evenp)
- *random-state* most-positive-float most-positive-float most-negative-float most-negative-float least-positive-float least-positive-float least-negative-float least-negative-float least-positive-normalized-float least-positive-normalized-float least-negative-normalized-float least-negative-normalized-float float-epsilon float-epsilon float-negative-epsilon float-negative-epsilon
- (defun . copy-seq)
- (defun . mapcar*)
- (defun . svref)
- (defun . first)
- (defun . second)
- (defun . rest)
- (defun . endp)
- (defun . third)
- (defun . fourth)
- (defun . fifth)
- (defun . sixth)
- (defun . seventh)
- (defun . eighth)
- (defun . ninth)
- (defun . tenth)
- (defun . caaar)
- (defun . caadr)
- (defun . cadar)
- (defun . caddr)
- (defun . cdaar)
- (defun . cdadr)
- (defun . cddar)
- (defun . cdddr)
- (defun . caaaar)
- (defun . caaadr)
- (defun . caadar)
- (defun . caaddr)
- (defun . cadaar)
- (defun . cadadr)
- (defun . caddar)
- (defun . cadddr)
- (defun . cdaaar)
- (defun . cdaadr)
- (defun . cdadar)
- (defun . cdaddr)
- (defun . cddaar)
- (defun . cddadr)
- (defun . cdddar)
- (defun . cddddr)
- (defun . list*)
- (defun . ldiff)
- (defun . copy-list)
- (defun . cl-maclisp-member)
- (defun . cl-member)
- (defun . cl-floor)
- (defun . cl-ceiling)
- (defun . cl-truncate)
- (defun . cl-round)
- (defun . cl-mod)
- (defun . adjoin)
- (defun . subst)
- (defun . cl-do-subst)
- (defun . acons)
- (defun . pairlis)
- (provide . cl-19)
- (provide . cl)
- cl-hacked-flag
- (defun . cl-hack-byte-compiler)
- (provide . cl))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/cl-loaddefs.el"
- (autoload . coerce)
- (autoload . equalp)
- (autoload . cl-mapcar-many)
- (autoload . map)
- (autoload . maplist)
- (autoload . mapl)
- (autoload . mapcan)
- (autoload . mapcon)
- (autoload . some)
- (autoload . every)
- (autoload . notany)
- (autoload . notevery)
- (defun . cl-map-keymap)
- (autoload . cl-map-keymap-recursively)
- (autoload . cl-map-intervals)
- (autoload . cl-map-overlays)
- (autoload . cl-set-frame-visible-p)
- (autoload . cl-progv-before)
- (autoload . gcd)
- (autoload . lcm)
- (autoload . isqrt)
- (autoload . floor*)
- (autoload . ceiling*)
- (autoload . truncate*)
- (autoload . round*)
- (autoload . mod*)
- (autoload . rem*)
- (autoload . signum)
- (autoload . random*)
- (autoload . make-random-state)
- (autoload . random-state-p)
- (autoload . cl-float-limits)
- (autoload . subseq)
- (autoload . concatenate)
- (autoload . revappend)
- (autoload . nreconc)
- (autoload . list-length)
- (autoload . tailp)
- (autoload . get*)
- (autoload . getf)
- (autoload . cl-set-getf)
- (autoload . cl-do-remf)
- (autoload . cl-remprop)
- (defun . remprop)
- (defun . cl-gethash)
- (defun . cl-puthash)
- (defun . cl-remhash)
- (defun . cl-clrhash)
- (defun . cl-maphash)
- (defun . cl-make-hash-table)
- (defun . cl-hash-table-p)
- (defun . cl-hash-table-count)
- (autoload . cl-macroexpand-all)
- (autoload . cl-prettyexpand)
- (autoload . gensym)
- (autoload . gentemp)
- (autoload . defun*)
- (autoload . defmacro*)
- (autoload . function*)
- (autoload . destructuring-bind)
- (autoload . eval-when)
- (autoload . load-time-value)
- (autoload . case)
- (autoload . ecase)
- (autoload . typecase)
- (autoload . etypecase)
- (autoload . block)
- (autoload . return)
- (autoload . return-from)
- (autoload . loop)
- (autoload . do)
- (autoload . do*)
- (autoload . dolist)
- (autoload . dotimes)
- (autoload . do-symbols)
- (autoload . do-all-symbols)
- (autoload . psetq)
- (autoload . progv)
- (autoload . flet)
- (autoload . labels)
- (autoload . macrolet)
- (autoload . symbol-macrolet)
- (autoload . lexical-let)
- (autoload . lexical-let*)
- (autoload . multiple-value-bind)
- (autoload . multiple-value-setq)
- (autoload . locally)
- (autoload . the)
- (autoload . declare)
- (autoload . define-setf-method)
- (autoload . defsetf)
- (autoload . get-setf-method)
- (autoload . setf)
- (autoload . psetf)
- (autoload . cl-do-pop)
- (autoload . remf)
- (autoload . shiftf)
- (autoload . rotatef)
- (autoload . letf)
- (autoload . letf*)
- (autoload . callf)
- (autoload . callf2)
- (autoload . define-modify-macro)
- (autoload . defstruct)
- (autoload . cl-struct-setf-expander)
- (autoload . typep)
- (autoload . check-type)
- (autoload . assert)
- (autoload . define-compiler-macro)
- (autoload . compiler-macroexpand)
- (autoload . reduce)
- (autoload . fill)
- (autoload . replace)
- (autoload . remove*)
- (autoload . remove-if)
- (autoload . remove-if-not)
- (autoload . delete*)
- (autoload . delete-if)
- (autoload . delete-if-not)
- (autoload . remove-duplicates)
- (autoload . delete-duplicates)
- (autoload . substitute)
- (autoload . substitute-if)
- (autoload . substitute-if-not)
- (autoload . nsubstitute)
- (autoload . nsubstitute-if)
- (autoload . nsubstitute-if-not)
- (autoload . find)
- (autoload . find-if)
- (autoload . find-if-not)
- (autoload . position)
- (autoload . position-if)
- (autoload . position-if-not)
- (autoload . count)
- (autoload . count-if)
- (autoload . count-if-not)
- (autoload . mismatch)
- (autoload . search)
- (autoload . sort*)
- (autoload . stable-sort)
- (autoload . merge)
- (autoload . member*)
- (autoload . member-if)
- (autoload . member-if-not)
- (autoload . cl-adjoin)
- (autoload . assoc*)
- (autoload . assoc-if)
- (autoload . assoc-if-not)
- (autoload . rassoc*)
- (autoload . rassoc-if)
- (autoload . rassoc-if-not)
- (autoload . union)
- (autoload . nunion)
- (autoload . intersection)
- (autoload . nintersection)
- (autoload . set-difference)
- (autoload . nset-difference)
- (autoload . set-exclusive-or)
- (autoload . nset-exclusive-or)
- (autoload . subsetp)
- (autoload . subst-if)
- (autoload . subst-if-not)
- (autoload . nsubst)
- (autoload . nsubst-if)
- (autoload . nsubst-if-not)
- (autoload . sublis)
- (autoload . nsublis)
- (autoload . tree-equal))
- ("/home/hobbes/nxhtml/nxhtml-loaddefs.el"
- (autoload . html-site-buffer-or-dired-file-name)
- (autoload . html-site-set-site)
- (autoload . html-site-dired-current)
- (autoload . html-site-find-file)
- (autoload . html-site-rgrep)
- (autoload . html-site-query-replace)
- (autoload . inlimg-mode)
- (autoload . inlimg-toggle-img-display)
- (autoload . nxhtml-report-bug)
- (autoload . nxhtml-edit-with-gimp)
- (autoload . nxhtml-browse-file)
- (autoload . nxhtml-browse-region)
- nxhtml-global-minor-mode
- (autoload . nxhtml-global-minor-mode)
- (autoload . nxhtml-mode)
- (autoload . nxhtml-short-tag-help)
- (autoload . nxhtml-validation-header-mode)
- (autoload . nxhtml-mumamo-mode)
- (autoload . embperl-nxhtml-mumamo-mode)
- (autoload . django-nxhtml-mumamo-mode)
- (autoload . genshi-nxhtml-mumamo-mode)
- (autoload . mjt-nxhtml-mumamo-mode)
- (autoload . smarty-nxhtml-mumamo-mode)
- (autoload . jsp-nxhtml-mumamo-mode)
- (autoload . eruby-nxhtml-mumamo-mode)
- (autoload . asp-nxhtml-mumamo-mode)
- (autoload . mako-nxhtml-mumamo-mode)
- nxml-where-global-mode
- (autoload . nxml-where-global-mode)
- (autoload . rngalt-set-validation-header)
- (autoload . tidy-build-menu)
- (autoload . xhtml-help-show-css-ref)
- (autoload . xhtml-help-show-tag-ref)
- (autoload . csharp-mode)
- (autoload . django-mode)
- (autoload . javascript-mode)
- (autoload . moz-minor-mode)
- (autoload . inferior-moz-mode)
- php-file-patterns
- (autoload . php-mode)
- (autoload . smarty-mode)
- (autoload . tt-mode)
- (autoload . wikipedia-mode)
- (autoload . wikipedia-draft)
- (autoload . wikipedia-draft-page)
- (autoload . wikipedia-draft-buffer)
- wikipedia-draft-send-archive
- (autoload . ert-deftest)
- (autoload . ert-run-tests-interactively)
- (autoload . nxhtmltest-run-Q)
- (autoload . nxhtmltest-run-indent)
- (autoload . nxhtmltest-run)
- (autoload . appmenu-add)
- (autoload . as-external-for-xhtml)
- (autoload . as-external-for-mail)
- (autoload . as-external-for-wiki)
- as-external-mode
- (autoload . as-external-mode)
- (autoload . chart-complete)
- (autoload . chart-make-chart)
- css-color-global-mode
- (autoload . css-color-global-mode)
- (autoload . css-color-mode)
- (autoload . css-palette-mode)
- css-palette-global-mode
- (autoload . css-palette-global-mode)
- (autoload . freemind-show)
- (autoload . freemind-from-org-mode-node)
- (autoload . freemind-from-org-mode)
- (autoload . freemind-from-org-sparse-tree)
- (autoload . freemind-to-org-mode)
- (autoload . gimp-edit-file)
- (autoload . gimp-edit-buffer)
- (autoload . gimp-can-edit)
- (autoload . gpl-mode)
- (autoload . html-write-mode)
- (autoload . htmlfontify-buffer)
- (autoload . majmodpri-sort-lists)
- (autoload . majmodpri-apply)
- (autoload . majmodpri-apply-priorities)
- (autoload . mlinks-mode)
- (autoload . mumamo-mark-for-refontification)
- (autoload . html-mumamo-mode)
- (autoload . nxml-mumamo-mode)
- (autoload . embperl-html-mumamo-mode)
- (autoload . django-html-mumamo-mode)
- (autoload . genshi-html-mumamo-mode)
- (autoload . mjt-html-mumamo-mode)
- (autoload . smarty-html-mumamo-mode)
- (autoload . jsp-html-mumamo-mode)
- (autoload . eruby-mumamo-mode)
- (autoload . eruby-html-mumamo-mode)
- (autoload . perl-mumamo-mode)
- (autoload . cperl-mumamo-mode)
- (autoload . metapost-mumamo-mode)
- (autoload . laszlo-nxml-mumamo-mode)
- (autoload . csound-sgml-mumamo-mode)
- (autoload . noweb2-mumamo-mode)
- (autoload . asp-html-mumamo-mode)
- (autoload . org-mumamo-mode)
- (autoload . mako-html-mumamo-mode)
- (autoload . popup-menu-at-point)
- (autoload . define-toggle)
- (autoload . unfill-paragraph)
- (autoload . unfill-region)
- (autoload . unfill-individual-paragraphs)
- (autoload . major-or-multi-majorp)
- (autoload . multi-major-modep)
- (autoload . major-modep)
- (autoload . ourcomments-move-beginning-of-line)
- (autoload . ourcomments-move-end-of-line)
- (autoload . describe-key-and-map-briefly)
- wrap-to-fill-left-marg wrap-to-fill-left-marg-modes
- (autoload . wrap-to-fill-column-mode)
- better-fringes-mode
- (autoload . better-fringes-mode)
- (autoload . find-emacs-other-file)
- (autoload . ourcomments-ediff-files)
- (autoload . describe-command)
- (autoload . describe-custom-group)
- (autoload . describe-defstruct)
- (autoload . describe-symbol)
- (autoload . ourcomments-ido-buffer-other-window)
- (autoload . ourcomments-ido-buffer-other-frame)
- (autoload . ourcomments-ido-buffer-raise-frame)
- ourcomments-ido-ctrl-tab
- (autoload . emacs)
- (autoload . emacs-buffer-file)
- (autoload . emacs--debug-init)
- (autoload . emacs-Q)
- (autoload . emacs-Q-nxhtml)
- (autoload . grep-query-replace)
- (autoload . info-open-file)
- (autoload . rnc-mode)
- (autoload . search-form)
- sex-mode
- (autoload . sex-mode)
- tabkey2-mode
- (autoload . tabkey2-mode)
- (autoload . tyda-lookup-word)
- (autoload . udev-cedet-update)
- (autoload . udev-ecb-update)
- (autoload . udev-rinari-update)
- (autoload . viper-tutorial)
- (autoload . winsav-put-window-tree)
- winsav-save-mode
- (autoload . winsav-save-mode)
- (autoload . winsav-save-named-config)
- (autoload . winsav-switch-config)
- (autoload . resize-windows)
- (autoload . winsize-balance-siblings)
- (autoload . winsize-save-window-configuration)
- (autoload . nxhtmlmaint-start-byte-compilation)
- (autoload . nxhtmlmaint-byte-uncompile-all))
- ("/usr/share/emacs/23.0.93/lisp/international/encoded-kb.elc" encoded-kbd-mode-map encoded-kbd-iso2022-esc-map encoded-kbd-iso2022-esc-dollar-map encoded-kbd-iso2022-designation-map encoded-kbd-iso2022-designations encoded-kbd-iso2022-invocations
- (defun . encoded-kbd-last-key)
- (defun . encoded-kbd-iso2022-designation)
- (defun . encoded-kbd-iso2022-single-shift)
- (defun . encoded-kbd-self-insert-iso2022-7bit)
- (defun . encoded-kbd-self-insert-iso2022-8bit)
- (defun . encoded-kbd-self-insert-sjis)
- (defun . encoded-kbd-self-insert-big5)
- (defun . encoded-kbd-self-insert-ccl)
- (defun . encoded-kbd-decode-code-list)
- (defun . encoded-kbd-self-insert-charset)
- (defun . encoded-kbd-self-insert-utf-8)
- (defun . encoded-kbd-setup-keymap)
- (t . encoded-kbd-setup-display)
- (defun . encoded-kbd-setup-display)
- (provide . encoded-kb))
- ("/usr/share/emacs/23.0.93/leim/leim-list.el"
- (autoload . ucs-input-activate)
- (autoload . hangul-input-method-activate))
- ("/usr/share/emacs/23.0.93/lisp/subdirs.el")
- ("/usr/share/emacs-snapshot/site-lisp/subdirs.el")
- ("/usr/share/emacs/23.0.93/lisp/site-init.elc")
- ("/usr/share/emacs/23.0.93/lisp/tooltip.elc" tooltip-mode
- (defun . tooltip-mode)
- tooltip-delay tooltip-short-delay tooltip-recent-seconds tooltip-hide-delay tooltip-x-offset tooltip-y-offset tooltip-frame-parameters
- (defface . tooltip)
- tooltip-use-echo-area tooltip-functions tooltip-hook tooltip-timeout-id tooltip-last-mouse-motion-event tooltip-hide-time
- (defun . tooltip-event-buffer)
- (defun . tooltip-delay)
- (defun . tooltip-cancel-delayed-tip)
- (defun . tooltip-start-delayed-tip)
- (defun . tooltip-timeout)
- (defun . tooltip-set-param)
- (defun . tooltip-show)
- (defun . tooltip-hide)
- (defun . tooltip-identifier-from-point)
- (defun . tooltip-region-active-p)
- (defun . tooltip-expr-to-print)
- (defun . tooltip-process-prompt-regexp)
- (defun . tooltip-strip-prompt)
- tooltip-help-message tooltip-previous-message
- (defun . tooltip-show-help-non-mode)
- (defun . tooltip-show-help)
- (defun . tooltip-help-tips)
- (provide . tooltip))
- ("/usr/share/emacs/23.0.93/lisp/ediff-hook.elc" menu-bar-ediff-misc-menu menu-bar-epatch-menu menu-bar-ediff-merge-menu menu-bar-ediff-menu
- (provide . ediff-hook))
- ("/usr/share/emacs/23.0.93/lisp/vc-hooks.elc" vc-ignore-vc-files vc-master-templates vc-header-alist vc-ignore-dir-regexp vc-handled-backends vc-directory-exclusion-list vc-path vc-make-backup-files vc-follow-symlinks vc-display-status vc-consult-headers vc-keep-workfiles vc-mistrust-permissions
- (defun . vc-mistrust-permissions)
- vc-stay-local
- (defun . vc-stay-local-p)
- (defun . vc-mode)
- (defun . vc-error-occurred)
- vc-file-prop-obarray vc-touched-properties
- (defun . vc-file-setprop)
- (defun . vc-file-getprop)
- (defun . vc-file-clearprops)
- (defun . vc-make-backend-sym)
- (defun . vc-find-backend-function)
- (defun . vc-call-backend)
- (defun . vc-call)
- (defun . vc-parse-buffer)
- (defun . vc-insert-file)
- (defun . vc-find-root)
- (defun . vc-registered)
- (defun . vc-backend)
- (defun . vc-backend-subdirectory-name)
- (defun . vc-name)
- (defun . vc-checkout-model)
- (defun . vc-user-login-name)
- (defun . vc-state)
- (defun . vc-up-to-date-p)
- (defun . vc-default-state-heuristic)
- (defun . vc-workfile-unchanged-p)
- (defun . vc-default-workfile-unchanged-p)
- (defun . vc-working-revision)
- (defun . vc-workfile-version)
- (defun . vc-default-working-revision)
- (defun . vc-default-registered)
- (defun . vc-possible-master)
- (defun . vc-check-master-templates)
- (defun . vc-toggle-read-only)
- (defun . vc-default-make-version-backups-p)
- (defun . vc-version-backup-file-name)
- (defun . vc-delete-automatic-version-backups)
- (defun . vc-make-version-backup)
- (defun . vc-before-save)
- (defun . vc-after-save)
- vc-menu-entry vc-mode-line-map vc-mode-line-map
- (defun . vc-mode-line)
- (defun . vc-default-mode-line-string)
- (defun . vc-follow-link)
- (defun . vc-default-find-file-hook)
- (defun . vc-find-file-hook)
- (defun . vc-file-not-found-hook)
- (defun . vc-default-find-file-not-found-hook)
- (defun . vc-kill-buffer-hook)
- vc-prefix-map vc-menu-map
- (defun . vc-menu-map)
- (defun . vc-menu-map-filter)
- (defun . vc-default-extra-menu)
- (provide . vc-hooks))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/float-sup.elc" pi e degrees-to-radians radians-to-degrees
- (defun . degrees-to-radians)
- (defun . radians-to-degrees)
- (provide . lisp-float-type))
- ("/usr/share/emacs/23.0.93/lisp/term/x-win.elc"
- (require . frame)
- (require . mouse)
- (require . scroll-bar)
- (require . faces)
- (require . select)
- (require . menu-bar)
- (require . fontset)
- (require . x-dnd)
- (defun . x-handle-no-bitmap-icon)
- (defun . x-handle-parent-id)
- (defun . x-handle-smid)
- emacs-save-session-functions
- (defun . emacs-session-filename)
- (defun . emacs-session-save)
- (defun . emacs-session-restore)
- x-pointer-X-cursor x-pointer-X-cursor x-pointer-arrow x-pointer-arrow x-pointer-based-arrow-down x-pointer-based-arrow-down x-pointer-based-arrow-up x-pointer-based-arrow-up x-pointer-boat x-pointer-boat x-pointer-bogosity x-pointer-bogosity x-pointer-bottom-left-corner x-pointer-bottom-left-corner x-pointer-bottom-right-corner x-pointer-bottom-right-corner x-pointer-bottom-side x-pointer-bottom-side x-pointer-bottom-tee x-pointer-bottom-tee x-pointer-box-spiral x-pointer-box-spiral x-pointer-center-ptr x-pointer-center-ptr x-pointer-circle x-pointer-circle x-pointer-clock x-pointer-clock x-pointer-coffee-mug x-pointer-coffee-mug x-pointer-cross x-pointer-cross x-pointer-cross-reverse x-pointer-cross-reverse x-pointer-crosshair x-pointer-crosshair x-pointer-diamond-cross x-pointer-diamond-cross x-pointer-dot x-pointer-dot x-pointer-dotbox x-pointer-dotbox x-pointer-double-arrow x-pointer-double-arrow x-pointer-draft-large x-pointer-draft-large x-pointer-draft-small x-pointer-draft-small x-pointer-draped-box x-pointer-draped-box x-pointer-exchange x-pointer-exchange x-pointer-fleur x-pointer-fleur x-pointer-gobbler x-pointer-gobbler x-pointer-gumby x-pointer-gumby x-pointer-hand1 x-pointer-hand1 x-pointer-hand2 x-pointer-hand2 x-pointer-heart x-pointer-heart x-pointer-icon x-pointer-icon x-pointer-iron-cross x-pointer-iron-cross x-pointer-left-ptr x-pointer-left-ptr x-pointer-left-side x-pointer-left-side x-pointer-left-tee x-pointer-left-tee x-pointer-leftbutton x-pointer-leftbutton x-pointer-ll-angle x-pointer-ll-angle x-pointer-lr-angle x-pointer-lr-angle x-pointer-man x-pointer-man x-pointer-middlebutton x-pointer-middlebutton x-pointer-mouse x-pointer-mouse x-pointer-pencil x-pointer-pencil x-pointer-pirate x-pointer-pirate x-pointer-plus x-pointer-plus x-pointer-question-arrow x-pointer-question-arrow x-pointer-right-ptr x-pointer-right-ptr x-pointer-right-side x-pointer-right-side x-pointer-right-tee x-pointer-right-tee x-pointer-rightbutton x-pointer-rightbutton x-pointer-rtl-logo x-pointer-rtl-logo x-pointer-sailboat x-pointer-sailboat x-pointer-sb-down-arrow x-pointer-sb-down-arrow x-pointer-sb-h-double-arrow x-pointer-sb-h-double-arrow x-pointer-sb-left-arrow x-pointer-sb-left-arrow x-pointer-sb-right-arrow x-pointer-sb-right-arrow x-pointer-sb-up-arrow x-pointer-sb-up-arrow x-pointer-sb-v-double-arrow x-pointer-sb-v-double-arrow x-pointer-shuttle x-pointer-shuttle x-pointer-sizing x-pointer-sizing x-pointer-spider x-pointer-spider x-pointer-spraycan x-pointer-spraycan x-pointer-star x-pointer-star x-pointer-target x-pointer-target x-pointer-tcross x-pointer-tcross x-pointer-top-left-arrow x-pointer-top-left-arrow x-pointer-top-left-corner x-pointer-top-left-corner x-pointer-top-right-corner x-pointer-top-right-corner x-pointer-top-side x-pointer-top-side x-pointer-top-tee x-pointer-top-tee x-pointer-trek x-pointer-trek x-pointer-ul-angle x-pointer-ul-angle x-pointer-umbrella x-pointer-umbrella x-pointer-ur-angle x-pointer-ur-angle x-pointer-watch x-pointer-watch x-pointer-xterm x-pointer-xterm x-pointer-invisible x-pointer-invisible
- (defun . xw-defined-colors)
- x-alternatives-map
- (defun . x-setup-function-keys)
- (defun . vendor-specific-keysyms)
- x-last-selected-text-clipboard x-last-selected-text-primary x-last-selected-text-cut x-last-selected-text-cut-encoded x-last-cut-buffer-coding x-cut-buffer-max x-select-enable-clipboard x-select-enable-primary
- (defun . x-select-text)
- x-select-request-type
- (defun . x-selection-value)
- (defun . x-cut-buffer-or-selection-value)
- (defun . x-clipboard-yank)
- (defun . x-menu-bar-open)
- (defun . x-win-suspend-error)
- x-initialized
- (defun . x-initialize-window-system)
- x-gtk-stock-map icon-map-list x-gtk-stock-cache x-gtk-stock-cache
- (defun . x-gtk-map-stock)
- (provide . x-win))
- ("/usr/share/emacs/23.0.93/lisp/term/common-win.elc" x-command-line-resources
- (defun . x-handle-switch)
- (defun . x-handle-numeric-switch)
- (defun . x-handle-initial-switch)
- (defun . x-handle-iconic)
- (defun . x-handle-xrm-switch)
- (defun . x-handle-geometry)
- (defun . x-handle-name-switch)
- x-display-name
- (defun . x-handle-display)
- (defun . x-handle-args)
- x-colors)
- ("/usr/share/emacs/23.0.93/lisp/x-dnd.elc"
- (require . dnd)
- x-dnd-test-function x-dnd-types-alist x-dnd-known-types x-dnd-current-state x-dnd-empty-state
- (defun . x-dnd-init-frame)
- (defun . x-dnd-get-state-cons-for-frame)
- (defun . x-dnd-get-state-for-frame)
- (defun . x-dnd-default-test-function)
- (defun . x-dnd-current-type)
- (defun . x-dnd-forget-drop)
- (defun . x-dnd-maybe-call-test-function)
- (defun . x-dnd-save-state)
- (defun . x-dnd-handle-moz-url)
- (defun . x-dnd-insert-utf8-text)
- (defun . x-dnd-insert-utf16-text)
- (defun . x-dnd-insert-ctext)
- (defun . x-dnd-handle-uri-list)
- (defun . x-dnd-handle-file-name)
- (defun . x-dnd-choose-type)
- (defun . x-dnd-drop-data)
- (defun . x-dnd-handle-drag-n-drop-event)
- (defun . x-dnd-handle-old-kde)
- x-dnd-xdnd-to-action
- (defun . x-dnd-init-xdnd-for-frame)
- (defun . x-dnd-get-drop-width-height)
- (defun . x-dnd-get-drop-x-y)
- (defun . x-dnd-handle-xdnd)
- (defun . x-dnd-init-motif-for-frame)
- (defun . x-dnd-get-motif-value)
- (defun . x-dnd-motif-value-to-list)
- x-dnd-motif-message-types x-dnd-motif-to-action
- (defun . x-dnd-handle-motif)
- (provide . x-dnd))
- ("/usr/share/emacs/23.0.93/lisp/tool-bar.elc" tool-bar-mode
- (defun . tool-bar-mode)
- (t . toggle-tool-bar-mode-from-frame)
- (defun . toggle-tool-bar-mode-from-frame)
- tool-bar-map tool-bar-keymap-cache tool-bar-keymap-cache
- (defun . tool-bar-make-keymap)
- (defun . tool-bar-make-keymap-1)
- (t . tool-bar-add-item)
- (defun . tool-bar-add-item)
- (t . tool-bar-local-item)
- (defun . tool-bar-local-item)
- (t . tool-bar-add-item-from-menu)
- (defun . tool-bar-add-item-from-menu)
- (t . tool-bar-local-item-from-menu)
- (defun . tool-bar-local-item-from-menu)
- (defun . tool-bar-setup)
- (provide . tool-bar))
- ("/usr/share/emacs/23.0.93/lisp/mwheel.elc"
- (require . custom)
- (require . timer)
- (defun . mouse-wheel-change-button)
- mouse-wheel-down-button mouse-wheel-down-event mouse-wheel-up-button mouse-wheel-up-event mouse-wheel-click-button mouse-wheel-click-event mouse-wheel-inhibit-click-time mouse-wheel-scroll-amount mouse-wheel-progressive-speed mouse-wheel-follow-mouse
- (defun . mwheel-event-button)
- (defun . mwheel-event-window)
- mwheel-inhibit-click-event-timer
- (defun . mwheel-inhibit-click-timeout)
- (defun . mwheel-filter-click-events)
- (defun . mwheel-scroll)
- mouse-wheel-mode
- (t . mouse-wheel-mode)
- (defun . mouse-wheel-mode)
- (t . mwheel-install)
- (defun . mwheel-install)
- (provide . mwheel))
- ("/usr/share/emacs/23.0.93/lisp/dnd.elc" dnd-protocol-alist dnd-open-remote-file-function dnd-open-file-other-window
- (defun . dnd-handle-one-url)
- (defun . dnd-get-local-file-uri)
- (defun . dnd-get-local-file-name)
- (defun . dnd-open-local-file)
- (defun . dnd-open-remote-url)
- (defun . dnd-open-file)
- (defun . dnd-insert-text)
- (provide . dnd))
- ("/usr/share/emacs/23.0.93/lisp/international/fontset.elc"
- (defun . setup-default-fontset)
- (defun . create-default-fontset)
- (defun . set-font-encoding)
- x-font-name-charset-alist xlfd-regexp-family-subnum xlfd-regexp-family-subnum xlfd-regexp-weight-subnum xlfd-regexp-weight-subnum xlfd-regexp-slant-subnum xlfd-regexp-slant-subnum xlfd-regexp-swidth-subnum xlfd-regexp-swidth-subnum xlfd-regexp-adstyle-subnum xlfd-regexp-adstyle-subnum xlfd-regexp-pixelsize-subnum xlfd-regexp-pixelsize-subnum xlfd-regexp-pointsize-subnum xlfd-regexp-pointsize-subnum xlfd-regexp-resx-subnum xlfd-regexp-resx-subnum xlfd-regexp-resy-subnum xlfd-regexp-resy-subnum xlfd-regexp-spacing-subnum xlfd-regexp-spacing-subnum xlfd-regexp-avgwidth-subnum xlfd-regexp-avgwidth-subnum xlfd-regexp-registry-subnum xlfd-regexp-registry-subnum xlfd-tight-regexp xlfd-tight-regexp xlfd-style-regexp xlfd-style-regexp xlfd-regexp-numeric-subnums xlfd-regexp-numeric-subnums
- (defun . x-decompose-font-name)
- (defun . x-compose-font-name)
- (defun . x-must-resolve-font-name)
- (defun . x-complement-fontset-spec)
- (defun . fontset-name-p)
- (defun . generate-fontset-menu)
- (defun . fontset-plain-name)
- charset-script-alist
- (defun . create-fontset-from-fontset-spec)
- (defun . create-fontset-from-ascii-font)
- standard-fontset-spec
- (defun . create-fontset-from-x-resource)
- (provide . fontset))
- ("/usr/share/emacs/23.0.93/lisp/image.elc" image-type-header-regexps image-type-file-name-regexps image-type-auto-detectable image-load-path
- (defun . image-load-path-for-library)
- (defun . image-jpeg-p)
- (t . image-type-from-data)
- (defun . image-type-from-data)
- (t . image-type-from-buffer)
- (defun . image-type-from-buffer)
- (t . image-type-from-file-header)
- (defun . image-type-from-file-header)
- (t . image-type-from-file-name)
- (defun . image-type-from-file-name)
- (t . image-type)
- (defun . image-type)
- (t . image-type-available-p)
- (defun . image-type-available-p)
- (t . image-type-auto-detected-p)
- (defun . image-type-auto-detected-p)
- (t . create-image)
- (defun . create-image)
- (t . put-image)
- (defun . put-image)
- (t . insert-image)
- (defun . insert-image)
- (t . insert-sliced-image)
- (defun . insert-sliced-image)
- (t . remove-images)
- (defun . remove-images)
- (defun . image-search-load-path)
- (t . find-image)
- (defun . find-image)
- (t . defimage)
- (defun . defimage)
- (provide . image))
- ("/usr/share/emacs/23.0.93/lisp/fringe.elc"
- (defun . fringe-bitmap-p)
- fringe-mode-explicit
- (defun . set-fringe-mode-1)
- (defun . set-fringe-mode)
- (defun . fringe-mode-initialize)
- fringe-mode
- (defun . fringe-query-style)
- (defun . fringe-mode)
- (defun . set-fringe-style)
- (defun . fringe-columns)
- (provide . fringe))
- ("/usr/share/emacs/23.0.93/lisp/buff-menu.elc" Buffer-menu-use-header-line
- (defface . buffer-menu-buffer)
- Buffer-menu-buffer+size-width Buffer-menu-mode-width Buffer-menu-use-frame-buffer-list Buffer-menu-sort-column Buffer-menu-buffer-column Buffer-menu-buffer-column Buffer-menu-files-only Buffer-menu-mode-map Buffer-menu-mode-map Buffer-menu-mode-syntax-table Buffer-menu-mode-abbrev-table Buffer-menu-mode-abbrev-table
- (defun . Buffer-menu-mode)
- buffer-menu-mode-hook
- (defun . Buffer-menu-revert-function)
- (defun . Buffer-menu-toggle-files-only)
- (defun . Buffer-menu-buffer)
- (defun . buffer-menu)
- (defun . buffer-menu-other-window)
- (defun . Buffer-menu-no-header)
- (defun . Buffer-menu-mark)
- (defun . Buffer-menu-unmark)
- (defun . Buffer-menu-backup-unmark)
- (defun . Buffer-menu-delete)
- (defun . Buffer-menu-delete-backwards)
- (defun . Buffer-menu-save)
- (defun . Buffer-menu-not-modified)
- (defun . Buffer-menu-beginning)
- (defun . Buffer-menu-execute)
- (defun . Buffer-menu-select)
- (defun . Buffer-menu-marked-buffers)
- (defun . Buffer-menu-isearch-buffers)
- (defun . Buffer-menu-isearch-buffers-regexp)
- (defun . Buffer-menu-visit-tags-table)
- (defun . Buffer-menu-1-window)
- (defun . Buffer-menu-mouse-select)
- (defun . Buffer-menu-this-window)
- (defun . Buffer-menu-other-window)
- (defun . Buffer-menu-switch-other-window)
- (defun . Buffer-menu-2-window)
- (defun . Buffer-menu-toggle-read-only)
- (defun . Buffer-menu-bury)
- (defun . Buffer-menu-view)
- (defun . Buffer-menu-view-other-window)
- (defun . list-buffers)
- Buffer-menu-short-ellipsis Buffer-menu-short-ellipsis
- (defun . Buffer-menu-buffer+size)
- (defun . Buffer-menu-sort)
- (defun . Buffer-menu-sort-by-column)
- Buffer-menu-sort-button-map
- (defun . Buffer-menu-make-sort-button)
- (defun . list-buffers-noselect))
- ("/usr/share/emacs/23.0.93/lisp/replace.elc" case-replace query-replace-history query-replace-defaults query-replace-interactive query-replace-from-history-variable query-replace-to-history-variable query-replace-skip-read-only query-replace-show-replacement query-replace-highlight query-replace-lazy-highlight
- (defface . query-replace)
- (defun . query-replace-descr)
- (defun . query-replace-read-from)
- (defun . query-replace-compile-replacement)
- (defun . query-replace-read-to)
- (defun . query-replace-read-args)
- (defun . query-replace)
- (defun . query-replace-regexp)
- (defun . query-replace-regexp-eval)
- (defun . map-query-replace-regexp)
- (defun . replace-string)
- (defun . replace-regexp)
- regexp-history
- (defun . read-regexp)
- (defun . delete-non-matching-lines)
- (defun . delete-matching-lines)
- (defun . count-matches)
- (defun . keep-lines-read-args)
- (defun . keep-lines)
- (defun . flush-lines)
- (defun . how-many)
- occur-mode-map occur-revert-arguments occur-mode-hook occur-hook occur-mode-find-occurrence-hook
- (defun . occur-mode)
- (defun . occur-revert-function)
- (defun . occur-mode-find-occurrence)
- (defun . occur-mode-mouse-goto)
- (defun . occur-mode-goto-occurrence)
- (defun . occur-mode-goto-occurrence-other-window)
- (defun . occur-mode-display-occurrence)
- (defun . occur-find-match)
- (defun . occur-next)
- (defun . occur-prev)
- (defun . occur-next-error)
- (defface . match)
- list-matching-lines-default-context-lines
- (defun . list-matching-lines)
- list-matching-lines-face list-matching-lines-buffer-name-face occur-excluded-properties
- (defun . occur-accumulate-lines)
- (defun . occur-read-primary-args)
- (defun . occur-rename-buffer)
- (defun . occur)
- (defun . multi-occur)
- (defun . multi-occur-in-matching-buffers)
- (defun . occur-1)
- (defun . occur-engine-add-prefix)
- (defun . occur-engine)
- (defun . occur-context-lines)
- query-replace-help query-replace-map multi-query-replace-map
- (defun . replace-match-string-symbols)
- (defun . replace-eval-replacement)
- (defun . replace-quote)
- (defun . replace-loop-through-replacements)
- (defun . replace-match-data)
- (defun . replace-match-maybe-edit)
- replace-search-function replace-re-search-function
- (defun . perform-replace)
- replace-overlay
- (defun . replace-highlight)
- (defun . replace-dehighlight))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/fill.elc" fill-individual-varying-indent colon-double-space fill-paragraph-function fill-paragraph-handle-comment enable-kinsoku
- (defun . set-fill-prefix)
- adaptive-fill-mode adaptive-fill-regexp adaptive-fill-first-line-regexp adaptive-fill-function fill-indent-according-to-mode
- (defun . current-fill-column)
- (defun . canonically-space-region)
- (defun . fill-common-string-prefix)
- (defun . fill-match-adaptive-prefix)
- (defun . fill-context-prefix)
- (defun . fill-single-word-nobreak-p)
- (defun . fill-french-nobreak-p)
- fill-nobreak-predicate fill-nobreak-invisible
- (defun . fill-nobreak-p)
- fill-find-break-point-function-table fill-nospace-between-words-table
- (defun . fill-find-break-point)
- (defun . fill-delete-prefix)
- (defun . fill-delete-newlines)
- (defun . fill-move-to-break-point)
- (defun . fill-text-properties-at)
- (defun . fill-newline)
- (defun . fill-indent-to-left-margin)
- (defun . fill-region-as-paragraph)
- (defun . skip-line-prefix)
- (defun . fill-minibuffer-function)
- fill-forward-paragraph-function
- (defun . fill-forward-paragraph)
- (defun . fill-paragraph)
- (defun . fill-comment-paragraph)
- (defun . fill-region)
- default-justification
- (defun . current-justification)
- (defun . set-justification)
- (defun . set-justification-none)
- (defun . set-justification-left)
- (defun . set-justification-right)
- (defun . set-justification-full)
- (defun . set-justification-center)
- (defun . justify-current-line)
- (defun . unjustify-current-line)
- (defun . unjustify-region)
- (defun . fill-nonuniform-paragraphs)
- (defun . fill-individual-paragraphs)
- (defun . fill-individual-paragraphs-prefix)
- (defun . fill-individual-paragraphs-citation))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/text-mode.elc" text-mode-hook text-mode-variant text-mode-syntax-table text-mode-map text-mode-map text-mode-syntax-table text-mode-abbrev-table text-mode-abbrev-table
- (defun . text-mode)
- paragraph-indent-text-mode-map
- (defun . paragraph-indent-text-mode)
- (defun . paragraph-indent-minor-mode)
- (defun . indented-text-mode)
- (defun . text-mode-hook-identify)
- (defun . toggle-text-mode-auto-fill)
- (defun . center-paragraph)
- (defun . center-region)
- (defun . center-line))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/lisp-mode.elc" lisp-mode-abbrev-table lisp-mode-abbrev-table emacs-lisp-mode-syntax-table lisp-mode-syntax-table lisp-imenu-generic-expression lisp-doc-string-elt-property
- (defun . lisp-font-lock-syntactic-face-function)
- (defun . lisp-mode-variables)
- (defun . lisp-outline-level)
- lisp-mode-shared-map emacs-lisp-mode-map
- (defun . emacs-lisp-byte-compile)
- (defun . emacs-lisp-byte-compile-and-load)
- emacs-lisp-mode-hook lisp-mode-hook lisp-interaction-mode-hook
- (defun . emacs-lisp-mode)
- lisp-mode-map
- (defun . lisp-mode)
- (defun . lisp-find-tag-default)
- (defun . common-lisp-mode)
- (defun . lisp-eval-defun)
- lisp-interaction-mode-map lisp-interaction-mode-abbrev-table lisp-interaction-mode-map lisp-interaction-mode-syntax-table lisp-interaction-mode-abbrev-table
- (defun . lisp-interaction-mode)
- (defun . eval-print-last-sexp)
- (defun . last-sexp-setup-props)
- (defun . last-sexp-toggle-display)
- (defun . prin1-char)
- (defun . preceding-sexp)
- (defun . eval-last-sexp-1)
- (defun . eval-last-sexp-print-value)
- eval-last-sexp-fake-value
- (defun . eval-last-sexp)
- (defun . eval-defun-1)
- (defun . eval-defun-2)
- (defun . eval-defun)
- (defun . lisp-comment-indent)
- (defun . lisp-mode-auto-fill)
- lisp-indent-offset lisp-indent-function
- (defun . lisp-indent-line)
- (defun . calculate-lisp-indent)
- (defun . lisp-indent-function)
- lisp-body-indent
- (defun . lisp-indent-specform)
- (defun . lisp-indent-defform)
- (defun . indent-sexp)
- (defun . lisp-indent-region)
- (defun . indent-pp-sexp)
- emacs-lisp-docstring-fill-column
- (defun . lisp-fill-paragraph)
- (defun . indent-code-rigidly)
- (provide . lisp-mode))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/paragraphs.elc" use-hard-newlines
- (defun . use-hard-newlines)
- paragraph-start paragraph-separate sentence-end-double-space sentence-end-without-period sentence-end-without-space sentence-end sentence-end-base
- (defun . sentence-end)
- page-delimiter paragraph-ignore-fill-prefix
- (defun . forward-paragraph)
- (defun . backward-paragraph)
- (defun . mark-paragraph)
- (defun . kill-paragraph)
- (defun . backward-kill-paragraph)
- (defun . transpose-paragraphs)
- (defun . start-of-paragraph-text)
- (defun . end-of-paragraph-text)
- (defun . forward-sentence)
- (defun . repunctuate-sentences)
- (defun . backward-sentence)
- (defun . kill-sentence)
- (defun . backward-kill-sentence)
- (defun . mark-end-of-sentence)
- (defun . transpose-sentences))
- ("/usr/share/emacs/23.0.93/lisp/register.elc" register-alist
- (defun . get-register)
- (defun . set-register)
- (defun . point-to-register)
- (defun . window-configuration-to-register)
- (defun . frame-configuration-to-register)
- (defun . register-to-point)
- (defun . jump-to-register)
- (defun . register-swap-out)
- (defun . number-to-register)
- (defun . increment-register)
- (defun . view-register)
- (defun . list-registers)
- (defun . describe-register-1)
- (defun . insert-register)
- (defun . copy-to-register)
- (defun . append-to-register)
- (defun . prepend-to-register)
- (defun . copy-rectangle-to-register)
- (provide . register))
- ("/usr/share/emacs/23.0.93/lisp/textmodes/page.elc"
- (defun . forward-page)
- (defun . backward-page)
- (defun . mark-page)
- (defun . narrow-to-page)
- (defun . count-lines-page)
- (defun . what-page)
- (provide . page))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/lisp.elc" defun-prompt-regexp parens-require-spaces forward-sexp-function
- (defun . forward-sexp)
- (defun . backward-sexp)
- (defun . mark-sexp)
- (defun . forward-list)
- (defun . backward-list)
- (defun . down-list)
- (defun . backward-up-list)
- (defun . up-list)
- (defun . kill-sexp)
- (defun . backward-kill-sexp)
- (defun . kill-backward-up-list)
- beginning-of-defun-function
- (defun . beginning-of-defun)
- (defun . beginning-of-defun-raw)
- end-of-defun-function
- (defun . buffer-end)
- (defun . end-of-defun)
- (defun . mark-defun)
- (defun . narrow-to-defun)
- insert-pair-alist
- (defun . insert-pair)
- (defun . insert-parentheses)
- (defun . delete-pair)
- (defun . raise-sexp)
- (defun . move-past-close-and-reindent)
- (defun . check-parens)
- (defun . field-complete)
- (defun . lisp-complete-symbol))
- ("/usr/share/emacs/23.0.93/lisp/paths.el"
- (defun . prune-directory-list)
- Info-default-directory-list news-directory news-path news-inews-program gnus-default-nntp-server gnus-nntp-service gnus-local-organization rmail-file-name rmail-spool-directory remote-shell-program term-file-prefix abbrev-file-name)
- ("/usr/share/emacs/23.0.93/lisp/menu-bar.elc" menu-bar-help-menu menu-bar-tools-menu global-buffers-menu-map menu-bar-options-menu menu-bar-edit-menu menu-bar-file-menu menu-bar-files-menu
- (defun . menu-find-file-existing)
- menu-bar-last-search-type
- (defun . nonincremental-repeat-search-forward)
- (defun . nonincremental-repeat-search-backward)
- (defun . nonincremental-search-forward)
- (defun . nonincremental-search-backward)
- (defun . nonincremental-re-search-forward)
- (defun . nonincremental-re-search-backward)
- menu-bar-search-menu menu-bar-i-search-menu menu-bar-replace-menu menu-bar-goto-menu
- (defun . menu-bar-next-tag-other-window)
- (defun . menu-bar-next-tag)
- yank-menu
- (defun . menu-bar-kill-ring-save)
- (defun . clipboard-yank)
- (defun . clipboard-kill-ring-save)
- (defun . clipboard-kill-region)
- (defun . menu-bar-enable-clipboard)
- menu-bar-custom-menu
- (defun . menu-bar-make-mm-toggle)
- (defun . menu-bar-make-toggle)
- (defun . menu-set-font)
- (defun . menu-bar-options-save)
- menu-bar-showhide-menu menu-bar-showhide-fringe-menu menu-bar-showhide-fringe-ind-menu
- (defun . menu-bar-showhide-fringe-ind-customize)
- (defun . menu-bar-showhide-fringe-ind-mixed)
- (defun . menu-bar-showhide-fringe-ind-box)
- (defun . menu-bar-showhide-fringe-ind-right)
- (defun . menu-bar-showhide-fringe-ind-left)
- (defun . menu-bar-showhide-fringe-ind-none)
- (defun . toggle-indicate-empty-lines)
- (defun . menu-bar-showhide-fringe-menu-customize)
- (defun . menu-bar-showhide-fringe-menu-customize-reset)
- (defun . menu-bar-showhide-fringe-menu-customize-right)
- (defun . menu-bar-showhide-fringe-menu-customize-left)
- (defun . menu-bar-showhide-fringe-menu-customize-disable)
- menu-bar-showhide-scroll-bar-menu
- (defun . menu-bar-right-scroll-bar)
- (defun . menu-bar-left-scroll-bar)
- (defun . menu-bar-no-scroll-bar)
- (defun . toggle-debug-on-quit)
- (defun . toggle-debug-on-error)
- (defun . toggle-save-place-globally)
- (defun . toggle-uniquify-buffer-names)
- (defun . toggle-case-fold-search)
- (defun . menu-bar-text-mode-auto-fill)
- menu-bar-line-wrapping-menu
- (defun . send-mail-item-name)
- (defun . read-mail-item-name)
- menu-bar-games-menu menu-bar-encryption-decryption-menu
- (defun . menu-bar-read-mail)
- menu-bar-describe-menu menu-bar-search-documentation-menu
- (defun . menu-bar-read-lispref)
- (defun . menu-bar-read-lispintro)
- (defun . search-emacs-glossary)
- (defun . emacs-index-search)
- (defun . elisp-index-search)
- (defun . debian-emacs-changelog)
- (defun . debian-emacs-news)
- (defun . debian-emacs-readme)
- menu-bar-manuals-menu
- (defun . menu-bar-help-extra-packages)
- (defun . help-with-tutorial-spec-language)
- (defun . menu-bar-menu-frame-live-and-visible-p)
- (defun . menu-bar-non-minibuffer-window-p)
- (defun . kill-this-buffer)
- (defun . kill-this-buffer-enabled-p)
- (defun . delete-frame-enabled-p)
- yank-menu-length
- (defun . menu-bar-update-yank-menu)
- (defun . menu-bar-select-yank)
- buffers-menu-max-size buffers-menu-buffer-name-length buffers-menu-show-directories buffers-menu-show-status list-buffers-directory
- (defun . menu-bar-select-buffer)
- (defun . menu-bar-select-frame)
- (defun . menu-bar-update-buffers-1)
- menu-bar-buffers-menu-command-entries
- (defun . menu-bar-update-buffers)
- menu-bar-mode
- (defun . menu-bar-mode)
- (defun . toggle-menu-bar-mode-from-frame)
- (defun . menu-bar-open)
- (provide . menu-bar))
- ("/usr/share/emacs/23.0.93/lisp/rfn-eshadow.elc" file-name-shadow-properties-custom-type file-name-shadow-properties-custom-type file-name-shadow-properties file-name-shadow-tty-properties
- (defface . file-name-shadow)
- rfn-eshadow-setup-minibuffer-hook rfn-eshadow-update-overlay-hook rfn-eshadow-frobbed-minibufs
- (defun . rfn-eshadow-setup-minibuffer)
- (defun . rfn-eshadow-sifn-equal)
- (defun . rfn-eshadow-update-overlay)
- file-name-shadow-mode
- (defun . file-name-shadow-mode)
- (provide . rfn-eshadow))
- ("/usr/share/emacs/23.0.93/lisp/isearch.elc" search-exit-option search-slow-window-lines search-slow-speed search-upper-case search-nonincremental-instead search-whitespace-regexp search-invisible isearch-hide-immediately isearch-resume-in-command-history isearch-mode-hook isearch-mode-end-hook isearch-mode-end-hook-quit isearch-message-function isearch-wrap-function isearch-push-state-function isearch-filter-predicate search-ring regexp-search-ring search-ring-max regexp-search-ring-max search-ring-yank-pointer regexp-search-ring-yank-pointer search-ring-update search-highlight
- (defface . isearch)
- isearch
- (defface . isearch-fail)
- isearch-lazy-highlight lazy-highlight-cleanup isearch-lazy-highlight-cleanup lazy-highlight-initial-delay isearch-lazy-highlight-initial-delay lazy-highlight-interval isearch-lazy-highlight-interval lazy-highlight-max-at-a-time isearch-lazy-highlight-max-at-a-time
- (defface . lazy-highlight)
- lazy-highlight-face isearch-lazy-highlight-face isearch-help-map
- (defun . isearch-help-for-help-internal-doc)
- (defun . isearch-help-for-help-internal)
- (defun . isearch-help-for-help)
- (defun . isearch-describe-bindings)
- (defun . isearch-describe-key)
- (defun . isearch-describe-mode)
- (defun . isearch-mode-help)
- isearch-mode-map minibuffer-local-isearch-map isearch-forward isearch-regexp isearch-word isearch-hidden isearch-cmds isearch-string isearch-message isearch-message-prefix-add isearch-message-suffix-add isearch-success isearch-error isearch-other-end isearch-wrapped isearch-barrier isearch-just-started isearch-start-hscroll isearch-case-fold-search isearch-last-case-fold-search isearch-original-minibuffer-message-timeout isearch-adjusted isearch-slow-terminal-mode isearch-small-window isearch-opoint isearch-window-configuration isearch-yank-flag isearch-op-fun isearch-recursive-edit isearch-nonincremental isearch-new-forward isearch-opened-overlays isearch-input-method-function isearch-input-method-local-p isearch-mode
- (defun . isearch-forward)
- (defun . isearch-forward-regexp)
- (defun . isearch-forward-word)
- (defun . isearch-backward)
- (defun . isearch-backward-regexp)
- (defun . isearch-mode)
- (defun . isearch-update)
- (defun . isearch-done)
- (defun . isearch-update-ring)
- (defun . isearch-string-state)
- (defun . isearch-message-state)
- (defun . isearch-point-state)
- (defun . isearch-success-state)
- (defun . isearch-forward-state)
- (defun . isearch-other-end-state)
- (defun . isearch-word-state)
- (defun . isearch-error-state)
- (defun . isearch-wrapped-state)
- (defun . isearch-barrier-state)
- (defun . isearch-case-fold-search-state)
- (defun . isearch-pop-fun-state)
- (defun . isearch-top-state)
- (defun . isearch-pop-state)
- (defun . isearch-push-state)
- (defun . isearch-exit)
- (defun . isearch-edit-string)
- (defun . isearch-nonincremental-exit-minibuffer)
- (defun . isearch-forward-exit-minibuffer)
- (defun . isearch-reverse-exit-minibuffer)
- (defun . isearch-cancel)
- (defun . isearch-abort)
- (defun . isearch-repeat)
- (defun . isearch-repeat-forward)
- (defun . isearch-repeat-backward)
- (defun . isearch-toggle-regexp)
- (defun . isearch-toggle-word)
- (defun . isearch-toggle-case-fold)
- (defun . isearch-query-replace)
- (defun . isearch-query-replace-regexp)
- (defun . isearch-occur)
- (defun . isearch-highlight-regexp)
- (defun . isearch-delete-char)
- (defun . isearch-del-char)
- (defun . isearch-yank-string)
- (defun . isearch-yank-kill)
- (defun . isearch-yank-x-selection)
- (defun . isearch-mouse-2)
- (defun . isearch-yank-internal)
- (defun . isearch-yank-char-in-minibuffer)
- (defun . isearch-yank-char)
- (defun . isearch-yank-word-or-char)
- (defun . isearch-yank-word)
- (defun . isearch-yank-line)
- (defun . isearch-search-and-update)
- (defun . isearch-backslash)
- (defun . isearch-fallback)
- (defun . isearch-unread-key-sequence)
- isearch-allow-scroll
- (defun . isearch-string-out-of-window)
- (defun . isearch-back-into-window)
- (defun . isearch-reread-key-sequence-naturally)
- (defun . isearch-lookup-scroll-key)
- (defun . isearch-other-control-char)
- (defun . isearch-other-meta-char)
- (defun . isearch-quote-char)
- (defun . isearch-return-char)
- (defun . isearch-printing-char)
- (defun . isearch-process-search-char)
- (defun . isearch-process-search-string)
- (defun . isearch-ring-adjust1)
- (defun . isearch-ring-adjust)
- (defun . isearch-ring-advance)
- (defun . isearch-ring-retreat)
- (defun . isearch-complete1)
- (defun . isearch-complete)
- (defun . isearch-complete-edit)
- (defun . isearch-message)
- (defun . isearch-message-prefix)
- (defun . isearch-message-suffix)
- isearch-search-fun-function
- (defun . isearch-search-fun)
- (defun . isearch-search-string)
- (defun . isearch-search)
- (defun . isearch-open-overlay-temporary)
- (defun . isearch-open-necessary-overlays)
- (defun . isearch-clean-overlays)
- (defun . isearch-intersects-p)
- (defun . isearch-close-unnecessary-overlays)
- (defun . isearch-range-invisible)
- (defun . isearch-filter-visible)
- (defun . isearch-no-upper-case-p)
- (defun . isearch-text-char-description)
- (defun . isearch-unread)
- isearch-overlay
- (defun . isearch-highlight)
- (defun . isearch-dehighlight)
- isearch-lazy-highlight-overlays isearch-lazy-highlight-wrapped isearch-lazy-highlight-start-limit isearch-lazy-highlight-end-limit isearch-lazy-highlight-start isearch-lazy-highlight-end isearch-lazy-highlight-timer isearch-lazy-highlight-last-string isearch-lazy-highlight-window isearch-lazy-highlight-window-start isearch-lazy-highlight-window-end isearch-lazy-highlight-case-fold-search isearch-lazy-highlight-regexp isearch-lazy-highlight-space-regexp
- (defun . lazy-highlight-cleanup)
- (defun . isearch-lazy-highlight-cleanup)
- (defun . isearch-lazy-highlight-new-loop)
- (defun . isearch-lazy-highlight-search)
- (defun . isearch-lazy-highlight-update)
- (defun . isearch-resume))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/timer.elc"
- (defun . timer--triggered)
- (defun . timer--high-seconds)
- (defun . timer--low-seconds)
- (defun . timer--usecs)
- (defun . timer--repeat-delay)
- (defun . timer--function)
- (defun . timer--args)
- (defun . timer--idle-delay)
- (defun . timer-create)
- (defun . timerp)
- (defun . timer--time)
- (defun . timer-set-time)
- (defun . timer-set-idle-time)
- (defun . timer-next-integral-multiple-of-time)
- (defun . timer-relative-time)
- (defun . timer--time-less-p)
- (defun . timer-inc-time)
- (defun . timer-set-time-with-usecs)
- (defun . timer-set-function)
- (defun . timer--activate)
- (defun . timer-activate)
- (defun . timer-activate-when-idle)
- (defun . disable-timeout)
- (defun . cancel-timer)
- (defun . cancel-timer-internal)
- (defun . cancel-function-timers)
- timer-event-last timer-event-last-1 timer-event-last-2 timer-max-repeats
- (defun . timer-until)
- (defun . timer-event-handler)
- (defun . timeout-event-p)
- (defun . run-at-time)
- (defun . run-with-timer)
- (defun . add-timeout)
- (defun . run-with-idle-timer)
- (defun . with-timeout-handler)
- with-timeout-timers
- (defun . with-timeout)
- (defun . with-timeout-suspend)
- (defun . with-timeout-unsuspend)
- (defun . y-or-n-p-with-timeout)
- timer-duration-words
- (defun . timer-duration)
- (provide . timer))
- ("/usr/share/emacs/23.0.93/lisp/select.elc" selection-coding-system next-selection-coding-system
- (defun . x-selection)
- (defun . x-get-selection)
- (defun . x-get-clipboard)
- (defun . x-set-selection)
- (defun . x-valid-simple-selection-p)
- (defun . x-get-cut-buffer)
- (defun . x-set-cut-buffer)
- (defun . xselect-convert-to-string)
- (defun . xselect-convert-to-length)
- (defun . xselect-convert-to-targets)
- (defun . xselect-convert-to-delete)
- (defun . xselect-convert-to-filename)
- (defun . xselect-convert-to-charpos)
- (defun . xselect-convert-to-lineno)
- (defun . xselect-convert-to-colno)
- (defun . xselect-convert-to-os)
- (defun . xselect-convert-to-host)
- (defun . xselect-convert-to-user)
- (defun . xselect-convert-to-class)
- (defun . xselect-convert-to-name)
- (defun . xselect-convert-to-integer)
- (defun . xselect-convert-to-atom)
- (defun . xselect-convert-to-identity)
- (provide . select))
- ("/usr/share/emacs/23.0.93/lisp/scroll-bar.elc"
- (require . mouse)
- (defun . scroll-bar-event-ratio)
- (defun . scroll-bar-scale)
- (defun . scroll-bar-columns)
- previous-scroll-bar-mode scroll-bar-mode-explicit
- (defun . set-scroll-bar-mode-1)
- (defun . set-scroll-bar-mode)
- scroll-bar-mode
- (defun . scroll-bar-mode)
- (defun . toggle-scroll-bar)
- (defun . toggle-horizontal-scroll-bar)
- (defun . scroll-bar-set-window-start)
- (defun . scroll-bar-drag-position)
- (defun . scroll-bar-maybe-set-window-start)
- (defun . scroll-bar-drag-1)
- (defun . scroll-bar-drag)
- (defun . scroll-bar-scroll-down)
- (defun . scroll-bar-scroll-up)
- (defun . scroll-bar-toolkit-scroll)
- (provide . scroll-bar))
- ("/usr/share/emacs/23.0.93/lisp/mouse.elc" mouse-yank-at-point mouse-drag-copy-region mouse-1-click-follows-link mouse-1-click-in-non-selected-windows
- (defun . popup-menu)
- (defun . minor-mode-menu-from-indicator)
- (defun . mouse-minor-mode-menu)
- (defun . mouse-menu-major-mode-map)
- (defun . mouse-menu-non-singleton)
- (defun . mouse-menu-bar-map)
- (defun . mouse-major-mode-menu)
- (defun . mouse-popup-menubar)
- (defun . mouse-popup-menubar-stuff)
- (defun . mouse-minibuffer-check)
- (defun . mouse-delete-window)
- (defun . mouse-select-window)
- (defun . mouse-tear-off-window)
- (defun . mouse-delete-other-windows)
- (defun . mouse-split-window-vertically)
- (defun . mouse-split-window-horizontally)
- (defun . mouse-drag-window-above)
- (defun . mouse-drag-move-window-bottom)
- (defun . mouse-drag-move-window-top)
- (defun . mouse-drag-mode-line-1)
- (defun . mouse-drag-mode-line)
- (defun . mouse-drag-header-line)
- (defun . mouse-drag-vertical-line-rightward-window)
- (defun . mouse-drag-vertical-line)
- (defun . mouse-set-point)
- mouse-last-region-beg mouse-last-region-end mouse-last-region-tick
- (defun . mouse-region-match)
- (defun . mouse-set-region)
- (defun . mouse-set-region-1)
- mouse-scroll-delay mouse-scroll-min-lines
- (defun . mouse-scroll-subr)
- mouse-drag-overlay mouse-drag-overlay mouse-selection-click-count mouse-selection-click-count-buffer
- (defun . mouse-drag-region)
- (defun . mouse-posn-property)
- (defun . mouse-on-link-p)
- (defun . mouse-fixup-help-message)
- (defun . mouse-move-drag-overlay)
- (defun . mouse-drag-track)
- (defun . mouse-skip-word)
- (defun . mouse-start-end)
- (defun . mouse-set-mark-fast)
- (defun . mouse-undouble-last-event)
- mouse-region-delete-keys
- (defun . mouse-show-mark)
- (defun . mouse-set-mark)
- (defun . mouse-kill)
- (defun . mouse-yank-at-click)
- (defun . mouse-yank-primary)
- (defun . mouse-kill-ring-save)
- mouse-save-then-kill-posn
- (defun . mouse-save-then-kill-delete-region)
- (defun . mouse-save-then-kill)
- mouse-secondary-overlay mouse-secondary-click-count mouse-secondary-start
- (defun . mouse-start-secondary)
- (defun . mouse-set-secondary)
- (defun . mouse-drag-secondary)
- (defun . mouse-yank-secondary)
- (defun . mouse-kill-secondary)
- (defun . mouse-secondary-save-then-kill)
- mouse-buffer-menu-maxlen mouse-buffer-menu-mode-mult mouse-buffer-menu-mode-groups
- (defun . mouse-buffer-menu)
- (defun . mouse-buffer-menu-alist)
- (defun . mouse-buffer-menu-split)
- (defun . mouse-choose-completion)
- (defun . font-menu-add-default)
- x-fixed-font-alist
- (defun . mouse-select-font)
- (defun . mouse-set-font)
- mouse-appearance-menu-map
- (defun . mouse-appearance-menu)
- (provide . mouse)
- (defun . mldrag-drag-mode-line)
- (defun . mldrag-drag-vertical-line)
- (provide . mldrag))
- ("/usr/share/emacs/23.0.93/lisp/jit-lock.elc" jit-lock-chunk-size jit-lock-stealth-time jit-lock-stealth-nice jit-lock-stealth-load jit-lock-stealth-verbose jit-lock-defer-contextually jit-lock-contextually jit-lock-context-time jit-lock-defer-time jit-lock-mode jit-lock-functions jit-lock-context-unfontify-pos jit-lock-stealth-timer jit-lock-stealth-repeat-timer jit-lock-context-timer jit-lock-defer-timer jit-lock-defer-buffers jit-lock-stealth-buffers
- (defun . jit-lock-mode)
- (defun . jit-lock-register)
- (defun . jit-lock-unregister)
- (defun . jit-lock-refontify)
- (defun . jit-lock-function)
- (defun . jit-lock-fontify-now)
- (defun . jit-lock-force-redisplay)
- (defun . jit-lock-stealth-chunk-start)
- (defun . jit-lock-stealth-fontify)
- (defun . jit-lock-deferred-fontify)
- (defun . jit-lock-context-fontify)
- jit-lock-after-change-extend-region-functions
- (defun . jit-lock-after-change)
- (provide . jit-lock))
- ("/usr/share/emacs/23.0.93/lisp/font-lock.elc"
- (require . syntax)
- font-lock-maximum-size font-lock-maximum-decoration font-lock-verbose font-lock-comment-face font-lock-comment-delimiter-face font-lock-string-face font-lock-doc-face font-lock-keyword-face font-lock-builtin-face font-lock-function-name-face font-lock-variable-name-face font-lock-type-face font-lock-constant-face font-lock-warning-face font-lock-negation-char-face font-lock-preprocessor-face font-lock-reference-face font-lock-keywords font-lock-keywords-alist font-lock-removed-keywords-alist font-lock-keywords-only font-lock-keywords-case-fold-search font-lock-syntactically-fontified font-lock-syntactic-face-function font-lock-syntactic-keywords font-lock-syntax-table font-lock-beginning-of-syntax-function font-lock-mark-block-function font-lock-fontify-buffer-function font-lock-unfontify-buffer-function font-lock-fontify-region-function font-lock-unfontify-region-function font-lock-inhibit-thing-lock font-lock-multiline font-lock-fontified
- (defun . font-lock-mode-internal)
- (defun . font-lock-add-keywords)
- (defun . font-lock-update-removed-keyword-alist)
- (defun . font-lock-remove-keywords)
- font-lock-support-mode
- (defun . font-lock-turn-on-thing-lock)
- (defun . font-lock-turn-off-thing-lock)
- (defun . font-lock-after-fontify-buffer)
- (defun . font-lock-after-unfontify-buffer)
- font-lock-extend-after-change-region-function
- (defun . font-lock-fontify-buffer)
- (defun . font-lock-unfontify-buffer)
- (defun . font-lock-fontify-region)
- (defun . font-lock-unfontify-region)
- (defun . font-lock-default-fontify-buffer)
- (defun . font-lock-default-unfontify-buffer)
- font-lock-dont-widen font-lock-extend-region-functions
- (defun . font-lock-extend-region-multiline)
- (defun . font-lock-extend-region-wholelines)
- (defun . font-lock-default-fontify-region)
- font-lock-extra-managed-props
- (defun . font-lock-default-unfontify-region)
- (defun . font-lock-after-change-function)
- (defun . font-lock-extend-jit-lock-region-after-change)
- (defun . font-lock-fontify-block)
- (defun . font-lock-prepend-text-property)
- (defun . font-lock-append-text-property)
- (defun . font-lock-fillin-text-property)
- (defun . font-lock-apply-syntactic-highlight)
- (defun . font-lock-fontify-syntactic-anchored-keywords)
- (defun . font-lock-fontify-syntactic-keywords-region)
- font-lock-comment-start-skip font-lock-comment-end-skip
- (defun . font-lock-fontify-syntactically-region)
- (defun . font-lock-apply-highlight)
- (defun . font-lock-fontify-anchored-keywords)
- (defun . font-lock-fontify-keywords-region)
- (defun . font-lock-compile-keywords)
- (defun . font-lock-compile-keyword)
- (defun . font-lock-eval-keywords)
- (defun . font-lock-value-in-major-mode)
- (defun . font-lock-choose-keywords)
- font-lock-set-defaults
- (defun . font-lock-set-defaults)
- (defface . font-lock-comment-face)
- (defface . font-lock-comment-delimiter-face)
- (defface . font-lock-string-face)
- (defface . font-lock-doc-face)
- (defface . font-lock-keyword-face)
- (defface . font-lock-builtin-face)
- (defface . font-lock-function-name-face)
- (defface . font-lock-variable-name-face)
- (defface . font-lock-type-face)
- (defface . font-lock-constant-face)
- (defface . font-lock-warning-face)
- (defface . font-lock-negation-char-face)
- (defface . font-lock-preprocessor-face)
- (defface . font-lock-regexp-grouping-backslash)
- (defface . font-lock-regexp-grouping-construct)
- (defun . font-lock-match-c-style-declaration-item-and-skip-to-next)
- cpp-font-lock-keywords-source-directives cpp-font-lock-keywords-source-depth cpp-font-lock-keywords lisp-font-lock-keywords-1 lisp-font-lock-keywords-2 lisp-font-lock-keywords
- (provide . font-lock))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/syntax.elc"
- (defun . syntax-ppss-depth)
- (defun . syntax-ppss-toplevel-pos)
- (defun . syntax-ppss-context)
- syntax-ppss-max-span syntax-begin-function syntax-ppss-cache syntax-ppss-last
- (defun . syntax-ppss-after-change-function)
- (defun . syntax-ppss-flush-cache)
- syntax-ppss-stats
- (defun . syntax-ppss-stats)
- (defun . syntax-ppss)
- (defun . syntax-ppss-debug)
- (provide . syntax))
- ("/usr/share/emacs/23.0.93/lisp/facemenu.elc" facemenu-keybindings facemenu-new-faces-at-end facemenu-unlisted-faces facemenu-listed-faces facemenu-face-menu
- (defun . facemenu-face-menu)
- facemenu-foreground-menu
- (defun . facemenu-foreground-menu)
- facemenu-background-menu
- (defun . facemenu-background-menu)
- (defun . facemenu-enable-faces-p)
- facemenu-special-menu
- (defun . facemenu-special-menu)
- facemenu-justification-menu
- (defun . facemenu-justification-menu)
- facemenu-indentation-menu
- (defun . facemenu-indentation-menu)
- facemenu-menu
- (defun . facemenu-menu)
- facemenu-keymap
- (defun . facemenu-keymap)
- facemenu-add-face-function facemenu-end-add-face facemenu-remove-face-function facemenu-color-alist
- (defun . facemenu-update)
- (defun . facemenu-set-face)
- (defun . facemenu-set-foreground)
- (defun . facemenu-set-background)
- (defun . facemenu-set-face-from-menu)
- (defun . facemenu-set-invisible)
- (defun . facemenu-set-intangible)
- (defun . facemenu-set-read-only)
- (defun . facemenu-remove-face-props)
- (defun . facemenu-remove-all)
- (defun . facemenu-remove-special)
- (defun . facemenu-read-color)
- (defun . list-colors-display)
- (defun . list-colors-print)
- (defun . list-colors-duplicates)
- (defun . facemenu-color-equal)
- (defun . facemenu-add-face)
- (defun . facemenu-active-faces)
- (defun . facemenu-add-new-face)
- (defun . facemenu-add-new-color)
- (defun . facemenu-complete-face-list)
- (defun . facemenu-iterate)
- (provide . facemenu))
- ("/usr/share/emacs/23.0.93/lisp/font-core.elc" font-lock-defaults font-lock-defaults-alist font-lock-function font-lock-mode
- (defun . font-lock-mode)
- (defun . font-lock-change-mode)
- (defun . font-lock-defontify)
- (defun . font-lock-default-function)
- (defun . turn-on-font-lock)
- font-lock-global-modes
- (defun . turn-on-font-lock-if-desired)
- font-lock-mode-major-mode global-font-lock-mode
- (defun . global-font-lock-mode)
- global-font-lock-mode-buffers
- (defun . global-font-lock-mode-enable-in-buffers)
- (defun . global-font-lock-mode-check-buffers)
- (defun . global-font-lock-mode-cmhh)
- (provide . font-core))
- ("/usr/share/emacs/23.0.93/lisp/term/tty-colors.elc" color-name-rgb-alist tty-standard-colors tty-color-mode-alist tty-defined-color-alist
- (defun . tty-color-alist)
- (defun . tty-modify-color-alist)
- (defun . tty-register-default-colors)
- (defun . tty-color-canonicalize)
- (defun . tty-color-define)
- (defun . tty-color-clear)
- (defun . tty-color-off-gray-diag)
- (defun . tty-color-approximate)
- (defun . tty-color-standard-values)
- (defun . tty-color-translate)
- (defun . tty-color-by-index)
- (defun . tty-color-values)
- (defun . tty-color-desc)
- (defun . tty-color-gray-shades))
- ("/usr/share/emacs/23.0.93/lisp/frame.elc" frame-creation-function-alist window-system-default-frame-alist initial-frame-alist minibuffer-frame-alist pop-up-frame-alist pop-up-frame-function special-display-frame-alist
- (defun . special-display-popup-frame)
- (defun . handle-delete-frame)
- frame-initial-frame frame-initial-geometry-arguments
- (defun . frame-initialize)
- frame-notice-user-settings
- (defun . frame-notice-user-settings)
- (defun . make-initial-minibuffer-frame)
- (defun . modify-all-frames-parameters)
- (defun . get-other-frame)
- (defun . next-multiframe-window)
- (defun . previous-multiframe-window)
- (defun . make-frame-on-display)
- (defun . close-display-connection)
- (defun . make-frame-command)
- before-make-frame-hook after-make-frame-functions after-setting-font-hook
- (defun . new-frame)
- frame-inherited-parameters
- (defun . make-frame)
- (defun . filtered-frame-list)
- (defun . minibuffer-frame-list)
- (defun . get-device-terminal)
- (defun . frames-on-display-list)
- (defun . framep-on-display)
- (defun . frame-remove-geometry-params)
- (defun . select-frame-set-input-focus)
- (defun . other-frame)
- (defun . iconify-or-deiconify-frame)
- (defun . suspend-frame)
- (defun . make-frame-names-alist)
- frame-name-history
- (defun . select-frame-by-name)
- (defun . current-frame-configuration)
- (defun . set-frame-configuration)
- (defun . frame-height)
- (defun . frame-width)
- (defun . set-default-font)
- (defun . set-frame-font)
- (defun . set-frame-parameter)
- (defun . set-background-color)
- (defun . set-foreground-color)
- (defun . set-cursor-color)
- (defun . set-mouse-color)
- (defun . set-border-color)
- (defun . auto-raise-mode)
- (defun . auto-lower-mode)
- (defun . set-frame-name)
- (defun . frame-current-scroll-bars)
- (defun . selected-terminal)
- (defun . display-mouse-p)
- (defun . display-popup-menus-p)
- (defun . display-graphic-p)
- (defun . display-images-p)
- (defun . display-multi-frame-p)
- (defun . display-multi-font-p)
- (defun . display-selections-p)
- (defun . display-screens)
- (defun . display-pixel-height)
- (defun . display-pixel-width)
- display-mm-dimensions-alist
- (defun . display-mm-height)
- (defun . display-mm-width)
- (defun . display-backing-store)
- (defun . display-save-under)
- (defun . display-planes)
- (defun . display-color-cells)
- (defun . display-visual-class)
- (defun . frame-geom-value-cons)
- (defun . frame-geom-spec-cons)
- (defun . screen-height)
- (defun . screen-width)
- (defun . set-screen-width)
- (defun . set-screen-height)
- (defun . delete-other-frames)
- delete-frame-hook show-trailing-whitespace auto-hscroll-mode automatic-hscrolling blink-cursor-delay blink-cursor-interval blink-cursor-idle-timer blink-cursor-timer
- (defun . blink-cursor-start)
- (defun . blink-cursor-timer-function)
- (defun . blink-cursor-end)
- blink-cursor-mode
- (defun . blink-cursor-mode)
- blink-cursor display-hourglass hourglass-delay cursor-in-non-selected-windows
- (provide . frame))
- ("/usr/share/emacs/23.0.93/lisp/window.elc" window-size-fixed
- (defun . save-selected-window)
- (defun . window-body-height)
- (defun . one-window-p)
- (defun . window-current-scroll-bars)
- (defun . walk-windows)
- (defun . get-window-with-predicate)
- (defun . some-window)
- (defun . get-buffer-window-list)
- (defun . minibuffer-window-active-p)
- (defun . count-windows)
- (defun . bw-get-tree)
- (defun . bw-get-tree-1)
- (defun . bw-find-tree-sub)
- (defun . bw-find-tree-sub-1)
- (defun . bw-l)
- (defun . bw-t)
- (defun . bw-r)
- (defun . bw-b)
- (defun . bw-dir)
- (defun . bw-eqdir)
- (defun . bw-refresh-edges)
- (defun . balance-windows)
- (defun . bw-adjust-window)
- (defun . bw-balance-sub)
- (defun . window-fixed-size-p)
- window-area-factor
- (defun . balance-windows-area)
- display-buffer-function special-display-buffer-names special-display-regexps
- (defun . special-display-p)
- special-display-function same-window-buffer-names same-window-regexps
- (defun . same-window-p)
- pop-up-frames display-buffer-reuse-frames pop-up-windows split-height-threshold split-width-threshold split-window-preferred-function
- (defun . window--splittable-p)
- (defun . window--try-to-split-window)
- (defun . window--frame-usable-p)
- even-window-heights
- (defun . window--even-window-heights)
- (defun . window--display-buffer-1)
- (defun . window--display-buffer-2)
- (defun . display-buffer)
- (defun . pop-to-buffer)
- split-window-keep-point
- (defun . split-window-vertically)
- (defun . split-window-save-restore-data)
- (defun . split-window-horizontally)
- (defun . set-window-text-height)
- (defun . enlarge-window-horizontally)
- (defun . shrink-window-horizontally)
- (defun . window-buffer-height)
- (defun . count-screen-lines)
- (defun . fit-window-to-buffer)
- (defun . window-safely-shrinkable-p)
- (defun . shrink-window-if-larger-than-buffer)
- (defun . kill-buffer-and-window)
- (defun . quit-window)
- recenter-last-op
- (defun . recenter-top-bottom)
- mouse-autoselect-window-timer mouse-autoselect-window-position mouse-autoselect-window-window mouse-autoselect-window-state
- (defun . mouse-autoselect-window-cancel)
- (defun . mouse-autoselect-window-start)
- (defun . mouse-autoselect-window-select)
- (defun . handle-select-window)
- (defun . delete-other-windows-vertically)
- (defun . truncated-partial-width-window-p))
- ("/usr/share/emacs/23.0.93/lisp/indent.elc" standard-indent indent-line-function tab-always-indent
- (defun . indent-according-to-mode)
- (defun . indent-for-tab-command)
- (defun . insert-tab)
- (defun . indent-rigidly)
- (defun . indent-line-to)
- (defun . current-left-margin)
- (defun . move-to-left-margin)
- (defun . indent-to-left-margin)
- (defun . delete-to-left-margin)
- (defun . set-left-margin)
- (defun . set-right-margin)
- (defun . alter-text-property)
- (defun . increase-left-margin)
- (defun . decrease-left-margin)
- (defun . increase-right-margin)
- (defun . decrease-right-margin)
- (defun . beginning-of-line-text)
- indent-region-function
- (defun . indent-region)
- (defun . indent-relative-maybe)
- (defun . indent-relative)
- tab-stop-list edit-tab-stops-map edit-tab-stops-buffer
- (defun . edit-tab-stops)
- (defun . edit-tab-stops-note-changes)
- (defun . tab-to-tab-stop)
- (defun . move-to-tab-stop))
- ("/usr/share/emacs/23.0.93/lisp/language/cham.el"
- (provide . cham))
- ("/usr/share/emacs/23.0.93/lisp/language/burmese.el")
- ("/usr/share/emacs/23.0.93/lisp/language/khmer.el")
- ("/usr/share/emacs/23.0.93/lisp/language/georgian.el"
- (provide . georgian))
- ("/usr/share/emacs/23.0.93/lisp/language/utf-8-lang.el"
- (provide . utf-8-lang))
- ("/usr/share/emacs/23.0.93/lisp/language/misc-lang.el"
- (provide . misc-lang))
- ("/usr/share/emacs/23.0.93/lisp/language/vietnamese.elc"
- (provide . vietnamese))
- ("/usr/share/emacs/23.0.93/lisp/language/tibetan.elc" tibetan-composable-pattern tibetan-consonant-transcription-alist tibetan-consonant-transcription-alist tibetan-vowel-transcription-alist tibetan-vowel-transcription-alist tibetan-modifier-transcription-alist tibetan-modifier-transcription-alist tibetan-precomposed-transcription-alist tibetan-precomposed-transcription-alist tibetan-subjoined-transcription-alist tibetan-subjoined-transcription-alist tibetan-base-to-subjoined-alist tibetan-base-to-subjoined-alist tibetan-composite-vowel-alist tibetan-composite-vowel-alist tibetan-precomposition-rule-alist tibetan-precomposition-rule-alist tibetan-regexp tibetan-precomposed-regexp tibetan-precomposition-rule-regexp tibetan-decomposed tibetan-decomposed-temp
- (provide . tibetan))
- ("/usr/share/emacs/23.0.93/lisp/language/thai.el"
- (provide . thai))
- ("/usr/share/emacs/23.0.93/lisp/language/tai-viet.el"
- (provide . tai-viet))
- ("/usr/share/emacs/23.0.93/lisp/language/lao.el"
- (provide . lao))
- ("/usr/share/emacs/23.0.93/lisp/language/korean.el"
- (provide . korean))
- ("/usr/share/emacs/23.0.93/lisp/language/japanese.el"
- (defun . compose-gstring-for-variation-glyph)
- (provide . japanese))
- ("/usr/share/emacs/23.0.93/lisp/international/eucjp-ms.el")
- ("/usr/share/emacs/23.0.93/lisp/international/cp51932.el")
- ("/usr/share/emacs/23.0.93/lisp/language/hebrew.el"
- (provide . hebrew))
- ("/usr/share/emacs/23.0.93/lisp/language/greek.el"
- (provide . greek))
- ("/usr/share/emacs/23.0.93/lisp/language/romanian.el"
- (provide . romanian))
- ("/usr/share/emacs/23.0.93/lisp/language/slovak.el"
- (provide . slovak))
- ("/usr/share/emacs/23.0.93/lisp/language/czech.el"
- (provide . czech))
- ("/usr/share/emacs/23.0.93/lisp/language/european.elc"
- (defun . turkish-case-conversion-enable)
- (defun . turkish-case-conversion-disable)
- (provide . european))
- ("/usr/share/emacs/23.0.93/lisp/language/ethiopic.elc" ccl-encode-ethio-font ccl-encode-ethio-font
- (provide . ethiopic))
- ("/usr/share/emacs/23.0.93/lisp/language/english.el")
- ("/usr/share/emacs/23.0.93/lisp/language/sinhala.el")
- ("/usr/share/emacs/23.0.93/lisp/language/indian.elc" devanagari-composable-pattern tamil-composable-pattern kannada-composable-pattern malayalam-composable-pattern
- (provide . indian))
- ("/usr/share/emacs/23.0.93/lisp/language/cyrillic.elc"
- (provide . cyrillic))
- ("/usr/share/emacs/23.0.93/lisp/language/chinese.elc"
- (provide . chinese))
- ("/usr/share/emacs/23.0.93/lisp/international/charprop.el")
- ("/usr/share/emacs/23.0.93/lisp/composite.elc" reference-point-alist
- (t . encode-composition-rule)
- (defun . encode-composition-rule)
- (defun . decode-composition-rule)
- (defun . encode-composition-components)
- (defun . decode-composition-components)
- (defun . compose-region)
- (defun . decompose-region)
- (defun . compose-string)
- (defun . decompose-string)
- (defun . compose-chars)
- (defun . find-composition)
- (defun . compose-chars-after)
- (defun . compose-last-chars)
- (defun . lgstring-header)
- (defun . lgstring-set-header)
- (defun . lgstring-font)
- (defun . lgstring-char)
- (defun . lgstring-char-len)
- (defun . lgstring-shaped-p)
- (defun . lgstring-set-id)
- (defun . lgstring-glyph)
- (defun . lgstring-glyph-len)
- (defun . lgstring-set-glyph)
- (defun . lglyph-from)
- (defun . lglyph-to)
- (defun . lglyph-char)
- (defun . lglyph-code)
- (defun . lglyph-width)
- (defun . lglyph-lbearing)
- (defun . lglyph-rbearing)
- (defun . lglyph-ascent)
- (defun . lglyph-descent)
- (defun . lglyph-adjustment)
- (defun . lglyph-set-from-to)
- (defun . lglyph-set-char)
- (defun . lglyph-set-code)
- (defun . lglyph-set-width)
- (defun . lglyph-set-adjustment)
- (defun . lglyph-copy)
- (defun . lgstring-insert-glyph)
- (defun . compose-glyph-string)
- (defun . compose-glyph-string-relative)
- (defun . compose-gstring-for-graphic)
- (defun . compose-gstring-for-terminal)
- (defun . auto-compose-chars)
- auto-composition-mode
- (t . auto-composition-mode)
- (defun . auto-composition-mode)
- (defun . turn-on-auto-composition-if-enabled)
- auto-composition-mode-major-mode global-auto-composition-mode
- (t . global-auto-composition-mode)
- (defun . global-auto-composition-mode)
- global-auto-composition-mode-buffers
- (defun . global-auto-composition-mode-enable-in-buffers)
- (defun . global-auto-composition-mode-check-buffers)
- (defun . global-auto-composition-mode-cmhh)
- (defun . toggle-auto-composition)
- (defun . decompose-composite-char))
- ("/usr/share/emacs/23.0.93/lisp/international/characters.elc" cjk-char-width-table
- (defun . use-cjk-char-width-table)
- (defun . use-default-char-width-table)
- (defun . build-unicode-category-table))
- ("/usr/share/emacs/23.0.93/lisp/case-table.elc"
- (defun . describe-buffer-case-table)
- (defun . get-upcase-table)
- (defun . copy-case-table)
- (defun . set-case-syntax-delims)
- (defun . set-case-syntax-pair)
- (defun . set-upcase-syntax)
- (defun . set-downcase-syntax)
- (defun . set-case-syntax)
- (provide . case-table))
- ("/usr/share/emacs/23.0.93/lisp/international/mule-cmds.elc" mule-keymap mule-menu-keymap describe-language-environment-map setup-language-environment-map set-coding-system-map help-xref-mule-regexp-template help-xref-mule-regexp-template
- (defun . coding-system-change-eol-conversion)
- (defun . coding-system-change-text-conversion)
- (defun . canonicalize-coding-system-name)
- (defun . coding-system-from-name)
- (defun . toggle-enable-multibyte-characters)
- (defun . view-hello-file)
- (defun . universal-coding-system-argument)
- (defun . set-default-coding-systems)
- (defun . prefer-coding-system)
- sort-coding-systems-predicate
- (defun . sort-coding-systems)
- (defun . find-coding-systems-region)
- (defun . find-coding-systems-string)
- (defun . find-coding-systems-for-charsets)
- (defun . find-multibyte-characters)
- (defun . search-unencodable-char)
- last-coding-system-specified select-safe-coding-system-accept-default-p
- (defun . select-safe-coding-system-interactively)
- (defun . select-safe-coding-system)
- (defun . select-message-coding-system)
- language-info-alist
- (defun . get-language-info)
- (defun . set-language-info)
- (defun . set-language-info-internal)
- (defun . set-language-info-alist)
- (defun . read-language-name)
- leim-list-file-name leim-list-header leim-list-entry-regexp update-leim-list-functions
- (defun . update-leim-list-file)
- current-input-method current-input-method-title default-input-method input-method-history inactivate-current-input-method-function describe-current-input-method-function input-method-alist
- (defun . register-input-method)
- (defun . read-input-method-name)
- (defun . activate-input-method)
- (defun . inactivate-input-method)
- (defun . set-input-method)
- toggle-input-method-active
- (defun . toggle-input-method)
- (defun . describe-input-method)
- (defun . describe-current-input-method)
- (defun . read-multilingual-string)
- input-method-verbose-flag input-method-highlight-flag input-method-activate-hook input-method-inactivate-hook input-method-after-insert-chunk-hook input-method-exit-on-first-char input-method-use-echo-area input-method-exit-on-invalid-key set-language-environment-hook exit-language-environment-hook
- (defun . setup-specified-language-environment)
- current-language-environment
- (defun . reset-language-environment)
- (defun . set-display-table-and-terminal-coding-system)
- (defun . set-language-environment)
- language-info-custom-alist
- (defun . standard-display-european-internal)
- (defun . set-language-environment-coding-systems)
- (defun . set-language-environment-input-method)
- (defun . set-language-environment-nonascii-translation)
- (defun . set-language-environment-charset)
- (defun . set-language-environment-unibyte)
- (defun . princ-list)
- (defun . describe-specified-language-support)
- (defun . describe-language-environment)
- locale-translation-file-name locale-language-names locale-charset-language-names locale-preferred-coding-systems
- (defun . locale-name-match)
- (defun . locale-charset-match-p)
- locale-charset-alist
- (defun . locale-charset-to-coding-system)
- (defun . locale-translate)
- (defun . set-locale-environment)
- char-code-property-alist
- (defun . define-char-code-property)
- char-code-property-table
- (defun . get-char-code-property)
- (defun . put-char-code-property)
- (defun . char-code-property-description)
- iso-2022-control-alist
- (defun . encoded-string-description)
- (defun . encode-coding-char)
- unify-8859-on-encoding-mode
- (defun . unify-8859-on-encoding-mode)
- unify-8859-on-decoding-mode
- (defun . unify-8859-on-decoding-mode)
- nonascii-insert-offset nonascii-translation-table ucs-names
- (defun . ucs-names)
- ucs-completions
- (defun . read-char-by-name)
- (defun . ucs-insert))
- ("/usr/share/emacs/23.0.93/lisp/epa-hook.elc"
- (defun . epa-file--file-name-regexp-set)
- epa-file-name-regexp epa-file-inhibit-auto-save epa-file-encrypt-to epa-file-handler epa-file-auto-mode-alist-entry
- (defun . epa-file-name-regexp-update)
- (defun . epa-file-find-file-hook)
- auto-encryption-mode
- (defun . auto-encryption-mode)
- (provide . epa-hook))
- ("/usr/share/emacs/23.0.93/lisp/jka-cmpr-hook.elc" jka-compr-added-to-file-coding-system-alist jka-compr-file-name-handler-entry jka-compr-compression-info-list--internal jka-compr-mode-alist-additions--internal jka-compr-load-suffixes--internal
- (defun . jka-compr-build-file-regexp)
- (defun . jka-compr-info-regexp)
- (defun . jka-compr-info-compress-message)
- (defun . jka-compr-info-compress-program)
- (defun . jka-compr-info-compress-args)
- (defun . jka-compr-info-uncompress-message)
- (defun . jka-compr-info-uncompress-program)
- (defun . jka-compr-info-uncompress-args)
- (defun . jka-compr-info-can-append)
- (defun . jka-compr-info-strip-extension)
- (defun . jka-compr-info-file-magic-bytes)
- (defun . jka-compr-get-compression-info)
- (defun . jka-compr-install)
- (defun . jka-compr-installed-p)
- (defun . jka-compr-update)
- (defun . jka-compr-set)
- jka-compr-compression-info-list jka-compr-mode-alist-additions jka-compr-load-suffixes auto-compression-mode
- (defun . auto-compression-mode)
- (defun . with-auto-compression-mode)
- (provide . jka-cmpr-hook))
- ("/usr/share/emacs/23.0.93/lisp/help.elc" help-window help-window-point-marker help-map help-button-cache
- (defun . help-quit)
- help-return-method
- (defun . print-help-return-message)
- (defun . help)
- (defun . help-for-help)
- (defun . help-for-help-internal-doc)
- (defun . help-for-help-internal)
- (defun . function-called-at-point)
- (defun . view-help-file)
- (defun . describe-distribution)
- (defun . describe-copying)
- (defun . describe-gnu-project)
- (defun . describe-project)
- (defun . describe-no-warranty)
- (defun . describe-prefix-bindings)
- (defun . view-emacs-news)
- (defun . view-emacs-todo)
- (defun . view-todo)
- (defun . view-echo-area-messages)
- (defun . view-order-manuals)
- (defun . view-emacs-FAQ)
- (defun . view-emacs-problems)
- (defun . view-emacs-debugging)
- (defun . view-external-packages)
- (defun . view-lossage)
- (defun . describe-bindings)
- (defun . describe-bindings-internal)
- (defun . where-is)
- (defun . help-key-description)
- (defun . describe-key-briefly)
- (defun . describe-key)
- (defun . describe-mode)
- (defun . describe-minor-mode)
- (defun . describe-minor-mode-completion-table-for-symbol)
- (defun . describe-minor-mode-from-symbol)
- (defun . describe-minor-mode-completion-table-for-indicator)
- (defun . describe-minor-mode-from-indicator)
- (defun . lookup-minor-mode-from-indicator)
- temp-buffer-max-height temp-buffer-resize-mode
- (defun . temp-buffer-resize-mode)
- (defun . resize-temp-buffer-window)
- help-window-select
- (defun . help-window-display-message)
- (defun . help-window-setup-finish)
- (defun . help-window-setup)
- (defun . with-help-window)
- (provide . help))
- ("/usr/share/emacs/23.0.93/lisp/simple.elc" idle-update-delay
- (defun . get-next-valid-buffer)
- (defun . last-buffer)
- (defun . next-buffer)
- (defun . previous-buffer)
- (defface . next-error)
- next-error-highlight next-error-highlight-no-select next-error-recenter next-error-hook next-error-highlight-timer next-error-overlay-arrow-position next-error-last-buffer next-error-function
- (defun . next-error-buffer-p)
- (defun . next-error-find-buffer)
- (defun . next-error)
- (defun . next-error-internal)
- (defun . goto-next-locus)
- (defun . next-match)
- (defun . previous-error)
- (defun . first-error)
- (defun . next-error-no-select)
- (defun . previous-error-no-select)
- next-error-follow-last-line next-error-follow-minor-mode
- (defun . next-error-follow-minor-mode)
- (defun . next-error-follow-mode-post-command-hook)
- (defun . fundamental-mode)
- special-mode-map special-mode-map special-mode-syntax-table special-mode-abbrev-table special-mode-abbrev-table
- (defun . special-mode)
- hard-newline
- (defun . newline)
- (defun . set-hard-newline-properties)
- (defun . open-line)
- (defun . split-line)
- (defun . delete-indentation)
- (defun . join-line)
- (defun . delete-blank-lines)
- (defun . delete-trailing-whitespace)
- (defun . newline-and-indent)
- (defun . reindent-then-newline-and-indent)
- (defun . quoted-insert)
- (defun . forward-to-indentation)
- (defun . backward-to-indentation)
- (defun . back-to-indentation)
- (defun . fixup-whitespace)
- (defun . delete-horizontal-space)
- (defun . just-one-space)
- (defun . beginning-of-buffer)
- (defun . end-of-buffer)
- (defun . mark-whole-buffer)
- (defun . goto-line)
- (defun . count-lines-region)
- (defun . what-line)
- (defun . count-lines)
- (defun . line-number-at-pos)
- (defun . what-cursor-position)
- read-expression-history minibuffer-completing-symbol minibuffer-default eval-expression-print-level eval-expression-print-length eval-expression-debug-on-error
- (defun . eval-expression-print-format)
- (defun . eval-expression)
- (defun . edit-and-eval-command)
- (defun . repeat-complex-command)
- minibuffer-history minibuffer-history-sexp-flag minibuffer-history-search-history minibuffer-text-before-history
- (defun . minibuffer-history-initialize)
- (defun . minibuffer-avoid-prompt)
- minibuffer-history-case-insensitive-variables
- (defun . previous-matching-history-element)
- (defun . next-matching-history-element)
- minibuffer-temporary-goal-position minibuffer-default-add-function minibuffer-default-add-done
- (defun . minibuffer-default-add-completions)
- (defun . goto-history-element)
- (defun . next-history-element)
- (defun . previous-history-element)
- (defun . next-complete-history-element)
- (defun . previous-complete-history-element)
- (defun . minibuffer-prompt-width)
- (defun . minibuffer-history-isearch-setup)
- (defun . minibuffer-history-isearch-end)
- (defun . minibuffer-history-isearch-search)
- (defun . minibuffer-history-isearch-message)
- (defun . minibuffer-history-isearch-wrap)
- (defun . minibuffer-history-isearch-push-state)
- (defun . minibuffer-history-isearch-pop-state)
- (defun . advertised-undo)
- undo-equiv-table undo-in-region undo-no-redo pending-undo-list
- (defun . undo)
- (defun . buffer-disable-undo)
- (defun . undo-only)
- undo-in-progress
- (defun . undo-more)
- (defun . undo-copy-list)
- (defun . undo-copy-list-1)
- (defun . undo-start)
- (defun . undo-make-selective-list)
- (defun . undo-elt-in-region)
- (defun . undo-elt-crosses-region)
- (defun . undo-delta)
- undo-ask-before-discard undo-extra-outer-limit
- (defun . undo-outer-limit-truncate)
- shell-command-history shell-command-switch shell-command-default-error-buffer
- (defun . minibuffer-default-add-shell-commands)
- (defun . minibuffer-complete-shell-command)
- minibuffer-local-shell-command-map
- (defun . read-shell-command)
- (defun . shell-command)
- (defun . display-message-or-buffer)
- (defun . shell-command-sentinel)
- (defun . shell-command-on-region)
- (defun . shell-command-to-string)
- (defun . process-file)
- (defun . start-file-process)
- universal-argument-map universal-argument-num-events overriding-map-is-bound saved-overriding-map
- (defun . ensure-overriding-map-is-bound)
- (defun . restore-overriding-map)
- (defun . universal-argument)
- (defun . universal-argument-more)
- (defun . negative-argument)
- (defun . digit-argument)
- (defun . universal-argument-minus)
- (defun . universal-argument-other-key)
- buffer-substring-filters
- (defun . filter-buffer-substring)
- interprogram-cut-function interprogram-paste-function kill-ring kill-ring-max kill-ring-yank-pointer
- (defun . kill-new)
- (defun . kill-append)
- yank-pop-change-selection
- (defun . current-kill)
- kill-read-only-ok
- (defun . kill-region)
- (defun . copy-region-as-kill)
- (defun . kill-ring-save)
- (defun . append-next-kill)
- yank-excluded-properties yank-window-start yank-undo-function
- (defun . yank-pop)
- (defun . yank)
- (defun . rotate-yank-pointer)
- (defun . kill-forward-chars)
- (defun . kill-backward-chars)
- backward-delete-char-untabify-method
- (defun . backward-delete-char-untabify)
- (defun . zap-to-char)
- kill-whole-line
- (defun . kill-line)
- (defun . kill-whole-line)
- (defun . forward-visible-line)
- (defun . end-of-visible-line)
- (defun . insert-buffer)
- (defun . append-to-buffer)
- (defun . prepend-to-buffer)
- (defun . copy-to-buffer)
- activate-mark-hook deactivate-mark-hook
- (defun . mark)
- (defun . deactivate-mark)
- (defun . activate-mark)
- select-active-regions
- (defun . set-mark)
- use-empty-active-region
- (defun . use-region-p)
- (defun . region-active-p)
- mark-ring mark-ring-max global-mark-ring global-mark-ring-max
- (defun . pop-to-mark-command)
- (defun . push-mark-command)
- set-mark-command-repeat-pop set-mark-default-inactive
- (defun . set-mark-command)
- (defun . push-mark)
- (defun . pop-mark)
- (defun . exchange-dot-and-mark)
- (defun . exchange-point-and-mark)
- shift-select-mode
- (defun . handle-shift-selection)
- transient-mark-mode
- (defun . transient-mark-mode)
- transient-mark-mode widen-automatically
- (defun . pop-global-mark)
- next-line-add-newlines
- (defun . next-line)
- (defun . previous-line)
- track-eol goal-column temporary-goal-column line-move-ignore-invisible line-move-visual
- (defun . line-move-partial)
- (defun . line-move)
- (defun . line-move-visual)
- (defun . line-move-1)
- (defun . line-move-finish)
- (defun . line-move-to-column)
- (defun . move-end-of-line)
- (defun . move-beginning-of-line)
- (defun . set-goal-column)
- (defun . end-of-visual-line)
- (defun . beginning-of-visual-line)
- (defun . kill-visual-line)
- (defun . next-logical-line)
- (defun . previous-logical-line)
- visual-line-mode-map visual-line-fringe-indicators visual-line--saved-state visual-line-mode
- (defun . visual-line-mode)
- (defun . turn-on-visual-line-mode)
- visual-line-mode-major-mode global-visual-line-mode
- (defun . global-visual-line-mode)
- global-visual-line-mode-buffers
- (defun . global-visual-line-mode-enable-in-buffers)
- (defun . global-visual-line-mode-check-buffers)
- (defun . global-visual-line-mode-cmhh)
- (defun . scroll-other-window-down)
- (defun . beginning-of-buffer-other-window)
- (defun . end-of-buffer-other-window)
- (defun . transpose-chars)
- (defun . transpose-words)
- (defun . transpose-sexps)
- (defun . transpose-lines)
- (defun . transpose-subr)
- (defun . transpose-subr-1)
- (defun . backward-word)
- (defun . mark-word)
- (defun . kill-word)
- (defun . backward-kill-word)
- (defun . current-word)
- fill-prefix auto-fill-inhibit-regexp
- (defun . do-auto-fill)
- comment-line-break-function
- (defun . default-indent-new-line)
- normal-auto-fill-function
- (defun . auto-fill-mode)
- (defun . auto-fill-function)
- (defun . turn-on-auto-fill)
- (defun . turn-off-auto-fill)
- (defun . set-fill-column)
- (defun . set-selective-display)
- indicate-unused-lines
- (defun . toggle-truncate-lines)
- (defun . toggle-word-wrap)
- overwrite-mode-textual overwrite-mode-binary
- (defun . overwrite-mode)
- (defun . binary-overwrite-mode)
- line-number-mode
- (defun . line-number-mode)
- column-number-mode
- (defun . column-number-mode)
- size-indication-mode
- (defun . size-indication-mode)
- blink-matching-paren blink-matching-paren-on-screen blink-matching-paren-distance blink-matching-delay blink-matching-paren-dont-ignore-comments
- (defun . blink-matching-open)
- (defun . keyboard-quit)
- buffer-quit-function
- (defun . keyboard-escape-quit)
- (defun . play-sound-file)
- read-mail-command mail-user-agent
- (defun . rfc822-goto-eoh)
- (defun . sendmail-user-agent-compose)
- (defun . compose-mail)
- (defun . compose-mail-other-window)
- (defun . compose-mail-other-frame)
- set-variable-value-history
- (defun . set-variable)
- completion-list-mode-map completion-reference-buffer completion-no-auto-exit completion-base-size
- (defun . delete-completion-window)
- (defun . previous-completion)
- (defun . next-completion)
- (defun . choose-completion)
- (defun . choose-completion-delete-max-match)
- choose-completion-string-functions
- (defun . choose-completion-string)
- completion-list-mode-map completion-list-mode-syntax-table completion-list-mode-abbrev-table completion-list-mode-abbrev-table
- (defun . completion-list-mode)
- (defun . completion-list-mode-finish)
- completion-show-help completion-root-regexp
- (defun . completion-setup-function)
- (defun . switch-to-completions)
- (defun . event-apply-alt-modifier)
- (defun . event-apply-super-modifier)
- (defun . event-apply-hyper-modifier)
- (defun . event-apply-shift-modifier)
- (defun . event-apply-control-modifier)
- (defun . event-apply-meta-modifier)
- (defun . event-apply-modifier)
- clone-buffer-hook clone-indirect-buffer-hook
- (defun . clone-process)
- (defun . clone-buffer)
- (defun . clone-indirect-buffer)
- (defun . clone-indirect-buffer-other-window)
- normal-erase-is-backspace
- (defun . normal-erase-is-backspace-setup-frame)
- (defun . normal-erase-is-backspace-mode)
- vis-mode-saved-buffer-invisibility-spec visible-mode
- (defun . visible-mode)
- (defun . apply-partially)
- bad-packages-alist
- (defun . bad-package-check)
- (provide . simple))
- ("/usr/share/emacs/23.0.93/lisp/abbrev.elc" only-global-abbrevs abbrev-mode
- (defun . abbrev-mode)
- abbrev-mode edit-abbrevs-map
- (defun . kill-all-abbrevs)
- (defun . copy-abbrev-table)
- (defun . insert-abbrevs)
- (defun . list-abbrevs)
- (defun . abbrev-table-name)
- (defun . prepare-abbrev-list-buffer)
- (defun . edit-abbrevs-mode)
- (defun . edit-abbrevs)
- (defun . edit-abbrevs-redefine)
- (defun . define-abbrevs)
- (defun . read-abbrev-file)
- (defun . quietly-read-abbrev-file)
- (defun . write-abbrev-file)
- (defun . add-mode-abbrev)
- (defun . add-global-abbrev)
- (defun . add-abbrev)
- (defun . inverse-add-mode-abbrev)
- (defun . inverse-add-global-abbrev)
- (defun . inverse-add-abbrev)
- (defun . abbrev-prefix-mark)
- (defun . expand-region-abbrevs)
- (defun . abbrev-table-get)
- (defun . abbrev-table-put)
- (defun . abbrev-get)
- (defun . abbrev-put)
- (defun . abbrev-with-wrapper-hook)
- abbrev-table-name-list
- (defun . make-abbrev-table)
- (defun . abbrev-table-p)
- global-abbrev-table abbrev-minor-mode-table-alist fundamental-mode-abbrev-table abbrevs-changed abbrev-all-caps abbrev-start-location abbrev-start-location-buffer last-abbrev last-abbrev-text last-abbrev-location pre-abbrev-expand-hook
- (defun . clear-abbrev-table)
- (defun . define-abbrev)
- (defun . abbrev--check-chars)
- (defun . define-global-abbrev)
- (defun . define-mode-abbrev)
- (defun . abbrev--active-tables)
- (defun . abbrev-symbol)
- (defun . abbrev-expansion)
- (defun . abbrev--before-point)
- (defun . abbrev-insert)
- abbrev-expand-functions
- (defun . expand-abbrev)
- (defun . unexpand-abbrev)
- (defun . abbrev--write)
- (defun . abbrev--describe)
- (defun . insert-abbrev-table-description)
- (defun . define-abbrev-table)
- (defun . abbrev-table-menu)
- (provide . abbrev))
- ("/usr/share/emacs/23.0.93/lisp/loaddefs.el" add-log-current-defun-function add-log-full-name add-log-mailing-address add-log-lisp-like-modes add-log-c-like-modes add-log-tex-like-modes ad-redefinition-action ad-default-compilation-action
- (defun . outlinify-sticky)
- (defun . ange-ftp-re-read-dir)
- (defun . command-apropos)
- autoarg-mode autoarg-kp-mode auto-insert-mode global-auto-revert-mode mouse-avoidance-mode display-battery-mode binhex-begin-line bookmark-map
- (defun . bookmark-locate)
- (defun . list-bookmarks)
- (defun . edit-bookmarks)
- menu-bar-bookmark-map
- (defun . menu-bar-bookmark-map)
- browse-url-browser-function browse-url-firefox-program browse-url-galeon-program
- (defun . list-yahrzeit-dates)
- calc-settings-file c-mode-syntax-table c++-mode-syntax-table objc-mode-syntax-table java-mode-syntax-table idl-mode-syntax-table pike-mode-syntax-table custom-print-functions comint-output-filter-functions comint-use-prompt-regexp-instead-of-fields comint-file-name-prefix compilation-mode-hook compilation-start-hook compilation-window-height compilation-process-setup-function compilation-buffer-name-function compilation-finish-function compilation-finish-functions compilation-ask-about-save compilation-search-path compile-command compilation-disable-input partial-completion-mode dynamic-completion-mode global-auto-composition-mode crisp-mode
- (defun . brief-mode)
- cua-mode custom-browse-sort-alphabetically custom-buffer-sort-alphabetically custom-menu-sort-alphabetically
- (defun . customize-variable)
- (defun . customize-variable-other-window)
- customize-package-emacs-version-alist
- (defun . customize-changed)
- custom-file global-cwarn-mode
- (defun . pending-delete-mode)
- delete-selection-mode desktop-save-mode desktop-locals-to-save desktop-save-buffer desktop-buffer-mode-handlers desktop-minor-mode-handlers diff-switches diff-command dired-listing-switches dired-chown-program dired-ls-F-marks-symlinks dired-trivial-filenames dired-keep-marker-rename dired-keep-marker-copy dired-keep-marker-hardlink dired-keep-marker-symlink dired-dwim-target dired-copy-preserve-time dired-directory dnd-protocol-alist
- (defun . zone-mode)
- (defun . easy-mmode-define-minor-mode)
- (defun . easy-mmode-define-global-mode)
- (defun . define-global-minor-mode)
- (defun . ebnf-despool)
- edebug-all-defs edebug-all-forms
- (defun . edebug-defun)
- (defun . ediff3)
- (defun . ediff)
- (defun . ebuffers)
- (defun . ebuffers3)
- (defun . edirs)
- (defun . edir-revisions)
- (defun . edirs3)
- (defun . edirs-merge)
- (defun . edir-merge-revisions)
- (defun . edir-merge-revisions-with-ancestor)
- (defun . edirs-merge-with-ancestor)
- (defun . ediff-merge)
- (defun . ediff-merge-with-ancestor)
- (defun . epatch)
- (defun . epatch-buffer)
- (defun . erevision)
- menu-bar-ediff-misc-menu menu-bar-epatch-menu menu-bar-ediff-merge-menu menu-bar-ediff-menu
- (defun . eregistry)
- edmacro-eight-bits eldoc-minor-mode-string eldoc-documentation-function menu-bar-emerge-menu epa-global-mail-mode
- (defun . epg-import-keys-from-server)
- (defun . erc-select)
- erc-ctcp-query-DCC-hook erc-track-minor-mode
- (defun . eshell-report-bug)
- tags-file-name tags-case-fold-search tags-table-list tags-compression-info-list tags-add-tables find-tag-hook find-tag-default-function eudc-tools-menu
- (defun . ffap)
- find-ls-option find-ls-subdir-switches find-grep-options find-name-arg ff-special-constructs
- (defun . ff-find-related-file)
- flyspell-mode
- (defun . gdba)
- gdb-enable-debug generic-mode-list
- (defun . gnus-batch-kill)
- (defun . gnus-set-sorted-intersection)
- (defun . goto-address-at-mouse)
- grep-window-height grep-command grep-find-command grep-setup-hook grep-regexp-alist grep-program find-program xargs-program grep-find-use-xargs grep-history grep-find-history
- (defun . find-grep)
- help-at-pt-display-when-idle three-step-help global-hi-lock-mode
- (defun . highlight-lines-matching-regexp)
- (defun . highlight-regexp)
- (defun . highlight-phrase)
- (defun . unhighlight-regexp)
- hs-special-modes-alist global-highlight-changes-mode hippie-expand-try-functions-list hippie-expand-verbose hippie-expand-dabbrev-skip-space hippie-expand-dabbrev-as-symbol hippie-expand-no-restriction hippie-expand-max-buffers hippie-expand-ignore-buffers hippie-expand-only-buffers global-hl-line-mode holiday-general-holidays general-holidays holiday-oriental-holidays oriental-holidays holiday-local-holidays local-holidays holiday-other-holidays other-holidays hebrew-holidays-1 hebrew-holidays-2 hebrew-holidays-3 hebrew-holidays-4 holiday-hebrew-holidays hebrew-holidays holiday-christian-holidays christian-holidays holiday-islamic-holidays islamic-holidays holiday-bahai-holidays bahai-holidays holiday-solar-holidays solar-holidays
- (defun . holiday-list)
- icomplete-mode ido-mode
- (defun . image-dired)
- (defun . tumme)
- image-file-name-extensions image-file-name-regexps auto-image-file-mode imenu-sort-function imenu-generic-expression imenu-create-index-function imenu-prev-index-position-function imenu-extract-index-name-function imenu-name-lookup-function imenu-default-goto-function inferior-lisp-filter-regexp inferior-lisp-program inferior-lisp-load-command inferior-lisp-prompt inferior-lisp-mode-hook
- (defun . run-lisp)
- Info-split-threshold ispell-personal-dictionary ispell-menu-map ispell-menu-xemacs ispell-menu-map-needed ispell-skip-region-alist ispell-tex-skip-alists ispell-html-skip-alists iswitchb-mode jka-compr-inhibit keypad-setup keypad-numlock-setup keypad-shifted-setup keypad-numlock-shifted-setup kkc-after-update-conversion-functions default-korean-keyboard
- (defun . landmark-repeat)
- (defun . landmark)
- latex-inputenc-coding-alist latin1-display latin1-display-ucs-per-lynx ledit-save-files ledit-go-to-lisp-string ledit-go-to-liszt-string linum-format global-linum-mode locate-ls-subdir-switches lpr-windows-system lpr-lp-system printer-name lpr-switches lpr-command ls-lisp-support-shell-wildcards
- (defun . phases-of-moon)
- mail-hist-keep-history mail-use-rfc822 mail-abbrevs-mode mail-complete-style
- (defun . manual-entry)
- minibuffer-depth-indicate-mode minibuffer-electric-default-mode multi-isearch-next-buffer-function multi-isearch-next-buffer-current-function multi-isearch-current-buffer mouse-sel-mode msb-mode
- (defun . string-to-list)
- (defun . string-to-vector)
- (defun . nested-alist-p)
- mouse-wheel-mode
- (defun . ipconfig)
- (defun . indent-for-comment)
- (defun . set-comment-column)
- (defun . kill-comment)
- (defun . indent-new-comment-line)
- comment-use-syntax comment-column comment-start comment-start-skip comment-end-skip comment-end comment-indent-function comment-insert-comment-function comment-style comment-padding comment-multi-line comment-auto-fill-only-comments disabled-command-function disabled-command-hook
- (defun . run-octave)
- (defun . org-publish-project)
- show-paren-mode pc-selection-mode
- (defun . pcomplete/gdb)
- (defun . pcomplete/pushd)
- (defun . pcomplete/time)
- cvs-dired-action cvs-dired-use-hook
- (defun . cvs-dired-noselect)
- cvs-global-menu
- (defun . edit-picture)
- (defun . run-prolog)
- bdf-directory-list ps-page-dimensions-database ps-paper-type ps-print-color-p quickurl-reread-hook-postfix
- (defun . irc)
- rcirc-track-minor-mode
- (defun . regexp-builder)
- recentf-mode
- (defun . close-rectangle)
- (defun . replace-rectangle)
- global-reveal-mode rmail-dont-reply-to-names rmail-default-dont-reply-to-names rmail-ignored-headers rmail-displayed-headers rmail-retry-ignored-headers rmail-highlighted-headers rmail-primary-inbox-list rmail-secondary-file-directory rmail-secondary-file-regexp rmail-mode-hook rmail-show-message-hook rmail-file-coding-system rmail-insert-mime-forwarded-message-function rmail-user-mail-address-regexp savehist-mode scroll-all-mode mail-from-style mail-specify-envelope-from mail-self-blind mail-interactive send-mail-function mail-header-separator mail-archive-file-name mail-default-reply-to mail-alias-file mail-personal-alias-file mail-setup-hook mail-aliases mail-yank-prefix mail-indentation-spaces mail-citation-hook mail-citation-prefix-regexp mail-signature mail-signature-file mail-default-directory mail-default-headers mail-bury-selects-summary mail-send-nonascii mail-mailing-lists sendmail-coding-system default-sendmail-coding-system server-mode
- (defun . xml-mode)
- (defun . shell-script-mode)
- shell-dumb-shell-regexp skeleton-filter-function
- (defun . speedbar)
- strokes-mode
- (defun . t-mouse-mode)
- gpm-mouse-mode table-cell-map-hook table-load-hook table-point-entered-cell-hook table-point-left-cell-hook tex-shell-file-name tex-directory tex-first-line-header-regexp tex-main-file tex-offer-save tex-run-command latex-run-command slitex-run-command tex-start-options tex-start-commands latex-block-names tex-bibtex-command tex-dvi-print-command tex-alt-dvi-print-command tex-dvi-view-command tex-show-queue-command tex-default-mode tex-open-quote tex-close-quote
- (defun . TeX-mode)
- (defun . plain-TeX-mode)
- (defun . LaTeX-mode)
- texinfo-open-quote texinfo-close-quote
- (defun . thumbs)
- display-time-day-and-date display-time-mode
- (defun . subtract-time)
- tpu-edt-mode
- (defun . tpu-edt)
- trace-buffer tramp-mode tramp-syntax tramp-file-name-regexp-unified tramp-file-name-regexp-separate tramp-file-name-regexp-url tramp-file-name-regexp tramp-root-regexp tramp-completion-file-name-regexp-unified tramp-completion-file-name-regexp-separate tramp-completion-file-name-regexp-url tramp-completion-file-name-regexp tramp-completion-file-name-handler-alist
- (defun . tramp-run-real-handler)
- (defun . tramp-completion-run-real-handler)
- (defun . tramp-completion-file-name-handler)
- (defun . tramp-register-file-name-handler)
- (defun . tramp-register-completion-file-name-handler)
- type-break-mode type-break-interval type-break-good-rest-interval type-break-good-break-interval type-break-keystroke-threshold url-handler-mode
- (defun . url-http-file-readable-p)
- url-https-default-port url-https-asynchronous-p
- (defun . url-https-expand-file-name)
- (defun . url-rlogin)
- (defun . url-telnet)
- (defun . url-tn3270)
- url-debug
- (defun . url-basepath)
- vc-checkout-hook vc-checkin-hook vc-before-checkin-hook
- (defun . vc-resolve-conflicts)
- (defun . vc-revert-buffer)
- (defun . vc-arch-registered)
- vc-bzr-admin-dirname vc-bzr-admin-checkout-format-file
- (defun . vc-bzr-registered)
- (defun . vc-cvs-registered)
- (defun . vc-git-registered)
- (defun . vc-hg-registered)
- vc-mtn-admin-dir vc-mtn-admin-format
- (defun . vc-mtn-registered)
- vc-rcs-master-templates
- (defun . vc-rcs-registered)
- vc-sccs-master-templates
- (defun . vc-sccs-registered)
- (defun . vc-sccs-search-project-dir)
- (defun . vc-svn-registered)
- view-remove-frame-by-deleting view-mode warning-prefix-function warning-series warning-fill-prefix warning-type-format
- (defun . which-func-mode)
- which-function-mode global-whitespace-mode global-whitespace-newline-mode widget-keymap winner-mode woman-locale xterm-mouse-mode
- (provide . loaddefs))
- ("/usr/share/emacs/23.0.93/lisp/startup.elc" command-line-processed initial-buffer-choice inhibit-startup-screen inhibit-splash-screen inhibit-startup-message startup-screen-inhibit-startup-screen inhibit-startup-echo-area-message inhibit-default-init inhibit-startup-buffer-menu command-switch-alist command-line-args-left argv command-line-functions command-line-default-directory command-line-x-option-alist command-line-ns-option-alist before-init-hook after-init-hook emacs-startup-hook term-setup-hook inhibit-startup-hooks keyboard-type window-setup-hook initial-major-mode init-file-user site-run-file mail-host-address user-mail-address auto-save-list-file-prefix emacs-quick-startup emacs-basic-display init-file-debug init-file-had-error normal-top-level-add-subdirs-inode-list debian-emacs-flavor no-blinking-cursor pure-space-overflow pure-space-overflow-message tutorial-directory
- (defun . normal-top-level-add-subdirs-to-load-path)
- (defun . normal-top-level-add-to-load-path)
- (defun . normal-top-level)
- (defun . precompute-menubar-bindings)
- tty-long-option-alist tty-long-option-alist tool-bar-images-pixel-height tool-bar-originally-present handle-args-function-alist window-system-initialization-alist
- (defun . tty-handle-args)
- (defun . command-line)
- initial-scratch-message fancy-startup-text fancy-about-text fancy-splash-image splash-screen-keymap
- (defun . fancy-splash-insert)
- (defun . fancy-splash-head)
- (defun . fancy-startup-tail)
- (defun . exit-splash-screen)
- (defun . fancy-startup-screen)
- (defun . fancy-about-screen)
- (defun . fancy-splash-frame)
- (defun . use-fancy-splash-screens-p)
- (defun . normal-splash-screen)
- (defun . normal-mouse-startup-screen)
- (defun . normal-no-mouse-startup-screen)
- (defun . normal-about-screen)
- (defun . startup-echo-area-message)
- (defun . display-startup-echo-area-message)
- (defun . display-startup-screen)
- (defun . display-about-screen)
- (defun . about-emacs)
- (defun . display-splash-screen)
- (defun . command-line-1)
- (defun . command-line-normalize-file-name))
- ("/usr/share/emacs/23.0.93/lisp/button.elc"
- (defface . button)
- button-map button-buffer-map
- (defun . button-category-symbol)
- (defun . define-button-type)
- (defun . button-type-put)
- (defun . button-type-get)
- (defun . button-type-subtype-p)
- (defun . button-start)
- (defun . button-end)
- (defun . button-get)
- (defun . button-put)
- (defun . button-activate)
- (defun . button-label)
- (defun . button-type)
- (defun . button-has-type-p)
- (defun . make-button)
- (defun . insert-button)
- (defun . make-text-button)
- (defun . insert-text-button)
- (defun . button-at)
- (defun . next-button)
- (defun . previous-button)
- (defun . push-button)
- (defun . forward-button)
- (defun . backward-button)
- (provide . button))
- ("/usr/share/emacs/23.0.93/lisp/minibuffer.elc"
- (defun . completion-boundaries)
- (defun . completion--some)
- (defun . complete-with-action)
- (defun . completion-table-dynamic)
- (defun . lazy-completion-table)
- (defun . completion-table-with-context)
- (defun . completion-table-with-terminator)
- (defun . completion-table-with-predicate)
- (defun . completion-table-in-turn)
- (defun . complete-in-turn)
- (defun . dynamic-completion-table)
- (defun . minibuffer-message)
- (defun . minibuffer-completion-contents)
- (defun . delete-minibuffer-contents)
- completion-auto-help completion-styles-alist completion-styles
- (defun . completion-try-completion)
- (defun . completion-all-completions)
- (defun . minibuffer--bitset)
- (defun . completion--do-completion)
- (defun . minibuffer-complete)
- completion-all-sorted-completions
- (defun . completion--flush-all-sorted-completions)
- (defun . completion-all-sorted-completions)
- (defun . minibuffer-force-complete)
- minibuffer-confirm-exit-commands
- (defun . minibuffer-complete-and-exit)
- (defun . completion--try-word-completion)
- (defun . minibuffer-complete-word)
- (defun . completion--insert-strings)
- completion-common-substring completion-setup-hook
- (defface . completions-first-difference)
- (defface . completions-common-part)
- (defun . completion-hilit-commonality)
- (defun . display-completion-list)
- (defun . minibuffer-completion-help)
- (defun . exit-minibuffer)
- (defun . self-insert-and-exit)
- minibuffer-local-must-match-filename-map
- (defun . minibuffer--double-dollars)
- (defun . completion--make-envvar-table)
- completion--embedded-envvar-re completion--embedded-envvar-re
- (defun . completion--embedded-envvar-table)
- (defun . completion--file-name-table)
- (defun . read-file-name-internal)
- read-file-name-function read-file-name-predicate read-file-name-completion-ignore-case insert-default-directory
- (defun . read-file-name)
- (defun . internal-complete-buffer-except)
- (defun . completion-emacs21-try-completion)
- (defun . completion-emacs21-all-completions)
- (defun . completion-emacs22-try-completion)
- (defun . completion-emacs22-all-completions)
- (defun . completion--merge-suffix)
- (defun . completion-basic-try-completion)
- (defun . completion-basic-all-completions)
- completion-pcm--delim-wild-regex
- (defun . completion-pcm--prepare-delim-re)
- completion-pcm-word-delimiters
- (defun . completion-pcm--pattern-trivial-p)
- (defun . completion-pcm--string->pattern)
- (defun . completion-pcm--pattern->regex)
- (defun . completion-pcm--all-completions)
- (defun . completion-pcm--hilit-commonality)
- (defun . completion-pcm--find-all-completions)
- (defun . completion-pcm-all-completions)
- (defun . completion-pcm--merge-completions)
- (defun . completion-pcm--pattern->string)
- (defun . completion-pcm--filename-try-filter)
- (defun . completion-pcm--merge-try)
- (defun . completion-pcm-try-completion)
- (provide . minibuffer))
- ("/usr/share/emacs/23.0.93/lisp/faces.elc" face-name-history face-font-selection-order face-font-family-alternatives face-font-registry-alternatives
- (defun . face-list)
- (defun . make-face)
- (defun . make-empty-face)
- (defun . copy-face)
- (defun . internal-find-face)
- (defun . internal-get-face)
- (defun . facep)
- (defun . check-face)
- (defun . face-id)
- (defun . face-equal)
- (defun . face-differs-from-default-p)
- (defun . face-nontrivial-p)
- face-x-resources
- (defun . set-face-attribute-from-resource)
- (defun . set-face-attributes-from-resources)
- (defun . make-face-x-resource-internal)
- (defun . face-name)
- (defun . face-all-attributes)
- (defun . face-attribute)
- (defun . face-attribute-merged-with)
- (defun . face-attribute-specified-or)
- (defun . face-foreground)
- (defun . face-background)
- (defun . face-stipple)
- (defun . face-background-pixmap)
- (defun . face-underline-p)
- (defun . face-inverse-video-p)
- (defun . face-bold-p)
- (defun . face-italic-p)
- (defun . face-documentation)
- (defun . set-face-documentation)
- (defun . face-doc-string)
- (defun . set-face-doc-string)
- (defun . set-face-attribute)
- (defun . make-face-bold)
- (defun . make-face-unbold)
- (defun . make-face-italic)
- (defun . make-face-unitalic)
- (defun . make-face-bold-italic)
- (defun . set-face-font)
- (defun . set-face-background)
- (defun . set-face-foreground)
- (defun . set-face-stipple)
- (defun . set-face-underline-p)
- (defun . set-face-underline)
- (defun . set-face-inverse-video-p)
- (defun . set-face-bold-p)
- (defun . set-face-italic-p)
- (defun . set-face-background-pixmap)
- (defun . invert-face)
- (defun . read-face-name)
- (defun . face-valid-attribute-values)
- face-attribute-name-alist
- (defun . face-descriptive-attribute-name)
- (defun . face-read-string)
- (defun . face-read-integer)
- (defun . read-face-attribute)
- (defun . read-face-font)
- (defun . read-all-face-attributes)
- (defun . modify-face)
- (defun . read-face-and-attribute)
- list-faces-sample-text
- (defun . list-faces-display)
- (defun . describe-face)
- (defun . face-attr-construct)
- (defun . face-spec-set-match-display)
- (defun . face-spec-choose)
- (defun . face-spec-reset-face)
- (defun . face-spec-set)
- (defun . face-spec-recalc)
- (defun . face-spec-set-2)
- (defun . face-attr-match-p)
- (defun . face-spec-match-p)
- (defun . face-default-spec)
- (defun . face-user-default-spec)
- (defun . defined-colors)
- (defun . x-defined-colors)
- (defun . color-defined-p)
- (defun . x-color-defined-p)
- (defun . color-values)
- (defun . x-color-values)
- (defun . display-color-p)
- (defun . x-display-color-p)
- (defun . display-grayscale-p)
- (defun . read-color)
- (defun . face-at-point)
- (defun . foreground-color-at-point)
- (defun . background-color-at-point)
- frame-background-mode inhibit-frame-set-background-mode
- (defun . frame-set-background-mode)
- (defun . x-handle-named-frame-geometry)
- (defun . x-handle-reverse-video)
- (defun . x-create-frame-with-faces)
- (defun . face-set-after-frame-default)
- (defun . tty-handle-reverse-video)
- (defun . tty-create-frame-with-faces)
- (defun . tty-find-type)
- (defun . tty-run-terminal-initialization)
- (defun . tty-set-up-initial-frame-faces)
- (defun . frame-update-faces)
- (defun . frame-update-face-colors)
- (defface . default)
- (defface . bold)
- (defface . italic)
- (defface . bold-italic)
- (defface . underline)
- (defface . fixed-pitch)
- (defface . variable-pitch)
- (defface . shadow)
- (defface . link)
- (defface . link-visited)
- (defface . highlight)
- (defface . region)
- (defface . secondary-selection)
- (defface . trailing-whitespace)
- (defface . escape-glyph)
- (defface . nobreak-space)
- (defface . mode-line)
- (defface . mode-line-inactive)
- (defface . mode-line-highlight)
- (defface . mode-line-emphasis)
- (defface . mode-line-buffer-id)
- (defface . header-line)
- (defface . vertical-border)
- (defface . minibuffer-prompt)
- (defface . fringe)
- (defface . scroll-bar)
- (defface . border)
- (defface . cursor)
- (defface . mouse)
- (defface . tool-bar)
- (defface . menu)
- x-font-regexp x-font-regexp-head x-font-regexp-weight x-font-regexp-slant x-font-regexp-weight-subnum x-font-regexp-weight-subnum x-font-regexp-slant-subnum x-font-regexp-slant-subnum x-font-regexp-swidth-subnum x-font-regexp-swidth-subnum x-font-regexp-adstyle-subnum x-font-regexp-adstyle-subnum
- (defun . x-resolve-font-name)
- (defun . x-frob-font-weight)
- (defun . x-frob-font-slant)
- (defun . internal-frob-font-weight)
- (defun . internal-frob-font-slant)
- (defun . x-make-font-bold)
- (defun . x-make-font-demibold)
- (defun . x-make-font-unbold)
- (defun . x-make-font-italic)
- (defun . x-make-font-oblique)
- (defun . x-make-font-unitalic)
- (defun . x-make-font-bold-italic)
- (provide . faces))
- ("/usr/share/emacs/23.0.93/lisp/cus-face.elc"
- (defun . custom-facep)
- (defun . custom-declare-face)
- custom-face-attributes
- (defun . custom-face-attributes-get)
- (defun . custom-set-faces)
- (defun . custom-theme-set-faces)
- (defun . custom-theme-reset-faces)
- (defun . custom-reset-faces)
- (provide . cus-face))
- ("/usr/share/emacs/23.0.93/lisp/files.elc" delete-auto-save-files directory-abbrev-alist make-backup-files backup-inhibited backup-by-copying backup-by-copying-when-linked backup-by-copying-when-mismatch backup-by-copying-when-privileged-mismatch backup-enable-predicate buffer-offer-save find-file-existing-other-name find-file-visit-truename revert-without-query buffer-file-number buffer-file-numbers-unique buffer-file-read-only temporary-file-directory small-temporary-file-directory null-device file-name-invalid-regexp file-precious-flag break-hardlink-on-save version-control dired-kept-versions delete-old-versions kept-old-versions kept-new-versions require-final-newline mode-require-final-newline auto-save-default auto-save-file-name-transforms save-abbrevs find-file-run-dired find-directory-functions find-file-not-found-functions find-file-not-found-hooks find-file-hooks find-file-hook write-file-functions write-file-hooks local-write-file-hooks write-contents-functions write-contents-hooks enable-local-variables local-enable-local-variables enable-local-eval view-read-only file-name-history
- (defun . ange-ftp-completion-hook-function)
- (defun . convert-standard-filename)
- (defun . read-directory-name)
- (defun . pwd)
- cd-path
- (defun . parse-colon-path)
- (defun . cd-absolute)
- (defun . cd)
- (defun . load-file)
- (defun . locate-file)
- (defun . locate-file-completion-table)
- (defun . locate-file-completion)
- locate-dominating-stop-dir-regexp
- (defun . locate-dominating-file)
- (defun . executable-find)
- (defun . load-library)
- (defun . file-remote-p)
- (defun . file-local-copy)
- (defun . file-truename)
- (defun . file-chase-links)
- (defun . make-temp-file)
- (defun . recode-file-name)
- confirm-nonexistent-file-or-buffer
- (defun . confirm-nonexistent-file-or-buffer)
- (defun . read-buffer-to-switch)
- (defun . switch-to-buffer-other-window)
- (defun . switch-to-buffer-other-frame)
- (defun . display-buffer-other-frame)
- find-file-default
- (defun . minibuffer-with-setup-hook)
- (defun . find-file-read-args)
- (defun . find-file)
- (defun . find-file-other-window)
- (defun . find-file-other-frame)
- (defun . find-file-existing)
- (defun . find-file-read-only)
- (defun . find-file-read-only-other-window)
- (defun . find-file-read-only-other-frame)
- (defun . find-alternate-file-other-window)
- (defun . find-alternate-file)
- (defun . create-file-buffer)
- (defun . generate-new-buffer)
- automount-dir-prefix abbreviated-home-dir
- (defun . abbreviate-file-name)
- find-file-not-true-dirname-list
- (defun . find-buffer-visiting)
- find-file-wildcards find-file-suppress-same-file-warnings large-file-warning-threshold
- (defun . abort-if-file-too-large)
- (defun . find-file-noselect)
- (defun . find-file-noselect-1)
- (defun . insert-file-contents-literally)
- (defun . insert-file-1)
- (defun . insert-file-literally)
- find-file-literally
- (defun . find-file-literally)
- after-find-file-from-revert-buffer
- (defun . after-find-file)
- (defun . report-errors)
- (defun . normal-mode)
- auto-mode-case-fold auto-mode-alist
- (defun . conf-mode-maybe)
- interpreter-mode-alist inhibit-first-line-modes-regexps inhibit-first-line-modes-suffixes auto-mode-interpreter-regexp magic-mode-alist magic-fallback-mode-alist magic-mode-regexp-match-limit
- (defun . set-auto-mode)
- (defun . set-auto-mode-0)
- (defun . set-auto-mode-1)
- ignored-local-variables hack-local-variables-hook safe-local-variable-values safe-local-eval-forms file-local-variables-alist before-hack-local-variables-hook
- (defun . hack-local-variables-confirm)
- (defun . hack-local-variables-prop-line)
- (defun . hack-local-variables-filter)
- (defun . hack-local-variables)
- (defun . safe-local-variable-p)
- (defun . risky-local-variable-p)
- (defun . hack-one-local-variable-quotep)
- (defun . hack-one-local-variable-constantp)
- (defun . hack-one-local-variable-eval-safep)
- (defun . hack-one-local-variable)
- dir-locals-class-alist dir-locals-directory-cache
- (defun . dir-locals-get-class-variables)
- (defun . dir-locals-collect-mode-variables)
- (defun . dir-locals-collect-variables)
- (defun . dir-locals-set-directory-class)
- (defun . dir-locals-set-class-variables)
- dir-locals-file
- (defun . dir-locals-find-file)
- (defun . dir-locals-read-from-file)
- (defun . hack-dir-local-variables)
- change-major-mode-with-file-name
- (defun . set-visited-file-name)
- (defun . write-file)
- (defun . backup-buffer)
- (defun . backup-buffer-copy)
- (defun . file-name-sans-versions)
- (defun . file-ownership-preserved-p)
- (defun . file-name-sans-extension)
- (defun . file-name-extension)
- make-backup-file-name-function backup-directory-alist
- (defun . normal-backup-enable-predicate)
- (defun . make-backup-file-name)
- (defun . make-backup-file-name-1)
- (defun . backup-file-name-p)
- (defun . backup-extract-version)
- (defun . find-backup-file-name)
- (defun . file-nlinks)
- (defun . file-relative-name)
- (defun . save-buffer)
- (defun . delete-auto-save-file-if-necessary)
- auto-save-hook before-save-hook after-save-hook save-buffer-coding-system
- (defun . basic-save-buffer)
- (defun . basic-save-buffer-1)
- (defun . basic-save-buffer-2)
- (defun . diff-buffer-with-file)
- save-some-buffers-action-alist buffer-save-without-query
- (defun . save-some-buffers)
- (defun . not-modified)
- (defun . toggle-read-only)
- (defun . insert-file)
- (defun . append-to-file)
- (defun . file-newest-backup)
- (defun . rename-uniquely)
- (defun . make-directory)
- revert-buffer-function revert-buffer-insert-file-contents-function buffer-stale-function before-revert-hook after-revert-hook
- (defun . revert-buffer)
- (defun . recover-this-file)
- (defun . recover-file)
- (defun . recover-session)
- (defun . recover-session-finish)
- (defun . kill-buffer-ask)
- (defun . kill-some-buffers)
- (defun . kill-matching-buffers)
- (defun . auto-save-mode)
- (defun . rename-auto-save-file)
- (defun . make-auto-save-file-name)
- (defun . auto-save-file-name-p)
- (defun . wildcard-to-regexp)
- list-directory-brief-switches list-directory-verbose-switches
- (defun . file-expand-wildcards)
- (defun . list-directory)
- (defun . shell-quote-wildcard-pattern)
- insert-directory-program directory-free-space-program directory-free-space-args
- (defun . get-free-disk-space)
- directory-listing-before-filename-regexp insert-directory-ls-version
- (defun . insert-directory)
- (defun . insert-directory-adj-pos)
- (defun . insert-directory-safely)
- kill-emacs-query-functions confirm-kill-emacs
- (defun . save-buffers-kill-emacs)
- (defun . save-buffers-kill-terminal)
- (defun . file-name-non-special)
- (defun . file-modes-char-to-who)
- (defun . file-modes-char-to-right)
- (defun . file-modes-rights-to-number)
- (defun . file-modes-symbolic-to-number)
- (defun . read-file-modes)
- trash-directory
- (defun . move-file-to-trash))
- ("/usr/share/emacs/23.0.93/lisp/bindings.elc"
- (defun . make-mode-line-mouse-map)
- (defun . mode-line-toggle-read-only)
- (defun . mode-line-toggle-modified)
- (defun . mode-line-widen)
- (defun . mode-line-abbrev-mode)
- (defun . mode-line-auto-fill-mode)
- mode-line-input-method-map mode-line-coding-system-map
- (defun . mode-line-change-eol)
- mode-line-eol-desc-cache
- (defun . mode-line-eol-desc)
- mode-line-client mode-line-mule-info
- (defun . mode-line-frame-control)
- mode-line-frame-identification mode-line-process mode-line-modified mode-line-remote mode-line-position mode-line-modes mode-line-mode-menu mode-line-major-mode-keymap mode-line-minor-mode-keymap mode-line-column-line-number-mode-map mode-line-buffer-identification-keymap
- (defun . propertized-buffer-identification)
- mode-line-buffer-identification
- (defun . unbury-buffer)
- (defun . mode-line-unbury-buffer)
- (defun . mode-line-bury-buffer)
- (defun . mode-line-other-buffer)
- (defun . mode-line-next-buffer)
- (defun . mode-line-previous-buffer)
- (defun . bound-and-true-p)
- (defun . mode-line-minor-mode-help)
- minor-mode-alist
- (provide . base64)
- (provide . md5)
- (provide . overlay)
- (provide . text-properties)
- (defun . complete-symbol)
- narrow-map goto-map search-map
- (defun . mode-specific-command-prefix)
- mode-specific-map ctl-x-r-map abbrev-map)
- ("/usr/share/emacs/23.0.93/lisp/format.elc" format-alist
- (defun . format-encode-run-method)
- (defun . format-decode-run-method)
- (defun . format-annotate-function)
- (defun . format-decode)
- (defun . format-decode-buffer)
- (defun . format-decode-region)
- (defun . format-encode-buffer)
- (defun . format-encode-region)
- (defun . format-write-file)
- (defun . format-find-file)
- (defun . format-insert-file)
- (defun . format-read)
- (defun . format-replace-strings)
- (defun . format-delq-cons)
- (defun . format-make-relatively-unique)
- (defun . format-common-tail)
- (defun . format-proper-list-p)
- (defun . format-reorder)
- (defun . format-deannotate-region)
- (defun . format-subtract-regions)
- (defun . format-property-increment-region)
- (defun . format-insert-annotations)
- (defun . format-annotate-value)
- (defun . format-annotate-region)
- (defun . format-annotate-location)
- (defun . format-annotate-single-property-change)
- (defun . format-annotate-atomic-property-change)
- (provide . format))
- ("/usr/share/emacs/23.0.93/lisp/env.elc" read-envvar-name-history
- (defun . read-envvar-name)
- setenv-history
- (defun . substitute-env-vars)
- (defun . setenv-internal)
- (defun . setenv)
- (defun . getenv)
- (provide . env))
- ("/usr/share/emacs/23.0.93/lisp/international/mule-conf.el"
- (defun . define-iso-single-byte-charset)
- (provide . code-pages))
- ("/usr/share/emacs/23.0.93/lisp/international/mule.elc" mule-version mule-version-date private-char-area-1-min private-char-area-1-max private-char-area-2-min private-char-area-2-max emacs-mule-charset-table
- (defun . convert-define-charset-argument)
- (defun . define-charset)
- (defun . load-with-code-conversion)
- (defun . charset-info)
- (defun . charset-id)
- (defun . charset-bytes)
- (defun . get-charset-property)
- (defun . put-charset-property)
- (defun . charset-description)
- (defun . charset-dimension)
- (defun . charset-chars)
- (defun . charset-iso-final-char)
- (defun . charset-short-name)
- (defun . charset-long-name)
- (defun . charset-list)
- (defun . char-valid-p)
- (defun . generic-char-p)
- (defun . make-char-internal)
- ascii-case-table coding-system-iso-2022-flags
- (defun . define-coding-system)
- (defun . coding-system-doc-string)
- (defun . coding-system-mnemonic)
- (defun . coding-system-type)
- (defun . coding-system-charset-list)
- (defun . coding-system-category)
- (defun . coding-system-get)
- (defun . coding-system-eol-type-mnemonic)
- (defun . coding-system-lessp)
- (defun . coding-system-equal)
- (defun . add-to-coding-system-list)
- (defun . coding-system-list)
- char-coding-system-table
- (defun . transform-make-coding-system-args)
- (defun . make-coding-system)
- (defun . merge-coding-systems)
- (defun . autoload-coding-system)
- buffer-file-coding-system-explicit
- (defun . set-buffer-file-coding-system)
- (defun . revert-buffer-with-coding-system)
- (defun . set-file-name-coding-system)
- default-terminal-coding-system
- (defun . set-terminal-coding-system)
- default-keyboard-coding-system
- (defun . set-keyboard-coding-system)
- keyboard-coding-system
- (defun . set-buffer-process-coding-system)
- (defun . set-clipboard-coding-system)
- (defun . set-selection-coding-system)
- last-next-selection-coding-system
- (defun . set-next-selection-coding-system)
- (defun . set-coding-priority)
- ctext-non-standard-encodings-alist ctext-non-standard-encodings ctext-non-standard-encodings-regexp
- (defun . ctext-post-read-conversion)
- (defun . ctext-non-standard-encodings-table)
- (defun . ctext-pre-write-conversion)
- auto-coding-alist auto-coding-regexp-alist
- (defun . auto-coding-regexp-alist-lookup)
- auto-coding-functions set-auto-coding-for-load
- (defun . auto-coding-alist-lookup)
- (defun . find-auto-coding)
- (defun . set-auto-coding)
- (defun . after-insert-file-set-coding)
- (defun . find-new-buffer-file-coding-system)
- (defun . modify-coding-system-alist)
- (defun . decode-coding-inserted-region)
- (defun . recode-region)
- (defun . make-translation-table)
- (defun . make-translation-table-from-vector)
- (defun . make-translation-table-from-alist)
- (defun . define-translation-table)
- (defun . translate-region)
- (defun . with-category-table)
- (defun . define-translation-hash-table)
- (defun . sgml-xml-auto-coding-function)
- (defun . sgml-html-meta-auto-coding-function)
- (defun . xml-find-file-coding-system)
- (provide . mule))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/map-ynp.elc"
- (defun . map-y-or-n-p))
- ("/usr/share/emacs/23.0.93/lisp/custom.elc"
- (require . widget)
- custom-define-hook custom-dont-initialize custom-current-group-alist
- (defun . custom-initialize-default)
- (defun . custom-initialize-set)
- (defun . custom-initialize-safe-set)
- (defun . custom-initialize-safe-default)
- (defun . custom-initialize-reset)
- (defun . custom-initialize-changed)
- (defun . custom-declare-variable)
- (defun . defcustom)
- (defun . defface)
- (defun . custom-current-group)
- (defun . custom-declare-group)
- (defun . defgroup)
- (defun . custom-add-to-group)
- (defun . custom-group-of-mode)
- (defun . custom-handle-all-keywords)
- (defun . custom-handle-keyword)
- (defun . custom-add-dependencies)
- (defun . custom-add-option)
- (defun . custom-add-frequent-value)
- (defun . custom-add-link)
- (defun . custom-add-version)
- (defun . custom-add-package-version)
- (defun . custom-add-load)
- (defun . custom-autoload)
- (defun . custom-variable-p)
- (defun . custom-note-var-changed)
- custom-load-recursion
- (defun . custom-load-symbol)
- custom-local-buffer
- (defun . custom-set-default)
- (defun . custom-set-minor-mode)
- (defun . custom-quote)
- (defun . customize-mark-to-save)
- (defun . customize-mark-as-set)
- (defun . custom-reevaluate-setting)
- custom-known-themes
- (defun . custom-theme-p)
- (defun . custom-check-theme)
- (defun . custom-push-theme)
- (defun . custom-set-variables)
- (defun . custom-theme-set-variables)
- (defun . deftheme)
- (defun . custom-declare-theme)
- (defun . custom-make-theme-feature)
- custom-theme-directory
- (defun . provide-theme)
- (defun . load-theme)
- custom-enabling-themes
- (defun . enable-theme)
- custom-enabled-themes
- (defun . custom-theme-enabled-p)
- (defun . disable-theme)
- (defun . custom-variable-theme-value)
- (defun . custom-theme-recalc-variable)
- (defun . custom-theme-recalc-face)
- (defun . custom-theme-reset-variables)
- (defun . custom-reset-variables)
- read-quoted-char-radix
- (provide . custom))
- ("/usr/share/emacs/23.0.93/lisp/widget.elc"
- (defun . define-widget-keywords)
- (defun . define-widget)
- (defun . widget-plist-member)
- (provide . widget))
- ("/usr/share/emacs/23.0.93/lisp/version.el" emacs-copyright emacs-version emacs-major-version emacs-minor-version emacs-build-time emacs-build-system
- (defun . emacs-version)
- (defun . version))
- ("/usr/share/emacs/23.0.93/lisp/subr.elc" custom-declare-variable-list
- (defun . custom-declare-variable-early)
- (defun . declare-function)
- (defun . not)
- (defun . noreturn)
- (defun . 1value)
- (defun . def-edebug-spec)
- (defun . lambda)
- (defun . push)
- (defun . pop)
- (defun . when)
- (defun . unless)
- --dolist-tail--
- (defun . dolist)
- --dotimes-limit--
- (defun . dotimes)
- (defun . declare)
- (defun . ignore-errors)
- (defun . ignore)
- (defun . error)
- (defun . frame-configuration-p)
- (defun . functionp)
- (defun . caar)
- (defun . cadr)
- (defun . cdar)
- (defun . cddr)
- (defun . last)
- (defun . butlast)
- (defun . nbutlast)
- (defun . delete-dups)
- (defun . number-sequence)
- (defun . copy-tree)
- (defun . assoc-default)
- (defun . assoc-ignore-case)
- (defun . assoc-ignore-representation)
- (defun . member-ignore-case)
- (defun . assq-delete-all)
- (defun . rassq-delete-all)
- (defun . remove)
- (defun . remq)
- (defun . kbd)
- (defun . undefined)
- (defun . suppress-keymap)
- (defun . define-key-after)
- (defun . map-keymap-sorted)
- (defun . keymap-canonicalize)
- (defun . keyboard-translate)
- (defun . global-set-key)
- (defun . local-set-key)
- (defun . global-unset-key)
- (defun . local-unset-key)
- key-substitution-in-progress
- (defun . substitute-key-definition)
- (defun . substitute-key-definition-key)
- global-map esc-map ctl-x-map ctl-x-4-map
- (defun . ctl-x-4-prefix)
- ctl-x-5-map
- (defun . ctl-x-5-prefix)
- listify-key-sequence-1 listify-key-sequence-1
- (defun . listify-key-sequence)
- (defun . eventp)
- (defun . event-modifiers)
- (defun . event-basic-type)
- (defun . mouse-movement-p)
- (defun . mouse-event-p)
- (defun . event-start)
- (defun . event-end)
- (defun . event-click-count)
- (defun . posn-window)
- (defun . posn-area)
- (defun . posn-point)
- (defun . posn-set-point)
- (defun . posn-x-y)
- (defun . posn-col-row)
- (defun . posn-actual-col-row)
- (defun . posn-timestamp)
- (defun . posn-string)
- (defun . posn-image)
- (defun . posn-object)
- (defun . posn-object-x-y)
- (defun . posn-object-width-height)
- (defun . window-dot)
- (defun . set-window-dot)
- (defun . read-input)
- (defun . show-buffer)
- (defun . eval-current-buffer)
- (defun . string-to-int)
- (defun . insert-string)
- (defun . makehash)
- (defun . baud-rate)
- (defun . focus-frame)
- (defun . unfocus-frame)
- executing-macro x-lost-selection-hooks x-sent-selection-hooks messages-buffer-max-lines last-input-char last-command-char
- (defun . send-string)
- (defun . send-region)
- (defun . string=)
- (defun . string<)
- (defun . move-marker)
- (defun . rplaca)
- (defun . rplacd)
- (defun . beep)
- (defun . indent-to-column)
- (defun . backward-delete-char)
- (defun . search-forward-regexp)
- (defun . search-backward-regexp)
- (defun . int-to-string)
- (defun . store-match-data)
- (defun . chmod)
- (defun . mkdir)
- (defun . point-at-eol)
- (defun . point-at-bol)
- (defun . user-original-login-name)
- (defun . make-local-hook)
- (defun . add-hook)
- (defun . remove-hook)
- (defun . add-to-list)
- (defun . add-to-ordered-list)
- (defun . add-to-history)
- delay-mode-hooks delayed-mode-hooks after-change-major-mode-hook
- (defun . run-mode-hooks)
- (defun . delay-mode-hooks)
- (defun . derived-mode-p)
- minor-mode-list
- (defun . add-minor-mode)
- (defun . symbol-file)
- (defun . locate-library)
- (defun . eval-at-startup)
- (defun . load-history-regexp)
- (defun . load-history-filename-element)
- (defun . eval-after-load)
- (defun . do-after-load-evaluation)
- (defun . eval-next-after-load)
- (defun . process-lines)
- (defun . open-network-stream)
- (defun . process-kill-without-query)
- (defun . process-get)
- (defun . process-put)
- read-quoted-char-radix
- (defun . read-quoted-char)
- (defun . read-passwd)
- (defun . read-number)
- (defun . sit-for)
- (defun . atomic-change-group)
- (defun . prepare-change-group)
- (defun . activate-change-group)
- (defun . accept-change-group)
- (defun . cancel-change-group)
- (defun . redraw-modeline)
- (defun . force-mode-line-update)
- (defun . momentary-string-display)
- (defun . copy-overlay)
- (defun . remove-overlays)
- suspend-hook suspend-resume-hook temp-buffer-show-hook temp-buffer-setup-hook buffer-file-type user-emacs-directory
- (defun . locate-user-emacs-file)
- (defun . find-tag-default)
- (defun . play-sound)
- (defun . shell-quote-argument)
- (defun . string-or-null-p)
- (defun . booleanp)
- (defun . field-at-pos)
- (defun . remove-yank-excluded-properties)
- (defun . insert-for-yank)
- (defun . insert-for-yank-1)
- (defun . insert-buffer-substring-no-properties)
- (defun . insert-buffer-substring-as-yank)
- (defun . start-process-shell-command)
- (defun . start-file-process-shell-command)
- (defun . call-process-shell-command)
- (defun . process-file-shell-command)
- (defun . with-current-buffer)
- (defun . with-selected-window)
- (defun . with-selected-frame)
- (defun . with-temp-file)
- (defun . with-temp-message)
- (defun . with-temp-buffer)
- (defun . with-output-to-string)
- (defun . with-local-quit)
- (defun . while-no-input)
- (defun . condition-case-no-debug)
- (defun . with-demoted-errors)
- (defun . combine-after-change-calls)
- (defun . with-case-table)
- (defun . save-match-data)
- (defun . match-string)
- (defun . match-string-no-properties)
- (defun . match-substitute-replacement)
- (defun . looking-back)
- (defun . looking-at-p)
- (defun . string-match-p)
- (defun . subregexp-context-p)
- split-string-default-separators
- (defun . split-string)
- (defun . combine-and-quote-strings)
- (defun . split-string-and-unquote)
- (defun . subst-char-in-string)
- (defun . replace-regexp-in-string)
- (defun . add-to-invisibility-spec)
- (defun . remove-from-invisibility-spec)
- (defun . with-syntax-table)
- (defun . make-syntax-table)
- (defun . syntax-after)
- (defun . syntax-class)
- (defun . text-clone-maintain)
- (defun . text-clone-create)
- (defun . define-mail-user-agent)
- (defun . progress-reporter-update)
- (defun . make-progress-reporter)
- (defun . progress-reporter-force-update)
- (defun . progress-reporter-do-update)
- (defun . progress-reporter-done)
- (defun . dotimes-with-progress-reporter)
- version-separator version-regexp-alist
- (defun . version-to-list)
- (defun . version-list-<)
- (defun . version-list-=)
- (defun . version-list-<=)
- (defun . version-list-not-zero)
- (defun . version<)
- (defun . version<=)
- (defun . version=))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/backquote.elc"
- (provide . backquote)
- (defun . backquote-list*-function)
- (defun . backquote-list*-macro)
- (defun . backquote-list*)
- backquote-backquote-symbol backquote-unquote-symbol backquote-splice-symbol
- (defun . backquote)
- (defun . \`)
- (defun . backquote-delay-process)
- (defun . backquote-process)
- (defun . backquote-listify))
- ("/usr/share/emacs/23.0.93/lisp/emacs-lisp/byte-run.elc"
- (defun . macro-declaration-function)
- (defun . defsubst)
- (defun . make-obsolete)
- (defun . define-obsolete-function-alias)
- (defun . make-obsolete-variable)
- (defun . define-obsolete-variable-alias)
- (defun . dont-compile)
- (defun . eval-when-compile)
- (defun . eval-and-compile)
- (defun . with-no-warnings)))
diff --git a/emacs.d/nxhtml/tests/in/bug370417.php b/emacs.d/nxhtml/tests/in/bug370417.php
deleted file mode 100644
index b73534d..0000000
--- a/emacs.d/nxhtml/tests/in/bug370417.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
- <body>
- <p>
- <?php
- echo "foo";
-echo "bar";
- ?>
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug381979-2-bad-traceb.txt b/emacs.d/nxhtml/tests/in/bug381979-2-bad-traceb.txt
deleted file mode 100644
index 514b00a..0000000
--- a/emacs.d/nxhtml/tests/in/bug381979-2-bad-traceb.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
- <(1 nil)
- (and mumamo-last-new-chunk first-check-from (< first-check-from (overlay-end mumamo-last-new-chunk)))
- (if (and mumamo-last-new-chunk first-check-from (< first-check-from ...)) (progn (setq mumamo-last-new-chunk ...)))
- (when (and mumamo-last-new-chunk first-check-from (< first-check-from ...)) (setq mumamo-last-new-chunk (overlay-get mumamo-last-new-chunk ...)))
- (progn (setq mumamo-last-new-chunk (overlay-get new-chunk-at-change-min ...)) (when (and mumamo-last-new-chunk first-check-from ...) (setq mumamo-last-new-chunk ...)))
- (if new-chunk-at-change-min (progn (setq mumamo-last-new-chunk ...) (when ... ...)))
- (when new-chunk-at-change-min (setq mumamo-last-new-chunk (overlay-get new-chunk-at-change-min ...)) (when (and mumamo-last-new-chunk first-check-from ...) (setq mumamo-last-new-chunk ...)))
- (progn (when new-chunk-at-change-min (setq mumamo-last-new-chunk ...) (when ... ...)))
- (if (mumamo-make-new-chunks) (progn (when new-chunk-at-change-min ... ...)))
- (when (mumamo-make-new-chunks) (when new-chunk-at-change-min (setq mumamo-last-new-chunk ...) (when ... ...)))
- (progn (when (mumamo-make-new-chunks) (when new-chunk-at-change-min ... ...)) (setq mumamo-last-chunk-change-pos nil))
- (if mumamo-last-chunk-change-pos (progn (when ... ...) (setq mumamo-last-chunk-change-pos nil)))
- (when mumamo-last-chunk-change-pos (when (mumamo-make-new-chunks) (when new-chunk-at-change-min ... ...)) (setq mumamo-last-chunk-change-pos nil))
- (let* ((change-min ...) (change-max ...) (new-chunk-at-change-min ...) (new-chunk-at-change-min-start ...) (this-new-syntax-min-max ...) (this-new-syntax-min ...) (in-new-min-border ...) (here ...) (first-check-from ...)) (when mumamo-last-chunk-change-pos (when ... ...) (setq mumamo-last-chunk-change-pos nil)) (let* (... ... ... ... narpos this-new-values this-new-chunk prev-new-chunk first-change-pos interrupted ... ... ... ... ...) (when ... ...) (unless this-new-chunk ...) (setq mumamo-find-chunks-level ...) (when this-new-chunk ... ...) (when end-param ...)))
- (save-restriction (widen) (let* (... ... ... ... ... ... ... ... ...) (when mumamo-last-chunk-change-pos ... ...) (let* ... ... ... ... ... ...)))
- mumamo-find-chunks(1 "mumamo-set-major-post-command")
- (let* ((ovl ...) (major ...) (in-pre-hook ...)) (if (not major) (lwarn ... :error "major=%s" major) (unless ... ...)))
- mumamo-set-major-post-command()
- (if font-lock-mode (mumamo-set-major-post-command))
- mumamo-post-command-1()
- eval((mumamo-post-command-1))
- eval-expression((mumamo-post-command-1) nil)
- call-interactively(eval-expression nil nil)
diff --git a/emacs.d/nxhtml/tests/in/bug381979-2.php b/emacs.d/nxhtml/tests/in/bug381979-2.php
deleted file mode 100644
index fc543c5..0000000
--- a/emacs.d/nxhtml/tests/in/bug381979-2.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-$a = array(
- 'foo' => 'bar',
- 'gaz' => 'gazonk',
-);
-?> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug381979-svnlib.inc b/emacs.d/nxhtml/tests/in/bug381979-svnlib.inc
deleted file mode 100644
index 6fc755b..0000000
--- a/emacs.d/nxhtml/tests/in/bug381979-svnlib.inc
+++ /dev/null
@@ -1,744 +0,0 @@
-<?php
-// $Id$
-/**
- * @file
- * A few generic functions for interfacing with Subversion via command line.
- * The API of these functions has been inspired by the SVN PECL extension
- * (http://www.php.net/manual/en/ref.svn.php), but works differently in places.
- * On the one hand, this is due to the incompleteness of the functions in here,
- * and on the other hand there are a few artificial restrictions and
- * complications in the PECL extension's API that we can really do without.
- *
- * @note
- * These functions can be run *without* Drupal.
- *
- * Copyright 2008 by Jakob Petsovits ("jpetso", http://drupal.org/user/56020)
- * Copyright 2006-2008 by Gavin Mogan ("halkeye", http://drupal.org/user/56779)
- */
-
-// file_directory_temp() is normally provided by Drupal, but as this file is
-// supposed to be independent from Drupal code, here's a fallback definition.
-if (!function_exists('file_directory_temp')) {
- /**
- * Determine the default temporary directory.
- *
- * @return A string containing a temp directory.
- */
- function file_directory_temp() {
- return sys_get_temp_dir();
- }
-}
-
-/**
- * If subsequent function calls from this file act on a private repository
- * that requires authentication, this function will store username and password
- * for the duration of the current process (in a static variable, that is).
- * Other functions in this file make use of this login information.
- */
-function svnlib_set_authentication_info($username, $password) {
- _svnlib_authentication_info(
- array('username' => $username, 'password' => $password)
- );
-}
-
-/**
- * Unset any username and password that was previously passed
- * to subversion_set_authentication_info(), so that subsequent repository
- * access will happen anonymously again.
- */
-function svnlib_unset_authentication_info() {
- _svnlib_authentication_info(FALSE);
-}
-
-/**
- * Append the option for our custom config dir to a $cmd array,
- * and also username and password if those have been set before.
- */
-function _svnlib_add_common_options(&$cmd) {
- $auth_info = _svnlib_authentication_info();
- if (isset($auth_info)) {
- $cmd = array_merge($cmd, array(
- '--username', escapeshellarg($auth_info['username']),
- '--password', escapeshellarg($auth_info['password']),
- ));
- }
- $cmd[] = '--config-dir '. escapeshellarg(dirname(__FILE__) .'/configdir');
-}
-
-/**
- * Write or retrieve the authentication info state, stored in a static variable.
- *
- * @param $info
- * NULL to retrieve the info, FALSE to unset it, or an array with array keys
- * 'username' and 'password' to remember it for later retrieval.
- */
-function _svnlib_authentication_info($info = NULL) {
- static $auth_info = NULL;
-
- if (!isset($info)) {
- return $auth_info;
- }
- else {
- $auth_info = ($info === FALSE) ? NULL : $info;
- return $auth_info;
- }
-}
-
-/**
- * By default, Subversion will be invoked with the 'svn' binary which is
- * alright as long as the binary is in the PATH. If it's not, you can call
- * this function to set a different path to the binary (which will be used
- * until this process finishes, or until a new path is set).
- */
-function svnlib_set_svn_binary($svn_binary) {
- _svnlib_svn_binary($svn_binary);
-}
-
-/**
- * Write or retrieve the path of the svn binary, stored in a static variable.
- *
- * @param $svn_binary
- * NULL to retrieve the info, or the path to the binary to remember it
- * for later retrieval.
- */
-function _svnlib_svn_binary($svn_binary = NULL) {
- static $binary = 'svn';
-
- if (!isset($svn_binary)) {
- return $binary;
- }
- $binary = $svn_binary;
- return $binary;
-}
-
-/**
- * Retrieve the version of the svn binary, and return an array with the keys
- * 'major', 'minor' and 'patch', each containing the integer for the respective
- * part of the version number. If invoking the SVN executable fails, an empty
- * array is returned.
- */
-function svnlib_version() {
- static $version;
-
- if (isset($version)) {
- return $version;
- }
- $return_code = 0;
- exec(_svnlib_svn_binary() .' --version', $output, $return_code);
-
- if ($return_code != 0) {
- $version = array();
- return $version;
- }
- $line = reset($output); // The first line contains the version number.
-
- if (!preg_match('/\b([\d]+)\.([\d]+)(?:\.([\d]+))?/', $line, $matches)) {
- $version = array();
- return $version;
- }
- $version = array(
- 'major' => (int) $matches[1],
- 'minor' => (int) $matches[2],
- 'patch' => empty($matches[3]) ? 0 : (int) $matches[3],
- );
- return $version;
-}
-
-/**
- * Append an appropriate output pipe to a $cmd array, which causes STDERR
- * to be written to a random file.
- *
- * @return
- * An array with the temporary files that will be created when $cmd
- * is executed. In its current form, the return array only contains
- * the filename for STDERR output as 'stderr' array element.
- */
-function _svnlib_add_output_pipes(&$cmd) {
- $tempdir = file_directory_temp();
- $tempfiles = array(
- 'stderr' => $tempdir .'/drupal_versioncontrol_svn.stderr.'. mt_rand() .'.txt',
- );
- $cmd[] = '2> '. $tempfiles['stderr'];
- return $tempfiles;
-}
-
-/**
- * Delete temporary files that have been created by a command which included
- * output pipes from _svnlib_add_output_pipes().
- */
-function _svnlib_delete_temporary_files($tempfiles) {
- @unlink($tempfiles['stderr']);
-}
-
-/**
- * Read the STDERR output for a command that was executed.
- * The output must have been written to a temporary file which was given
- * by _svnlib_add_output_pipes(). The temporary file is deleted after it
- * has been read. After calling the function, the error message can be
- * retrieved by calling svnlib_last_error_message() or discarded by calling
- * svnlib_unset_error_message().
- */
-function _svnlib_set_error_message($tempfiles) {
- _svnlib_error_message(file_get_contents($tempfiles['stderr']));
- @unlink($tempfiles['stderr']);
-}
-
-/**
- * Retrieve the STDERR output from the last invocation of 'svn' that exited
- * with a non-zero status code. After fetching the error message, it will be
- * unset again until a subsequent 'svn' invocation fails as well. If no message
- * is set, this function returns NULL.
- *
- * For better security, it is advisable to run the returned error message
- * through check_plain() or similar string checker functions.
- */
-function svnlib_last_error_message() {
- $message = _svnlib_error_message();
- _svnlib_error_message(FALSE);
- return $message;
-}
-
-/**
- * Write or retrieve an error message, stored in a static variable.
- *
- * @param $info
- * NULL to retrieve the message, FALSE to unset it, or a string containing
- * the new message to remember it for later retrieval.
- */
-function _svnlib_error_message($message = NULL) {
- static $error_message = NULL;
-
- if (!isset($message)) {
- return $error_message;
- }
- else {
- $error_message = ($message === FALSE) ? NULL : $message;
- return $error_message;
- }
-}
-
-/**
- * Return commit log messages of a repository URL. This function is equivalent
- * to 'svn log -v -r $revision_range $repository_url'.
- *
- * @param $repository_url
- * The URL of the repository (e.g. 'file:///svnroot/my-repo') or an item
- * inside that repository (e.g. 'file:///svnroot/my-repo/subdir/hello.php').
- * @param $revision_range
- * The revision specification that will be passed to 'svn log' as the
- * '-r' parameter. Examples: '35' for a specific revision, 'HEAD:35' for all
- * revisions since (and including) r35, or the default parameter 'HEAD:1'
- * for all revisions of the given URL. If you specify the more recent
- * revision first (e.g. 'HEAD:1') then it will also be first in the
- * result array, whereas if you specify the older revision first ('1:HEAD')
- * then you'll get a result array with an ascending sort, the most
- * recent revision being the last array element.
- * @param $url_revision
- * The revision of the URL that should be listed.
- * This needs to be a single revision, e.g. '35' or 'HEAD'.
- * For example, if a file was deleted in revision 36, you need to pass '35'
- * as parameter to get its log, otherwise Subversion won't find the file.
- *
- * @return
- * An array of detailed information about the revisions that exist
- * in the given URL at the specified revision or revision range.
- * Each revision detail array has the revision number as array key.
- * If the 'svn log' invocation exited with an error, this function
- * returns NULL and the error message can be retrieved by calling
- * svnlib_last_error_message().
- */
-function svnlib_log($repository_url, $revision_range = 'HEAD:1', $url_revision = 'HEAD') {
- $cmd = array(
- escapeshellarg(escapeshellcmd(_svnlib_svn_binary())),
- 'log',
- '-r', $revision_range,
- '--non-interactive',
- '--xml',
- '-v',
- );
- _svnlib_add_common_options($cmd);
- $cmd[] = escapeshellarg($repository_url .'@'. $url_revision);
- $tempfiles = _svnlib_add_output_pipes($cmd);
-
- $return_code = 0;
- exec(implode(' ', $cmd), $output, $return_code);
- if ($return_code != 0) {
- _svnlib_set_error_message($tempfiles);
- return NULL; // no such revision(s) found
- }
- $log = implode("\n", $output);
- _svnlib_delete_temporary_files($tempfiles);
-
- return _svnlib_parse_log($log);
-}
-
-/*
- * Parse the output of 'svn log' into an array of log entries.
- * The output looks something like this (0 to N possible "logentry" elements):
-<?xml version="1.0"?>
-<log>
- <logentry revision="272">
- <author>jpetso</author>
- <date>2007-04-12T15:01:00.247137Z</date>
- <paths>
- <path action="M">/trunk/lila/kde/scalable/apps/ktorrent.svg</path>
- <path action="A">/trunk/lila/kde/scalable/devices/laptop.svg</path>
- <path copyfrom-path="/trunk/lila/kde/scalable/devices/pda_black.svg"
- copyfrom-rev="270"
- action="A">/trunk/lila/kde/scalable/devices/pda_blue.svg</path>
- <path action="R">/trunk/lila/kde/scalable/devices/ipod_unmount.svg</path>
- <path action="D">/trunk/lila/kde/ChangeLog</path>
- </paths>
- <msg>New laptop icon from the GNOME set, more moderate
- colors in ktorrent.svg, and bits of devices stuff.
- </msg>
- </logentry>
-</log>
-*/
-function _svnlib_parse_log($log) {
- $revisions = array();
- $xml = new SimpleXMLElement($log);
-
- foreach ($xml->logentry as $logentry) {
- $revision = array();
- $revision['rev'] = intval((string) $logentry['revision']);
- $revision['author'] = (string) $logentry->author;
- $revision['msg'] = rtrim((string) $logentry->msg); // no trailing linebreaks
- $revision['time_t'] = strtotime((string) $logentry->date);
- $paths = array();
-
- foreach ($logentry->paths->path as $logpath) {
- $path = array(
- 'path' => (string) $logpath,
- 'action' => (string) $logpath['action'],
- );
- if (!empty($logpath['copyfrom-path'])) {
- $path['copyfrom'] = array(
- 'path' => (string) $logpath['copyfrom-path'],
- 'rev' => (string) $logpath['copyfrom-rev'],
- );
- }
- $paths[$path['path']] = $path;
- }
- $revision['paths'] = $paths;
- $revisions[$revision['rev']] = $revision;
- }
- return $revisions;
-}
-
-/**
- * Return the contents of a directory (specified as repository URL,
- * optionally at a certain revision) as an array of items. This function
- * is equivalent to 'svn ls $repository_url@$revision'.
- *
- * @param $repository_url
- * The URL of the repository (e.g. 'file:///svnroot/my-repo') or an item
- * inside that repository (e.g. 'file:///svnroot/my-repo/subdir').
- * @param $url_revision
- * The revision of the URL that should be listed.
- * This needs to be a single revision, e.g. '35' or 'HEAD'.
- * For example, if a file was deleted in revision 36, you need to pass '35'
- * as parameter to get its listing, otherwise Subversion won't find the file.
- * @param $recursive
- * FALSE to retrieve just the direct child items of the current directory,
- * or TRUE to descend into each subdirectory and retrieve all descendant
- * items recursively. If $recursive is true then each directory item
- * in the result array will have an additional array element 'children'
- * which contains the list entries below this directory, as array keys
- * in the result array.
- *
- * If @p $repository_url refers to a file then the @p $recursive parameter
- * has no effect on the 'svn ls' output and, by consequence, on the
- * return value.
- *
- * @return
- * A array of items. If @p $repository_url refers to a file then the array
- * contains a single entry with this file, whereas if @p $repository_url
- * refers to a directory then the array contains all items inside this
- * directory (but not the directory itself).
- * If the 'svn ls' invocation exited with an error, this function
- * returns NULL and the error message can be retrieved by calling
- * svnlib_last_error_message().
- */
-function svnlib_ls($repository_url, $url_revision = 'HEAD', $recursive = FALSE) {
- $cmd = array(
- escapeshellarg(escapeshellcmd(_svnlib_svn_binary())),
- 'ls',
- '--non-interactive',
- '--xml',
- );
- if ($recursive) {
- $cmd[] = '-R';
- }
- _svnlib_add_common_options($cmd);
- $cmd[] = escapeshellarg($repository_url .'@'. $url_revision);
- $tempfiles = _svnlib_add_output_pipes($cmd);
-
- $return_code = 0;
- exec(implode(' ', $cmd), $output, $return_code);
- if ($return_code != 0) {
- _svnlib_set_error_message($tempfiles);
- return NULL; // no such item or revision found
- }
- $lists = implode("\n", $output);
- _svnlib_delete_temporary_files($tempfiles);
-
- return _svnlib_parse_ls($lists, $recursive);
-}
-
-/*
- * Parse the output of 'svn ls' into an array of item entries.
- * The output looks something like this (0 to N possible "entry" elements):
-<?xml version="1.0"?>
-<lists>
- <list path="file:///home/jakob/repos/svn/lila-theme/tags/svg-utils-0-1/utils/svg-utils/svgcolor-xml">
- <entry kind="dir">
- <name>lila</name>
- <commit revision="257">
- <author>jpetso</author>
- <date>2006-11-29T01:27:47.192716Z</date>
- </commit>
- </entry>
- <entry kind="file">
- <name>lila/lila-blue.xml</name>
- <size>918</size>
- <commit revision="9">
- <author>dgt84</author>
- <date>2004-05-04T21:32:13.000000Z</date>
- </commit>
- </entry>
- </list>
-</lists>
-*/
-function _svnlib_parse_ls($lists, $recursive) {
- $items = array();
- $current_item_stack = array(); // will help us determine hierarchical structures
- $xml = new SimpleXMLElement($lists);
-
- foreach ($xml->list->entry as $entry) {
- $item = array();
- $item['created_rev'] = intval((string) $entry->commit['revision']);
- $item['last_author'] = (string) $entry->commit->author;
- $item['time_t'] = strtotime((string) $entry->commit->date);
- $relative_path = (string) $entry->name;
- $item['name'] = basename($relative_path);
- $item['type'] = (string) $entry['kind'];
-
- if ($item['type'] == 'file') {
- $item['size'] = intval((string) $entry->size);
- }
-
- // When listing recursively, we want to capture the item hierarchy.
- if ($recursive) {
- if ($item['type'] == 'dir') {
- $item['children'] = array();
- }
- if (strpos($relative_path, '/') !== FALSE) { // don't regard top-level items
- $parent_path = dirname($relative_path);
- if (isset($items[$parent_path]) && !in_array($relative_path, $items[$parent_path]['children'])) {
- $items[$parent_path]['children'][] = $relative_path;
- }
- }
- }
- $items[$relative_path] = $item;
- }
- return $items;
-}
-
-/**
- * Returns detail information about a directory or file item in the repository.
- * In most cases, svnlib_info() is the better svnlib_ls(), as it retrieves not
- * only item names but also repository root and the path of each item
- * inside the repository.
- *
- * You can also use svnlib_info() to retrieve a former item path if the item
- * has been moved or copied: just pass the current URL and revision together
- * with a past or future revision number as @p $target_revision, and you get
- * the path of the item at that time.
- *
- * This function is equivalent to
- * 'svn info -r $target_revision $repository_url@$url_revision'.
- *
- * @param $repository_urls
- * The URL of the item (e.g. 'file:///svnroot/my-repo/subdir/hello.php')
- * or the repository itself (e.g. 'file:///svnroot/my-repo'), as string.
- * Alternatively, you can also pass an array of multiple URLs.
- * @param $url_revision
- * The revision of the URL that should be listed.
- * This needs to be a single revision, e.g. '35' or 'HEAD'.
- * For example, if a file was deleted in revision 36, you need to pass '35'
- * as parameter to get its info, otherwise Subversion won't find the file.
- * In case multiple URLs are passed, this revision applies to each of them.
- * @param $depth
- * Specifies if info for descendant items should be retrieved as well, and
- * if so, which of those. The default 'empty' will not retrieve any children,
- * 'files' will retrieve all immediate file children, 'immediates' will
- * retrieve file and directory children, and 'infinity' will retrieve all
- * descendant items there are, recursively. If $depth is 'infinity' then each
- * directory item in the result array will have an additional array element
- * named 'children' which contains the paths below this directory, the paths
- * corresponding to array keys in the result array.
- *
- * If @p $repository_url refers to a file then the @p $depth parameter
- * has no effect on the 'svn info' output and, by consequence, on the
- * return value.
- *
- * @param $target_revision
- * The revision specification that will be passed to 'svn info' as the
- * '-r' parameter. This needs to be a single revision, e.g. '35' or 'HEAD'.
- * This is handy to track item copies and renames, see the general function
- * description on how to do that. If you leave this at NULL, the info will be
- * retrieved at the state of the $url_revision.
- *
- * @return
- * A array of items that contain information about the items that correspond
- * the specified URL(s). If @p $repository_url refers to a directory and
- * @p $depth is 'infinity', the array also includes information about all
- * descendants of the items that correspond to the specified URL(s).
- * If the 'svn info' invocation exited with an error, this function
- * returns NULL and the error message can be retrieved by calling
- * svnlib_last_error_message().
- */
-function svnlib_info($repository_urls, $url_revision = 'HEAD', $depth = 'empty', $target_revision = NULL) {
- if (!is_array($repository_urls)) { // it's a single URL as a string!
- $repository_urls = array($repository_urls);
- }
-
- $cmd = array(
- escapeshellarg(escapeshellcmd(_svnlib_svn_binary())),
- 'info',
- '--non-interactive',
- '--xml',
- );
-
- if ($depth == 'infinity') {
- $cmd[] = '-R'; // "--depth infinity" is not in 1.4, but '-R' (recursive) is
- }
- elseif ($depth != 'empty') {
- $version = svnlib_version();
- if ($version['major'] >= 1 && $version['minor'] >= 5) {
- $cmd[] = '--depth '. $depth;
- }
- else { // 1.4 and earlier compatibility workaround
- foreach ($repository_urls as $repository_url) {
- // Make sure the item is a directory, otherwise it has no children
- // anyways (and the relative path fetched by ls will lead to incorrect
- // results as it duplicates the basename that is already in the URL).
- $repository_url_items = svnlib_info($repository_url, $url_revision, 'empty', $target_revision);
- $repository_url_item = reset($repository_url_items);
- if ($repository_url_item['type'] != 'dir') {
- continue;
- }
- // Fetch child items with svn ls, that's what 1.4 can actually do.
- $items = svnlib_ls($repository_url, $url_revision);
- foreach ($items as $relative_path => $item) {
- if ($depth == 'files' && $item['type'] = 'dir') {
- continue; // 'immediates' fetches all children, 'files' only files
- }
- $repository_urls[] = $repository_url .'/'. $relative_path;
- }
- }
- }
- }
- // else {
- // "--depth empty" is the default, leave it out for svn <= 1.4 compatibility
- // }
-
- if (isset($target_revision)) {
- $cmd[] = '-r';
- $cmd[] = $target_revision;
- }
- _svnlib_add_common_options($cmd);
- foreach ($repository_urls as $repository_url) {
- $cmd[] = escapeshellarg($repository_url .'@'. $url_revision);
- }
- $tempfiles = _svnlib_add_output_pipes($cmd);
-
- $return_code = 0;
- exec(implode(' ', $cmd), $output, $return_code);
- if ($return_code != 0) {
- _svnlib_set_error_message($tempfiles);
- return NULL; // no such item or revision found
- }
- $info = implode("\n", $output);
- _svnlib_delete_temporary_files($tempfiles);
-
- $recursive = ($depth == 'infinity');
- return _svnlib_parse_info($info, $recursive);
-}
-
-/*
- * Parse the output of 'svn info' into an array of item entries.
- * The output looks something like this (same URL as in the 'svn ls' example,
- * also 0 to N possible "entry" elements):
-<?xml version="1.0"?>
-<info>
- <entry kind="dir" path="svgcolor-xml" revision="275">
- <url>file:///home/jakob/repos/svn/lila-theme/tags/svg-utils-0-1/utils/svg-utils/svgcolor-xml</url>
- <repository>
- <root>file:///home/jakob/repos/svn/lila-theme</root>
- <uuid>fd53868f-e4f1-0310-84ca-8663aff3ef64</uuid>
- </repository>
- <commit revision="257">
- <author>jpetso</author>
- <date>2006-11-29T01:27:47.192716Z</date>
- </commit>
- </entry>
- <entry kind="dir" path="lila" revision="275">
- <url>file:///home/jakob/repos/svn/lila-theme/tags/svg-utils-0-1/utils/svg-utils/svgcolor-xml/lila</url>
- <repository>
- <root>file:///home/jakob/repos/svn/lila-theme</root>
- <uuid>fd53868f-e4f1-0310-84ca-8663aff3ef64</uuid>
- </repository>
- <commit revision="257">
- <author>jpetso</author>
- <date>2006-11-29T01:27:47.192716Z</date>
- </commit>
- </entry>
- <entry kind="file" path="lila/lila-blue.xml" revision="275">
- <url>file:///home/jakob/repos/svn/lila-theme/tags/svg-utils-0-1/utils/svg-utils/svgcolor-xml/lila/lila-blue.xml</url>
- <repository>
- <root>file:///home/jakob/repos/svn/lila-theme</root>
- <uuid>fd53868f-e4f1-0310-84ca-8663aff3ef64</uuid>
- </repository>
- <commit revision="9">
- <author>dgt84</author>
- <date>2004-05-04T21:32:13.000000Z</date>
- </commit>
- </entry>
-</info>
-*/
-function _svnlib_parse_info($info, $recursive) {
- $items = array();
- $xml = new SimpleXMLElement($info);
-
- foreach ($xml->entry as $entry) {
- $item = array();
- $item['url'] = (string) $entry->url;
- $item['repository_root'] = (string) $entry->repository->root;
- $item['repository_uuid'] = (string) $entry->repository->uuid;
-
- if ($item['url'] == $item['repository_root']) {
- $item['path'] = '/';
- }
- else {
- $item['path'] = substr($item['url'], strlen($item['repository_root']));
- }
-
- if (isset($items[$item['path']])) {
- // Duplicate item, we had this one before already. Nevertheless, we can
- // perhaps make use of it in order to enhance the hierarchical structure.
- $item = $items[$item['path']];
- }
- else {
- $item['type'] = (string) $entry['kind'];
- $relative_path = (string) $entry['path'];
- $item['rev'] = intval((string) $entry['revision']); // current state of the item
- $item['created_rev'] = intval((string) $entry->commit['revision']); // last edit
- $item['last_author'] = (string) $entry->commit->author;
- $item['time_t'] = strtotime((string) $entry->commit->date);
-
- if ($recursive && $item['type'] == 'dir') {
- $item['children'] = array();
- }
- }
-
- // For "--depth infinity", provide the caller with further hierarchy info.
- if ($recursive && $item['path'] != '/') {
- $parent_path = dirname($item['path']);
- if (isset($items[$parent_path]) && !in_array($item['path'], $items[$parent_path]['children'])) {
- $items[$parent_path]['children'][] = $item['path'];
- }
- }
- $items[$item['path']] = $item;
- }
- return $items;
-}
-
-
-/**
- * Copy the contents of a file in a repository to a given destination.
- * This function is equivalent to
- * 'svn cat $repository_url@$url_revision > $destination'.
- *
- * @param $destination
- * The path of the file that should afterwards contain the file contents.
- * @param $repository_url
- * The URL of the file, e.g. 'file:///svnroot/my-repo/subdir/hello.php'.
- * @param $url_revision
- * The revision of the URL that should be queried for the property.
- * This needs to be a single revision, e.g. '35' or 'HEAD'.
- *
- * @return
- * TRUE if the file was created successfully. If the 'svn cat' invocation
- * exited with an error, this function returns FALSE and the error message
- * can be retrieved by calling svnlib_last_error_message().
- */
-function svnlib_cat($destination, $repository_url, $url_revision = 'HEAD') {
- $cmd = array(
- escapeshellarg(escapeshellcmd(_svnlib_svn_binary())),
- 'cat',
- '--non-interactive',
- );
- _svnlib_add_common_options($cmd);
- $cmd[] = escapeshellarg($repository_url .'@'. $url_revision);
- $cmd[] = '> '. $destination;
- $tempfiles = _svnlib_add_output_pipes($cmd);
-
- $return_code = 0;
- exec(implode(' ', $cmd), $output, $return_code);
- if ($return_code != 0) {
- @unlink($destination);
- _svnlib_set_error_message($tempfiles);
- return FALSE; // no such item or revision found
- }
- _svnlib_delete_temporary_files($tempfiles);
- return TRUE;
-}
-
-/**
- * Return a specific SVN property of the given file or directory in the
- * repository. This function is equivalent to
- * 'svn propget $property_name $repository_url@$url_revision'.
- *
- * @param $property_name
- * The name of the property, e.g. 'svn:mime-type' or 'svn:executable'.
- * @param $repository_url
- * The URL of the item (e.g. 'file:///svnroot/my-repo/subdir/hello.php')
- * or the repository itself (e.g. 'file:///svnroot/my-repo'), as string.
- * @param $url_revision
- * The revision of the URL that should be queried for the property.
- * This needs to be a single revision, e.g. '35' or 'HEAD'.
- *
- * @return
- * A string containing the specified property for the item in the given
- * revision, an empty string if this property is not set. If the
- * 'svn propget' invocation exited with an error, this function
- * returns NULL and the error message can be retrieved by calling
- * svnlib_last_error_message().
- */
-function svnlib_propget($property_name, $repository_url, $url_revision = 'HEAD') {
- $cmd = array(
- escapeshellarg(escapeshellcmd(_svnlib_svn_binary())),
- 'propget',
- $property_name,
- '--non-interactive',
- );
- _svnlib_add_common_options($cmd);
- $cmd[] = escapeshellarg($repository_url .'@'. $url_revision);
- $tempfiles = _svnlib_add_output_pipes($cmd);
-
- $return_code = 0;
- exec(implode(' ', $cmd), $output, $return_code);
- if ($return_code != 0) {
- _svnlib_set_error_message($tempfiles);
- return NULL; // no such item or revision found
- }
- $property = trim(implode('', $output));
- _svnlib_delete_temporary_files($tempfiles);
-
- if (empty($property)) {
- return '';
- }
- return $property;
-}
diff --git a/emacs.d/nxhtml/tests/in/bug384115-bt2.txt b/emacs.d/nxhtml/tests/in/bug384115-bt2.txt
deleted file mode 100644
index 0fc787d..0000000
--- a/emacs.d/nxhtml/tests/in/bug384115-bt2.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Debugger entered--Lisp error: (file-error "Cannot open load file" "../../../../../../elisp/package.d/nxhtml/nxhtml/nxhtml-menu")
- (nxhtml-global-minor-mode 1)
- (let* ((util-dir ...) (related-dir ...) (nxhtml-dir ...)) (add-to-list (quote load-path) nxhtml-dir) (add-to-list (quote load-path) related-dir) (add-to-list (quote load-path) util-dir) (add-to-list (quote load-path) nxhtml-install-dir) (message "... nXhtml loading %.1f seconds elapsed ..." (- ... nxhtml-load-time-start)) (load (expand-file-name "nxhtml-loaddefs" nxhtml-install-dir)) (message "... nXhtml loading %.1f seconds elapsed ..." (- ... nxhtml-load-time-start)) (nxhtml-global-minor-mode 1) (message "... nXhtml loading %.1f seconds elapsed ..." (- ... nxhtml-load-time-start)) (when (fboundp ...) (load ...) (rncpp-patch-xhtml-loader)) (message "... nXhtml loading %.1f seconds elapsed ..." (- ... nxhtml-load-time-start)) (load (expand-file-name "nxhtml/nxhtml-autoload" nxhtml-install-dir)))
- (if (featurep (quote nxhtml-autostart)) nil (provide (quote nxhtml-autostart)) (if (< emacs-major-version 23) (load ...) (let ... ...)) (let* (... ... ...) (add-to-list ... nxhtml-dir) (add-to-list ... related-dir) (add-to-list ... util-dir) (add-to-list ... nxhtml-install-dir) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (load ...) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (nxhtml-global-minor-mode 1) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (when ... ... ...) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (load ...)) (message "... nXhtml loading %.1f seconds elapsed ..." (- ... nxhtml-load-time-start)) (nxhtml-list-loaded-features) (message "Nxml/Nxhtml Autostart.el loaded in %.1f seconds" (- ... nxhtml-load-time-start)))
- (unless (featurep (quote nxhtml-autostart)) (provide (quote nxhtml-autostart)) (if (< emacs-major-version 23) (load ...) (let ... ...)) (let* (... ... ...) (add-to-list ... nxhtml-dir) (add-to-list ... related-dir) (add-to-list ... util-dir) (add-to-list ... nxhtml-install-dir) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (load ...) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (nxhtml-global-minor-mode 1) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (when ... ... ...) (message "... nXhtml loading %.1f seconds elapsed ..." ...) (load ...)) (message "... nXhtml loading %.1f seconds elapsed ..." (- ... nxhtml-load-time-start)) (nxhtml-list-loaded-features) (message "Nxml/Nxhtml Autostart.el loaded in %.1f seconds" (- ... nxhtml-load-time-start)))
- eval-buffer(#<buffer *load*> nil "/Users/dave/elisp/package.d/nxhtml/autostart.el" nil t) ; Reading at buffer position 7076
- load-with-code-conversion("/Users/dave/elisp/package.d/nxhtml/autostart.el" "/Users/dave/elisp/package.d/nxhtml/autostart.el" nil t)
- load("/Users/dave/elisp/package.d/nxhtml/autostart.el" nil t)
- command-line-1(("-l" "/Users/dave/elisp/package.d/nxhtml/nxhtmlmaint.el" "-l" "/Users/dave/elisp/package.d/nxhtml/autostart.el" "-f" "nxhtmlmaint-byte-compile-all"))
- command-line()
- normal-top-level()
diff --git a/emacs.d/nxhtml/tests/in/bug388729-messages.txt b/emacs.d/nxhtml/tests/in/bug388729-messages.txt
deleted file mode 100644
index 4075487..0000000
--- a/emacs.d/nxhtml/tests/in/bug388729-messages.txt
+++ /dev/null
@@ -1,292 +0,0 @@
-("/Applications/Emacs.app/Contents/MacOS/Emacs" "-Q" "--debug-init" "--load" "/Users/isho/.emacs.d/nxhtml/autostart.el")
-For information about GNU Emacs and the GNU system, type C-h C-a.
-Nxml/Nxhtml Autostart.el loading ...
-Loading /Users/isho/.emacs.d/nxhtml/autostart22.el (source)...
-Loading /Applications/Emacs.app/Contents/Resources/site-lisp/nxml-mode/rng-auto.el (source)...done
-Loading /Users/isho/.emacs.d/nxhtml/autostart22.el (source)...done
-... nXhtml loading 0.1 seconds elapsed ...
-Loading /Users/isho/.emacs.d/nxhtml/nxhtml-loaddefs.el (source)...done
-... nXhtml loading 0.1 seconds elapsed ...
-Loading /Users/isho/.emacs.d/nxhtml/nxhtml/nxhtml-menu.el (source)...
-Loading regexp-opt...done
-Loading easy-mmode...done
-Loading advice...done
-after advising ido
-Loading cl-macs...done
-Loading url-methods...done
-html-site-current (information): No current site set
-Loading derived...done
-Loading byte-opt...done
-
-Finished loading /Users/isho/.emacs.d/nxhtml/util/mumamo.el
-
-Loading /Users/isho/.emacs.d/nxhtml/nxhtml/nxhtml-menu.el (source)...done
-... nXhtml loading 1.3 seconds elapsed ...
-Loading /Users/isho/.emacs.d/nxhtml/etc/schema/schema-path-patch.el (source)...done
-xhtml-loader.rnc was ok
-(No changes need to be saved)
-... nXhtml loading 1.4 seconds elapsed ...
-Loading /Users/isho/.emacs.d/nxhtml/nxhtml/nxhtml-autoload.el (source)...
-nxhtml-autoload starting ... (hm, should maybe be renamed ...)
-majmodpri-apply-priorities running...
-majmodpri-sort-lists running ... (done)
-majmodpri-apply-priorities: No file buffers to change modes in
-majmodpri-apply-priorities running ... (done)
-majmodpri-sort-lists running ... (done)
-nxhtml-autoload finished
-majmodpri-sort-lists running ... (done)
-Loading /Users/isho/.emacs.d/nxhtml/nxhtml/nxhtml-autoload.el (source)...done
-... nXhtml loading 1.7 seconds elapsed ...
-=== Loaded at nxhtml/autostart.el end:
-(feature 'html-imenu)=t
-(feature 'html-quote)=t
-(feature 'html-site)=t
-(feature 'html-upl)=t
-(feature 'mumamo)=t
-(feature 'nxhtml-menu)=t
-(feature 'nxhtml-mode)=t
-(feature 'rngalt)=t
-(feature 'tidy-xhtml)=t
-Nxml/Nxhtml Autostart.el loaded in 1.9 seconds
-nxhtml_test.php has auto save data; consider M-x recover-this-file
-Loading /Users/isho/.emacs.d/nxhtml/util/mumamo-fun.el (source)...done
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-get-chunk-save-buffer-state, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=nil
-MU:(find-next-chunk-values nil nil nil)
-MU:find-next-chunk-values:here a, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:(when (>= 45 1)
-MU:find-next-chunk-values:here d, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:curr-chunk-funs=(mumamo-chunk-xml-pi mumamo-chunk-inlined-style mumamo-chunk-inlined-script mumamo-chunk-style= mumamo-chunk-onjs=)
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-xml-pi pos=1, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-xml-pi, r=(5 nil php-mode (10 nil) nil mumamo-search-fw-exc-end-xml-pi mumamo-find-borders-xml-pi)
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-inlined-style pos=1, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-inlined-style, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-inlined-script pos=1, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-inlined-script, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-style= pos=1, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-style=, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-onjs= pos=1, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-onjs=, r=nil
-MU:find-next-chunk-values:here A, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:here B, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:here E
-MU:find-next-chunk-values:curr-is-closed=t
-MU:find-next-chunk-values=> current=(1 5 html-mode 10 nil nil (mumamo-chunk-xml-pi mumamo-chunk-inlined-style mumamo-chunk-inlined-script mumamo-chunk-style= mumamo-chunk-onjs=) nil t), next=(php-mode mumamo-search-fw-exc-end-xml-pi mumamo-find-borders-xml-pi none 1)
-MU:find-chunks:mumamo-old-tail=nil, major=nil, mumamo-last-chunk=nil
-MU:
---------------------
-MU:
---------------------
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-turn-on-actions, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=4, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=nil from mumamo-turn-on-actions, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:(find-next-chunk-values #<overlay from 1 to 5 in nxhtml_test.php> nil nil)
-MU:find-next-chunk-values:here a, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:(when (>= 45 6)
-MU:find-next-chunk-values:Calling (curr-end-fun=mumamo-search-fw-exc-end-xml-pi 4 45)=>44
-MU:find-next-chunk-values:here c, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:here c2, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:before end-in-code: 5 mumamo-search-fw-exc-end-xml-pi php-mode
-Loading /Users/isho/.emacs.d/nxhtml/related/php-mode.el (source)...
-majmodpri-sort-lists running ... (done)
-Loading /Users/isho/.emacs.d/nxhtml/related/php-mode.el (source)...done
-MU:
---------------------
-MU:find-next-chunk-values:curr-end-fun-end after end-in-code=44
-MU:find-next-chunk-values:here d, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:curr-chunk-funs=nil
-MU:find-next-chunk-values:here A, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:here B, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:here C, curr-min=5, after-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-next-chunk-values:here D
-MU:find-next-chunk-values:here E
-MU:find-next-chunk-values:curr-is-closed=t
-MU:find-next-chunk-values=> current=(5 44 php-mode nil nil nil nil #<overlay from 1 to 5 in nxhtml_test.php> t), next=(nil nil nil nil -1)
-MU:find-chunks:mumamo-old-tail=nil, major=nil, mumamo-last-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:(find-next-chunk-values #<overlay from 5 to 44 in nxhtml_test.php> nil nil)
-MU:find-next-chunk-values:here a, curr-min=44, after-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-next-chunk-values:(when (>= 45 45)
-MU:find-next-chunk-values:here d, curr-min=44, after-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-next-chunk-values:curr-chunk-funs=(mumamo-chunk-xml-pi mumamo-chunk-inlined-style mumamo-chunk-inlined-script mumamo-chunk-style= mumamo-chunk-onjs=)
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-xml-pi pos=45, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-xml-pi, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-inlined-style pos=45, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-inlined-style, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-inlined-script pos=45, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-inlined-script, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-style= pos=45, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-style=, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-onjs= pos=45, max=45
-MU:find-next-chunk-values:fn=mumamo-chunk-onjs=, r=nil
-MU:find-next-chunk-values:here A, curr-min=44, after-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-next-chunk-values:here B, curr-min=44, after-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-next-chunk-values:here C, curr-min=44, after-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-next-chunk-values:here D
-MU:find-next-chunk-values:here E
-MU:find-next-chunk-values:curr-is-closed=nil
-MU:find-next-chunk-values=> current=(44 nil html-mode nil nil nil (mumamo-chunk-xml-pi mumamo-chunk-inlined-style mumamo-chunk-inlined-script mumamo-chunk-style= mumamo-chunk-onjs=) #<overlay from 5 to 44 in nxhtml_test.php> nil), next=(nil nil nil nil 1)
-MU:find-chunks:mumamo-old-tail=nil, major=nil, mumamo-last-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-set-major-post-command, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-fontify-region-1, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-fontify-region-1 2, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from syntax-ppss, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-fontify-region-1 2, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=45, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 5 to 44 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=10 from syntax-ppss, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=10, ok-pos=45, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=10, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 5 to 44 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=44 from mumamo-fontify-region-1 2, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=44, ok-pos=45, this-new-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=44, this-new-chunk=#<overlay from 44 to 45 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 44 to 45 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=2 from mumamo-set-major-post-command, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=2, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=2, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=3 from mumamo-set-major-post-command, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=3, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=3, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=4 from mumamo-set-major-post-command, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=4, ok-pos=45, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=4, this-new-chunk=#<overlay from 1 to 5 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 5 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-set-major-post-command, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=45, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 5 to 44 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-idle-set-major-mode, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=45, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 5 to 44 in nxhtml_test.php>, point-max=45, last=#<overlay from 44 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 5 to 44 in nxhtml_test.php>
-MU:c-after-change: major-mode=php-mode c-nonsymbol-token-regexp=!=\|##\|%\(?::%:\|[:=]\)\|&[&=]\|\*[/=]\|\+[+=]\|-[=>-]\|\.\.\.\|/[*/=]\|:[:>]\|<\(?:<=\|[:<=]\)\|==\|>\(?:>=\|[=>]\)\|\?\?\(?:!\?\?!\|=\?\?=\|[!()=-]\)\|\^=\||[=|]\|[]!#%&(-,./:-?[{-~^-]
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from syntax-ppss-flush-cache, level=0
-MU:find-chunks:first-check-from=4, chunk-at-change-min=#<overlay from 5 to 5 in nxhtml_test.php>
-MU:find-chunks:at start mumamo-old-tail=#<overlay from 1 to 5 in nxhtml_test.php>, mumamo-last-chunk=nil
-MU:(find-next-chunk-values nil 4 nil)
-MU:find-next-chunk-values:here a, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:(when (>= 6 1)
-MU:find-next-chunk-values:here d, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:curr-chunk-funs=(mumamo-chunk-xml-pi mumamo-chunk-inlined-style mumamo-chunk-inlined-script mumamo-chunk-style= mumamo-chunk-onjs=)
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-xml-pi pos=1, max=6
-MU:find-next-chunk-values:fn=mumamo-chunk-xml-pi, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-inlined-style pos=1, max=6
-MU:find-next-chunk-values:fn=mumamo-chunk-inlined-style, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-inlined-script pos=1, max=6
-MU:find-next-chunk-values:fn=mumamo-chunk-inlined-script, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-style= pos=1, max=6
-MU:find-next-chunk-values:fn=mumamo-chunk-style=, r=nil
-MU:find-next-chunk-values:before (r (funcall fn pos pos max)), fn=mumamo-chunk-onjs= pos=1, max=6
-MU:find-next-chunk-values:fn=mumamo-chunk-onjs=, r=nil
-MU:find-next-chunk-values:here A, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:here B, curr-min=1, after-chunk=nil
-MU:find-next-chunk-values:here E
-MU:find-next-chunk-values:curr-is-closed=nil
-MU:find-next-chunk-values=> current=(1 nil html-mode nil nil nil (mumamo-chunk-xml-pi mumamo-chunk-inlined-style mumamo-chunk-inlined-script mumamo-chunk-style= mumamo-chunk-onjs=) nil nil), next=(nil nil nil nil 1)
-MU:find-chunks:mumamo-old-tail=#<overlay from 1 to 5 in nxhtml_test.php>, major=html-mode, mumamo-last-chunk=nil
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>, point-max=6, last=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 6 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-set-major-post-command, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=6, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>, point-max=6, last=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 6 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-fontify-region-1, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=6, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>, point-max=6, last=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 6 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from mumamo-fontify-region-1 2, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=6, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>, point-max=6, last=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 6 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=1 from syntax-ppss, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:using old at end=1, ok-pos=6, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=1, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>, point-max=6, last=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 6 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-idle-set-major-mode, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=6, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 1 to 6 in nxhtml_test.php>, point-max=6, last=#<overlay from 1 to 6 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 6 in nxhtml_test.php>
-Mark set
-MU:c-after-change: major-mode=html-mode c-nonsymbol-token-regexp=nil
-Loading debug...done
-Entering debugger...
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-fontify-region-1, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=45, this-new-chunk=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 1 to 45 in nxhtml_test.php>, point-max=45, last=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 45 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from mumamo-fontify-region-1 2, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=45, this-new-chunk=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 1 to 45 in nxhtml_test.php>, point-max=45, last=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 45 in nxhtml_test.php>
-MU:!!!!!!!!!!!!!!!!!!!find-chunks end=5 from syntax-ppss, level=0
-MU:find-chunks:first-check-from=nil, chunk-at-change-min=nil
-MU:find-chunks:at start mumamo-old-tail=nil, mumamo-last-chunk=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks:using old at end=5, ok-pos=45, this-new-chunk=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks:Exit.end-param=5, this-new-chunk=#<overlay from 1 to 45 in nxhtml_test.php>, point-max=45, last=#<overlay from 1 to 45 in nxhtml_test.php>
-MU:find-chunks=>#<overlay from 1 to 45 in nxhtml_test.php>
-Quit
-File `/Users/isho/Desktop/backtrace.txt' exists; overwrite? (y or n)
-Wrote /Users/isho/Desktop/backtrace.txt
-File `~/Desktop/messages.txt' exists; overwrite? (y or n)
diff --git a/emacs.d/nxhtml/tests/in/bug388729-nxhtml_test.php b/emacs.d/nxhtml/tests/in/bug388729-nxhtml_test.php
deleted file mode 100644
index 5b049b9..0000000
--- a/emacs.d/nxhtml/tests/in/bug388729-nxhtml_test.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-<?php echo "this could be anything"; ?>
diff --git a/emacs.d/nxhtml/tests/in/bug393137-new.html.erb b/emacs.d/nxhtml/tests/in/bug393137-new.html.erb
deleted file mode 100644
index 4023506..0000000
--- a/emacs.d/nxhtml/tests/in/bug393137-new.html.erb
+++ /dev/null
@@ -1,18 +0,0 @@
- <h1>New post</h1>
-
-<% form_for(@post) do |f| %>
- <%= f.error_messages %>
-<p>
- <%= f.label :title %><br />
-<% a = f.text_field :title %>
-</p>
-<p>
- <%= f.label :body %><br />
-<%#= f.text_area :body %>
-</p>
-<p>
- <%= f.submit 'Create' %>
-</p>
-<% end %>
-
-<%= link_to 'Back', posts_path %>
diff --git a/emacs.d/nxhtml/tests/in/bug400415-foo.php b/emacs.d/nxhtml/tests/in/bug400415-foo.php
deleted file mode 100644
index 8e40934..0000000
--- a/emacs.d/nxhtml/tests/in/bug400415-foo.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-class Foo {
- public function foo() {
- $foo = <<<EOT_SQL
- I am a heredoc
-EOT_SQL
- }
-}
diff --git a/emacs.d/nxhtml/tests/in/bug400415-foo2.php b/emacs.d/nxhtml/tests/in/bug400415-foo2.php
deleted file mode 100644
index bb4fbad..0000000
--- a/emacs.d/nxhtml/tests/in/bug400415-foo2.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-class Foo {
- public function foo() {
- $foo = <<<EOT_SQL
- I am a heredoc
-EOT_SQL;
- }
-}
diff --git a/emacs.d/nxhtml/tests/in/bug409183.html b/emacs.d/nxhtml/tests/in/bug409183.html
deleted file mode 100644
index 0089fc3..0000000
--- a/emacs.d/nxhtml/tests/in/bug409183.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:py="http://genshi.edgewall.org/"
- py:strip="True">
- <head>
- <title></title>
- </head>
- <body>
- <py:match path="head" once="True">Something</py:match>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug416505-Body.mxml b/emacs.d/nxhtml/tests/in/bug416505-Body.mxml
deleted file mode 100644
index e42e09f..0000000
--- a/emacs.d/nxhtml/tests/in/bug416505-Body.mxml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<mx:Canvas
- xmlns:mx="http://www.adobe.com/2006/mxml"
- xmlns:c="imo.utils.*"
- xmlns:imocp="imo.components.*"
- xmlns:fl="http://github.com/lancecarlson/flails"
- xmlns:commons="imo.components.commons.*"
- creationComplete="resetMenus()"
- horizontalScrollPolicy="off" verticalScrollPolicy="off">
-
- <mx:Script>
- <![CDATA[
- import imo.components.tooltips.MediaFileToolTip;
-
- import mx.core.UIComponent;
- import mx.events.DragEvent;
- import mx.managers.DragManager;
-
- public static const LEFT_STATES:Array = [];
- public static const RIGHT_STATES:Array = [];
-
- [Deprecated]
- public function changeState(state:String):void {
- containers.currentState = state;
- }
-
- private function tabMouseDown(e:MouseEvent):void{
- resetMenus(e.target.parent);
- containers.currentState = e.target.label;
- }
-
- private function resetMenus(which:Object = null):void {
- if (which == null) {
- leftMenu.selectedIndex = -1;
- rightMenu.selectedIndex = -1;
- } else {
- which.selectedIndex = -1;
- }
- }
-
- private function onDragEnter( event:DragEvent ):void{
- containers.currentState = "queue";
- DragManager.acceptDragDrop( UIComponent(event.target) );
- }
-
- private function updateMenu(page:Object):void{
- if (page.hasOwnProperty("menu")) {
- this[page.menu + "Menu"].selectedIndex = page.menuIndex;
- } else {
- resetMenus();
- }
- }
- ]]>
- </mx:Script>
-
- <!--<commons:TransparentBorderCanvas styleName="sideCanvas" x="-10" width="30" height="210"
- horizontalScrollPolicy="off" verticalScrollPolicy="off"
- customBorderThickness="2" borderAlpha=".6" cornerRadius="10">-->
- <mx:Canvas styleName="sideCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="-8" width="30" height="174" >
- <mx:TabBar id="leftMenu"
- styleName="sideMenu"
- dataProvider="{LEFT_STATES.reverse()}"
- rotation="90"
- x="24"
- y="4"
- width="163"
- buttonMode="true"
- mouseDown="tabMouseDown(event);"
- toggleOnClick="true"/>
- </mx:Canvas>
- <!--</commons:TransparentBorderCanvas>-->
-
- <imocp:MainContainer x="29" y="0" id="containers" width="376" height="473"/>
- <mx:Canvas x="412" styleName="sideCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" width="40" height="155">
- <mx:TabBar x="22" y="5" id="rightMenu" mouseDown="tabMouseDown(event);"
- styleName="rightSideMenu"
- dataProvider="{RIGHT_STATES.reverse()}"
- rotation="90"
- width="142"
- buttonMode="true"
- dragEnter="onDragEnter(event)"
- toggleOnClick="true"/>
- </mx:Canvas>
- <!--</commons:TransparentBorderCanvas>-->
-</mx:Canvas>
diff --git a/emacs.d/nxhtml/tests/in/bug416505-nxhtml.el b/emacs.d/nxhtml/tests/in/bug416505-nxhtml.el
deleted file mode 100644
index 867bf53..0000000
--- a/emacs.d/nxhtml/tests/in/bug416505-nxhtml.el
+++ /dev/null
@@ -1,45 +0,0 @@
-;; NXHTML
-;;(load (concat vendor-path "/nxhtml/autostart.el"))
-
-(defconst mumamo-actionscript-tag-start-regex
- (rx "<mx:Script>" (0+ space) "<![CDATA["))
-
-(defconst mumamo-actionscript-tag-end-regex
- (rx "]]>" (0+ space) "</mx:Script>"))
-
-;; (defun mumamo-search-bw-exc-start-inlined-actionscript (pos min)
-;; (let ((exc-start (mumamo-chunk-start-bw-re pos min mumamo-actionscript-tag-start-regex)))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'espresso-mode))))
-
-;; (defun mumamo-search-bw-exc-end-inlined-actionscript (pos min)
-;; (mumamo-chunk-end-bw-re pos min mumamo-actionscript-tag-end-regex))
-
-;; (defun mumamo-search-fw-exc-start-inlined-actionscript-old (pos max)
-;; (mumamo-chunk-start-fw-re pos max mumamo-actionscript-tag-start-regex))
-
-(defun mumamo-search-fw-exc-start-inlined-actionscript (pos max)
- (let ((where (mumamo-chunk-start-fw-re pos max mumamo-actionscript-tag-start-regex)))
- (when where
- (list where 'js-mode))))
-
-(defun mumamo-search-fw-exc-end-inlined-actionscript (pos max)
- (mumamo-chunk-end-fw-re pos max mumamo-actionscript-tag-end-regex))
-
-(defun mumamo-chunk-inlined-actionscript (pos min max)
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-inlined-actionscript
- ;; 'mumamo-search-bw-exc-end-inlined-actionscript
- ;; 'mumamo-search-fw-exc-start-inlined-actionscript-old
- ;; 'mumamo-search-fw-exc-end-inlined-actionscript)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-inlined-actionscript
- 'mumamo-search-fw-exc-end-inlined-actionscript))
-
-(define-mumamo-multi-major-mode mxml-actionscript-mumamo-mode
- "Turn on multiple major modes for MXML with main mode `nxml-mode'.
-This covers inlined style and script for mxml."
- ("nXml Family" nxml-mode (mumamo-chunk-inlined-actionscript)))
-
-(add-to-list 'auto-mode-alist '("\\.mxml$" . mxml-actionscript-mumamo-mode))
diff --git a/emacs.d/nxhtml/tests/in/bug452676.php b/emacs.d/nxhtml/tests/in/bug452676.php
deleted file mode 100644
index d47c8ee..0000000
--- a/emacs.d/nxhtml/tests/in/bug452676.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
-<?php
-
-class Foo {
- public $foo = array(
- 'long' => <<<'LONG'
-lorem ipsum
-LONG
-);
-
- public $bar = 1;
- CancelOk
diff --git a/emacs.d/nxhtml/tests/in/bug463136.php b/emacs.d/nxhtml/tests/in/bug463136.php
deleted file mode 100644
index 6ed29f7..0000000
--- a/emacs.d/nxhtml/tests/in/bug463136.php
+++ /dev/null
@@ -1,5 +0,0 @@
-
-<body>
- <?php
-echo "test";
-echo "test2"; \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug492366-test.php b/emacs.d/nxhtml/tests/in/bug492366-test.php
deleted file mode 100644
index be84c75..0000000
--- a/emacs.d/nxhtml/tests/in/bug492366-test.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-function render()
-{
- $html =<<<HTML
- <head>
- </head>
- <body>
- <div id="some_id" class="some_class"></div>
- <div id="some_id" class="some_class"></div>
- <form method="post" id="" action="">
- </form>
- <form method="get" id="id2" action="do.php">
- </form>
- </body>
-HTML;
-
-echo $html;
-}
-
-render();
- ?>
diff --git a/emacs.d/nxhtml/tests/in/bug495770-heredoc_demo.pl b/emacs.d/nxhtml/tests/in/bug495770-heredoc_demo.pl
deleted file mode 100644
index 562e695..0000000
--- a/emacs.d/nxhtml/tests/in/bug495770-heredoc_demo.pl
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/perl
-# heredoc_demo.pl doom@kzsu.stanford.edu
-# December 10, 2009
-
-use warnings;
-use strict;
-$|=1;
-use Data::Dumper;
-
-use File::Path qw( mkpath );
-use File::Basename qw( fileparse basename dirname );
-use File::Copy qw( copy move );
-use Fatal qw( open close mkpath copy move );
-use Cwd qw( cwd abs_path );
-
-use Env qw(HOME);
-
-our $VERSION = 0.01;
-my $prog = basename($0);
-
-use Getopt::Std;
-my %opt = ();
-getopts('d', \%opt);
-my $DEBUG = $opt{d} || 1; # TODO set default to 0 when in production
-
-my ($title, $incantation, $god);
-
-my $skull=<<"END_SQL";
- SELECT id, god, incantation
- FROM spell, pantheon
- WHERE pantheon.id = spell.pantheon AND
- pantheon.name = 'lovecraft'
-END_SQL
-
-my $phfftp=<<"END_HTML";
-<HTML><HEAD><TITLE>$title</TITLE></HEAD>
-<BODY>
-<H2>$title</H2>
-<P>Speak not the dread words of $incantation
-lest ye invoke the $god.</P>
-</BODY></HTML>
-END_HTML
-
-print $skull, "\n";
-print $phfftp, "\n";
-
-__END__
-
-=head1 NAME
-
-heredoc_demo.pl - (( TODO insert brief description ))
-
-=head1 SYNOPSIS
-
- heredoc_demo.pl -[options] [arguments]
-
- Options:
- -d debug
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<-d>
-
-Turn on debug messages.
-
-=back
-
-=head1 DESCRIPTION
-
-B<heredoc_demo.pl> is a script which
-
-(( TODO insert explaination
- This is stub documentation created by template.el. ))
-
-=head1 AUTHOR
-
-Joseph Brenner, E<lt>doom@kzsu.stanford.eduE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2009 by Joseph Brenner
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of either: the GNU General Public License as published
-by the Free Software Foundation; or the Artistic License.
-
-See http://dev.perl.org/licenses/ for more information.
-
-=head1 BUGS
-
-None reported... yet.
-
-=cut
diff --git a/emacs.d/nxhtml/tests/in/bug505554-nxhtml-download-messages.txt b/emacs.d/nxhtml/tests/in/bug505554-nxhtml-download-messages.txt
deleted file mode 100644
index fef35a6..0000000
--- a/emacs.d/nxhtml/tests/in/bug505554-nxhtml-download-messages.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/autostart.el"
-Invalid face reference: hi-gold [4 times]
-Reading [application/octet-stream]... 2k of 2k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/autostart22.el"
-Invalid face reference: hi-gold
-Reading [application/octet-stream]... 77 bytes of 66 bytes (117%)
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/emacs22.cmd" was ok
-Reading [application/octet-stream]... 158k of 158k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/nxhtml-loaddefs.el"
-Reading [application/octet-stream]... 16k of 16k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/nxhtmlmaint.el"
-Reading [text/plain]... 1k of 1k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/README.txt" was ok
-Reading [application/octet-stream]... 18k of 18k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-Downloaded "/home/ranko/.emacs.d/nxhtml/web-autoload.el"
-Reading [application/octet-stream]... 95k of 95k (100%) [2 times]
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/web-vcs-temp.tmp
-Downloaded "/home/ranko/.emacs.d/nxhtml/web-vcs.el"
-Contacting host: bazaar.launchpad.net:80
-Reading [application/octet-stream]... 5k of 5k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/alts/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/alts/find-recursive-orig.el" was ok
-Reading [application/octet-stream]... 23k of 23k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/alts/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/alts/javascript-mozlab.el" was ok
-Reading [application/octet-stream]... 97k of 97k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/alts/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/alts/smarty-mode-vdebout.el" was ok
-Contacting host: bazaar.launchpad.net:80 [2 times]
-Reading [image/jpeg]... 25k of 25k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/img/pause/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/img/pause/pause.jpg" was ok
-Reading [image/jpeg]... 26k of 26k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/img/pause/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/img/pause/pause2.jpg" was ok
-Contacting host: bazaar.launchpad.net:80
-Reading [application/octet-stream]... 1k of 1k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/schema/genshi-old.rnc" was ok
-Reading [text/xml]... 150 bytes of 139 bytes (108%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/schema/genshi-schemas.xml" was ok
-Reading [application/octet-stream]... 2k of 2k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/etc/schema/genshi.rnc"
-Reading [application/octet-stream]... 2k of 2k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/schema/mjt.rnc" was ok
-Reading [text/x-diff]... 1k of 1k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/schema/nxml-erb.patch" was ok
-Reading [application/octet-stream]... 1k of 1k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-Downloaded "/home/ranko/.emacs.d/nxhtml/etc/schema/old-genshi.rnc"
-Reading [application/octet-stream]... 2k of 2k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-Downloaded "/home/ranko/.emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc"
-Reading [application/octet-stream]... 367 bytes of 356 bytes (103%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-Downloaded "/home/ranko/.emacs.d/nxhtml/etc/schema/old-xinclude.rnc"
-Reading [application/octet-stream]... 2k of 2k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc" was ok
-Reading [application/octet-stream]... 2k of 2k (100%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc"
-Reading [application/octet-stream]... 3k of 3k (100%)
-Reading... done.
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-File "/home/ranko/.emacs.d/nxhtml/etc/schema/schema-path-patch.el" was ok
-Reading [application/octet-stream]... 890 bytes of 879 bytes (101%)
-Wrote /home/ranko/.emacs.d/nxhtml/etc/schema/web-vcs-temp.tmp
-Updated "/home/ranko/.emacs.d/nxhtml/etc/schema/xinclude.rnc"
-let*: Args out of range: 5023, 5047
-Mark set [2 times]
-Saved text from "Contacting host: bazaar.launchpad.net:80"
-call-interactively: End of buffer
-(New file)
diff --git a/emacs.d/nxhtml/tests/in/bug505554-sample.html.erb b/emacs.d/nxhtml/tests/in/bug505554-sample.html.erb
deleted file mode 100644
index 0380560..0000000
--- a/emacs.d/nxhtml/tests/in/bug505554-sample.html.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-<h1><%= t('views.common.login') %></h1>
-
-<% form_tag session_path do -%>
-<p><%= label_tag(t('views.common.username')) %><br />
-<%= text_field_tag 'login', @login %></p>
-
-<p><%= label_tag(t('views.common.password')) %><br/>
-<%= password_field_tag 'password', nil %></p>
-
-<p><%= submit_tag(t('views.common.login_verb')) %></p>
-<% end -%>
diff --git a/emacs.d/nxhtml/tests/in/bug505726-foo.html b/emacs.d/nxhtml/tests/in/bug505726-foo.html
deleted file mode 100644
index c738117..0000000
--- a/emacs.d/nxhtml/tests/in/bug505726-foo.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
-<head>
-</head>
-
-<body>
- <script type="text/javascript">
- </script>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug509586.ghtml b/emacs.d/nxhtml/tests/in/bug509586.ghtml
deleted file mode 100644
index 275fd21..0000000
--- a/emacs.d/nxhtml/tests/in/bug509586.ghtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html PUBLIC
-"-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:py="http://genshi.edgewall.org/">
- <head>
- <title>Title</title>
- </head>
- <!-- To test this open this file in `genshi-nxhtml-mumamo-mode' and
- add evaluate this: -->
- <!-- (setq exec-path (cons "c:/python26/" exec-path)) -->
- <!-- (add-hook 'python-mode-hook 'turn-on-eldoc-mode) -->
- <body>
- ${}
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug523065.jsp b/emacs.d/nxhtml/tests/in/bug523065.jsp
deleted file mode 100644
index a696515..0000000
--- a/emacs.d/nxhtml/tests/in/bug523065.jsp
+++ /dev/null
@@ -1,9 +0,0 @@
-In JSP page, if we have a line like <% // some comments %>, then the "%>" is ignored by nxhtml.
-However if we write it like this:
-<% // some comments
-%>
-or
-<%
-// some comments
-%>
-then the page is parsed correctly
diff --git a/emacs.d/nxhtml/tests/in/bug523065.php b/emacs.d/nxhtml/tests/in/bug523065.php
deleted file mode 100644
index 5d64278..0000000
--- a/emacs.d/nxhtml/tests/in/bug523065.php
+++ /dev/null
@@ -1,6 +0,0 @@
-
- <?php /* ?>
- This is a comment
- */
- ?>
- This is html
diff --git a/emacs.d/nxhtml/tests/in/bug529133-statemachine.py b/emacs.d/nxhtml/tests/in/bug529133-statemachine.py
deleted file mode 100644
index 26ba642..0000000
--- a/emacs.d/nxhtml/tests/in/bug529133-statemachine.py
+++ /dev/null
@@ -1,1491 +0,0 @@
-# $Id: statemachine.py 6188 2009-10-28 14:08:17Z milde $
-# Author: David Goodger <goodger@python.org>
-# Copyright: This module has been placed in the public domain.
-
-"""
-A finite state machine specialized for regular-expression-based text filters,
-this module defines the following classes:
-
-- `StateMachine`, a state machine
-- `State`, a state superclass
-- `StateMachineWS`, a whitespace-sensitive version of `StateMachine`
-- `StateWS`, a state superclass for use with `StateMachineWS`
-- `SearchStateMachine`, uses `re.search()` instead of `re.match()`
-- `SearchStateMachineWS`, uses `re.search()` instead of `re.match()`
-- `ViewList`, extends standard Python lists.
-- `StringList`, string-specific ViewList.
-
-Exception classes:
-
-- `StateMachineError`
-- `UnknownStateError`
-- `DuplicateStateError`
-- `UnknownTransitionError`
-- `DuplicateTransitionError`
-- `TransitionPatternNotFound`
-- `TransitionMethodNotFound`
-- `UnexpectedIndentationError`
-- `TransitionCorrection`: Raised to switch to another transition.
-- `StateCorrection`: Raised to switch to another state & transition.
-
-Functions:
-
-- `string2lines()`: split a multi-line string into a list of one-line strings
-
-
-How To Use This Module
-======================
-(See the individual classes, methods, and attributes for details.)
-
-1. Import it: ``import statemachine`` or ``from statemachine import ...``.
- You will also need to ``import re``.
-
-2. Derive a subclass of `State` (or `StateWS`) for each state in your state
- machine::
-
- class MyState(statemachine.State):
-
- Within the state's class definition:
-
- a) Include a pattern for each transition, in `State.patterns`::
-
- patterns = {'atransition': r'pattern', ...}
-
- b) Include a list of initial transitions to be set up automatically, in
- `State.initial_transitions`::
-
- initial_transitions = ['atransition', ...]
-
- c) Define a method for each transition, with the same name as the
- transition pattern::
-
- def atransition(self, match, context, next_state):
- # do something
- result = [...] # a list
- return context, next_state, result
- # context, next_state may be altered
-
- Transition methods may raise an `EOFError` to cut processing short.
-
- d) You may wish to override the `State.bof()` and/or `State.eof()` implicit
- transition methods, which handle the beginning- and end-of-file.
-
- e) In order to handle nested processing, you may wish to override the
- attributes `State.nested_sm` and/or `State.nested_sm_kwargs`.
-
- If you are using `StateWS` as a base class, in order to handle nested
- indented blocks, you may wish to:
-
- - override the attributes `StateWS.indent_sm`,
- `StateWS.indent_sm_kwargs`, `StateWS.known_indent_sm`, and/or
- `StateWS.known_indent_sm_kwargs`;
- - override the `StateWS.blank()` method; and/or
- - override or extend the `StateWS.indent()`, `StateWS.known_indent()`,
- and/or `StateWS.firstknown_indent()` methods.
-
-3. Create a state machine object::
-
- sm = StateMachine(state_classes=[MyState, ...],
- initial_state='MyState')
-
-4. Obtain the input text, which needs to be converted into a tab-free list of
- one-line strings. For example, to read text from a file called
- 'inputfile'::
-
- input_string = open('inputfile').read()
- input_lines = statemachine.string2lines(input_string)
-
-5. Run the state machine on the input text and collect the results, a list::
-
- results = sm.run(input_lines)
-
-6. Remove any lingering circular references::
-
- sm.unlink()
-"""
-
-__docformat__ = 'restructuredtext'
-
-import sys
-import re
-import types
-import unicodedata
-
-
-class StateMachine:
-
- """
- A finite state machine for text filters using regular expressions.
-
- The input is provided in the form of a list of one-line strings (no
- newlines). States are subclasses of the `State` class. Transitions consist
- of regular expression patterns and transition methods, and are defined in
- each state.
-
- The state machine is started with the `run()` method, which returns the
- results of processing in a list.
- """
-
- def __init__(self, state_classes, initial_state, debug=0):
- """
- Initialize a `StateMachine` object; add state objects.
-
- Parameters:
-
- - `state_classes`: a list of `State` (sub)classes.
- - `initial_state`: a string, the class name of the initial state.
- - `debug`: a boolean; produce verbose output if true (nonzero).
- """
-
- self.input_lines = None
- """`StringList` of input lines (without newlines).
- Filled by `self.run()`."""
-
- self.input_offset = 0
- """Offset of `self.input_lines` from the beginning of the file."""
-
- self.line = None
- """Current input line."""
-
- self.line_offset = -1
- """Current input line offset from beginning of `self.input_lines`."""
-
- self.debug = debug
- """Debugging mode on/off."""
-
- self.initial_state = initial_state
- """The name of the initial state (key to `self.states`)."""
-
- self.current_state = initial_state
- """The name of the current state (key to `self.states`)."""
-
- self.states = {}
- """Mapping of {state_name: State_object}."""
-
- self.add_states(state_classes)
-
- self.observers = []
- """List of bound methods or functions to call whenever the current
- line changes. Observers are called with one argument, ``self``.
- Cleared at the end of `run()`."""
-
- def unlink(self):
- """Remove circular references to objects no longer required."""
- for state in self.states.values():
- state.unlink()
- self.states = None
-
- def run(self, input_lines, input_offset=0, context=None,
- input_source=None, initial_state=None):
- """
- Run the state machine on `input_lines`. Return results (a list).
-
- Reset `self.line_offset` and `self.current_state`. Run the
- beginning-of-file transition. Input one line at a time and check for a
- matching transition. If a match is found, call the transition method
- and possibly change the state. Store the context returned by the
- transition method to be passed on to the next transition matched.
- Accumulate the results returned by the transition methods in a list.
- Run the end-of-file transition. Finally, return the accumulated
- results.
-
- Parameters:
-
- - `input_lines`: a list of strings without newlines, or `StringList`.
- - `input_offset`: the line offset of `input_lines` from the beginning
- of the file.
- - `context`: application-specific storage.
- - `input_source`: name or path of source of `input_lines`.
- - `initial_state`: name of initial state.
- """
- self.runtime_init()
- if isinstance(input_lines, StringList):
- self.input_lines = input_lines
- else:
- self.input_lines = StringList(input_lines, source=input_source)
- self.input_offset = input_offset
- self.line_offset = -1
- self.current_state = initial_state or self.initial_state
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.run: input_lines (line_offset=%s):\n| %s'
- % (self.line_offset, '\n| '.join(self.input_lines)))
- transitions = None
- results = []
- state = self.get_state()
- try:
- if self.debug:
- print >>sys.stderr, ('\nStateMachine.run: bof transition')
- context, result = state.bof(context)
- results.extend(result)
- while 1:
- try:
- try:
- self.next_line()
- if self.debug:
- source, offset = self.input_lines.info(
- self.line_offset)
- print >>sys.stderr, (
- '\nStateMachine.run: line (source=%r, '
- 'offset=%r):\n| %s'
- % (source, offset, self.line))
- context, next_state, result = self.check_line(
- context, state, transitions)
- except EOFError:
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.run: %s.eof transition'
- % state.__class__.__name__)
- result = state.eof(context)
- results.extend(result)
- break
- else:
- results.extend(result)
- except TransitionCorrection, exception:
- self.previous_line() # back up for another try
- transitions = (exception.args[0],)
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.run: TransitionCorrection to '
- 'state "%s", transition %s.'
- % (state.__class__.__name__, transitions[0]))
- continue
- except StateCorrection, exception:
- self.previous_line() # back up for another try
- next_state = exception.args[0]
- if len(exception.args) == 1:
- transitions = None
- else:
- transitions = (exception.args[1],)
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.run: StateCorrection to state '
- '"%s", transition %s.'
- % (next_state, transitions[0]))
- else:
- transitions = None
- state = self.get_state(next_state)
- except:
- if self.debug:
- self.error()
- raise
- self.observers = []
- return results
-
- def get_state(self, next_state=None):
- """
- Return current state object; set it first if `next_state` given.
-
- Parameter `next_state`: a string, the name of the next state.
-
- Exception: `UnknownStateError` raised if `next_state` unknown.
- """
- if next_state:
- if self.debug and next_state != self.current_state:
- print >>sys.stderr, \
- ('\nStateMachine.get_state: Changing state from '
- '"%s" to "%s" (input line %s).'
- % (self.current_state, next_state,
- self.abs_line_number()))
- self.current_state = next_state
- try:
- return self.states[self.current_state]
- except KeyError:
- raise UnknownStateError(self.current_state)
-
- def next_line(self, n=1):
- """Load `self.line` with the `n`'th next line and return it."""
- try:
- try:
- self.line_offset += n
- self.line = self.input_lines[self.line_offset]
- except IndexError:
- self.line = None
- raise EOFError
- return self.line
- finally:
- self.notify_observers()
-
- def is_next_line_blank(self):
- """Return 1 if the next line is blank or non-existant."""
- try:
- return not self.input_lines[self.line_offset + 1].strip()
- except IndexError:
- return 1
-
- def at_eof(self):
- """Return 1 if the input is at or past end-of-file."""
- return self.line_offset >= len(self.input_lines) - 1
-
- def at_bof(self):
- """Return 1 if the input is at or before beginning-of-file."""
- return self.line_offset <= 0
-
- def previous_line(self, n=1):
- """Load `self.line` with the `n`'th previous line and return it."""
- self.line_offset -= n
- if self.line_offset < 0:
- self.line = None
- else:
- self.line = self.input_lines[self.line_offset]
- self.notify_observers()
- return self.line
-
- def goto_line(self, line_offset):
- """Jump to absolute line offset `line_offset`, load and return it."""
- try:
- try:
- self.line_offset = line_offset - self.input_offset
- self.line = self.input_lines[self.line_offset]
- except IndexError:
- self.line = None
- raise EOFError
- return self.line
- finally:
- self.notify_observers()
-
- def get_source(self, line_offset):
- """Return source of line at absolute line offset `line_offset`."""
- return self.input_lines.source(line_offset - self.input_offset)
-
- def get_source_spot(self, line_offset=None):
- """Return dict with source position of current or given line"""
- if line_offset is None:
- line_offset = self.line_offset
- else:
- line_offset -= self.input_offset
- (source, offset) = self.input_lines.info(line_offset)
- return {'source': source, 'line': offset + 1}
-
- def abs_line_offset(self):
- """Return line offset of current line, from beginning of file."""
- return self.line_offset + self.input_offset
-
- def abs_line_number(self):
- """Return line number of current line (counting from 1)."""
- return self.line_offset + self.input_offset + 1
-
- def insert_input(self, input_lines, source):
- self.input_lines.insert(self.line_offset + 1, '',
- source='internal padding after ' + source)
- self.input_lines.insert(self.line_offset + 1, '',
- source='internal padding before '+ source)
- self.input_lines.insert(self.line_offset + 2,
- StringList(input_lines, source))
-
- def get_text_block(self, flush_left=0):
- """
- Return a contiguous block of text.
-
- If `flush_left` is true, raise `UnexpectedIndentationError` if an
- indented line is encountered before the text block ends (with a blank
- line).
- """
- try:
- block = self.input_lines.get_text_block(self.line_offset,
- flush_left)
- self.next_line(len(block) - 1)
- return block
- except UnexpectedIndentationError, error:
- block, source, lineno = error.args
- self.next_line(len(block) - 1) # advance to last line of block
- raise
-
- def check_line(self, context, state, transitions=None):
- """
- Examine one line of input for a transition match & execute its method.
-
- Parameters:
-
- - `context`: application-dependent storage.
- - `state`: a `State` object, the current state.
- - `transitions`: an optional ordered list of transition names to try,
- instead of ``state.transition_order``.
-
- Return the values returned by the transition method:
-
- - context: possibly modified from the parameter `context`;
- - next state name (`State` subclass name);
- - the result output of the transition, a list.
-
- When there is no match, ``state.no_match()`` is called and its return
- value is returned.
- """
- if transitions is None:
- transitions = state.transition_order
- state_correction = None
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.check_line: state="%s", transitions=%r.'
- % (state.__class__.__name__, transitions))
- for name in transitions:
- pattern, method, next_state = state.transitions[name]
- match = pattern.match(self.line)
- if match:
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.check_line: Matched transition '
- '"%s" in state "%s".'
- % (name, state.__class__.__name__))
- return method(match, context, next_state)
- else:
- if self.debug:
- print >>sys.stderr, (
- '\nStateMachine.check_line: No match in state "%s".'
- % state.__class__.__name__)
- return state.no_match(context, transitions)
-
- def add_state(self, state_class):
- """
- Initialize & add a `state_class` (`State` subclass) object.
-
- Exception: `DuplicateStateError` raised if `state_class` was already
- added.
- """
- statename = state_class.__name__
- if statename in self.states:
- raise DuplicateStateError(statename)
- self.states[statename] = state_class(self, self.debug)
-
- def add_states(self, state_classes):
- """
- Add `state_classes` (a list of `State` subclasses).
- """
- for state_class in state_classes:
- self.add_state(state_class)
-
- def runtime_init(self):
- """
- Initialize `self.states`.
- """
- for state in self.states.values():
- state.runtime_init()
-
- def error(self):
- """Report error details."""
- type, value, module, line, function = _exception_data()
- print >>sys.stderr, '%s: %s' % (type, value)
- print >>sys.stderr, 'input line %s' % (self.abs_line_number())
- print >>sys.stderr, ('module %s, line %s, function %s'
- % (module, line, function))
-
- def attach_observer(self, observer):
- """
- The `observer` parameter is a function or bound method which takes two
- arguments, the source and offset of the current line.
- """
- self.observers.append(observer)
-
- def detach_observer(self, observer):
- self.observers.remove(observer)
-
- def notify_observers(self):
- for observer in self.observers:
- try:
- info = self.input_lines.info(self.line_offset)
- except IndexError:
- info = (None, None)
- observer(*info)
-
-
-class State:
-
- """
- State superclass. Contains a list of transitions, and transition methods.
-
- Transition methods all have the same signature. They take 3 parameters:
-
- - An `re` match object. ``match.string`` contains the matched input line,
- ``match.start()`` gives the start index of the match, and
- ``match.end()`` gives the end index.
- - A context object, whose meaning is application-defined (initial value
- ``None``). It can be used to store any information required by the state
- machine, and the retured context is passed on to the next transition
- method unchanged.
- - The name of the next state, a string, taken from the transitions list;
- normally it is returned unchanged, but it may be altered by the
- transition method if necessary.
-
- Transition methods all return a 3-tuple:
-
- - A context object, as (potentially) modified by the transition method.
- - The next state name (a return value of ``None`` means no state change).
- - The processing result, a list, which is accumulated by the state
- machine.
-
- Transition methods may raise an `EOFError` to cut processing short.
-
- There are two implicit transitions, and corresponding transition methods
- are defined: `bof()` handles the beginning-of-file, and `eof()` handles
- the end-of-file. These methods have non-standard signatures and return
- values. `bof()` returns the initial context and results, and may be used
- to return a header string, or do any other processing needed. `eof()`
- should handle any remaining context and wrap things up; it returns the
- final processing result.
-
- Typical applications need only subclass `State` (or a subclass), set the
- `patterns` and `initial_transitions` class attributes, and provide
- corresponding transition methods. The default object initialization will
- take care of constructing the list of transitions.
- """
-
- patterns = None
- """
- {Name: pattern} mapping, used by `make_transition()`. Each pattern may
- be a string or a compiled `re` pattern. Override in subclasses.
- """
-
- initial_transitions = None
- """
- A list of transitions to initialize when a `State` is instantiated.
- Each entry is either a transition name string, or a (transition name, next
- state name) pair. See `make_transitions()`. Override in subclasses.
- """
-
- nested_sm = None
- """
- The `StateMachine` class for handling nested processing.
-
- If left as ``None``, `nested_sm` defaults to the class of the state's
- controlling state machine. Override it in subclasses to avoid the default.
- """
-
- nested_sm_kwargs = None
- """
- Keyword arguments dictionary, passed to the `nested_sm` constructor.
-
- Two keys must have entries in the dictionary:
-
- - Key 'state_classes' must be set to a list of `State` classes.
- - Key 'initial_state' must be set to the name of the initial state class.
-
- If `nested_sm_kwargs` is left as ``None``, 'state_classes' defaults to the
- class of the current state, and 'initial_state' defaults to the name of
- the class of the current state. Override in subclasses to avoid the
- defaults.
- """
-
- def __init__(self, state_machine, debug=0):
- """
- Initialize a `State` object; make & add initial transitions.
-
- Parameters:
-
- - `statemachine`: the controlling `StateMachine` object.
- - `debug`: a boolean; produce verbose output if true (nonzero).
- """
-
- self.transition_order = []
- """A list of transition names in search order."""
-
- self.transitions = {}
- """
- A mapping of transition names to 3-tuples containing
- (compiled_pattern, transition_method, next_state_name). Initialized as
- an instance attribute dynamically (instead of as a class attribute)
- because it may make forward references to patterns and methods in this
- or other classes.
- """
-
- self.add_initial_transitions()
-
- self.state_machine = state_machine
- """A reference to the controlling `StateMachine` object."""
-
- self.debug = debug
- """Debugging mode on/off."""
-
- if self.nested_sm is None:
- self.nested_sm = self.state_machine.__class__
- if self.nested_sm_kwargs is None:
- self.nested_sm_kwargs = {'state_classes': [self.__class__],
- 'initial_state': self.__class__.__name__}
-
- def runtime_init(self):
- """
- Initialize this `State` before running the state machine; called from
- `self.state_machine.run()`.
- """
- pass
-
- def unlink(self):
- """Remove circular references to objects no longer required."""
- self.state_machine = None
-
- def add_initial_transitions(self):
- """Make and add transitions listed in `self.initial_transitions`."""
- if self.initial_transitions:
- names, transitions = self.make_transitions(
- self.initial_transitions)
- self.add_transitions(names, transitions)
-
- def add_transitions(self, names, transitions):
- """
- Add a list of transitions to the start of the transition list.
-
- Parameters:
-
- - `names`: a list of transition names.
- - `transitions`: a mapping of names to transition tuples.
-
- Exceptions: `DuplicateTransitionError`, `UnknownTransitionError`.
- """
- for name in names:
- if name in self.transitions:
- raise DuplicateTransitionError(name)
- if name not in transitions:
- raise UnknownTransitionError(name)
- self.transition_order[:0] = names
- self.transitions.update(transitions)
-
- def add_transition(self, name, transition):
- """
- Add a transition to the start of the transition list.
-
- Parameter `transition`: a ready-made transition 3-tuple.
-
- Exception: `DuplicateTransitionError`.
- """
- if name in self.transitions:
- raise DuplicateTransitionError(name)
- self.transition_order[:0] = [name]
- self.transitions[name] = transition
-
- def remove_transition(self, name):
- """
- Remove a transition by `name`.
-
- Exception: `UnknownTransitionError`.
- """
- try:
- del self.transitions[name]
- self.transition_order.remove(name)
- except:
- raise UnknownTransitionError(name)
-
- def make_transition(self, name, next_state=None):
- """
- Make & return a transition tuple based on `name`.
-
- This is a convenience function to simplify transition creation.
-
- Parameters:
-
- - `name`: a string, the name of the transition pattern & method. This
- `State` object must have a method called '`name`', and a dictionary
- `self.patterns` containing a key '`name`'.
- - `next_state`: a string, the name of the next `State` object for this
- transition. A value of ``None`` (or absent) implies no state change
- (i.e., continue with the same state).
-
- Exceptions: `TransitionPatternNotFound`, `TransitionMethodNotFound`.
- """
- if next_state is None:
- next_state = self.__class__.__name__
- try:
- pattern = self.patterns[name]
- if not hasattr(pattern, 'match'):
- pattern = re.compile(pattern)
- except KeyError:
- raise TransitionPatternNotFound(
- '%s.patterns[%r]' % (self.__class__.__name__, name))
- try:
- method = getattr(self, name)
- except AttributeError:
- raise TransitionMethodNotFound(
- '%s.%s' % (self.__class__.__name__, name))
- return (pattern, method, next_state)
-
- def make_transitions(self, name_list):
- """
- Return a list of transition names and a transition mapping.
-
- Parameter `name_list`: a list, where each entry is either a transition
- name string, or a 1- or 2-tuple (transition name, optional next state
- name).
- """
- stringtype = type('')
- names = []
- transitions = {}
- for namestate in name_list:
- if type(namestate) is stringtype:
- transitions[namestate] = self.make_transition(namestate)
- names.append(namestate)
- else:
- transitions[namestate[0]] = self.make_transition(*namestate)
- names.append(namestate[0])
- return names, transitions
-
- def no_match(self, context, transitions):
- """
- Called when there is no match from `StateMachine.check_line()`.
-
- Return the same values returned by transition methods:
-
- - context: unchanged;
- - next state name: ``None``;
- - empty result list.
-
- Override in subclasses to catch this event.
- """
- return context, None, []
-
- def bof(self, context):
- """
- Handle beginning-of-file. Return unchanged `context`, empty result.
-
- Override in subclasses.
-
- Parameter `context`: application-defined storage.
- """
- return context, []
-
- def eof(self, context):
- """
- Handle end-of-file. Return empty result.
-
- Override in subclasses.
-
- Parameter `context`: application-defined storage.
- """
- return []
-
- def nop(self, match, context, next_state):
- """
- A "do nothing" transition method.
-
- Return unchanged `context` & `next_state`, empty result. Useful for
- simple state changes (actionless transitions).
- """
- return context, next_state, []
-
-
-class StateMachineWS(StateMachine):
-
- """
- `StateMachine` subclass specialized for whitespace recognition.
-
- There are three methods provided for extracting indented text blocks:
-
- - `get_indented()`: use when the indent is unknown.
- - `get_known_indented()`: use when the indent is known for all lines.
- - `get_first_known_indented()`: use when only the first line's indent is
- known.
- """
-
- def get_indented(self, until_blank=0, strip_indent=1):
- """
- Return a block of indented lines of text, and info.
-
- Extract an indented block where the indent is unknown for all lines.
-
- :Parameters:
- - `until_blank`: Stop collecting at the first blank line if true
- (1).
- - `strip_indent`: Strip common leading indent if true (1,
- default).
-
- :Return:
- - the indented block (a list of lines of text),
- - its indent,
- - its first line offset from BOF, and
- - whether or not it finished with a blank line.
- """
- offset = self.abs_line_offset()
- indented, indent, blank_finish = self.input_lines.get_indented(
- self.line_offset, until_blank, strip_indent)
- if indented:
- self.next_line(len(indented) - 1) # advance to last indented line
- while indented and not indented[0].strip():
- indented.trim_start()
- offset += 1
- return indented, indent, offset, blank_finish
-
- def get_known_indented(self, indent, until_blank=0, strip_indent=1):
- """
- Return an indented block and info.
-
- Extract an indented block where the indent is known for all lines.
- Starting with the current line, extract the entire text block with at
- least `indent` indentation (which must be whitespace, except for the
- first line).
-
- :Parameters:
- - `indent`: The number of indent columns/characters.
- - `until_blank`: Stop collecting at the first blank line if true
- (1).
- - `strip_indent`: Strip `indent` characters of indentation if true
- (1, default).
-
- :Return:
- - the indented block,
- - its first line offset from BOF, and
- - whether or not it finished with a blank line.
- """
- offset = self.abs_line_offset()
- indented, indent, blank_finish = self.input_lines.get_indented(
- self.line_offset, until_blank, strip_indent,
- block_indent=indent)
- self.next_line(len(indented) - 1) # advance to last indented line
- while indented and not indented[0].strip():
- indented.trim_start()
- offset += 1
- return indented, offset, blank_finish
-
- def get_first_known_indented(self, indent, until_blank=0, strip_indent=1,
- strip_top=1):
- """
- Return an indented block and info.
-
- Extract an indented block where the indent is known for the first line
- and unknown for all other lines.
-
- :Parameters:
- - `indent`: The first line's indent (# of columns/characters).
- - `until_blank`: Stop collecting at the first blank line if true
- (1).
- - `strip_indent`: Strip `indent` characters of indentation if true
- (1, default).
- - `strip_top`: Strip blank lines from the beginning of the block.
-
- :Return:
- - the indented block,
- - its indent,
- - its first line offset from BOF, and
- - whether or not it finished with a blank line.
- """
- offset = self.abs_line_offset()
- indented, indent, blank_finish = self.input_lines.get_indented(
- self.line_offset, until_blank, strip_indent,
- first_indent=indent)
- self.next_line(len(indented) - 1) # advance to last indented line
- if strip_top:
- while indented and not indented[0].strip():
- indented.trim_start()
- offset += 1
- return indented, indent, offset, blank_finish
-
-
-class StateWS(State):
-
- """
- State superclass specialized for whitespace (blank lines & indents).
-
- Use this class with `StateMachineWS`. The transitions 'blank' (for blank
- lines) and 'indent' (for indented text blocks) are added automatically,
- before any other transitions. The transition method `blank()` handles
- blank lines and `indent()` handles nested indented blocks. Indented
- blocks trigger a new state machine to be created by `indent()` and run.
- The class of the state machine to be created is in `indent_sm`, and the
- constructor keyword arguments are in the dictionary `indent_sm_kwargs`.
-
- The methods `known_indent()` and `firstknown_indent()` are provided for
- indented blocks where the indent (all lines' and first line's only,
- respectively) is known to the transition method, along with the attributes
- `known_indent_sm` and `known_indent_sm_kwargs`. Neither transition method
- is triggered automatically.
- """
-
- indent_sm = None
- """
- The `StateMachine` class handling indented text blocks.
-
- If left as ``None``, `indent_sm` defaults to the value of
- `State.nested_sm`. Override it in subclasses to avoid the default.
- """
-
- indent_sm_kwargs = None
- """
- Keyword arguments dictionary, passed to the `indent_sm` constructor.
-
- If left as ``None``, `indent_sm_kwargs` defaults to the value of
- `State.nested_sm_kwargs`. Override it in subclasses to avoid the default.
- """
-
- known_indent_sm = None
- """
- The `StateMachine` class handling known-indented text blocks.
-
- If left as ``None``, `known_indent_sm` defaults to the value of
- `indent_sm`. Override it in subclasses to avoid the default.
- """
-
- known_indent_sm_kwargs = None
- """
- Keyword arguments dictionary, passed to the `known_indent_sm` constructor.
-
- If left as ``None``, `known_indent_sm_kwargs` defaults to the value of
- `indent_sm_kwargs`. Override it in subclasses to avoid the default.
- """
-
- ws_patterns = {'blank': ' *$',
- 'indent': ' +'}
- """Patterns for default whitespace transitions. May be overridden in
- subclasses."""
-
- ws_initial_transitions = ('blank', 'indent')
- """Default initial whitespace transitions, added before those listed in
- `State.initial_transitions`. May be overridden in subclasses."""
-
- def __init__(self, state_machine, debug=0):
- """
- Initialize a `StateSM` object; extends `State.__init__()`.
-
- Check for indent state machine attributes, set defaults if not set.
- """
- State.__init__(self, state_machine, debug)
- if self.indent_sm is None:
- self.indent_sm = self.nested_sm
- if self.indent_sm_kwargs is None:
- self.indent_sm_kwargs = self.nested_sm_kwargs
- if self.known_indent_sm is None:
- self.known_indent_sm = self.indent_sm
- if self.known_indent_sm_kwargs is None:
- self.known_indent_sm_kwargs = self.indent_sm_kwargs
-
- def add_initial_transitions(self):
- """
- Add whitespace-specific transitions before those defined in subclass.
-
- Extends `State.add_initial_transitions()`.
- """
- State.add_initial_transitions(self)
- if self.patterns is None:
- self.patterns = {}
- self.patterns.update(self.ws_patterns)
- names, transitions = self.make_transitions(
- self.ws_initial_transitions)
- self.add_transitions(names, transitions)
-
- def blank(self, match, context, next_state):
- """Handle blank lines. Does nothing. Override in subclasses."""
- return self.nop(match, context, next_state)
-
- def indent(self, match, context, next_state):
- """
- Handle an indented text block. Extend or override in subclasses.
-
- Recursively run the registered state machine for indented blocks
- (`self.indent_sm`).
- """
- indented, indent, line_offset, blank_finish = \
- self.state_machine.get_indented()
- sm = self.indent_sm(debug=self.debug, **self.indent_sm_kwargs)
- results = sm.run(indented, input_offset=line_offset)
- return context, next_state, results
-
- def known_indent(self, match, context, next_state):
- """
- Handle a known-indent text block. Extend or override in subclasses.
-
- Recursively run the registered state machine for known-indent indented
- blocks (`self.known_indent_sm`). The indent is the length of the
- match, ``match.end()``.
- """
- indented, line_offset, blank_finish = \
- self.state_machine.get_known_indented(match.end())
- sm = self.known_indent_sm(debug=self.debug,
- **self.known_indent_sm_kwargs)
- results = sm.run(indented, input_offset=line_offset)
- return context, next_state, results
-
- def first_known_indent(self, match, context, next_state):
- """
- Handle an indented text block (first line's indent known).
-
- Extend or override in subclasses.
-
- Recursively run the registered state machine for known-indent indented
- blocks (`self.known_indent_sm`). The indent is the length of the
- match, ``match.end()``.
- """
- indented, line_offset, blank_finish = \
- self.state_machine.get_first_known_indented(match.end())
- sm = self.known_indent_sm(debug=self.debug,
- **self.known_indent_sm_kwargs)
- results = sm.run(indented, input_offset=line_offset)
- return context, next_state, results
-
-
-class _SearchOverride:
-
- """
- Mix-in class to override `StateMachine` regular expression behavior.
-
- Changes regular expression matching, from the default `re.match()`
- (succeeds only if the pattern matches at the start of `self.line`) to
- `re.search()` (succeeds if the pattern matches anywhere in `self.line`).
- When subclassing a `StateMachine`, list this class **first** in the
- inheritance list of the class definition.
- """
-
- def match(self, pattern):
- """
- Return the result of a regular expression search.
-
- Overrides `StateMachine.match()`.
-
- Parameter `pattern`: `re` compiled regular expression.
- """
- return pattern.search(self.line)
-
-
-class SearchStateMachine(_SearchOverride, StateMachine):
- """`StateMachine` which uses `re.search()` instead of `re.match()`."""
- pass
-
-
-class SearchStateMachineWS(_SearchOverride, StateMachineWS):
- """`StateMachineWS` which uses `re.search()` instead of `re.match()`."""
- pass
-
-
-class ViewList:
-
- """
- List with extended functionality: slices of ViewList objects are child
- lists, linked to their parents. Changes made to a child list also affect
- the parent list. A child list is effectively a "view" (in the SQL sense)
- of the parent list. Changes to parent lists, however, do *not* affect
- active child lists. If a parent list is changed, any active child lists
- should be recreated.
-
- The start and end of the slice can be trimmed using the `trim_start()` and
- `trim_end()` methods, without affecting the parent list. The link between
- child and parent lists can be broken by calling `disconnect()` on the
- child list.
-
- Also, ViewList objects keep track of the source & offset of each item.
- This information is accessible via the `source()`, `offset()`, and
- `info()` methods.
- """
-
- def __init__(self, initlist=None, source=None, items=None,
- parent=None, parent_offset=None):
- self.data = []
- """The actual list of data, flattened from various sources."""
-
- self.items = []
- """A list of (source, offset) pairs, same length as `self.data`: the
- source of each line and the offset of each line from the beginning of
- its source."""
-
- self.parent = parent
- """The parent list."""
-
- self.parent_offset = parent_offset
- """Offset of this list from the beginning of the parent list."""
-
- if isinstance(initlist, ViewList):
- self.data = initlist.data[:]
- self.items = initlist.items[:]
- elif initlist is not None:
- self.data = list(initlist)
- if items:
- self.items = items
- else:
- self.items = [(source, i) for i in range(len(initlist))]
- assert len(self.data) == len(self.items), 'data mismatch'
-
- def __str__(self):
- return str(self.data)
-
- def __repr__(self):
- return '%s(%s, items=%s)' % (self.__class__.__name__,
- self.data, self.items)
-
- def __lt__(self, other): return self.data < self.__cast(other)
- def __le__(self, other): return self.data <= self.__cast(other)
- def __eq__(self, other): return self.data == self.__cast(other)
- def __ne__(self, other): return self.data != self.__cast(other)
- def __gt__(self, other): return self.data > self.__cast(other)
- def __ge__(self, other): return self.data >= self.__cast(other)
- def __cmp__(self, other): return cmp(self.data, self.__cast(other))
-
- def __cast(self, other):
- if isinstance(other, ViewList):
- return other.data
- else:
- return other
-
- def __contains__(self, item): return item in self.data
- def __len__(self): return len(self.data)
-
- # The __getitem__()/__setitem__() methods check whether the index
- # is a slice first, since indexing a native list with a slice object
- # just works.
-
- def __getitem__(self, i):
- if isinstance(i, types.SliceType):
- assert i.step in (None, 1), 'cannot handle slice with stride'
- return self.__class__(self.data[i.start:i.stop],
- items=self.items[i.start:i.stop],
- parent=self, parent_offset=i.start or 0)
- else:
- return self.data[i]
-
- def __setitem__(self, i, item):
- if isinstance(i, types.SliceType):
- assert i.step in (None, 1), 'cannot handle slice with stride'
- if not isinstance(item, ViewList):
- raise TypeError('assigning non-ViewList to ViewList slice')
- self.data[i.start:i.stop] = item.data
- self.items[i.start:i.stop] = item.items
- assert len(self.data) == len(self.items), 'data mismatch'
- if self.parent:
- self.parent[(i.start or 0) + self.parent_offset
- : (i.stop or len(self)) + self.parent_offset] = item
- else:
- self.data[i] = item
- if self.parent:
- self.parent[i + self.parent_offset] = item
-
- def __delitem__(self, i):
- try:
- del self.data[i]
- del self.items[i]
- if self.parent:
- del self.parent[i + self.parent_offset]
- except TypeError:
- assert i.step is None, 'cannot handle slice with stride'
- del self.data[i.start:i.stop]
- del self.items[i.start:i.stop]
- if self.parent:
- del self.parent[(i.start or 0) + self.parent_offset
- : (i.stop or len(self)) + self.parent_offset]
-
- def __add__(self, other):
- if isinstance(other, ViewList):
- return self.__class__(self.data + other.data,
- items=(self.items + other.items))
- else:
- raise TypeError('adding non-ViewList to a ViewList')
-
- def __radd__(self, other):
- if isinstance(other, ViewList):
- return self.__class__(other.data + self.data,
- items=(other.items + self.items))
- else:
- raise TypeError('adding ViewList to a non-ViewList')
-
- def __iadd__(self, other):
- if isinstance(other, ViewList):
- self.data += other.data
- else:
- raise TypeError('argument to += must be a ViewList')
- return self
-
- def __mul__(self, n):
- return self.__class__(self.data * n, items=(self.items * n))
-
- __rmul__ = __mul__
-
- def __imul__(self, n):
- self.data *= n
- self.items *= n
- return self
-
- def extend(self, other):
- if not isinstance(other, ViewList):
- raise TypeError('extending a ViewList with a non-ViewList')
- if self.parent:
- self.parent.insert(len(self.data) + self.parent_offset, other)
- self.data.extend(other.data)
- self.items.extend(other.items)
-
- def append(self, item, source=None, offset=0):
- if source is None:
- self.extend(item)
- else:
- if self.parent:
- self.parent.insert(len(self.data) + self.parent_offset, item,
- source, offset)
- self.data.append(item)
- self.items.append((source, offset))
-
- def insert(self, i, item, source=None, offset=0):
- if source is None:
- if not isinstance(item, ViewList):
- raise TypeError('inserting non-ViewList with no source given')
- self.data[i:i] = item.data
- self.items[i:i] = item.items
- if self.parent:
- index = (len(self.data) + i) % len(self.data)
- self.parent.insert(index + self.parent_offset, item)
- else:
- self.data.insert(i, item)
- self.items.insert(i, (source, offset))
- if self.parent:
- index = (len(self.data) + i) % len(self.data)
- self.parent.insert(index + self.parent_offset, item,
- source, offset)
-
- def pop(self, i=-1):
- if self.parent:
- index = (len(self.data) + i) % len(self.data)
- self.parent.pop(index + self.parent_offset)
- self.items.pop(i)
- return self.data.pop(i)
-
- def trim_start(self, n=1):
- """
- Remove items from the start of the list, without touching the parent.
- """
- if n > len(self.data):
- raise IndexError("Size of trim too large; can't trim %s items "
- "from a list of size %s." % (n, len(self.data)))
- elif n < 0:
- raise IndexError('Trim size must be >= 0.')
- del self.data[:n]
- del self.items[:n]
- if self.parent:
- self.parent_offset += n
-
- def trim_end(self, n=1):
- """
- Remove items from the end of the list, without touching the parent.
- """
- if n > len(self.data):
- raise IndexError("Size of trim too large; can't trim %s items "
- "from a list of size %s." % (n, len(self.data)))
- elif n < 0:
- raise IndexError('Trim size must be >= 0.')
- del self.data[-n:]
- del self.items[-n:]
-
- def remove(self, item):
- index = self.index(item)
- del self[index]
-
- def count(self, item): return self.data.count(item)
- def index(self, item): return self.data.index(item)
-
- def reverse(self):
- self.data.reverse()
- self.items.reverse()
- self.parent = None
-
- def sort(self, *args):
- tmp = zip(self.data, self.items)
- tmp.sort(*args)
- self.data = [entry[0] for entry in tmp]
- self.items = [entry[1] for entry in tmp]
- self.parent = None
-
- def info(self, i):
- """Return source & offset for index `i`."""
- try:
- return self.items[i]
- except IndexError:
- if i == len(self.data): # Just past the end
- return self.items[i - 1][0], None
- else:
- raise
-
- def source(self, i):
- """Return source for index `i`."""
- return self.info(i)[0]
-
- def offset(self, i):
- """Return offset for index `i`."""
- return self.info(i)[1]
-
- def disconnect(self):
- """Break link between this list and parent list."""
- self.parent = None
-
-
-class StringList(ViewList):
-
- """A `ViewList` with string-specific methods."""
-
- def trim_left(self, length, start=0, end=sys.maxint):
- """
- Trim `length` characters off the beginning of each item, in-place,
- from index `start` to `end`. No whitespace-checking is done on the
- trimmed text. Does not affect slice parent.
- """
- self.data[start:end] = [line[length:]
- for line in self.data[start:end]]
-
- def get_text_block(self, start, flush_left=0):
- """
- Return a contiguous block of text.
-
- If `flush_left` is true, raise `UnexpectedIndentationError` if an
- indented line is encountered before the text block ends (with a blank
- line).
- """
- end = start
- last = len(self.data)
- while end < last:
- line = self.data[end]
- if not line.strip():
- break
- if flush_left and (line[0] == ' '):
- source, offset = self.info(end)
- raise UnexpectedIndentationError(self[start:end], source,
- offset + 1)
- end += 1
- return self[start:end]
-
- def get_indented(self, start=0, until_blank=0, strip_indent=1,
- block_indent=None, first_indent=None):
- """
- Extract and return a StringList of indented lines of text.
-
- Collect all lines with indentation, determine the minimum indentation,
- remove the minimum indentation from all indented lines (unless
- `strip_indent` is false), and return them. All lines up to but not
- including the first unindented line will be returned.
-
- :Parameters:
- - `start`: The index of the first line to examine.
- - `until_blank`: Stop collecting at the first blank line if true.
- - `strip_indent`: Strip common leading indent if true (default).
- - `block_indent`: The indent of the entire block, if known.
- - `first_indent`: The indent of the first line, if known.
-
- :Return:
- - a StringList of indented lines with mininum indent removed;
- - the amount of the indent;
- - a boolean: did the indented block finish with a blank line or EOF?
- """
- indent = block_indent # start with None if unknown
- end = start
- if block_indent is not None and first_indent is None:
- first_indent = block_indent
- if first_indent is not None:
- end += 1
- last = len(self.data)
- while end < last:
- line = self.data[end]
- if line and (line[0] != ' '
- or (block_indent is not None
- and line[:block_indent].strip())):
- # Line not indented or insufficiently indented.
- # Block finished properly iff the last indented line blank:
- blank_finish = ((end > start)
- and not self.data[end - 1].strip())
- break
- stripped = line.lstrip()
- if not stripped: # blank line
- if until_blank:
- blank_finish = 1
- break
- elif block_indent is None:
- line_indent = len(line) - len(stripped)
- if indent is None:
- indent = line_indent
- else:
- indent = min(indent, line_indent)
- end += 1
- else:
- blank_finish = 1 # block ends at end of lines
- block = self[start:end]
- if first_indent is not None and block:
- block.data[0] = block.data[0][first_indent:]
- if indent and strip_indent:
- block.trim_left(indent, start=(first_indent is not None))
- return block, indent or 0, blank_finish
-
- def get_2D_block(self, top, left, bottom, right, strip_indent=1):
- block = self[top:bottom]
- indent = right
- for i in range(len(block.data)):
- block.data[i] = line = block.data[i][left:right].rstrip()
- if line:
- indent = min(indent, len(line) - len(line.lstrip()))
- if strip_indent and 0 < indent < right:
- block.data = [line[indent:] for line in block.data]
- return block
-
- def pad_double_width(self, pad_char):
- """
- Pad all double-width characters in self by appending `pad_char` to each.
- For East Asian language support.
- """
- if hasattr(unicodedata, 'east_asian_width'):
- east_asian_width = unicodedata.east_asian_width
- else:
- return # new in Python 2.4
- for i in range(len(self.data)):
- line = self.data[i]
- if isinstance(line, unicode):
- new = []
- for char in line:
- new.append(char)
- if east_asian_width(char) in 'WF': # 'W'ide & 'F'ull-width
- new.append(pad_char)
- self.data[i] = ''.join(new)
-
- def replace(self, old, new):
- """Replace all occurrences of substring `old` with `new`."""
- for i in range(len(self.data)):
- self.data[i] = self.data[i].replace(old, new)
-
-
-class StateMachineError(Exception): pass
-class UnknownStateError(StateMachineError): pass
-class DuplicateStateError(StateMachineError): pass
-class UnknownTransitionError(StateMachineError): pass
-class DuplicateTransitionError(StateMachineError): pass
-class TransitionPatternNotFound(StateMachineError): pass
-class TransitionMethodNotFound(StateMachineError): pass
-class UnexpectedIndentationError(StateMachineError): pass
-
-
-class TransitionCorrection(Exception):
-
- """
- Raise from within a transition method to switch to another transition.
-
- Raise with one argument, the new transition name.
- """
-
-
-class StateCorrection(Exception):
-
- """
- Raise from within a transition method to switch to another state.
-
- Raise with one or two arguments: new state name, and an optional new
- transition name.
- """
-
-
-def string2lines(astring, tab_width=8, convert_whitespace=0,
- whitespace=re.compile('[\v\f]')):
- """
- Return a list of one-line strings with tabs expanded, no newlines, and
- trailing whitespace stripped.
-
- Each tab is expanded with between 1 and `tab_width` spaces, so that the
- next character's index becomes a multiple of `tab_width` (8 by default).
-
- Parameters:
-
- - `astring`: a multi-line string.
- - `tab_width`: the number of columns between tab stops.
- - `convert_whitespace`: convert form feeds and vertical tabs to spaces?
- """
- if convert_whitespace:
- astring = whitespace.sub(' ', astring)
- return [s.expandtabs(tab_width).rstrip() for s in astring.splitlines()]
-
-def _exception_data():
- """
- Return exception information:
-
- - the exception's class name;
- - the exception object;
- - the name of the file containing the offending code;
- - the line number of the offending code;
- - the function name of the offending code.
- """
- type, value, traceback = sys.exc_info()
- while traceback.tb_next:
- traceback = traceback.tb_next
- code = traceback.tb_frame.f_code
- return (type.__name__, value, code.co_filename, traceback.tb_lineno,
- code.co_name)
diff --git a/emacs.d/nxhtml/tests/in/bug531328.rhtml b/emacs.d/nxhtml/tests/in/bug531328.rhtml
deleted file mode 100644
index b7e4b98..0000000
--- a/emacs.d/nxhtml/tests/in/bug531328.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<% foo %> <% bar %>
diff --git a/emacs.d/nxhtml/tests/in/bug532500.rhtml b/emacs.d/nxhtml/tests/in/bug532500.rhtml
deleted file mode 100644
index 308613b..0000000
--- a/emacs.d/nxhtml/tests/in/bug532500.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
- <tr>
- <td><%= f.label((t('app.views.large_surveys_admin.new.gift'))) %></td>
- <td><%= check_box_tag('gift',
- 'checked',
- !@large_survey.coupon_pool_id.nil?,
- {:onclick => "$('coupon_pool').toggle()"}) %></td>
- </tr>
diff --git a/emacs.d/nxhtml/tests/in/bug532759.djhtml b/emacs.d/nxhtml/tests/in/bug532759.djhtml
deleted file mode 100644
index e655dd2..0000000
--- a/emacs.d/nxhtml/tests/in/bug532759.djhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-{% if athlete_list %}
- <p>Here are the athletes: {{ athlete_list }}.</p>
-{% else %}
- <p>No athletes are available.</p>
- {% if coach_list %}
- <p>Here are the coaches: {{ coach_list }}.</p>
- {% endif %}
-{% endif %}
-{% block content %}
-
- {% if morning %}
- <p>Hello World!</p>
- {% else %}
- <p>Goodbye World!</p>
- {% endif %}
-
- {% endblock %}
diff --git a/emacs.d/nxhtml/tests/in/bug546027.html b/emacs.d/nxhtml/tests/in/bug546027.html
deleted file mode 100644
index f0c0eac..0000000
--- a/emacs.d/nxhtml/tests/in/bug546027.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
-
-<<<<<<< .working
-the code from my version bla bla bla...
-=======
-the version from the repo bla bla bla...
->>>>>>> .merge-right.r3379
-
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/bug552789-loremipsum.php b/emacs.d/nxhtml/tests/in/bug552789-loremipsum.php
deleted file mode 100644
index 67a3908..0000000
--- a/emacs.d/nxhtml/tests/in/bug552789-loremipsum.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
- <body>
- Lorem ipsum dolor sit amet, <?php echo 'consectetur adipisicing elit, sed do eiusmod'?> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
- veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
- commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
- velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
- occaecat cupidatat non proident, sunt in culpa qui officia deserunt
- mollit anim id est laborum.
- </body>
-</html> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/bug552789.php b/emacs.d/nxhtml/tests/in/bug552789.php
deleted file mode 100644
index eb3e856..0000000
--- a/emacs.d/nxhtml/tests/in/bug552789.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
-<p>
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- <?php
- fun();
- ?>
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
- Some text to wrap.
-</p>
diff --git a/emacs.d/nxhtml/tests/in/bug556832-error-test.py b/emacs.d/nxhtml/tests/in/bug556832-error-test.py
deleted file mode 100644
index e998eda..0000000
--- a/emacs.d/nxhtml/tests/in/bug556832-error-test.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- Python -*-
-
-
-"""
-===============
-This is a title
-===============
-
-This is some general description
-"""
-
-
-class SomeClass(object):
- """
- This is a class description.
- """
-
- def __init__(self, fileName):
- """The constructor."""
- pass
-
- def oneMethod():
- pass
diff --git a/emacs.d/nxhtml/tests/in/bug557700-2.erb b/emacs.d/nxhtml/tests/in/bug557700-2.erb
deleted file mode 100644
index c05eec3..0000000
--- a/emacs.d/nxhtml/tests/in/bug557700-2.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-var x = 1;
-<% @ruby_var.each do |v| %>
- alert(v);
- <% end %>
- var y = 2;
diff --git a/emacs.d/nxhtml/tests/in/bug557700-3.erb b/emacs.d/nxhtml/tests/in/bug557700-3.erb
deleted file mode 100644
index 13d57d8..0000000
--- a/emacs.d/nxhtml/tests/in/bug557700-3.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-var x = 1;
-var y = <%= v %>;
- var z = 4;
diff --git a/emacs.d/nxhtml/tests/in/bug557700-4.erb b/emacs.d/nxhtml/tests/in/bug557700-4.erb
deleted file mode 100644
index 148e9b4..0000000
--- a/emacs.d/nxhtml/tests/in/bug557700-4.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-var x = 1;
-for (i in l) {
-alert(i);
-}
-<% var.each do |v| %>
-alert(<%= v %>);
-<% end %>
-var z = 4;
-for (i in l) {
-alert(i);
-}
diff --git a/emacs.d/nxhtml/tests/in/bug557700-5.erb b/emacs.d/nxhtml/tests/in/bug557700-5.erb
deleted file mode 100644
index cfabef7..0000000
--- a/emacs.d/nxhtml/tests/in/bug557700-5.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<% if true %>
-alert(<%= v %>);
-alert(<%= w %>);
-<% end %>
diff --git a/emacs.d/nxhtml/tests/in/bug557700-6.erb b/emacs.d/nxhtml/tests/in/bug557700-6.erb
deleted file mode 100644
index 453f3e0..0000000
--- a/emacs.d/nxhtml/tests/in/bug557700-6.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-var x = "<%= x %>";
-var y = 5;
-
-Second line is treated as if it was a string.
-
-Problem with multiple lines inside ruby if:
-
-<% if b %>
- var x = 1;
-alert(1);
-<% end %>
diff --git a/emacs.d/nxhtml/tests/in/bug557700.erb b/emacs.d/nxhtml/tests/in/bug557700.erb
deleted file mode 100644
index e15c22e..0000000
--- a/emacs.d/nxhtml/tests/in/bug557700.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-var x = 1;
-<%= ruby_code %>
- var z = 3;
diff --git a/emacs.d/nxhtml/tests/in/bug559772-TextHelper.php b/emacs.d/nxhtml/tests/in/bug559772-TextHelper.php
deleted file mode 100644
index 0d3bffb..0000000
--- a/emacs.d/nxhtml/tests/in/bug559772-TextHelper.php
+++ /dev/null
@@ -1,205 +0,0 @@
-<?php
-
-/*
- * This file is part of the symfony package.
- * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
- * (c) 2004 David Heinemeier Hansson
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * TextHelper.
- *
- * @package symfony
- * @subpackage helper
- * @author Fabien Potencier <fabien.potencier@symfony-project.com>
- * @author David Heinemeier Hansson
- * @version SVN: $Id: TextHelper.php 3699 2007-04-02 11:47:32Z fabien $
- */
-
-/**
- * Truncates +text+ to the length of +length+ and replaces the last three characters with the +truncate_string+
- * if the +text+ is longer than +length+.
- */
-function truncate_text($text, $length = 30, $truncate_string = '...', $truncate_lastspace = false)
-{
- if ($text == '')
- {
- return '';
- }
-
- if (strlen($text) > $length)
- {
- $truncate_text = substr($text, 0, $length - strlen($truncate_string));
- if ($truncate_lastspace)
- {
- $truncate_text = preg_replace('/\s+?(\S+)?$/', '', $truncate_text);
- }
-
- return $truncate_text.$truncate_string;
- }
- else
- {
- return $text;
- }
-}
-
-/**
- * Highlights the +phrase+ where it is found in the +text+ by surrounding it like
- * <strong class="highlight">I'm a highlight phrase</strong>. The highlighter can be specialized by
- * passing +highlighter+ as single-quoted string with \1 where the phrase is supposed to be inserted.
- * N.B.: The +phrase+ is sanitized to include only letters, digits, and spaces before use.
- */
-function highlight_text($text, $phrase, $highlighter = '<strong class="highlight">\\1</strong>')
-{
- if ($text == '')
- {
- return '';
- }
-
- if ($phrase == '')
- {
- return $text;
- }
-
- return preg_replace('/('.preg_quote($phrase, '/').')/i', $highlighter, $text);
-}
-
-/**
- * Extracts an excerpt from the +text+ surrounding the +phrase+ with a number of characters on each side determined
- * by +radius+. If the phrase isn't found, nil is returned. Ex:
- * excerpt("hello my world", "my", 3) => "...lo my wo..."
- */
-function excerpt_text($text, $phrase, $radius = 100, $excerpt_string = '...')
-{
- if ($text == '' || $phrase == '')
- {
- return '';
- }
-
- $found_pos = strpos(strtolower($text), strtolower($phrase));
- if ($found_pos !== false)
- {
- $start_pos = max($found_pos - $radius, 0);
- $end_pos = min($found_pos + strlen($phrase) + $radius, strlen($text));
-
- $prefix = ($start_pos > 0) ? $excerpt_string : '';
- $postfix = $end_pos < strlen($text) ? $excerpt_string : '';
-
- return $prefix.substr($text, $start_pos, $end_pos - $start_pos).$postfix;
- }
-}
-
-/**
- * Word wrap long lines to line_width.
- */
-function wrap_text($text, $line_width = 80)
-{
- return preg_replace('/(.{1,'.$line_width.'})(\s+|$)/s', "\\1\n", preg_replace("/\n/", "\n\n", $text));
-}
-
-/*
- # Returns +text+ transformed into html using very simple formatting rules
- # Surrounds paragraphs with <tt>&lt;p&gt;</tt> tags, and converts line breaks into <tt>&lt;br /&gt;</tt>
- # Two consecutive newlines(<tt>\n\n</tt>) are considered as a paragraph, one newline (<tt>\n</tt>) is
- # considered a linebreak, three or more consecutive newlines are turned into two newlines
-*/
-function simple_format_text($text, $options = array())
-{
- $css = (isset($options['class'])) ? ' class="'.$options['class'].'"' : '';
-
- $text = sfToolkit::pregtr($text, array("/(\r\n|\r)/" => "\n", // lets make them newlines crossplatform
- "/\n{3,}/" => "\n\n", // zap dupes
- "/\n\n/" => "</p>\\0<p$css>", // turn two newlines into paragraph
- "/([^\n])\n([^\n])/" => "\\1\n<br />\\2")); // turn single newline into <br/>
-
- return '<p'.$css.'>'.$text.'</p>'; // wrap the first and last line in paragraphs before we're done
-}
-
-/**
- * Turns all urls and email addresses into clickable links. The +link+ parameter can limit what should be linked.
- * Options are :all (default), :email_addresses, and :urls.
- *
- * Example:
- * auto_link("Go to http://www.symfony-project.com and say hello to fabien.potencier@example.com") =>
- * Go to <a href="http://www.symfony-project.com">http://www.symfony-project.com</a> and
- * say hello to <a href="mailto:fabien.potencier@example.com">fabien.potencier@example.com</a>
- */
-function auto_link_text($text, $link = 'all', $href_options = array())
-{
- if ($link == 'all')
- {
- return _auto_link_urls(_auto_link_email_addresses($text), $href_options);
- }
- else if ($link == 'email_addresses')
- {
- return _auto_link_email_addresses($text);
- }
- else if ($link == 'urls')
- {
- return _auto_link_urls($text, $href_options);
- }
-}
-
-/*
- * Turns all links into words, like "<a href="something">else</a>" to "else".
- */
-function strip_links_text($text)
-{
- return preg_replace('/<a.*>(.*)<\/a>/m', '\\1', $text);
-}
-
-if (!defined('SF_AUTO_LINK_RE'))
-{
- define('SF_AUTO_LINK_RE', '~
- ( # leading text
- <\w+.*?>| # leading HTML tag, or
- [^=!:\'"/]| # leading punctuation, or
- ^ # beginning of line
- )
- (
- (?:https?://)| # protocol spec, or
- (?:www\.) # www.*
- )
- (
- [-\w]+ # subdomain or domain
- (?:\.[-\w]+)* # remaining subdomains or domain
- (?::\d+)? # port
- (?:/(?:(?:[\~\w\+%-]|(?:[,.;:][^\s$]))+)?)* # path
- (?:\?[\w\+%&=.;-]+)? # query string
- (?:\#[\w\-]*)? # trailing anchor
- )
- ([[:punct:]]|\s|<|$) # trailing text
- ~x');
-}
-
-/**
- * Turns all urls into clickable links.
- */
-function _auto_link_urls($text, $href_options = array())
-{
- $href_options = _tag_options($href_options);
- return preg_replace_callback(
- SF_AUTO_LINK_RE,
- create_function('$matches', '
- if (preg_match("/<a\s/i", $matches[1]))
- {
- return $matches[0];
- }
- else
- {
- return $matches[1].\'<a href="\'.($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3].\'"'.$href_options.'>\'.$matches[2].$matches[3].\'</a>\'.$matches[4];
- }
- ')
- , $text);
-}
-
-/**
- * Turns all email addresses into clickable links.
- */
-function _auto_link_email_addresses($text)
-{
- return preg_replace('/([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/', '<a href="mailto:\\1">\\1</a>', $text);
-}
diff --git a/emacs.d/nxhtml/tests/in/bug565595.mako b/emacs.d/nxhtml/tests/in/bug565595.mako
deleted file mode 100644
index 3444765..0000000
--- a/emacs.d/nxhtml/tests/in/bug565595.mako
+++ /dev/null
@@ -1,12 +0,0 @@
-<%!
- import sys
-%>
-<html>
- <head>
- <title>Test</title>
- </head>
- <body>
- </body>
-
-</html>
-
diff --git a/emacs.d/nxhtml/tests/in/bug568178.pl b/emacs.d/nxhtml/tests/in/bug568178.pl
deleted file mode 100644
index a454f4b..0000000
--- a/emacs.d/nxhtml/tests/in/bug568178.pl
+++ /dev/null
@@ -1,4 +0,0 @@
-print SOCKET << HTML or warn "Cannot write to socket: $!";
-<input type="text">html continues...
-
-HTML
diff --git a/emacs.d/nxhtml/tests/in/bug568178.sh b/emacs.d/nxhtml/tests/in/bug568178.sh
deleted file mode 100644
index ca5e2af..0000000
--- a/emacs.d/nxhtml/tests/in/bug568178.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-bteq << 'SQL part' | grep '\\$'| read start_dt_ya start_dt end_dt_ya end_dt
--- SQL code here
-select '$',start_date- '1 year', start_date ....
-SQL part
-
-bteq <<SQL | grep '\\$'| read start_dt_ya start_dt end_dt_ya end_dt
--- SQL code here
-select '$',start_date- '1 year', start_date ....
-SQL
diff --git a/emacs.d/nxhtml/tests/in/bug569742-master-end.html b/emacs.d/nxhtml/tests/in/bug569742-master-end.html
deleted file mode 100644
index 8e0419c..0000000
--- a/emacs.d/nxhtml/tests/in/bug569742-master-end.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-From EmacsWiki:
-
-I have chunk problems with 1.99. This works, it detects the PHP and JS chunks properly:
-
-<?
-
-
-$stuff = <<<EOTHTML
-
- <script type="text/javascript">
-
- //<![CDATA[
-
- var stuff;
-
- //]]>
- </script>
-
-EOTHTML;
-
-
-However if I don’t close the inner chunk before EOTHTML, because I want to add some conditional code after it in PHP then it thinks the part of the buffer after EOTHTML is still in JS mode which is not good:
-
-<?
-
-
-$stuff = <<<EOTHTML
-
- <script type="text/javascript">
-
- //<![CDATA[
-
- var stuff;
-
-EOTHTML;
-
diff --git a/emacs.d/nxhtml/tests/in/ch-2008-07-25-test.html.erb b/emacs.d/nxhtml/tests/in/ch-2008-07-25-test.html.erb
deleted file mode 100644
index 92b76fa..0000000
--- a/emacs.d/nxhtml/tests/in/ch-2008-07-25-test.html.erb
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<% @meta_keywords ||= nil -%>
-<% @meta_description ||= nil -%>
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <% unless @meta_keywords.blank? -%>
- <meta name="keywords" content="<%= @meta_keywords %>" />
- <% end -%>
- <% unless @meta_description.blank? -%>
- <meta name="description" content="<%= @meta_description %>" />
- <% end -%>
- <title><%= @page_title.blank? ? "Mysite" : "#{@page_title} : Mysite" %></title>
- <%= stylesheet_link_tag 'global', 'sem', :media => 'all' %>
- </head>
- <body>
- <div id="shadow">
- <div id="container">
-
- <div id="main" class="content">
- <%= yield %>
- </div>
- <table>
- This text is in the wrong place, but you have to apply a
- schema to get it marked as invalid.
- <%= yield %>
- </table>
-
- </div> <%# container %>
- </div> <%# shadow %>
- </body>
- <% if live_site? %>
- <%= render(:partial => 'shared/google_analytics') %>
- <% end %>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/chunks-in-chunks1.php b/emacs.d/nxhtml/tests/in/chunks-in-chunks1.php
deleted file mode 100644
index 007bc66..0000000
--- a/emacs.d/nxhtml/tests/in/chunks-in-chunks1.php
+++ /dev/null
@@ -1,19 +0,0 @@
-$a = <<<EOTHTML
-
-<p>stuff</p>
-
-EOTHTML;
-
-
-$b = <<<EOT
-
- <h2><a href="/">stuff</a></h2>
-
-EOT;
-
-$c = <<<EOT
-
-<button onclick="a()">test</button>
-
-
-EOT;
diff --git a/emacs.d/nxhtml/tests/in/chunks.html b/emacs.d/nxhtml/tests/in/chunks.html
deleted file mode 100644
index 62a3bf8..0000000
--- a/emacs.d/nxhtml/tests/in/chunks.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <script type="text/javascript">
- // <![CDATA[
- alert ("here");
- /*
- --------------------------------------------------------------------------
- Do not edit past this point unless you know what you are doing.
- --------------------------------------------------------------------------
- ===== BUG: THIS LINE IS BLACK ==========
- ===== BUG: THIS LINE IS BLACK ==========
- */
-
- addEvent(window, 'load', spamSpan);
-
- function spamSpan() {
- var allSpamSpans = getElementsByClass(spamSpanMainClass, document, 'span');
- for (var i = 0; i < allSpamSpans.length; i++) {
- // get data
- var user = getSpanValue(spamSpanUserClass, allSpamSpans[i]);
- var domain = getSpanValue(spamSpanDomainClass, allSpamSpans[i]);
- var anchorText = getSpanValue(spamSpanAnchorTextClass, allSpamSpans[i]);
- // prepare parameter data
- var paramValues = new Array();
- for (var j = 0; j < spamSpanParams.length; j++) {
- var paramSpanValue = getSpanValue(spamSpanParams[j], allSpamSpans[i]);
- if (paramSpanValue) {
- paramValues.push(spamSpanParams[j] + '=' +
- encodeURIComponent(paramSpanValue));
- }
- }
- // create new anchor tag
- var at = String.fromCharCode(32*2);
- var email = cleanSpan(user) + at + cleanSpan(domain);
- var anchorTagText = document.createTextNode(anchorText ? anchorText : email);
- var mto = String.fromCharCode(109,97,105,108,116,111,58);
- var hrefAttr = mto + email;
- hrefAttr += paramValues.length ? '?' + paramValues.join('&') : '';
- var anchorTag = document.createElement('a');
- anchorTag.className = spamSpanMainClass;
- anchorTag.setAttribute('href', hrefAttr);
- anchorTag.appendChild(anchorTagText);
- // replace the span with anchor
- allSpamSpans[i].parentNode.replaceChild(anchorTag, allSpamSpans[i]);
- }
- }
- // ]]>
- </script>
- <style type="text/css" media="all">
- /* <![CDATA[ */
- body {
- margin-left: 1px;
- /* ]]> */
- </style>
-
- </head>
- <body>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/cr-lf.el b/emacs.d/nxhtml/tests/in/cr-lf.el
deleted file mode 100644
index 0a7d06b..0000000
--- a/emacs.d/nxhtml/tests/in/cr-lf.el
+++ /dev/null
@@ -1,2 +0,0 @@
-;; This is just a test of cr-lf handling. Save this file with DOS
-;; cr-lf line endings and open it again.
diff --git a/emacs.d/nxhtml/tests/in/csr-080710-2.html b/emacs.d/nxhtml/tests/in/csr-080710-2.html
deleted file mode 100644
index bccc2f7..0000000
--- a/emacs.d/nxhtml/tests/in/csr-080710-2.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Title</title>
- <style type="text/css">
- body { background: #ccc; }
- p {
- color: white;
-
- }
- </style>
- </head>
- <body>
- <div id="container">
- <script type="text/javascript">
- var a = "aaa";
-
- function test () {
-
- }
- </script>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/csr-080710.html b/emacs.d/nxhtml/tests/in/csr-080710.html
deleted file mode 100644
index be99b8b..0000000
--- a/emacs.d/nxhtml/tests/in/csr-080710.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title></title>
- <link rel="Stylesheet" type="text/css" href="/style/style.css" media="all" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <style type="text/css" media="all">
-
- </style>
- </head>
- <body>
- <div id="container">
- <script type="text/javascript">
- var a = "aaa";
-
- function test () {
-
- }
- </script>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/cvd-080805-ac.php b/emacs.d/nxhtml/tests/in/cvd-080805-ac.php
deleted file mode 100644
index b951c75..0000000
--- a/emacs.d/nxhtml/tests/in/cvd-080805-ac.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-Zend_Loader::loadClass('Account','application/models');
-Zend_Loader::loadClass('Device','application/models');
-Zend_Loader::loadClass('Carrier','application/models');
-Zend_Loader::loadClass('DistributionChannel','application/models');
-
-/** Zend_Controller_Action */
-require_once 'Zend_Global_Controller_Action.php';
-
-class AccountController extends Zend_Global_Controller_Action
-{
- public function indexAction($errors = array())
- {
-
- $this->view->assign('errors',$errors);
- $this->view->assign('body','account_index.htm');
-echo $this->view->render('main_doc.htm');
-
- }
-}
diff --git a/emacs.d/nxhtml/tests/in/cvd-080805-cc.php b/emacs.d/nxhtml/tests/in/cvd-080805-cc.php
deleted file mode 100644
index 4394387..0000000
--- a/emacs.d/nxhtml/tests/in/cvd-080805-cc.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-Zend_Loader::loadClass("Category","application/models");
-Zend_Loader::loadClass("CategoryDisplayName","application/models");
-
-/** Zend_Controller_Action */
-require_once 'Zend_Global_Controller_Action.php';
-
-class CategoryController extends Zend_Global_Controller_Action
-{
- public function indexAction($notices = array(), $errors = array())
- {
-
- $request = $this->GetRequest();
- blah, etc.
- }
-}
-
diff --git a/emacs.d/nxhtml/tests/in/drechsler-080517-simple.xml b/emacs.d/nxhtml/tests/in/drechsler-080517-simple.xml
deleted file mode 100644
index 01b738d..0000000
--- a/emacs.d/nxhtml/tests/in/drechsler-080517-simple.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<data>
-</data>
diff --git a/emacs.d/nxhtml/tests/in/el-070424-duh.xml b/emacs.d/nxhtml/tests/in/el-070424-duh.xml
deleted file mode 100644
index 4e8b09a..0000000
--- a/emacs.d/nxhtml/tests/in/el-070424-duh.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<outermost>
- <inner1><inner2>
- <inner3>Duh</inner3>
- </inner2>
- </inner1>
-</outermost>
diff --git a/emacs.d/nxhtml/tests/in/el-070511-simple.html b/emacs.d/nxhtml/tests/in/el-070511-simple.html
deleted file mode 100644
index d56f53f..0000000
--- a/emacs.d/nxhtml/tests/in/el-070511-simple.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!-- Since this file is not xhtml, nxhtml won't indent it correctly.
- Therefore, turn on html mode before editing this file:
- M-x html-mode -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
- <HEAD>
- <TITLE>TDDB64 Avancerad programmering och interaktivitet på WWW</TITLE>
- <META content="text/html; charset=windows-1252" http-equiv=Content-Type>
- <META content="Microsoft FrontPage 4.0" name=GENERATOR>
-
-
- <SCRIPT language="javascript" type="text/javascript">
-
- </SCRIPT>
-
-
- </HEAD>
-
- <BODY bgColor="#ffffff">
- <P>
- <TABLE border=0 cellPadding=1 cellSpacing=0 width="100%">
- <TR>
- <TD align=CENTER bgColor="#ddffdd" width="15%">
- <IMG align=MIDDLE alt="IDA " border=0 hspace=4 src="http://www.ida.liu.se/~TDDB06/labs/dhtml/simple_files/Ida-logo-tr-mini.gif"> </TD>
- <TD width="1%">
- <TD width="84%">
-
- <B><A href="http://www.ida.liu.se/">Dept. of Computer and
- Information Science</A>, <A href="http://www.liu.se/">Linköping
- University</A></B> </TD>
- </TR>
- <TR>
- <TD align=CENTER bgColor="#ddffdd" vAlign=top width="15%"><BR><BR>
-
-
- <!-- -->
- <!-- The Menue list starts here -->
- <!-- -->
- <DL>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/index.shtm">Home</A></B>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/faq.shtml">FAQ</A></B>
- <DT><B><A
- href="http://www.ida.liu.se/~TDDB06/labs/index.shtml">Labs</A></B>
- <DT><B><A
- href="http://www.ida.liu.se/~TDDB06/fo2000.shtml">Lectures</A></B>
- <DT><B><A
- href="http://www.ida.liu.se/~TDDB06/news2000.shtml">News</A></B>
- <DT><B><A
- href="http://www.lith.liu.se:4019/schema/schema?period=period+3+99-00&amp;kurs=DDB06">Schedule</A></B>
-
- <DT><B><A
- href="http://www.ida.liu.se/~TDDB06/resources.shtml">Resources</A></B>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/staff.shtml">Staff</A></B>
-
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/other.shtml">Other</A></B>
-
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/"></A></B>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/"></A></B>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/"></A></B>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/"></A></B>
- <DT><B><A href="http://www.ida.liu.se/~TDDB06/"></A></B></DT>
-
- </DL>
- <!-- -->
- <!-- The Menue list ends here -->
- <!-- -->
-
-
- </TD>
- <TD width="1%">
- <TD width="84%">
-
-
-
- <!-- -->
- <!-- The page content starts here -->
- <!-- -->
- <img src="http://www.ida.liu.se/~TDDB06/const.gif" alt="JavaDude">
- This page is not under construction. It is supposed to look like this.
-
- <H1>TDDB64 Web Programming and Interactivity</H1>This
- course covers an overview of WWW, HTML, basic Java programming, and
- advanced Java programming. The course consists of a number of
- <EM>lectures, programming assignments,</EM> and a <EM>programming
- project,</EM> where the students practice advanced Java and WWW
- implementation techniques.
- <!-- -->
- <!-- The page content starts here -->
- <!-- -->
-
-
-
- </TD></TR>
- </TABLE>
- <HR>
- <p>
- <a href="http://validator.w3.org/check?uri=referer"><img
- src="http://www.w3.org/Icons/valid-html40"
- alt="Valid HTML 4.0 Transitional" height="31" width="88"></a>
- </p>
-
-</BODY></HTML>
diff --git a/emacs.d/nxhtml/tests/in/el-070602-index.php b/emacs.d/nxhtml/tests/in/el-070602-index.php
deleted file mode 100644
index f971b1a..0000000
--- a/emacs.d/nxhtml/tests/in/el-070602-index.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
- /* We must use this header to be correct and for the css validator to
- find our stylesheet without us having to provide a fully qualified
- path (address) to it. */
-header("Content-type:application/xhtml+xml; charset=utf-8");
-echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>';
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Lab 2 - Layout Control - Task 1 - XHTML/CSS version</title>
- <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
- </head>
- <body>
- <div id="container">
- <div id="header">Top area</div>
- <div id="left-menu">
- <ul>
- <li><a style="hej" href="index.php">Home</a></li>
- <li><a href="index.php?page=a">First Main Page</a></li>
- <li><a href="index.php?page=b">Second Main Page</a></li>
- </ul>
- </div>
- <div id="main">
- <?php
- if (isset($_GET['page'])) {
- $thepage = $_GET['page'];
-
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- }
- else {
- require('main-div-a.html');
- }
- ?>
- </div>
- <div id="footer">
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="valid-xhtml10.png" alt="Valid XHTML 1.0 Strict"></img>
- </a>
- <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
- <img src="vcss.png" alt="Valid CSS!"></img>
- </a>
- </p>
- </div>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/el-070604.html b/emacs.d/nxhtml/tests/in/el-070604.html
deleted file mode 100644
index 882e982..0000000
--- a/emacs.d/nxhtml/tests/in/el-070604.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Dummy</title>
- <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet();?>"/>
- </head>
- <body>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/el-070604.php b/emacs.d/nxhtml/tests/in/el-070604.php
deleted file mode 100644
index 45f7d7c..0000000
--- a/emacs.d/nxhtml/tests/in/el-070604.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Dummy</title>
- <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet();?>"/>
- </head>
- <body>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/el-070722-comment-error.php b/emacs.d/nxhtml/tests/in/el-070722-comment-error.php
deleted file mode 100644
index ff3bdf5..0000000
--- a/emacs.d/nxhtml/tests/in/el-070722-comment-error.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-/* this is a comment
- and it seems to work ok...
-*/
-?>
-
diff --git a/emacs.d/nxhtml/tests/in/el-070722-index-2.el b/emacs.d/nxhtml/tests/in/el-070722-index-2.el
deleted file mode 100644
index 05b18f1..0000000
--- a/emacs.d/nxhtml/tests/in/el-070722-index-2.el
+++ /dev/null
@@ -1,7 +0,0 @@
-(defun temp-el-070722 ()
- (remove-text-properties 1 25 '(syntax-table nil))
- (syntax-ppss-flush-cache -1)
- (setq syntax-ppss-last nil)
- (goto-char (point-min))
- (let ((parse-sexp-lookup-properties t)) (syntax-ppss 24))
- )
diff --git a/emacs.d/nxhtml/tests/in/el-070722-index-2.php b/emacs.d/nxhtml/tests/in/el-070722-index-2.php
deleted file mode 100644
index ff4dbf9..0000000
--- a/emacs.d/nxhtml/tests/in/el-070722-index-2.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Lab 2 - Layout Control - Task 2 - XHTML/CSS version</title>
- <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
- </head>
- <body>
- <div id="container">
- <div id="header">Top area</div>
- <div id="left-menu">
- <ul>
- <li><a href="index.php">Home</a></li>
- <li><a href="index.php?page=a">First Main Page</a></li>
- <li><a href="index.php?page=b">Second Main Page</a></li>
- </ul>
- </div>
- <div id="main">
- <?php
- if (isset($_GET["page"])) {
- $thepage = $_GET['page'];
-
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- }
- else {
- require('main-div-a.html');
- }
- ?>
- </div>
- <div id="right-menu">Right area</div>
- <div id="footer">
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="valid-xhtml10.png" alt="Valid XHTML 1.0 Strict"></img>
- </a>
- <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
- <img src="vcss.png" alt="Valid CSS!"></img>
- </a>
- </p>
- </div>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/el-070722-index-noheader.php b/emacs.d/nxhtml/tests/in/el-070722-index-noheader.php
deleted file mode 100644
index 34271ba..0000000
--- a/emacs.d/nxhtml/tests/in/el-070722-index-noheader.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/* We must use this header to be correct and for the css validator to
- find our stylesheet without us having to provide a fully qualified
- path (address) to it. */
-header("Content-type:application/xhtml+xml; charset=utf-8");
-echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>';
-?>
- <body>
- <div id="container">
- <div id="header">Top area</div>
- <div id="left-menu">
- <ul>
- <li><a href="index.php">Home</a></li>
- <li><a href="index.php?page=a">First Main Page</a></li>
- <li><a href="index.php?page=b">Second Main Page</a></li>
- </ul>
- </div>
- <div id="main">
- <?php
- if (isset($_GET["page"])) {
- $thepage = $_GET['page'];
-
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- }
- else {
- require('main-div-a.html');
- }
- ?>
- </div>
- <div id="right-menu">Right area</div>
- <div id="footer">
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="valid-xhtml10.png" alt="Valid XHTML 1.0 Strict"></img>
- </a>
- <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
- <img src="vcss.png" alt="Valid CSS!"></img>
- </a>
- </p>
- </div>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/el-070722-index.php b/emacs.d/nxhtml/tests/in/el-070722-index.php
deleted file mode 100644
index 1418da2..0000000
--- a/emacs.d/nxhtml/tests/in/el-070722-index.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/* We must use this header to be correct and for the css validator to
- find our stylesheet without us having to provide a fully qualified
- path (address) to it. */
-header("Content-type:application/xhtml+xml; charset=utf-8");
-echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>';
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Lab 2 - Layout Control - Task 2 - XHTML/CSS version</title>
- <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
- </head>
- <body>
- <div id="container">
- <div id="header">Top area</div>
- <div id="left-menu">
- <ul>
- <li><a href="index.php">Home</a></li>
- <li><a href="index.php?page=a">First Main Page</a></li>
- <li><a href="index.php?page=b">Second Main Page</a></li>
- </ul>
- </div>
- <div id="main">
- <?php
- if (isset($_GET["page"])) {
- $thepage = $_GET['page'];
-
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- }
- else {
- require('main-div-a.html');
- }
- ?>
- </div>
- <div id="right-menu">Right area</div>
- <div id="footer">
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="valid-xhtml10.png" alt="Valid XHTML 1.0 Strict"></img>
- </a>
- <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
- <img src="vcss.png" alt="Valid CSS!"></img>
- </a>
- </p>
- </div>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/el-071217-foo.html b/emacs.d/nxhtml/tests/in/el-071217-foo.html
deleted file mode 100644
index 32b7412..0000000
--- a/emacs.d/nxhtml/tests/in/el-071217-foo.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <frameset cols="50%, 50%">
- <frame src="about:blank" />
- <frame src="about:blank" />
- </frameset>
-</html>
-<!-- A comment -->
diff --git a/emacs.d/nxhtml/tests/in/emacswiki-080119.php b/emacs.d/nxhtml/tests/in/emacswiki-080119.php
deleted file mode 100644
index e4215a1..0000000
--- a/emacs.d/nxhtml/tests/in/emacswiki-080119.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
- /* There was a problem reported 2008-01-19 on
- http://www.emacswiki.org/cgi-bin/wiki/NxhtmlMode. The word
- INCLUDE was highlighted with a different color. However this
- should now work and the word APP_INCLUDE below should all be in
- font-lock-warning-face.
-
- FIXME: When deleting the first star the first time only the first
- part of the comment is affected.
- */
-
-define("APP_INCLUDE", "/home/app/include/"); include_once(APP_INCLUDE . "file.php");
-
-?>
diff --git a/emacs.d/nxhtml/tests/in/emacswiki-erb-bug.el b/emacs.d/nxhtml/tests/in/emacswiki-erb-bug.el
deleted file mode 100644
index 4e565ef..0000000
--- a/emacs.d/nxhtml/tests/in/emacswiki-erb-bug.el
+++ /dev/null
@@ -1,36 +0,0 @@
-;;; This file is from a link on EmacsWiki to http://paste.lisp.org/display/59495
-;;
-;; As far as I can see this is a ruby-mode bug, not a mumamo bug.
-
-;;; The problem is that when a ruby ERB template is loaded with an
-;;; after-hook that modifies the font-lock keywords, nxhtml causes
-;;; font-lock not to occur on strings and comments. What's more is
-;;; this affects regular ruby-mode as well, not just within mumamo.
-
-(require 'ruby-mode)
-
-;; Extra keyword fontification for ruby
-(defun emacswiki-erb-bug-keywords ()
- (font-lock-add-keywords nil
- '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\):"
- 1 font-lock-warning-face t))))
-
-;; Adding the extra keywords at the beginning of ruby-mode-hook breaks
-;; ruby-mode fontification (use the test case at the bottom):
-(add-hook 'ruby-mode-hook 'emacswiki-erb-bug-keywords)
-;; removing this hook makes it not break anymore:
-(remove-hook 'ruby-mode-hook 'emacswiki-erb-bug-keywords)
-;; However adding the extra keywords at the end of the hook works fine:
-(add-hook 'ruby-mode-hook 'emacswiki-erb-bug-keywords t)
-
-
-;; run this to test:
-(progn
- (find-file "bar.rb")
- (insert "# Comments should be font-locked, but are not.
-class Bar
- def baz
- \"strings should also be font-locked but are not.\"
- end
-end"))
-
diff --git a/emacs.d/nxhtml/tests/in/err-line38.html b/emacs.d/nxhtml/tests/in/err-line38.html
deleted file mode 100644
index 3a5182f..0000000
--- a/emacs.d/nxhtml/tests/in/err-line38.html
+++ /dev/null
@@ -1,768 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News and Notes about nXhtml</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home">
- <a href="nxhtml.html">To nXhtml main page</a>
- </p>
-
- <h1>News and Notes about nXhtml</h1>
-
- <dl>
-
- <dt id="hadron-bugs" style="margin-top:1em;">Thanks for testing!</dt>
- <dd>
- <p>
- I want to thanks the testers, especially Hadron Quark
- and Eric Lilja, for helping me by testing and pointing
- out bugs and weaknesses, most related to editing of PHP.
- </p>
- <p>
- It is quite a big job trying to get rid of smaller annoying bugs and bigger ones.
- In my mailbox folder for nXhtml I have more than 500 old messages currently.
- </p>
- </dd>
-
- <dt id="state-of-the-art" style="margin-top:1em;
- background-color: #00fa9a;
- background-color: #20b2aa;
- padding: 0.5em;
- ">The State of the Art</dt>
- <dd style="background-color: #54ff9f; padding: 0.5em">
- <p>
- I have more and more come to realize that there are two
- main parts of nXhtml which are in quite different
- degrees of maturity. The reason for the difference is
- mainly that one of them, <strong>mumamo-mode</strong>, requires
- very tight integration with Emacs in a way that
- currently is not completely possible. Some things must
- be changed in Emacs for this. There are also things to
- discover in the interactions with other minor modes for
- example.
- </p>
- <p>
- That said I still think mumamo-mode is mature enough for
- serious use (though it sometimes conflicts with some other modules).
- </p>
- <p>
- The other part, <strong>nxhtml-mode</strong>, is more mature,
- since it stands more by itself and since it builds on
- the very stable nxml-mode. I would not say nxhtml-mode
- is finished, but it is stable and useful.
- </p>
- </dd>
-
- <dt id="magic-problems" style="margin-top:1em;">Magic major mode selection</dt>
- <dd>
- <p>
- Sometimes the major mode that Emacs opens a file in is
- not what you expect. This can happen with files like PHP
- files. The reason might be that magic-mode-alist have
- choosen a mode based on the content of the file. The way
- this is done does not take files with mixes a mix of for
- example XHTML and PHP into account.
- </p>
- <p>
- You may try setting magic-mode-alist to nil if this is a
- problem for you.
- </p>
- <p>
- <em>
- This is now no longer necessary since the introduction
- of magic-fallback-mode-alist in CVS Emacs on 2007-05-16.
- (If you have an Emacs newer than that, of course.)
- </em>
- </p>
- </dd>
-
- <dt id="underline-bug" style="margin-top:1em;">Long Red Underlines</dt>
- <dd>
- <p>
- Because of a bug in Emacs 22.1 you can sometimes (at the
- end of a line) get long red lines instead of just a
- single underlined character. Many users (me included)
- find this quite a bit disturbing. I have therefore added
- a command to quickly hide/show the underlines. This is
- on <em>C-c C-w</em>.
- </p>
- <p>
- This is particular useful for example in the case where
- you edit a PHP file and are bound to get a lot of XHTML
- validation errors.
- </p>
- </dd>
-
- <dt id="php-attribute-values" style="margin-top:1em;">Attribute values computed by PHP</dt>
- <dd>
- <p>
- If you want to have attribute values computed by PHP
- here is a way how to structure that to avoid breaking
- completion and validation in the XHTML part unnessecary:
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&lt;?php foo(&quot;bar&quot;);?&gt;&quot;/>
- </p>
- <p>
- Unfortunately that still breaks XHTML validation since
- &lt; is not allowed in strings. In the long run I
- believe the XML validator has to be broken up so that it
- avoids parsing the string here (in PHP files).
- </p>
- <p>
- For now I have implemented a workaround.
- If you are using constructs like those above then turn on <em>nxhtml-strval-mode</em>.
- This will temporarily replace the above with
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&#171;?php foo(&quot;bar&quot;);?&#187;&quot;/>
- </p>
- <p>
- However on the screen you will still see the original
- string and when writing to file the correct characters
- will be used.
- </p>
- </dd>
-
- <dt id="pi-note" style="margin-top:1em;">A note for PHP and its cousins</dt>
- <dd>
- <p>
- The rules for a process instruction in XML, like &lt;?php
- ... ?&gt; says that the text can contain any text except
- <em>?&gt;</em>. So if you want to output that string
- from PHP then break it up so it does not look as ?&gt; in
- the source file.
- </p>
- <p>
- It might be good to break up the beginning part of the
- process instructions too. And please note that to use
- XHTML validation or completion you should avoid using
- &lt; in strings, since it is not allowed there.
- </p>
- </dd>
-
- <dt id="pi-note" style="margin-top:1em;">Perl Mode slow with Mumamo Mode</dt>
- <dd>
- <p>
- Perl mode used with MuMaMo mode sometimes makes the
- fontification slow for big files. I do not know the
- reason, but I am trying to find a solution for this. If
- you encounter this problem, just turn off mumamo-mode in
- that buffer.
- </p>
- </dd>
-
- <dt id="tab-width-problems" style="margin-top:1em;">Tab width</dt>
- <dd>
- <p>
- Do you have <em>tab-width</em> to something different than 8
- (the default)? Then please change this to 8. I have got
- reports of problem with indentation when it is not 8.
- </p>
- </dd>
-
- <dt id="mmm-compat" style="margin-top:1em;">Why the chunks are not compatible with mmm</dt>
- <dd>
- <p>
- Some people have asked why the way to specify chunks in
- mumamo-mode is not compatible with the old mmm-mode. The
- answer is that I was not sure that the way used in
- mmm-mode for specifying the chunks was flexible enough.
- </p>
- <p>
- And I am sure that even the way used in mumamo-mode is
- not good enough for all cases, but I let it be the way
- it is until I have a better understanding of the
- problem. Suggestions and comments are welcome!
- </p>
- </dd>
-
- </dl>
-
- <h1>nXhtml Changes</h1>
-
- <dl>
- <dt>0.89</dt>
- <dd>
- <ul>
- <li>
- Corrected autostart for nXhtml when not used together with EmacsW32.
- </li>
- </ul>
- </dd>
- <dt>0.90</dt>
- <dd>
- <ul>
- <li>
- Improved display of XML path.
- </li>
- <li>
- Discontinued xmple-mode.
- </li>
- <li>
- New major modes nxhtml-part-mode/nxml-part-mode replaces
- minor mode xmlpe-mode. (While moving the code to
- nxhtml-part.el I also fixed a bug in Xmple minor mode that
- made Emacs take 99% of the CPU.)
- </li>
- </ul>
- </dd>
- <dt>0.91</dt>
- <dd>
- <ul>
- <li>
- Fixed some calls to perl which prevented uploading of
- a site of you did not have perl in the same location
- as me.
- </li>
- <li>
- Glued together things so that editing PHP files works
- as I intended. (This means that Emacs switches between
- php-mode and nxhtml-part-mode automatically when
- moving point. And that you can use completion.)
- </li>
- <li>
- Starting working on the documentation for nXhtml.
- New layout to the documentation files.
- Examples with images.
- </li>
- </ul>
- </dd>
- <dt>0.92</dt>
- <dd>
- <ul>
- <li>
- Fixes to make the switching between php and xhtml
- style editing work better.
- </li>
- </ul>
- </dd>
- <dt>0.93</dt>
- <dd>
- <ul>
- <li>
- Better error handling when switching to editing
- embedded JavaScript and CSS.
- </li>
- <li>
- Removed PHP spec from embedded switching since they
- interfered with the automatic switching between php
- and xhtml.
- </li>
- <li>
- Gives an error message if web host is not defined in
- site when trying to use View Uploaded File and
- cousins.
- </li>
- <li>
- Gives a ready message when finished uploading a single
- file.
- </li>
- <li>
- When using Mode Switching at &lt;? ... ?&gt; mode
- switching could occur in wrong buffer. Fixed together
- with some other buffer problems.
- </li>
- </ul>
- </dd>
- <dt>0.94</dt>
- <dd>
- <ul>
- <li>
- Add http://www.w3.org/ to the help sites for CSS.
- </li>
- <li>
- Included a CSS mode.
- </li>
- <li>
- Added a menu entry for bug reporting.
- </li>
- <li>
- Renamed menu bar entry from XHTML to nXhtml for clarity.
- (But nXml menu bar entry is still called XML.)
- </li>
- <li>
- Added work around for globalized minor modes in the
- cases of MLinks, XML Path and mode switching at &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt>0.95</dt>
- <dd>
- <ul>
- <li>
- Added workaround for the problem with the first
- keyboard key after automatically switching of mode at
- &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt>0.96</dt>
- <dd>
- <ul>
- <li>
- Added support for multiple major modes with mumamo.el.
- </li>
- <li>
- More conventient handling of links. They can now be
- opened in the same window, 'other window' or in a new
- frame.
- </li>
- </ul>
- </dd>
- <dt>0.97</dt>
- <dd>
- <ul>
- <li>
- Schema was not setup after starting new page so
- completion did not work. Fixed.
- </li>
- <li>
- Added http://xhtml.com/ to help sites for XHTML.
- </li>
- <li>
- Added the concept of <em>XML validation headers</em>.
- These are just text parsed by the nXml validation
- parser to get a start state before starting parsing a
- buffer. This allows the use of the nXml completion in
- buffers where there are no XML header. Such a header
- is often lacking for example in PHP code since the
- XHTML header is often generated dynamically.
- </li>
- <li>
- Because of the change above <em>nxhtml-part-mode</em>
- is no longer needed and is therefore declared
- obsolete.
- </li>
- <li>
- Corrected a bug in mlinks.el that prevented opening an
- HTML link in a other window or a new frame.
- </li>
- <li>
- Added support for JSP, eRuby and some support for perl
- in mumamo.el.
- </li>
- </ul>
- </dd>
- <dt>0.98</dt>
- <dd id="v0.98">
- <ul>
- <li>
- Mumamo was not found when nXhtml was installed with
- just the zip file. Corrected. (nXhtml is also
- installed when you install EmacsW32.)
- </li>
- <li>
- Enhancement to mumamo error handling when a bad mode
- specifier for an embedded mode is found.
- </li>
- <li>
- Introduced a bug for empty XHTML documents in
- 0.97. Corrected.
- </li>
- <li>
- Corrected a bug for chunks 1 character long.
- </li>
- <li>
- There is what I consider is a bug in Emacs 22.1 in the
- handling of global minor mode that are not distributed
- with Emacs. If they are turned on by customization,
- but loaded after Emacs have loaded the customizations
- (usually in .emacs) then they are not turned on
- correctly. Added work-around for this.
- </li>
- <li>
- <em>Extra XHTML Validation Header</em>:
- <ul>
- <li>
- <em>Extra XHTML Validation Header</em> state was not saved when moving between chunks. Fixed.
- </li>
- <li>
- Tried to make the concept of <em>Extra XHTML Validation Header</em>
- more clear. Added this visually to the buffer.
- </li>
- <li>
- <em>Extra XHTML Validation Headers</em> can now be turned on
- automatically based on file name.
- </li>
- </ul>
- </li>
- <li>
- <em>nXhtml menu:</em>
- <ul>
- <li>
- Reorganized the nXhtml menu.
- </li>
- <li>
- Added <em>customization</em> groups for help libraries to nXhtml.
- </li>
- <li>
- Added an entry for customization of nXhtml to the menus.
- </li>
- <li>
- Added <em>Tidy</em> to the menus again.
- </li>
- </ul>
- </li>
- <li>
- Corrected bug in <em>XML Path</em> (nxml-where) for single tags.
- Other small fixes to nxhtml-where.
- </li>
- <li>
- Documentation enhancements.
- Added <em>The Quick Guide</em>.
- </li>
- </ul>
- </dd>
- <dt>0.99</dt>
- <dd id="v0.99">
- <ul>
- <li>
- Fixed a serious bug in the cooperation between nxhtml-mode and mumamo-mode.
- </li>
- <li>
- Turn on mumamo-mode by file name (mumamo-global-mode).
- </li>
- <li>
- Extra XHTML Validation Header:
- <ul>
- <li>
- The Extra XHTML Validation Header state were not saved when changing major mode in MuMaMo. Corrected.
- </li>
- <li>
- Added more alternatives to the Extra XHTML Validation Header list.
- This should make it easier to use completion with for example PHP.
- </li>
- <li>
- Added default value for the Extra XHTML Validation Header.
- </li>
- <li>
- Tried to make the use of Extra XHTML Validation Header more automatic and therefore useful.
- Also tried to make it play better with setting schema file.
- (There is no need normally to set schema file by hand.)
- </li>
- <li>
- To turn this on by default customize nxhtml-global-validation-header-mode.
- </li>
- </ul>
- </li>
- <li>
- Possible to hide validation warnings without turning
- on validation (which would make completion in the
- XHTML part impossible).
- </li>
- <li>
- Some fixes to php-mode:
- <ul>
- <li>Using the character # for comments now works for most cases.</li>
- <li>Now uses the fontification faces in a more standard way which calms down the look.</li>
- <li>Initialization bug fixes.</li>
- <li>Renamed php-mode-user-hook to php-mode-hook to follow standard.</li>
- </ul>
- </li>
- <li>
- Indentation fixes:
- <ul>
- <li>
- Various corrections to indentation in mumamo.
- </li>
- <li>
- Added the possibility to use TAB to indent regions
- (indent-region-mode).
- </li>
- <li>
- Warn about bad indentation in mixed PHP/HTML code
- when using php-mode only.
- </li>
- </ul>
- </li>
- <li>
- Fontification now fontifies all text first in main
- major mode and thereafter applies submodes. (This
- avoids some problems with around a submode chunk.)
- </li>
- <li>
- Reorganized the nXhtml menu:
- <ul>
- <li>
- There is now a minor mode for the nXhtml
- menu. This makes it possible to easier use common
- features when in buffers not in nxhtml-mode.
- </li>
- <li>
- The nXhtml menu does not disappear when moving
- into a chunk where the major mode is not
- nxhtml-mode. The changes also makes it easy to
- access uploading functions functions etc from
- other modes than nxhtml-mode since the
- <em>nXhtml</em> may also be shown in them.
- </li>
- <li>
- The nXhtml menu can be turned on globally by default.
- Customize nxhtml-menu-mode for that.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt>1.00</dt>
- <dd id="v1.00">
- <ul>
- <li>
- Reached version number 1.00 - which you maybe believe
- means the bugs should be gone? Sorry, it is just that
- I ran out of version numbers ;-) However it looks like
- much fewer bugs at least.
- </li>
- <li>
- Fixed problems mostly related to global turn on of different features in nXhtml.
- </li>
- <li>
- Small fixes to indentation.
- <ul>
- <li>
- nxhtml-mode could get confused by php tags.
- </li>
- <li>
- nxhtml-mode did not indent &lt;!DOCTYPE in a sensible way.
- </li>
- <li>
- Electric keys now works in embedded php when using mumamo-mode.
- </li>
- </ul>
- </li>
- <li>
- Tidy was very misbehaving since the output buffer was
- not erased between different files. But I have got no
- bug reports on this ;-)
- </li>
- <li>
- Fixed a bug in validation that should up when using muamo-mode.
- </li>
- <li>
- Fixed bug in &lt;script ...> and &lt;style ...> chunk dividing.
- </li>
- <li>
- Added support for OpenLaszlo.
- </li>
- <li>
- Corrections to mlinks-mode (visible mostly as links in
- XHTML buffers):
- <ul>
- <li>
- Links disappeared when a new file was
- opened. Corrected.
- </li>
- <li>
- Links were not correctly updated at changes in the
- buffer when mumamo-mode was used. Fixed.
- </li>
- </ul>
- </li>
- <li>
- The welcome message for nXhtml could be shown too
- early sometimes when loading, before nXhtml actually
- knew if it should be shown or not. Tried to fix it.
- </li>
- </ul>
- </dd>
- <dt>1.01</dt>
- <dd id="v1.01">
- <ul>
- <li>
- Reported wrong version number for nXhtml in the menus. Fixed.
- </li>
- <li>
- <em>If you use the zip file to install nXhtml please
- notice that it has now a top level nxml.</em> Sorry for not
- having zipped it like that before!
- </li>
- <li>
- The url links in <em>Welcome to nXhtml</em> was a bit
- incorrect and did not work on all OS:es. Fixed.
- </li>
- <li>
- Added customization of popup completion to the 'nxhtml
- customization group so they are easier to find.
- </li>
- <li>
- MuMaMo
- <ul>
- <li>
- Struggled a bit with the load sequences of the elisp
- libraries used by nXhtml when using MuMaMo.
- </li>
- <li>
- Tried to get the global turn on of mumam-mode to work
- in all cases.
- </li>
- <li>
- The screen was blinking when changing overlays after
- changes in the buffer. Tried to fix this.
- </li>
- <li>
- Minor fixes do syntax highlighting, like taking care of single ':s.
- </li>
- <li>
- Fixes to the support for JSP and eRuby.
- </li>
- <li>
- Made the support for perl here documents a bit better.
- Large perl documents are however still quite slow when
- using mumamo-mode. I do not know the reason yet.
- </li>
- <li>
- Refontification could miss some parts when buffer
- changes caused chunk division changes. Complex,
- tried to fix it, but I am a bit unsure that it
- always works.
- </li>
- <li>
- Cleaned up mumamo.el a bit.
- </li>
- <li>
- Rewrote mumamo-test.el and functions called from it in
- mumamo.el a bit to make tracebacks from errors more
- useful. Changed keybindings in mumamo-test.el from
- global to a minor mode <em>mumamo-test-mode</em>.
- Renamed mumamo-notest.el to mumamo-test.el. Added it
- to the zipped distribution of nXhtml.
- </li>
- </ul>
- </li>
- <li>
- Fixed a bug related to links and buffer changes.
- </li>
- </ul>
- </dd>
- <dt>1.02</dt>
- <dd id="v1.02">
- <ul>
- <li>
- Fixed a refontification bug that occured after changes.
- </li>
- </ul>
- </dd>
- <dt>1.03</dt>
- <dd id="v1.03">
- <ul>
- <li>
- Added the possibility to call GIMP.
- </li>
- <li>
- Reworked the messages for fontification errors to try
- to catch an error that shows up sometimes. Tried to
- avoid disturbing normal use in spite of that error.
- </li>
- <li>
- Reverted to using a short delay before switching major
- mode when moving between buffers.
- </li>
- </ul>
- </dd>
- <dt>1.04</dt>
- <dd id="v1.04">
- <ul>
- <li>
- Completion in empty buffers with a completion header
- did not work. Fixed.
- </li>
- <li>
- Multiple major modes:
- <ul>
- <li>
- Better error tracing for some functions.
- </li>
- <li>
- Position was garbled when a ;-char was inserted in php-mode chunk. Fixed.
- </li>
- </ul>
- </li>
- <li>
- Extra XHTML Validation Header:
- <ul>
- <li>
- View File did not work correctly when an extra
- XHTML validation header was used. Corrected.
- </li>
- <li>
- Extra XHTML validation headers are no longer
- turned on by default in any buffers.
- </li>
- </ul>
- </li>
- <li>
- Tried to fix a problem when using newline-and-indent.
- When this was in a mode derived from C the indentation
- sometimes became 0.
- </li>
- <li>
- Added a workaround for <a
- href="#php-attribute-values">Attribute values computed
- by PHP</a>
- </li>
- <li>
- Ruby
- <ul>
- <li>
- Multiple major mode turned on by default for .rhtml files when this mode is global.
- </li>
- <li>
- Multiple major mode is no longer turned on when rub-mode is turned on.
- </li>
- </ul>
- </li>
- <li>
- Added .nosearch to subdirectories with no elisp files.
- </li>
- <li>
- Added support for Firefox add-on It's All Text.
- </li>
- <li>
- Added the possibility to easily view the output of scripts on the server (if they require no parameters).
- You can now do that from the nXhtml menu.
- Previously only html files on the server could be viewed that way.
- Image files can also be viewed this way.
- </li>
- <li>
- Upgraded htmlize.el to version 1.34
- </li>
- <li>
- Added functions for unfilling.
- </li>
- <li>
- Added keybindings and menu entries for longlines-mode, fill-paragraph and unfill-paragraph.
- </li>
- <li>
- Added image-mode to those that are encompassed by
- nxhtml-global-minor-mode so that images can be
- uploaded more easily.
- </li>
- <li>
- Added <em>edit with GIMP</em> and <em>upload</em> to the popup menu for links.
- This avoids the need to load the linked files in Emacs first.
- </li>
- <li>
- Fixed incorrect checks for mlinks-mode in menu building.
- </li>
- </ul>
- </dd>
- </dl>
- </div>
- </div>
-
- <hr class="footer"/>
- <p class="footer">
- Copyright &copy; 2007 OurComments.org
- --
- Latest update 2007-05-06
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/eval-in-html.el b/emacs.d/nxhtml/tests/in/eval-in-html.el
deleted file mode 100644
index 33bb9e9..0000000
--- a/emacs.d/nxhtml/tests/in/eval-in-html.el
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/tests/in/fontif-err.html b/emacs.d/nxhtml/tests/in/fontif-err.html
deleted file mode 100644
index 6f71efa..0000000
--- a/emacs.d/nxhtml/tests/in/fontif-err.html
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>nXhtml Notes and Changes</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home">
- <a href="nxhtml.html">To nXhtml main page</a>
- </p>
-
- <h1>nXhtml Notes and Bugs</h1>
-
- <dl>
-<!-- <dt id="bugs-affect-mode-switching">Two Emacs 22 beta bugs affects PHP mode switching</dt> -->
-<!-- <dd> -->
-<!-- <p> -->
-<!-- <a href="nxhtml.html#php">PHP / nXhtml automatic mode switching</a> is affected: -->
-<!-- </p> -->
-<!-- <ul> -->
-<!-- <li> -->
-<!-- Because of a bug in Emacs 22 beta you may have to turn -->
-<!-- off and on the switch <em>Mode Switching at &lt;? -->
-<!-- ... ?></em> in the menus to get the automatic mode -->
-<!-- switching to start. -->
-<!-- <em>(Work around added in 0.94)</em> -->
-<!-- </li> -->
-<!-- <li> -->
-<!-- There is the same problem with showing XML path. -->
-<!-- <em>(Work around added in 0.94)</em> -->
-<!-- </li> -->
-<!-- <li> -->
-<!-- It also affects MLinks. -->
-<!-- <em>(Work around added in 0.94)</em> -->
-<!-- </li> -->
-<!-- <li> -->
-<!-- Because of another bug in Emacs 22 beta immediately -->
-<!-- after mode the automatic mode switching the keyboard -->
-<!-- uses the key bindings from the <em>wrong mode for the -->
-<!-- first key</em>. Type any key on the keyboard, that -->
-<!-- cures it. -->
-<!-- <em>(Work around added in 0.95)</em> -->
-<!-- </li> -->
-<!-- </ul> -->
-<!-- </dd> -->
- <dt id="new-mode-switching" style="margin-top:1em;">I have rewritten the PHP mode switching</dt>
- <dd>
- <p>
- Because of some (fair) critique I have gotten about the way mode switching between php-mode and nxhtml-mode works
- I have rewritten that part.
- The new mode switching also includes embedded css, javascript, eRuby and JSP.
- </p>
- </dd>
- <dt id="hadron-bugs" style="margin-top:1em;">A lot of bugs corrected for version 0.98</dt>
- <dd>
- <p>
- I want to thanks Hadron Quark for helping me by testing
- and pointing out bugs and weaknesses, most related to
- editing of PHP. I have included fixes for many of them
- in version 0.98 and more may follow.
- </p>
- </dd>
- </dl>
-
- <h1>nXhtml Changes</h1>
-
- <dl>
- <dt>0.89</dt>
- <dd>
- <ul>
- <li>
- Corrected autostart for nXhtml when not used together with EmacsW32.
- </li>
- </ul>
- </dd>
- <dt>0.90</dt>
- <dd>
- <ul>
- <li>
- Improved display of XML path.
- </li>
- <li>
- Discontinued xmple-mode.
- </li>
- <li>
- New major modes nxhtml-part-mode/nxml-part-mode replaces
- minor mode xmlpe-mode. (While moving the code to
- nxhtml-part.el I also fixed a bug in Xmple minor mode that
- made Emacs take 99% of the CPU.)
- </li>
- </ul>
- </dd>
- <dt>0.91</dt>
- <dd>
- <ul>
- <li>
- Fixed some calls to perl which prevented uploading of
- a site of you did not have perl in the same location
- as me.
- </li>
- <li>
- Glued together things so that editing PHP files works
- as I intended. (This means that Emacs switches between
- php-mode and nxhtml-part-mode automatically when
- moving point. And that you can use completion.)
- </li>
- <li>
- Starting working on the documentation for nXhtml.
- New layout to the documentation files.
- Examples with images.
- </li>
- </ul>
- </dd>
- <dt>0.92</dt>
- <dd>
- <ul>
- <li>
- Fixes to make the switching between php and xhtml
- style editing work better.
- </li>
- </ul>
- </dd>
- <dt>0.93</dt>
- <dd>
- <ul>
- <li>
- Better error handling when switching to editing
- embedded JavaScript and CSS.
- </li>
- <li>
- Removed PHP spec from embedded switching since they
- interfered with the automatic switching between php
- and xhtml.
- </li>
- <li>
- Gives an error message if web host is not defined in
- site when trying to use View Uploaded File and
- cousins.
- </li>
- <li>
- Gives a ready message when finished uploading a single
- file.
- </li>
- <li>
- When using Mode Switching at &lt;? ... ?> mode
- switching could occur in wrong buffer. Fixed together
- with some other buffer problems.
- </li>
- </ul>
- </dd>
- <dt>0.94</dt>
- <dd>
- <ul>
- <li>
- Add http://www.w3.org/ to the help sites for CSS.
- </li>
- <li>
- Included a CSS mode.
- </li>
- <li>
- Added a menu entry for bug reporting.
- </li>
- <li>
- Renamed menu bar entry from XHTML to nXhtml for clarity.
- (But nXml menu bar entry is still called XML.)
- </li>
- <li>
- Added work around for globalized minor modes in the
- cases of MLinks, XML Path and mode switching at &lt;? ... ?>.
- </li>
- </ul>
- </dd>
- <dt>0.95</dt>
- <dd>
- <ul>
- <li>
- Added workaround for the problem with the first
- keyboard key after automatically switching of mode at
- &lt;? ... ?>.
- </li>
- </ul>
- </dd>
- <dt>0.96</dt>
- <dd>
- <ul>
- <li>
- Added support for multiple major modes with mumamo.el.
- </li>
- <li>
- More conventient handling of links. They can now be
- opened in the same window, 'other window' or in a new
- frame.
- </li>
- </ul>
- </dd>
- <dt>0.97</dt>
- <dd>
- <ul>
- <li>
- Schema was not setup after starting new page so
- completion did not work. Fixed.
- </li>
- <li>
- Added http://xhtml.com/ to help sites for XHTML.
- </li>
- <li>
- Added the concept of <em>XML validation headers</em>.
- These are just text parsed by the nXml validation
- parser to get a start state before starting parsing a
- buffer. This allows the use of the nXml completion in
- buffers where there are no XML header. Such a header
- is often lacking for example in PHP code since the
- XHTML header is often generated dynamically.
- </li>
- <li>
- Because of the change above <em>nxhtml-part-mode</em>
- is no longer needed and is therefore declared
- obsolete.
- </li>
- <li>
- Corrected a bug in mlinks.el that prevented opening an
- HTML link in a other window or a new frame.
- </li>
- <li>
- Added support for JSP, eRuby and some support for perl
- in mumamo.el.
- </li>
- </ul>
- </dd>
- <dt>0.98</dt>
- <dd id="0.98">
- <ul>
- <li>
- Mumamo was not found when nXhtml was installed with
- just the zip file. Corrected. (nXhtml is also
- installed when you install EmacsW32.)
- </li>
- <li>
- Enhancement to mumamo error handling when a bad mode
- specifier for an embedded mode is found.
- </li>
- <li>
- Introduced a bug for empty XHTML documents in
- 0.97. Corrected.
- </li>
- <li>
- Corrected a bug for chunks 1 character long.
- </li>
- <li>
- There is a bug in Emacs 22 in the handling of global
- minor mode that are not distributed with Emacs. If
- they are turned on by customization, but loaded after
- Emacs have loaded the customizations (usually in
- .emacs) then they are not turned on correctly. Added
- work-around for this.
- </li>
- <li>
- <em>Extra XHTML Validation Header</em>:
- <ul>
- <li>
- <em>Extra XHTML Validation Header</em> state was not saved when moving between chunks. Fixed.
- </li>
- <li>
- Tried to make the concept of <em>Extra XHTML Validation Header</em>
- more clear. Added this visually to the buffer.
- </li>
- <li>
- <em>Extra XHTML Validation Headers</em> can now be turned on
- automatically based on file name.
- </li>
- </ul>
- </li>
- <li>
- <em>nXhtml menu:</em>
- <ul>
- <li>
- Reorganized the nXhtml menu.
- </li>
- <li>
- Added <em>customization</em> groups for help libraries to nXhtml.
- </li>
- <li>
- Added an entry for customization of nXhtml to the menus.
- </li>
- <li>
- Added <em>Tidy</em> to the menus again.
- </li>
- </ul>
- </li>
- <li>
- Corrected bug in <em>XML Path</em> (nxml-where) for single tags.
- Other small fixes to nxhtml-where.
- </li>
- <li>
- Documentation enhancements.
- Added <em>The Quick Guide</em>.
- </li>
- <li>
- </li>
- </ul>
- </dd>
- <dt>0.99</dt>
- <dd id="0.99">
- <ul>
- <li>
- Corrections to indentation.
- </li>
- <li>
- Turn on mumamo-mode by file name.
- </li>
- <li>
- The Extra XHTML Validation Header state were not saved when changing major mode in MuMaMo. Corrected.
- </li>
- <li>
- Added more alternatives to the Extra XHTML Validation Header list.
- This should make it easier to use completion with for example PHP.
- </li>
- <li>
- Added default value for the Extra XHTML Validation Header.
- </li>
- </ul>
- </dd>
- </dl>
- </div>
- </div>
-
- <hr class="footer"/>
- <p class="footer">
- Copyright &copy; 2007 OurComments.org
- --
- Latest update 2007-04-11
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/fontif-err.php b/emacs.d/nxhtml/tests/in/fontif-err.php
deleted file mode 100644
index 6f71efa..0000000
--- a/emacs.d/nxhtml/tests/in/fontif-err.php
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>nXhtml Notes and Changes</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home">
- <a href="nxhtml.html">To nXhtml main page</a>
- </p>
-
- <h1>nXhtml Notes and Bugs</h1>
-
- <dl>
-<!-- <dt id="bugs-affect-mode-switching">Two Emacs 22 beta bugs affects PHP mode switching</dt> -->
-<!-- <dd> -->
-<!-- <p> -->
-<!-- <a href="nxhtml.html#php">PHP / nXhtml automatic mode switching</a> is affected: -->
-<!-- </p> -->
-<!-- <ul> -->
-<!-- <li> -->
-<!-- Because of a bug in Emacs 22 beta you may have to turn -->
-<!-- off and on the switch <em>Mode Switching at &lt;? -->
-<!-- ... ?></em> in the menus to get the automatic mode -->
-<!-- switching to start. -->
-<!-- <em>(Work around added in 0.94)</em> -->
-<!-- </li> -->
-<!-- <li> -->
-<!-- There is the same problem with showing XML path. -->
-<!-- <em>(Work around added in 0.94)</em> -->
-<!-- </li> -->
-<!-- <li> -->
-<!-- It also affects MLinks. -->
-<!-- <em>(Work around added in 0.94)</em> -->
-<!-- </li> -->
-<!-- <li> -->
-<!-- Because of another bug in Emacs 22 beta immediately -->
-<!-- after mode the automatic mode switching the keyboard -->
-<!-- uses the key bindings from the <em>wrong mode for the -->
-<!-- first key</em>. Type any key on the keyboard, that -->
-<!-- cures it. -->
-<!-- <em>(Work around added in 0.95)</em> -->
-<!-- </li> -->
-<!-- </ul> -->
-<!-- </dd> -->
- <dt id="new-mode-switching" style="margin-top:1em;">I have rewritten the PHP mode switching</dt>
- <dd>
- <p>
- Because of some (fair) critique I have gotten about the way mode switching between php-mode and nxhtml-mode works
- I have rewritten that part.
- The new mode switching also includes embedded css, javascript, eRuby and JSP.
- </p>
- </dd>
- <dt id="hadron-bugs" style="margin-top:1em;">A lot of bugs corrected for version 0.98</dt>
- <dd>
- <p>
- I want to thanks Hadron Quark for helping me by testing
- and pointing out bugs and weaknesses, most related to
- editing of PHP. I have included fixes for many of them
- in version 0.98 and more may follow.
- </p>
- </dd>
- </dl>
-
- <h1>nXhtml Changes</h1>
-
- <dl>
- <dt>0.89</dt>
- <dd>
- <ul>
- <li>
- Corrected autostart for nXhtml when not used together with EmacsW32.
- </li>
- </ul>
- </dd>
- <dt>0.90</dt>
- <dd>
- <ul>
- <li>
- Improved display of XML path.
- </li>
- <li>
- Discontinued xmple-mode.
- </li>
- <li>
- New major modes nxhtml-part-mode/nxml-part-mode replaces
- minor mode xmlpe-mode. (While moving the code to
- nxhtml-part.el I also fixed a bug in Xmple minor mode that
- made Emacs take 99% of the CPU.)
- </li>
- </ul>
- </dd>
- <dt>0.91</dt>
- <dd>
- <ul>
- <li>
- Fixed some calls to perl which prevented uploading of
- a site of you did not have perl in the same location
- as me.
- </li>
- <li>
- Glued together things so that editing PHP files works
- as I intended. (This means that Emacs switches between
- php-mode and nxhtml-part-mode automatically when
- moving point. And that you can use completion.)
- </li>
- <li>
- Starting working on the documentation for nXhtml.
- New layout to the documentation files.
- Examples with images.
- </li>
- </ul>
- </dd>
- <dt>0.92</dt>
- <dd>
- <ul>
- <li>
- Fixes to make the switching between php and xhtml
- style editing work better.
- </li>
- </ul>
- </dd>
- <dt>0.93</dt>
- <dd>
- <ul>
- <li>
- Better error handling when switching to editing
- embedded JavaScript and CSS.
- </li>
- <li>
- Removed PHP spec from embedded switching since they
- interfered with the automatic switching between php
- and xhtml.
- </li>
- <li>
- Gives an error message if web host is not defined in
- site when trying to use View Uploaded File and
- cousins.
- </li>
- <li>
- Gives a ready message when finished uploading a single
- file.
- </li>
- <li>
- When using Mode Switching at &lt;? ... ?> mode
- switching could occur in wrong buffer. Fixed together
- with some other buffer problems.
- </li>
- </ul>
- </dd>
- <dt>0.94</dt>
- <dd>
- <ul>
- <li>
- Add http://www.w3.org/ to the help sites for CSS.
- </li>
- <li>
- Included a CSS mode.
- </li>
- <li>
- Added a menu entry for bug reporting.
- </li>
- <li>
- Renamed menu bar entry from XHTML to nXhtml for clarity.
- (But nXml menu bar entry is still called XML.)
- </li>
- <li>
- Added work around for globalized minor modes in the
- cases of MLinks, XML Path and mode switching at &lt;? ... ?>.
- </li>
- </ul>
- </dd>
- <dt>0.95</dt>
- <dd>
- <ul>
- <li>
- Added workaround for the problem with the first
- keyboard key after automatically switching of mode at
- &lt;? ... ?>.
- </li>
- </ul>
- </dd>
- <dt>0.96</dt>
- <dd>
- <ul>
- <li>
- Added support for multiple major modes with mumamo.el.
- </li>
- <li>
- More conventient handling of links. They can now be
- opened in the same window, 'other window' or in a new
- frame.
- </li>
- </ul>
- </dd>
- <dt>0.97</dt>
- <dd>
- <ul>
- <li>
- Schema was not setup after starting new page so
- completion did not work. Fixed.
- </li>
- <li>
- Added http://xhtml.com/ to help sites for XHTML.
- </li>
- <li>
- Added the concept of <em>XML validation headers</em>.
- These are just text parsed by the nXml validation
- parser to get a start state before starting parsing a
- buffer. This allows the use of the nXml completion in
- buffers where there are no XML header. Such a header
- is often lacking for example in PHP code since the
- XHTML header is often generated dynamically.
- </li>
- <li>
- Because of the change above <em>nxhtml-part-mode</em>
- is no longer needed and is therefore declared
- obsolete.
- </li>
- <li>
- Corrected a bug in mlinks.el that prevented opening an
- HTML link in a other window or a new frame.
- </li>
- <li>
- Added support for JSP, eRuby and some support for perl
- in mumamo.el.
- </li>
- </ul>
- </dd>
- <dt>0.98</dt>
- <dd id="0.98">
- <ul>
- <li>
- Mumamo was not found when nXhtml was installed with
- just the zip file. Corrected. (nXhtml is also
- installed when you install EmacsW32.)
- </li>
- <li>
- Enhancement to mumamo error handling when a bad mode
- specifier for an embedded mode is found.
- </li>
- <li>
- Introduced a bug for empty XHTML documents in
- 0.97. Corrected.
- </li>
- <li>
- Corrected a bug for chunks 1 character long.
- </li>
- <li>
- There is a bug in Emacs 22 in the handling of global
- minor mode that are not distributed with Emacs. If
- they are turned on by customization, but loaded after
- Emacs have loaded the customizations (usually in
- .emacs) then they are not turned on correctly. Added
- work-around for this.
- </li>
- <li>
- <em>Extra XHTML Validation Header</em>:
- <ul>
- <li>
- <em>Extra XHTML Validation Header</em> state was not saved when moving between chunks. Fixed.
- </li>
- <li>
- Tried to make the concept of <em>Extra XHTML Validation Header</em>
- more clear. Added this visually to the buffer.
- </li>
- <li>
- <em>Extra XHTML Validation Headers</em> can now be turned on
- automatically based on file name.
- </li>
- </ul>
- </li>
- <li>
- <em>nXhtml menu:</em>
- <ul>
- <li>
- Reorganized the nXhtml menu.
- </li>
- <li>
- Added <em>customization</em> groups for help libraries to nXhtml.
- </li>
- <li>
- Added an entry for customization of nXhtml to the menus.
- </li>
- <li>
- Added <em>Tidy</em> to the menus again.
- </li>
- </ul>
- </li>
- <li>
- Corrected bug in <em>XML Path</em> (nxml-where) for single tags.
- Other small fixes to nxhtml-where.
- </li>
- <li>
- Documentation enhancements.
- Added <em>The Quick Guide</em>.
- </li>
- <li>
- </li>
- </ul>
- </dd>
- <dt>0.99</dt>
- <dd id="0.99">
- <ul>
- <li>
- Corrections to indentation.
- </li>
- <li>
- Turn on mumamo-mode by file name.
- </li>
- <li>
- The Extra XHTML Validation Header state were not saved when changing major mode in MuMaMo. Corrected.
- </li>
- <li>
- Added more alternatives to the Extra XHTML Validation Header list.
- This should make it easier to use completion with for example PHP.
- </li>
- <li>
- Added default value for the Extra XHTML Validation Header.
- </li>
- </ul>
- </dd>
- </dl>
- </div>
- </div>
-
- <hr class="footer"/>
- <p class="footer">
- Copyright &copy; 2007 OurComments.org
- --
- Latest update 2007-04-11
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/genshi-HelloWorldPage.ghtml b/emacs.d/nxhtml/tests/in/genshi-HelloWorldPage.ghtml
deleted file mode 100644
index f54fc5f..0000000
--- a/emacs.d/nxhtml/tests/in/genshi-HelloWorldPage.ghtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<div xmlns="http://www.w3.org/1999/xhtml"
- xmlns:py="http://genshi.edgewall.org/">
-
- <!-- sadf -->
-
- <div py:if="test">
- Hello from hello!
- Test ${name}
- </div>
-</div>
diff --git a/emacs.d/nxhtml/tests/in/genshi-auto-mode.html b/emacs.d/nxhtml/tests/in/genshi-auto-mode.html
deleted file mode 100644
index f54fc5f..0000000
--- a/emacs.d/nxhtml/tests/in/genshi-auto-mode.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div xmlns="http://www.w3.org/1999/xhtml"
- xmlns:py="http://genshi.edgewall.org/">
-
- <!-- sadf -->
-
- <div py:if="test">
- Hello from hello!
- Test ${name}
- </div>
-</div>
diff --git a/emacs.d/nxhtml/tests/in/genshi.ghtml b/emacs.d/nxhtml/tests/in/genshi.ghtml
deleted file mode 100644
index bf0848d..0000000
--- a/emacs.d/nxhtml/tests/in/genshi.ghtml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?python
- title = "A Genshi Template"
- fruits = ["apple", "orange", "kiwi"]
-?>
-<html xmlns:py="http://genshi.edgewall.org/">
- <head>
- <title py:content="title">This is replaced.</title>
- </head>
- <body>
- <p>These are some of my favorite fruits:</p>
- <ul>
- <li py:for="fruit in fruits">
- I like ${fruit}s
- </li>
- </ul>
-{% python
- from genshi.builder import tag
- def greeting(name):
- return 'Hello, %s!' % name
-%}
-${greeting('world')}
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/goesele-091110-testnote-orig.mm b/emacs.d/nxhtml/tests/in/goesele-091110-testnote-orig.mm
deleted file mode 100644
index a9f78ca..0000000
--- a/emacs.d/nxhtml/tests/in/goesele-091110-testnote-orig.mm
+++ /dev/null
@@ -1,16 +0,0 @@
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node CREATED="1257868981125" ID="ID_1727486195" MODIFIED="1257869002408" TEXT="Testnote">
-<richcontent TYPE="NOTE"><html>
- <head>
-
- </head>
- <body>
- <p>
- A note
- </p>
- </body>
-</html>
-</richcontent>
-</node>
-</map>
diff --git a/emacs.d/nxhtml/tests/in/goesele-091110-testnote-temp.mm b/emacs.d/nxhtml/tests/in/goesele-091110-testnote-temp.mm
deleted file mode 100644
index a9f78ca..0000000
--- a/emacs.d/nxhtml/tests/in/goesele-091110-testnote-temp.mm
+++ /dev/null
@@ -1,16 +0,0 @@
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node CREATED="1257868981125" ID="ID_1727486195" MODIFIED="1257869002408" TEXT="Testnote">
-<richcontent TYPE="NOTE"><html>
- <head>
-
- </head>
- <body>
- <p>
- A note
- </p>
- </body>
-</html>
-</richcontent>
-</node>
-</map>
diff --git a/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm b/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm
deleted file mode 100644
index a9f78ca..0000000
--- a/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm
+++ /dev/null
@@ -1,16 +0,0 @@
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node CREATED="1257868981125" ID="ID_1727486195" MODIFIED="1257869002408" TEXT="Testnote">
-<richcontent TYPE="NOTE"><html>
- <head>
-
- </head>
- <body>
- <p>
- A note
- </p>
- </body>
-</html>
-</richcontent>
-</node>
-</map>
diff --git a/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org b/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org
deleted file mode 100644
index 4e7cb67..0000000
--- a/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org
+++ /dev/null
@@ -1,5 +0,0 @@
-* Testnote
-
- :CLOCK:
- my clock
- :END:
diff --git a/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org.mm b/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org.mm
deleted file mode 100644
index befbd1d..0000000
--- a/emacs.d/nxhtml/tests/in/goesele-091110-testnote.mm.org.mm
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node text="Testnote">
-<richcontent TYPE="NOTE"><html>
-<head>
-</head>
-<body>
---org-mode: :CLOCK:<br />
---org-mode: my clock<br />
---org-mode: :END:<br />
-</body>
-</html>
-</richcontent>
-</node>
-</map>
diff --git a/emacs.d/nxhtml/tests/in/haml1.haml b/emacs.d/nxhtml/tests/in/haml1.haml
deleted file mode 100644
index 85f2324..0000000
--- a/emacs.d/nxhtml/tests/in/haml1.haml
+++ /dev/null
@@ -1,132 +0,0 @@
-!!! XML
-!!!
-
-%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}
-
-%title
- = @title
- \= @title
-
-%script{:type => "text/javascript",
- :src => "javascripts/script_#{2 + 7}"}
-
-%gee
- %whiz
- Wow this is cool!
-%p
- <div id="blah">Blah!</div>
-%one
- %two
- %three Hey there
-
-%html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")
-
-%a(title=@title href=href) Stuff
-%a{:title => @title, :href => href} Stuff
-
-%script(type="text/javascript"
- src="javascripts/script_#{2 + 7}")
-
-%html{html_attrs('fr-fr')}
-
-%input{:selected => true}
-%input(selected)
-%input(selected=true)
-
-%div#things
- %span#rice Chicken Fried
- %p.beans{ :food => 'true' } The magical fruit
- %h1.class.otherclass#id La La La
-
-#content .articles
- .article.title Doogie Howser Comes Out
- .article.date 2006-11-05
- .article.entry
- Neil Patrick Harris would like to dispel any rumors that he is straight
-
-%br/
-%meta{'http-equiv' => 'Content-Type', :content => 'text/html'}/
-
-%br
-%meta{'http-equiv' => 'Content-Type', :content => 'text/html'}
-
-%blockquote<
- %div
- Foo!
-
-%img
-%img>
-%img
-
-%img
-%pre><
- foo
- bar
-%img
-
-%peanutbutterjelly
- / This is the peanutbutterjelly element
- I like sandwiches!
-
-/
- %p This doesn't render...
- %div
- %h1 Because it's commented out!
-
-/[if IE]
- %a{ :href => 'http://www.mozilla.com/en-US/firefox/' }
- %h1 Get Firefox
-
-%p foo
--# This is a comment
-%p bar
-
-- foo = "hello"
-- foo << " there"
-- foo << " you!"
-%p= foo
-
-- (42...47).each do |i|
- %p= i
-%p See, I can count!
-
-%p
- - case 2
- - when 1
- = "1!"
- - when 2
- = "2?"
- - when 3
- = "3."
-
-%p This is #{h quality} cake!
-%p= "This is the #{h quality} cake!"
-
-%p
- Look at \\#{h word} lack of backslash: \#{foo}
- And yon presence thereof: \{foo}
-
-:javascript
- $(document).ready(function() {
- alert(#{@message.to_json});
- });
-
-&= "I like cheese & crackers"
-
-= "I feel <strong>!"
-!= "I feel <strong>!"
-compiles to
-I feel &lt;strong&gt;!
-I feel <strong>!
-
-%p
- :markdown
- Textile
- =======
-
- Hello, *World*
-
-- flavor = "raspberry"
-#content
- :textile
- I *really* prefer _#{h flavor}_ jam.
diff --git a/emacs.d/nxhtml/tests/in/heredoc.php b/emacs.d/nxhtml/tests/in/heredoc.php
deleted file mode 100644
index 39e82e5..0000000
--- a/emacs.d/nxhtml/tests/in/heredoc.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
-<?php
-
-/* Testing fill paragraph and friends, fill me fill me fill me fill me
- fill me fill me fill me fill me fill me fill me fill me fill me
- fill me fill me
-
- However coloring it differently than the top level (or level 1) php
- chunks may help detect nesting errors. */
-
-$name = "Joe Smith";
-$occupation = "Programmer";
-echo <<<EOF
-
- This is a heredoc text-mode section.
- For more information talk to $name, your local $occupation.
-
-EOF;
-
-$toprint = <<< HTMLEOF
-<!-- heredoc html-mode section -->
-<style type="text/css">
-.bugfix { color: red; }
-</style>
-
-<script type="text/javascript" language="javascript">
-
- function onEndCrop( coords, dimensions ) {
- alert("Test");
- }
-</script>
-
-
-<a href="javascript:void window.open('');" title="Something">
- <img src="/administrator/images/imprimir.png"
- style="color:red;"
- border="0"
- alt="<?php echo _CMN_PDF;?>"
- onmouseover="this.src='images/imprimir_on.png';swap('imprimir',1);"
- onmouseout="this.src='images/imprimir.png'; swap('imprimir',0);"
- class="bot" id="imprimir"/>
- </a>
-
-<?php
-
-/* This inner php chunk is not very useful (except for presentation of
- MuMaMo chunk dividing capabilities and deficiences...), since php
- normally seems to run only one pass...
-
- However coloring it differently than the top level (or level 1) php
- chunks may help detect nesting errors. */
-
-echo <<<ONEMORELEVEL
-Just for testing the chunk background color...
-ONEMORELEVEL;
-?>
-
-HTMLEOF;
-echo strtolower($toprint);
-
-?>
diff --git a/emacs.d/nxhtml/tests/in/heredoc.pl b/emacs.d/nxhtml/tests/in/heredoc.pl
deleted file mode 100644
index 8620357..0000000
--- a/emacs.d/nxhtml/tests/in/heredoc.pl
+++ /dev/null
@@ -1,11 +0,0 @@
-$text = 'Text from a Perl string.';
-print <<HTML;
-<html>
-<head>
-<title>Here-Doc Example</title>
-</head>
-<body>
-<h1>Here-Doc Example</h1>
-<p>$text</p>
-</body>
-HTML
diff --git a/emacs.d/nxhtml/tests/in/heredoc.py b/emacs.d/nxhtml/tests/in/heredoc.py
deleted file mode 100644
index aaa847f..0000000
--- a/emacs.d/nxhtml/tests/in/heredoc.py
+++ /dev/null
@@ -1,11 +0,0 @@
-sender = 'Buffy the Vampire Slayer'
-recipient = 'Spike'
-
-print("""\
-Dear %(recipient)s,
-
-I wish you to leave Sunnydale and never return.
-
-Not Quite Love,
-%(sender)s
-""" % locals())
diff --git a/emacs.d/nxhtml/tests/in/heredoc.rb b/emacs.d/nxhtml/tests/in/heredoc.rb
deleted file mode 100644
index ab7b54f..0000000
--- a/emacs.d/nxhtml/tests/in/heredoc.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-now = Time.now
-puts <<-EOF
- It's #{now.hour} o'clock John, where are your kids?
- EOF
-now = Time.now
-puts <<EOF
- It's #{now.hour} o'clock John, where are your kids?
-EOF
diff --git a/emacs.d/nxhtml/tests/in/heredoc.sh b/emacs.d/nxhtml/tests/in/heredoc.sh
deleted file mode 100644
index 5893ac7..0000000
--- a/emacs.d/nxhtml/tests/in/heredoc.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-tr a-z A-Z <<EOF
-
-
-EOF
diff --git a/emacs.d/nxhtml/tests/in/hg-2008-03-22-ajax.xhtml b/emacs.d/nxhtml/tests/in/hg-2008-03-22-ajax.xhtml
deleted file mode 100644
index 22b3ec1..0000000
--- a/emacs.d/nxhtml/tests/in/hg-2008-03-22-ajax.xhtml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
- <title></title>
- </head>
- <body>
- <script language="JavaScript" type="text/javascript">
- //<![CDATA[
-function test() {
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readystate==4) {
- if (xmlhttp.status==200) {
- alert(xmlhttp.responseText);
- }else {
- alert(xmlhttp.status);
- }
- #ffff00;
- }
- xmlhttp.open("post","/hello/cardCpu/queryList");
- var body = "label="+encodeURIComponent("±£ÍÍ");
- alert(body)
- xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
- xmlhttp.send(body);
- }
-}
-//]]>
- </script>
- <hr />
- <address><a href="mailto:agile@agile">agile.guo</a></address>
- <!-- Created: Thu Sep 14 22:01:37 CST 2006 -->
- <!-- hhmts start -->
- Last modified: Thu Sep 14 22:01:42 CST 2006 <!-- hhmts end -->
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/hq-070510-test.php b/emacs.d/nxhtml/tests/in/hq-070510-test.php
deleted file mode 100644
index 8c57717..0000000
--- a/emacs.d/nxhtml/tests/in/hq-070510-test.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
-<?php
-require_once("include/utils.php");
-?>
-
-<div class="linkcontainer">
-<?php
-$_SESSION["linksfile"]="csv/links.csv";
-include("displaylinks.php");
-?>
-</div>
-
diff --git a/emacs.d/nxhtml/tests/in/hq-070510-test.php.html b/emacs.d/nxhtml/tests/in/hq-070510-test.php.html
deleted file mode 100644
index 57736a3..0000000
--- a/emacs.d/nxhtml/tests/in/hq-070510-test.php.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <title>hq-070510-test.php</title>
- <meta name="generator" content="emacs 22.1.1; htmlfontify 0.20">
-<style type="text/css"><!--
-body { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.default { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.default a { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
-span.constant { color: rgb(95, 158, 160); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.constant a { color: rgb(95, 158, 160); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
-span.variable-name { color: rgb(184, 134, 11); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.variable-name a { color: rgb(184, 134, 11); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
-span.function-name { color: rgb(0, 0, 255); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.function-name a { color: rgb(0, 0, 255); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
-span.string { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.string a { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
-span.default { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.default a { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
-span.keyword { color: rgb(160, 32, 240); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: none; }
-span.keyword a { color: rgb(160, 32, 240); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: outline-courier new; font-size: 9pt; text-decoration: underline; }
- --></style>
-
- </head>
- <body>
-
-<pre>
-
-&lt;<span class="keyword">?php</span>
-<span class="default">require_once(</span><span class="string">&quot;include/utils.php&quot;</span>);
-?&gt;
-
-&lt;<span class="function-name">div</span> <span class="variable-name">class</span>=<span class="string">&quot;linkcontainer&quot;</span>&gt;
-&lt;<span class="keyword">?php</span>
-$<span class="constant">_SESSION</span>[<span class="string">&quot;linksfile&quot;</span>]=<span class="string">&quot;csv/links.csv&quot;</span>;
-<span class="default">include(</span><span class="string">&quot;displaylinks.php&quot;</span>);
-?&gt;
-&lt;/<span class="function-name">div</span>&gt;
-
-
-</pre>
-
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/hq-070524-bug.php b/emacs.d/nxhtml/tests/in/hq-070524-bug.php
deleted file mode 100644
index 24bd8e8..0000000
--- a/emacs.d/nxhtml/tests/in/hq-070524-bug.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
- Echo "why is this text red";
-
- /* It looks like there is some sync problem with php-mode
- here. Adding a ( before the string makes the string
- beeing fontified as a string.
- */
-
-?>
diff --git a/emacs.d/nxhtml/tests/in/hq-071006-index.php b/emacs.d/nxhtml/tests/in/hq-071006-index.php
deleted file mode 100644
index 78b60e8..0000000
--- a/emacs.d/nxhtml/tests/in/hq-071006-index.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-// some basic library functions
-include_once 'lib.php';
-
-$book = new Mybook($api_key, $secret);
-
-if (isset($_POST['to'])) {
- $prints_id = (int)$_POST['to'];
- $prints = do_step($user, $prints_id);
-} else {
- if (isset($_GET['to'])) {
- $prints_id = (int)$_GET['to'];
- } else {
- $prints_id = $user;
- }
- $prints = get_prints($prints_id);
-}
-
-?>
-<div style="padding: 10px;">
- <h2>Hi <mb:name firstnameonly="true" uid="<?php=$user?>" useyou="false"/>!</h2><br/>
- <a href="<?= $book->get_add_url() ?>">Put prints in your profile</a>.
- <form method="post" action="http://my-domain.com/footprints/">
-<?php
- if ($prints_id != $user) {
- echo '<input type="hidden" name="to" value="' . $prints_id . '"/>';
- } else {
- echo '<br/>';
- }
-?>
- <input value="step" type="submit"/>
- </form>
- <hr/>
- These are <mb:name uid="<?= $prints_id ?>" possessive="true"/> Footprints:<br/>
- <?php echo render_prints($prints, 10); ?>
- <div style="clear: both;"/>
-</div>
diff --git a/emacs.d/nxhtml/tests/in/html-syntactic-err-l164.html b/emacs.d/nxhtml/tests/in/html-syntactic-err-l164.html
deleted file mode 100644
index 275ae67..0000000
--- a/emacs.d/nxhtml/tests/in/html-syntactic-err-l164.html
+++ /dev/null
@@ -1,1474 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News and Notes about nXhtml</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home">
- <a href="nxhtml.html">To nXhtml main page</a>
- </p>
-
- <h1>News and Notes about nXhtml</h1>
-
- <dl>
-
- <dt id="hadron-bugs" style="margin-top:1em;">Thanks for testing!</dt>
- <dd>
- <p>
- I want to thanks the testers (who have been many now),
- especially to my first testers Hadron Quark and Eric
- Lilja, for helping me by testing and pointing out bugs
- and weaknesses, most of them related to editing of PHP.
- </p>
- <p>
- Without testers all kind of problems I just can't
- imagine myself would still be there in nXhtml. For
- example Hadron told me once that he got the error
- <i>(wrong-type-argument stringp nil)</i>. Eh, I replied, are
- you sure. Yes he was. I tried the same file as him. No
- error.
- </p>
- <p>
- The error happened during fontification so the error
- message above was all we had. A real black box for
- me. Or perhaps black magic? After much confusion and
- some hard work we finally found out what it was and I
- implemented a better way to catch such errors. If Hadron
- would have given up the problem would still have been
- there. Some problems are just impossible to solve
- without good cooperation. So, again, thanks Hadron.
- </p>
- <p>
- BTW, I will perhaps add some even better way to Emacs to
- catch these errors so other can benefit from our
- insights too, but that requires some time and effort
- which I can't afford right now.
- </p>
- </dd>
-
- <dt id="state-of-the-art" style="margin-top:1em;
- background-color: #00fa9a;
- background-color: #20b2aa;
- padding: 0.5em;
- ">The State of the Art</dt>
- <dd style="background-color: #54ff9f; padding: 0.5em">
- <p>
- I have more and more come to realize that there are two
- main parts of nXhtml which are in a bit different
- degrees of maturity. The reason for the difference is
- mainly that one of them, <strong>mumamo-mode</strong>,
- requires very tight integration with Emacs in a way that
- currently is difficult. There are also things to
- discover, for example in the interactions with other
- minor modes. Each minor mode actually have to be tested
- with mumamo-mode. (Instruction for library authors are
- in mumamo-mode.el)
- </p>
- <p>
- That said I still think <strong>mumamo-mode</strong> is
- mature enough for serious use. At least the
- <i>fontification now works ok</i> I believe. Other
- parts that also depends on the major mode used,
- like <i>filling and indentation have some quirks</i>. To
- make those work more reliably in all cases a bit more
- standardisation across different major modes is
- needed. (It is perhaps possible to work around those
- problems in mumamo-mode, but the long term benefits of
- doing that are probably small.)
- </p>
- <p>
- The other part, <strong>nxhtml-mode</strong>, is more mature,
- since it stands more by itself and since it builds on
- the very stable nxml-mode. I would not say nxhtml-mode
- is (ever) finished, but it is stable and useful.
- </p>
- </dd>
-
- <dt id="magic-problems" style="margin-top:1em;">Magic major mode selection</dt>
- <dd>
- <p>
- Sometimes the major mode that Emacs opens a file in is
- not what you expect. This can happen with files like PHP
- files. The reason might be that magic-mode-alist have
- choosen a mode based on the content of the file. The way
- this is done does not take files with mixes a mix of for
- example XHTML and PHP into account.
- </p>
- <p>
- You may try setting magic-mode-alist to nil if this is a
- problem for you.
- </p>
- <p>
- <em>
- This is now no longer necessary since the introduction
- of magic-fallback-mode-alist in CVS Emacs on 2007-05-16.
- (If you have an Emacs newer than that, of course.)
- </em>
- </p>
- </dd>
-
- <dt id="underline-bug" style="margin-top:1em;">Long Red Underlines</dt>
- <dd>
- <p>
- Because of a bug in Emacs 22.1 you can sometimes (at the
- end of a line) get long red lines instead of just a
- single underlined character. Many users (me included)
- find this quite a bit disturbing. I have therefore added
- a command to quickly hide/show the underlines. This is
- on <em>C-c C-w</em>.
- </p>
- <p>
- This is particular useful for example in the case where
- you edit a PHP file and are bound to get a lot of XHTML
- validation errors.
- </p>
- </dd>
-
- <dt id="php-attribute-values" style="margin-top:1em;">Attribute values computed by PHP</dt>
- <dd>
- <p>
- If you want to have attribute values computed by PHP
- here is a way how to structure that to avoid breaking
- completion and validation in the XHTML part unnessecary:
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&lt;?php foo(&quot;bar&quot;);?&gt;&quot;/>
- </p>
- <p>
- Unfortunately that still breaks XHTML validation since
- &lt; is not allowed in strings. In the long run I
- believe the XML validator has to be broken up so that it
- avoids parsing the string here (in PHP files).
- </p>
- <p>
- For now I have implemented a workaround.
- If you are using constructs like those above then turn on <em>nxhtml-strval-mode</em>.
- This will temporarily replace the above with
- </p>
- <p style="margin-left:2em">
- &lt;img src=&quot;images/linux.png&quot; title=&quot;&#171;?php foo(&quot;bar&quot;);?&#187;&quot;/>
- </p>
- <p>
- However on the screen you will still see the original
- string and when writing to file the correct characters
- will be used.
- </p>
- </dd>
-
- <dt id="pi-note" style="margin-top:1em;">A note for PHP and its cousins</dt>
- <dd>
- <p>
- The rules for a process instruction in XML, like &lt;?php
- ... ?&gt; says that the text can contain any text except
- <em>?&gt;</em>. So if you want to output that string
- from PHP then break it up so it does not look as ?&gt; in
- the source file.
- </p>
- <p>
- It might be good to break up the beginning part of the
- process instructions too. And please note that to use
- XHTML validation or completion you should avoid using
- &lt; in strings, since it is not allowed there.
- </p>
- </dd>
-
-<!-- <dt id="pi-note" style="margin-top:1em;">Perl Mode slow with Mumamo Mode</dt> -->
-<!-- <dd> -->
-<!-- <p> -->
-<!-- Perl mode used with MuMaMo mode sometimes makes the -->
-<!-- fontification slow for big files. I do not know the -->
-<!-- reason, but I am trying to find a solution for this. If -->
-<!-- you encounter this problem, just turn off mumamo-mode in -->
-<!-- that buffer. -->
-<!-- </p> -->
-<!-- </dd> -->
-
- <dt id="tab-width-problems" style="margin-top:1em;">Tab width</dt>
- <dd>
- <p>
- Do you have <em>tab-width</em> to something different than 8
- (the default)? Then please change this to 8. I have got
- reports of problem with indentation when it is not 8.
- </p>
- </dd>
-
- <dt id="mmm-compat" style="margin-top:1em;">Why the chunks are not compatible with mmm</dt>
- <dd>
- <p>
- Some people have asked why the way to specify chunks in
- mumamo-mode is not compatible with the old mmm-mode. The
- answer is that I was not sure that the way used in
- mmm-mode for specifying the chunks was flexible enough.
- </p>
- <p>
- And I am sure that even the way used in mumamo-mode is
- not good enough for all cases, but I let it be the way
- it is until I have a better understanding of the
- problem. Suggestions and comments are welcome!
- </p>
- </dd>
-
- </dl>
-
- <h1 id="change-history">nXhtml Changes</h1>
-
- <div>
- <a href="#v0.89">v0.89</a>
- <a href="#v0.90">v0.90</a>
- <a href="#v0.91">v0.91</a>
- <a href="#v0.92">v0.92</a>
- <a href="#v0.93">v0.93</a>
- <a href="#v0.94">v0.94</a>
- <a href="#v0.95">v0.95</a>
- <a href="#v0.96">v0.96</a>
- <a href="#v0.97">v0.97</a>
- <a href="#v0.98">v0.98</a>
- <a href="#v0.99">v0.99</a>
- <a href="#v1.00">v1.00</a>
- <a href="#v1.01">v1.01</a>
- <a href="#v1.02">v1.02</a>
- <a href="#v1.03">v1.03</a>
- <a href="#v1.04">v1.04</a>
- <a href="#v1.10">v1.10</a>
- <a href="#v1.11">v1.10</a>
- <a href="#v1.12">v1.10</a>
- <a href="#v1.13">v1.10</a>
- <a href="#v1.14">v1.10</a>
- </div>
-
- <dl>
- <dt id="v0.89">0.89</dt>
- <dd>
- <ul>
- <li>
- Corrected autostart for nXhtml when not used together with EmacsW32.
- </li>
- </ul>
- </dd>
- <dt id="v0.90">0.90</dt>
- <dd>
- <ul>
- <li>
- Improved display of XML path.
- </li>
- <li>
- Discontinued xmple-mode.
- </li>
- <li>
- New major modes nxhtml-part-mode/nxml-part-mode replaces
- minor mode xmlpe-mode. (While moving the code to
- nxhtml-part.el I also fixed a bug in Xmple minor mode that
- made Emacs take 99% of the CPU.)
- </li>
- </ul>
- </dd>
- <dt id="v0.91">0.91</dt>
- <dd>
- <ul>
- <li>
- Fixed some calls to perl which prevented uploading of
- a site of you did not have perl in the same location
- as me.
- </li>
- <li>
- Glued together things so that editing PHP files works
- as I intended. (This means that Emacs switches between
- php-mode and nxhtml-part-mode automatically when
- moving point. And that you can use completion.)
- </li>
- <li>
- Starting working on the documentation for nXhtml.
- New layout to the documentation files.
- Examples with images.
- </li>
- </ul>
- </dd>
- <dt id="v0.92">0.92</dt>
- <dd>
- <ul>
- <li>
- Fixes to make the switching between php and xhtml
- style editing work better.
- </li>
- </ul>
- </dd>
- <dt id="v0.93">0.93</dt>
- <dd>
- <ul>
- <li>
- Better error handling when switching to editing
- embedded JavaScript and CSS.
- </li>
- <li>
- Removed PHP spec from embedded switching since they
- interfered with the automatic switching between php
- and xhtml.
- </li>
- <li>
- Gives an error message if web host is not defined in
- site when trying to use View Uploaded File and
- cousins.
- </li>
- <li>
- Gives a ready message when finished uploading a single
- file.
- </li>
- <li>
- When using Mode Switching at &lt;? ... ?&gt; mode
- switching could occur in wrong buffer. Fixed together
- with some other buffer problems.
- </li>
- </ul>
- </dd>
- <dt id="v0.94">0.94</dt>
- <dd>
- <ul>
- <li>
- Add http://www.w3.org/ to the help sites for CSS.
- </li>
- <li>
- Included a CSS mode.
- </li>
- <li>
- Added a menu entry for bug reporting.
- </li>
- <li>
- Renamed menu bar entry from XHTML to nXhtml for clarity.
- (But nXml menu bar entry is still called XML.)
- </li>
- <li>
- Added work around for globalized minor modes in the
- cases of MLinks, XML Path and mode switching at &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt id="v0.95">0.95</dt>
- <dd>
- <ul>
- <li>
- Added workaround for the problem with the first
- keyboard key after automatically switching of mode at
- &lt;? ... ?&gt;.
- </li>
- </ul>
- </dd>
- <dt id="v0.96">0.96</dt>
- <dd>
- <ul>
- <li>
- Added support for multiple major modes with mumamo.el.
- </li>
- <li>
- More conventient handling of links. They can now be
- opened in the same window, 'other window' or in a new
- frame.
- </li>
- </ul>
- </dd>
- <dt id="v0.97">0.97</dt>
- <dd>
- <ul>
- <li>
- Schema was not setup after starting new page so
- completion did not work. Fixed.
- </li>
- <li>
- Added http://xhtml.com/ to help sites for XHTML.
- </li>
- <li>
- Added the concept of <em>fictive XML validation
- headers</em>. These are just text parsed by the nXml
- validation parser to get a start state before starting
- parsing a buffer. This allows the use of the nXml
- completion in buffers where there are no XML header.
- Such a header is often lacking for example in PHP code
- since the XHTML header is often generated dynamically.
- </li>
- <li>
- Because of the change above <em>nxhtml-part-mode</em>
- is no longer needed and is therefore declared
- obsolete.
- </li>
- <li>
- Corrected a bug in mlinks.el that prevented opening an
- HTML link in a other window or a new frame.
- </li>
- <li>
- Added support for JSP, eRuby and some support for perl
- in mumamo.el.
- </li>
- </ul>
- </dd>
- <dt id="v0.98">0.98</dt>
- <dd>
- <ul>
- <li>
- Mumamo was not found when nXhtml was installed with
- just the zip file. Corrected. (nXhtml is also
- installed when you install EmacsW32.)
- </li>
- <li>
- Enhancement to mumamo error handling when a bad mode
- specifier for an embedded mode is found.
- </li>
- <li>
- Introduced a bug for empty XHTML documents in
- 0.97. Corrected.
- </li>
- <li>
- Corrected a bug for chunks 1 character long.
- </li>
- <li>
- There is what I consider is a bug in Emacs 22.1 in the
- handling of global minor mode that are not distributed
- with Emacs. If they are turned on by customization,
- but loaded after Emacs have loaded the customizations
- (usually in .emacs) then they are not turned on
- correctly. Added work-around for this.
- </li>
- <li>
- <em>Fictive XHTML Validation Header</em>:
- <ul>
- <li>
- <em>Fictive XHTML Validation Header</em> state was not saved when moving between chunks. Fixed.
- </li>
- <li>
- Tried to make the concept of <em>Fictive XHTML Validation Header</em>
- more clear. Added this visually to the buffer.
- </li>
- <li>
- <em>Fictive XHTML Validation Headers</em> can now be turned on
- automatically based on file name.
- </li>
- </ul>
- </li>
- <li>
- <em>nXhtml menu:</em>
- <ul>
- <li>
- Reorganized the nXhtml menu.
- </li>
- <li>
- Added <em>customization</em> groups for help libraries to nXhtml.
- </li>
- <li>
- Added an entry for customization of nXhtml to the menus.
- </li>
- <li>
- Added <em>Tidy</em> to the menus again.
- </li>
- </ul>
- </li>
- <li>
- Corrected bug in <em>XML Path</em> (nxml-where) for single tags.
- Other small fixes to nxhtml-where.
- </li>
- <li>
- Documentation enhancements.
- Added <em>The Quick Guide</em>.
- </li>
- </ul>
- </dd>
- <dt id="v0.99">0.99</dt>
- <dd>
- <ul>
- <li>
- Fixed a serious bug in the cooperation between nxhtml-mode and mumamo-mode.
- </li>
- <li>
- Turn on mumamo-mode by file name (mumamo-global-mode).
- </li>
- <li>
- Fictive XHTML Validation Header:
- <ul>
- <li>
- The Fictive XHTML Validation Header state were not saved when changing major mode in MuMaMo. Corrected.
- </li>
- <li>
- Added more alternatives to the Fictive XHTML Validation Header list.
- This should make it easier to use completion with for example PHP.
- </li>
- <li>
- Added default value for the Fictive XHTML Validation Header.
- </li>
- <li>
- Tried to make the use of Fictive XHTML Validation Header more automatic and therefore useful.
- Also tried to make it play better with setting schema file.
- (There is no need normally to set schema file by hand.)
- </li>
- <li>
- To turn this on by default customize nxhtml-global-validation-header-mode.
- </li>
- </ul>
- </li>
- <li>
- Possible to hide validation warnings without turning
- on validation (which would make completion in the
- XHTML part impossible).
- </li>
- <li>
- Some fixes to php-mode:
- <ul>
- <li>Using the character # for comments now works for most cases.</li>
- <li>Now uses the fontification faces in a more standard way which calms down the look.</li>
- <li>Initialization bug fixes.</li>
- <li>Renamed php-mode-user-hook to php-mode-hook to follow standard.</li>
- </ul>
- </li>
- <li>
- Indentation fixes:
- <ul>
- <li>
- Various corrections to indentation in mumamo.
- </li>
- <li>
- Added the possibility to use TAB to indent regions
- (indent-region-mode).
- </li>
- <li>
- Warn about bad indentation in mixed PHP/HTML code
- when using php-mode only.
- </li>
- </ul>
- </li>
- <li>
- Fontification now fontifies all text first in main
- major mode and thereafter applies submodes. (This
- avoids some problems with around a submode chunk.)
- </li>
- <li>
- Reorganized the nXhtml menu:
- <ul>
- <li>
- There is now a minor mode for the nXhtml
- menu. This makes it possible to easier use common
- features when in buffers not in nxhtml-mode.
- </li>
- <li>
- The nXhtml menu does not disappear when moving
- into a chunk where the major mode is not
- nxhtml-mode. The changes also makes it easy to
- access uploading functions functions etc from
- other modes than nxhtml-mode since the
- <em>nXhtml</em> may also be shown in them.
- </li>
- <li>
- The nXhtml menu can be turned on globally by default.
- Customize nxhtml-menu-mode for that.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.00">1.00</dt>
- <dd>
- <ul>
- <li>
- Reached version number 1.00 - which you maybe believe
- means the bugs should be gone? Sorry, it is just that
- I ran out of version numbers ;-) However it looks like
- much fewer bugs at least.
- </li>
- <li>
- Fixed problems mostly related to global turn on of different features in nXhtml.
- </li>
- <li>
- Small fixes to indentation.
- <ul>
- <li>
- nxhtml-mode could get confused by php tags.
- </li>
- <li>
- nxhtml-mode did not indent &lt;!DOCTYPE in a sensible way.
- </li>
- <li>
- Electric keys now works in embedded php when using mumamo-mode.
- </li>
- </ul>
- </li>
- <li>
- Tidy was very misbehaving since the output buffer was
- not erased between different files. But I have got no
- bug reports on this ;-)
- </li>
- <li>
- Fixed a bug in validation that should up when using muamo-mode.
- </li>
- <li>
- Fixed bug in &lt;script ...> and &lt;style ...> chunk dividing.
- </li>
- <li>
- Added support for OpenLaszlo.
- </li>
- <li>
- Corrections to mlinks-mode (visible mostly as links in
- XHTML buffers):
- <ul>
- <li>
- Links disappeared when a new file was
- opened. Corrected.
- </li>
- <li>
- Links were not correctly updated at changes in the
- buffer when mumamo-mode was used. Fixed.
- </li>
- </ul>
- </li>
- <li>
- The welcome message for nXhtml could be shown too
- early sometimes when loading, before nXhtml actually
- knew if it should be shown or not. Tried to fix it.
- </li>
- </ul>
- </dd>
- <dt id="v1.01">1.01</dt>
- <dd>
- <ul>
- <li>
- Reported wrong version number for nXhtml in the menus. Fixed.
- </li>
- <li>
- <em>If you use the zip file to install nXhtml please
- notice that it has now a top level nxml.</em> Sorry for not
- having zipped it like that before!
- </li>
- <li>
- The url links in <em>Welcome to nXhtml</em> was a bit
- incorrect and did not work on all OS:es. Fixed.
- </li>
- <li>
- Added customization of popup completion to the 'nxhtml
- customization group so they are easier to find.
- </li>
- <li>
- MuMaMo
- <ul>
- <li>
- Struggled a bit with the load sequences of the elisp
- libraries used by nXhtml when using MuMaMo.
- </li>
- <li>
- Tried to get the global turn on of mumam-mode to work
- in all cases.
- </li>
- <li>
- The screen was blinking when changing overlays after
- changes in the buffer. Tried to fix this.
- </li>
- <li>
- Minor fixes do syntax highlighting, like taking care of single ':s.
- </li>
- <li>
- Fixes to the support for JSP and eRuby.
- </li>
- <li>
- Made the support for perl here documents a bit better.
- Large perl documents are however still quite slow when
- using mumamo-mode. I do not know the reason yet.
- </li>
- <li>
- Refontification could miss some parts when buffer
- changes caused chunk division changes. Complex,
- tried to fix it, but I am a bit unsure that it
- always works.
- </li>
- <li>
- Cleaned up mumamo.el a bit.
- </li>
- <li>
- Rewrote mumamo-test.el and functions called from it in
- mumamo.el a bit to make tracebacks from errors more
- useful. Changed keybindings in mumamo-test.el from
- global to a minor mode <em>mumamo-test-mode</em>.
- Renamed mumamo-notest.el to mumamo-test.el. Added it
- to the zipped distribution of nXhtml.
- </li>
- </ul>
- </li>
- <li>
- Fixed a bug related to links and buffer changes.
- </li>
- </ul>
- </dd>
- <dt id="v1.02">1.02</dt>
- <dd>
- <ul>
- <li>
- Fixed a refontification bug that occured after changes.
- </li>
- </ul>
- </dd>
- <dt id="v1.03">1.03</dt>
- <dd>
- <ul>
- <li>
- Added the possibility to call GIMP.
- </li>
- <li>
- Reworked the messages for fontification errors to try
- to catch an error that shows up sometimes. Tried to
- avoid disturbing normal use in spite of that error.
- </li>
- <li>
- Reverted to using a short delay before switching major
- mode when moving between buffers.
- </li>
- </ul>
- </dd>
- <dt id="v1.04">1.04</dt>
- <dd id="v1.04-dd">
- <ul>
- <li>
- Enhanced the documentation for nXhtml. Starting from
- <i>C-h f nxhtml-mode</i> it should now be easier to
- get an overview.
- </li>
- <li>
- Bug fixes etc:
- <ul id="v1.04-bugs">
- <li>
- Completion on an empty page gave a faulty frameset page. Fixed.
- </li>
- <li>
- Insert end tag did not work with a fictive
- validation header. Fixed.
- </li>
- <li>
- Insert end tag when all preceding tags where
- closed gave a strange error message. Fixed.
- </li>
- <li>
- Changed some key bindings to comply with
- <i>(info "(elisp) Key Binding Conventions")</i>
- </li>
- <li>
- Completion in empty buffers with a completion
- header did not work. Fixed.
- </li>
- <li id="mumamo-bugs">
- Multiple major modes:
- <ul>
- <li>
- Fixed a bug that prevented mumamo-global-mode from
- beeing turned on in a file opened in
- fundamental-mode.
- </li>
- <li>
- Better error tracing for some functions,
- including the call of major mode functions.
- </li>
- <li>
- Position was garbled when a ;-char was inserted in php-mode chunk. Fixed.
- </li>
- <li>
- A bad check for if mlinks-mode where available was fixed.
- </li>
- <li>
- Some bugs concerning turning off mumamo-mode was fixed.
- </li>
- <li>
- Fixed a bug in <i>perl here doc</i> chunks. Suddenly the
- problem with slowness when using mumamo-mode in
- perl buffers seems gone. (Note quite sure, but I
- can't see any problems now.)
- </li>
- <li>
- Fixed a bug in mumamo-mode when current buffer was
- switched before the major mode had been set from
- the current chunk.
- </li>
- <li>
- Fixed a long standing bug in php fontification of
- strings and comments.
- </li>
- <li>
- Fixed a bug where <i>sgml-xml-mode</i> was not defined.
- </li>
- <li>
- Fixed a bug related to get-text-property which
- gives an error when buffer is narrowed.
- </li>
- <li>
- Tried to refontify things outside of a narrowed part. Fixed.
- </li>
- <li>
- Too little where refontified after changes. I hope I have fixed this.
- </li>
- </ul>
- </li>
- <li>
- Fictive XHTML Validation Header:
- <ul id="v1.04-fic-bugs">
- <li>
- View File did not work correctly when a fictive
- XHTML validation header was used. Corrected.
- </li>
- <li>
- Fictive XHTML validation headers are no longer
- turned on by default in any buffers.
- </li>
- </ul>
- </li>
- <li>
- Indentation:
- <ul>
- <li>
- Tried to fix a problem when using
- newline-and-indent. When this was in a mode
- derived from C the indentation sometimes became 0.
- </li>
- <li>
- Speeded up the indentation of regions a bit when
- using <i>mumamo-mode</i>.
- </li>
- <li>
- Indentation: TAB now only indents a region if it
- is visibly marked (see transient-mark-mode and
- cua-mode).
- </li>
- <li>
- Simplified the indentation code.
- </li>
- </ul>
- </li>
- <li>
- Fixed a problem where string fontification got out
- of phase so that wrong parts of buffer could be
- fontified as a string.
- </li>
- <li>
- Added a workaround for <a
- href="#php-attribute-values">Attribute values
- computed by PHP</a>
- </li>
- <li>
- Added .nosearch to subdirectories with no elisp files.
- </li>
- <li>
- Fixed incorrect checks for mlinks-mode in menu building.
- </li>
- <li>
- File extensions where used in a case sensitive way
- in some places. Fixed.
- </li>
- <li>
- appmenu: Worked only in html files. Fixed.
- </li>
- <li>
- html-site: Fixed the error <em>Error
- (html-site-current): Can't find site:
- your-site-name</em>.
- </li>
- <li>
- Fixed a problem with longlines-mode in the support
- for Firefox add-on It's All Text. (Note however
- that there are some bugs in longlines-mode
- itself.) Rewrote the support to be more
- general. It is now in the file as-external.el, see
- this file.
- </li>
- <li>
- Fixed an encoding problem in
- <i>tidy-buffer</i>. Output from tidy was not read
- using the same coding system as tidy was using.
- </li>
- <li>
- Fixed some problems with face definitions, possibly bugs (not sure).
- </li>
- <li>
- Made the fontification faster when using mumamo-mode.
- (It is still slower than single mode fontification of course.)
- </li>
- <li>
- nxml-where.el: Made it aware of mumamo.el.
- </li>
- </ul>
- </li>
- <li>
- Menu changes:
- <ul>
- <li>
- Completion menu: Renamed to <i>Completion and
- Validation</i> menu and reorganized a little bit to
- make it more clear.
- </li>
- <li>
- Renamed <i>view</i> to <i>browse</i> since this is
- the normal emacs name for showing files in a web
- browser. Also made corresponding changes to
- function names. Put back the possibility to view
- only the region in a web browser.
- </li>
- </ul>
- </li>
- <li>
- Uploading:
- <ul>
- <li>
- Added remote dired to the menus.
- </li>
- <li>
- Fixed problems with file names starting with ~.
- </li>
- <li>
- Fixed more problems with file names with spaces.
- </li>
- </ul>
- </li>
- <li>
- nxml-where:
- <ul>
- <li>
- nxml-where now uses a timeout for more smooth performance.
- </li>
- <li>
- nxml-where can now recognizes both id and name attribute.
- </li>
- <li>
- Hyphens are now accepted in tag names.
- </li>
- </ul>
- </li>
- <li>
- Ruby
- <ul>
- <li>
- Multiple major mode turned on by default for .rhtml files when this mode is global.
- </li>
- <li>
- Multiple major mode is no longer turned on when rub-mode is turned on.
- </li>
- </ul>
- </li>
- <li>
- Added support for switching major mode dependent on if
- Emacs was called as an external editor. This makes it
- possible for example to switch to relevant major and
- minor modes when Firefox add-on It's All Text.
- </li>
- <li>
- Added the possibility to easily view the output of scripts on the server (if they require no parameters).
- You can now do that from the nXhtml menu.
- Previously only html files on the server could be viewed that way.
- Image files can also be viewed this way.
- </li>
- <li>
- Filling:
- <ul>
- <li>
- Added functions for unfilling.
- </li>
- <li>
- Added keybindings and menu entries for longlines-mode, fill-paragraph and unfill-paragraph.
- </li>
- </ul>
- </li>
- <li>
- Quoting:
- Added HTML quoting of &amp; and &lt; in text areas. Bound to C-c C-q.
- </li>
- <li>
- Images:
- <ul>
- <li>
- Added image-mode to those that are encompassed by
- nxhtml-global-minor-mode so that images can be
- uploaded more easily.
- </li>
- <li>
- Added <em>edit with GIMP</em> and <em>upload</em> to the popup menu for links.
- This avoids the need to load the linked files in Emacs first.
- </li>
- </ul>
- </li>
- <li>
- Added <em>nxml-untag-element</em>.
- </li>
- <li>
- Added a modified version of wikipedia-mode.el. Seems likely to be useful if you are doing web editing.
- </li>
- <li>
- Added html-imenu.el
- </li>
- <li>
- MuMaMo:
- <ul>
- <li>
- Removed the lighter <i>"MuMaMo"</i> for
- mumamo-mode. Instead the active major mode now has
- <b>"/m"</b> appended to mode-name (that is what you see
- in the mode line).
- </li>
- <li>
- The normal way to turn on <i>mumamo-mode</i> has
- changed. There are now functions that you can use
- in <i>auto-mode-alist</i> to directly set up the
- buffer for mumamo-mode. The available functions
- are in the
- variable <i>mumamo-defined-turn-on-functions</i>.
- <p>
- You are not supposed to call mumamo-mode
- yourself any more and mumamo-global-mode is
- gone. So is also mumamo-chunk-family-by-mode and
- mumamo-filenames-list. The functionality those
- gave are all replaced by the new functions for
- turning on mumamo mode.
- </p>
- </li>
- <li>
- Added support for buffer local values in
- hooks. This is necessary for example to support
- minor modes that are meant to be buffer local but
- not major mode specific. Instructions for authors
- of this kind of minor modes are in the file
- mumamo.el.
- </li>
- <li>
- Added support for Django.
- </li>
- <li>
- Added support for Embperl.
- </li>
- <li>
- Added support for PHP Smarty. The <i>{literal}
- ... {/literal}</i> construct is not supported.
- This mean that you can not use &lt;style ..> or &lt;script ..>.
- </li>
- <li>
- Added support for imenu for the main major mode.
- Turned on this by default in nxhtml-mode.
- </li>
- <li>
- Made the temporary replacement of the
- attr="&lt;?php ... ?&gt;" a bit better. They are
- now more visible and also still mumamo chunks
- during the temporary replacement.
- </li>
- <li>
- Added support for <i>flymake-mode</i>.
- Maybe add support for checking chunks?
- </li>
- <li>
- Printing: Added htmlfontify.el and
- hfyview.el. These makes if possible to print a
- buffer fontified with <i>mumamo-mode</i> on in
- colors (through your web browser). There is an
- example of the capabilities of htmlfontify <a
- href="htmlfontify-example.html">here</a> (made
- with a little function in hfyview.el).
- </li>
- </ul>
- </li>
- <li>
- PHP:
- <ul>
- <li>
- Did a first merge with Aaron Hawleys fixes for php-mode.el.
- </li>
- </ul>
- </li>
- <li>
- CSS: Upgraded to Stefan's latest css-mode.el.
- </li>
- <li>
- Fictive XHTML Validation Headers: Changed the way they
- are turned on. They may now be turned on when
- mumamo-mode is turned on.
- </li>
- <li>
- Some users want to use their own patched version of
- nXml. Next version of Emacs will come with
- nXml. Therefore, the loading routine for nXhtml now
- checks if nXml is is already loaded. Thanks to Eric
- Lilja for testing this. Eric also made me aware of
- that if nXhtml was placed in the site-lisp directory
- tree then things did not work as I expected. I think I
- have corrected that by placing a <i>.nosearch</i> file
- at the top of the nxml tree in nXhtml.
- </li>
- <li>
- Restructured the directories. Moved some files out of
- the <i>nxhtml</i> subdir. Some of them went into the
- <i>util</i> subdir (those are written by me) and some
- to the new subdir <i>related</i> (those that are
- inherited from others, maybe changed by me - most
- often to work with mumamo-mode).
- </li>
- <li>
- Changed all licenses to be GNU GPL.
- </li>
- <li>
- Additions to tidy support: It is now possible to use
- the tidy support to tidy the XHTML part of php etc.
- (Thanks to Hadron for this suggestion.)
- </li>
- <li>
- Added <i>winsize.el</i> which allows interactive resizing of
- windows. Also added <i>winsav.el</i> which adds the
- capability to rotate window configurations and also to
- save window configuration to file.
- </li>
- <li>
- Made nXhtml work with CVS Emacs 23.0.50.1.
- </li>
- <li>
- Added freemind.el to the parcel. After all FreeMind
- supports web publishing too so why not have the Emacs
- support here ...
- </li>
- </ul>
- </dd>
- <dt id="v1.10">1.10</dt>
- <dd id="v1.10-dd">
- Just jumped the version number for the new release of
- nXhtml. There are really significant changes in this
- release, not only minor bug fixes.
- </dd>
- <dt id="v1.11">1.11</dt>
- <dd id="v1.11-dd">
- Minor bug fixes to completion. Added fictive validation
- header to completion alternatives when buffer is empty and
- mumamo is used.
- </dd>
- <dt id="v1.12">1.12</dt>
- <dd id="v1.12-dd">
- <ul>
- <li>
- Fixed a bug in image link insertion in nxhtml-mode, thanks Niels Giesen!
- </li>
- <li>
- Restructured, reordered and documented mumamo.el. It is now two
- separate files, mumamo.el and mumamo-fun.el.
- </li>
- <li>
- Added move by chunk to the nXhtml menu.
- </li>
- </ul>
- </dd>
- <dt id="v1.13">1.13</dt>
- <dd id="v1.13-dd">
- <ul>
- <li>
- Better handling of the case when no validation header
- is needed and the user tries to turn it on.
- </li>
- <li>
- Added .phtml as php file.
- </li>
- </ul>
- </dd>
- <dt id="v1.14">1.14</dt>
- <dd id="v1.14-dd">
- <ul>
- <li>
- Completion of links in XHTML was broken. Fixed, thanks
- to Niels Giesen.
- </li>
- </ul>
- </dd>
- <dt id="v1.15">1.15</dt>
- <dd id="v1.15-dd">
- <ul>
- <li>
- Added `mumamo-map' keymap.
- </li>
- <li>
- Added a keymap to all multi major modes.
- </li>
- <li>
- Some more refinement to fictive validation headers.
- </li>
- </ul>
- </dd>
- <dt id="v1.16">1.16</dt>
- <dd id="v1.16-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Changes to indentation:
- <ul>
- <li>
- Removed indent-region-mode since that
- functionality is now in indent-for-tab-command in
- Emacs 22.
- </li>
- <li>
- Removed some code that checked if indentation was 0.
- </li>
- <li>
- Added indent-for-tab-command to mumamo-map.
- </li>
- </ul>
- </li>
- <li>
- Reordering and renaming:
- <ul>
- <li>
- Reordered and move some functions in mumamo.el et al.
- Added new file nxhtml-mumamo.el.
- </li>
- <li>
- Renamed <i>define-mumamo-turn-on</i> to
- <i>define-mumamo-multi-major-mode</i>.
- </li>
- <li>
- Removed the ending <i>-turn-on</i> from the
- functions defined by the macro above.
- </li>
- <li>
- Introduced <i>multi major mode</i> as a name for
- the functions defined by the macro above. Those
- works in many respects like major mode functions,
- but they support multiple major modes in a buffer.
- </li>
- </ul>
- </li>
- <li>
- Added support for noweb as multiple major mode.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.17">1.17</dt>
- <dd id="v1.17-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support for flyspell.
- </li>
- </ul>
- </li>
- <li>
- Bug fixes to the version of find-recursive.el that
- ships with nXhtml. Thanks to Cezar Halmagean.
- </li>
- <li>
- Added tabkey2.el which tries to make it easy to use
- the Tab key for completion. (You must load it and turn
- on tabkey2-mode to use it.)
- </li>
- <li>
- Folding:
- <ul>
- <li>
- Added <i>nxhtml-heading-element-name-regexp</i> as
- default for nxml style folding.
- </li>
- <li>
- Some changes to fold-dwim.el.
- </li>
- </ul>
- </li>
- <li>
- AppMenu:
- <ul>
- <li>
- Simplified: Removed the possibility to
- automatically show minor and major mode menus.
- There is now only one list, <i>appmenu-alist</i>.
- </li>
- <li>
- Added menu item <i>At Current Point</i> for
- bindings found in character and overlay keymaps at
- point. Those you always forget.
- </li>
- </ul>
- </li>
- <li>
- Physical line:
- <ul>
- <li>
- Added physical-line.el to nXhtml.
- </li>
- <li>
- Added new functions to move to beginning and end
- of line to ourcomments-util.el that supports
- physical-line.el.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.18">1.18</dt>
- <dd id="v1.18-dd">
- <ul>
- <li>
- Better Tab completion in tabkey2.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.19">1.19</dt>
- <dd id="v1.19-dd">
- <ul>
- <li>
- Even better Tab completion in tabkey2.el.
- </li>
- </ul>
- </dd>
- <dt id="v1.20">1.20</dt>
- <dd id="v1.20-dd">
- <ul>
- <li>
- Once again even better Tab completion in tabkey2.el.
- </li>
- <li>
- Fixed bug in hiding of validation errors (they could
- disappear totally).
- </li>
- <li>
- Cleaned up menus in nXhtml.
- </li>
- </ul>
- </dd>
- <dt id="v1.21">1.21</dt>
- <dd id="v1.21-dd">
- <ul>
- <li>
- Added a bit support for dired (upload, browse, browse
- remote).
- </li>
- <li>
- Fixed some strange menu problems (i hope).
- </li>
- </ul>
- </dd>
- <dt id="v1.22">1.22</dt>
- <dd id="v1.22-dd">
- <ul>
- <li>
- Bug fix.
- </li>
- </ul>
- </dd>
- <dt id="v1.23">1.23</dt>
- <dd id="v1.23-dd">
- <ul>
- <li>
- Bug fix.
- </li>
- </ul>
- </dd>
- <dt id="v1.24">1.24</dt>
- <dd id="v1.24-dd">
- <ul>
- <li>
- Tried again to make hexcolor-mode more readable.
- </li>
- <li>
- Mumamo:
- <ul>
- <li>
- Added support for <i>hi-lock-mode</i>. At present
- it might however be very puzzling. The hilight
- added by hi-lock-mode may be hidden by the
- overlays used by mumamo. Tip: you can always use
- the face <span
- style="font-size:1.5em;">hi-black-hb</span>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.25">1.25</dt>
- <dd id="v1.25-dd">
- <ul>
- <li>
- Mumamo:
- <ul>
- <li>
- Handle hi-lock-mode in a more general way
- using <i>font-lock-mode-hook</i>.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.26">1.26</dt>
- <dd id="v1.26-dd">
- <ul>
- <li>
- nxhtml-mode:
- <ul>
- <li>
- Removed the indent line patch for nxml-mode.
- </li>
- <li>
- Better test for empty page during completion.
- </li>
- </ul>
- </li>
- <li>
- tabkey2-mode:
- <ul>
- <li>
- A lot of improvements.
- </li>
- </ul>
- </li>
- </ul>
- </dd>
- <dt id="v1.27">1.27</dt>
- <dd id="v1.27-dd">
- <ul>
- <li>
- Fixed a bug in html-site when comparing file
- names. File names where not made unique before
- comparision.
- </li>
- <li>
- Fixed documentation and reordered code in mumamo.el
- and mumamo-fun.el.
- </li>
- <li>
- Fixed a bug in mumamo concerning indentation. The
- desired indentation function replacement where not
- used.
- </li>
- <li>
- Fixed tabkey2 bugs.
- </li>
- <li>
- Changed javascript.el indentation to make it work with
- mumamo.el.
- </li>
- <li>
- Introduced the function
- <i>mumamo-make-variable-buffer-permanent</i> as an aid for
- minor mode authors.
- </li>
- <li>
- Made nXhtml menu available in sub-chunks.
- </li>
- <li>
- Included a slightly changed version of Steve Yegge's
- js2.el + js2-fl-mode.el with support for
- jit-lock-mode. This support has some flaws and maybe
- js2 is not ready for use, I am not sure. However if you want
- to use this instead of Karl Landströms javascript-mode
- then please customize <i>mumamo-major-modes</i>.
- </li>
- </ul>
- </dd>
- </dl>
- </div>
- </div>
-
- <hr class="footer"/>
- <p class="footer">
- Copyright &copy; 2008 OurComments.org
- --
- Latest update 2008-03-09
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/ind-0-error.php b/emacs.d/nxhtml/tests/in/ind-0-error.php
deleted file mode 100644
index 6bbdb24..0000000
--- a/emacs.d/nxhtml/tests/in/ind-0-error.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Lab 2 - Layout Control - Task 2 - XHTML/CSS version</title>
- </head>
- <body>
- <?php
- // comment
- $thepage = $_GET['page'];
-
- if (empty($thepage)) {
- require('main-div-a.html');
- }
- else {
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- for (;;) {
- }
- }
- ?>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/indent-bug-html-mode.html b/emacs.d/nxhtml/tests/in/indent-bug-html-mode.html
deleted file mode 100644
index bc77985..0000000
--- a/emacs.d/nxhtml/tests/in/indent-bug-html-mode.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>Indentation bug at &lt;</title>
-</head>
-<body>
-Try to indent the whole file several times.
-The first time both the html and the php code is badly indented.
-<div id="main">
-<?php
-for ($i = 0; $i < 4711; ++$i) {
-}
-?>
-</div>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/java.java b/emacs.d/nxhtml/tests/in/java.java
deleted file mode 100644
index 8ba2940..0000000
--- a/emacs.d/nxhtml/tests/in/java.java
+++ /dev/null
@@ -1,13 +0,0 @@
-public class FirstProgram
-
-{
-
- public static void main(String[] args)
-
- {
-
- System.out.println("Hey! you are going to compile and run your first Java program");
-
- }
-
-}
diff --git a/emacs.d/nxhtml/tests/in/jcl-080802-index.html.erb b/emacs.d/nxhtml/tests/in/jcl-080802-index.html.erb
deleted file mode 100644
index 8478b3d..0000000
--- a/emacs.d/nxhtml/tests/in/jcl-080802-index.html.erb
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>Mensajes recibidos</h2>
-<p class="small" style="color:red;margin: 10px">
- Solo se muestran los ultimos 10 mensajes, aquí hay que añadir
- paginación y ¿lógica?.
-</p>
-<div id="received-messages" class="message-list">
- <% for message in @messages %>
- <div id="received-message-<%= message.id -%>" class="received-message">
- <span class="header"><%= message.sender.roster_name %> escribió a fecha <%= message.created_at -%></span>
- <div class="content">
- <%=h truncate(message.message, 100) %>
- </div>
- <%= link_to "Mostrar", message_path(message) %>
-</div>
-<% end %>
-</div>
diff --git a/emacs.d/nxhtml/tests/in/jcl-080802-messages_controller.rb b/emacs.d/nxhtml/tests/in/jcl-080802-messages_controller.rb
deleted file mode 100644
index 6fb0555..0000000
--- a/emacs.d/nxhtml/tests/in/jcl-080802-messages_controller.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-class MessagesController < BaseController
-
- before_filter :enable_chat
- skip_before_filter :verify_authenticity_token
-
- # GET /messages
- # GET /messages.xml
- def index
- @messages = ChatMessage.to_user(current_user).last_week.all
-
- respond_to do |format|
- format.html # index.html.erb
- format.xml { render :xml => @messages }
- end
- end
-
- # GET /messages/1
- # GET /messages/1.xml
- def show
- @message = ChatMessage.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @message }
- end
- end
-
- # POST /messages
- # POST /messages.xml
- def create
- @message = ChatMessage.new(:receiver_id => params[:receiver_id],
- :message => params[:messageText],
- :sender => current_user)
-
- if @message.save
- send_message
- end
-
- render :nothing => true
-
- end
-
- protected
-
- def send_message
- formatted_message = render_to_string(:partial => "message_for_chat", :object => @message)
- shooter_action_for_receiver = render_to_string :update do |page|
- page.call "showMessage", @message.sender.to_param, formatted_message
- end
- shooter_action_for_sender = render_to_string :update do |page|
- page.call "showMessage", @message.receiver.to_param, formatted_message
- page.call "messageTextBox.reset"
- end
- Meteor.shoot 'futura-chat', shooter_action_for_sender, [@message.sender.login]
- Meteor.shoot 'futura-chat', shooter_action_for_receiver, [@message.receiver.login]
- end
-end
diff --git a/emacs.d/nxhtml/tests/in/jj-081226.html b/emacs.d/nxhtml/tests/in/jj-081226.html
deleted file mode 100644
index 9599014..0000000
--- a/emacs.d/nxhtml/tests/in/jj-081226.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<script type="text/javascript">
- // <![CDATA[
- // Set this to the URL you used to fetch recommendations, whether you
- // fetched them on the client or the server.
- var request_url="%(json_url)s";
-
- // This function is used track click-throughs by fetching a web
- // beacon
- function trackClickThrough(elem) {
- var img = new Image();
- img.src = '%(beacon_url)s' +
- '?request_url=' + escape(request_url) +
- '&click_through_url=' + escape(elem.href);
- return true;
- }
- // ]]>
-</script>
-<p>
- <!--
- Imagine this is one of the recommendations that was returned.
- Just add an onclick handler that calls trackClickThrough.
- -->
- <a href="http://www.google.com"
- onclick="return trackClickThrough(this);">Click me!</a>
-</p>
-
diff --git a/emacs.d/nxhtml/tests/in/josh-091115-cancer_summary.xsl b/emacs.d/nxhtml/tests/in/josh-091115-cancer_summary.xsl
deleted file mode 100644
index 043e9d2..0000000
--- a/emacs.d/nxhtml/tests/in/josh-091115-cancer_summary.xsl
+++ /dev/null
@@ -1,490 +0,0 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:set="http://exslt.org/sets">
-
- <xsl:output method="html"/>
- <xsl:output encoding="utf-8"/>
- <xsl:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
- <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
-
- <xsl:template match="/">
-
- <html>
- <head>
- <title>Cancer Summary: <xsl:value-of select="//individual/@name"/>&#160;<xsl:value-of select="//individual/@gender"/>&#160;<xsl:value-of select="//individual/@id"/></title>
-
- <link rel="shortcut icon" href="/resources/report_resources/apipe_dashboard/images/gc_favicon.png" type="image/png" />
-
- <link rel="stylesheet" href="/resources/report_resources/apipe_dashboard/css/master.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/resources/report_resources/apipe_dashboard/css/tablesorter.css" type="text/css" media="screen" />
- <script type="text/javascript" src="/resources/report_resources/jquery/jquery.js"></script>
- <script type="text/javascript" src="/resources/report_resources/jquery/jquery.tablesorter.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#tier_1_snps").tablesorter({
- // sort on first column, ascending
- // sortList: [[0,0]]
- });
-
- $("#tier_1_insertions").tablesorter({
- // sort on first column, ascending
- //sortList: [[0,0]]
- });
-
- $("#tier_1_deletions").tablesorter({
- // sort on first column, ascending
- //sortList: [[0,0]]
- });
- });
- </script>
- <link rel="stylesheet" href="/resources/report_resources/cancer_card/css/zoom2.css" type="text/css" media="screen"></link>
- <script type="text/javascript" src="/resources/report_resources/cancer_card/js/dom-drag.js"></script>
-
- <script type="text/javascript" src="/resources/report_resources/cancer_card/js/HotSpot2.js"></script>
- <script type="text/javascript">
- addEvent(window, 'load', function() {
- HotSpotController.init("zoomImage",300, '<xsl:value-of select="//individual/circos-images/@large"/>','ZTbutton'); });
-
- function addEvent(obj, evType, fn) {
- if (obj.addEventListener) {
- obj.addEventListener(evType, fn, false);
- return true;
- } else if (obj.attachEvent) {
- var r = obj.attachEvent("on" + evType, fn);
- return r;
- } else {
- return false;
- }
- }
- </script>
-
- <script type="text/javascript">
- $(document).ready(function() {
- $("input[type=checkbox]").click(function() {
- alert("Clicked: " + this.value);
- });
- });
- </script>
-
- <style type="text/css" media="screen">
- table.info_table_group td {
- padding-right: 10px;
- }
-
- div.content_padding {
- padding: 0 10px 20px 10px;
- }
-
- h3.group_header {
- border-bottom: 2px solid #CCC;
- }
- div.circos_graph {
- float: left;
- width: 920px;
- }
-
- form.status_selector {
- margin: 0;
- padding: 0;
- float: right;
- font-size: 85%;
- font-weight: normal;
- }
-
- form.status_selector table {
- margin: 0;
- padding: 0;
- }
-
- form.status_selector table td.lbl {
- padding-right: 10px;
- padding-left: 5px;
- }
-
-
- form.status_selector table td.table_lbl {
- font-weight: bold;
- padding-right: 8px;
- padding-left: 3px;
- }
- </style>
- </head>
-
- <body>
- <div class="container">
- <div class="background">
- <div class="page_header">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <img src="/resources/report_resources/apipe_dashboard/images/gc_header_logo2.png" width="44" height="45" align="absmiddle" />
- </td>
- <td>
- <h1><xsl:value-of select="//individual/@name"/>&#160;<xsl:value-of select="//individual/@gender"/>&#160;<xsl:value-of select="//individual/@id"/>&#160;Cancer Summary</h1>
- </td>
- </tr>
- </table>
- </div>
- <div class="page_padding">
- <!-- <h2 class="page_title icon_instrument_data">Flow Cell <xsl:value-of select="//flow-cell/@id"/> Status</h2> -->
- <table cellpadding="0" cellspacing="0" border="0" class="info_table_group">
- <tr>
- <td>
- <h3 class="group_header">Clinical Data</h3>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <table border="0" cellpadding="0" cellspacing="0" class="info_table" width="100%">
- <colgroup>
- <col/>
- <col width="100%"/>
- </colgroup>
- <tr><td class="label">Name:</td><td class="value"><xsl:value-of select="//individual/@name"/></td></tr>
- <tr>
- <td class="label">Gender:</td>
- <td class="value">
- <xsl:choose>
- <xsl:when test="string(//individual/@gender)">
- <xsl:value-of select="//individual/@gender"/>
- </xsl:when>
- <xsl:otherwise>
- Not Provided
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- <tr><td class="label">ID:</td><td class="value"><xsl:value-of select="//individual/@id"/></td></tr>
-
- </table>
- </td>
- <td>
- <table border="0" cellpadding="0" cellspacing="0" class="info_table" width="100%" style="float: left;">
- <colgroup>
- <col/>
- <col width="100%"/>
- </colgroup>
-
- <tr><td class="label">Year Diagnosed:</td><td class="value"><xsl:value-of select="//clinical-data/@diagnosis-year"/></td></tr>
- <tr><td class="label">Diagnosed at Age:</td><td class="value"><xsl:value-of select="//clinical-data/@diagnosis-age"/></td></tr>
- <xsl:choose>
- <xsl:when test="//clinical-data/@alive = '1'">
- <tr><td class="label">Survived:</td><td class="value">Yes</td></tr>
- </xsl:when>
- <xsl:otherwise>
- <tr><td class="label">Survived:</td><td class="value">No</td></tr>
- <tr><td class="label">Days Survived:</td><td class="value"><xsl:value-of select="//clinical-data/@days-survived"/></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </td>
- <td>
- <table border="0" cellpadding="0" cellspacing="0" class="info_table" width="100%" style="float: left;">
- <colgroup>
- <col/>
- <col width="100%"/>
- </colgroup>
-
- <tr><td class="label">Treatment:</td><td class="value"><xsl:value-of select="//clinical-data/@treatment"/></td></tr>
- <tr><td class="label">Outcome:</td><td class="value"><xsl:value-of select="//clinical-data/@outcome"/></td></tr>
- <tr><td class="label">AMP:</td><td class="value"><xsl:value-of select="//clinical-data/@amp"/></td></tr>
-
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <h3 class="group_header">Sequencing Stats</h3>
- <table border="0" cellpadding="0" cellspacing="0" class="info_table" width="100%">
- <colgroup>
- <col/>
- <col width="100%"/>
- </colgroup>
- <tr><td class="label">Normal Coverage:</td><td class="value"><xsl:value-of select="//samples/sample/models/model/@normal-haploid-coverage"/>X</td></tr>
- <tr><td class="label">Tumor Coverage:</td><td class="value"><xsl:value-of select="//samples/sample/models/model/@tumor-haploid-coverage"/>X</td></tr>
- </table>
- </td>
- </tr>
- </table>
- <hr style="margin-bottom: 0;"/>
- <h2 class="report_section" style="margin-bottom: 0; margin-top: 0">Circos Graph&#160;&#160;&#160;<a id="ZTbutton" href="javascript: void(0);" style="font-size: 85%; font-weight: normal;">[toggle zoom]</a></h2>
- <p id="ZTthumbnail">
- <img>
- <xsl:attribute name="id">zoomImage</xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="//individual/circos-images/@small"/></xsl:attribute>
- <xsl:attribute name="width">920</xsl:attribute>
- <xsl:attribute name="height">920</xsl:attribute>
- </img>
- </p>
- <h2 class="report_section" style="margin-bottom: 0">Tier 1 SNPs
-<!-- <form class="status_selector">
- <input type="hidden" name="table" value="tier_1_snps"/>
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td class="table_lbl">Show:</td>
- <xsl:for-each select="set:distinct(//variants/snps/snp/@validation-status)">
- <td class="cb">
- <input type="checkbox"><xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute></input>
- </td>
- <td class="lbl">
- <xsl:value-of select="."/>
- </td>
- </xsl:for-each>
- </tr>
- </table>
- </form>
--->
-
- </h2>
- <table id="tier_1_snps" class="list tablesorter" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 0;">
- <xsl:choose>
- <xsl:when test="count(//variants/snps/snp) > 0">
-
- <thead>
- <tr>
- <th>validation status</th>
- <th>chromosome</th>
- <th class="last">start</th>
- <th class="last">reference</th>
- <th class="last">variant</th>
- <th class="last">gene</th>
- <th class="last">amino acid change</th>
- <th class="last">trv type</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="//variants/snps/snp">
- <xsl:sort select="@validation-status" data-type="text" order="ascending"/>
- <xsl:sort select="@chromosome" data-type="number" order="ascending"/>
- <tr>
- <td class="validation_status"><xsl:value-of select="@validation-status"/></td>
- <td><xsl:value-of select="@chromosome"/></td>
- <td class="last">
- <xsl:variable name="start" select="@start"/><xsl:value-of select="format-number($start, '#,##0')"/>
- </td>
- <td class="last"><xsl:value-of select="@reference-allele"/></td>
- <td class="last"><xsl:value-of select="@variant-allele"/></td>
- <td class="last"><xsl:value-of select="@gene"/></td>
- <td class="last"><xsl:value-of select="@amino-acid-change"/></td>
- <td class="last"><xsl:value-of select="@trv-type"/></td>
- </tr>
- </xsl:for-each>
- </tbody>
- </xsl:when>
- <xsl:otherwise>
- <tr><td><span class="note">None found.</span></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
-
- <h2 class="report_section" style="margin-bottom: 0">Tier 1 Insertions</h2>
- <table id="tier_1_insertions" class="list tablesorter" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 0;">
- <xsl:choose>
- <xsl:when test="count(//variants/insertions/insertion) > 0">
- <thead>
- <tr>
- <th>validation status</th>
- <th>chromosome</th>
- <th class="last">start</th>
- <th class="last">stop</th>
- <th class="last">variant</th>
- <th class="last">gene</th>
- <th class="last">amino acid change</th>
- <th class="last">trv type</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="//variants/insertions/insertion">
- <xsl:sort select="@validation-status" data-type="text" order="ascending"/>
- <xsl:sort select="@chromosome" data-type="number" order="ascending"/>
- <tr>
- <td class="validation_status"><xsl:value-of select="@validation-status"/></td>
- <td><xsl:value-of select="@chromosome"/></td>
- <td class="last">
- <xsl:variable name="start" select="@start"/><xsl:value-of select="format-number($start, '#,##0')"/>
- </td>
- <td class="last">
- <xsl:variable name="stop" select="@stop"/><xsl:value-of select="format-number($stop, '#,##0')"/>
- </td>
- <td class="last"><xsl:value-of select="@variant-allele"/></td>
- <td class="last"><xsl:value-of select="@gene"/></td>
- <td class="last"><xsl:value-of select="@amino-acid-change"/></td>
- <td class="last"><xsl:value-of select="@trv-type"/></td>
- </tr>
- </xsl:for-each>
- </tbody>
- </xsl:when>
- <xsl:otherwise>
- <tr><td><span class="note">None found.</span></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
-
- <h2 class="report_section" style="margin-bottom: 0">Tier 1 Deletions</h2>
- <table id="tier_1_deletions" class="list tablesorter" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 0;">
- <xsl:choose>
- <xsl:when test="count(//variants/deletions/deletion) > 0">
- <thead>
- <tr>
- <th>validation status</th>
- <th>chromosome</th>
- <th class="last">start</th>
- <th class="last">stop</th>
- <th class="last">reference</th>
- <th class="last">gene</th>
- <th class="last">amino acid change</th>
- <th class="last">trv type</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="//variants/deletions/deletion">
- <xsl:sort select="@validation-status" data-type="text" order="ascending"/>
- <xsl:sort select="@chromosome" data-type="number" order="ascending"/>
- <tr>
- <td class="validation_status"><xsl:value-of select="@validation-status"/></td>
- <td><xsl:value-of select="@chromosome"/></td>
- <td class="last">
- <xsl:variable name="start" select="@start"/><xsl:value-of select="format-number($start, '#,##0')"/>
- </td>
- <td class="last">
- <xsl:variable name="stop" select="@stop"/><xsl:value-of select="format-number($stop, '#,##0')"/>
- </td>
- <td class="last"><xsl:value-of select="@reference-allele"/></td>
- <td class="last"><xsl:value-of select="@gene"/></td>
- <td class="last"><xsl:value-of select="@amino-acid-change"/></td>
- <td class="last"><xsl:value-of select="@trv-type"/></td>
- </tr>
- </xsl:for-each>
- </tbody>
- </xsl:when>
- <xsl:otherwise>
- <tr><td><span class="note">None found.</span></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
-
- <h2 class="report_section" style="margin-bottom: 0;">Structural Variations (translocations)</h2>
- <table id="sv_translocations" class="list" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 0;">
- <xsl:choose>
- <xsl:when test="count(//structural-variants/translocations/translocation) > 0">
- <thead>
- <tr>
- <th>validation status</th>
- <th class="last">chromosome</th>
- <th class="last">position</th>
- <th>&#160;</th>
- <th class="last">chromosome</th>
- <th class="last">position</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="//structural-variants/translocations/translocation">
- <xsl:sort select="@validation-status" data-type="text" order="ascending"/>
- <xsl:sort select="start/@chromosome" data-type="number" order="ascending"/>
- <tr>
- <td class="validation_status"><xsl:value-of select="@validation-status"/></td>
- <td class="last"><xsl:value-of select="start/@chromosome"/></td>
- <td class="last">
- <xsl:variable name="start_position" select="start/@position"/><xsl:value-of select="format-number($start_position, '#,##0')"/>
- </td>
-
- <td class="last"><span style="font-size: 100%; font-weight: bold;">&#8594;</span></td>
-
- <td class="last"><xsl:value-of select="stop/@chromosome"/></td>
- <td class="last">
- <xsl:variable name="stop_position" select="stop/@position"/><xsl:value-of select="format-number($stop_position, '#,##0')"/>
- </td>
- </tr>
- </xsl:for-each>
- </tbody>
- </xsl:when>
- <xsl:otherwise>
- <tr><td><span class="note">None found.</span></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
-
- <h2 class="report_section" style="margin-bottom: 0;">Structural Variations (insertions)</h2>
- <table id="sv_insertions" class="list" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 0;">
- <tbody>
- <xsl:choose>
- <xsl:when test="count(//structural-variants/insertions/insertion) > 0">
- <thead>
- <tr>
- <th>validation status</th>
- <th class="last">chromosome</th>
- <th class="last">start</th>
- <th class="last">stop</th>
- <th class="last">size</th>
- </tr>
- </thead>
- <xsl:for-each select="//structural-variants/insertions/insertion">
- <xsl:sort select="@validation-status" data-type="number" order="ascending"/>
- <xsl:sort select="start/@chromosome" data-type="number" order="ascending"/>
- <tr>
- <td class="validation_status"><xsl:value-of select="@validation-status"/></td>
- <td class="last"><xsl:value-of select="start/@chromosome"/></td>
- <td class="last">
- <xsl:variable name="start_position" select="start/@position"/><xsl:value-of select="format-number($start_position, '#,##0')"/>
- </td>
- <td class="last">
- <xsl:variable name="stop_position" select="stop/@position"/><xsl:value-of select="format-number($stop_position, '#,##0')"/>
- </td>
- <xsl:variable name="size" select="@size"/><xsl:value-of select="format-number($size, '#,##0')"/>
-
- </tr>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <tr><td><span class="note">None found.</span></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </tbody>
- </table>
-
- <h2 class="report_section" style="margin-bottom: 0;">Structural Variations (deletions)</h2>
- <table id="sv_deletions" class="list" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 0;">
- <xsl:choose>
- <xsl:when test="count(//structural-variants/deletions/deletion) > 0">
- <thead>
- <tr>
- <th>validation status</th>
- <th class="last">chromosome</th>
- <th class="last">start</th>
- <th class="last">stop</th>
- <th class="last">size</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="//structural-variants/deletions/deletion">
- <xsl:sort select="@validation-status" data-type="number" order="ascending"/>
- <xsl:sort select="start/@chromosome" data-type="number" order="ascending"/>
- <tr>
- <td class="validation_status"><xsl:value-of select="@validation-status"/></td>
- <td class="last"><xsl:value-of select="start/@chromosome"/></td>
- <td class="last">
- <xsl:variable name="start_position" select="start/@position"/><xsl:value-of select="format-number($start_position, '#,##0')"/>
- </td>
- <td class="last">
- <xsl:variable name="stop_position" select="stop/@position"/><xsl:value-of select="format-number($stop_position, '#,##0')"/>
- </td>
- <td class="last">
- <xsl:variable name="size" select="@size"/><xsl:value-of select="format-number($size, '#,##0')"/>
- </td>
- </tr>
- </xsl:for-each>
- </tbody>
- </xsl:when>
- <xsl:otherwise>
- <tr><td><span class="note">None found.</span></td></tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </div>
- </div>
- </div>
- </body>
- </html>
-
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/emacs.d/nxhtml/tests/in/jump-parse.html b/emacs.d/nxhtml/tests/in/jump-parse.html
deleted file mode 100644
index 68b0cf4..0000000
--- a/emacs.d/nxhtml/tests/in/jump-parse.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<h1>Listing People</h1>
-
-<table>
-<% for person in @people %>
-<tr>
-</tr>
-</table>
diff --git a/emacs.d/nxhtml/tests/in/jump-parse.rhtml b/emacs.d/nxhtml/tests/in/jump-parse.rhtml
deleted file mode 100644
index 1848b6c..0000000
--- a/emacs.d/nxhtml/tests/in/jump-parse.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<h1>Listing People</h1>
-
-<table>
-
-<% <testnxmlparsed> for person in @people %>
-
-<tr>
-</tr>
-</table>
diff --git a/emacs.d/nxhtml/tests/in/kp-080604.php b/emacs.d/nxhtml/tests/in/kp-080604.php
deleted file mode 100644
index a8b40c3..0000000
--- a/emacs.d/nxhtml/tests/in/kp-080604.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-require_once dirname(__FILE__) . '/foo.php';
-require_once dirname(__FILE__) . '/bar.php';
-
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-1.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-1.html
deleted file mode 100644
index 8d2a355..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-1.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-2.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-2.html
deleted file mode 100644
index 8203f63..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-2.html
+++ /dev/null
@@ -1,174 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { % block pagestyle % }
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- { % endblock % }
- </style>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.preload.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/swfobject.js"></script>
- <script type="text/javascript">
- function image_loaded(info) {
- /* now we know that the image is loaded, we can add in to the
- * document and position it as we want */
- // create the element, set the ID and add in to the DOM,
- // otherwise it won't have dimensions
- var pointer = $('<img src="' + info.image + '" />');
- pointer.attr('id', 'pointer');
- var frame = $('#container');
- pointer.appendTo(frame);
-
- // put it into the center and make top & left be in the center
- // of the image (cool hack)
- pointer.css({
- position: 'absolute',
- top: '50%',
- left: '50%',
- margin: (-pointer.height() / 2) + 'px 0 0 ' +
- (-pointer.width() / 2) + 'px'
- });
-
- // continue with the animation now
- play_animation();
- }
-
- function prepare_animation() {
- /* prepares animation by preloading stuff */
- // hide all panels
- $('a > img').css('visibility', 'hidden');
- // create the logo - 'pointer': preload and center it
- $.preload(['logo'], {
- base: '{ % media_url % }/homepage/img/intro/',
- ext: '.png',
- onFinish: image_loaded
- });
- }
-
- function play_animation() {
- /* plays the animations, adds callbacks */
- var frame = $('#container');
- var pointer = $('#pointer');
-
- /* run the effects now: first fade in the pointer, then move it
- * to the edge of the frame, then fade in the panels
- */
- pointer.hide().fadeIn(2000)
- .animate({
- top: pointer.height() / 2 + 10,
- left: frame.width() - pointer.width() / 2
- }, 3000, undefined, function() {
- var panels = $('a > img');
- // show panels, fade them in and add callbacks
- panels.css({ visibility: 'visible',
- opacity: '0'})
- .fadeTo(1000, 0.5)
- .mouseover(fade_in)
- .mouseout(fade_out);
- });
- }
-
- function fade_in() {
- /* fade in the panel */
- $(this).fadeTo(300, 1);
- }
-
- function fade_out() {
- /* fade out the panel */
- $(this).fadeTo(300, 0.5);
- }
-
- // start JS magic when the page has loaded
- $(document).ready(prepare_animation);
- </script>
-
- </head>
-
-{% block body %}
-<body>
-
-<div id="distance"></div>
-<div id="container">
- <div id="flashcontent">
-
- <table border="0">
- <tr>
- <td colspan="3"><div style="height: 63px;" /></td>
- </tr>
- <tr>
- <td><a href="/junkers/"><img src="{% media_url %}/homepage/img/intro/panel_junkers.jpg" alt="junkers" width="166" height="221" /></a></td>
- <td><a href="/zeppelin/"><img src="{% media_url %}/homepage/img/intro/panel_zeppelin.jpg" alt="zeppelin" width="168" height="221" /></a></td>
- <td><a href="/maximilian/"><img src="{% media_url %}/homepage/img/intro/panel_maximilian.jpg" alt="maximilian" width="162" height="221" /></a></td>
- </tr>
- <tr>
- <td colspan="3"><div style="height: 66px;" /></td>
- </tr>
- </table>
- </div>
-
- <script type="text/javascript">
- // <![CDATA[
- var so = new SWFObject("{% media_url % }/homepage/swf/intro_{ % translate "LANGUAGE_NAME" % }.swf", "intro", "500", "370", "9", "#FFF");
- so.addParam("allowScriptAccess", "always");
- so.write("flashcontent");
- // ]]>
- </script>
-
-</div>
-</div>
-
-</body>
-{% endblock %}
-
-</html>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-2j.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-2j.html
deleted file mode 100644
index 6017ba3..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-2j.html
+++ /dev/null
@@ -1,174 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
-
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- { % endblock % }
- </style>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.preload.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/swfobject.js"></script>
- <script type="text/javascript">
- function image_loaded(info) {
- /* now we know that the image is loaded, we can add in to the
- * document and position it as we want */
- // create the element, set the ID and add in to the DOM,
- // otherwise it won't have dimensions
- var pointer = $('<img src="' + info.image + '" />');
- pointer.attr('id', 'pointer');
- var frame = $('#container');
- pointer.appendTo(frame);
-
- // put it into the center and make top & left be in the center
- // of the image (cool hack)
- pointer.css({
- position: 'absolute',
- top: '50%',
- left: '50%',
- margin: (-pointer.height() / 2) + 'px 0 0 ' +
- (-pointer.width() / 2) + 'px'
- });
-
- // continue with the animation now
- play_animation();
- }
-
- function prepare_animation() {
- /* prepares animation by preloading stuff */
- // hide all panels
- $('a > img').css('visibility', 'hidden');
- // create the logo - 'pointer': preload and center it
- $.preload(['logo'], {
- base: '{ % media_url % }/homepage/img/intro/',
- ext: '.png',
- onFinish: image_loaded
- });
- }
-
- function play_animation() {
- /* plays the animations, adds callbacks */
- var frame = $('#container');
- var pointer = $('#pointer');
-
- /* run the effects now: first fade in the pointer, then move it
- * to the edge of the frame, then fade in the panels
- */
- pointer.hide().fadeIn(2000)
- .animate({
- top: pointer.height() / 2 + 10,
- left: frame.width() - pointer.width() / 2
- }, 3000, undefined, function() {
- var panels = $('a > img');
- // show panels, fade them in and add callbacks
- panels.css({ visibility: 'visible',
- opacity: '0'})
- .fadeTo(1000, 0.5)
- .mouseover(fade_in)
- .mouseout(fade_out);
- });
- }
-
- function fade_in() {
- /* fade in the panel */
- $(this).fadeTo(300, 1);
- }
-
- function fade_out() {
- /* fade out the panel */
- $(this).fadeTo(300, 0.5);
- }
-
- // start JS magic when the page has loaded
- $(document).ready(prepare_animation);
- </script>
-
- </head>
-
-{% block body %}
-<body>
-
-<div id="distance"></div>
-<div id="container">
- <div id="flashcontent">
-
- <table border="0">
- <tr>
- <td colspan="3"><div style="height: 63px;" /></td>
- </tr>
- <tr>
- <td><a href="/junkers/"><img src="{% media_url %}/homepage/img/intro/panel_junkers.jpg" alt="junkers" width="166" height="221" /></a></td>
- <td><a href="/zeppelin/"><img src="{% media_url %}/homepage/img/intro/panel_zeppelin.jpg" alt="zeppelin" width="168" height="221" /></a></td>
- <td><a href="/maximilian/"><img src="{% media_url %}/homepage/img/intro/panel_maximilian.jpg" alt="maximilian" width="162" height="221" /></a></td>
- </tr>
- <tr>
- <td colspan="3"><div style="height: 66px;" /></td>
- </tr>
- </table>
- </div>
-
- <script type="text/javascript">
- // <![CDATA[
- var so = new SWFObject("{% media_url % }/homepage/swf/intro_{ % translate "LANGUAGE_NAME" % }.swf", "intro", "500", "370", "9", "#FFF");
- so.addParam("allowScriptAccess", "always");
- so.write("flashcontent");
- // ]]>
- </script>
-
-</div>
-</div>
-
-</body>
-{% endblock %}
-
-</html>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-3.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-3.html
deleted file mode 100644
index 2026eb5..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-3.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- {% block pagestyle %}
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- {% endblock %}
- </style>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.preload.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/swfobject.js"></script>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-4.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-4.html
deleted file mode 100644
index a350fc4..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-4.html
+++ /dev/null
@@ -1,58 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- {% block pagestyle %}
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- {% endblock %}
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-5.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-5.html
deleted file mode 100644
index 46fbf29..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-5.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-6.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-6.html
deleted file mode 100644
index 9fc7fae..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-6.html
+++ /dev/null
@@ -1,58 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { % block pagestyle % }
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- { % endblock % }
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-7.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-7.html
deleted file mode 100644
index 4cd4359..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-7.html
+++ /dev/null
@@ -1,56 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-8.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-8.html
deleted file mode 100644
index 4b91efa..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-8.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { block pagestyle }
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-9.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-9.html
deleted file mode 100644
index 03571e6..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-9.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- }
- { block pagestyle }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-a-notabs.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-a-notabs.html
deleted file mode 100644
index 61b64e3..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-a-notabs.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-a.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-a.html
deleted file mode 100644
index b1c5245..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-a.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-b.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-b.html
deleted file mode 100644
index 89ac466..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-b.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-c.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-c.html
deleted file mode 100644
index f797466..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-c.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-d.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-d.html
deleted file mode 100644
index f40fdf6..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-d.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-e.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-e.html
deleted file mode 100644
index 62aafe7..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-e.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-f.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-f.html
deleted file mode 100644
index ac73f84..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-f.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
-
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-g.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-g.html
deleted file mode 100644
index 9d302ce..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-g.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
-
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-h.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-h.html
deleted file mode 100644
index 5a0a166..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-h.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
-
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-i.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-i.html
deleted file mode 100644
index 66ed32f..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-i.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
-
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
- padding: 0;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-j.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-j.html
deleted file mode 100644
index e1beacd..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-j.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
-
- <style type="text/css">
-
- p {
- margin: 0;
- padding: 0;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-k.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing-k.html
deleted file mode 100644
index 9dc91e1..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing-k.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
-
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
-
- <style type="text/css">
- { xlock }
- p {
- margin: 0;
- padding: 0;
- }
-
- </style>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing.css b/emacs.d/nxhtml/tests/in/kubica-080516-freezing.css
deleted file mode 100644
index fdd782d..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing.css
+++ /dev/null
@@ -1,36 +0,0 @@
- {% block pagestyle %}
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- {% endblock %}
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing.html b/emacs.d/nxhtml/tests/in/kubica-080516-freezing.html
deleted file mode 100644
index 15caa88..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing.html
+++ /dev/null
@@ -1,174 +0,0 @@
-{% load transdigest helpers %}
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head profile="http://dublincore.org/documents/dcq-html/">
- <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
- <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
- <link rel="stylesheet" type="text/css" href="{% media_url %}/homepage/css/web0.5.css" media="screen" />
-
- <title>{% block title %}{% translate "WELCOME_TO_POINTTEC" %}{% endblock %}</title>
- <meta name="DC.title" content="Homepage of point TEC" />
- <meta name="DC.creator" content="Marek Kubica" />
- <meta name="DC.subject" content="Presentation of products" />
- <meta name="DC.publisher" content="point TEC" />
- <meta name="DC.rights" content="copyright by point TEC" />
- {% block htmlhead %}
-
- {% endblock %}
- <style type="text/css">
- {% block pagestyle %}
- * {
- margin: 0;
- padding: 0;
- }
- img {
- border: 0
- }
-
- html, body {
- height: 100%;
- }
-
- #distance {
- width: 1px;
- height: 50%;
- margin-bottom: -175px;
- }
- #container {
- position: relative;
- margin: 0 auto;
- height: 370px;
- width: 500px;
- background-color: #ffffff;
- }
- /* the horizontal bars */
- #flashcontent * div {
- background-color: #292926;
- }
-
- #pointer {
- display: block;
- margin: 0 auto;
- }
-
- {% endblock %}
- </style>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/jquery.preload.js"></script>
- <script type="text/javascript" src="{% media_url %}/homepage/js/swfobject.js"></script>
- <script type="text/javascript">
- function image_loaded(info) {
- /* now we know that the image is loaded, we can add in to the
- * document and position it as we want */
- // create the element, set the ID and add in to the DOM,
- // otherwise it won't have dimensions
- var pointer = $('<img src="' + info.image + '" />');
- pointer.attr('id', 'pointer');
- var frame = $('#container');
- pointer.appendTo(frame);
-
- // put it into the center and make top & left be in the center
- // of the image (cool hack)
- pointer.css({
- position: 'absolute',
- top: '50%',
- left: '50%',
- margin: (-pointer.height() / 2) + 'px 0 0 ' +
- (-pointer.width() / 2) + 'px'
- });
-
- // continue with the animation now
- play_animation();
- }
-
- function prepare_animation() {
- /* prepares animation by preloading stuff */
- // hide all panels
- $('a > img').css('visibility', 'hidden');
- // create the logo - 'pointer': preload and center it
- $.preload(['logo'], {
- base: '{% media_url %}/homepage/img/intro/',
- ext: '.png',
- onFinish: image_loaded
- });
- }
-
- function play_animation() {
- /* plays the animations, adds callbacks */
- var frame = $('#container');
- var pointer = $('#pointer');
-
- /* run the effects now: first fade in the pointer, then move it
- * to the edge of the frame, then fade in the panels
- */
- pointer.hide().fadeIn(2000)
- .animate({
- top: pointer.height() / 2 + 10,
- left: frame.width() - pointer.width() / 2
- }, 3000, undefined, function() {
- var panels = $('a > img');
- // show panels, fade them in and add callbacks
- panels.css({ visibility: 'visible',
- opacity: '0'})
- .fadeTo(1000, 0.5)
- .mouseover(fade_in)
- .mouseout(fade_out);
- });
- }
-
- function fade_in() {
- /* fade in the panel */
- $(this).fadeTo(300, 1);
- }
-
- function fade_out() {
- /* fade out the panel */
- $(this).fadeTo(300, 0.5);
- }
-
- // start JS magic when the page has loaded
- $(document).ready(prepare_animation);
- </script>
-
- </head>
-
-{% block body %}
-<body>
-
-<div id="distance"></div>
-<div id="container">
- <div id="flashcontent">
-
- <table border="0">
- <tr>
- <td colspan="3"><div style="height: 63px;" /></td>
- </tr>
- <tr>
- <td><a href="/junkers/"><img src="{% media_url %}/homepage/img/intro/panel_junkers.jpg" alt="junkers" width="166" height="221" /></a></td>
- <td><a href="/zeppelin/"><img src="{% media_url %}/homepage/img/intro/panel_zeppelin.jpg" alt="zeppelin" width="168" height="221" /></a></td>
- <td><a href="/maximilian/"><img src="{% media_url %}/homepage/img/intro/panel_maximilian.jpg" alt="maximilian" width="162" height="221" /></a></td>
- </tr>
- <tr>
- <td colspan="3"><div style="height: 66px;" /></td>
- </tr>
- </table>
- </div>
-
- <script type="text/javascript">
- // <![CDATA[
- var so = new SWFObject("{% media_url %}/homepage/swf/intro_{% translate "LANGUAGE_NAME" %}.swf", "intro", "500", "370", "9", "#FFF");
- so.addParam("allowScriptAccess", "always");
- so.write("flashcontent");
- // ]]>
- </script>
-
-</div>
-</div>
-
-</body>
-{% endblock %}
-
-</html>
diff --git a/emacs.d/nxhtml/tests/in/kubica-080516-freezing.txt b/emacs.d/nxhtml/tests/in/kubica-080516-freezing.txt
deleted file mode 100644
index dc3a6cf..0000000
--- a/emacs.d/nxhtml/tests/in/kubica-080516-freezing.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-The problem seems to have to do with the { block pagestyle } thing
-below. If that is removed then the freezing does not happen.
-
- <style type="text/css">
- { block pagestyle }
- p {
- margin: 0;
-
-Try the files kubica-080516-freezing-i.html and dito j. The former
-freezes Emacs, but the latter does not.
diff --git a/emacs.d/nxhtml/tests/in/kwalo-080930.php b/emacs.d/nxhtml/tests/in/kwalo-080930.php
deleted file mode 100644
index b45be15..0000000
--- a/emacs.d/nxhtml/tests/in/kwalo-080930.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?
-
-class Baz
-{
- // This class was written after the file was opened
-}
-
-class Bar
-{
- public function foo()
- {
- var_dump("foo");
- return null;
- }
-}
-
-class Foo
-{
- public function bar()
- {
- var_dump("bar");
- }
-} \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/latex-clojre-mumamo-test.lclj b/emacs.d/nxhtml/tests/in/latex-clojre-mumamo-test.lclj
deleted file mode 100644
index 7d5a97c..0000000
--- a/emacs.d/nxhtml/tests/in/latex-clojre-mumamo-test.lclj
+++ /dev/null
@@ -1,17 +0,0 @@
-\begin{section}
-Test file for latex-clojure-mumamo-mode!
-
-\begin{subsection}
-Define some vars here!
-\begin{clojure}
-(def zero 0)
-\end{clojure}
-
-\begin{subsection}
-Define some functions here!
-\begin{clojure}
-(defn id [arg]
- arg)
-\end{clojure}
-
-\end{section}
diff --git a/emacs.d/nxhtml/tests/in/lg-080813-div.html b/emacs.d/nxhtml/tests/in/lg-080813-div.html
deleted file mode 100644
index c507cb7..0000000
--- a/emacs.d/nxhtml/tests/in/lg-080813-div.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;" />
- <!-- There was a typo above, a missing " after content -->
- </head>
- <body>
- <div>
- <div>
- <p><a href="">marked invalid</a></p>
- </div>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/lg-080813-label.html b/emacs.d/nxhtml/tests/in/lg-080813-label.html
deleted file mode 100644
index 8e790eb..0000000
--- a/emacs.d/nxhtml/tests/in/lg-080813-label.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head><title></title></head>
- <body>
- <p>
- Since nXml do not have a schema for xhtml 1.0 transitional it
- uses strict instead. Therefore it gaves false errors here.
- </p>
- <form action="" method="get">
- <label for="inputname">Label for field: </label>
- <input type="text" name="inputname" id="inputname" />
- </form>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/long-lines.txt b/emacs.d/nxhtml/tests/in/long-lines.txt
deleted file mode 100644
index 791bdcb..0000000
--- a/emacs.d/nxhtml/tests/in/long-lines.txt
+++ /dev/null
@@ -1 +0,0 @@
-this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line this is a very long line
diff --git a/emacs.d/nxhtml/tests/in/markdown.markdown b/emacs.d/nxhtml/tests/in/markdown.markdown
deleted file mode 100644
index a4cb19d..0000000
--- a/emacs.d/nxhtml/tests/in/markdown.markdown
+++ /dev/null
@@ -1,16 +0,0 @@
-
-This is a regular paragraph.
-
-<table>
- <tr>
- <td>Foo</td>
- </tr>
-</table>
-
-This is another regular paragraph.
-
-Those look alike should not be in html-mode:
-
- <http://example.com/>
- <address@example.com>
-
diff --git a/emacs.d/nxhtml/tests/in/mason.mason b/emacs.d/nxhtml/tests/in/mason.mason
deleted file mode 100644
index 089dc1d..0000000
--- a/emacs.d/nxhtml/tests/in/mason.mason
+++ /dev/null
@@ -1,46 +0,0 @@
-
-<%perl>
- my $noun = 'World';
-my @time = localtime;
-</%perl>
-Hello <% $noun %>,
-% if ( $time[2] < 12 ) {
- good morning.
- % } else {
- good afternoon.
- % }
-
- <%text>
- Some text
- </%text>
-
-<%doc>
- Some doc
-</%doc>
-
-<& simple_comp &>
-
- <%args>
- $a
- @b # a comment
- %c
-
- # another comment
- $d => 5
- $e => $d*2
- @f => ('foo', 'baz')
- %g => (joe => 1, bob => 2)
- </%args>
-
-<&| /path/to/comp &> this is the content </&>
-<&| comp, arg1 => 'hi' &> filters can take arguments </&>
-<&| comp &> content can include <% "tags" %> of all kinds </&>
-something
-<& simple_comp &>
-<&| SELF:method1 &> subcomponents can be filters </&>
-<&| compit &>
- <&| comp1 &>
- nesting is also
- <&| comp2 &> OK </&>
-xx
-</&>
diff --git a/emacs.d/nxhtml/tests/in/menu-err.txt b/emacs.d/nxhtml/tests/in/menu-err.txt
deleted file mode 100644
index 6a2beb6..0000000
--- a/emacs.d/nxhtml/tests/in/menu-err.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Debugger entered--Lisp error: (error "No file on this line")
- signal(error ("No file on this line"))
- error("No file on this line")
- dired-get-file-for-visit()
- (if (derived-mode-p (quote dired-mode)) (dired-get-file-for-visit) buffer-file-name)
- html-site-buffer-or-dired-file-name()
- (setq file (html-site-buffer-or-dired-file-name))
- (if file nil (setq file (html-site-buffer-or-dired-file-name)))
- (unless file (setq file (html-site-buffer-or-dired-file-name)))
- nxhtml-buffer-possibly-local-viewable()
diff --git a/emacs.d/nxhtml/tests/in/mjt-feed.html b/emacs.d/nxhtml/tests/in/mjt-feed.html
deleted file mode 100644
index 50044d0..0000000
--- a/emacs.d/nxhtml/tests/in/mjt-feed.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="stylesheet" href="feedstyle.css" type="text/css" />
-<title>mjt google feeds</title>
-<script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/mjt.js"></script>
-<script type="text/javascript" src="./google-api-keys.js"></script>
-<script type="text/javascript">
- load_google_api('http://www.google.com/jsapi?key=');
-</script>
-<script type="text/javascript">
-
- google.load("feeds", "1");
-
- function initialize() {
- var top = mjt.run('top');
-
- var feeduri = mjt.urlquery.feed;
- if (typeof feeduri == 'undefined')
- feeduri = "http://blog.freebase.com/?feed=atom";
- document.title = 'feed: ' + feeduri;
-
- var feed = new google.feeds.Feed(feeduri);
- feed.load(function(result) { mjt.run('feed', top.showfeed, [result]); });
- }
- google.setOnLoadCallback(initialize);
-</script>
-</head>
-<body>
-<div>
-This is a toy feed reader using <a href="http://mjtemplate.org">Mjt</a> to
-read Google's new <a href="http://code.google.com/apis/ajaxfeeds/documentation/">AJAX feed API</a>.
-</div>
-<div>
-some feeds:
-<a href="?feed=http://blog.freebase.com/%3Ffeed%3Datom">The Freebase Dev Blog</a>
-| <a href="?feed=http://googleajaxsearchapi.blogspot.com/atom.xml">Google AJAX Search API Blog</a>
-</div>
-<!-- compare to <a href="http://code.google.com/apis/ajaxfeeds/documentation/helloworld.html">google example</a> -->
-<div id="top" style="display:none;">
-<div class="feedform">
-<form action="feed.html">
-<div>xml feed uri:
- <input type="text" size="70" name="feed" value="${mjt.urlquery.feed||''}" />
-<input type="submit" value="read" />
-</div>
-</form>
-</div>
-<div mjt.def="showfeed(result)">
-<div mjt.choose="">
-<div mjt.when="result.status != '200' &amp;&amp; result.error">
- error: <b>$result.error.message</b>
-</div>
-<div mjt.when="result.status.code == 200">
-<pre mjt.script="">
- document.title = 'feed: ' + result.feed.title;
- </pre>
-<h1 class="feedtitle"><a href="$result.feed.link">$result.feed.title</a></h1>
-<div mjt.for="entry in result.feed.entries" class="entry">
-<div class="entryheader">
-<a href="$entry.link" class="entrytitle">$entry.title</a>
-<span mjt.if="entry.categories instanceof Array &amp;&amp; entry.categories.length&gt;0">
- in: <span mjt.for="cat in (entry.categories||[])" class="category">$cat</span>
-</span>
-<div>
- &nbsp;&nbsp;&nbsp;&nbsp;
- <span class="author">${entry.author||''}</span> -
- <span class="date">${entry.publishedDate||''}</span>
-</div>
-</div>
-<!-- XXX security - does google sanitize? we sure don't... -->
-<div class="content">${mjt.bless(entry.content)}</div>
-</div>
-</div>
-<div mjt.otherwise="">
-<b>unknown response type from google feed api</b>
-</div>
-</div>
-</div>
-</div>
-<!-- the feed view gets pasted here when ready -->
-<div id="feed"></div>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/mjt-imagesearch.html b/emacs.d/nxhtml/tests/in/mjt-imagesearch.html
deleted file mode 100644
index 1ec9cd8..0000000
--- a/emacs.d/nxhtml/tests/in/mjt-imagesearch.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>mjt yahoo test</title>
-<script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/mjt.js"></script>
-<script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/src/yahooapi/yahooapi.js"></script>
-</head>
-<body onload="mjt.run('top')">
-<h2>Yahoo image search example</h2>
-using
-<a href="http://mjtemplate.org">mjt</a>
-to interact with the
-<a href="http://developer.yahoo.com/common/json.html">yahoo json api</a>
-<div id="top" style="display:none;">
-<div mjt.task="o">
- mjt.yahooapi.ImageSearch(mjt.urlquery.query||'kathakali')
- </div>
-<form method="get" action="">
-<div>
-<input type="text" name="query" value="${mjt.urlquery.query||''}" />
-<input type="submit" value="search" />
-</div>
-</form>
-<div mjt.choose="o.state">
-<div mjt.when="ready">
-<div mjt.for="img in o.result.Result">
-<h3>$img.Title</h3>
-<img alt="image" src="#" mjt.src="$img.Thumbnail.Url" style="float:left" />
-<div>$img.Summary</div>
-<hr style="clear:both" />
-</div>
-</div>
-<div mjt.when="wait">
- loading...
- </div>
-<div mjt.when="error">
-<div mjt.for="msg in o.messages">
- $msg.message
- </div>
-</div>
-</div>
-</div>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/mjt-minimal.html b/emacs.d/nxhtml/tests/in/mjt-minimal.html
deleted file mode 100644
index 6d8e30e..0000000
--- a/emacs.d/nxhtml/tests/in/mjt-minimal.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/mjt.js"></script>
-<title>a minimal mjt example</title>
-</head>
-<body onload="mjt.run()" style="display:none">
- running mjt version ${mjt.VERSION}
-</body></html>
diff --git a/emacs.d/nxhtml/tests/in/mumamo-and-org.org b/emacs.d/nxhtml/tests/in/mumamo-and-org.org
deleted file mode 100644
index 19d9b53..0000000
--- a/emacs.d/nxhtml/tests/in/mumamo-and-org.org
+++ /dev/null
@@ -1,20 +0,0 @@
-* Test of org and mumamo
-
- Below is a html chunk
-
-#+BEGIN_HTML
-<p>
- I have no idea of how to use this yet.
-</p>
-#+END_HTML
-
-#+BEGIN_SRC emacs-lisp-mode
- (defun
-#+END_SRC
-
-Where are the "..." in org-mumamo-mode???
-
-** Some subnode
-
-Hm, org full header lines are broken, why?
-Does not seem related to mumamo.
diff --git a/emacs.d/nxhtml/tests/in/mumamo-and-org.org.mm b/emacs.d/nxhtml/tests/in/mumamo-and-org.org.mm
deleted file mode 100644
index 041427f..0000000
--- a/emacs.d/nxhtml/tests/in/mumamo-and-org.org.mm
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<map version="0.9.0">
-<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node text="Test of org and mumamo">
-<node style="bubble" background_color="#eeee00">
-<richcontent TYPE="NODE"><html>
-<head>
-<style type="text/css">
-<!--
-p { margin-top: 0 }
--->
-</style>
-</head>
-<body>
-<p><br /> Below is a html chunk</p><p><br /></p>
-
-<p>
- I have not idea of how to use this yet.
-</p>
-<p><br /></p>
-</body>
-</html>
-</richcontent>
-<richcontent TYPE="NOTE"><html><head></head><body><p>-- This is more about "Test of org and mumamo" --</p></body></html></richcontent>
-</node>
-<node text="Some subnode">
-<node style="bubble" background_color="#eeee00">
-<richcontent TYPE="NODE"><html>
-<head>
-<style type="text/css">
-<!--
-p { margin-top: 0 }
--->
-</style>
-</head>
-<body>
-<p><br />Hm, header lines are broken, why?</p>
-</body>
-</html>
-</richcontent>
-<richcontent TYPE="NOTE"><html><head></head><body><p>-- This is more about "Some subnode" --</p></body></html></richcontent>
-</node>
-</node>
-</node>
-</map>
diff --git a/emacs.d/nxhtml/tests/in/ng-080309-read-url.html b/emacs.d/nxhtml/tests/in/ng-080309-read-url.html
deleted file mode 100644
index 9b20d66..0000000
--- a/emacs.d/nxhtml/tests/in/ng-080309-read-url.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- <a href="rgr-080307.php" ></a>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/no-php-end-2.php b/emacs.d/nxhtml/tests/in/no-php-end-2.php
deleted file mode 100644
index ac7debb..0000000
--- a/emacs.d/nxhtml/tests/in/no-php-end-2.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-include_once(APP_AAA_INCLUDE."bb.php");
-include_once(APP_AAA_INCLUDE."cc.php");
-include_once(APP_AAA_INCLUDE."dd.php");
-include_once(APP_AAA_INCLUDE."ee.php");
-include_once(APP_AAA_INCLUDE."ff.php");
-include_once(APP_AAA_INCLUDE."gg.php");
-
-class Test
-{
- public $var1;
-
- function __construct()
- {
- $This->var1 = 5;
- }
-} \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/no-php-end-2.php-log.txt b/emacs.d/nxhtml/tests/in/no-php-end-2.php-log.txt
deleted file mode 100644
index e0d5e9f..0000000
--- a/emacs.d/nxhtml/tests/in/no-php-end-2.php-log.txt
+++ /dev/null
@@ -1,312 +0,0 @@
-Illegal char in prolog
-undo!
-mumamo-jit-lock-after-change 1 2 0
- mumamo-jit-lock-after-change: font-lock-extend-after-change-region-function=nil
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (progn (let ((jit-lock-start (\, min)) (jit-lock-end (\, max))) (mumamo-with-buffer-prepared-for-jit-lock (run-hook-with-args (quote jit-lock-after-change-extend-region-functions) min max old-len)) (setq min jit-lock-start) (setq max jit-lock-end) (syntax-ppss-flush-cache min)))))
->>>>>>>>>>
-mumamo-jit-lock-after-change r-min,max=(1 . 7),nil major-min,max=nxhtml-mode,nil
-mumamo-jit-lock-after-change new-min,max=1,7
-mumamo-mark-for-refontification A min,max=1,7 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=1,7 point-min,max=1,329
-mumamo-jit-lock-after-change.unfontify-pos=1
-mumamo-jit-lock-function 1, ff=nil, just-changed=nil
-++++++ mumamo-fontify-region 1 8 nil, skip=nil
-here 1, here=1, end=8
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (progn (let (ppss ret) (setq ppss (parse-partial-sexp (\, syntax-start) (+ (\, syntax-end) 0))) (if (or (nth 3 ppss) (nth 4 ppss)) (progn nil t) t)))))
->>>>>>>>>>
- fn=mumamo-chunk-xml-pi, r=(1 6 nil nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 1 to 329 in no-php-end-2.php> cv-min/cv-max 1/6
-mumamo-mark-for-refontification A min,max=7,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=7,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (1 6 nil nil nil nil)
-mumamo-remove-chunk-overlays 1 6
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 1 nil, chunk-max: 6 nil
-*** mumamo-fontify-region-1.here=1, chunk=#<overlay from 1 to 6 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=1, start=1, chunk-min=1,max=6 end=8 chunk-major=nxhtml-mode
-mumamo-fontify-region-with 1 6 nil nxhtml-mode, ff=t
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 1 6 nil 1 6 nxhtml-mode
-mumamo-do-fontify 1 6, chunk-syntax-min,max=1,6, new: 1 6
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (parse-partial-sexp (point-min) last-pos)))
->>>>>>>>>>
-mumamo-do-fontify exit >>>>>>> 1 6 nil 1 6 nxhtml-mode
-here 1, here=6, end=8
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=nil cv-min/cv-max 6/nil
-mumamo-mark-for-refontification A min,max=8,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=8,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=6, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=6, start=1, chunk-min=6,max=329 end=8 chunk-major=php-mode
-mumamo-fontify-region-with 6 8 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 6 8 nil 6 329 php-mode
-mumamo-do-fontify 6 8, chunk-syntax-min,max=6,329, new: 6 8
-mumamo-do-fontify exit >>>>>>> 6 8 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=8,8 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=1,end=329, start=1, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-
-++++++ mumamo-fontify-region 8 329 nil, skip=nil
-here 1, here=8, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=8, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=8, start=8, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 8 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 8 329 nil 6 329 php-mode
-mumamo-do-fontify 8 329, chunk-syntax-min,max=6,329, new: 8 329
-mumamo-do-fontify exit >>>>>>> 8 329 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=8, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-mumamo-jit-lock-function 6, ff=nil, just-changed=nil
-
-++++++ mumamo-fontify-region 1 48 nil, skip=nil
-here 1, here=1, end=48
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (progn (let (ppss ret) (setq ppss (parse-partial-sexp (\, syntax-start) (+ (\, syntax-end) 0))) (if (or (nth 3 ppss) (nth 4 ppss)) (progn nil t) t)))))
->>>>>>>>>>
- fn=mumamo-chunk-xml-pi, r=(1 6 nil nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 1 to 6 in no-php-end-2.php> cv-min/cv-max 1/6
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 1 nil, chunk-max: 6 nil
-*** mumamo-fontify-region-1.here=1, chunk=#<overlay from 1 to 6 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=1, start=1, chunk-min=1,max=6 end=48 chunk-major=nxhtml-mode
-mumamo-fontify-region-with 1 6 nil nxhtml-mode, ff=t
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 1 6 nil 1 6 nxhtml-mode
-mumamo-do-fontify 1 6, chunk-syntax-min,max=1,6, new: 1 6
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (parse-partial-sexp (point-min) last-pos)))
->>>>>>>>>>
-mumamo-do-fontify exit >>>>>>> 1 6 nil 1 6 nxhtml-mode
-here 1, here=6, end=48
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-mark-for-refontification A min,max=48,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=48,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=6, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=6, start=1, chunk-min=6,max=329 end=48 chunk-major=php-mode
-mumamo-fontify-region-with 6 48 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 6 48 nil 6 329 php-mode
-mumamo-do-fontify 6 48, chunk-syntax-min,max=6,329, new: 6 48
-mumamo-do-fontify exit >>>>>>> 6 48 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=48,48 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=1,end=329, start=1, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-
-++++++ mumamo-fontify-region 48 329 nil, skip=nil
-here 1, here=48, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=48, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=48, start=48, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 48 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 48 329 nil 6 329 php-mode
-mumamo-do-fontify 48 329, chunk-syntax-min,max=6,329, new: 48 329
-mumamo-do-fontify exit >>>>>>> 48 329 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=48, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-mumamo-jit-lock-function 7, ff=nil, just-changed=nil
-
-++++++ mumamo-fontify-region 7 88 nil, skip=nil
-here 1, here=7, end=88
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-mark-for-refontification A min,max=88,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=88,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=7, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=7, start=7, chunk-min=6,max=329 end=88 chunk-major=php-mode
-mumamo-fontify-region-with 7 88 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 7 88 nil 6 329 php-mode
-mumamo-do-fontify 7 88, chunk-syntax-min,max=6,329, new: 7 88
-mumamo-do-fontify exit >>>>>>> 7 88 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=88,88 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=7, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-++++++ mumamo-fontify-region 88 329 nil, skip=nil
-here 1, here=88, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=88, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=88, start=88, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 88 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 88 329 nil 6 329 php-mode
-mumamo-do-fontify 88 329, chunk-syntax-min,max=6,329, new: 88 329
-mumamo-do-fontify exit >>>>>>> 88 329 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=88, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-mumamo-jit-lock-function 8, ff=nil, just-changed=nil
-++++++ mumamo-fontify-region 8 128 nil, skip=nil
-here 1, here=8, end=128
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-mark-for-refontification A min,max=128,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=128,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=8, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=8, start=8, chunk-min=6,max=329 end=128 chunk-major=php-mode
-mumamo-fontify-region-with 8 128 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 8 128 nil 6 329 php-mode
-mumamo-do-fontify 8 128, chunk-syntax-min,max=6,329, new: 8 128
-mumamo-do-fontify exit >>>>>>> 8 128 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=128,128 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=8, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-++++++ mumamo-fontify-region 128 329 nil, skip=nil
-here 1, here=128, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=128, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=128, start=128, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 128 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 128 329 nil 6 329 php-mode
-mumamo-do-fontify 128 329, chunk-syntax-min,max=6,329, new: 128 329
-mumamo-do-fontify exit >>>>>>> 128 329 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=128, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-mumamo-jit-lock-function 20, ff=nil, just-changed=nil
-++++++ mumamo-fontify-region 8 168 nil, skip=nil
-here 1, here=8, end=168
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-mark-for-refontification A min,max=168,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=168,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=8, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=8, start=8, chunk-min=6,max=329 end=168 chunk-major=php-mode
-mumamo-fontify-region-with 8 168 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 8 168 nil 6 329 php-mode
-mumamo-do-fontify 8 168, chunk-syntax-min,max=6,329, new: 8 168
-mumamo-do-fontify exit >>>>>>> 8 168 nil 6 329 php-mode
-mumamo-mark-for-refontification A min,max=168,168 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=8, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-++++++ mumamo-fontify-region 168 329 nil, skip=nil
-here 1, here=168, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
diff --git a/emacs.d/nxhtml/tests/in/no-php-end-2.php-log2.txt b/emacs.d/nxhtml/tests/in/no-php-end-2.php-log2.txt
deleted file mode 100644
index 1df7c4d..0000000
--- a/emacs.d/nxhtml/tests/in/no-php-end-2.php-log2.txt
+++ /dev/null
@@ -1,238 +0,0 @@
-Illegal char in prolog
-undo!
-mumamo-jit-lock-after-change 1 2 0
- mumamo-jit-lock-after-change: font-lock-extend-after-change-region-function=nil
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (progn (let ((jit-lock-start (\, min)) (jit-lock-end (\, max))) (mumamo-with-buffer-prepared-for-jit-lock (run-hook-with-args (quote jit-lock-after-change-extend-region-functions) min max old-len)) (setq min jit-lock-start) (setq max jit-lock-end) (syntax-ppss-flush-cache min)))))
->>>>>>>>>>
-mumamo-jit-lock-after-change r-min,max=(1 . 7),nil major-min,max=nxhtml-mode,nil
-mumamo-jit-lock-after-change new-min,max=1,7
-mumamo-mark-for-refontification A min,max=1,7 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=1,7 point-min,max=1,329
-mumamo-jit-lock-after-change.unfontify-pos=1
-mumamo-jit-lock-function 1, ff=nil, just-changed=nil
-++++++ mumamo-fontify-region 1 8 nil, skip=nil
-here 1, here=1, end=8
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (progn (let (ppss ret) (setq ppss (parse-partial-sexp (\, syntax-start) (+ (\, syntax-end) 0))) (if (or (nth 3 ppss) (nth 4 ppss)) (progn nil t) t)))))
->>>>>>>>>>
- fn=mumamo-chunk-xml-pi, r=(1 6 nil nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 1 to 329 in no-php-end-2.php> cv-min/cv-max 1/6
-new-is-closed=6
-mumamo-mark-for-refontification A min,max=7,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=7,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (1 6 nil nil nil nil)
-mumamo-remove-chunk-overlays 1 6
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 1 nil, chunk-max: 6 nil
-*** mumamo-fontify-region-1.here=1, chunk=#<overlay from 1 to 6 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=1, start=1, chunk-min=1,max=6 end=8 chunk-major=nxhtml-mode
-mumamo-fontify-region-with 1 6 nil nxhtml-mode, ff=t
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 1 6 nil 1 6 nxhtml-mode
-mumamo-do-fontify 1 6, chunk-syntax-min,max=1,6, new: 1 6
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (parse-partial-sexp (point-min) last-pos)))
->>>>>>>>>>
-mumamo-do-fontify exit >>>>>>> 1 6 nil 1 6 nxhtml-mode
-here 1, here=6, end=8
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=nil cv-min/cv-max 6/nil
-(when (and end new-real-end (> new-real-end end))
-mumamo-mark-for-refontification A min,max=8,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=8,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=6, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=6, start=1, chunk-min=6,max=329 end=8 chunk-major=php-mode
-mumamo-fontify-region-with 6 8 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 6 8 nil 6 329 php-mode
-mumamo-do-fontify 6 8, chunk-syntax-min,max=6,329, new: 6 8
-mumamo-do-fontify exit >>>>>>> 6 8 nil 6 329 php-mode
-
-not sure
-mumamo-mark-for-refontification A min,max=8,8 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=1,end=329, start=1, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-++++++ mumamo-fontify-region 8 329 nil, skip=nil
-here 1, here=8, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=8, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=8, start=8, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 8 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 8 329 nil 6 329 php-mode
-mumamo-do-fontify 8 329, chunk-syntax-min,max=6,329, new: 8 329
-mumamo-do-fontify exit >>>>>>> 8 329 nil 6 329 php-mode
-
-
-not sure
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=8, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-mumamo-jit-lock-function 6, ff=nil, just-changed=nil
-++++++ mumamo-fontify-region 1 48 nil, skip=nil
-here 1, here=1, end=48
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (progn (let (ppss ret) (setq ppss (parse-partial-sexp (\, syntax-start) (+ (\, syntax-end) 0))) (if (or (nth 3 ppss) (nth 4 ppss)) (progn nil t) t)))))
->>>>>>>>>>
- fn=mumamo-chunk-xml-pi, r=(1 6 nil nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 1 to 6 in no-php-end-2.php> cv-min/cv-max 1/6
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 1 nil, chunk-max: 6 nil
-*** mumamo-fontify-region-1.here=1, chunk=#<overlay from 1 to 6 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=1, start=1, chunk-min=1,max=6 end=48 chunk-major=nxhtml-mode
-mumamo-fontify-region-with 1 6 nil nxhtml-mode, ff=t
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 1 6 nil 1 6 nxhtml-mode
-mumamo-do-fontify 1 6, chunk-syntax-min,max=1,6, new: 1 6
-mumamo-with-major-mode-setup nxhtml-mode => html-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (parse-partial-sexp (point-min) last-pos)))
->>>>>>>>>>
-mumamo-do-fontify exit >>>>>>> 1 6 nil 1 6 nxhtml-mode
-here 1, here=6, end=48
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-(when (and end new-real-end (> new-real-end end))
-mumamo-mark-for-refontification A min,max=48,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=48,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=6, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=6, start=1, chunk-min=6,max=329 end=48 chunk-major=php-mode
-mumamo-fontify-region-with 6 48 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 6 48 nil 6 329 php-mode
-mumamo-do-fontify 6 48, chunk-syntax-min,max=6,329, new: 6 48
-mumamo-do-fontify exit >>>>>>> 6 48 nil 6 329 php-mode
-
-
-not sure
-mumamo-mark-for-refontification A min,max=48,48 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=1,end=329, start=1, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-++++++ mumamo-fontify-region 48 329 nil, skip=nil
-here 1, here=48, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=48, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=48, start=48, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 48 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 48 329 nil 6 329 php-mode
-mumamo-do-fontify 48 329, chunk-syntax-min,max=6,329, new: 48 329
-mumamo-do-fontify exit >>>>>>> 48 329 nil 6 329 php-mode
-
-
-not sure
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=48, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-mumamo-jit-lock-function 7, ff=nil, just-changed=nil
-++++++ mumamo-fontify-region 7 88 nil, skip=nil
-here 1, here=7, end=88
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-(when (and end new-real-end (> new-real-end end))
-mumamo-mark-for-refontification A min,max=88,329 point-min,max=1,329
-mumamo-mark-for-refontification B min,max=88,329 point-min,max=1,329
-mumamo-create-chunk-from-chunk-values (6 nil php-mode nil nil nil)
-mumamo-remove-chunk-overlays 6 329
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (quote (if syntax-begin-function (progn syntax-begin-function) (when (and (not syntax-begin-function) (boundp (quote font-lock-beginning-of-syntax-function)) font-lock-beginning-of-syntax-function) font-lock-beginning-of-syntax-function))))
->>>>>>>>>>
- mumamo-major-mode-from-modespec php-mode => php-mode
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=7, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=7, start=7, chunk-min=6,max=329 end=88 chunk-major=php-mode
-mumamo-fontify-region-with 7 88 nil php-mode, ff=nil
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 7 88 nil 6 329 php-mode
-mumamo-do-fontify 7 88, chunk-syntax-min,max=6,329, new: 7 88
-mumamo-do-fontify exit >>>>>>> 7 88 nil 6 329 php-mode
-
-
-not sure
-mumamo-mark-for-refontification A min,max=88,88 point-min,max=1,329
-*** mumamo-fontify-region-1: here 3 ovl-start=6,end=329, start=7, chunks-to-remove=nil
-*** mumamo-fontify-region-1: here 4
-++++++ mumamo-fontify-region 88 329 nil, skip=nil
-here 1, here=88, end=329
- fn=mumamo-chunk-xml-pi, r=(6 nil php-mode nil nil)
- fn=mumamo-chunk-inlined-style, r=(1 nil nil nil nil)
- fn=mumamo-chunk-inlined-script, r=(1 nil nil nil nil)
- fn=mumamo-chunk-style=, r=(nil nil nil)
- fn=mumamo-chunk-onjs=, r=(nil nil nil)
-old-chunk=#<overlay from 6 to 329 in no-php-end-2.php> cv-min/cv-max 6/nil
-mumamo-fontify-region-1 FACE FACE FACE chunk-min: 6 font-lock-keyword-face, chunk-max: 329 nil
-*** mumamo-fontify-region-1.here=88, chunk=#<overlay from 6 to 329 in no-php-end-2.php>
-*** mumamo-fontify-region-1: here 2 here=88, start=88, chunk-min=6,max=329 end=329 chunk-major=php-mode
-mumamo-fontify-region-with 88 329 nil php-mode, ff=t
-mumamo-with-major-mode-setup php-mode => php-mode
-mumamo-with-major-mode-setup <<<<<<<<<< body=(progn (\` (mumamo-do-fontify (\, start) (\, end) (\, verbose) (\, chunk-syntax-min) (\, chunk-syntax-max) major)))
->>>>>>>>>>
-mumamo-do-fontify <<<<<<< 88 329 nil 6 329 php-mode
-mumamo-do-fontify 88 329, chunk-syntax-min,max=6,329, new: 88 329
-mumamo-do-fontify exit >>>>>>> 88 329 nil 6 329 php-mode
-
-
-not sure
-mumamo-mark-for-refontification A min,max=329,329 point-min,max=1,329
-*** muma
diff --git a/emacs.d/nxhtml/tests/in/no-php-end-3.php b/emacs.d/nxhtml/tests/in/no-php-end-3.php
deleted file mode 100644
index 2e91d1a..0000000
--- a/emacs.d/nxhtml/tests/in/no-php-end-3.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-include_once(APP_AAA_INCLUDE."bb.php");
-include_once(APP_AAA_INCLUDE."cc.php");
-include_once(APP_AAA_INCLUDE."dd.php");
-include_once(APP_AAA_INCLUDE."ee.php");
-include_once(APP_AAA_INCLUDE."ff.php");
-include_once(APP_AAA_INCLUDE."gg.php");
-
-class Test
-{
- public $var1;
-
- function __construct()
- {
- $This->var1 = 5;
- }
-}
diff --git a/emacs.d/nxhtml/tests/in/no-php-end-4.php b/emacs.d/nxhtml/tests/in/no-php-end-4.php
deleted file mode 100644
index 2e91d1a..0000000
--- a/emacs.d/nxhtml/tests/in/no-php-end-4.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-include_once(APP_AAA_INCLUDE."bb.php");
-include_once(APP_AAA_INCLUDE."cc.php");
-include_once(APP_AAA_INCLUDE."dd.php");
-include_once(APP_AAA_INCLUDE."ee.php");
-include_once(APP_AAA_INCLUDE."ff.php");
-include_once(APP_AAA_INCLUDE."gg.php");
-
-class Test
-{
- public $var1;
-
- function __construct()
- {
- $This->var1 = 5;
- }
-}
diff --git a/emacs.d/nxhtml/tests/in/no-php-end.php b/emacs.d/nxhtml/tests/in/no-php-end.php
deleted file mode 100644
index ecd9d9f..0000000
--- a/emacs.d/nxhtml/tests/in/no-php-end.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-
-$parent_id = 5;
-var_dump($parent_id);
diff --git a/emacs.d/nxhtml/tests/in/nojump-parse.html b/emacs.d/nxhtml/tests/in/nojump-parse.html
deleted file mode 100644
index d66369f..0000000
--- a/emacs.d/nxhtml/tests/in/nojump-parse.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <script type="text/javascript">
-<testnxmlparsed>
- </script>
diff --git a/emacs.d/nxhtml/tests/in/noweb1.now b/emacs.d/nxhtml/tests/in/noweb1.now
deleted file mode 100644
index 1df9074..0000000
--- a/emacs.d/nxhtml/tests/in/noweb1.now
+++ /dev/null
@@ -1,38 +0,0 @@
-@
-\section{Hello world}
-
-Today I awakened and decided to write
-some code, so I started to write a Hello World in \textsf C.
-
-<<hello.c>>=
-/*
- <<license>>
-*/
-#include <stdio.h>
-
-int main(int argc, char *argv[]) {
- printf("Hello World!\n");
- return 0;
-}
-@
-\noindent \ldots then I did the same in PHP.
-
-<<hello.sql>>=
-SELECT * FROM Persons
-WHERE FirstName LIKE '%a'
-@
-<<hello.php>>=
-<?php
- /*
- <<license>>
- */
- echo "Hello world!\n";
-?>
-@
-\section{License}
-Later, same day some lawyer reminded me about licenses.
-So, here it is:
-
-<<license>>=
-This work is placed in the public domain.
-@
diff --git a/emacs.d/nxhtml/tests/in/nutshell.mako b/emacs.d/nxhtml/tests/in/nutshell.mako
deleted file mode 100644
index 3c7540e..0000000
--- a/emacs.d/nxhtml/tests/in/nutshell.mako
+++ /dev/null
@@ -1,27 +0,0 @@
- % for row in rows:
-<%inherit file="base.html"/>
-
-<%
- rows = [[v for v in range(0,10)] for row in range(0,10)]
-%>
-<%!
- rows = [[v for v in range(0,10)] for row in range(0,10)]
-%>
-aaa
-<table>
- ## This is a comment.
- % for row in rows:
- ${makerow(row)}
- % endfor
-</table>
-
-<%def name="makerow(row)">
- <tr>
- % for name in row:
- <td>${name}</td>\
- % endfor
- </tr>
-</%def>
-<%doc>
-This should be a comment too...
-</%doc>
diff --git a/emacs.d/nxhtml/tests/in/nxml-bug.html b/emacs.d/nxhtml/tests/in/nxml-bug.html
deleted file mode 100644
index 3d2fe7b..0000000
--- a/emacs.d/nxhtml/tests/in/nxml-bug.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head><title></title></head>
- <body>
- <form action="" method="get">
- <label for="inputname">Label for field: </label>
- <input type="text" name="inputname" id="inputname" />
- </form>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/nxml-indent-2.html b/emacs.d/nxhtml/tests/in/nxml-indent-2.html
deleted file mode 100644
index e30dba0..0000000
--- a/emacs.d/nxhtml/tests/in/nxml-indent-2.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Kimpro Malmö &amp; Sydsverige - AKTUELLT I MALMÖ</title>
- <link href="textmall.css" rel="stylesheet" type="text/css" />
- <link href="layout.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div class="kolumn1">
- <span class="rubrik">Aktuellt våren 2008</span><br />
- <i>Välkommen till dansens magiska universum!</i><br />
- Här i kalendariet kan du se vad som händer i kimprosammanhang
- just nu. De arrangemang med rosa botten är utöver våra
- vanliga söndags-träffar i Malmö. Vill du veta mer om de olika
- verksamheterna, ta en titt under <u><a href=
- "index_verksamhet.html" target="index3s">Verksamhet</a>.
- <b>OBS!</b> Notera att vi bytt danstid till kl 19-21! Detta
- gäller endast en period nu i vår.<br />
- <br /></u><b>Mars</b>
- <table width="370" cellspacing="5">
- <!--
- <tr>
- <td class="kalendariecell_special">
- <img src="grafik/aktuelltbild_januari.jpg" border=0><br>
- <i>Några av oss som dansar i Malmö</i><br>
-
-<span class="mellanrubrik">
-<br>
-<b>OBS: Ny tid!</b><br></span>
-Vi har ny tid för dansen på söndagar! 19-21 är nya tiden som gäller en tid framöver. <br>
-<br>
-
-<br>
-Sofia och Rebecka har arbetat tillsammans sedan år 2000. De träffades
-på Nordens dåvarande enda cirkusgymnasium i Gävle och utbildade sig
-sedan i Köpenhamn på AFUK, Akademiet för Utaemet Kreativitet -
-Artistlinien, med parakrobatik som huvuddiciplin. Sedan följde en
-treårig
-utbildning" Centre des Arts du Cirque de Lomme-Et vous trouvez ca
-drole!!!" i Lille, Frankrike. 2003 startade de nycirkusföretaget
-"Stint"
-tillsammans och de jobbar nu som frilansande cirkusartister främst i
-Frankrike.<br>
-<br>
-Med Rebecka som överman och Sofia som underman kör de både liggande och
-stående parakrobatik, spänningsövningar, huvud- och handhandbalanser.
-Tillsammans har de jobbat ihop flera olika akter á 5 minuter. Däribland
-hittar man kvinnlig styrka och pur pondus, komisk vardagstristess,
-hisnande teknik och tyngdpunkt i relationerna mellan människor och
-samhällets uppochned vända verklighet, ur ett verkligt uppochnedvänt
-perspektiv. Sedan år 2006 har fokuset flyttats mer och mer åt
-improvisationshållet, parakrobatikimprovisation i samarbete med fri
-improviserad musik och kontaktimprovisation.<br>
-<a href="http://www.stint.nu" target=blank><u>www.stint.nu</u></a><br>
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 24 Februari<br>
-<span class="mellanrubrik">
-Musikjam!</span><br>
-kl 19-21, 30 kr<br>
-<br>
-Denna söndag kommer inga inhyrda musiker till jammet,
-utan då det är vi själva som står för musiken!<br>
-<br>
-Så alla som kan och vill -ta med er instrument eller
-andra ljudframbringande prylar. Att använda sin röst går förståss
-också bra.<br>
-<br>
-Vill man inte musisera så dansar man som vanligt.
-(..och därför kostar det bara 30 kr, då vi inte har några musiker som
-ska betalas)<br>
-<br>
-VÄLKOMNA!
-</td>
-</tr>
- -->
- <tr>
- <td class="kalendariecell">
- Söndag 2 Mars<br />
- <span class="mellanrubrik">Nybörjarintroduktion &amp;
- Jam med Karin R och Jenny</span><br />
- Kl. 19-21, 30 kr.
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 9 Mars<br />
- <span class="mellanrubrik">Blind fold jam - jam med
- ögonbindel!</span><br />
- ... med Sofi och Tove. Kl 19-21, 30 kr<br />
- På ett blind fold jam dansar man med ögonen förbundna,
- för att öka känsligheten, lyssnandet och samspelet. Det
- är också ett sätt att försöka komma förbi
- föreställningar man (medvetet eller omedvetet) har runt
- vem man väljer att dansa med. Det blir i slutändan en
- spegling till en själv om de val man gör på dansgolvet,
- där kroppen denna gång får bestämma i stället för
- huvudet. Vi inleder som vanligt med en introduktion.
- Tag gärna med egen ögonbindel!<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 16 Mars<br />
- <span class="mellanrubrik">Introduktion och
- jam</span><br />
- 19-21, 30 kr<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 23 Mars<br />
- <span class="mellanrubrik">Ingenting här för då är vi
- på NIM i Köpenhamn!
- <!-- Introduktion och jam</span><br> -->
- <!-- 19-21, 30 kr<br> --></span>
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen den 30:e<br />
- <span class="mellanrubrik">Kort introduktion och
- Livejam!!</span><br />
- 19-21, 50 kr<br />
- </td>
- </tr>
- </table>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/nxml-indent-3.html b/emacs.d/nxhtml/tests/in/nxml-indent-3.html
deleted file mode 100644
index e7c686f..0000000
--- a/emacs.d/nxhtml/tests/in/nxml-indent-3.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- Kimpro Malmö &amp; Sydsverige - AKTUELLT I MALMÖ
- </title>
- <link href="textmall.css" rel="stylesheet" type="text/css" />
- <link href="layout.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div class="kolumn1">
- <span class="rubrik">Aktuellt våren 2008</span><br />
- <i>Välkommen till dansens magiska universum!</i><br />
- Här i kalendariet kan du se vad som händer i kimprosammanhang
- just nu. De arrangemang med rosa botten är utöver våra
- vanliga söndags-träffar i Malmö. Vill du veta mer om de olika
- verksamheterna, ta en titt under <u><a href=
- "index_verksamhet.html" target="index3s">Verksamhet</a>.
- <b>OBS!</b> Notera att vi bytt danstid till kl 19-21! Detta
- gäller endast en period nu i vår.<br />
- <br /></u><b>Mars</b>
- <table width="370" cellspacing="5">
- <!--
- <tr>
- <td class="kalendariecell_special">
- <img src="grafik/aktuelltbild_januari.jpg" border=0><br>
- <i>Några av oss som dansar i Malmö</i><br>
-
-<span class="mellanrubrik">
-<br>
-<b>OBS: Ny tid!</b><br></span>
-Vi har ny tid för dansen på söndagar! 19-21 är nya tiden som gäller en tid framöver. <br>
-<br>
-
-<br>
-Sofia och Rebecka har arbetat tillsammans sedan år 2000. De träffades
-på Nordens dåvarande enda cirkusgymnasium i Gävle och utbildade sig
-sedan i Köpenhamn på AFUK, Akademiet för Utaemet Kreativitet -
-Artistlinien, med parakrobatik som huvuddiciplin. Sedan följde en
-treårig
-"Stint"
-tillsammans och de jobbar nu som frilansande cirkusartister främst i
-Frankrike.<br>
-<br>
-Med Rebecka som överman och Sofia som underman kör de både liggande och
-stående parakrobatik, spänningsövningar, huvud- och handhandbalanser.
-Tillsammans har de jobbat ihop flera olika akter á 5 minuter. Däribland
-hittar man kvinnlig styrka och pur pondus, komisk vardagstristess,
-hisnande teknik och tyngdpunkt i relationerna mellan människor och
-samhällets uppochned vända verklighet, ur ett verkligt uppochnedvänt
-perspektiv. Sedan år 2006 har fokuset flyttats mer och mer åt
-improvisationshållet, parakrobatikimprovisation i samarbete med fri
-improviserad musik och kontaktimprovisation.<br>
-<a href="http://www.stint.nu" target=blank><u>www.stint.nu</u></a><br>
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 24 Februari<br>
-<span class="mellanrubrik">
-Musikjam!</span><br>
-kl 19-21, 30 kr<br>
-<br>
-Denna söndag kommer inga inhyrda musiker till jammet,
-utan då det är vi själva som står för musiken!<br>
-<br>
-Så alla som kan och vill -ta med er instrument eller
-andra ljudframbringande prylar. Att använda sin röst går förståss
-också bra.<br>
-<br>
-Vill man inte musisera så dansar man som vanligt.
-(..och därför kostar det bara 30 kr, då vi inte har några musiker som
-ska betalas)<br>
-<br>
-VÄLKOMNA!
-</td>
-</tr>
- -->
- <tr>
- <td class="kalendariecell">
- Söndag 2 Mars<br />
- <span class="mellanrubrik">Nybörjarintroduktion &amp;
- Jam med Karin R och Jenny</span><br />
- Kl. 19-21, 30 kr.
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 9 Mars<br />
- <span class="mellanrubrik">Blind fold jam - jam med
- ögonbindel!</span><br />
- ... med Sofi och Tove. Kl 19-21, 30 kr<br />
- På ett blind fold jam dansar man med ögonen förbundna,
- för att öka känsligheten, lyssnandet och samspelet. Det
- är också ett sätt att försöka komma förbi
- föreställningar man (medvetet eller omedvetet) har runt
- vem man väljer att dansa med. Det blir i slutändan en
- spegling till en själv om de val man gör på dansgolvet,
- där kroppen denna gång får bestämma i stället för
- huvudet. Vi inleder som vanligt med en introduktion.
- Tag gärna med egen ögonbindel!<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 16 Mars<br />
- <span class="mellanrubrik">Introduktion och
- jam</span><br />
- 19-21, 30 kr<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 23 Mars<br />
- <span class="mellanrubrik">Ingenting här för då är vi
- på NIM i Köpenhamn!
- <!-- Introduktion och jam</span><br> -->
- <!-- 19-21, 30 kr<br> --></span>
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen den 30:e<br />
- <span class="mellanrubrik">Kort introduktion och
- Livejam!!</span><br />
- 19-21, 50 kr<br />
- </td>
- </tr>
- </table>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/nxml-indent-noerr1.html b/emacs.d/nxhtml/tests/in/nxml-indent-noerr1.html
deleted file mode 100644
index db82964..0000000
--- a/emacs.d/nxhtml/tests/in/nxml-indent-noerr1.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- Kimpro Malmö &amp; Sydsverige - AKTUELLT I MALMÖ
- </title>
- <link href="textmall.css" rel="stylesheet" type="text/css" />
- <link href="layout.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div class="kolumn1">
- <span class="rubrik">Aktuellt våren 2008</span><br />
- <i>Välkommen till dansens magiska universum!</i><br />
- Här i kalendariet kan du se vad som händer i kimprosammanhang
- just nu. De arrangemang med rosa botten är utöver våra
- vanliga söndags-träffar i Malmö. Vill du veta mer om de olika
- verksamheterna, ta en titt under <u><a href=
- "index_verksamhet.html" target="index3s">Verksamhet</a>.
- <b>OBS!</b> Notera att vi bytt danstid till kl 19-21! Detta
- gäller endast en period nu i vår.<br />
- <br /></u><b>Mars</b>
- <table width="370" cellspacing="5">
- <!--
- <tr>
- <td class="kalendariecell_special">
- <img src="grafik/aktuelltbild_januari.jpg" border=0><br>
- <i>Några av oss som dansar i Malmö</i><br>
-
-<span class="mellanrubrik">
-<br>
-<b>OBS: Ny tid!</b><br></span>
-Vi har ny tid för dansen på söndagar! 19-21 är nya tiden som gäller en tid framöver. <br>
-<br>
-
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 6 Januari<br>
-<span class="mellanrubrik">
-Grundklass & Jam</span><br>
-Årets första nybörjarintro! Kl. 17-19, 30 kr.
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 13 Januari<br>
-<span class="mellanrubrik">
-Introduktion & Jam</span><br>
-Kl. 17-19, 30 kr.
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 20 Januari<br>
-<span class="mellanrubrik">
-Introduktion & Jam</span><br>
-Kl. 17-19, 30 kr.
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 27 Januari<br>
-<span class="mellanrubrik">
-Introduktion & Jam</span><br>
-Kl. 17-19, 30 kr.
-</td>
-</tr>
-
-<tr>
-<td class="kalendariecell_special">
-<b>23-24 februari</b><br>
-<span class="mellanrubrik">WORKSHOP I AKROBATIK
-FÖR KONTAKTIMPROVISATÖRER</span><br>
-<br>
-Två parakrobater, Sofia och Rebecka, bosatta i Frankrike kommer till
-Malmö
-för att hålla en workshop speciellt för Kimpro Malmö!
-Workshopen kommer handla om hur man kan använda akrobatik i
-kontaktimprovisation. Inga förkunskaper i akrobatik behövs.<br>
-<br>
-23-24/2, kl.13-16 båda dagarna.<br>
-Kostnad: 350 kr.<br>
-Betalas senast den 21/2 till plusgirokonto: 1136904-8, Nordea,
-skriv: akro + namn.<br>
-Plats: meddelas senare.<br>
-Anmälan senast 19/2 till Clara, claravara00@yahoo.se<br>
-<br>
-Begränsat antal platser. Först till kvarn!<br>
-<br>
-<br>
-Sofia och Rebecka har arbetat tillsammans sedan år 2000. De träffades
-på Nordens dåvarande enda cirkusgymnasium i Gävle och utbildade sig
-sedan i Köpenhamn på AFUK, Akademiet för Utaemet Kreativitet -
-Artistlinien, med parakrobatik som huvuddiciplin. Sedan följde en
-treårig
-utbildning" Centre des Arts du Cirque de Lomme-Et vous trouvez ca
-drole!!!" i Lille, Frankrike. 2003 startade de nycirkusföretaget
-"Stint"
-tillsammans och de jobbar nu som frilansande cirkusartister främst i
-Frankrike.<br>
-<br>
-Med Rebecka som överman och Sofia som underman kör de både liggande och
-stående parakrobatik, spänningsövningar, huvud- och handhandbalanser.
-Tillsammans har de jobbat ihop flera olika akter á 5 minuter. Däribland
-hittar man kvinnlig styrka och pur pondus, komisk vardagstristess,
-hisnande teknik och tyngdpunkt i relationerna mellan människor och
-samhällets uppochned vända verklighet, ur ett verkligt uppochnedvänt
-perspektiv. Sedan år 2006 har fokuset flyttats mer och mer åt
-improvisationshållet, parakrobatikimprovisation i samarbete med fri
-improviserad musik och kontaktimprovisation.<br>
-<a href="http://www.stint.nu" target=blank><u>www.stint.nu</u></a><br>
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 24 Februari<br>
-<span class="mellanrubrik">
-Musikjam!</span><br>
-kl 19-21, 30 kr<br>
-<br>
-Denna söndag kommer inga inhyrda musiker till jammet,
-utan då det är vi själva som står för musiken!<br>
-<br>
-Så alla som kan och vill -ta med er instrument eller
-andra ljudframbringande prylar. Att använda sin röst går förståss
-också bra.<br>
-<br>
-Vill man inte musisera så dansar man som vanligt.
-(..och därför kostar det bara 30 kr, då vi inte har några musiker som
-ska betalas)<br>
-<br>
-VÄLKOMNA!
-</td>
-</tr>
- -->
- <tr>
- <td class="kalendariecell">
- Söndag 2 Mars<br />
- <span class="mellanrubrik">Nybörjarintroduktion &amp;
- Jam med Karin R och Jenny</span><br />
- Kl. 19-21, 30 kr.
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 9 Mars<br />
- <span class="mellanrubrik">Blind fold jam - jam med
- ögonbindel!</span><br />
- ... med Sofi och Tove. Kl 19-21, 30 kr<br />
- På ett blind fold jam dansar man med ögonen förbundna,
- för att öka känsligheten, lyssnandet och samspelet. Det
- är också ett sätt att försöka komma förbi
- föreställningar man (medvetet eller omedvetet) har runt
- vem man väljer att dansa med. Det blir i slutändan en
- spegling till en själv om de val man gör på dansgolvet,
- där kroppen denna gång får bestämma i stället för
- huvudet. Vi inleder som vanligt med en introduktion.
- Tag gärna med egen ögonbindel!<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 16 Mars<br />
- <span class="mellanrubrik">Introduktion och
- jam</span><br />
- 19-21, 30 kr<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 23 Mars<br />
- <span class="mellanrubrik">Ingenting här för då är vi
- på NIM i Köpenhamn!
- <!-- Introduktion och jam</span><br> -->
- <!-- 19-21, 30 kr<br> --></span>
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen den 30:e<br />
- <span class="mellanrubrik">Kort introduktion och
- Livejam!!</span><br />
- 19-21, 50 kr<br />
- </td>
- </tr>
- </table>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/nxml-indent.el b/emacs.d/nxhtml/tests/in/nxml-indent.el
deleted file mode 100644
index fc17d1b..0000000
--- a/emacs.d/nxhtml/tests/in/nxml-indent.el
+++ /dev/null
@@ -1 +0,0 @@
-(nxml-scan-element-backward 6407 nil 2407)
diff --git a/emacs.d/nxhtml/tests/in/nxml-indent.html b/emacs.d/nxhtml/tests/in/nxml-indent.html
deleted file mode 100644
index db82964..0000000
--- a/emacs.d/nxhtml/tests/in/nxml-indent.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- Kimpro Malmö &amp; Sydsverige - AKTUELLT I MALMÖ
- </title>
- <link href="textmall.css" rel="stylesheet" type="text/css" />
- <link href="layout.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div class="kolumn1">
- <span class="rubrik">Aktuellt våren 2008</span><br />
- <i>Välkommen till dansens magiska universum!</i><br />
- Här i kalendariet kan du se vad som händer i kimprosammanhang
- just nu. De arrangemang med rosa botten är utöver våra
- vanliga söndags-träffar i Malmö. Vill du veta mer om de olika
- verksamheterna, ta en titt under <u><a href=
- "index_verksamhet.html" target="index3s">Verksamhet</a>.
- <b>OBS!</b> Notera att vi bytt danstid till kl 19-21! Detta
- gäller endast en period nu i vår.<br />
- <br /></u><b>Mars</b>
- <table width="370" cellspacing="5">
- <!--
- <tr>
- <td class="kalendariecell_special">
- <img src="grafik/aktuelltbild_januari.jpg" border=0><br>
- <i>Några av oss som dansar i Malmö</i><br>
-
-<span class="mellanrubrik">
-<br>
-<b>OBS: Ny tid!</b><br></span>
-Vi har ny tid för dansen på söndagar! 19-21 är nya tiden som gäller en tid framöver. <br>
-<br>
-
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 6 Januari<br>
-<span class="mellanrubrik">
-Grundklass & Jam</span><br>
-Årets första nybörjarintro! Kl. 17-19, 30 kr.
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 13 Januari<br>
-<span class="mellanrubrik">
-Introduktion & Jam</span><br>
-Kl. 17-19, 30 kr.
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 20 Januari<br>
-<span class="mellanrubrik">
-Introduktion & Jam</span><br>
-Kl. 17-19, 30 kr.
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 27 Januari<br>
-<span class="mellanrubrik">
-Introduktion & Jam</span><br>
-Kl. 17-19, 30 kr.
-</td>
-</tr>
-
-<tr>
-<td class="kalendariecell_special">
-<b>23-24 februari</b><br>
-<span class="mellanrubrik">WORKSHOP I AKROBATIK
-FÖR KONTAKTIMPROVISATÖRER</span><br>
-<br>
-Två parakrobater, Sofia och Rebecka, bosatta i Frankrike kommer till
-Malmö
-för att hålla en workshop speciellt för Kimpro Malmö!
-Workshopen kommer handla om hur man kan använda akrobatik i
-kontaktimprovisation. Inga förkunskaper i akrobatik behövs.<br>
-<br>
-23-24/2, kl.13-16 båda dagarna.<br>
-Kostnad: 350 kr.<br>
-Betalas senast den 21/2 till plusgirokonto: 1136904-8, Nordea,
-skriv: akro + namn.<br>
-Plats: meddelas senare.<br>
-Anmälan senast 19/2 till Clara, claravara00@yahoo.se<br>
-<br>
-Begränsat antal platser. Först till kvarn!<br>
-<br>
-<br>
-Sofia och Rebecka har arbetat tillsammans sedan år 2000. De träffades
-på Nordens dåvarande enda cirkusgymnasium i Gävle och utbildade sig
-sedan i Köpenhamn på AFUK, Akademiet för Utaemet Kreativitet -
-Artistlinien, med parakrobatik som huvuddiciplin. Sedan följde en
-treårig
-utbildning" Centre des Arts du Cirque de Lomme-Et vous trouvez ca
-drole!!!" i Lille, Frankrike. 2003 startade de nycirkusföretaget
-"Stint"
-tillsammans och de jobbar nu som frilansande cirkusartister främst i
-Frankrike.<br>
-<br>
-Med Rebecka som överman och Sofia som underman kör de både liggande och
-stående parakrobatik, spänningsövningar, huvud- och handhandbalanser.
-Tillsammans har de jobbat ihop flera olika akter á 5 minuter. Däribland
-hittar man kvinnlig styrka och pur pondus, komisk vardagstristess,
-hisnande teknik och tyngdpunkt i relationerna mellan människor och
-samhällets uppochned vända verklighet, ur ett verkligt uppochnedvänt
-perspektiv. Sedan år 2006 har fokuset flyttats mer och mer åt
-improvisationshållet, parakrobatikimprovisation i samarbete med fri
-improviserad musik och kontaktimprovisation.<br>
-<a href="http://www.stint.nu" target=blank><u>www.stint.nu</u></a><br>
-</td>
-</tr>
-<tr>
-<td class="kalendariecell">
-Söndag 24 Februari<br>
-<span class="mellanrubrik">
-Musikjam!</span><br>
-kl 19-21, 30 kr<br>
-<br>
-Denna söndag kommer inga inhyrda musiker till jammet,
-utan då det är vi själva som står för musiken!<br>
-<br>
-Så alla som kan och vill -ta med er instrument eller
-andra ljudframbringande prylar. Att använda sin röst går förståss
-också bra.<br>
-<br>
-Vill man inte musisera så dansar man som vanligt.
-(..och därför kostar det bara 30 kr, då vi inte har några musiker som
-ska betalas)<br>
-<br>
-VÄLKOMNA!
-</td>
-</tr>
- -->
- <tr>
- <td class="kalendariecell">
- Söndag 2 Mars<br />
- <span class="mellanrubrik">Nybörjarintroduktion &amp;
- Jam med Karin R och Jenny</span><br />
- Kl. 19-21, 30 kr.
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 9 Mars<br />
- <span class="mellanrubrik">Blind fold jam - jam med
- ögonbindel!</span><br />
- ... med Sofi och Tove. Kl 19-21, 30 kr<br />
- På ett blind fold jam dansar man med ögonen förbundna,
- för att öka känsligheten, lyssnandet och samspelet. Det
- är också ett sätt att försöka komma förbi
- föreställningar man (medvetet eller omedvetet) har runt
- vem man väljer att dansa med. Det blir i slutändan en
- spegling till en själv om de val man gör på dansgolvet,
- där kroppen denna gång får bestämma i stället för
- huvudet. Vi inleder som vanligt med en introduktion.
- Tag gärna med egen ögonbindel!<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 16 Mars<br />
- <span class="mellanrubrik">Introduktion och
- jam</span><br />
- 19-21, 30 kr<br />
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen 23 Mars<br />
- <span class="mellanrubrik">Ingenting här för då är vi
- på NIM i Köpenhamn!
- <!-- Introduktion och jam</span><br> -->
- <!-- 19-21, 30 kr<br> --></span>
- </td>
- </tr>
- <tr>
- <td class="kalendariecell">
- Söndagen den 30:e<br />
- <span class="mellanrubrik">Kort introduktion och
- Livejam!!</span><br />
- 19-21, 50 kr<br />
- </td>
- </tr>
- </table>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/only-html.html b/emacs.d/nxhtml/tests/in/only-html.html
deleted file mode 100644
index 7b297dd..0000000
--- a/emacs.d/nxhtml/tests/in/only-html.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- For testing fontification.
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/only-php.php b/emacs.d/nxhtml/tests/in/only-php.php
deleted file mode 100644
index ef54982..0000000
--- a/emacs.d/nxhtml/tests/in/only-php.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-include 'header.php';
-if (dff) {
- thank();
- // Bad indentation on next line?
- }
-for (;;) {
- you();
-}
-?>
diff --git a/emacs.d/nxhtml/tests/in/pavel-071116.djhtml b/emacs.d/nxhtml/tests/in/pavel-071116.djhtml
deleted file mode 100644
index 1476f3a..0000000
--- a/emacs.d/nxhtml/tests/in/pavel-071116.djhtml
+++ /dev/null
@@ -1,31 +0,0 @@
- <html>
-{% extends "base.html" %}
-<head>
-<title>Muzikanti z lekce 4</title>
-</head>
-<body>
-<table>
-some text not within django block
-{# some comment else #}
-{% for muzikant in people %}
-<tr>
-<td>
-{{ muzikant.name }}
-<b>
-{% comment %}
-something else
-{% if muzikant.nemamezeru %}*{% endif %} {% endcomment %}
-</b>
-</td>
-<td>
-<i {% if muzikant.ma_duraz %} style="font-weight: bold;"{% else %}{% endif %}>
-{{ muzikant.genre|rjust|lower }}
-</i>
-</td>
-</tr>
-{% endfor %}
-</table>
-{% get_current_time "%Y-%M-%d %I:%M %p" as my_current_time %}
-<p>The current time is {{ my_current_time }}.</p>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/php-parseable.php b/emacs.d/nxhtml/tests/in/php-parseable.php
deleted file mode 100644
index 590e4f6..0000000
--- a/emacs.d/nxhtml/tests/in/php-parseable.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- <img alt="ALT" src="<?php some_code("txt"); ?>" />
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/question43320.html b/emacs.d/nxhtml/tests/in/question43320.html
deleted file mode 100644
index 3ec0721..0000000
--- a/emacs.d/nxhtml/tests/in/question43320.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<table>
-<tr>
-<td>
-<table>
-<tr>
-<td>Hello</td>
-</tr>
-<?php
-for ($i=1;$i<5; $i++) {
-if (1) {
-}
-if (1) {
-if (1) {
-if (1) {
-?>
-<tr>
-<td>
-<p>the brace below (should have 2 spaces in front of it!)</p>
-</td>
-</tr>
-<?php
-}
-}
-$foo = "test".bar;
-for ($i=1;$i<5; $i++) {
-if () {
-}
-}
-}
-}
-?>
-</table>
-</td>
-</tr>
-</table>
diff --git a/emacs.d/nxhtml/tests/in/question44504-folding.html b/emacs.d/nxhtml/tests/in/question44504-folding.html
deleted file mode 100644
index 8ecb7ce..0000000
--- a/emacs.d/nxhtml/tests/in/question44504-folding.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<table>
-
-
-<!--M&#279;nesio pasirinkimas -->
-
-<tr>
- <td width='50' colspan='1' class='men-met'>
- <input type='button' value=' < ' onClick='goLastMonth(<?php echo date("t", strtotime("$year1-$month1-$day1")).", ".$month . ", " . $year.", ".date("w", strtotime("$year-$month-$day1")); ?>)' />
- </td>
- <td width='250' colspan='5' class='men-met'>
- <span class='title'><?php echo $men . " " . $year; ?></span><br />
- </td>
- <td width='50' colspan='1' align='right' class='men-met'>
- <input type='button' value=' > ' onClick='goNextMonth(1, <?php echo $month . ", " . $year.", ".date("w", strtotime("$year2-$month2-$day1")); ?>)' />
- </td>
-</tr>
-
-<!-- Antrašt&#279; su savait&#279;s dienom -->
-<tr>
- <td class='head' >Pir</td>
- <td class='head' >Ant</td>
- <td class='head' >Tre</td>
- <td class='head' >Ket</td>
- <td class='head' >Pen</td>
- <td class='head' >Šeš</td>
- <td class='head' style="color: red;" >Sek</td>
-</tr>
-</table>
diff --git a/emacs.d/nxhtml/tests/in/question49234.sh b/emacs.d/nxhtml/tests/in/question49234.sh
deleted file mode 100644
index 3596046..0000000
--- a/emacs.d/nxhtml/tests/in/question49234.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/ksh
-. /bin/shared/.mkt.cfg
-
-
-STORE_TMP=/tmp/stores.txt
-cd /spool/xml
-
-rm -f $STORE_TMP
-
-bteq << EOF
-.SESSIONS 1
-.LOGON $UserId,$Password;
-
-.EXPORT DATA FILE "$STORE_TMP"
-select division_id,store_id,
-trim(store)||' '||trim(store_addr_line2_txt)||', '||
-trim(store_city)
-from stores
-where status_id='A'
- and division_id in (517,1920,2445)
-order by division_id,store_city,store_id;
-
-.EXIT 0
-EOF
-
-perl <<EOF > $1
-print qq(<?xml version="1.0" encoding="utf-8"?>\n<stores>);
-open IN, '<$STORE_TMP';
-while (read IN,\$info, 12) {
- my (\$div, \$s) = unpack 'x2 i i', \$info; # read binary nums
- \$_ = <IN>; # Read store name
- chop; # Remove newline
- s/(\w+)/\u\L\$1/g; # Title case
- s/&/&amp;/g; # Fix ampersands
- s/"/&quot;/g; # Fix quotes
- printf qq(<s d="%02d" i="%d" n="%s"/>\n),\$div,\$s,\$_;
-}
-print "</stores>";
-EOF
-
-rm $STORE_TMP
diff --git a/emacs.d/nxhtml/tests/in/rgr-030809-indexbody.php b/emacs.d/nxhtml/tests/in/rgr-030809-indexbody.php
deleted file mode 100644
index 0384b4d..0000000
--- a/emacs.d/nxhtml/tests/in/rgr-030809-indexbody.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
-<h1><div class="pagetitle"><?php echoMessage("website.title");?></div></h1>
-
-<img class="indeximage1" src="images/indeximage1.jpg"/>
-
-<div class="textcontainer latestnewscontainer">
-
- <div class="indexspecialevent">
- <?php $numrows=displaySpecialEvent("nextevent");?>
- </div>
-
- <div class="pubquizpreview">
- <div>
- <h3>
- <?php echo createLink("pubquiz","pubquiz.comingnext");?>
- </h3>
- </div>
- <div>
- <?php previewEvents("pubquiz");?>
- </div>
- </div>
-
- <div class="latestnewstitle">
- <?php
- echoMessage("index.latest.title");
- ?>
- </div>
- <div class="latestnewsbody">
- <?php echoMessage("index.latest.body");?>
- <?php include("menu.php");?>
- </div>
-</div>
-
-<div class="textcontainer" title="English Books Hamburg">
-
- <div>
- <?php echoMessage("index.about1");?>
- </div>
-
- <div>
- <h2>
- <?php echo createLink("general","index.whatsnew");?>
- </h2>
- </div>
-
- <div>
- <img class="newsimage" src="images/newsimage1.jpg"/>
- </div>
-
- <div>
- <?php echoMessage("index.news.n1");?>
- </div>
- <div>
- <?php echoMessage("index.news.about2");?>
- </div>
-
-</div>
diff --git a/emacs.d/nxhtml/tests/in/rgr-080307.php b/emacs.d/nxhtml/tests/in/rgr-080307.php
deleted file mode 100644
index 0cc4616..0000000
--- a/emacs.d/nxhtml/tests/in/rgr-080307.php
+++ /dev/null
@@ -1,2 +0,0 @@
-<div src="hello"></div>
-<img alt="angry" src="hello.gif"/>
diff --git a/emacs.d/nxhtml/tests/in/rgr-080308-header-2.php b/emacs.d/nxhtml/tests/in/rgr-080308-header-2.php
deleted file mode 100644
index e53ee01..0000000
--- a/emacs.d/nxhtml/tests/in/rgr-080308-header-2.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php require_once("utils.php"); ?>
-
-<?php echo '<?xml version="1.0" encoding="utf-8"/?/>'; ?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
-
- <link type="text/css" href="stylesheet.css" rel="stylesheet" title="Style Sheet" />
- <link type="text/css" href="custom.css" rel="stylesheet" title="Style Sheet" />
-
- <title><?php echoMessage("website.title")?></title>
-
- <meta name="keywords" content="irish bar,irish pub,finnegans wake , hamburg"/>
- <meta name="description" content="Finnegans Wake Irish Pub"/>
-
- <style type="text/css">@import url(calendar-win2k-1.css);</style>
- <script type="text/javascript" src="jscalendar-1.0/calendar.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/lang/calendar-en.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/calendar-setup.js"></script>
-
-
-</head>
-
-<body class="body" title="Irish Bar">
-
- <div class="webcontainer">
-
- <div class="headerbanner">
- <img src="images/banner.gif" alt="Irish Bar"/>
- </div>
-
- <div class="logo">
- <img src="images/logo.gif" alt="Irish Pubs"/>
- </div>
-
- <div>
- <?php include("navigation.php");?>
- </div>
-
- <?php
- if(isDemo()){
- echo '<div class="demomode">';
- echoMessage("admin.demo");
- echo "</div>";
- }
-
- include("address.php");
- include("sportpreview.php");
-
- ?>
-
- <div class="centercontainer" title="Irish Pubs Germany">
diff --git a/emacs.d/nxhtml/tests/in/rgr-080308-header.php b/emacs.d/nxhtml/tests/in/rgr-080308-header.php
deleted file mode 100644
index e53ee01..0000000
--- a/emacs.d/nxhtml/tests/in/rgr-080308-header.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php require_once("utils.php"); ?>
-
-<?php echo '<?xml version="1.0" encoding="utf-8"/?/>'; ?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
-
- <link type="text/css" href="stylesheet.css" rel="stylesheet" title="Style Sheet" />
- <link type="text/css" href="custom.css" rel="stylesheet" title="Style Sheet" />
-
- <title><?php echoMessage("website.title")?></title>
-
- <meta name="keywords" content="irish bar,irish pub,finnegans wake , hamburg"/>
- <meta name="description" content="Finnegans Wake Irish Pub"/>
-
- <style type="text/css">@import url(calendar-win2k-1.css);</style>
- <script type="text/javascript" src="jscalendar-1.0/calendar.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/lang/calendar-en.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/calendar-setup.js"></script>
-
-
-</head>
-
-<body class="body" title="Irish Bar">
-
- <div class="webcontainer">
-
- <div class="headerbanner">
- <img src="images/banner.gif" alt="Irish Bar"/>
- </div>
-
- <div class="logo">
- <img src="images/logo.gif" alt="Irish Pubs"/>
- </div>
-
- <div>
- <?php include("navigation.php");?>
- </div>
-
- <?php
- if(isDemo()){
- echo '<div class="demomode">';
- echoMessage("admin.demo");
- echo "</div>";
- }
-
- include("address.php");
- include("sportpreview.php");
-
- ?>
-
- <div class="centercontainer" title="Irish Pubs Germany">
diff --git a/emacs.d/nxhtml/tests/in/rgr-080308-indexbody.php b/emacs.d/nxhtml/tests/in/rgr-080308-indexbody.php
deleted file mode 100644
index 0384b4d..0000000
--- a/emacs.d/nxhtml/tests/in/rgr-080308-indexbody.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
-<h1><div class="pagetitle"><?php echoMessage("website.title");?></div></h1>
-
-<img class="indeximage1" src="images/indeximage1.jpg"/>
-
-<div class="textcontainer latestnewscontainer">
-
- <div class="indexspecialevent">
- <?php $numrows=displaySpecialEvent("nextevent");?>
- </div>
-
- <div class="pubquizpreview">
- <div>
- <h3>
- <?php echo createLink("pubquiz","pubquiz.comingnext");?>
- </h3>
- </div>
- <div>
- <?php previewEvents("pubquiz");?>
- </div>
- </div>
-
- <div class="latestnewstitle">
- <?php
- echoMessage("index.latest.title");
- ?>
- </div>
- <div class="latestnewsbody">
- <?php echoMessage("index.latest.body");?>
- <?php include("menu.php");?>
- </div>
-</div>
-
-<div class="textcontainer" title="English Books Hamburg">
-
- <div>
- <?php echoMessage("index.about1");?>
- </div>
-
- <div>
- <h2>
- <?php echo createLink("general","index.whatsnew");?>
- </h2>
- </div>
-
- <div>
- <img class="newsimage" src="images/newsimage1.jpg"/>
- </div>
-
- <div>
- <?php echoMessage("index.news.n1");?>
- </div>
- <div>
- <?php echoMessage("index.news.about2");?>
- </div>
-
-</div>
diff --git a/emacs.d/nxhtml/tests/in/rr-090524-header.php b/emacs.d/nxhtml/tests/in/rr-090524-header.php
deleted file mode 100644
index e966036..0000000
--- a/emacs.d/nxhtml/tests/in/rr-090524-header.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php require_once("utils.php");?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-
-<html>
-
-<?php
- if ($_SESSION["CurrentLanguage"]==0){
- $_SESSION["CurrentLanguage"]=$Default_Lang;
- }
-?>
-
- <head>
-
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
-
- <style type="text/css">@import url(calendar-win2k-1.css);</style>
- <script type="text/javascript" src="jscalendar-1.0/calendar.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/lang/calendar-en.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/calendar-setup.js"></script>
-
- <link type="text/css" href="stylesheet.css" rel="stylesheet" title="Style Sheet" >
- <style type="text/css"><?php echoMessage("admin.css.source");?> </style>
-
- <link type="text/css" href="custom.css" rel="stylesheet" title="Style Sheet">
- <link type="text/css" href="local.css" rel="stylesheet" title="Style Sheet">
-
- <link type="text/css" href="print.css" rel="stylesheet" media="print">
-
- <meta name="keywords" content='<?php echoMessage("header.keywords");?>'>
- <meta name="description" content='<?php echoMessage("header.description");?>'>
-
- <title><?php echoMessage("website.title")?></title>
-
-
- </head>
-
- <body class="body">
- <div class="wc">
- <table class="language">
-<tr>
- <td>
- <?php generateLanguageForm(true);?>
- </td>
- <td><a href="cyclelanguage"><img class="languageflag" src="flags/<?php echo getCurrentLanguage();?>" alt="<?php echoMessage("language.selectnext");?>" title="<?php echoMessage("language.selectnext");?>"></a></td>
-</tr>
- </table>
-
- <?php include("navigation.php");?>
- <div class="ical">
- <?php echoMessage("index.ical");?>
- </div>
-
- <div class="wb">
-
- <?php
-
- if(adminMode()){
- echo '<div class="admincontrolcontainer clearfix">';
- createNavigationLinks("navlinks",1);
- echo '<div class="clear"></div>';
- echo '</div>';
- }
-
- if(isDemo()){
- echo '<div class="demomode">';
- echoMessage("admin.demo");
- echo "</div>";
- }
-
- ?>
-
- <?php include("previews.php");?>
-
- <div class="centercontainer clearfix">
diff --git a/emacs.d/nxhtml/tests/in/rr-090923-header.php b/emacs.d/nxhtml/tests/in/rr-090923-header.php
deleted file mode 100644
index 7f739eb..0000000
--- a/emacs.d/nxhtml/tests/in/rr-090923-header.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
- require_once("utils.php");
-?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
- <?php if(!processLanguageURL())
- {
- if ($_SESSION["CurrentLanguage"]==0){
- $_SESSION["CurrentLanguage"]=$Default_Lang;
- }
- }
- ?>
-
- <head>
-
- <title><?php echo getMessage("website.title");?></title>
-
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-
- <?php
- if (AUTO_REFRESH_DELAY>0 && !adminMode())
- echo '<meta http-equiv="refresh" content="'.AUTO_REFRESH_DELAY.'"/>';
- ?>
-
-
- <link type="text/css" href="jscalendar-1.0/calendar-win2k-1.css" rel="stylesheet" title="Style Sheet"/> <!-- indicate local copy -->
- <script type="text/javascript" src="jscalendar-1.0/calendar.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/lang/calendar-en.js"></script>
- <script type="text/javascript" src="jscalendar-1.0/calendar-setup.js"></script>
-
-
- <link type="text/css" href="stylesheet.css" rel="stylesheet" title="Style Sheet" />
- <link type="text/css" href="print.css" rel="stylesheet" media="print"/>
-
- <!--[if lt IE 7]>
- <link type="text/css" href="ie.css" rel="stylesheet" title="Style Sheet"/>
- <link type="text/css" href="site-ie.css" rel="stylesheet" title="Style Sheet"/>
- <![endif]-->
-
-
- <link type="text/css" href="/custom/site.css" rel="stylesheet" title="Style Sheet"/> <!-- project custom -->
- <style type="text/css"><?php echo htmlentities(getMessage("header.custom.css"));?> </style>
-
-
-<?php undercon();
-echoHeaderContent("keywords",curPageName());
-echoHeaderContent("description",curPageName());
-echoHeaderContent("verify-v1",curPageName());
-?>
-
- <link rel="SHORTCUT ICON" href="favicon.ico"/>
-
- <META NAME="AUTHOR" CONTENT="Richard G. Riley"/>
- <meta name="copyright" content="Copyright Richard G. Riley 2009" />
-
-
-
- </head>
-
- <body id="body">
-
- <div id="wcbg">
-
- <div id="wc" class="clearfix">
-
- <?php
- checkWebLicense();
- ?>
-
- <?php
- include("navigation.php");
- ?>
-
- <div id="wb">
-
- <?php
- if(isDemo()){
- echo '<div class="demomode">';
- echoMessage("admin.demo");
- echo "</div>";
- }
- if(adminMode()){
- echo '<div id="admincontrolcontainer">';
- createNavigationLinks("navlinks",1);
- echo '<div class="clear"></div>';
- echo '</div>';
- }
- ?>
-
- <div id="centercontainer">
- <?php
- if(messageMode()){
- echo '<div class="editwebtitle">';
- echoMessage("website.title");
- echo '</div>';
- }
- ?>
-
diff --git a/emacs.d/nxhtml/tests/in/rr-address-090304.php b/emacs.d/nxhtml/tests/in/rr-address-090304.php
deleted file mode 100644
index 34cbe25..0000000
--- a/emacs.d/nxhtml/tests/in/rr-address-090304.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<div class="addresscontainer" title="Hot Love Fan Mail">
-
-<a target="_self" href="/Site/Content/Exhibitors/exhibitors-welcome.aspx"><img height="100" border="0" width="170" vspace="7" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image21','','/site/images/intro_button_exhib_over.jpg',1)" id="Image21" name="Image21" alt="Exhibitors button" src="http://www.farnborough.com/site/images/intro_button_exhib_static.jpg"/></a>
-</div> \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/rr-address-nxhtml.err b/emacs.d/nxhtml/tests/in/rr-address-nxhtml.err
deleted file mode 100644
index f06b0a0..0000000
--- a/emacs.d/nxhtml/tests/in/rr-address-nxhtml.err
+++ /dev/null
Binary files differ
diff --git a/emacs.d/nxhtml/tests/in/rr-min8.php b/emacs.d/nxhtml/tests/in/rr-min8.php
deleted file mode 100644
index bf464f1..0000000
--- a/emacs.d/nxhtml/tests/in/rr-min8.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
-
-<script type="text/javascript" src="jscalendar-1.0/calendar.js"></script>
-<script type="text/javascript" src="jscalendar-1.0/lang/calendar-en.js"></script>
diff --git a/emacs.d/nxhtml/tests/in/ryan-091104-literal.tpl b/emacs.d/nxhtml/tests/in/ryan-091104-literal.tpl
deleted file mode 100644
index 64c9d26..0000000
--- a/emacs.d/nxhtml/tests/in/ryan-091104-literal.tpl
+++ /dev/null
@@ -1,148 +0,0 @@
-{include file="library/header.tpl"}
-
-{* comment *}
-
-{literal}
-<script language="JavaScript" type="text/javascript">
-function validate_form(f){
- allElements = f.getInputs('text');
- var get_time = /^times\[(.+)\]$/;
- var get_date = /^dates\[(.+)\]$/;
- for(var index=0; index < allElements.length; ++index){
- var item = allElements[index];
- if(get_time.test(item.name)){
- if($F(item)){
- var key = get_time.exec(item.name)
- var sibling_date = 'dates[' + key[1] + ']';
- if(! $F(sibling_date)){
- alert("Date is required if entering a manual time!");
- $(sibling_date).addClassName('problem');
- return false;
- }
- }
-
- }
- }
- else if(get_date.test(item.name)){
- if($F(item)){
- var key = get_date.exec(item.name)
- var sibling_time = 'times[' + key[1] + ']';
- if(! $F(sibling_time)){
- alert("Time is required if entering a manual date!");
- $(sibling_time).addClassName('problem');
- return false;
- }
- }
- }
- return true;
-}
-
-function validate_date( el )
-{
- var date = /^\d\d\d\d-\d\d-\d\d$/;
- if ( !date.test(el.value) ) {
- alert('The date you have entered is not properly formatted (yyyy-mm-dd). Please re-enter it.');
- el.value='';
- el.focus();
- el.className='problem';
- return false;
- }
- el.className='';
- return true;
-}
-
-function validate_time( el )
-{
- var time = /^\d\d:\d\d$/;
- if ( !time.test(el.value) ) {
- alert('The time you have entered is not properly formatted (hh:mm). Please re-enter it.');
- el.value='';
- el.focus();
- el.className = 'problem';
- return false;
- }
- el.className = '';
- return true;
-}
-</script>
-
-<style type="text/css">
- foo: {
- font-weight: bold;
- color: #F00;
- }
-</style>
-{/literal}
-
-{if $containers|@count }
-
-<form name="test" method=post onsubmit="return validate_form(this);">
-<input type="hidden" name="date" value="{$smarty.request.date}">
-<input type="hidden" name="page_name" value="{$page_name}" />
-
-<table frame="void" bordercolor="#000000" rules="cols" class="data" style="float:center;">
-<thead>
-<tr class="sortHeader">
- {if $goahead}
- <th onclick="sortTable(this)">{t}Date{/t}<br /><span class="ex">YYYY-MM-DD</span></th>
- {/if}
- {if $goahead}
- <th onclick="sortTable(this)">{t}Time{/t}<br /><span class="ex">HH:MM</span></th>
- {/if}
-
- <th onclick="sortTable(this)">{t}Quantity{/t}</th>
-</tr>
-</thead>
-
-{foreach from=$widgets item="widget"}
-<tbody class="{cycle values=",highlight}" ondblclick="return insertHeader(this);">
- {if $widget->date != $today}
- {assign var=newday value=true}
- {assign var=today value=$widget->date}
- {else}
- {assign var=newday value=false}
- {/if}
-
-<tr class="{if $newday}group{/if}">
- {if $goahead}
- {if $widget->activity_allowed}
- <td class="ctext"><input type="text" value="" onchange="validate_date(this, this.form );" name="dates[{$widget->widget_id_for_web}]" id="dates[{$widget->widget_id_for_web}]" size=10 maxlength=10></td>
- {else}
- <td></td>
- {/if}
- {/if}
-
- {if $goahead}
- {if $widget->activity_allowed}
- <td class="ctext"><input type="text" value="" onchange="validate_time(this, this.form);" name="times[{$widget->widget_id_for_web}]" id="times[{$widget->widget_id_for_web}]"size=5 maxlength=5></td>
- {else}
- <td></td>
- {/if}
- {/if}
-
- <td>{$widget->quantity}</td>
-</tr>
-</tbody>
-{/foreach}
-</table>
-
-<hr />
- {if $goahead}
- <br />
- <b>{t}Note{/t}:</b> {t}Changes may not occur immediately.{/t}
- <br />
- <input type=submit value="Update Widgets">
- {/if}
-
- </form>
-{else}
- {t}There are no widgets on this day{/t}
-{/if}
-
-{literal}
-<hr/>test
-
-<p>Paragraph</p>
-{/literal}
-
-{include file="library/footer.tpl"}
diff --git a/emacs.d/nxhtml/tests/in/ryan-091111-wrong-side.tpl b/emacs.d/nxhtml/tests/in/ryan-091111-wrong-side.tpl
deleted file mode 100644
index 51164a8..0000000
--- a/emacs.d/nxhtml/tests/in/ryan-091111-wrong-side.tpl
+++ /dev/null
@@ -1,18 +0,0 @@
-<script language="javascript" type="text/javascript">
-//<!--
-{literal}
-$('account').observe("change", function(event) {should_get_account_data(
-'first', 'acct' );});
-$('desc').observe("change", function(event) {should_get_account_data(
-'first', 'name' );});
-{/literal}
-{if $autocomplete}
-{literal}
-document.observe("dom:loaded", function(event)
-{auto_complete_customers('first', 'acct');});
-document.observe("dom:loaded", function(event)
-{auto_complete_customers('first', 'name');});
-{/literal}
-{/if}
-//-->
-</script>
diff --git a/emacs.d/nxhtml/tests/in/schemas.xml b/emacs.d/nxhtml/tests/in/schemas.xml
deleted file mode 100644
index 09b0bac..0000000
--- a/emacs.d/nxhtml/tests/in/schemas.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
-</locatingRules>
diff --git a/emacs.d/nxhtml/tests/in/sd-080803-test.php b/emacs.d/nxhtml/tests/in/sd-080803-test.php
deleted file mode 100644
index e44ccc6..0000000
--- a/emacs.d/nxhtml/tests/in/sd-080803-test.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <style type="text/css">
- table {
- border-collapse: collapse;
- }
- </style>
- </head>
- <body>
- <h1><?= $title ?></h1>
- </body>
-</html>
-
diff --git a/emacs.d/nxhtml/tests/in/senny-091118.htm b/emacs.d/nxhtml/tests/in/senny-091118.htm
deleted file mode 100644
index dda2fe3..0000000
--- a/emacs.d/nxhtml/tests/in/senny-091118.htm
+++ /dev/null
@@ -1,247 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<title>PostFinance - Home</title>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="description" content="" />
-<meta name="keywords" content="" />
-<meta name="language" content="en" />
-<meta name="copyright" content="Copyright (c) by PostFinance" />
-<meta name="robots" content="all" />
-<link rel="canonical" href="http://www.postfinance.ch/pf/content/en" />
-
-
-
-<meta name="WT.pf_nav_L1" content="HOMEPAGE" />
-<meta name="WT.pf_nav_L2" content="" />
-<meta name="WT.pf_nav_L3" content="" />
-
-
-<!-- WT meta tag library 0.0.30 -->
-<!-- Execution time: 0ms -->
-<script type="text/javascript">
-var aWtAdviews = new Array();
-var aWtTags = new Array();
-</script>
-
-
-<link rel="stylesheet" href="./../../../staticcontent/css/styles.css" type="text/css" media="screen,print" />
-
-<!--[if IE 6]>
-<link rel="stylesheet" href="./../../../staticcontent/css/styles_ie6.css" type="text/css" media="screen,print" />
-<![endif]-->
-
-<!--[if IE 7]>
-<link rel="stylesheet" href="./../../../staticcontent/css/styles_ie7.css" type="text/css" media="screen,print" />
-<![endif]-->
-
-<link rel="stylesheet" href="./../../../staticcontent/css/bok.css" type="text/css" media="screen,print" />
-<link rel="stylesheet" href="./../../../staticcontent/css/print.css" type="text/css" media="print" />
-
-
-
-
-</head><body>
-
- <!-- WT1 start -->
-<script type="text/javascript" src="./../../../staticcontent/js/webtrends.js"></script>
-<noscript>
-<img alt="" style="border:none;" name="DCSIMG" width="1" height="1" src="/dcsez1c8510000g4ydy8x63gm_3g9z/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=8.6.2"/>
-</noscript>
-<script type="text/javascript">
-<!--
-var _tag=new WebTrends();
-_tag.domain = window.location.hostname;
-_tag.dcsid = "dcsez1c8510000g4ydy8x63gm_3g9z";
-_tag.fpcdom = ".postfinance.ch";
-_tag.dcsGetId();
-//-->
-</script>
-<!-- WT1 end -->
-
-
-
-
-
-
-
-
-
-<script type="text/javascript" src="./../../../staticcontent/js/old/util.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/old/AJAXService.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/old/engine.js"></script>
-
-<script type="text/javascript">document.documentElement.className+=" js";</script>
-<script type="text/javascript" src="./../../../staticcontent/js/jquery-1.2.6.min.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/jquery.bgiframe.pack.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/definitions.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/main.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/tabbed.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/aria.js"></script>
-<script type="text/javascript" src="./../../../staticcontent/js/tooltip2.js"></script>
-
-
-
-<script type="text/javascript">
-//<![CDATA[
-// SubContentGroup
-_tag.WT.cg_s='_home';
-//]]>
-</script>
-
-
-<div id="page">
- <div id="header" class="header-en">
- <!-- Skip Navigation Start -->
-
-
-
-<h1>Navigation of PostFinance.ch</h1>
-<ul id="skipLinks">
- <li>
- <a accesskey="1" href="#navTopRoot" title="Directly to the navigation">Navigation</a>
- </li>
- <li>
- <a accesskey="2" href="#mainContent" title="Directly to the content">Content</a>
- </li>
- <li>
- <a accesskey="3" href="/pf/ref/de/seg/bridge/nav/efinoverview.html" title="Directly to E-Finance">E-Finance</a>
- </li>
- <li>
- <a accesskey="4" href="/pf/content/en/service/sitemap.html" title="Directly to the sitemap">Sitemap</a>
- </li>
-</ul>
-
-
-
-
-
-<!-- Logo/Claim Start --><a accesskey="0" href="/pf/content/en.html" id="pfLogo">PostFinance, Swiss Post</a><p id="pfClaim" class="pfClaim-en"><strong>Surpassing support</strong></p>
-<!-- Logo/Claim End -->
-
- <!-- Skip Navigation End -->
-
- <h2>Language, tools and important links</h2>
- <!-- Language Selector Start -->
-<div id="languageSelector"><ul><li class="first-child "><a href="/pf/content/de.html"><abbr xml:lang="de">de</abbr></a></li><li ><a href="/pf/content/fr.html"><abbr xml:lang="fr">fr</abbr></a></li><li ><a href="/pf/content/it.html"><abbr xml:lang="it">it</abbr></a></li><li class="selected"><a href="/pf/content/en.html"><abbr xml:lang="en">en</abbr></a></li></ul></div>
-<!-- Language Selector End -->
-
-
-
-
- <!-- globalNavRoot Start -->
- <div id="globalNavRoot">
-
-
-
-
-<div class="globalLinks"><p><a href="http://www.post.ch/en/" rel="external">Swiss Post</a></p>
-
-
-<ul class="serviceLinks"><li class="first-child"><a href="/pf/content/en/service/contact.html">Contact</a></li><li><a href="/pf/content/en/service/sitemap.html">Sitemap</a></li></ul></div>
- </div>
- <!-- globalNavRoot End -->
-
- <!-- Suche start --><form action="/pf/content/en/single/search.html" method="get" id="searchform"><div id="search"><label for="searchfield">Search</label><input value="" maxlength="2048" type="text" class="search-field" name="query" id="searchfield" /><input value="Search" type="submit" class="search-button" name="searchsubmit" /><input value="/content/pf/content/en" type="hidden" name="nav" /></div></form><!-- Suche end -->
-
-
-
-<!-- Topnavigation start --><div id="topNav"><a name="navTopRoot"></a><h2 class="hd">Main navigation</h2><ul class="top-nav-links"><li><a href="/pf/content/en/seg/priv.html">Private customers</a></li><li><a href="/pf/content/en/seg/biz.html">Business customers</a></li><li><a href="/pf/content/en/seg/about.html">About us</a></li></ul>
- <div class="user-login">
-
- </div>
-</div>
-<!-- end navTop -->
-
- </div>
- <div id="mainArea">
- <div class="hp-split">
- <div id="content">
- <div class="mood-home" style="background: transparent url(/content/pf/content/en.parsys-0001-Image.0.0.0.mainImage1.jpg) no-repeat scroll 0 0; z-index: 100000;">
-<span class="hidden">
- <a href="https://e-finance.postfinance.ch/ef/secure/html/">
- E-finance login
- </a>
-</span>
-</div>
-
-<div class="tri-split">
- <div class="col col0">
- <div class="mod"><a name="mainContent"></a>
- <h2 class="hd"><a href="/pf/content/en/seg/priv.html" rel="nofollow" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Private');">Private customers</a></h2>
- <div class="bd">
- <p>Everything you need <br/>for your private finances.</p>
- <ul class="list-links"><li><a href="/pf/content/en/seg/priv/prod.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Products_priv');">Products<span class="hidden">Private customers</span></a></li><li><a href="/pf/content/en/seg/priv/customer.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Customer_priv');">Customer Service<span class="hidden">Private customers</span></a></li><li><a href="/pf/ref/de/seg/bridge/nav/efinoverview.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_E-finance');">E-finance</a></li><li><a href="/pf/content/en/seg/priv/etrade.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_E-trading');">E-trading</a></li></ul>
- </div>
- </div>
- </div>
- <div class="col col1">
- <div class="mod">
- <h2 class="hd"><a href="/pf/content/en/seg/biz.html" rel="nofollow" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Business');">Business customers </a></h2>
- <div class="bd">
- <p>Everything you need <br/>for your business finances.</p>
- <ul class="list-links"><li><a href="/pf/content/en/seg/biz/product.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Products_biz');">Products<span class="hidden">Business customers </span></a></li><li><a href="/pf/content/en/seg/biz/customer.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Customer_biz');">Customer Service<span class="hidden">Business customers </span></a></li><li><a href="/pf/content/en/seg/biz/offer/startup.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_startup');">Company founder and start-up company<span class="hidden">Business customers </span></a></li><li><a href="/pf/content/en/seg/biz/offer/sbiz.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_sbiz');">Small and medium-sized enterprises</a></li><li><a href="/pf/content/en/seg/biz/offer/smbiz.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_smbiz');">Medium-sized/large businesses</a></li><li><a href="/pf/content/en/seg/biz/offer/publicentity.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Public');">Public entities</a></li><li><a href="/pf/content/en/seg/biz/offer/club.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Associations');">Associations</a></li><li><a href="/pf/content/en/seg/biz/offer/bank.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Banks');">Banks</a></li></ul>
- </div>
- </div>
- </div>
- <div class="col col2">
- <div class="mod">
- <h2 class="hd"><a href="/pf/content/en/seg/about.html" rel="nofollow" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Aboutus');">About us</a></h2>
- <div class="bd">
- <p>Key facts about PostFinance.</p>
- <ul class="list-links"><li><a href="/pf/content/en/seg/about/pf.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Company');">Company</a></li><li><a href="/pf/content/en/seg/about/media.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Media');">Media</a></li><li><a href="/pf/content/en/seg/about/job.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Jobs');">Jobs</a></li><li><a href="/pf/content/en/seg/about/event.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_Events');">Events</a></li></ul>
- </div>
- </div>
- </div>
-</div>
- </div>
-
- <!-- serviceArea Start -->
- <div id="serviceArea">
- <h1>Related content</h1>
- <div class="mod nofoot"><h2 class="hd">E-Services</h2><div class="bd"><ul class="list-links"><li><a href="/pf/ref/de/seg/bridge/nav/efinloginhomeen.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_le_home_LoginE-Finance');">Login E-Finance</a></li><li><a href="/pf/ref/de/seg/bridge/etrade/loginen.html" title="" onmousedown="_tag.dcsAdTrack('WT.ac', '_li_home_LoginE-Trading');">Login E-Trading</a></li></ul></div></div>
- <!-- Kudicontainer -->
- <div id="AJAX_Teaser" lang="en"><div class="mod nofoot teaser one-click"><h2 class="hd">
-<a href="/pf/content/en/seg/priv/prod/eserv/etrade/promotion.html" title="More information about the offer." onmousedown="_tag.dcsAdTrack('WT.ac', 'PK952_APK_TE_A_EN_L0_A_Homepage_1_en', 'WT.mc_id', 'PK952', 'WT.mc_ev', 'click');">E-trading</a></h2>
-<p class="bd">
-<a href="/pf/content/en/seg/priv/prod/eserv/etrade/promotion.html" title="More information about the offer." onmousedown="_tag.dcsAdTrack('WT.ac', 'PK952_APK_TE_A_EN_L0_A_Homepage_1_en', 'WT.mc_id', 'PK952', 'WT.mc_ev', 'click');"><img src="/staticcontent/teasers/content/_etc_medialib_pf_de_teaser_camp_2009_pk952_Par_0009_Image.jpg" alt="" /><span class="hidden"> More information about the offer.</span>
-<span>No brokerage fees until the end of January 2010.*
-&nbsp;<em>More</em></span></a></p></div><div class="mod nofoot teaser one-click"><h2 class="hd">
-<a href="/pf/content/en/seg/bcase/lohnkonto.html" title="More information on the salary account" onmousedown="_tag.dcsAdTrack('WT.ac', 'PK920_APK_TE_A_EN_L0_A_Homepage_2_en', 'WT.mc_id', 'PK920', 'WT.mc_ev', 'click');">Competition</a></h2>
-<p class="bd">
-<a href="/pf/content/en/seg/bcase/lohnkonto.html" title="More information on the salary account" onmousedown="_tag.dcsAdTrack('WT.ac', 'PK920_APK_TE_A_EN_L0_A_Homepage_2_en', 'WT.mc_id', 'PK920', 'WT.mc_ev', 'click');"><img src="/staticcontent/teasers/content/_content_teaser_content_en_seg_running_kampagnen_ci_pk920_pfch_parsys_0001_Image.jpg" alt="" /><span class="hidden"> More information on the salary account</span>
-<span>Double your income: switch your salary account to PostFinance.
-&nbsp;<em>More</em></span></a></p></div>
-<script type="text/javascript"> aWtTags[aWtTags.length] = "WT.pf_nav_L1"; aWtTags[aWtTags.length] = "HOMEPAGE"; aWtTags[aWtTags.length] = "WT.ad"; aWtTags[aWtTags.length] = "PK952_APK_TE_A_EN_L0_A_Homepage_1_en;PK920_APK_TE_A_EN_L0_A_Homepage_2_en"; aWtTags[aWtTags.length] = "WT.pf_logstatus"; aWtTags[aWtTags.length] = "anonym"; aWtTags[aWtTags.length] = "WT.pf_segment"; aWtTags[aWtTags.length] = "anonym"; aWtTags[aWtTags.length] = "WT.cg_n"; aWtTags[aWtTags.length] = "PF HOME anonym"; aWtTags[aWtTags.length] = "WT.pf_pagetype"; aWtTags[aWtTags.length] = "L0_A_Homepage"; </script></div>
- </div>
-
- </div>
- </div>
-</div>
-
-
-<!-- Footer start --><div id="footer"><h1>References</h1><ul id="footerLinks"><li><a href="/pf/content/en/footer/access.html">Accessibility</a></li><li><a href="/pf/content/en/footer/legal.html">Legal disclaimer</a></li><li><a href="/pf/content/en/footer/cond.html">Prices/Conditions/GTC</a></li><li><a href="/pf/content/en/footer/impressum.html">Publishing details</a></li></ul><!-- Footernavigation end -->
-<p>Copyright (c) 2009 by PostFinance. All rights reserved.</p>
-</div><!-- Footer end -->
-
-
-
-
-
-
-
-
-
-
-<script type="text/javascript">
- if (typeof(_tag) != "undefined") {
- _tag.dcsCollect();
- }
-</script>
-
-
-
-</body>
-</html>
-
diff --git a/emacs.d/nxhtml/tests/in/sheit-2007-12-26.php b/emacs.d/nxhtml/tests/in/sheit-2007-12-26.php
deleted file mode 100644
index 8aa97cc..0000000
--- a/emacs.d/nxhtml/tests/in/sheit-2007-12-26.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-/**
- *
- * @param string $name
- */
- public function setName($name) {
- $this->name = $name;
- }
-?>
diff --git a/emacs.d/nxhtml/tests/in/short-tags.php b/emacs.d/nxhtml/tests/in/short-tags.php
deleted file mode 100644
index a297e03..0000000
--- a/emacs.d/nxhtml/tests/in/short-tags.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<? $foo=1 ?>, <?= "bla" ?>
- instead of
-<?php $foo=1 ?>, <?php echo "bla" ?>
diff --git a/emacs.d/nxhtml/tests/in/single-question-sign.html b/emacs.d/nxhtml/tests/in/single-question-sign.html
deleted file mode 100644
index bb7d6fc..0000000
--- a/emacs.d/nxhtml/tests/in/single-question-sign.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- <?>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/ssjs.ssjs b/emacs.d/nxhtml/tests/in/ssjs.ssjs
deleted file mode 100644
index 501ed68..0000000
--- a/emacs.d/nxhtml/tests/in/ssjs.ssjs
+++ /dev/null
@@ -1,9 +0,0 @@
-<p id="msg"></p>
-<script runat="server">
- var nme = document.createTextNode(
- "Hello my name is Jaxer.");
- var para = document.getElementById("name");
- para.appendChild(nme);
-</script>
-
-<p>Hello, my name is <% response.name %>.</p>
diff --git a/emacs.d/nxhtml/tests/in/string-bug.php b/emacs.d/nxhtml/tests/in/string-bug.php
deleted file mode 100644
index 3b25c9f..0000000
--- a/emacs.d/nxhtml/tests/in/string-bug.php
+++ /dev/null
@@ -1 +0,0 @@
- <?= "bla" ?>
diff --git a/emacs.d/nxhtml/tests/in/style=.html b/emacs.d/nxhtml/tests/in/style=.html
deleted file mode 100644
index e005fad..0000000
--- a/emacs.d/nxhtml/tests/in/style=.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- <p style="">
- </p>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/style=string-font.html b/emacs.d/nxhtml/tests/in/style=string-font.html
deleted file mode 100644
index e5dd87d..0000000
--- a/emacs.d/nxhtml/tests/in/style=string-font.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News and Notes about nXhtml</title>
- </head>
- <body>
- <p id="hadron-bugs" style="margin-top:1em;">Thanks for testing!</p>
-
- <p id="state-of-the-art" style="margin-top:1em;
- background-color: #00fa9a;
- background-color: #20b2aa;
- padding: 0.5em;
- ">The State of the Art</p>
- <p id="something"></p>
- <p id="something" style="background-color: #54ff9f; padding: 0.5em"></p>
- <p id="something"></p>
diff --git a/emacs.d/nxhtml/tests/in/svg.svg b/emacs.d/nxhtml/tests/in/svg.svg
deleted file mode 100644
index 1b24f33..0000000
--- a/emacs.d/nxhtml/tests/in/svg.svg
+++ /dev/null
@@ -1 +0,0 @@
-something
diff --git a/emacs.d/nxhtml/tests/in/temp2.php b/emacs.d/nxhtml/tests/in/temp2.php
deleted file mode 100644
index 34271ba..0000000
--- a/emacs.d/nxhtml/tests/in/temp2.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/* We must use this header to be correct and for the css validator to
- find our stylesheet without us having to provide a fully qualified
- path (address) to it. */
-header("Content-type:application/xhtml+xml; charset=utf-8");
-echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>';
-?>
- <body>
- <div id="container">
- <div id="header">Top area</div>
- <div id="left-menu">
- <ul>
- <li><a href="index.php">Home</a></li>
- <li><a href="index.php?page=a">First Main Page</a></li>
- <li><a href="index.php?page=b">Second Main Page</a></li>
- </ul>
- </div>
- <div id="main">
- <?php
- if (isset($_GET["page"])) {
- $thepage = $_GET['page'];
-
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- }
- else {
- require('main-div-a.html');
- }
- ?>
- </div>
- <div id="right-menu">Right area</div>
- <div id="footer">
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="valid-xhtml10.png" alt="Valid XHTML 1.0 Strict"></img>
- </a>
- <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
- <img src="vcss.png" alt="Valid CSS!"></img>
- </a>
- </p>
- </div>
- </div>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/temp3.html b/emacs.d/nxhtml/tests/in/temp3.html
deleted file mode 100644
index 276b754..0000000
--- a/emacs.d/nxhtml/tests/in/temp3.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News and Notes about nXhtml</title>
- <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" type="text/css" />
-<style type="text/css">
-#nxhtml-home a {
- /* Image */
- display: block;
- background: transparent url("img/getitbuttons.png") 0 0 no-repeat;
- overflow: hidden;
- width: 200px;
- xheight: 35px;
- /* Text placement and size, etc */
- text-align: center;
- padding-top: 11px;
- font-size: 12px;
- padding-bottom: 9px;
- text-decoration: none;
- white-space: nowrap;
- margin: 0;
- border: none;
-}
-#nxhtml-home a:hover {
- background-position: 0 -35px;
- color: yellow;
-}
-
-</style>
- </head>
- <body>
- <div id="container">
-
- <div id="rgtcol">
- <p id="nxhtml-home"><a href='nxhtml.html'>To nXhtml main page</a></p>
-
- <h1>News and Notes about nXhtml</h1>
-
- <dl>
-
- <dt id="hadron-bugs" style="margin-top:1em;">Thanks for testing!</dt>
- <dd>
diff --git a/emacs.d/nxhtml/tests/in/test-only-nxml.my-xhtml b/emacs.d/nxhtml/tests/in/test-only-nxml.my-xhtml
deleted file mode 100644
index 2f9398c..0000000
--- a/emacs.d/nxhtml/tests/in/test-only-nxml.my-xhtml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-// some basic library functions
-include_once 'lib.php';
-
-$book = new Mybook($api_key, $secret);
-
-if (isset($_POST['to'])) {
- $prints_id = (int)$_POST['to'];
- $prints = do_step($user, $prints_id);
-} else {
- if (isset($_GET['to'])) {
- $prints_id = (int)$_GET['to'];
- } else {
- $prints_id = $user;
- }
- $prints = get_prints($prints_id);
-}
-
-?>
-<div style="padding: 10px;">
- <h2>Hi <mb:name firstnameonly="true" uid="<?php=$user?>" useyou="false"/>!</h2><br/>
- <a href="<?= $book->get_add_url() ?>">Put prints in your profile</a>.
- <form method="post" action="http://my-domain.com/footprints/">
-<?php
- if ($prints_id != $user) {
- echo '<input type="hidden" name="to" value="' . $prints_id . '"/>';
- } else {
- echo '<br/>';
- }
-?>
- <input value="step" type="submit"/>
- </form>
- <hr/>
- These are <mb:name uid="«?= $prints_id ?»" possessive="true"/> Footprints:<br/>
- <?php echo render_prints($prints, 10); ?>
- <div style="clear: both;"/>
-</div>
diff --git a/emacs.d/nxhtml/tests/in/test.tt b/emacs.d/nxhtml/tests/in/test.tt
deleted file mode 100644
index 01ff84a..0000000
--- a/emacs.d/nxhtml/tests/in/test.tt
+++ /dev/null
@@ -1,11 +0,0 @@
-[% IF blah %]
-
-[%# test GET ]
- # comment
-[% test %] and [% test %]
-
-[% test % test %]
-
-[%+ test -%]
-
-[% BLOCK %]
diff --git a/emacs.d/nxhtml/tests/in/tut1.jsp b/emacs.d/nxhtml/tests/in/tut1.jsp
deleted file mode 100644
index e921950..0000000
--- a/emacs.d/nxhtml/tests/in/tut1.jsp
+++ /dev/null
@@ -1,5 +0,0 @@
-<HTML>
- <BODY>
- Hello! The time is now <%= new java.util.Date() %>
- </BODY>
-</HTML>
diff --git a/emacs.d/nxhtml/tests/in/utf8-problem.el b/emacs.d/nxhtml/tests/in/utf8-problem.el
deleted file mode 100644
index c5e8b32..0000000
--- a/emacs.d/nxhtml/tests/in/utf8-problem.el
+++ /dev/null
@@ -1,7 +0,0 @@
-
-(defvar utf8-problem
- "\\(?:^\\|[[:space:]]\\)\\(?:href\\|src\\)[[:space:]]*=[[:space:]]*\"\\([^<«\"]*\\)\"")
-
-;; Local Variables:
-;; coding: utf-8
-;; End:
diff --git a/emacs.d/nxhtml/tests/in/wiki-080606-indent.php b/emacs.d/nxhtml/tests/in/wiki-080606-indent.php
deleted file mode 100644
index 0776f03..0000000
--- a/emacs.d/nxhtml/tests/in/wiki-080606-indent.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-include_once(APP_AAA_INCLUDE."bb.php");
-include_once(APP_AAA_INCLUDE."cc.php");
-include_once(APP_AAA_INCLUDE."dd.php");
-include_once(APP_AAA_INCLUDE."ee.php");
-include_once(APP_AAA_INCLUDE."ff.php");
-include_once(APP_AAA_INCLUDE."gg.php");
-
-class Test
-{
- public $var1;
-
- function __construct()
- {
- $this->var1 = 5;
- }
-} \ No newline at end of file
diff --git a/emacs.d/nxhtml/tests/in/wiki-080708-ind-problem.rhtml b/emacs.d/nxhtml/tests/in/wiki-080708-ind-problem.rhtml
deleted file mode 100644
index d51d116..0000000
--- a/emacs.d/nxhtml/tests/in/wiki-080708-ind-problem.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= t("Hola") %>
- <%= ink_to name, target %>
- <% if quiero do %>
- <%= do_something_nifty(with_me) %>
- <% end %>
diff --git a/emacs.d/nxhtml/tests/in/wiki-090804-js.html b/emacs.d/nxhtml/tests/in/wiki-090804-js.html
deleted file mode 100644
index 2762ed9..0000000
--- a/emacs.d/nxhtml/tests/in/wiki-090804-js.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
-
- <script type="text/javascript">
- // <![CDATA[
- Some code to see if we can find the problem
- // ]]>
-</script>
-
-<?php
- $htmlstuff = <<<EOTHTML
-
- <p>some stuff</p>
- <p>some other stuff</p>
-
- <script type="text/javascript">
- // <![CDATA[
- Some code to see if we can find the problem
- // ]]>
-</script>
-
-EOTHTML;
-
-?>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/wiki-2008-01-30.rhtml b/emacs.d/nxhtml/tests/in/wiki-2008-01-30.rhtml
deleted file mode 100644
index 5eefdc7..0000000
--- a/emacs.d/nxhtml/tests/in/wiki-2008-01-30.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<div class="widget">
diff --git a/emacs.d/nxhtml/tests/in/wiki-comments.php b/emacs.d/nxhtml/tests/in/wiki-comments.php
deleted file mode 100644
index 0581443..0000000
--- a/emacs.d/nxhtml/tests/in/wiki-comments.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/*
- '
- */
-/*
- Problem updating comments during editing. To reproduce place cursor after the single x above and press RET and some other character.
-
- Or just edit here, fill the paragraph above etc. Seems like problem
- with mumamo-after-change which assumes that it is only called once
- before post-command-hook is called.
-
- BTW fill-paragraph does not work either ... - why does it run
- c-fill-paragraph in php-mode? (Mailed Alan about this. The only
- reason seems to be to support filladapt.el, but is that needed any
- more?
-
- It looks like more code (like filling) needs to be run under the
- correct syntax table etc. Implemented.
- */
-?>
diff --git a/emacs.d/nxhtml/tests/in/wiki-strange-hili-080629.html b/emacs.d/nxhtml/tests/in/wiki-strange-hili-080629.html
deleted file mode 100644
index 9f8c202..0000000
--- a/emacs.d/nxhtml/tests/in/wiki-strange-hili-080629.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
-<span style="color:red">red</span>
-</body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/xml-as-string.php b/emacs.d/nxhtml/tests/in/xml-as-string.php
deleted file mode 100644
index e779a5c..0000000
--- a/emacs.d/nxhtml/tests/in/xml-as-string.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php header("Content-type:application/xml; charset=utf-8"); echo '<'; echo '?xml version="1.0" encoding="utf-8"?'; echo '>'; ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Lab 2 - Layout Control - Task 2 - XHTML/CSS version</title>
- <link rel="stylesheet" type="text/css" href="stylesheet.css" />
- </head>
- <body>
- <div id="container">
- <div id="header">Top area</div>
- <div id="left-menu">
- <ul>
- <li><a href="index.php">Home</a></li>
- <li><a href="index.php?page=a">First Main Page</a></li>
- <li><a href="index.php?page=b">Second Main Page</a></li>
- </ul>
- </div>
- <!--
- <?
- ?>
- -->
- <div id="main">
- <?php
- // comment
- $thepage = $_GET['page'];
-
- if (empty($thepage)) {
- require('main-div-a.html');
- }
- else {
- if ($thepage != 'a' && $thepage != 'b') {
- print('You hacker you!');
- }
- else {
- require('main-div-'.$thepage.'.html');
- }
- for (;;) {
- }
- }
- ?>
- </div>
- <div id="right-menu">Right area</div>
- <div id="footer">
- <p>
- <a href="http://validator.w3.org/check?uri=referer">
- <img src="valid-xhtml10.png" alt="Valid XHTML 1.0 Strict"></img>
- </a>
- <a href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww-und.ida.liu.se%2F%7Emikas493%2Ftask-2%2Fxhtml-css%2Fstylesheet.css">
- <img src="vcss.png" alt="Valid CSS!"></img>
- </a>
- </p>
- </div>
- </div>
diff --git a/emacs.d/nxhtml/tests/in/ygne-2008-02-07-hotproperty.html.php b/emacs.d/nxhtml/tests/in/ygne-2008-02-07-hotproperty.html.php
deleted file mode 100644
index 1802272..0000000
--- a/emacs.d/nxhtml/tests/in/ygne-2008-02-07-hotproperty.html.php
+++ /dev/null
@@ -1,1967 +0,0 @@
-<?php
-// hotproperty.html.php
-/**
- * Something's Presentation Code
- *
- * @package Something
- * @copyright (C) 2004 Lee Cher Yeong
- * @url http://www.somewhere.com/
- * @author Lee Cher Yeong <cy@somewhere.com>
- **/
-
-defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
-
-class hotproperty_HTML {
-
- /***
- * Include CSS file
- ***/
- function include_CSS() {
- global $hp_css;
- ?>
- <link rel="stylesheet" href="components/com_hotproperty/css/<?php echo $hp_css; ?>.css" type="text/css">
- <?php
- }
-
- function include_Container_Start() {
- ?>
-<div id="con_global">
-<div class="componentheading"><!--<?php echo _HP_COM_TITLE; ?>--></div>
- <?php
- }
- function include_Container_End() {
- ?>
-</div>
-
-
- <?php
- }
-
-
- /***
- * Front Page
- ***/
- function show_Frontpage(&$campos, &$featured, &$featured_fields_caption, &$featured_total, &$types, &$types_hotproperty, &$types_total) {
- global $hp_fp_show_featured, $hp_fp_show_search, $mainframe, $hp_css, $mosConfig_live_site, $my;
-
- $mainframe->setPageTitle( _HP_COM_TITLE );?>
-
- <link rel="stylesheet" href="components/com_hotproperty/css/ppal_<?php echo $hp_css; ?>.css" type="text/css"/>
-
- <div id="total_alojamientos">
- <span class="saludo"><?= _HP_HOLA ?></span> <?= _HP_TENEMOS ?>
- <?php hotproperty_HTML::show_ResumenTipos() ?>
- </div>
-
- <div id="buscar_alojamiento">
- </div>
- <div id="incluir_alojamiento">
- </div>
-
- <br clear="all"/>
-
-<?php
-
-/* if ($hp_fp_show_featured && count($featured) > 0 ){
- hotproperty_HTML::show_fp_Featured($featured, $featured_fields_caption, $featured_total);
- echo '<br class="clearboth" />';
- }
-
- if ($hp_fp_show_search) {
- hotproperty_HTML::show_Search($types);
- echo '<br class="clearboth" />';
- }
-
- hotproperty_HTML::show_Types($types, $types_hotproperty, $types_total);*/
- }
-
- /***
- * Featured Listing
- ***/
- function show_fp_Featured(&$prop, &$caption, $featured_total) {
- global $hp_fp_featured_count, $Itemid;
- ?>
- <div id="con_featured1">
- <div id="heading_Featured"><?php echo _HP_FEATURED_TITLE; ?></div>
- <div id="list_featured">
- <?php hotproperty_HTML::list_properties($prop, $caption); ?>
- <br class="clearboth" />
- <?php if ($featured_total > $hp_fp_featured_count) {
- echo "<a href=\"". sefRelToAbs("index.php?option=com_hotproperty&task=viewfeatured&Itemid=$Itemid") ."\">"._HP_MOREFEATURED."</a>";
- } ?>
- </div>
- </div>
- <?php
- }
-
- /***
- * List Types
- ***/
- function show_Types(&$types, &$types_hotproperty, $types_total) {
- global $Itemid;
- ?>
- <div id="con_types1">
- <div id="heading_Types"><?php echo _HP_TYPES_TITLE; ?></div>
- <div id="con_types2">
- <?php
- foreach($types AS $t) {
- if ($types_total[$t->id]->total > 0) {
- ?>
- <div class="con_types3">
- <a class="types_title" href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewtype&id=$t->id&Itemid=$Itemid"); ?>"><?php echo $t->name ."</a>(".$types_total[$t->id]->total.")"; ?><br />
- <div class="types_desc">
- <?php echo $t->desc; ?>
- <ul class="types_hp">
- <?php
- foreach($types_hotproperty[$t->id] AS $t_hp) {
- if ($t_hp->name <> "" && $t_hp->id <> "") {
- ?>
- <li><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=view&id=$t_hp->id&Itemid=$Itemid"); ?>"><?php echo $t_hp->name; ?></a></li>
- <?php
- }
- }
- ?>
- </ul>
- <?php
- if ($types_total[$t->id]->total > 3) { ?>
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewtype&id=$t->id&Itemid=$Itemid"); ?>"><?php echo _HP_MORE; ?></a>
- <?php
- }
- ?>
- </div>
- </div>
- <?php
- }
- }
- ?>
- </div>
- </div>
- <?php
- }
-
- /***
- * Search Facility
- ***/
- function show_Search(&$types) {
- global $Itemid, $hp_use_advsearch, $mosConfig_live_site;
- /*
- global $custom404, $mosConfig_sef, $sufix;
-
- # Using Built in SEF feature in Mambo
- if ( !isset($custom404) && $mosConfig_sef ) {
- $onclickCmd = "document.location.href= '$mosConfig_live_site/component/option,com_hotproperty/task,search/Itemid,$Itemid/type,0/search,' + encodeURI(document.searchfrm.hp_search.value) + '/'";
- } elseif ( $mosConfig_sef && isset($custom404) && !empty($sufix) ) {
-
- global $custom_comp, $hp_default_limit_search;
- $hotproperty = "hotproperty";
- if (in_array("hotproperty", $custom_comp)) {
- $hotproperty = array_search($component_name, $custom_comp);
- }
-
- $onclickCmd = "document.location.href='" . $hotproperty . "/" . _HP_SEF_SEARCH . "/0/".$hp_default_limit_search."/0/" . "' + encodeURI(document.searchfrm.hp_search.value)";
-
- } else {
- # Using SEF advance or no SEF at all
- $onclickCmd = "document.location.href='" . sefRelToAbs("index.php?option=com_hotproperty&task=search&Itemid=$Itemid&type=0&search=' + encodeURI(document.searchfrm.hp_search.value)");
- }
- */
- ?>
- <div id="con_search1">
- <div id="heading_Search"><?php echo _HP_SEARCH_TITLE; ?></div>
- <div id="con_search2">
- <form action="index.php" method="POST" name="searchfrm">
- <strong><?php echo _HP_SEARCH_TEXT; ?></strong>
- <input type="text" name="search" class="inputbox" />
- <input type="submit" class="button" value="<?php echo _HP_SEARCH; ?>" /><?php
- if ($hp_use_advsearch == '1') {
- ?>&nbsp;<a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=advsearch&Itemid=$Itemid"); ?>"><?php echo _HP_SEARCH_ADV_TITLE; ?></a><?php
- }
- ?>
- <input type="hidden" name="option" value="com_hotproperty" />
- <input type="hidden" name="task" value="search" />
- <input type="hidden" name="Itemid" value="<?php echo $Itemid;?>" />
- </form>
- </div>
- </div>
- <?php
- }
-
- /***
- * Advanced Search Facility
- ***/
- function show_AdvSearch($fields, $tipos_renta) {
- global $Itemid, $mainframe;
-
- $mainframe->setPageTitle( _HP_SEARCH_ADV_TITLE );
- ?>
- <script language="javascript">
- /* Selecciona por defecto España como país para la búsqueda */
- function select_idioma(id) {
- select=document.getElementById(id);
- select.options[62].selected="1";
- }
- /* Muestra o oculta la búsqueda por disponibilidad y el precio según el tipo de oferta */
- function swap_tipo_oferta(id) {
- select=document.getElementById(id);
- disp=document.getElementById('disp_busq_av');
- precio=document.getElementById('precio_busq_av');
- if (select.options[1].selected) { // Alquiler
- disp.style.display = "block";
- precio.style.display = "none";
- }
- if (select.options[2].selected) { // Venta
- disp.style.display = "none";
- precio.style.display = "block";
- }
- if (select.options[0].selected) { // Cualquiera
- disp.style.display = "block";
- precio.style.display = "block";
- }
-
-
- }
- /* Muestra o oculta una capa, y cambia el texto del enlace lanzador */
- function swap(id, llamador)
- {
- id=document.getElementById(id);
- if (id.style.display == "none" || id.style.display == "") {
- id.style.display = "block";
- llamador.innerHTML = "<?= _HP_OCULTAR ?>";
- }
- else {
- id.style.display = "none";
- llamador.innerHTML = "<?= _HP_MOSTRAR ?>";
- }
- }
- /* Selecciona todos los alojamientos O sólo las viviendas en un combobox con los tipos de alojamiento */
- function selecc_vivienda(select)
- {
- select = document.getElementById(select);
- if (select.selectedIndex == 1)
- {
- select.options[select.selectedIndex].selected = "";
- for (i=2; i <= select.length-1; i++)
- if (i != 11 && i!= 13) select.options[i].selected="1";
- }
- }
- /* Muestra u oculta los campos de búsqueda por disponibilidad */
- function swap_disp(input,id) {
- if (input.checked)
- document.getElementById(id).style.display="block";
- else
- document.getElementById(id).style.display="none";
- }
- </script>
- <div id="heading_AdvSearch"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo _HP_SEARCH_ADV_TITLE; ?></div>
- <div id="con_asearch1">
- <form action="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=asearch&Itemid=$Itemid"); ?>" method="POST" name="searchfrm">
- <div class="cabecera_busq_avzda">
- <div class="titulo_cabecera_busq_avzda"><?= _HP_DATOS_GENERALES ?></div>
- </div><br class="clearboth"/>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['type']->caption; ?>:</div>
- <?= $fields['type']->input; ?>
- </div>
- <div class="cont_form">
- <div class="campo_con_ayuda">
- <div class="titulo_campo"><?= $fields['Tipo_Alojamiento']->caption; ?>:</div>
- <?= $fields['Tipo_Alojamiento']->input; ?>
- </div>
- <div class="msj_ayuda"><?= _HP_AYUDA_TIPO_ALOJ ?></div>
- </div>
- <br class="clearboth"/>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Superficie_habitable']->caption; ?>:</div>
- <?php echo $fields['Superficie_habitable']->input; ?>
- <?php echo $fields['Superficie_habitable']->append_text; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Num_plazas']->caption; ?>:</div>
- <?= $fields['Num_plazas']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Numero_dormitorios']->caption; ?>:</div>
- <?= $fields['Numero_dormitorios']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['country']->caption; ?>:</div>
- <?= $fields['country']->input; ?>
- <script language="javascript">
- select_idioma('idioma');
- </script>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['state']->caption; ?>:</div>
- <?= $fields['state']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['suburb']->caption; ?>:</div>
- <?= $fields['suburb']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['postcode']->caption; ?>:</div>
- <?= $fields['postcode']->input; ?>
- </div>
- <div id="precio_busq_av">
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['price']->caption; ?>:</div>
- <?= $fields['price']->input; ?>
- </div>
- </div>
- <div id="disp_busq_av">
- <div class="cont_form">
- <input type="checkbox" name="busq_disp" onclick="swap_disp(this,'campos_disp');"><?= _HP_BUSQ_POR_DISP ?></input>
- <div id="campos_disp">
- <div class="titulo_campo"><?= _HP_BUSQ_DISP ?> </div>
- <div class="flota_izq interl_doble">
- <?php hotproperty_HTML::seleccion_fecha("desde"); ?>
- <?php hotproperty_HTML::seleccion_fecha("hasta"); ?>
- </div>
- <div class="campo_avl">
- <?= _HPAVL_RENTA; ?>
- <select size="1" class="campo_dcha inputbox" name="renta">
- <option value="0"><?= _HP_SEARCH_ALLTYPES ?></option>
- <?php foreach ($tipos_renta AS $tipo_renta) { ?>
- <option value="<?php echo $tipo_renta->id; ?>"><?php echo $tipo_renta->nombre; ?></option>
- <?php } ?>
- </select>
- </div>
- </div>
- </div>
- </div>
- <!-- Otros datos -->
- <div class="cabecera_busq_avzda">
- <div class="titulo_cabecera_busq_avzda"><?= _HP_OTROS_DATOS ?></div>
- <div class="botonera_dcha">
- <a href="#" class="enlace_blanco" onclick="swap('otros_datos', this);"><?= _HP_MOSTRAR; ?></a>
- </div>
- </div><br class="clearboth"/>
- <div id="otros_datos">
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['MetrosConstruidos']->caption; ?>:</div>
- <?= $fields['MetrosConstruidos']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Superficie_parcela']->caption; ?>:</div>
- <?= $fields['Superficie_parcela']->input; ?>
- <?= $fields['Superficie_parcela']->append_text; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Numero_dormitorios']->caption; ?>:</div>
- <?= $fields['Numero_dormitorios']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Cuartos_banio_con_duchas']->caption; ?>:</div>
- <?= $fields['Cuartos_banio_con_duchas']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Aseos']->caption; ?>:</div>
- <?= $fields['Aseos']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['AnioConstruccion']->caption; ?>:</div>
- <?= $fields['AnioConstruccion']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['UltimaReforma']->caption; ?>:</div>
- <?= $fields['UltimaReforma']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Amueblado']->caption; ?>:</div>
- <?= $fields['Amueblado']->input; ?>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Dispone']->caption; ?>:</div>
- <?= $fields['Dispone']->input; ?>
- <br class="clearboth"/>
- </div>
- <div class="cont_form">
- <div class="titulo_campo"><?= $fields['Zona']->caption; ?>:</div>
- <?= $fields['Zona']->input; ?>
- <br class="clearboth"/>
- </div>
- </div>
-
- <br/>
- <div class="centro">
- <input type="submit" value="Buscar" class="button" >
- </div>
-
- </div>
-
- <?php
- }
-
- /***
- * Empty Advanced Search Results
- ***/
- function show_advSearchResults_error($msg) {
- global $Itemid, $mainframe;
- $mainframe->setPageTitle( _HP_SEARCH_ADV_TITLE );
- ?>
- <div id="con_asearch1">
- <div id="heading_AdvSearch"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo _HP_SEARCH_ADV_TITLE; ?></div>
- <p />
- <?php echo $msg; ?>
- <p />
- <a href=""><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=advsearch&Itemid=$Itemid"); ?>"><?php echo _HP_SEARCH_TRYAGAIN; ?></a>
- </div>
- <?php
- }
-
- /***
- * Advanced Search Results
- ***/
- function show_advSearchResults(&$search_id, &$prop, &$caption, &$pageNav, &$searchString) {
- global $Itemid, $mainframe;
- $mainframe->setPageTitle( _HP_SEARCH_ADV_TITLE );
- ?>
- <div id="con_asearch1">
- <div id="heading_AdvSearch"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo _HP_SEARCH_ADV_TITLE; ?></div>
- <!-- <div id="hp_searchresult_con">
- <div id="hp_search_pagecounter_top">
- <div class="right"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=asearch&Itemid='.$Itemid.'&search_id='.$search_id); ?>
- </div>
- </div> -->
- <div id="list_searchresults">
- <?php hotproperty_HTML::list_properties($prop, $caption); ?>
- </div>
- </div>
- <br class="clearboth" />
- <div id="hp_search_pagecounter_bottom">
- <div class="dcha"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=asearch&Itemid='.$Itemid.'&search_id='.$search_id); ?>
- </div>
-
- <?php
- }
-
- /***
- * Search Results
- ***/
- function show_SearchResults(&$types, &$prop, &$caption, &$pageNav, &$searchString) {
- global $Itemid, $hp_use_advsearch, $mosConfig_live_site, $mainframe;
- global $custom404, $mosConfig_sef, $sufix;
- $mainframe->setPageTitle( _HP_SEARCH_RESULT_TITLE );
-
- # Using Built in SEF feature in Mambo
- /*
- if ( !isset($custom404) && $mosConfig_sef ) {
-
- $onclickCmd = "document.location.href= '$mosConfig_live_site/component/option,com_hotproperty/task,search/Itemid,$Itemid/type,' + document.searchfrm.type.options[document.searchfrm.type.selectedIndex].value + '/search,' + encodeURI(document.searchfrm.hp_search.value) + '/'";
-
- } elseif ( $mosConfig_sef && isset($custom404) && !empty($sufix) ) {
-
- global $custom_comp, $hp_default_limit_search;
- $hotproperty = "hotproperty";
- if (in_array("hotproperty", $custom_comp)) {
- $hotproperty = array_search($component_name, $custom_comp);
- }
-
- $onclickCmd = "document.location.href='" . $hotproperty . "/" . _HP_SEF_SEARCH . "/' + document.searchfrm.type.options[document.searchfrm.type.selectedIndex].value + '/".$hp_default_limit_search."/0/" . "' + encodeURI(document.searchfrm.hp_search.value)";
-
- } else {
-
- # Using SEF advance or no SEF at all
- $onclickCmd = "document.location.href='" . sefRelToAbs("index.php?option=com_hotproperty&task=search&Itemid=$Itemid&type=' + document.searchfrm.type.options[document.searchfrm.type.selectedIndex].value + '&search=' + encodeURI(document.searchfrm.hp_search.value)");
- }
- */
- ?>
- <div id="con_search1">
- <form action="index.php" method="POST" name="searchfrm">
- <div id="heading_Search"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN ." "._HP_ARROW." "; ?></a><?php echo _HP_SEARCH_RESULT_TITLE; ?></div>
- <div id="hp_searchresult_con">
- <strong><?php echo _HP_SEARCH_TEXT; ?></strong>
- <input type="text" name="search" class="inputbox" value="<?php echo $searchString->search; ?>" /> <?php echo _HP_IN; ?>
- <select name="type" class="inputbox" size="1">
- <option value="0"><?php echo _HP_SEARCH_ALLTYPES; ?></option>
- <?php
- foreach($types AS $t) { ?>
- <option value="<?php echo $t->id; ?>"<?php echo (($searchString->type==$t->id) ? " selected" : ""); ?>><?php echo $t->name; ?></option>
- <?php }
- ?></select>
- &nbsp;
- <input type="submit" class="button" value="<?php echo _HP_SEARCH; ?>" /><?php
- if ($hp_use_advsearch == '1') {
- ?>&nbsp;<a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=advsearch&Itemid=$Itemid"); ?>"><?php echo _HP_SEARCH_ADV_TITLE; ?></a><?php
- }
- ?>
- <div id="hp_search_pagecounter_top">
- <div class="right"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=search&Itemid='.$Itemid.'&type='.$searchString->type.'&search='.$searchString->search); ?>
- </div>
- </div>
- <input type="hidden" name="option" value="com_hotproperty" />
- <input type="hidden" name="task" value="search" />
- </form>
- </div>
-
- <div id="list_searchresults">
- <?php hotproperty_HTML::list_properties($prop, $caption); ?>
- </div>
- <br class="clearboth" />
- <div id="hp_search_pagecounter_bottom">
- <div class="right"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=search&Itemid='.$Itemid.'&type='.$searchString->type.'&search='.$searchString->search); ?>
- </div>
-
- <?php
- }
-
- /***
- * List Properties for a particular Type
- ***/
- function show_Type($prop, $type, $caption, $pageNav, $sortby_sort, $sortby_order) {
- global $hp_use_diplaynum, $hp_use_sort_name, $hp_use_sort_agent, $hp_use_sort_price, $hp_use_sort_suburb, $hp_use_sort_state, $hp_use_sort_country, $hp_use_sort_type, $hp_use_sort_modified, $hp_use_sort_hits;
-
- global $Itemid, $database, $mainframe;
-
- $mainframe->setPageTitle( $type->name );
- ?>
- <div id="con_type1">
- <?php if ($type != '') { ?>
- <div id="heading_Type"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo $type->name; ?></div>
- <?php } ?>
- <?php
- if ($hp_use_diplaynum == '1' || !empty($hp_use_sort_name) || !empty($hp_use_sort_agent) || !empty($hp_use_sort_price) || !empty($hp_use_sort_suburb) || !empty($hp_use_sort_state) || !empty($hp_use_sort_country) || !empty($hp_use_sort_type) || !empty($hp_use_sort_modified) || !empty($hp_use_sort_hits)) {
- ?>
- <div id="con_sort">
- <?php if ($hp_use_diplaynum == '1') { ?>
- <div id="con_sort1">
- <?php echo _PN_DISPLAY_NR; ?>
- <?php echo $pageNav->writeLimitBox('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort='.$sortby_sort.'&order='.$sortby_order.'&Itemid='.$Itemid); ?>
- </div>
- <?php
- }
- if (!empty($hp_use_sort_name) || !empty($hp_use_sort_agent) || !empty($hp_use_sort_price) || !empty($hp_use_sort_suburb) || !empty($hp_use_sort_state) || !empty($hp_use_sort_country) || !empty($hp_use_sort_type) || !empty($hp_use_sort_modified) || !empty($hp_use_sort_hits)) {
- ?>
- <div id="con_sort2">&nbsp;
- <?php echo _HP_SORT_BY; ?>
- |
-
- <?php if (!empty($hp_use_sort_name)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=name&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>" title="<?php echo _HP_SORT_A_Z; ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo _HP_SORT_AZ; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=name&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>" title="<?php echo _HP_SORT_Z_A; ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_agent) && !empty($caption['agent']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=agent&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['agent']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=agent&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_price) && !empty($caption['price']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=price&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>" title="<?php echo _HP_SORT_LOWEST_PRICE; ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['price']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=price&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>" title="<?php echo _HP_SORT_HIGHEST_PRICE; ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_suburb) && !empty($caption['suburb']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=suburb&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['suburb']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=suburb&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_state) && !empty($caption['state']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=state&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['state']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=state&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_country) && !empty($caption['country']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=country&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['country']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=country&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_type) && !empty($caption['type']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=type&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['type']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=type&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_modified) && !empty($caption['modified']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=modified&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['modified']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=modified&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- <?php if (!empty($hp_use_sort_hits) && !empty($caption['hits']->caption)) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=hits&order=asc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_ASC; ?> </a> <?php echo $caption['hits']->caption; ?> <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort=hits&order=desc&limit='.$pageNav->limit.'&limitstart='.$pageNav->limitstart.'&Itemid='.$Itemid); ?>"> <?php echo _HP_SORT_DESC; ?> </a> |
- <?php } ?>
-
- </div>
- <?php } ?>
- </div>
- <?php } ?>
- <div id="list_properties">
- <?php hotproperty_HTML::list_properties($prop, $caption); ?>
- </div>
-
-
- <?php if ($type != '') { ?>
- <div id="hp_pagecounter_bottom">
- <div align="right"><?php $pageNav->writePagesCounter(); ?></div>
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=viewtype&id='.$prop[0]->typeid.'&sort='.$sortby_sort.'&order='.$sortby_order.'&Itemid='.$Itemid); ?>
- </div>
- <?php } ?>
- </div>
- <?php
- }
-
- /***
- * List Featured Properties
- ***/
- function show_Featured($prop, $caption, $pageNav) {
- global $Itemid, $mainframe;
- $mainframe->setPageTitle( _HP_FEATURED );
- ?>
- <div id="con_type1">
- <div id="heading_Featured"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN ." "._HP_ARROW." "; ?></a><?php echo _HP_FEATURED; ?></div>
- <div id="list_properties">
- <?php hotproperty_HTML::list_properties($prop, $caption); ?>
- </div>
- <br class="clearboth" />
- <div id="hp_pagecounter_bottom">
- <div align="right"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=viewfeatured'); ?>
- </div>
- </div>
- <?php
- }
-
- /***
- * Display Company's contact details and list all agents under it.
- ***/
- function show_Company(&$company, &$agent, &$prop, &$caption, $pageNav) {
- global $mosConfig_live_site, $hp_imgdir_agent, $mainframe, $Itemid;
- $mainframe->setPageTitle( $company[0]->name );
- ?>
-
- <div id="hp_view_agent_title_nav"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em> <?php echo _HP_CO_TITLE; ?></div>
- <div id="hp_view_co_con">
- <?php hotproperty_HTML::show_CoInfo($company, $agent) ?>
- </div>
- <br class="clearboth" />
-
- <div id="heading_Agent"><span class="flecha_big">› </span><?= _HP_PROPBYAGENT.$company[0]->name; ?></div>
- <div id="list_properties">
- <?php hotproperty_HTML::list_properties($prop, $caption); ?>
- </div>
-
- <br class="clearboth" />
- <div id="hp_pagecounter_bottom">
- <div align="right"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=viewco&id='.$company[0]->id); ?>
- </div>
-
- <?php
- }
-
- /***
- * Display Agent's information and list all properties under it.
- ***/
- function show_Agent($prop_alq, $prop_vta, $caption, $agent, $types, $pageNav) {
- global $mosConfig_live_site, $hp_imgdir_agent, $Itemid, $mainframe;
- $mainframe->setPageTitle( $agent->name );
- ?>
-
- <div id="hp_view_agent_title_nav"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo $agent->name; ?></div>
-
- <div id="hp_view_agent_con">
- <?php hotproperty_HTML::show_AgentInfo($agent) ?>
- </div>
- <br class="clearboth" />
-
- <div id="heading_Agent"><span class="flecha_big">› </span><?= _HP_PROPBYAGENT.$agent->name; ?></div>
- <div class="cabecera_ver_ofertas"><?= _OFER_ALQ; ?></div>
- <?php hotproperty_HTML::show_Type($prop_alq, "", $caption, $pageNav, "desc", "modified"); ?>
- <br class="clearboth" />
- <div class="cabecera_ver_ofertas"><?= _OFER_VEN; ?></div>
- <?php hotproperty_HTML::show_Type($prop_vta, "", $caption, $pageNav, "desc", "modified"); ?>
-
-
-<!-- <div id="hp_pagecounter_bottom">
- <div align="right"><?php echo $pageNav->writePagesCounter(); ?></div>
- <br class="clearboth" />
- <?php echo $pageNav->writePagesLinks('index.php?option=com_hotproperty&task=viewagent&id='.$agent->id); ?>
- </div>-->
- <br class="clearboth" />
- <?php
- }
-
- /***
- * Display Company's information and an enquiry form.
- ***/
- function show_CoEmail($company) {
- global $Itemid, $mainframe;
- $mainframe->setPageTitle( _HP_CO_CONTACT .' - '.$company[0]->name );
-
- ?>
- <div id="heading_Co"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo _HP_CO_TITLE; ?></div>
- <div id="hp_view_co_con">
- <?php hotproperty_HTML::show_CoInfo($company) ?>
- </div>
- <br class="clearboth" />
- <div id="heading_Co_Contact"><?php echo _HP_CO_CONTACT; ?></div>
- <div id="hp_emailform_con">
- <?php hotproperty_HTML::show_EmailForm('company',$company[0]->id) ?>
- </div>
-
- <?php
- }
-
- /***
- * Display Agent's information and an enquiry form.
- ***/
- function show_AgentEmail($agent) {
- global $Itemid, $mainframe;
- $mainframe->setPageTitle( _HP_VIEW_AGENT_CONTACT .' - '.$agent[0]->name );
- ?>
- <!--<div id="hp_view_agent_title_nav"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?><em><?php echo _HP_ARROW; ?></em></a> <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewco&id=".$agent[0]->companyid."&Itemid=".$Itemid); ?>"><?php echo $agent[0]->company; ?></a><em><?php echo _HP_ARROW; ?></em><?php echo _HP_VIEW_AGENT_TITLE; ?></div> -->
-<!-- <div id="hp_view_agent_con">
- <?php hotproperty_HTML::show_AgentInfo($agent) ?>
- </div> -->
- <div id="hp_view_agent_contact"><span class="flecha_big"><?= _HP_ARROW ?></span><?php echo _HP_VIEW_AGENT_CONTACT; ?></div>
- <div id="hp_emailform_con">
- <?php hotproperty_HTML::show_EmailForm('agent',$agent[0]->id) ?>
- </div>
-
- <?php
- }
-
- /***
- * Show Property
- ***/
- function show_Prop(&$prop, &$caption, &$images, &$agent, $num_periodos) {
- global $Itemid, $my, $mosConfig_live_site, $mosConfig_absolute_path, $pop, $mainframe;
- global $hp_imgdir_thumb, $hp_imgdir_standard, $hp_currency, $hp_imgsize_thumb, $hp_img_noimage_thumb, $hp_imgdir_agent, $hp_show_agentdetails, $hp_show_enquiryform, $hp_thousand_sep, $hp_dec_point, $hp_link_open_newwin, $hp_show_moreinfo, $hp_use_companyagent, $hp_dec_string, $hp_thousand_string;
- global $hp_show_pdficon, $hp_show_printicon, $hp_show_emailicon;
-
- $mainframe->appendMetaTag( 'description', $prop[0]->metadesc );
- $mainframe->appendMetaTag( 'keywords', $prop[0]->metakey );
- $mainframe->setPageTitle( $prop[0]->name );
- if ($pop == '') $pop = 0;
- ?>
- <script language="javascript">
- // Si es una pop-up, es la ventana de impresión: imprime.
- if (<?= $pop ?> == 1 ) { window.print(); }
- </script>
- <script src="components/com_hotproperty/js/resalte.js" type="text/javascript"></script>
-
- <div id="con_hp1">
- <?php if (!$pop) { ?>
- <div id="heading_Prop">
- <div class="obj_con_botonera">
- <div class="nombre_objeto">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&Itemid=$Itemid"); ?>"><?php echo _HP_COM_PATHWAY_MAIN; ?></a><em><?php echo _HP_ARROW; ?></em><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewtype&id=".$prop[0]->typeid."&Itemid=$Itemid"); ?>"><?php echo $prop[0]->type; ?> </a> <em><?php echo _HP_ARROW; ?></em> <?php echo $prop[0]->name; ?>
- </div>
- <?php } ?>
- <div class="botonera_dcha">
- <div class="mini_botones">
-
- <?php
-
- # Show edit icon for authorized agent
- if (!$pop && $prop[0]->user == $my->id && $prop[0]->user > 0 && $my->id > 0) { ?>
- <div class="mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=editprop&id=". $prop[0]->id ."&Itemid=$Itemid"); ?>" title="<?= _E_EDIT; ?>"><img src="administrator/images/editar.png" alt="<?= _E_EDIT ?>" title="<?= _E_EDIT ?>" onmouseover="this.src='administrator/images/editar_on.png';swap_resalte('editar',1);" onmouseout="this.src='administrator/images/editar.png';swap_resalte('editar',0);" class="bot_gestionar" id="img_editar"/></a>
- </div>
- <div class="texto_mini_boton"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=editprop&id=". $prop[0]->id ."&Itemid=$Itemid"); ?>" onmouseover="swap_resalte('editar',1);" onmouseout="swap_resalte('editar',0);" title="<?= _E_EDIT; ?>" id="a_editar"><?= _E_EDIT ?></a></div>
- <?php } ?>
-
- <?php
- if ($hp_show_pdficon && !$pop) {
- ?>
- <div class="mini_boton">
- <a href="javascript:void window.open('<?php echo $mosConfig_live_site; ?>/components/com_hotproperty/pdf.php?id=<?php echo $prop[0]->id; ?>', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" title="<?php echo _CMN_PRINT;?>">
- <img src="<?php echo $mosConfig_live_site;?>/administrator/images/imprimir.png" border="0" alt="<?php echo _CMN_PDF;?>" onmouseover="this.src='administrator/images/imprimir_on.png';swap_resalte('imprimir',1);" onmouseout="this.src='administrator/images/imprimir.png'; swap_resalte('imprimir',0);" class="bot_gestionar" id="img_imprimir"/></a>
- </div>
- <div class="texto_mini_boton">
- <a href="javascript:void window.open('<?php echo $mosConfig_live_site; ?>/components/com_hotproperty/pdf.php?id=<?php echo $prop[0]->id; ?>', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" onmouseover="swap_resalte('imprimir',1);" onmouseout="swap_resalte('imprimir',0);" class="enlace" id="a_imprimir"><?php echo _CMN_PDF;?></a>
- </div>
- <?php
- } // End of if $hp_show_pdficon
-
- if ($hp_show_printicon && !$pop) { ?>
- <div class="mini_boton">
- <a href="javascript:void window.open('<?php echo $mosConfig_live_site; ?>/index2.php?option=com_hotproperty&amp;task=view&amp;id=<?php echo $prop[0]->id; ?>&amp;pop=1', 'win2', 'status=no,toolbar=no,scrollbars=yes,menubar=no,resizable=yes,width=940,height=480,directories=no,location=no');" title="<?php echo _CMN_PRINT;?>" onmouseover="swap_resalte('imprimir',1);">
- <img src="administrator/images/imprimir.png" alt="<?= _CMN_PRINT ?>" title="<?= _CMN_PRINT ?>" onmouseover="this.src='administrator/images/imprimir_on.png';" onmouseout="this.src='administrator/images/imprimir.png'; swap_resalte('imprimir',0);" class="bot_gestionar" id="img_imprimir"/></a>
- </div>
- <div class="texto_mini_boton">
- <a href="javascript:void window.open('<?php echo $mosConfig_live_site; ?>/index2.php?option=com_hotproperty&amp;task=view&amp;id=<?php echo $prop[0]->id; ?>&amp;pop=1', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=940,height=480,directories=no,location=no');" title="<?php echo _CMN_PRINT;?>" onmouseover="swap_resalte('imprimir',1);" onmouseout="swap_resalte('imprimir',0);" class="enlace" id="a_imprimir">
- <?= _CMN_PRINT ?></a> </div>
-
- <?php } // End of if $hp_show_printicon
-
- if ($hp_show_emailicon && !$pop) { ?>
- <div class="mini_boton">
- <a href="javascript:void window.open('<?php echo $mosConfig_live_site; ?>/index2.php?option=com_hotproperty&amp;task=emailform&amp;id=<?php echo $prop[0]->id; ?>', 'win2', 'status=no,toolbar=no,scrollbars=no,titlebar=no,menubar=no,resizable=yes,width=400,height=285,directories=no,location=no');" title="<?php echo _CMN_EMAIL;?>"><img src="administrator/images/correo.png" alt="<?= _CMN_EMAIL ?>" title="<?= _CMN_EMAIL ?>" onmouseover="this.src='administrator/images/correo_on.png';swap_resalte('correo',1);" onmouseout="this.src='administrator/images/correo.png'; swap_resalte('correo',0);" class="bot_gestionar" id="img_correo"/></a>
- </div>
- <div class="texto_mini_boton">
- <a href="javascript:void window.open('<?php echo $mosConfig_live_site; ?>/index2.php?option=com_hotproperty&amp;task=emailform&amp;id=<?php echo $prop[0]->id; ?>', 'win2', 'status=no,toolbar=no,scrollbars=no,titlebar=no,menubar=no,resizable=yes,width=400,height=285,directories=no,location=no');" title="<?php echo _CMN_EMAIL;?>" onmouseover="swap_resalte('correo',1);" onmouseout="swap_resalte('correo',0);" id="a_correo">
- <?= _HP_EMAIL_AMIGO ?></a> </div>
- <?php } ?>
- </div>
- </div>
- </div> <!-- fin div.mini_botones -->
- </div>
-
- <br class="clearboth">
- <br class="clearboth">
-
-<?php
- // Copyright © 2006, Michael Rice
- // License: GPL but you must email when you use it to let me know and this copyright MUST remain intact.
- // Email: meikeric {at] gmail [dot} com
- // You can donate to my Paypal and request hacks for HotProperty. Every little bit helps.
- // Paypal: meikeric {at] gmail [dot} com
-
- ?>
- <?php $iCount = count($images); ?>
- <script language="JavaScript" type="text/javascript">
- //for image viewer slide show
-
- myCount = 0;
-
- function UpdateCounter( currentCount )
- {
- myCount = currentCount;
- }
-
- function loadImgArray( strList ){
- myImgList = strList.split(",");
- }
- function NextSlideShow( maxCount ){
- if(myCount >= maxCount){
- myCount = 0;
- }else{
- myCount++;
- }
- //alert( myImgList[myCount] );
- show('MainPhoto',myImgList[myCount]);
- }
- function PrevSlideShow( maxCount ){
- if(myCount <= 0){
- myCount = maxCount;
- }else{
- myCount--;
- }
- //alert( myImgList[myCount] );
- show('MainPhoto',myImgList[myCount]);
- }
-
- function fillLabel(inField,inValue){
- if(inValue == ''){
- inValue = myCount + 1;
- }
- if(document.layers) //NN4+
- {
- document.layers[inField].innerHTML = inValue;
- }
- else if(document.getElementById) //gecko(NN6) + IE 5+
- {
- var obj = document.getElementById(inField);
- obj.innerHTML = inValue;
- }
- else if(document.all) // IE 4
- {
- document.all[inField].innerHTML = inValue;
- }
- }
-
- function show(name,src) {
- if (document.images)
- document.images[name].src = src;
- }
- </script>
-
-
- <div id="hp_view_standard_photo_con1">
- <a href='javascript:NextSlideShow( <?php echo $iCount-1; ?>);'><img src='<?php echo $mosConfig_live_site.$hp_imgdir_standard.$images[0]->standard; ?>' name='MainPhoto' alt='Click here to view the next image' border='0' class='search01'/></a>
- <br/>
- <?php if (!$pop) { ?>
- <a href='javascript:PrevSlideShow( <?php echo $iCount-1; ?> );'>< <?php echo _CMN_PREV;?></a> &nbsp;&nbsp;&nbsp;&nbsp;
- <a href='javascript:NextSlideShow( <?php echo $iCount-1; ?> );'><?php echo _CMN_NEXT;?> ></a>
- <?php } ?>
-
- <script language='Javascript' type="text/javascript">
- loadImgArray( '<?php
- $i = 1;
- foreach($images AS $image) {
- echo $mosConfig_live_site.$hp_imgdir_standard.$image->standard;
- if($iCount > 1 && $i != $iCount) {
- echo ',';
- }
- $i++;
- }
- ?>' );
- </script>
- </div>
-
- <?php foreach($prop AS $p) {
- ?>
-<?php
- /* Escupe los campos de manera poco flexible pero práctica (igual que en listado) */
-
- echo '<div id="datos_inmueble">';
-
-
- // Name (Titulo)
- echo '<div id="titulo_inmueble">'.$p->name.'.</div>';
-
- // Referencia propia
- echo '<div class="linea_inmueble">';
- echo '<span class="hp_caption">&nbsp;›&nbsp;'._OFER_REF."</span>: ";
- if ($p->id <> "") echo $p->id.".<br />"; else echo _OFER_NO_DEF;
- echo '</div>';
-
-
- // Type (Tipo de oferta)
- echo '<div class="linea_inmueble">';
- if (!$caption['type']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['type']->caption."</span>: ";
- echo $p->type.".<br/>";
- echo '</div>';
-
- // Tipo_Alojamiento
- echo '<div class="linea_inmueble">';
- if (!$caption['Tipo_Alojamiento']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Tipo_Alojamiento']->caption."</span>: ";
- if ($p->Tipo_Alojamiento<>"") echo $p->Tipo_Alojamiento.".<br/>"; else echo _OFER_NO_DEF;
- echo '</div>';
-
- // Address y postcode (Dirección y CP)
- echo '<div class="linea_inmueble">';
- if (!$caption['address']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['address']->caption."</span>: ";
- if ($p->address<>"") echo $p->address." ".$p->postcode."<br/>"; else echo _OFER_NO_DEF;
- echo '</div>';
-
-
- // Barrio
- if ( $p->Barrio <> "")
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['Barrio']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Barrio']->caption."</span>: ";
- echo $p->Barrio;
- echo '</div>';
- }
-
- // Suburb y State (Población y Provincia)
- echo '<div class="linea_inmueble">';
- if (!$caption['suburb']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['suburb']->caption."</span>: ";
- if ($p->suburb<>"") echo $p->suburb." (".$p->state.")"."<br/>"; else echo _OFER_NO_DEF;
- echo '</div>';
-
- // Precio
- if ($p->typeid == 2) // Venta
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['price']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['price']->caption."</span>: ";
- if ($p->price<>"") echo number_format($p->price,2,',','.')." ".$caption['price']->append_text."<br />"; else echo _OFER_NO_DEF;
- echo '</div>';
- }
-
-
- // Num_plazas
- if ($p->typeid == 1) // Alquiler
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['Num_plazas']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Num_plazas']->caption."</span>: ";
- if ($p->Num_plazas<>"") echo $p->Num_plazas.".<br />"; else echo _OFER_NO_DEF;
- echo '</div>';
- }
-
- // Numero_dormitorios
- echo '<div class="linea_inmueble">';
- if ($p->typeid == 1) // Alquiler
- {
- if (!$caption['Numero_dormitorios']->hideCaption)
- {
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Numero_dormitorios']->caption."</span>: ";
- }
- }
- else
- echo '<span class="hp_caption">&nbsp;›&nbsp;Nº habitaciones: </span>';
-
- if ($p->Numero_dormitorios<>"") echo $p->Numero_dormitorios.".<br />"; else echo _OFER_NO_DEF;
- echo '</div>';
-
-
- // Cuartos_banio_con_duchas
- echo '<div class="linea_inmueble">';
- if (!$caption['Cuartos_banio_con_duchas']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Cuartos_banio_con_duchas']->caption."</span>: ";
- if ($p->Cuartos_banio_con_duchas<>"") echo $p->Cuartos_banio_con_duchas.". "; else echo _OFER_NO_DEF." ";
-
- // Aseos
- if ($p->Aseos <> "")
- {
- if (!$caption['Aseos']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Aseos']->caption."</span>: ";
- if ($p->Aseos<>"") echo $p->Aseos.".<br />"; else echo _OFER_NO_DEF;
- }
- echo '</div>';
-
- // Dispone
- echo '<div class="linea_inmueble">';
- if (!$caption['Dispone']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Dispone']->caption."</span>: ";
- if ($p->Dispone<>"") echo str_replace("|",", ",$p->Dispone).".<br />"; else echo _OFER_NO_DEF;
- echo '</div>'; ?>
-
- </div> <!-- fin capa datos_inmueble -->
-
- <div class="hp_view_details">
- <div id="mas_datos">
- <div class="titulito_inmueble">Características del inmueble</div>
- <?php
- // Año Construcción
- if ($p->typeid == 2) // Venta
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['AnioConstruccion']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['AnioConstruccion']->caption."</span>: ";
- if ($p->AnioConstruccion <> "") echo $p->AnioConstruccion.". "; else echo _OFER_NO_DEF;
- if (!$caption['UltimaReforma']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['UltimaReforma']->caption."</span>: ";
- if ($p->UltimaReforma <> "") echo $p->UltimaReforma.". "; else echo _OFER_NO_DEF;
- echo '</div>';
- }
-
- // Metros construidos
- echo '<div class="linea_inmueble">';
- if ($p->typeid == 2) // Venta
- {
- if (!$caption['MetrosConstruidos']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['MetrosConstruidos']->caption."</span>: ";
- if ($p->MetrosConstruidos <> "") echo $p->MetrosConstruidos." ".$caption['Superficie_habitable']->append_text.". "; else echo _OFER_NO_DEF;
- }
-
- if (!$caption['Superficie_habitable']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Superficie_habitable']->caption."</span>: ";
- echo $p->Superficie_habitable." ".$caption['Superficie_habitable']->append_text.". ";
-
- // Superficie_parcela
- if ($p->Superficie_parcela <> "")
- {
- if (!$caption['Superficie_parcela']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Superficie_parcela']->caption."</span>: ";
- echo $p->Superficie_parcela." ".$caption['Superficie_parcela']->append_text.".";
- }
- echo "<br />";
- echo '</div>';
-
-
- if ($p->Camas_dobles <> 0 || $p->Camas_individuales <> 0 || $p->Camas_supletorias <> 0 || $p->Camas_litera <> 0)
- echo '<div class="linea_inmueble">';
-
-
- if ($p->typeid == 1) // Alquiler
- {
- // Camas_dobles
- if ($p->Camas_dobles <> 0)
- {
- if (!$caption['Camas_dobles']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Camas_dobles']->caption."</span>: ";
- echo $p->Camas_dobles.".&nbsp;&nbsp;";
- }
-
- // Camas_individuales
- if ($p->Camas_individuales <> 0)
- {
- if (!$caption['Camas_individuales']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Camas_individuales']->caption."</span>: ";
- echo $p->Camas_individuales.".&nbsp;&nbsp;";
- }
-
- // Camas_supletorias
- if ($p->Camas_supletorias <> 0)
- {
- if (!$caption['Camas_supletorias']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Camas_supletorias']->caption."</span>: ";
- echo $p->Camas_supletorias.".&nbsp;&nbsp;";
- }
-
- // Camas_litera
- if ($p->Camas_litera <> 0)
- {
- if (!$caption['Camas_litera']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Camas_litera']->caption."</span>: ";
- echo $p->Camas_litera.".&nbsp;&nbsp;";
- }
- if ($p->Camas_dobles <> 0 || $p->Camas_individuales <> 0 || $p->Camas_supletorias <> 0 || $p->Camas_litera <> 0)
- {
- echo "<br/>";
- echo "</div>";
- }
-
- // Sofa_cama_individual
- if ($p->Sofa_cama_individual<>"" && $p->Sofa_cama_individual<>"")
- {
- echo '<div class="linea_inmueble">';
- // Sofa_cama_individual
- if ( $p->Sofa_cama_individual <> "")
- {
- if (!$caption['Sofa_cama_individual']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Sofa_cama_individual']->caption."</span>: ";
- echo $p->Sofa_cama_individual.".&nbsp;&nbsp;";
- }
-
- // Sofa_cama_doble
- if ( $p->Sofa_cama_doble <> "")
- {
- if (!$caption['Sofa_cama_doble']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Sofa_cama_doble']->caption."</span>: ";
- echo $p->Sofa_cama_doble.".&nbsp;&nbsp;";
- }
- echo "</div>";
- }
-
- // Superficie_terraza_solarium
- if ($p->Superficie_terraza_solarium <> "")
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['Superficie_terraza_solarium']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Superficie_terraza_solarium']->caption."</span>: ";
- echo $p->Superficie_terraza_solarium." ".$caption['Superficie_terraza_solarium']->append_text.".<br />";
- echo "</div>";
- }
- }
- // Enseres
- echo '<div class="linea_inmueble">';
- if (!$caption['Enseres']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Enseres']->caption."</span>: ";
- echo str_replace("|",", ",$p->Enseres).".<br />";
- echo '</div>';
-
- // Animales
- if ($p->typeid == 1) // Alquiler
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['Animales']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Animales']->caption."</span>: ";
- echo $p->Animales.".<br />";
- echo '</div>';
- }
-
-
- // *** Características de la zona **
- echo '<div class="titulito_inmueble">Características de la zona</div>';
-
- // Zona
- echo '<div class="linea_inmueble">';
- if (!$caption['Zona']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Zona']->caption."</span>: ";
- echo str_replace("|",", ",$p->Zona).".<br />";
- echo '</div>';
-
- // ActividadesDeportivas
- if ($p->typeid == 1) // Alquiler
- {
- if($caption['ActividadesDeportivas'] != '')
- {
- echo '<div class="linea_inmueble">';
- if (!$caption['ActividadesDeportivas']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['ActividadesDeportivas']->caption."</span>: ";
- echo str_replace("|",", ",$p->ActividadesDeportivas).".<br />";
- echo '</div>';
- }
- }
-
- // Distancia_a_la_playa
- echo '<div class="linea_inmueble">';
- if ($p->Distancia_a_la_playa <> "")
- {
- if (!$caption['Distancia_a_la_playa']->hideCaption)
- echo '<span class="hp_caption">&nbsp;›&nbsp;'.$caption['Distancia_a_la_playa']->caption."</span>: ";
- echo $p->Distancia_a_la_playa." ".$caption['Distancia_a_la_playa']->append_text.".<br />";
- }
- echo '</div>';
-
- if ($p->A_minutos_andando <> "")
- {
- echo '<div class="linea_inmueble">';
- echo '<span class="hp_caption">';
- if (!$caption['A_minutos_andando']->hideCaption)
- echo '&nbsp;›&nbsp;'.$caption['A_minutos_andando']->caption.' ';
- echo $p->A_minutos_andando." ".$caption['A_minutos_andando']->append_text." ";
- if (!$caption['de_andando']->hideCaption)
- echo ' '.$caption['de_andando']->caption.' ';
- echo $p->de_andando.".</span><br />";
- echo '</div>';
- }
-
- if ($p->A_minutos_coche <> "")
- {
- echo '<div class="linea_inmueble">';
- echo '<span class="hp_caption">';
- if (!$caption['A_minutos_coche']->hideCaption)
- echo '&nbsp;›&nbsp;'.$caption['A_minutos_coche']->caption.' ';
- echo $p->A_minutos_coche." ".$caption['A_minutos_coche']->append_text." ";
- if (!$caption['de_coche']->hideCaption)
- echo ' '.$caption['de_coche']->caption.' ';
- echo $p->de_coche.".</span><br />";
- echo '</div>';
- echo '<br/>';
- }
-
- // *** Descripción detallada ***
- echo '<div class="titulito_inmueble">'.$caption['full_text']->caption.'</div>';
- echo '<div class="linea_inmueble">';
- echo '<div class="descripcion">';
- echo $p->full_text;
- echo '</div>';
- echo '</div>';
-
- // *** Disponibilidad ***
- if ($p->typeid == 1 && $num_periodos > 0) // Alquiler
- {
- echo '<div class="titulito_inmueble">'.$caption['intro_text']->caption.'</div>';
- echo '<div class="linea_inmueble">'; ?>
- <iframe src="index2.php?option=com_hp_avl&task=ext_show_year&lang=<?php echo $_GET['lang']?>&property_id=<?php echo $p->id; ?>" name="com_hp_avl" id="com_hp_avl" width="97%" height="<?php echo (($num_periodos * 20)+580); ?>" marginwidth="0" marginheight="0" align="top" scrolling="no" frameborder="0" hspace="0" vspace="0" background="white"></iframe>
- <div id="combo_num_anios">
- <script language="javascript">
- function RecargaCalendario(id,alto,num_anios,lang,property_id)
- {
- iframe=document.getElementById(id);
-
- iframe.src="index2.php?option=com_hp_avl&task=ext_show_year&num_anios="+num_anios+"&lang=" +lang+"&property_id="+property_id;
- if (num_anios > 1)
- iframe.height=alto * 0.9 * num_anios;
- else
- iframe.height=alto;
- }
- </script>
- <form action="" method="GET" name="calendarioForm">
- <p>Mostrar <select name="num_anios" size="1" onChange="RecargaCalendario('com_hp_avl',<?php echo (($num_periodos * 20)+580); ?>,this.value,'<?php echo mosGetParam( $_GET, 'lang',0);?>',<?php echo $p->id; ?>);">
- <option value="1" label="1" <?php if ($num_years==1) echo "selected"; ?>>1</option>
- <option value="2" label="2" <?php if ($num_years==2) echo "selected"; ?>>2</option>
- </select>
- años.
- <input type="hidden" name="option" value="<?php echo $option; ?>" />
- <input type="hidden" name="task" value="ext_show_year" />
- <input type="hidden" name="property_id" value="<?php echo $property_id; ?>" />
- </form>
- </div>
- </div>
- </div>
- <?php }
- } ?>
- <br class="clearboth" />
-
- <?php if ($hp_show_agentdetails && $hp_use_companyagent) { ?>
- <div id="hp_view_agent_title"><span class="flecha_big">›&nbsp;</span><?php echo _HP_VIEW_AGENT_TITLE; ?></div>
- <div id="hp_view_agent_con">
- <?php hotproperty_HTML::show_AgentInfo($agent) ?>
- </div>
- <?php } ?>
- <?php if ($hp_show_enquiryform && !$pop) { ?>
- <br class="clearboth" />
- <div id="hp_view_agent_contact"><span class="flecha_big">›&nbsp;</span><?php echo _HP_VIEW_AGENT_CONTACT; ?></div>
- <div id="hp_emailform_con">
- <?php hotproperty_HTML::show_EmailForm('property',$prop[0]->id,$prop[0]->name,$prop[0]->typeid); ?>
- </div>
- <?php }
- if ($pop) {
- ?>
- <center><a href='javascript:window.close();'><span class="small"><?php echo _PROMPT_CLOSE;?></span></a></center>
- <?php } ?>
- </div>
- <?php
- }
-
- /***
- * Common Routine to display Agent's Info
- **/
- function show_AgentInfo($agent) {
- global $mosConfig_live_site, $hp_imgdir_agent, $task, $Itemid, $my;
-
- if (empty($agent)) {
- echo _HP_AGENT_ERROR_EMPTY;
- } else { ?>
- <script src="components/com_hotproperty/js/resalte.js" type="text/javascript"></script>
- <div class="hp_view_agent">
- <div id="hp_view_agent_details">
- <?php if (!empty($agent->photo)) { ?>
- <div id="hp_view_agent_photo">
- <?php if ($task <> "viewagent") { ?>
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagent&id=$agent->id&Itemid=$Itemid"); ?>">
- <img border="0" src="<?php echo $mosConfig_live_site.$hp_imgdir_agent.$agent->photo; ?>" alt="<?php echo $agent->name; ?>" />
- </a>
- <?php } else { ?>
- <img border="0" src="<?php echo $mosConfig_live_site.$hp_imgdir_agent.$agent->photo; ?>" alt="<?php echo $agent->name; ?>" />
- <?php } ?>
- </div>
- <?php } ?>
- <div class="obj_con_botonera">
- <div class="nombre_objeto">
- <span id="hp_caption_agentname"><?php if ($task <> "viewagent") { ?><a id="hp_caption_agentname" href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagent&id=$agent->id&Itemid=$Itemid"); ?>"><?php echo $agent->name; ?></a><?php } else { ?><?php echo $agent->name; ?><?php } ?></span>
- </div>
- <div class="botonera_dcha">
- <?php
- # Muestra el icono para modificar el perfil si somos el usuario adecuado
- if ($agent->user == $my->id && $agent->user > 0 && $my->id > 0) { ?>
- <div class="mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=editagent&Itemid=$Itemid"); ?>" title="<?= _HP_AGENT_MODIFY ?>"><img src="administrator/images/modif_perfil.png" alt="<?= _HP_AGENT_MODIFY ?>" title="<?= _HP_AGENT_MODIFY ?>" onmouseover="swap_resalte('modif_perfil',1);" onmouseout="swap_resalte('modif_perfil',0);" class="bot_gestionar" id="img_modif_perfil"/></a>
- </div>
- <div class="texto_mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=editagent&Itemid=$Itemid"); ?>" title="<?= _HP_AGENT_MODIFY ?>" id="a_modif_perfil" onmouseover="swap_resalte('modif_perfil',1);" onmouseout="swap_resalte('modif_perfil',0);"> <?= _HP_AGENT_MODIFY ?> </a>
- </div>
- <?php } ?>
-
- <?php
- # Muestra icono enviar email si estamos en viewagent|viewco y somos un usuario distinto
- if( ($task == "viewagent" || $task == "viewco") && !empty($agent->email) && $agent->user != $my->id) { ; ?>
- <div class="mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagentemail&id=$agent->id&Itemid=$Itemid"); ?>"><img src="administrator/images/correo.png" alt="<?= _HP_AGENT_SENDEMAIL ?>" title="<?= _HP_AGENT_SENDEMAIL ?>" onmouseover="this.src='administrator/images/correo_on.png';swap_resalte('correo',1);" onmouseout="this.src='administrator/images/correo.png';swap_resalte('correo',0);" class="bot_gestionar" id="img_correo"/></a>
- </div>
- <div class="texto_mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagentemail&id=$agent->id&Itemid=$Itemid"); ?>" id="a_correo" onmouseover="swap_resalte('correo',1);" onmouseout="swap_resalte('correo',0);"><?= _HP_AGENT_SENDEMAIL ?></a>
- </div>
- <?php } ?>
- <?php
- # Muestra enlace ver todas las ofertas si estamos en página detalle
- if( $task == "view" ) { ?>
- <div class="mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagent&id=$agent->id&Itemid="); ?>"><img src="administrator/images/ver.png" alt="<?= _HP_VER_OFERTAS ?>" title="<?= _HP_VER_OFERTAS ?>" onmouseover="swap_resalte('ver',1);" onmouseout="swap_resalte('ver',0);" class="bot_gestionar" id="img_ver"/></a>
- </div>
- <div class="texto_mini_boton">
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagent&id=$agent->id&Itemid="); ?>" id="a_ver" onmouseover="swap_resalte('ver',1);" onmouseout="swap_resalte('ver',0);"><?= _HP_VER_OFERTAS ?></a>
- </div>
- <?php } ?>
-
- </div>
- </div>
- <br class="clearboth"/>
- <br class="clearboth"/>
-
- <?php if (!empty($agent->desc)) { ?>
- <div id="hp_view_agent_desc"><?php echo $agent->desc; ?></div>
- <?php } ?>
-
- <?php
- # Display Mobile number if not empty
- if (!empty($agent->mobile)) { ?>
- <span class="hp_caption"><?= _HP_AGENT_MOBILE; ?>:</span> <?= $agent->mobile; ?>.<br/>
- <?php # Muestra disponibiblidad teléfono móvil
- if (!empty($agent->disp_mov_from)) { ?>
- <span class="hp_caption"><?= _HP_AGENT_DISP; ?></span> de <?= dia_semana($agent->disp_mov_from); ?> a <?= dia_semana($agent->disp_mov_to); ?> de <?= $agent->disp_mov_from_hora; ?> a <?= $agent->disp_mov_to_hora; ?>.<br/>
- <?php }
- } ?> <!-- fin movil -->
-
- <?php
- # Muestra el teléfono fijo si existe
- if (!empty($agent->fijo)) { ?>
- <span class="hp_caption"><?php echo _HP_AGENT_PHONE; ?>:</span> <?php echo $agent->fijo; ?>.
- <br/>
- <?php
- # Muestra disponibilidad teléfono fijo
- if (!empty($agent->disp_fijo_from)) { ?>
- <span class="hp_caption"><?= _HP_AGENT_DISP ?></span> de <?= dia_semana($agent->disp_fijo_from); ?> a <?= dia_semana($agent->disp_fijo_to); ?> de <?= $agent->disp_fijo_from_hora; ?> a <?= $agent->disp_fijo_to_hora; ?>.<br />
- <?php } ?> <!-- fin disponibilidad -->
-
- <?php } ?> <!-- fin fijo -->
-
- <?php
- # Muestra los idiomas hablados si no está vacío
- if (!empty($agent->idiomas_hablados)) { ?>
- <span class="hp_caption"><?php echo _HP_AGENT_IDIOMAS; ?>:</span> <?= str_replace("|",", ",$agent->idiomas_hablados) ?>.
- <br />
- <?php } ?>
- </div>
- </div>
- <?php
- } // End If
- }
-
- /***
- * Common Routine to display Company's Info
- **/
- function show_CoInfo($companies, $agent) {
- global $mosConfig_live_site, $hp_imgdir_company, $task, $Itemid, $my;
-
- foreach($companies AS $co) {
- ?>
- <div class="hp_view_co">
- <?php if (!empty($co->photo)) { ?>
- <div id="hp_view_co_photo"><img src="<?php echo $mosConfig_live_site.$hp_imgdir_company.$co->photo; ?>" alt="<?php echo $co->name; ?>" /></div>
- <?php } ?>
- <div class="obj_con_botonera">
- <div class="nombre_objeto_corto">
- <div id="hp_view_co_details">
- <span id="hp_caption_coname">
- <?php if ($task <> "viewco") { ?><a id="hp_caption_coname" href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewco&id=$co->id&Itemid=$Itemid"); ?>"><?php echo $co->name; ?></a><?php } else {
- echo $co->name;
- } ?></span>
- </div>
- <br/>
- <div id="hp_co_addr">
- <?php
- if (trim($co->address)!="") {
- echo "$co->address <br />";
- }
- if ((trim($co->suburb)!="") && (trim($co->state)!="") && (trim($co->postcode)!="")) {
- echo "$co->suburb, $co->state, $co->postcode <br />";
- } elseif ((trim($co->suburb)!="") && (trim($co->state)!="")) {
- echo "$co->suburb, $co->state <br />";
- } elseif ((trim($co->suburb)!="") && (trim($co->postcode)!="")) {
- echo "$co->suburb, $co->postcode <br />";
- } elseif ((trim($co->state)!="") && (trim($co->postcode)!="")) {
- echo "$co->state, $co->postcode <br />";
- } elseif ((trim($co->state)!="")) {
- echo "$co->state <br />";
- } elseif ((trim($co->suburb)!="")) {
- echo "$co->suburb <br />";
- } elseif ((trim($co->postcode)!="")) {
- echo "$co->postcode <br />";
- }
- if (trim($co->country)!="") {
- echo "$co->country <br />";
- }
- ?></div>
- </div>
- <div class="botonera_dcha">
- <?php
- # Show an edit icon to allow user to edit their own profile
- if ($agent->user == $my->id && $agent->user > 0 && $my->id > 0) { ?>
- &nbsp;
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=editagent&Itemid=$Itemid"); ?>" title="<?= _HP_AGENT_MODIFY ?>"><img src="administrator/images/editar.png" alt="<?= _HP_AGENT_MODIFY ?>" title="<?= _HP_AGENT_MODIFY ?>" onmouseover="this.src='administrator/images/editar_on.png';" onmouseout="this.src='administrator/images/editar.png'" class="bot_gestionar"/></a>
- <?php } ?>
-
- <?php
- # Display "Send email link" if user at viewagent or viewco
- if( ($task == "viewagent" || $task == "viewco") && !empty($agent->email) ) { ; ?>
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagentemail&id=$agent->id&Itemid=$Itemid"); ?>"><img src="administrator/images/correo.png" alt="<?= _HP_AGENT_SENDEMAIL ?>" title="<?= _HP_AGENT_SENDEMAIL ?>" onmouseover="this.src='administrator/images/correo_on.png';" onmouseout="this.src='administrator/images/correo.png'" class="bot_gestionar"/></a><br />
- <?php } ?>
- </div> <!-- FIN div.botonera_dcha -->
- </div> <!-- FIN div.obj_con_botonera -->
-
- <br class="clearboth"/>
- <div id="hp_view_co_other_data">
- <br/>
-
- <!-- Teléfono fijo -->
- <?php if (!empty($co->telephone)) { ?>
- <span class="hp_caption"><?php echo _HP_CONTACTNUMBER; ?>: </span><?php echo $co->telephone; ?>.
- <br/>
- <?php
- # Muestra disponibilidad teléfono fijo
- if (!empty($co->disp_fijo_from)) { ?>
- <span class="hp_caption"><?= _HP_AGENT_DISP ?></span> <?= dia_semana($co->disp_fijo_from); ?> a <?= dia_semana($co->disp_fijo_to); ?> de <?= $co->disp_fijo_from_hora; ?> a <?= $co->disp_fijo_to_hora; ?>.<br />
- <?php } ?> <!-- fin disponibilidad -->
- <?php }?> <!-- fin teléfono fijo -->
-
- <!-- Teléfono móvil -->
- <?php if (!empty($co->mobile)) { ?>
- <span class="hp_caption"><?php echo _HP_AGENT_MOBILE; ?>: </span><?php echo $co->mobile; ?><br />
- <?php
- # Muestra disponibilidad teléfono móvil
- if (!empty($co->disp_mov_from)) { ?>
- <span class="hp_caption"><?= _HP_AGENT_DISP ?></span> <?= dia_semana($co->disp_mov_from); ?> a <?= dia_semana($co->disp_mov_to); ?> de <?= $co->disp_mov_from_hora; ?> a <?= $co->disp_mov_to_hora; ?>.<br />
- <?php } ?> <!-- fin disponibilidad -->
- <?php }?> <!-- fin teléfono móvil -->
-
- <?php if (!empty($co->website)) { ?>
- <span class="hp_caption"><?php echo _HP_CO_WEBSITE; ?> </span><a href="<?php echo $co->website; ?>" target="_blank"><?php echo $co->website; ?></a><br />
- <?php }?>
- <?php if (!empty($co->desc)) { ?>
- <p />
- <?php echo $co->desc; ?>
- <?php } ?>
- </div>
- <?php
- # Muestra los idiomas hablados si no está vacío
- if (!empty($co->idiomas_hablados)) { ?>
- <span class="hp_caption"><?php echo _HP_AGENT_IDIOMAS; ?>:</span> <?= str_replace("|",", ",$co->idiomas_hablados) ?>.
- <br/>
- <?php } ?>
-
- </div>
- <br class="clearboth" />
- <?php
- }
- }
-
- /***
- * Display Email form
- ***/
- function show_EmailForm($subject, $id, $titulo=null, $tipo_oferta=null) {
- global $Itemid;
-
- if ($subject <> "agent" && $subject <> "property" && $subject <> "company") return false;
- ?>
- <form method="POST" action="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=sendenquiry&id=".$id."&Itemid=".$Itemid); ?>">
- <input type="hidden" name="titulo" value="<?= $titulo ?>">
- <input type="hidden" name="tipo_oferta" value="<?= $tipo_oferta ?>">
-
- <div class="cont_form"><div class="agent_text"><?php echo _CMN_NAME; ?>*:</div>
- <input type="text" class="inputbox" name="hp_name" size="24" /></div>
-
- <div class="cont_form"><div class="agent_text"><?php echo _CMN_EMAIL; ?>*:</div>
- <input type="text" class="inputbox" name="hp_email" size="30" /></div>
-
- <div class="cont_form"><div class="agent_text"><?php echo _HP_CONTACTNUMBER; ?>*:</div>
- <input type="text" class="inputbox" name="hp_contactnumber" size="30" /></div>
-
- <div class="cont_form ">
- <span class="agent_text"><?= _HP_AGENT_DISP ?><?= _HP_AGENT_DISP_DE ?></span>
- <select name="disp_mov_from" class="inputbox">
- <?php $valor=$row->disp_mov_from; ?>
- <option value='0'><?= _HP_DIA; ?></option>
- <option value ='1'><?= _HP_L; ?></option>
- <option value ='2'><?= _HP_M; ?></option>
- <option value ='3'><?= _HP_X; ?></option>
- <option value ='4'><?= _HP_J; ?></option>
- <option value ='5'><?= _HP_V; ?></option>
- <option value ='6'><?= _HP_S; ?></option>
- <option value ='7'><?= _HP_D; ?></option>
- </select>
- <?= _HP_AGENT_DISP_A ?>
- <select name="disp_mov_to" class="inputbox">
- <?php $valor=$row->disp_mov_to; ?>
- <option value='0'><?php echo _HP_DIA; ?></option>
- <option value ='1'><?php echo _HP_L; ?></option>
- <option value ='2'><?php echo _HP_M; ?></option>
- <option value ='3'><?php echo _HP_X; ?></option>
- <option value ='4'><?php echo _HP_J; ?></option>
- <option value ='5'><?php echo _HP_V; ?></option>
- <option value ='6'><?php echo _HP_S; ?></option>
- <option value ='7'><?php echo _HP_D; ?></option>
- </select>
- <?= _HP_AGENT_DISP_DE ?>
- <select name="disp_mov_from_hora" class="inputbox">
- <?php $valor=$row->disp_mov_from_hora; ?>
- <option value='0' ><?= _HP_HORA ?></option>
- <option value ='06:00'>06:00</option>
- <option value ='07:00'>07:00</option>
- <option value ='08:00'>08:00</option>
- <option value ='09:00'>09:00</option>
- <option value ='10:00'>10:00</option>
- <option value ='11:00'>11:00</option>
- <option value ='12:00'>12:00</option>
- <option value ='13:00'>13:00</option>
- <option value ='14:00'>14:00</option>
- <option value ='15:00'>15:00</option>
- <option value ='16:00'>16:00</option>
- <option value ='17:00'>17:00</option>
- <option value ='18:00'>18:00</option>
- <option value ='19:00'>19:00</option>
- <option value ='20:00'>20:00</option>
- <option value ='21:00'>21:00</option>
- <option value ='22:00'>22:00</option>
- <option value ='23:00'>23:00</option>
- <option value ='00:00'>00:00</option>
- </select>
- <?= _HP_AGENT_DISP_A ?>
- <select name="disp_mov_to_hora" class="inputbox">
- <?php $valor=$row->disp_mov_to_hora; ?>
- <option value='0' ><?= _HP_HORA ?></option>
- <option value ='06:00'>06:00</option>
- <option value ='07:00'>07:00</option>
- <option value ='08:00'>08:00</option>
- <option value ='09:00'>09:00</option>
- <option value ='10:00'>10:00</option>
- <option value ='11:00'>11:00</option>
- <option value ='12:00'>12:00</option>
- <option value ='13:00'>13:00</option>
- <option value ='14:00'>14:00</option>
- <option value ='15:00'>15:00</option>
- <option value ='16:00'>16:00</option>
- <option value ='17:00'>17:00</option>
- <option value ='18:00'>18:00</option>
- <option value ='19:00'>19:00</option>
- <option value ='20:00'>20:00</option>
- <option value ='21:00'>21:00</option>
- <option value ='22:00'>22:00</option>
- <option value ='23:00'>23:00</option>
- <option value ='00:00'>00:00</option>
- </select>
- </div>
-
-
- <div class="cont_form"><div class="agent_text"><?php echo _HP_SPOKEN_LANG; ?>:</div>
- <?php
-
- $idiomas = explode("|",_HP_IDIOMAS);
- $hablados = explode("|",$row->idiomas_hablados);
-
- foreach($hablados as $hablado)
- $idiomas_hablados[$hablado]=true;
-
-
- foreach($idiomas as $idioma) { ?>
- <input type='checkbox' value='<?= $idioma ?>' name='habla[]'/><?= $idioma ?>
- <?php } ?>
- </div>
-
-
- <?php if ( $tipo_oferta==1 ) /* Alquiler */ { ?>
- <div class="cont_form"><div class="agent_text"><?php echo _HP_DIA_LLEGADA ?>:</div>
- <input class="inputbox" type="text" name="dia_llegada" size="10" maxlength="10">
- </div>
- <div class="cont_form"><div class="agent_text"><?php echo _HP_DIA_SALIDA ?>:</div>
- <input class="inputbox" type="text" name="dia_salida" size="10" maxlength="10">
- </div>
- <?php } ?>
-
- <div class="cont_form"><div class="agent_text"><?php echo _ENQUIRY; ?>*:</div>
- <textarea rows="4" cols="40" class="inputbox" name="hp_enquiry"></textarea>
- <br/>
- <input type="hidden" name="sbj" value="<?php echo $subject; ?>" />
- <input class="button" type="submit" value="<?php echo _HP_SENDENQUIRY; ?>" /></div>
-
- </form>
- <?php
- }
-
- function sendEmailForm($id, $title) {
- global $mosConfig_sitename;
-?>
-<script language="javascript" type="text/javascript">
- function submitbutton() {
- var form = document.frontendForm;
-
- // do field validation
- if (form.email.value == "" || form.youremail.value == "") {
- alert( '<?php echo addslashes( _EMAIL_ERR_NOINFO ); ?>' );
- return false;
- }
- return true;
- }
- function textCounter(field, maxlimit) {
- if (field.value.length > maxlimit) // if too long...trim it!
- field.value = field.value.substring(0, maxlimit);
- }
- </script>
-<title><?php echo $mosConfig_sitename; ?> :: <?php echo $title; ?></title>
-<body class="contentpane">
-<form action="index2.php?option=com_hotproperty&task=emailsend" name="frontendForm" method="POST" onSubmit="return submitbutton();">
- <br/>
- <div class="titulo"><span class="flecha_big">› </span><?php echo _EMAIL_FRIEND; ?></div>
- <br/>
- <div class="cont_form">
- <div class="agent_text"><?php echo _EMAIL_FRIEND_ADDR; ?></div>
- <input type="text" name="email" class="inputbox" size="25">
- </div>
- <div class="cont_form">
- <div class="agent_text"><?php echo _EMAIL_YOUR_NAME; ?></div>
- <input type="text" name="yourname" class="inputbox" size="25">
- </div>
- <div class="cont_form">
- <div class="agent_text"><?php echo _EMAIL_YOUR_MAIL; ?></div>
- <input type="text" name="youremail" class="inputbox" size="25">
- </div>
- <div class="cont_form">
- <div class="agent_text"><?php echo _EMAIL_YOUR_MESS; ?></div>
- <textarea name="yourmess" class="inputbox" cols="23" rows="4" onkeydown="textCounter(this.form.yourmess, 250);" onkeyup="textCounter(this.form.yourmess, 250);"></textarea>
- </div>
- <br/>
- <div class="centro">
- <input type="submit" name="submit" class="button" value="<?php echo _BUTTON_SUBMIT_MAIL; ?>">
- <input type="button" name="cancel" value="<?php echo _BUTTON_CANCEL; ?>" class="button" onClick="window.close();"></td>
- </div>
- <input type="hidden" name="id" value="<?php echo $id; ?>">
-</form>
-<?php
- }
-
- function emailSent( $to ) {
- global $mosConfig_sitename;
-?>
-<br />
-<?php echo _EMAIL_SENT; ?>
-<br />
-<br />
-<?php if (!$hide_js) { php?>
- <a href='javascript:window.close();'>
- <span class="small"><?php echo _PROMPT_CLOSE;?></span>
- </a>
-<?php
- }
- }
- /***
- * Common Routine to display properties
- ***/
- function list_properties(&$prop, &$caption) {
- global $Itemid, $task, $my, $mosConfig_live_site, $mosConfig_absolute_path;
- global $hp_imgdir_thumb, $hp_currency, $hp_imgsize_thumb, $hp_img_noimage_thumb, $hp_thousand_sep, $hp_dec_point, $hp_link_open_newwin, $hp_show_thumb, $hp_dec_string, $hp_thousand_string;
-
- if(empty($prop)) {
- ?>
- <div id="hp_error_empty">
- <?php echo _HP_PROP_ERROR_EMPTY; ?>
- </div>
- <?php
- } else {
- foreach($prop AS $p) {
- if ($p->thumb <> '') {
- $thumb_imgsize = GetImageSize ($mosConfig_absolute_path.$hp_imgdir_thumb.$p->thumb);
- } else {
- $thumb_imgsize = GetImageSize ($mosConfig_absolute_path.$hp_imgdir_thumb.$hp_img_noimage_thumb);
- }
- ?>
- <div class="hp_prop">
- <div class="hp_details">
- <?php if ($hp_show_thumb) { ?>
- <div class="img_thumb"><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=view&id=$p->id&Itemid=$Itemid"); ?>"><img <?php echo $thumb_imgsize[3]; ?> border="0" src="<?php
- if ($p->thumb <> '') echo $mosConfig_live_site.$hp_imgdir_thumb.$p->thumb;
- else echo $mosConfig_live_site.$hp_imgdir_thumb.$hp_img_noimage_thumb;
- ?>" alt="<?php echo $p->thumb_title ?>" /></a></div>
- <?php } ?>
- <div class="datos_oferta">
- <div class="nombre_objeto">
- <a class="hp_title" href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=view&id=$p->id&Itemid=$Itemid"); ?>"><?php echo $p->name; ?></a>
- </div>
- <div class="botonera_dcha">
- <?php
- # Show an edit icon to allow user to edit the property
- if ($p->user == $my->id && $p->user > 0 && $my->id > 0) { ?>
- &nbsp;
- <a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=editprop&id=$p->id&Itemid=$Itemid"); ?>" title="<?php echo _E_EDIT; ?>"><img src="administrator/images/editar.png" alt="<?= _E_EDIT ?>" title="<?= _E_EDIT ?>" onmouseover="this.src='administrator/images/editar_on.png';" onmouseout="this.src='administrator/images/editar.png'" class="bot_gestionar"/></a>
- <?php }
- ?>
- </div>
- <br class="clearboth"/>
- <?php
- /* Escupe los campos de manera poco flexible pero práctica */
- echo '<div class="columna_listado_izq">';
- // Población
- if (!$caption['suburb']->hideCaption)
- echo '<span class="hp_caption">'.$caption['suburb']->caption."</span>: ";
- echo $p->suburb.".<br />";
- // Provincia
- if (!$caption['state']->hideCaption)
- echo '<span class="hp_caption">'.$caption['state']->caption."</span>: ";
- echo $p->state.".<br />";
-
- // Barrio
- if (!$p->Barrio=="")
- {
- if (!$caption['Barrio']->hideCaption)
-
- echo '<span class="hp_caption">'.$caption['Barrio']->caption."</span>: ";
- echo $p->Barrio.".<br />";
- }
-
-
- // Nº plazas
- if ($p->typeid == 1 && $p->Num_plazas != "")
- {
- if (!$caption['Num_plazas']->hideCaption)
- echo '<span class="hp_caption">'.$caption['Num_plazas']->caption."</span>: ";
- echo $p->Num_plazas.".<br />";
- }
-
- // Metros construidos
- if ($p->MetrosConstruidos != "") // Venta
- {
- if (!$caption['MetrosConstruidos']->hideCaption)
- echo '<span class="hp_caption">'.$caption['MetrosConstruidos']->caption."</span>: ";
- echo $p->MetrosConstruidos." ".$caption['MetrosConstruidos']->append_text.".<br />";
- }
-
- // Año construccion
- if ($p->AnioConstruccion != "") // Venta
- {
- if (!$caption['AnioConstruccion']->hideCaption)
- echo '<span class="hp_caption">'.$caption['AnioConstruccion']->caption."</span>: ";
- echo $p->AnioConstruccion."<br />";
- }
-
- // Número de dormitorios
- if ($p->Numero_dormitorios != "") // Alquiler
- {
- if (!$caption['Numero_dormitorios']->hideCaption)
- echo '<span class="hp_caption">'.$caption['Numero_dormitorios']->caption."</span>: ";
- echo $p->Numero_dormitorios.".<br/>";
- }
-
- // Precio
- if ($p->price != "0") // Venta
- {
- if (!$caption['price']->hideCaption)
- echo '<span class="hp_caption">'.$caption['price']->caption."</span>: ";
- echo number_format($p->price,2,',','.')." ".$caption['price']->append_text."<br/>";
- }
-
- echo '</div>';
-
- echo '<div class="columna_listado_dcha">';
- // Cuartos de baño
- if (!$caption['Cuartos_banio_con_duchas']->hideCaption)
- echo '<span class="hp_caption">'.$caption['Cuartos_banio_con_duchas']->caption."</span>: ";
- if ($p->Cuartos_banio_con_duchas <> "")
- echo $p->Cuartos_banio_con_duchas.". ";
- else
- echo _OFER_NINGUNO." ";
- // Aseos
- if (!$caption['Aseos']->hideCaption)
- echo '<span class="hp_caption">'.$caption['Aseos']->caption."</span>: ";
-
- if ($p->Aseos <> "")
- echo $p->Aseos.".<br />";
- else
- echo _OFER_NINGUNO."<br />";
- // Dispone
- if (!$caption['Dispone']->hideCaption)
- echo '<span class="hp_caption">'.$caption['Dispone']->caption."</span>: ";
-
- echo str_replace("|",", ",$p->Dispone).".<br />";
- echo '</div>';
- ?>
- <?php
- echo '<br class="clearboth">';
- // Resumen
- # echo $p->Resumen."<br/><br/>";
-
-
- /* Antiguo código que escupía los campos */
- /*foreach($p as $key => $value) {
- if ( array_key_exists($key,$caption) && ($caption[$key]->name <> 'name' && $caption[$key]->name <> 'thumb' && $caption[$key]->name <> 'thumb_title' && $caption[$key]->name <> '' && $value <> "") )
- # Replace '|' with a comma for checkbox and select multiple fields
- if ($caption[$key]->field_type == "checkbox" || $caption[$key]->field_type == "selectmultiple") {
- if (!$caption[$key]->hideCaption) echo '<span class="hp_caption">'.$caption[$key]->caption."</span>: ";
- echo str_replace("|",", ",$value).".<br />";
- # Web Link
- } elseif ($caption[$key]->field_type == "link") {
-
- // Evaluate mambot style data
- $value = str_replace( '{property_id}', $p->id, $value );
- $value = str_replace( '{type_id}', $p->typeid, $value );
- $value = str_replace( '{agent_id}', $p->agentid, $value );
- $value = str_replace( '{company_id}', $p->companyid, $value );
- $value = str_replace( '{Itemid}', $Itemid, $value );
-
- if (!$caption[$key]->hideCaption) {
- ?><span class="hp_caption"><?php echo $caption[$key]->caption; ?></span>: <?php }
- echo $caption[$key]->prefix_text;
- $link = explode("|",$value);
- if (count($link) == 1 && ( substr(trim($link[0]),0,4) == "http" || substr(trim($link[0]),0,5) == "index" ) ) {
- ?><a <?php echo ($hp_link_open_newwin) ? 'target="_blank" ': ''; ?>href="<?php echo $link[0]; ?>"><?php echo $link[0]; ?></a><?php
- } elseif (count($link) > 1 && ( substr(trim($link[1]),0,4) == "http" || substr(trim($link[1]),0,5) == "index" ) ) {
- ?><a <?php echo ($hp_link_open_newwin) ? 'target="_blank" ': ''; ?>href="<?php echo $link[1]; ?>"><?php echo $link[0]; ?></a><?php
- } else {
- echo $value;
- }
- echo $caption[$key]->prefix_text."<br />";
-
- } else {
- # Do not display agent field when viewing agent's properties
- # Do not display type field when viewing type's properties
- if ( !($key == "agent" && $task == "viewagent") && !($key =="type" && $task == "viewtype") ) {
- # Show agent link
- if ($key == "agent") {
- if (!$caption[$key]->hideCaption) {
- ?><span class="hp_caption"><?php echo $caption[$key]->caption; ?></span>: <?php
- }
- ?><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewagent&id=$p->agentid&Itemid=$Itemid"); ?>"><?php echo $caption[$key]->prefix_text.$value.$caption[$key]->append_text; ?></a><br /><?php
- # Show company link
- } elseif ($key == "company") {
- if (!$caption[$key]->hideCaption) {
- ?><span class="hp_caption"><?php echo $caption[$key]->caption; ?></span>: <?php }
- ?><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewco&id=".$p->companyid."&Itemid=$Itemid"); ?>"> <?php echo $caption[$key]->prefix_text.$value.$caption[$key]->append_text; ?></a><br /> <?php
- # Show type link
- } elseif ($key == "type") {
- if (!$caption[$key]->hideCaption) {
- ?><span class="hp_caption"><?php echo $caption[$key]->caption; ?></span>: <?php }
- ?><a href="<?php echo sefRelToAbs("index.php?option=com_hotproperty&task=viewtype&id=".$p->typeid."&Itemid=$Itemid"); ?>"> <?php echo $caption[$key]->prefix_text.$value.$caption[$key]->append_text; ?></a><br /> <?php
- # Show Price with proper formating
- } elseif ($key == "price") {
- if (!$caption[$key]->hideCaption) {
- ?><span class="hp_caption"><?php echo $caption[$key]->caption; ?></span>:<?php }
- ?><span class="hp_price"><?php echo $caption[$key]->prefix_text.$hp_currency." ".number_format($value, $hp_dec_point, $hp_dec_string, ($hp_thousand_sep) ? $hp_thousand_string:'').$caption[$key]->append_text; ?></span><br /> <?php
- # Show Featured as Yes/No instead of 1/0
- } elseif ($key == "featured") {
- if (!$caption[$key]->hideCaption) {
- echo '<span class="hp_caption">'.$caption[$key]->caption."</span>: ";
- }
- echo $caption[$key]->prefix_text
- . ( ($value == '1') ? _CMN_YES : _CMN_NO )
- . $caption[$key]->append_text
- . "<br />";
- # Else, show normal 'caption: value'
- } else {
- if (!$caption[$key]->hideCaption) {
- echo '<span class="hp_caption">'.$caption[$key]->caption."</span>: ";
- }
- echo $caption[$key]->prefix_text
- . ( ($key=="price") ? $hp_currency." " : "" )
- . $value
- . $caption[$key]->append_text
- . "<br />";
- }
- }
- }
- }*/
-
- ?>
- </div>
- </div>
-
- </div>
- <?php
- } // End Foreach
- } // End If
- }
-
- function seleccion_fecha ( $name ) {
- ?>
- <?php
- if ($name == "desde")
- {
- echo "<div class=\"titulo_fecha\">"._HPAVL_DESDE."&nbsp;</div>";
- }
- else
- {
- echo "<div class=\"titulo_fecha\">"._HPAVL_HASTA."&nbsp;&nbsp;</div>";
- }
- ?>
- <!-- Día -->
- <select size="1" name="<?php echo $name."_dia"; ?>" class="campo_fecha inputbox">
- <?php
- for ($i=1; $i<=31; $i++)
- echo "<option value='".$i."'>".$i."</option>";
- ?>
- </select>
-
- <!-- Mes -->
- <select size="1" name="<?php echo $name."_mes"; ?>" class="campo_fecha inputbox">
- <?php
- for ($i=1; $i<=12; $i++)
- echo "<option value='".$i."'>".$i."</option>";
- ?>
- </select>
- <!-- Año -->
- <select size="1" name="<?php echo $name."_año"; ?>" class="campo_fecha inputbox">
- <?php
- $hoy=getdate();
- for ($i=$hoy['year']; $i<=2080; $i++)
- echo "<option value='".$i."'>".$i."</option>";
- ?>
- </select>
- <br class="clearboth"/>
- <?php
- }
-
-
- function show_ResumenTipos() {
- global $database;
-
- # Select published types
- $database->setQuery( "SELECT * FROM #__hp_prop_types AS t"
- . "\nWHERE t.published='1'"
- . "\nORDER BY t.ordering ASC");
- $types = $database->loadObjectList();
-
- foreach($types AS $t) { ?>
- <a href="<?php echo sefRelToAbs('index.php?option=com_hotproperty&task=viewtype&id='.$t->id.'&Itemid='.$Itemid); ?>"><?= $t->name ?> ( <?= getNumOfertas($t->id) ?>)</a>
- <?php }
- }
-
- function getNumOfertas($type_id) {
- $database->setQuery( "SELECT id FROM #__hp_properties AS p"
- . "\nWHERE p.type=".$type_id);
- return $database->getNumRows();
- }
-}
-
-
-?>
diff --git a/emacs.d/nxhtml/tests/in/zero-pi.html b/emacs.d/nxhtml/tests/in/zero-pi.html
deleted file mode 100644
index 6bb247c..0000000
--- a/emacs.d/nxhtml/tests/in/zero-pi.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
-&#xA9; <??>
- </body>
-</html>
diff --git a/emacs.d/nxhtml/tests/in/zn-090529-doxysample.php b/emacs.d/nxhtml/tests/in/zn-090529-doxysample.php
deleted file mode 100644
index 3eddd90..0000000
--- a/emacs.d/nxhtml/tests/in/zn-090529-doxysample.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/**
- * @file doxysample.php
- * @author Zoltán Nagy <abesto0@gmail.com>
- * @date Fri May 29 15:28:06 2009
- *
- * @brief Example file commented with Doxygen (via doxymacs)
- *
- * Longer description of what this file is
- * Possibly multiline
- */
-
-
-/**
- * Echos the parameter
- *
- * @param text Text to echo
- *
- * @return EOL message
- */
-function say($text)
-{
- echo $text;
- return "I spoketh.";
-}
-?>
-
-<div>
-This is HTML, so the following has no special meaning:
-/**
- * Fake comment
- *
- * @param whatever Foo
- *
- * @return bar
- */
-</div>
diff --git a/emacs.d/nxhtml/tests/inemacs/bug1013.el b/emacs.d/nxhtml/tests/inemacs/bug1013.el
deleted file mode 100644
index 6b0aab2..0000000
--- a/emacs.d/nxhtml/tests/inemacs/bug1013.el
+++ /dev/null
@@ -1,35 +0,0 @@
-;; Setup
-(defvar word-wrap2 nil)
-(make-variable-buffer-local 'word-wrap2)
-(set-default 'word-wrap2 nil)
-
-(defcustom word-wrap3 nil
- "doc 3"
- :type 'boolean)
-(make-variable-buffer-local 'word-wrap3)
-(set-default 'word-wrap3 nil)
-
-(set-default 'word-wrap nil)
-(set-default 'truncate-lines nil)
-
-(put 'truncate-lines 'permanent-local t)
-(put 'word-wrap 'permanent-local t)
-(put 'word-wrap2 'permanent-local t)
-(put 'word-wrap3 'permanent-local t)
-
-(setq truncate-lines t)
-(setq word-wrap t)
-(setq word-wrap2 t)
-(setq word-wrap3 t)
-
-(kill-all-local-variables)
-
-;; Test
-(ert-should (eq (default-value 'word-wrap3) nil))
-(ert-should (eq word-wrap3 t))
-(ert-should (eq (default-value 'word-wrap2) nil))
-(ert-should (eq word-wrap2 t))
-(ert-should (eq (default-value 'truncate-lines) nil))
-(ert-should (eq truncate-lines t))
-(ert-should (eq (default-value 'word-wrap) nil))
-(ert-should (eq word-wrap t))
diff --git a/emacs.d/nxhtml/tests/mumamo-test.el b/emacs.d/nxhtml/tests/mumamo-test.el
deleted file mode 100644
index ecbac10..0000000
--- a/emacs.d/nxhtml/tests/mumamo-test.el
+++ /dev/null
@@ -1,299 +0,0 @@
-;;; mumamo-test.el --- Test routines for mumamo
-;;
-;; Author: Lennart Borgman
-;; Created: Sat Mar 31 03:59:26 2007
-;; Version: 0.1
-;; Last-Updated:
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This file defines some test for mumamo.el and a the minor mode
-;; `mumamu-test-mode' to bind the test functions to some keys for
-;; convenient use. This will define F3 to run
-;; `mumamo-test-create-chunk-at' and Shift-F3 to
-;; `mumamo-test-create-chunks-at-all-points'.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(eval-when-compile (require 'mumamo))
-(eval-when-compile (require 'mumamo))
-(require 'whelp)
-
-;;;;;;; TESTS, run in fundamental-mode buffer
-
-(defvar mumamo-test-mode-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map [f11] 'goto-char)
- (define-key map [(meta f3)] 'mumamo-test-fontify-region)
- (define-key map [(shift f3)] 'mumamo-test-create-chunks-at-all-points)
- (define-key map [f3] 'mumamo-test-create-chunk-at-point)
- map))
-
-(defvar mumamo-test-current-chunk-family nil)
-(make-variable-buffer-local 'mumamo-test-current-chunk-family)
-
-(define-minor-mode mumamo-test-mode
- "For testing creating mumamo-mode chunks.
-When this mode is on the following keys are defined:
-
- \\{mumamo-test-mode-keymap}
-
-"
- nil
- " MuMaMo-TEST"
- :keymap mumamo-test-mode-keymap
- (if mumamo-test-mode
- (progn
- (setq mumamo-test-current-chunk-family mumamo-current-chunk-family)
- (setq mumamo-use-condition-case nil)
- (setq mumamo-debugger nil)
- (run-with-idle-timer 0 nil 'mumamo-test-tell-bindings))
- (setq mumamo-use-condition-case t)
- (setq mumamo-debugger (default-value 'mumamo-debugger)))
- )
-
-(defun mumamo-test-tell-bindings ()
- (save-match-data ;; runs in timer
- (let ((s "mumamo-test-mode is on, use F3/shift-F3 for simple testing"))
- (put-text-property 0 (length s)
- 'face 'font-lock-warning-face
- s)
- (message "%s" s))))
-
-;;(mumamo-test-mode 1)
-
-
-;; (defun mumamo-test-fontify-buffer ()
-;; (interactive)
-;; (unless mumamo-current-chunk-family
-;; (mumamo-select-chunk-family))
-;; ;;(when mumamo-mode (mumamo-mode 0))
-;; (when mumamo-multi-major-mode (mumamo-turn-off-actions))
-;; (save-excursion
-;; (mumamo-remove-all-chunk-overlays)
-;; (mumamo-save-buffer-state nil
-;; (put-text-property (point-min) (point-max) 'face nil))
-;; (mumamo-fontify-buffer)))
-
-(defun mumamo-test-create-chunk-at-point ()
- (interactive)
- (remove-hook 'post-command-hook 'mumamo-post-command t)
- (font-lock-mode -1)
- (setq fontification-functions nil)
- (save-excursion
- (mumamo-remove-all-chunk-overlays)
- (mumamo-save-buffer-state nil
- (remove-text-properties (point-min) (point-max) '(face nil syntax-table nil)))
- (let* ((mumamo-current-chunk-family mumamo-test-current-chunk-family)
- (here (point))
- chunk
- chunk2)
- (mumamo-save-buffer-state nil
- ;;(setq chunk (mumamo-create-chunk-at here)))
- (setq chunk (mumamo-find-chunks here "test1")))
- ;;(setq chunk2 (mumamo-get-chunk-at here))
- (setq chunk2 (mumamo-find-chunks here "set chunk2"))
- ;;(message "mumamo-test-create-chunk-at-point.chunk 1=%s" chunk)
- ;;(lwarn 'test-create-chunk-at :warning "chunk=%s, chunk2=%s" chunk chunk2)
- ;;(when (overlay-buffer chunk)
- (assert (eq chunk chunk2))
- ;;)
- ;;(message "mumamo-test-create-chunk-at-point.chunk 2=%s" chunk)
- ;;(syntax-ppss-flush-cache (1- (overlay-start chunk)))
- (syntax-ppss-flush-cache (overlay-start chunk))
- (let ((start (overlay-start chunk))
- (end (overlay-end chunk)))
- ;;(setq syntax-ppss-last (cons 319 (parse-partial-sexp 1 1)))
- ;;(message "mumamo-test-create-chunk-at-point.chunk 2a=%s" chunk)
- (mumamo-save-buffer-state nil
- (mumamo-fontify-region-1 start end nil)))
- ;;(message "mumamo-test-create-chunk-at-point.chunk 3=%s" chunk)
- (unless mumamo-test-mode (mumamo-test-mode 1))
- ;;(message "mumamo-test-create-chunk-at-point.chunk 4=%s" chunk)
- chunk
- ;;(message "test 2.debugger=%s" debugger)
- ;;(mumamo-get-chunk-at here)
- (mumamo-find-chunks here "return value")
- )))
-
-(defun mumamo-test-create-chunks-at-all-points ()
- (interactive)
- ;;(goto-char (point-min))
- (let (last-ovl
- this-ovl)
- (while (< (point) (point-max))
- ;;(setq this-ovl (mumamo-test-create-chunk-at-point))
- (setq this-ovl (mumamo-find-chunks (point) "test loop"))
- ;;(message "this-ovl=%s" this-ovl)
- (sit-for 0.005)
- ;;(sit-for 0)
- (when last-ovl
- (if (= (point) (overlay-end last-ovl))
- (assert (= (overlay-end last-ovl) (overlay-start this-ovl)))
- (assert (= (overlay-start last-ovl) (overlay-start this-ovl)))
- (assert (= (overlay-end last-ovl) (overlay-end this-ovl)))
- ))
- (if last-ovl
- (move-overlay last-ovl (overlay-start this-ovl) (overlay-end this-ovl))
- (setq last-ovl (make-overlay (overlay-start this-ovl) (overlay-end this-ovl))))
- (forward-char 1)
- )
- (message "No problems found")))
-
-(defun mumamo-test-fontify-region ()
- (interactive)
- (let ((font-lock-mode t))
- ;;(mumamo-fontify-region-with (point-min) (point-max) nil 'php-mode nil)
- (mumamo-fontify-region (point-min) (point-max) t)))
-
-;; Fix-me: can't byte compile:
-;; (defun mumamo-test-easy-make ()
-;; (interactive)
-;; (let ((start-str "--Start Submode:")
-;; (end-str "--End Submode--")
-;; (start-reg nil))
-;; (setq start-reg
-;; ;; (rx
-;; ;; (eval start-str)
-;; ;; (0+ space)
-;; ;; (submatch
-;; ;; (0+ (any "a-z-")))
-;; ;; (0+ space)
-;; ;; "--"
-;; ;; )
-;; (rx-to-string
-;; `(and
-;; ,start-str
-;; (0+ space)
-;; (submatch
-;; (0+ (any "a-z-")))
-;; (0+ space)
-;; "--"
-;; ))
-;; )
-;; (mumamo-easy-make-chunk-fun testchunk
-;; start-str
-;; start-reg
-;; end-str))
-;; (setq mumamo-current-chunk-family
-;; (list "testing"
-;; 'text-mode
-;; (list
-;; 'testchunk
-;; ))))
-
-;; (defun mumamo-test-emb-perl ()
-;; (interactive)
-;; (let ((start-str "[-")
-;; (end-str "-]")
-;; (start-reg nil))
-;; (mumamo-easy-make-chunk-fun testchunk-ep
-;; start-str
-;; start-reg
-;; end-str))
-;; (setq mumamo-current-chunk-family
-;; (list "emb perl test"
-;; 'perl-mode
-;; (list
-;; 'testchunk-ep
-;; ))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; These are for testing bad initialization in mumamo. They can be
-;; used for example with php-mode. (They are mainly for development
-;; purposes.)
-;;
-;; (mumamo-bad-c-init)
-(defun mumamo-bad-c-init() (/ 1 0))
-(defun mumamo-setup-bad-c-init ()
- (interactive)
- (add-hook 'c-mode-common-hook 'mumamo-bad-c-init))
-(defun mumamo-teardown-bad-c-init ()
- (interactive)
- (remove-hook 'c-mode-common-hook 'mumamo-bad-c-init))
-
-
-;; (defmacro mumamo-get-backtrace (bodyform)
-;; "Evaluate BODYFORM, return backtrace as a string.
-;; If there is an error in BODYFORM then return the backtrace as a
-;; string, otherwise return nil."
-;; `(let* ((debugger-ret nil)
-;; (debugger (lambda (&rest debugger-args)
-;; (message "DEBUGGER CALLED BEFORE")
-;; (setq debugger-ret (with-output-to-string (backtrace)))
-;; (message "DEBUGGER CALLED AFTER, debugger-ret=%s" debugger-ret)
-;; ))
-;; (debug-on-error t)
-;; (debug-on-signal t)
-;; )
-;; (condition-case err
-;; (progn
-;; ,bodyform
-;; nil)
-;; (error
-;; (message "err=%S" err)
-;; (message "debugger-ret=%S\n\n\n" debugger-ret)
-;; (let* ((errmsg (error-message-string err))
-;; (debugger-lines (split-string debugger-ret "\n"))
-;; (dbg-ret (mapconcat 'identity (nthcdr 6 debugger-lines) "\n")))
-;; (concat errmsg "\n" dbg-ret))))))
-
-;; (defun mumamo-test3-debug()
-;; (interactive)
-;; (message "%s"
-;; (mumamo-get-backtrace
-;; (mumamo-test-major-mode-init 'php-mode))))
-
-;; (defun mumamo-test2-debug()
-;; (interactive)
-;; (mumamo-condition-case var
-;; (mumamo-test-major-mode-init 'php-mode)
-;; handlers))
-
-(defun mumamo-test-debug()
- (interactive)
- (condition-case err
- (let ((debugger 'mumamo-debug)
- (debug-on-error t)
- (debug-on-signal t))
- ;;(message "here d")(sit-for 1)
- (mumamo-test-major-mode-init 'php-mode))
- (error (message "here 2 err=%S" err))))
-
-(defun mumamo-debug (&rest debugger-args)
- (let ((s (with-output-to-string (backtrace))))
- (message "mumamo-debug: %s" s)))
-
-;; (defun mumamo-bt-to-msg (msg)
-;; (mumamo-msgfntfy "%s: %s" msg
-;; (with-output-to-string
-;; (backtrace))))
-
-(defun mumamo-test-major-mode-init (major)
- "Turn on major mode MAJOR in a temp buffer.
-This function should be used after getting errors during
-fontification where the message in the *Message* buffer tells
-that you should call it to get a traceback.
-
-Send the traceback you get, if any, together with the message in
-the message buffer when reporting the error."
- (interactive "CMajor mode: ")
- (with-temp-buffer
- ;;(setq mumamo-explicitly-turned-on-off t)
- (setq debug-on-error t)
- (funcall major)))
-
-(provide 'mumamo-test)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mumamo-test.el ends here
diff --git a/emacs.d/nxhtml/tests/nxhtmltest-Q.el b/emacs.d/nxhtml/tests/nxhtmltest-Q.el
deleted file mode 100644
index b89857d..0000000
--- a/emacs.d/nxhtml/tests/nxhtmltest-Q.el
+++ /dev/null
@@ -1,114 +0,0 @@
-;;; test-Q.el --- Run test from a fresh Emacs
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-07-08T23:05:40+0200 Tue
-;; Version: 0.1
-;; Last-Updated: 2008-07-09T00:17:26+0200 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; Required feature `test-Q' was not provided.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Defines `nxhtmltest-Q'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'ourcomments-util))
-
-(eval-and-compile
- (defvar nxhtmltest-bin-Q
- (file-name-directory (or load-file-name
- (when 'bytecomp-filename bytecomp-filename)
- buffer-file-name)))
-
- (add-to-list 'load-path nxhtmltest-bin-Q)
- (require 'nxhtmltest-helpers))
-
-;;;###autoload
-(defun nxhtmltest-run-Q ()
- "Run all tests defined for nXhtml in fresh Emacs.
-See `nxhtmltest-run' for more information about the tests."
- (interactive)
- (let* ((test-el (expand-file-name "nxhtmltest-suites.el" nxhtmltest-bin-Q))
- (nxhtml-auto-start (expand-file-name "../autostart.el" nxhtmltest-bin-Q))
- (temp-eval-file (expand-file-name "temp-test.el" nxhtmltest-bin-Q))
- (temp-eval-buf (find-file-noselect temp-eval-file))
- (load-path load-path))
- ;;(load (expand-file-name "nxhtmltest-helpers" nxhtmltest-bin-Q))
- (add-to-list 'load-path nxhtmltest-bin-Q)
- (require 'nxhtmltest-helpers)
- (nxhtmltest-get-fontification-method)
- (with-current-buffer temp-eval-buf
- (erase-buffer)
- (insert "(setq debug-on-error t)\n"
- "(eval-when-compile (require 'cl))\n"
- "(delete-other-windows)\n"
- "(eval-after-load 'nxhtml '(setq nxhtml-skip-welcome t))\n"
- (format "(setq nxhtmltest-default-fontification-method '%s)\n"
- nxhtmltest-default-fontification-method)
- ))
- (when (featurep 'ruby-mode)
- (with-current-buffer temp-eval-buf
- (insert "(pushnew \""
- (file-name-directory (locate-library "ruby-mode"))
- "\" load-path)")))
- (with-current-buffer temp-eval-buf
- (save-buffer))
- (kill-buffer temp-eval-buf)
- (unless (file-exists-p nxhtmltest-bin-Q)
- (error "Can't find directory %s" nxhtmltest-bin-Q))
- (setq nxhtmltest-bin-Q (file-name-sans-extension nxhtmltest-bin-Q))
- (unless (file-exists-p test-el)
- (error "Can't find file %s" test-el))
- (setq test-el (file-name-sans-extension test-el))
- (unless (file-exists-p nxhtml-auto-start)
- (error "Can't find file %s" nxhtml-auto-start))
- (setq nxhtml-auto-start (file-name-sans-extension nxhtml-auto-start))
- (message "nxhtmltest-bin-Q=%s" nxhtmltest-bin-Q)
- (message "nxhtml-auto-start=%s" nxhtml-auto-start)
- (setenv "nxhtmltest-run-Q" "run")
- (message "After setenv nxhtmltest-run-Q=%s" (getenv "nxhtmltest-run-Q"))
- (message "(ourcomments-find-emacs) => %s" (ourcomments-find-emacs))
- (call-process (ourcomments-find-emacs) nil 0 nil "-Q"
- "-l" temp-eval-file
- "-l" nxhtml-auto-start
- "-l" test-el)
- (message "After call-process")
- (setenv "nxhtmltest-run-Q")
- (message "Starting new Emacs instance for test - it will be ready soon ...")))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtmltest-Q.el ends here
diff --git a/emacs.d/nxhtml/tests/nxhtmltest-helpers.el b/emacs.d/nxhtml/tests/nxhtmltest-helpers.el
deleted file mode 100644
index b05a6ca..0000000
--- a/emacs.d/nxhtml/tests/nxhtmltest-helpers.el
+++ /dev/null
@@ -1,156 +0,0 @@
-;;; nxhtmltest-helpers.el --- Helper functions for testing
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-07-08T19:10:54+0200 Tue
-;; Version: 0.2
-;; Last-Updated: 2008-09-01T01:13:15+0200 Sun
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `button', `help-fns', `help-mode', `view'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(require 'ert2)
-
-(defun nxhtmltest-goto-line (line)
- (save-restriction
- (widen)
- (goto-char (point-min))
- (forward-line (1- line))))
-
-(defun nxhtmltest-mumamo-error-messages ()
- (ert-get-messages "^MU:MuMaMo error"))
-
-(defun nxhtmltest-should-no-mumamo-errors ()
- (ert-should (not (nxhtmltest-mumamo-error-messages))))
-
-(defun nxhtmltest-should-no-nxml-errors ()
- (ert-should (not (ert-get-messages "Internal nXML mode error"))))
-
-(defun nxhtmltest-be-really-idle (seconds &optional prompt-mark)
- (unless prompt-mark (setq prompt-mark ""))
- (with-timeout (4 (message "<<<< %s - not really idle any more at %s"
- prompt-mark
- (format-time-string "%H:%M:%S")))
- (let ((prompt (format
- ">>>> %s Starting beeing really idle %s seconds at %s"
- prompt-mark
- seconds
- (format-time-string "%H:%M:%S ..."))))
- (message "%s" prompt)
- (read-minibuffer prompt)
- (redisplay))))
-
-;;(nxhtmltest-be-really-idle 4 "HERE I AM!!")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Fontification methods
-
-(defvar nxhtmltest-default-fontification-method nil)
-
-(defun nxhtmltest-get-fontification-method ()
- "Ask user for default fontification method."
- (let* ((collection
- '(
- ("Fontify as usual (wait)" fontify-as-usual)
- ("Fontify by calling timer handlers" fontify-w-timer-handlers)
- ("Fontify ps print " fontify-as-ps-print)
- ("Call fontify-buffer" fontify-buffer)
- ))
- (hist (mapcar (lambda (rec)
- (car rec))
- collection))
- (method-name (or t
- (completing-read "Default fontification method: "
- collection nil t
- (car (nth 1 collection))
- 'hist))))
- (setq nxhtmltest-default-fontification-method
- ;;(nth 1 (assoc method-name collection))
- ;;'fontify-w-timer-handlers
- 'fontify-as-ps-print
- )))
-
-(defun nxhtmltest-fontify-as-usual (seconds prompt-mark)
- (font-lock-mode 1)
- ;; This does not work now since I deleted the function below:
- (error "font-lock-wait not defined")
- ;;(font-lock-wait (nxhtmltest-be-really-idle seconds prompt-mark))
- )
-
-(defun nxhtmltest-fontify-w-timers-handlers ()
- ;;(dolist (timer (copy-list timer-idle-list))
- (dolist (timer (copy-sequence timer-idle-list))
- (timer-event-handler timer))
- (redisplay t))
-
-(declare-function jit-lock-fontify-now "jit-lock" (&optional start end))
-(declare-function lazy-lock-fontify-region "lazy-lock" (beg end))
-
-;; to avoid compilation gripes
-;;(defun ps-print-ensure-fontified (start end)
-(defun nxhtmltest-fontify-as-ps-print()
- (save-restriction
- (widen)
- (let ((start (point-min))
- (end (point-max)))
- (cond ((and (boundp 'jit-lock-mode) (symbol-value 'jit-lock-mode))
- (jit-lock-fontify-now start end))
- ((and (boundp 'lazy-lock-mode) (symbol-value 'lazy-lock-mode))
- (lazy-lock-fontify-region start end))))))
-
-(defun nxhtmltest-fontify-buffer ()
- (font-lock-fontify-buffer)
- (redisplay t))
-
-(defun nxhtmltest-fontify-default-way (seconds &optional pmark)
- ;;(assert (not font-lock-mode))
- (case nxhtmltest-default-fontification-method
- (fontify-as-usual (nxhtmltest-fontify-as-usual seconds pmark))
- (fontify-w-timer-handlers (nxhtmltest-fontify-w-timers-handlers))
- (fontify-as-ps-print (nxhtmltest-fontify-as-ps-print))
- (fontify-buffer (nxhtmltest-fontify-buffer))
- (t (error "Unrecognized default fontification method: %s"
- nxhtmltest-default-fontification-method))))
-
-
-
-(provide 'nxhtmltest-helpers)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtmltest-helpers.el ends here
diff --git a/emacs.d/nxhtml/tests/nxhtmltest-suites.el b/emacs.d/nxhtml/tests/nxhtmltest-suites.el
deleted file mode 100644
index 5af8ab8..0000000
--- a/emacs.d/nxhtml/tests/nxhtmltest-suites.el
+++ /dev/null
@@ -1,632 +0,0 @@
-;;; nxhtmltest-suites.el --- Test suites for mumamo / nXhtml
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-07-08T20:17:36+0200 Tue
-;; Version: 0.12
-;; Last-Updated: 2008-09-01T01:13:28+0200 Sun
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Defines `nxhtmltest-run'. When (getenv "nxhtmltest-run-Q")
-;; returns non-nil also runs this function.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; Added code from Christian Ohler for writing ert tests.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(eval-when-compile (require 'cl))
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'rng-valid))
-(eval-when-compile (require 'rngalt))
-(require 'mumamo)
-(require 'mumamo-fun)
-(require 'nxhtml)
-(require 'nxhtml-mumamo)
-(when (fboundp 'nxml-mode)
- (require 'rng-valid)
- (require 'rngalt))
-
-(setq debug-on-error t)
-
-(defvar nxhtmltest-ert-default-selector "nxhtml-ert-"
- "Set this to run a single test with `nxhtmltest-run-Q'.")
-
-(defvar nxhtmltest-bin
- (file-name-directory (if load-file-name load-file-name buffer-file-name)))
-
-(pushnew nxhtmltest-bin load-path)
-(require 'nxhtmltest-helpers)
-;;(require 'ert)
-
-(defvar nxhtmltest-files-root
- (let* ((this-dir nxhtmltest-bin)
- (root (expand-file-name "in/" this-dir)))
- (unless (file-accessible-directory-p root)
- (error (if (file-exists-p root)
- "Can't read files in test directory %s"
- "Can't find test directory %s")
- root))
- root))
-
-(let ((distr-in "c:/EmacsW32/nxhtml/tests/in/"))
- (when (file-directory-p distr-in)
- (setq nxhtmltest-files-root distr-in)))
-
-;; (setq nxhtmltest-update-method
-;; ;;'font-lock-wait
-;; 'font-lock-run-timers
-;; ;;'font-lock-fontify-buffer
-;; )
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Define tests using ert.el
-
-(ert-deftest nxhtml-ert-bug531328 ()
- "Test of eRuby chunks with nothing between."
- (ert-with-temp-buffer-include-file "bug531328.rhtml"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
- (nxhtmltest-get-fontification-method)
- (nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(goto-char 12) t)
- (ert-should (eq major-mode 'ruby-mode))
- ))
-
-(ert-deftest nxhtml-ert-indent-bug-johan-2010-02-17()
- "Test of eRuby indentation.
-Got a bug report by mail on the emacs-on-rails list."
- (ert-with-temp-buffer-include-file "bug-johan-2010-02-17.erb"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
- (nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 1) (ert-should (= 0 (current-indentation)))
- (nxhtmltest-goto-line 2) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 3) (ert-should (= 0 (current-indentation)))
- ))
-
-(ert-deftest nxhtml-ert-indent-bug-johan-2010-02-12()
- "Test of eRuby indentation.
-Got a bug report by mail on the emacs-on-rails list."
- (ert-with-temp-buffer-include-file "bug-johan-2010-02-12.rhtml"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
- (nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 12) (ert-should (= 2 (current-indentation)))
- ))
-
-;;(setq nxhtmltest-ert-default-selector "nxhtml-ert-indent-rr-min8")
-(ert-deftest nxhtml-ert-indent-rr-min8 ()
- "Test of indentation bug.
-As per Richard Riley's bug report 2009-10-08. Last line gave an
-error."
- (ert-with-temp-buffer-include-file "rr-min8.php"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
- (nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)))
-
-;;(setq nxhtmltest-ert-default-selector "nxhtml-ert-bug-400415")
-(ert-deftest nxhtml-ert-bug-400415-foo2 ()
- "Test for changes before in-here-doc using 400415.
-See URL `https://bugs.launchpad.net/nxhtml/+bug/400415'. This is
-not the bug reported there however."
- (ert-with-temp-buffer-include-file "bug400415-foo2.php"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
- (nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(goto-char 74) t)
- (ert-should (eq major-mode 'sql-mode))
- (ert-simulate-command '(goto-char 23) t)
- (ert-simulate-command '(backward-delete-char-untabify 1) t)
- (ert-simulate-command '(goto-char 74) t)
- (ert-should (eq major-mode 'sql-mode))
- ))
-
-(ert-deftest nxhtml-ert-bug-300946-index ()
- "Test for bug 300946 in Launchpad.
-See URL `https://bugs.launchpad.net/nxhtml/+bug/300946'. This is
-a test for the file attached by Chris on 2008-12-02."
- (ert-with-temp-buffer-include-file "bug-300946-index.html"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
- (font-lock-mode 1)
- ))
-
-(ert-deftest nxhtml-ert-indent-bug290364 ()
- "Test for bug 290364 in Launchpad.
-See URL `https://bugs.launchpad.net/nxhtml/+bug/290364'.
-
-Note: If this test fails Emacs loops. Therefore the whole test
-is included in a when clause so you can avoid it easily."
- ;;(when t
- (ert-with-temp-buffer-include-file "bug-290364.php"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
- (font-lock-mode 1)
- ))
-;)
-
-(ert-deftest nxhtml-ert-indent-bug271497 ()
- "Test for bug 271497 in Launchpad.
-This is a bug in Emacs 22. It should work in Emacs 23 though.
-See URL `https://bugs.launchpad.net/nxhtml/+bug/271497'."
- (ert-with-temp-buffer-include-file "bug271497.txt"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (load-file (ert-get-test-file-name "bug271497.el"))
- (ert-simulate-command '(bug271497-mumamo) t)
- ;;(font-lock-mode 1)
- (nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(goto-char 42) t)
- (message "after goto-char 42")
- (let ((ac42 after-change-functions)
- ac88)
- (ert-simulate-command '(goto-char 88) t)
- (message "after goto-char 88")
- (setq ac88 after-change-functions)
- (ert-should (not (equal ac88 ac42))))))
-
-(ert-deftest nxhtml-ert-indent-question43320 ()
- "Test for question 43320 in Launchpad.
-See URL `https://answers.launchpad.net/nxhtml/+question/43320'.
-
-Note: This fails in Emacs 22, but should work in Emacs 23."
-;; I did see some problem here:
-
-;; - nXhtml 081222 + unpatched Emacs 081219 => ok
-;; - nXhtml 081222 + unpatched Emacs 081124 => ok
-;; - nXhtml 081222 + patched Emacs 081219 => ok
-
-;; - nXhtml 081222 + patched Emacs 081124 => ok, but it fails if I
-;; use `nxhtmltest-run-Q'! I e, it fails if the autostart.el from
-;; the nxhtml dir in 081222 is used - but not if the copy in
-;; c:/EmacsW32 is used??? Which turned out to be if the old
-;; php-mode was used ...
-
- (ert-with-temp-buffer-include-file "question43320.html"
- (add-hook 'ert-simulate-command-post-hook
- 'nxhtmltest-should-no-mumamo-errors
- nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
- (font-lock-mode 1)
- (nxhtmltest-goto-line 25) (ert-should (/= 14 (current-indentation)))
- (put 'mumamo-submode-indent-offset-0 'permanent-local t)
- (put 'mumamo-submode-indent-offset 'permanent-local t)
- ;;
- ;;(set (make-local-variable 'mumamo-submode-indent-offset-0) nil)
- (set (make-local-variable 'mumamo-submode-indent-offset-0) 0)
- (set (make-local-variable 'mumamo-submode-indent-offset) nil)
- ;;(set (make-local-variable 'mumamo-submode-indent-offset) 2)
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 8) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 9) (ert-should (= 0 (current-indentation)))
- (nxhtmltest-goto-line 15) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 16) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 22) (ert-should (= 6 (current-indentation)))
- (nxhtmltest-goto-line 25) (ert-should (= 4 (current-indentation)))
- (nxhtmltest-goto-line 8) (indent-line-to 0)
- ;;(message "before indent-for-tab-command")
- (ert-simulate-command '(indent-for-tab-command) t)
- ;;(message "after indent-for-tab-command")
- (ert-should (= 8 (current-indentation)))
- ;;
- (set (make-local-variable 'mumamo-submode-indent-offset-0) 0)
- (set (make-local-variable 'mumamo-submode-indent-offset) 2)
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 8) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 9) (ert-should (= 10 (current-indentation)))
- (nxhtmltest-goto-line 15) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 16) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 22) (ert-should (= 16 (current-indentation)))
- (nxhtmltest-goto-line 25) (ert-should (= 14 (current-indentation)))
- ))
-
-(ert-deftest nxhtml-ert-only-php-no-end ()
- "Check for nXml error."
- (ert-with-temp-buffer-include-file "no-php-end-4.php"
- (nxhtml-mumamo-mode)
- (run-hooks 'after-change-major-mode-hook)
- (run-hooks 'post-command-hook)
- (nxhtmltest-fontify-default-way 2 "trans")
- (rng-validate-mode 1)
- ;;(rngalt-validate)
- (ert-should (eq rng-validate-mode t))
- (nxhtmltest-should-no-mumamo-errors)
- (nxhtmltest-should-no-nxml-errors)
- (goto-char 324)
- (message "before insert, after-change-functions local=%s" after-change-functions)
- (insert "\n")
- (nxhtmltest-should-no-mumamo-errors)
- (nxhtmltest-should-no-nxml-errors)))
-
-(ert-deftest nxhtml-ert-xhtml-1.0-transitional ()
- "Test XHTML 1.0 Transitional with `nxhtml-mumamo-mode'.
-NOTICE: This test SHOULD FAIL because there is currently no rng
-schema for transitional. The schema for strict is used instead
-and the file is invalid then."
- (ert-with-temp-buffer-include-file "lg-080813-label.html"
- (nxhtml-mumamo-mode)
- (nxhtmltest-fontify-default-way 2 "trans")
- (rng-validate-mode 1)
- (rngalt-validate)
- (ert-should (eq rng-validate-mode t))
- (nxhtmltest-should-no-mumamo-errors)
-;;; (ert-should
-;;; (not (eq (get-char-property 398 'category)
-;;; 'rng-error)))
- (ert-should
- (eq (get-text-property 398 'face)
- 'font-lock-function-name-face))
- (ert-should-not
- (= 0 rng-error-count))
- ))
-
-(ert-deftest nxhtml-ert-genshi-valid-in-genshi ()
- (ert-with-temp-buffer-include-file "genshi-auto-mode.html"
- (message "\n")
- (genshi-nxhtml-mumamo-mode)
- (font-lock-mode 1)
- (mumamo-post-command)
- (ert-should (eq font-lock-mode t))
- (ert-should (eq major-mode 'nxhtml-genshi-mode))
- (ert-should
- (memq mumamo-multi-major-mode '(genshi-nxhtml-mumamo-mode
- genshi-html-mumamo-mode)))
- (nxhtmltest-fontify-default-way 2 "sheit")
- (rng-validate-mode 1)
- (rngalt-validate)
- (ert-should (eq rng-validate-mode t))
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (= 0 rng-error-count))))
-
-(ert-deftest nxhtml-ert-genshi-invalid-in-nxhtml ()
- (ert-with-temp-buffer-include-file "genshi-auto-mode.html"
- (message "\n")
- (nxhtml-mumamo-mode)
- (nxhtmltest-fontify-default-way 2 "sheit")
- (font-lock-mode 1)
- (mumamo-post-command)
- (rng-validate-mode 1)
- (rngalt-validate)
- (ert-should (eq rng-validate-mode t))
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (= 2 rng-error-count))))
-
-(ert-deftest nxhtml-ert-genshi-magic-mode ()
- "Test if genshi file is recognized."
- (let ((file1 (ert-get-test-file-name "genshi-auto-mode.html"))
- buf1)
- ;; Ensure we open the files
- (setq buf1 (find-buffer-visiting file1))
- (when buf1 (kill-buffer buf1))
- ;; Open file 1
- (setq buf1 (find-file file1))
- (nxhtmltest-fontify-default-way 2 "mod")
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (with-current-buffer buf1
- (memq mumamo-multi-major-mode '(genshi-nxhtml-mumamo-mode
- genshi-html-mumamo-mode))))
- (kill-buffer buf1)))
-
-(ert-deftest nxhtml-ert-genshi-auto-mode ()
- "Test if file extension .ghtml is recognized."
- (let ((file1 (ert-get-test-file-name "genshi-HelloWorldPage.ghtml"))
- buf1)
- ;; Ensure we open the files
- (setq buf1 (find-buffer-visiting file1))
- (when buf1 (kill-buffer buf1))
- ;; Open file 1
- (setq buf1 (find-file file1))
- (nxhtmltest-fontify-default-way 2 "mod")
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (with-current-buffer buf1
- (memq mumamo-multi-major-mode '(genshi-nxhtml-mumamo-mode
- genshi-html-mumamo-mode))))
- (kill-buffer buf1)))
-
-(ert-deftest nxhtml-ert-opened-modified ()
- "Test if buffer get modified when opening a file."
- (let ((file1 (ert-get-test-file-name "cvd-080805-ac.php"))
- (file2 (ert-get-test-file-name "cvd-080805-cc.php"))
- buf1
- buf2)
- ;; Ensure we open the files
- (setq buf1 (find-buffer-visiting file1))
- (when buf1 (kill-buffer buf1))
- (setq buf2 (find-buffer-visiting file2))
- (when buf2 (kill-buffer buf2))
- ;; Open file 1
- (setq buf1 (find-file file1))
- (nxhtmltest-fontify-default-way 2 "mod")
- (nxhtmltest-should-no-mumamo-errors)
- ;; Open file 2
- (setq buf2 (find-file file2))
- (nxhtmltest-fontify-default-way 2 "mod")
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (not (or (buffer-modified-p buf1)
- (buffer-modified-p buf2))))
- (kill-buffer buf1)
- (kill-buffer buf2)))
-
-(ert-deftest nxhtml-ert-wiki-strange-hili-080629 ()
- "From a report on EmacsWiki."
- (ert-with-temp-buffer-include-file "wiki-strange-hili-080629.html"
- ;;(ert-should (not font-lock-mode))
- (nxhtml-mumamo-mode)
- ;;(ert-should (not font-lock-mode))
- (nxhtmltest-fontify-default-way 2 "hili")
- (goto-char 44)
- (nxhtmltest-should-no-mumamo-errors)
- (message "face at 44=%s" (get-text-property 44 'face))
- (ert-should
- (eq (get-text-property 44 'face)
- 'font-lock-function-name-face))))
-
-(ert-deftest nxhtml-ert-indent-wiki-080708-ind-problem ()
- (ert-with-temp-buffer-include-file "wiki-080708-ind-problem.rhtml"
- (require 'ruby-mode nil t)
- (if (not (featurep 'ruby-mode))
- ;; Fix-me: ert should maybe have some way to just display
- ;; informational messages?
- (error "ruby-mode not available, skipping test")
- ;;(ert-should (not font-lock-mode))
- (eruby-nxhtml-mumamo-mode)
- ;;(ert-should (not font-lock-mode))
- (nxhtmltest-fontify-default-way 2 "ind")
- (mark-whole-buffer)
- (indent-for-tab-command)
- (nxhtmltest-goto-line 3)
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should (= (current-indentation) 0)))))
-
-(ert-deftest nxhtml-ert-indent-wiki-080708-ind-problem-a ()
- "From a report on EmacsWiki.
-NOTICE: This SHOULD FAIL. There is currently no support for the
-kind of indentation needed here.
-
-Notice 2: For some reason I sometimes get the error overlayp, nil
-here."
- (ert-with-temp-buffer-include-file "wiki-080708-ind-problem.rhtml"
- (require 'ruby-mode nil t)
- (if (not (featurep 'ruby-mode))
- (error "ruby-mode not available, skipping test")
- ;;(ert-should (not font-lock-mode))
- (eruby-nxhtml-mumamo-mode)
- ;;(ert-should (not font-lock-mode))
- (nxhtmltest-fontify-default-way 2 "ind")
- (insert " ")
- (mark-whole-buffer)
- (indent-for-tab-command)
- (nxhtmltest-goto-line 3)
- ;; Test
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should-not (= (current-indentation) 2)))))
-
-(ert-deftest nxhtml-ert-sheit-2007-12-26 ()
- (ert-with-temp-buffer-include-file "sheit-2007-12-26.php"
- ;;(ert-should (not font-lock-mode))
- (nxhtml-mumamo-mode)
- ;;(ert-should (not font-lock-mode))
- (nxhtmltest-fontify-default-way 2 "sheit")
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (and
- (eq (get-text-property 21 'face)
- 'font-lock-comment-face)
- (eq (get-text-property 22 'face)
- 'font-lock-comment-face)
- (eq (get-text-property 35 'face)
- 'font-lock-comment-face)))))
-
-
-;; Now some tests with a big file. Jumping backwards can fail.
-
-(defun nxhtml-ert-nxhtml-changes-jump-back-2 (pos)
- ;;(ert-should (not font-lock-mode))
- (nxhtml-mumamo-mode)
- (run-hooks 'post-command-hook)
- ;;(ert-should (not font-lock-mode))
- (goto-char (- (point-max) (- 64036 63869)))
- (nxhtmltest-fontify-default-way 2)
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (eq (get-text-property (point) 'face)
- 'font-lock-variable-name-face))
- (message "here 1")
- (goto-char pos)
- (nxhtmltest-fontify-default-way 2)
- (nxhtmltest-should-no-mumamo-errors)
- (message "here 2")
- (ert-should
- (eq (get-text-property (point) 'face)
- 'font-lock-function-name-face)))
-
-;; Fix-me: forgot to copy nxhtml-changes.html. I can't find any
-;; similar error now.
-;;
-;; (ert-deftest nxhtml-ert-nxhtml-changes-jump-back-7014-2 ()
-;; "this is a docstring.
-;; wonder how that works now ..."
-;; (ert-with-temp-buffer-include-file "../../nxhtml/doc/nxhtml-changes.html"
-;; (nxhtml-ert-nxhtml-changes-jump-back-2 7014)))
-
-;; (ert-deftest nxhtml-ert-nxhtml-changes-jump-back-10488-2 ()
-;; (ert-with-temp-buffer-include-file "../../nxhtml/doc/nxhtml-changes.html"
-;; (nxhtml-ert-nxhtml-changes-jump-back-2 10488)))
-
-;; (ert-deftest nxhtml-ert-nxhtml-changes-jump-2 ()
-;; (ert-with-temp-buffer-include-file "../../nxhtml/doc/nxhtml-changes.html"
-;; ;;(ert-should (not font-lock-mode))
-;; (nxhtml-mumamo-mode)
-;; ;;(ert-should (not font-lock-mode))
-;; (goto-char 10420)
-;; (nxhtmltest-fontify-default-way 2 "jump-2")
-;; (nxhtmltest-should-no-mumamo-errors)
-;; (ert-should
-;; (eq (get-text-property (point) 'face)
-;; 'font-lock-variable-name-face))))
-
-;;; Indentation tests
-
-(ert-deftest nxhtml-ert-php-indent-bug-1 ()
- "Test indentation in php only file.
-The indentation on line 7 should be 0."
- (ert-with-temp-buffer-include-file "only-php.php"
- (nxhtml-mumamo-mode)
- ;; No fontification needed for indentation.
- (nxhtmltest-goto-line 7)
- (indent-for-tab-command)
- (nxhtmltest-should-no-mumamo-errors)
- (ert-should
- (= 0
- (current-indentation)))))
-
-;;; Scroll tests
-
-;; (ert-deftest nxhtml-ert-scroll-jump-test ()
-;; "Test if `scroll-conservatively' eq 1 works."
-;; (ert-with-temp-buffer-include-file "../../nxhtml/doc/nxhtml-changes.html"
-;; (ert-should (not font-lock-mode))
-;; (nxhtml-mumamo-mode)
-;; (ert-should (not font-lock-mode))
-;; (nxhtmltest-fontify-default-way 2 "jump-2")
-;; (let ((scroll-conservatively 1)
-;; (ws (list (window-start)))
-;; (xi (loop for ii from 1 to 100 by 1
-;; do
-;; (next-line)
-;; (sit-for 0.01)
-;; collect (list (window-start)
-;; (let ((here (point)))
-;; (goto-char (window-start))
-;; (prog1 (line-end-position)
-;; (goto-char here)))
-;; (point))
-;; ))
-;; (jumps 0)
-;; prev-win-start
-;; prev-win-start-le
-;; )
-;; (loop for xx in xi
-;; do
-;; (message "xx=%s" xx)
-;; (let ((win-start (nth 0 xx))
-;; (win-start-le (nth 1 xx))
-;; (cur-point (nth 2 xx)))
-;; (unless (or (not prev-win-start)
-;; (= prev-win-start win-start)
-;; (= (1+ prev-win-start-le) win-start))
-;; (setq jumps (1+ jumps)))
-;; (setq prev-win-start win-start)
-;; (setq prev-win-start-le win-start-le)
-;; )
-;; )
-;; (ert-should (= 0 jumps))
-;; )))
-
-;;(defvar ert-error-on-test-redefinition nil)
-
-;;; End of test definitions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun nxhtmltest-run-ert (selector)
- "Run test with ert library."
- (unless selector (setq selector nxhtmltest-ert-default-selector))
- (setq ert-test-files-root nxhtmltest-files-root)
- (if noninteractive
- (ert-run-tests-batch selector)
- (ert-kill-temp-test-buffers)
- (ert-run-tests-interactively selector)
- (other-window 1)
- (ert-list-temp-test-buffers)))
-
-;;;###autoload
-(defun nxhtmltest-run-indent ()
- "Run indentation tests."
- (interactive)
- (setq ert-test-files-root nxhtmltest-files-root)
- (let ((selector "nxhtml-ert-indent-"))
- (ert-kill-temp-test-buffers)
- (nxhtmltest-get-fontification-method)
- (ert-run-tests-interactively selector))
- (other-window 1)
- (ert-list-temp-test-buffers))
-
-;;;###autoload
-(defun nxhtmltest-run ()
- "Run all tests defined for nXhtml.
-Currently there are only tests using ert.el defined.
-
-Note that it is currently expected that the following tests will
-fail (they corresponds to known errors in nXhtml/Emacs):
-
- `nxhtml-ert-nxhtml-changes-jump-back-10549'
- `nxhtml-ert-nxhtml-changes-jump-back-7014'
-"
- (interactive)
- (setq message-log-max t)
- (when (called-interactively-p)
- (nxhtmltest-get-fontification-method))
- (nxhtmltest-run-ert nil))
-
-(when (getenv "nxhtmltest-run-Q")
- (nxhtmltest-run))
-
-(provide 'nxhtmltest-suites)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; nxhtmltest-suites.el ends here
diff --git a/emacs.d/nxhtml/util/anchored-transpose.el b/emacs.d/nxhtml/util/anchored-transpose.el
deleted file mode 100644
index 3a5464c..0000000
--- a/emacs.d/nxhtml/util/anchored-transpose.el
+++ /dev/null
@@ -1,305 +0,0 @@
-;;; anchored-transpose.el --- Transposes a phrase around an anchor phrase
-
-;; Copyright (C) 2004 Free Software Foundation, Inc.
-
-;; Author: Rick Bielawski <rbielaws@i1.net>
-;; Keywords: tools convenience
-
-;; This file is free software; you can redistribute it and/or modify it under
-;; the terms of the GNU General Public License as published by the Free
-;; Software Foundation; either version 2, or (at your option) any later
-;; version.
-
-;; This file is distributed in the hope that it will be useful, but WITHOUT
-;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-;; more details.
-
-;;; Commentary:
-
-;; `anchored-transpose' is an interactive autoload function to transpose
-;; portions of a region around an anchor phrase. In other words it swaps
-;; two regions.
-;;
-;; See C-h f anchored-transpose <ret> for a complete description.
-
-;;; Installing:
-
-;; 1) Put anchored-transpose.el on your load path.
-;; 2) Put the following 2 lines in your .emacs
-;; (global-set-key [?\C-x ?t] 'anchored-transpose) ;; Just a suggestion...
-;; (autoload 'anchored-transpose "anchored-transpose" nil t)
-
-;;; History:
-
-;; 2004-09-24 RGB Seems useable enough to release.
-;; 2004-10-15 RGB Only comments and doc strings were updated.
-;; 2004-10-22 RGB Added support for 2 phrase selection.
-;; 2004-12-01 RGB Added secondary selection support.
-;; 2005-07-21 RGB Updated help text and comments.
-;; Added support for A C B D and C A D B selection.
-;; Fixed bug affecting multi line selections.
-;; 2005-09-28 RGB Allow swapping regions with no anchor text between.
-
-;; Changes by Lennart Borgman
-;; 2009-11-25 LB Set and clear secondary selection from keyboard.
-;; Always use secondary selection.
-;; Keep selections right after swapping.
-;; Clear them if not used again.
-;; Swap between buffers.
-;; Check for read-only.
-;; Probably broke something... ;-)
-
-;;; Code:
-
-(defvar anchored-transpose-anchor ()
- "begin/end when `anchored-transpose' is in progress else nil")
-
-;;;###autoload
-(defun anchored-transpose (beg1 end1 flg1 &optional beg2 end2 flg2 win2)
- "Transpose portions of the region around an anchor phrase.
-
-`this phrase but not that word' can be transposed into
-`that word but not this phrase'
-
-I want this phrase but not that word.
- |----------------------------|. .This is the entire phrase.
- |-------|. . . . . . .This is the anchor phrase.
-
-First select the entire phrase and type \\[anchored-transpose].
-This set the secondary selection.
-
-Then select the anchor phrase and type \\[anchored-transpose]
-again. Alternatively you can do the selections like this:
-
-I want this phrase but not that word.
- |----------| |---------| Separate phrase selection.
-
-By default the anchor phrase will automatically include
-any surrounding whitespace even if you don't explicitly select
-it. Also, it won't include certain trailing punctuation. See
-`anchored-transpose-do-fuzzy' for details. A prefix arg prior to
-either selection means `no fuzzy logic, use selections
-literally'.
-
-You can select the regions to be swapped separately in any
-order.
-
-After swapping both primary and secondary selection are still
-active. They will be canceled after second next command if you
-do not swap regions again. \(Second because this allow you to
-adjust the regions and try again.)
-
-You can also swap text between different buffers this way.
-
-Typing \\[anchored-transpose] with nothing selected clears any
-prior selection, ie secondary selection."
- (interactive `(,(region-beginning) ,(region-end)
- ,current-prefix-arg
- ,@anchored-transpose-anchor))
- (setq anchored-transpose-anchor nil)
- (when (and mouse-secondary-overlay
- mark-active
- (overlay-buffer mouse-secondary-overlay)
- (/= (overlay-start mouse-secondary-overlay)
- (overlay-end mouse-secondary-overlay)))
- (if (eq (overlay-buffer mouse-secondary-overlay) (current-buffer))
- (progn
- (setq beg2 (overlay-start mouse-secondary-overlay))
- (setq end2 (overlay-end mouse-secondary-overlay))
- (setq flg2 flg1)
- (delete-overlay mouse-secondary-overlay))
- (let* ((sec-buf (overlay-buffer mouse-secondary-overlay))
- (sec-win (get-buffer-window sec-buf))
- (sec-new nil))
- (unless sec-win
- (setq sec-new t)
- (setq sec-win (split-window)))
- (with-selected-window sec-win
- (set-window-buffer (selected-window) sec-buf)
- (goto-char (overlay-start mouse-secondary-overlay)))
- (if (not (y-or-n-p "Swap between buffers "))
- (when sec-new (delete-window sec-win))
- (setq beg2 (overlay-start mouse-secondary-overlay))
- (setq end2 (overlay-end mouse-secondary-overlay))
- (setq flg2 flg1)
- (setq win2 sec-win)))))
- (setq win2 (or win2 (selected-window)))
- (if mark-active
- (if end2 ; then both regions are marked. swap them.
- (if (not (eq win2 (selected-window)))
- (anchored-transpose-swap beg1 end1 beg2 end2 win2)
- (if (and (< beg1 beg2) ;A C B D
- (< end1 end2)
- (> end1 beg2))
- (apply 'anchored-transpose-swap
- (anchored-transpose-do-fuzzy
- beg1 beg2 end1 end2 flg1 flg2 flg1 flg2))
- (if (and (> beg1 beg2) ;C A D B
- (> end1 end2)
- (> end2 beg1))
- (apply 'anchored-transpose-swap
- (anchored-transpose-do-fuzzy
- beg2 beg1 end2 end1 flg2 flg1 flg2 flg1))
- (if (and (< beg1 beg2) ;A C D B
- (> end1 end2))
- (apply 'anchored-transpose-swap
- (anchored-transpose-do-fuzzy
- beg1 beg2 end2 end1 flg1 flg2 flg2 flg1))
- (if (and (> beg1 beg2) ;C A B D
- (< end1 end2))
- (apply 'anchored-transpose-swap
- (anchored-transpose-do-fuzzy
- beg2 beg1 end1 end2 flg2 flg1 flg1 flg2))
- (if (<= end1 beg2) ;A B C D
- (apply 'anchored-transpose-swap
- (anchored-transpose-do-fuzzy
- beg1 end1 beg2 end2 flg1 flg1 flg2 flg2))
- (if (<= end2 beg1) ;C D A B
- (apply 'anchored-transpose-swap
- (anchored-transpose-do-fuzzy
- beg2 end2 beg1 end1 flg2 flg2 flg1 flg1))
- (error "Regions have invalid overlap"))))))))
- ;; 1st of 2 regions. Save it and wait for the other.
- ;;(setq anchored-transpose-anchor (list beg1 end1 flg1))
- (if (or buffer-read-only
- (get-char-property beg1 'read-only)
- (get-char-property end1 'read-only))
- ;; Fix-me: move test, clean up a bit.
- (message "Buffer text is readonly")
- (set-secondary-selection beg1 end1)
- (setq deactivate-mark t)
- (message "%s" (this-command-keys))
- (message (propertize "Transpose: Select second region and call again - (without selection to cancel)"
- 'face 'secondary-selection))))
- (if (and mouse-secondary-overlay
- (overlay-buffer mouse-secondary-overlay))
- (progn
- (cancel-secondary-selection)
- (message (propertize "Canceled secondary selection" 'face
- 'highlight)))
- (message (propertize "Command requires a marked region" 'face
- 'highlight)))))
-
-;;;###autoload
-(defun set-secondary-selection (beg end)
- "Set the secondary selection to the current region.
-This must be bound to a mouse drag event."
- (interactive "r")
- (move-overlay mouse-secondary-overlay beg end (current-buffer))
- (when (called-interactively-p 'interactive)
- ;;(deactivate-mark)
- )
- (x-set-selection
- 'SECONDARY
- (buffer-substring (overlay-start mouse-secondary-overlay)
- (overlay-end mouse-secondary-overlay))))
-
-;;;###autoload
-(defun cancel-secondary-selection ()
- (interactive)
- (delete-overlay mouse-secondary-overlay)
- (x-set-selection 'SECONDARY nil))
-
-(defun anchored-transpose-do-fuzzy (r1beg r1end r2beg r2end
- lit1 lit2 lit3 lit4)
- "Returns the first 4 arguments after adjusting their value if necessary.
-
-I want this phrase but not that word.
- |----------------------------|. .This is the entire phrase.
- |-------|. . . . . . .This is the anchor phrase.
- R1BEG R1END R2BEG R2END
-
-R1BEG and R1END define the first region and R2BEG and R2END the second.
-
-The flags, LIT1 thru LIT4 indicate if fuzzy logic should be applied to the
-beginning of R1BEG, the end of R1END, the beginning of R2BEG, the end of R2END
-respectively. If any flag is nil then fuzzy logic will be applied. Otherwise
-the value passed should be returned LITerally (that is, unchanged).
-
-See `anchored-transpose-fuzzy-begin' and `anchored-transpose-fuzzy-end' for
-specifics on what adjustments these routines will make when LITx is nil."
- (list
- (if lit1 r1beg
- (anchored-transpose-fuzzy-begin r1beg r1end "[\t ]+"))
- (if lit2 r1end
- (anchored-transpose-fuzzy-end r1beg r1end "\\s +"))
- (if lit3 r2beg
- (anchored-transpose-fuzzy-begin r2beg r2end "[\t ]+"))
- (if lit4 r2end
- (anchored-transpose-fuzzy-end r2beg r2end "\\s *[.!?]"))
- nil))
-
-(defun anchored-transpose-fuzzy-end (beg end what)
- "Returns END or new value for END based on the regexp WHAT.
-BEG and END are buffer positions defining a region. If that region ends
-with WHAT then the value for END is adjusted to exclude that matching text.
-
-NOTE: The regexp is applied differently than `looking-back' applies a regexp.
-
-Example: if (buffer-string beg end) contains `1234' the regexp `432' matches
-it, not `234' as `looking-back' would. Also, your regexp never sees the char
-at BEG so the match will always leave at least 1 character to transpose.
-The reason for not using looking-back is that it's not greedy enough.
-\(looking-back \" +\") will only match one space no matter how many exist."
- (let ((str (concat
- (reverse (append (buffer-substring (1+ beg) end) nil)))))
- (if (string-match (concat "`" what) str)
- (- end (length (match-string 0 str)))
- end)))
-
-(defun anchored-transpose-fuzzy-begin (beg end what)
- "Returns BEG or a new value for BEG based on the regexp WHAT.
-BEG and END are buffer positions defining a region. If the region begins
-with WHAT then BEG is adjusted to exclude the matching text.
-
-NOTE: Your regexp never sees the last char defined by beg/end. This insures
-at least 1 char is always left to transpose."
- (let ((str (buffer-substring beg (1- end))))
- (if (string-match (concat "`" what) str)
- (+ beg (length (match-string 0 str)))
- beg)))
-
-(defun anchored-transpose-swap (r1beg r1end r2beg r2end win2)
- "Swaps region r1beg/r1end with r2beg/r2end. Flags are currently ignored.
-Point is left at r1end."
- (let ((reg1 (buffer-substring r1beg r1end))
- (reg2 nil)
- (old-buffer (current-buffer)))
- (when win2
- (unless (eq (selected-window) win2)
- (select-window win2)
- (set-buffer (window-buffer (selected-window)))))
- (setq reg2 (delete-and-extract-region r2beg r2end))
- (goto-char r2beg)
- (let ((new-mark (point)))
- (insert reg1)
- (push-mark new-mark))
- ;; I want to leave point at the end of phrase 2 in current buffer.
- (save-excursion
- (with-current-buffer old-buffer
- (goto-char r1beg)
- (delete-region r1beg r1end)
- (let ((here (point)))
- (insert reg2)
- (set-secondary-selection here (point)))))
- (setq deactivate-mark nil)
- (when (eq old-buffer (current-buffer))
- (add-hook 'post-command-hook 'anchored-swap-post-command t t))))
-
-(defun anchored-swap-post-command ()
- (condition-case err
- (unless mark-active
- (cancel-secondary-selection)
- (remove-hook 'post-command-hook 'anchored-swap-post-command t))
- (error (message "anchored-swap-post-command: %s" err))))
-
-(provide 'anchored-transpose)
-
-;; Because I like it this way. So there!
-;;; fill-column:78 ***
-;;; emacs-lisp-docstring-fill-column:78 ***
-;;;
-;;; Local Variables: ***
-;;; End: ***
-;;; anchored-transpose.el ends here.
diff --git a/emacs.d/nxhtml/util/appmenu-fold.el b/emacs.d/nxhtml/util/appmenu-fold.el
deleted file mode 100644
index 938ab92..0000000
--- a/emacs.d/nxhtml/util/appmenu-fold.el
+++ /dev/null
@@ -1,79 +0,0 @@
-;;; appmenu-fold.el --- Support form fold-dwim in AppMenu
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Wed Jan 11 21:48:02 2006
-(defconst appmenu-fold:version "0.51") ;; Version:
-;; Last-Updated: Mon Jan 15 03:10:59 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'fold-dwim nil t)
-(eval-when-compile (require 'appmenu))
-
-(when (featurep 'fold-dwim)
-
- (defun appmenu-fold-no-hs-minor-mode ()
- t)
- (defun appmenu-fold-no-outline-minor-mode ()
- t)
- (defun appmenu-fold-setup ()
- "Adds some tweaks for using fold-dwim in AppMenu."
- (let ((fd-map (make-sparse-keymap)))
- (define-key fd-map [fold-dwim-toggle]
- (list 'menu-item "Fold Dwin Toggle" 'fold-dwim-toggle))
- (define-key fd-map [fold-dwim-hide-all]
- (list 'menu-item "Fold Dwin Hide All" 'fold-dwim-hide-all))
- (define-key fd-map [fold-dwim-show-all]
- (list 'menu-item "Fold Dwin Show All" 'fold-dwim-show-all))
- ;;(add-to-list 'appmenu-alist (cons t (cons "Folding" fd-map)))
- (appmenu-add 'appmenu-fold nil t "Folding" fd-map)
- )
-;;; (add-to-list 'appmenu-minor-modes-exclude
-;;; '(hs-minor-mode appmenu-fold-no-hs-minor-mode))
-;;; (add-to-list 'appmenu-minor-modes-exclude
-;;; '(outline-minor-mode appmenu-fold-no-outline-minor-mode)))
- )
- )
-
-(provide 'appmenu-fold)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; appmenu-fold.el ends here
diff --git a/emacs.d/nxhtml/util/appmenu.el b/emacs.d/nxhtml/util/appmenu.el
deleted file mode 100644
index 1f060ef..0000000
--- a/emacs.d/nxhtml/util/appmenu.el
+++ /dev/null
@@ -1,523 +0,0 @@
-;;; appmenu.el --- A framework for [apps] popup menus.
-
-;; Copyright (C) 2008 by Lennart Borgman
-
-;; Author: Lennart Borgman <lennart DOT borgman AT gmail DOT com>
-;; Created: Thu Jan 05 14:00:26 2006
-(defconst appmenu:version "0.63") ;; Version:
-;; Last-Updated: 2010-01-04 Mon
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; appmenu.el is a framework for creating cooperative context
-;; sensitive popup menus with commands from different major and minor
-;; modes. For more information see `appmenu-mode'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; Version 0.61:
-;; - Remove support for minor and major menus.
-;; - Add support for text and overlay keymaps.
-;; - Add customization options.
-;;
-;; Version 0.62:
-;; - Fix problem with keymap at point.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'flyspell))
-(eval-when-compile (require 'help-mode))
-(eval-when-compile (require 'ourcomments-util nil t))
-(eval-when-compile (require 'mumamo nil t))
-;;(eval-when-compile (require 'mlinks nil t))
-
-;;;###autoload
-(defgroup appmenu nil
- "Customization group for `appmenu-mode'."
- :group 'convenience)
-
-(defcustom appmenu-show-help nil
- "Non-nil means show AppMenu help on AppMenu popup."
- :type 'boolean
- :group 'appmenu)
-
-(defcustom appmenu-show-point-menu t
- "If non-nil show entries fetched from keymaps at point."
- :type 'boolean
- :group 'appmenu)
-
-(defvar appmenu-alist nil
- "List of additional menu keymaps.
-To change this list use `appmenu-add' and `appmenu-remove'.
-
-The entries in this list are lists:
-
- \(ID PRIORITY TEST TITLE DEFINITION)
-
-ID is a unique identity.
-
-PRIORITY is a number or a variable whose value is a number
-telling where to put this entry when showing the menu.
-
-TEST should be a form to evaluate. The entry is used if \(eval
-TEST) returns non-nil.
-
-DEFINITION should be either a keymap or a function that returns a
-keymap.
-
-The function must take no argument and return a keymap. If the
-function returns nil then the entry is not shown in the popup
-menu. Using this you can make context sensitive popup menus.
-
-For an example of use see mlinks.el.")
-
-(defun appmenu-sort-by-priority ()
- "Sort `appmenu-alist' entries by priority."
- (setq appmenu-alist
- (sort appmenu-alist
- (lambda (recA recB)
- (let ((priA (nth 1 recA))
- (priB (nth 1 recB)))
- (when (symbolp priA) (setq priA (symbol-value priA)))
- (when (symbolp priB) (setq priB (symbol-value priB)))
- (< priA priB))))))
-
-;;;###autoload
-(defun appmenu-add (id priority test title definition)
- "Add entry to `appmenu-alist'.
-Add an entry to this list with ID, PRIORITY, TEST, TITLE and
-DEFINITION as explained there."
- (assert (symbolp id))
- (unless priority (setq priority 100))
- (assert (numberp priority))
- (assert (stringp title))
- (let ((rec (list id priority test title definition)))
- (appmenu-remove id)
- (add-to-list 'appmenu-alist rec)))
-
-(defun appmenu-remove (id)
- "Remove entry with id ID from `appmenu-alist'."
- (setq appmenu-alist (assq-delete-all id appmenu-alist)))
-
-(defun appmenu-help ()
- "Show help for minor mode function `appmenu-mode'."
- (interactive)
- (describe-function 'appmenu-mode))
-
-(defun appmenu-keymap-len (map)
- "Return length of keymap MAP."
- (let ((ml 0))
- (map-keymap (lambda (e f) (setq ml (1+ ml))) map)
- ml))
-
-(defvar appmenu-mouse-only
- '((flyspell-correct-word appmenu-flyspell-correct-word-before-point)))
-
-(defun appmenu-flyspell-correct-word-before-point ()
- "Pop up a menu of possible corrections for misspelled word before point.
-Special version for AppMenu."
- (interactive)
- (flyspell-correct-word-before-point))
-
-(defcustom appmenu-at-any-point '(ispell-word)
- "Commands that may work at any point in a buffer.
-Some important but not too often used commands that may be useful
-for most points in a buffer."
- :group 'appmenu)
-
-(defvar appmenu-map-fun) ;; dyn var, silence compiler
-
-(defun appmenu-make-menu-for-point (this-point)
- "Construct a menu based on point THIS-POINT.
-This includes some known commands for point and keymap at
-point."
- (let ((point-map (get-char-property this-point 'keymap))
- (funs appmenu-at-any-point)
- (map (make-sparse-keymap "At point"))
- (num 0)
- last-prefix
- this-prefix)
- ;; Known for any point
- (when point-map
- (let ((appmenu-map-fun
- (lambda (key fun)
- (if (keymapp fun)
- (map-keymap appmenu-map-fun fun)
- (when (and (symbolp fun)
- (fboundp fun))
- (let ((mouse-only (assq fun appmenu-mouse-only)))
- (when mouse-only
- (setq fun (cadr mouse-only)))
- (add-to-list 'funs fun)))))))
- (map-keymap appmenu-map-fun point-map)))
- (dolist (fun funs)
- (let ((desc (when fun (documentation fun))))
- (when desc
- (setq desc (car (split-string desc "[\n]")))
- ;;(lwarn t :warning "pk: %s, %s" fun desc)
- (setq this-prefix
- (car (split-string (symbol-name fun) "[-]")))
- (when (and last-prefix
- (not (string= last-prefix this-prefix)))
- (define-key map
- (vector (intern (format "appmenu-point-div-%s" num)))
- (list 'menu-item "--")))
- (setq last-prefix this-prefix)
- (setq num (1+ num))
- (define-key map
- (vector (intern (format "appmenu-point-%s" num)))
- (list 'menu-item desc fun)))))
- (when (> num 0) map)))
-
-(defvar appmenu-level) ;; dyn var
-(defvar appmenu-funs) ;; dyn var
-(defvar appmenu-events) ;; dyn var
-(defvar appmenu-this-point) ;; dyn var
-
-(defun appmenu-keymap-map-fun (ev def)
- (if (keymapp def)
- (progn
- (add-to-list 'appmenu-funs (list appmenu-level ev))
- (setq appmenu-events (cons ev appmenu-events))
- (setq appmenu-level (1+ appmenu-level))
-
- (map-keymap 'appmenu-keymap-map-fun def)
-
- (setq appmenu-events (cdr appmenu-events))
- (setq appmenu-level (1- appmenu-level)))
- (when (and (symbolp def)
- (fboundp def))
- (let* ((mouse-only (assq def appmenu-mouse-only))
- (fun (if mouse-only (cadr mouse-only) def))
- (doc (when fun
- (if (not (eq fun 'push-button))
- (documentation fun)
- (concat
- "Button: "
- (with-current-buffer (marker-buffer appmenu-this-point)
- (or (get-char-property appmenu-this-point 'help-echo)
- (let ((action-fun (get-char-property appmenu-this-point 'action)))
- (if action-fun
- (documentation action-fun)
- "No action, ignored"))
- "No documentation available")))))))
- (add-to-list 'appmenu-funs (list appmenu-level (cons ev appmenu-events) def doc))))))
-
-;;(appmenu-as-help (point))
-(defun appmenu-as-help (this-point)
- "Show keybindings specific done current point in buffer.
-This shows the binding in the help buffer.
-
-Tip: This may be helpful if you are using `css-color-mode'."
- (interactive (list (copy-marker (point))))
- ;; Split this for debugging
- (let ((menu-here
- (with-current-buffer (or (and (markerp this-point)
- (marker-buffer this-point))
- (current-buffer))
- (unless (markerp this-point) (setq this-point (copy-marker this-point)))
- (get-char-property this-point 'keymap))))
- ;;(describe-variable 'menu-here)
- (appmenu-as-help-1 menu-here this-point)))
-
-(defun appmenu-as-help-1 (menu-here this-point)
- (let ((appmenu-level 0)
- (appmenu-funs nil)
- (appmenu-events nil)
- (appmenu-this-point this-point))
- (when menu-here
- (map-keymap 'appmenu-keymap-map-fun menu-here))
- ;;(describe-variable 'appmenu-funs)
- ;; Fix-me: collect info first in case we are in help-buffer!
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'appmenu-as-help this-point) (interactive-p))
- (with-current-buffer (help-buffer)
- (let ((fmt " %s%15s %-30s\n"))
- (insert (propertize
- ;;"AppMenu: Keys found at point in buffer\n\n"
- (format "Appmenu: Key bindings specific to point %s in buffer %S\n\n"
- (+ 0 this-point)
- (when (markerp this-point)
- (buffer-name (marker-buffer this-point))))
- 'face 'font-lock-comment-face))
- (if (not menu-here)
- (insert "\n\nThere are no point specific key bindings there now.")
- (insert (propertize (format fmt "" "Key" "Function") 'face 'font-lock-function-name-face))
- (insert (propertize (format fmt "" "---" "--------") 'face 'font-lock-function-name-face))
- (dolist (rec appmenu-funs)
- (let* ((lev (nth 0 rec))
- (ev (nth 1 rec))
- (fun (nth 2 rec))
- (doc (nth 3 rec))
- (d1 (when doc (car (split-string doc "[\n]")))))
- (if fun
- (insert (format fmt
- "" ;;(concat "*" (make-string (* 4 lev) ?\ ))
- (key-description (reverse ev))
- d1)
- (if nil (format "(%s)" fun) ""))
- ;;(insert (format "something else=%S\n" rec))
- )))))))))
-
-
-(defun appmenu-map ()
- "Return menu keymap to use for popup menu."
- (let* ((map (make-sparse-keymap
- "AppMenu"
- ))
- (map-len (appmenu-keymap-len map))
- (map-init-len map-len)
- (num-minor 0)
- (id 0)
- (point-menu (when appmenu-show-point-menu
- (appmenu-make-menu-for-point (point)))))
- ;; AppMenu itself
- (when appmenu-show-help
- (define-key map [appmenu-customize]
- (list 'menu-item "Customize AppMenu"
- (lambda () (interactive) (customize-group 'appmenu))
- :help "Customize AppMenu"
- :visible 'appmenu-show-help))
- (define-key map [appmenu-help]
- (list 'menu-item "Help for AppMenu" 'appmenu-help
- :help "Help for how to use AppMenu"
- :visible 'appmenu-show-help))
- (define-key map [appmenu-separator-1]
- (list 'menu-item "--")))
- (setq map-len (appmenu-keymap-len map))
- (appmenu-sort-by-priority)
- (dolist (rec appmenu-alist)
- (let* ((test (nth 2 rec))
- (title (nth 3 rec))
- (mapdef (nth 4 rec))
- (usedef (if (symbolp mapdef)
- (funcall mapdef)
- mapdef)))
- (when (and usedef
- (eval test))
- (setq id (1+ id))
- (define-key map
- (vector (intern (format "appmenu-%s" id)))
- (list 'menu-item title usedef)))
- ))
- (when point-menu
- (setq map-len (appmenu-keymap-len map))
- (when (> map-len map-init-len)
- (define-key map [appmenu-at-point-div]
- (list 'menu-item "--")))
- (define-key map [appmenu-at-point]
- (list 'menu-item "Bound To Point"
- point-menu)))
- (setq map-len (appmenu-keymap-len map))
- (when (> map-len map-init-len)
- map)))
-
-;; (defun appmenu-get-submenu (menu-command)
-;; (let (subtitle submenumap)
-;; (if (eq 'menu-item (car menu-command))
-;; (progn (setq subtitle (cadr menu-command))
-;; (setq submenumap (caddr menu-command)))
-;; (setq subtitle (car menu-command))
-;; (setq submenumap (cdr menu-command)))
-;; (unless (keymapp submenumap) (error "Submenu not a keymap=%s" submenumap))
-;; (cons subtitle submenumap)))
-
-(defun appmenu-popup ()
- "Pops up the AppMenu menu."
- (interactive)
- (let* ((mod (event-modifiers last-input-event))
- (is-mouse (or (memq 'click mod)
- (memq 'down mod)
- (memq 'drag mod))))
- (when is-mouse
- (goto-char (posn-point (event-start last-input-event)))
- (sit-for 0.01))
- (let ((menu (appmenu-map)))
- (if menu
- (popup-menu-at-point menu)
- (message "Appmenu is empty")))))
-
-(defvar appmenu-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [apps] 'appmenu-popup)
- (define-key map [mouse-3] 'appmenu-popup)
- (define-key map [(control apps)] 'appmenu-as-help)
- map))
-
-
-;;(setq appmenu-auto-help 4)
-(defcustom appmenu-auto-help 2
- "Automatically show help on keymap at current point.
-This shows up after the number of seconds in this variable.
-If it it nil this feature is off.
-
-This feature is only on in `appmenu-mode'."
- :type '(choice (number :tag "Number of seconds to wait")
- (const :tag "Turned off" nil))
- :set (lambda (sym val)
- (set-default sym val)
- (if val
- (add-hook 'post-command-hook 'appmenu-auto-help-post-command nil t)
- (remove-hook 'post-command-hook 'appmenu-auto-help-post-command t)))
- :group 'appmenu)
-
-(defcustom appmenu-auto-match-keymaps
- '(css-color)
- "Keymaps listed here can be avoided."
- :type '(set (const unknown)
- (const mlink)
- (const css-color))
- :group 'appmenu)
-
-(defvar appmenu-auto-help-timer nil)
-
-(defun appmenu-dump-keymap (km)
- (let ((fun (lambda (ev def)
- (message "ev=%S def=%S" ev def)
- (when (keymapp def)
- (map-keymap fun def)))))
- (map-keymap fun km)))
-
-(defun appmenu-on-keymap (where)
- (setq where (or where (point)))
- (let* ((rec (get-char-property-and-overlay where 'keymap))
- (kmp (car rec))
- (ovl (cdr rec)))
- (when kmp
- (or (memq 'unknown appmenu-auto-match-keymaps)
- (and (memq 'css-color appmenu-auto-match-keymaps)
- (get-text-property where 'css-color-type))
- (and (memq 'mlinks appmenu-auto-match-keymaps)
- (boundp 'mlinks-point-hilighter-overlay)
- (eq ovl mlinks-point-hilighter-overlay))
- ))))
-
-(defsubst appmenu-auto-help-add-wcfg (at-point wcfg)
- (mumamo-with-buffer-prepared-for-jit-lock
- (add-text-properties at-point (1+ at-point)
- (list 'point-left 'appmenu-auto-help-maybe-remove
- 'appmenu-auto-help-wcfg wcfg))))
-
-(defsubst appmenu-auto-help-remove-wcfg (at-point)
- (mumamo-with-buffer-prepared-for-jit-lock
- (remove-list-of-text-properties at-point (1+ at-point)
- '(appmenu-auto-help-wcfg point-left))))
-
-(defun appmenu-auto-help-maybe-remove (at-point new-point)
- "Run in 'point-left property.
-Restores window configuration."
- (let ((old-wcfg (get-text-property at-point 'appmenu-auto-help-wcfg)))
- (appmenu-auto-help-remove-wcfg at-point)
- (if (appmenu-on-keymap new-point)
- (appmenu-auto-help-add-wcfg new-point old-wcfg)
- (if old-wcfg
- (set-window-configuration old-wcfg)
- (help-xref-go-back (help-buffer))))))
-
-(defun appmenu-as-help-in-timer (win buf)
- (condition-case err
- (when (and (eq (selected-window) win)
- (eq (current-buffer) buf)
- appmenu-auto-help
- (appmenu-on-keymap (point)))
- (let* ((old-help-win (get-buffer-window (help-buffer)))
- (wcfg (unless old-help-win
- (current-window-configuration))))
- (unless old-help-win
- (display-buffer (help-buffer)))
- (appmenu-auto-help-add-wcfg (point) wcfg)
- (appmenu-as-help (copy-marker (point)))))
- (error (message "appmenu-as-help-in-timer: %s" (error-message-string err)))))
-
-(defun appmenu-auto-help-cancel-timer ()
- (when (timerp appmenu-auto-help-timer)
- (cancel-timer appmenu-auto-help-timer))
- (setq appmenu-auto-help-timer nil))
-
-(defun appmenu-auto-help-post-command ()
- (when (fboundp 'appmenu-as-help)
- (condition-case err
- (appmenu-auto-help-post-command-1)
- (error (message "css-color-post-command: %s" (error-message-string err))))))
-
-;; #fff #c9ff33
-(defun appmenu-auto-help-post-command-1 ()
- (appmenu-auto-help-cancel-timer)
- (and appmenu-auto-help
- (appmenu-on-keymap (point))
- (not (get-text-property (point) 'appmenu-auto-help-wcfg))
- (setq appmenu-auto-help-timer
- (run-with-idle-timer appmenu-auto-help nil 'appmenu-as-help-in-timer
- (selected-window)
- (current-buffer)))))
-
-
-;;;###autoload
-(define-minor-mode appmenu-mode
- "Use a context sensitive popup menu.
-AppMenu (appmenu.el) is a framework for creating cooperative
-context sensitive popup menus with commands from different major
-and minor modes. Using this different modes may cooperate about
-the use of popup menus.
-
-There is also the command `appmenu-as-help' that shows the key
-bindings at current point in the help buffer.
-
-The popup menu and the help buffer version are on these keys:
-
-\\{appmenu-mode-map}
-
-The variable `appmenu-alist' is where the popup menu entries
-comes from.
-
-If there is a `keymap' property at point then relevant bindings
-from this is also shown in the popup menu.
-
-You can write functions that use whatever information you want in
-Emacs to construct these entries. Since this information is only
-collected when the popup menu is shown you do not have to care as
-much about computation time as for entries in the menu bar."
- :global t
- :keymap appmenu-mode-map
- :group 'appmenu
- (if appmenu-mode
- (add-hook 'post-command-hook 'appmenu-auto-help-post-command)
- (remove-hook 'post-command-hook 'appmenu-auto-help-post-command)))
-
-(when (and appmenu-mode
- (not (boundp 'define-globa-minor-mode-bug)))
- (appmenu-mode 1))
-
-(provide 'appmenu)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; appmenu.el ends here
diff --git a/emacs.d/nxhtml/util/as-external.el b/emacs.d/nxhtml/util/as-external.el
deleted file mode 100644
index b1330c1..0000000
--- a/emacs.d/nxhtml/util/as-external.el
+++ /dev/null
@@ -1,310 +0,0 @@
-;;; as-external.el --- Emacs as an external editor to other apps
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Mon Jun 25 19:02:49 2007
-(defconst as-external:version "0.6") ;;Version:
-;; Last-Updated: 2009-08-04 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This little library should make it easier to use Emacs as an
-;; external editor in certain cases. One such case is when want to
-;; use Emacs as the external editor with the Firefox add-on "It's All
-;; Text".
-;;
-;; See variable `as-external-mode' for more information.
-;;
-;;
-;;; A note on the implementation:
-;;
-;; You may wonder why this does not use `auto-mode-alist' since it
-;; checks the file name in nearly the same way? It is perhaps possible
-;; to use that, but there are two things to be aware of:
-;;
-;; 1. The choice made must override other possible choices.
-;;
-;; 2. Beside the file name the implementation here also checks if the
-;; buffer has clients waiting. That makes the check more reliable.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'html-write nil t))
-(eval-when-compile (require 'mlinks nil t))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'nxhtml-mode nil t))
-(eval-when-compile (require 'ourcomments-util nil t))
-(eval-when-compile (require 'pause nil t))
-(eval-when-compile (require 'server))
-(eval-when-compile (require 'wikipedia-mode nil t))
-(eval-and-compile (require 'wrap-to-fill nil t))
-
-;;;###autoload
-(defgroup as-external nil
- "Settings related to Emacs as external editor."
- :group 'nxhtml
- :group 'external)
-
-(defcustom as-external-its-all-text-regexp "/itsalltext/"
- "Regular expression matching It's All Text buffer's file."
- :type 'regexp
- :group 'as-external)
-
-(defcustom as-external-alist
- '(
- ("/itsalltext/.*wiki" as-external-for-wiki)
- ("/itsalltext/.*mail" as-external-for-mail-mode)
- ("/itsalltext/" as-external-for-xhtml)
- )
- "List to determine setup if Emacs is used as an external Editor.
-Element in this list should have the form
-
- \(FILE-REGEXP BUFFER-SETUP)
-
-where FILE-REGEXP should be a regular expression to match
-`buffer-file-name'. If it matches then BUFFER-SETUP should be
-called in the buffer.
-
-* Tip when using Firefox's add-on It's All Text: It looks like
- the file name used will be constructed from the host url. For
- example if your are editing something on
- http://www.emacswiki.org/ the file name may be something like
- 'www.emacswiki.org.283b1y212e.html'.
-
-
-The list is processed by `as-external-setup'. Note that the first
-match is used!
-
-The default entries in this list supports for Firefox addon It's
-All Text:
-
-- `as-external-for-xhtml'. For text areas on web pages where you
- can enter some XHTML code, for example blog comment fields.
-
-- `as-external-for-mail-mode', for editing web mail messages.
-
-- `as-external-for-wiki', for mediawiki.
-
-See also `as-external-mode'."
- :type '(repeat
- (list (choice (variable :tag "Regexp variable")
- regexp)
- command))
- :group 'as-external)
-
-(defcustom as-external-its-all-text-coding 'utf-8
- "Coding system to use for It's All Text buffers.
-See also `as-external-for-xhtml'."
- :type '(choice (const :tag "No special coding system" nil)
- coding-system)
- :group 'as-external)
-
-(defun as-external-fall-back (msg)
- "Fallback to text-mode if necessary."
- (text-mode)
- (lwarn t :warning "%s. Using text-mode" msg))
-
-;;;###autoload
-(defun as-external-for-xhtml ()
- "Setup for Firefox addon It's All Text to edit XHTML.
-It's All Text is a Firefox add-on for editing textareas with an
-external editor.
-See URL `https://addons.mozilla.org/en-US/firefox/addon/4125'.
-
-In this case Emacs is used to edit textarea fields on a web page.
-The text will most often be part of a web page later, like on a
-blog. Therefore turn on these:
-
-- `nxhtml-mode' since some XHTML tags may be allowed.
-- `nxhtml-validation-header-mode' since it is not a full page.
-- `wrap-to-fill-column-mode' to see what you are writing.
-- `html-write-mode' to see it even better.
-
-Also bypass the question for line end conversion when using
-emacsw32-eol."
- (interactive)
- (if (not (fboundp 'nxhtml-mode))
- (as-external-fall-back "Can't find nXhtml")
- (nxhtml-mode)
- (nxhtml-validation-header-mode 1)
- (set (make-local-variable 'wrap-to-fill-left-marg-modes)
- '(nxhtml-mode fundamental-mode))
- (wrap-to-fill-column-mode 1)
- ;;(visible-point-mode 1)
- (when (fboundp 'html-write-mode) (html-write-mode 1))
- (when (boundp 'emacsw32-eol-ask-before-save)
- (make-local-variable 'emacsw32-eol-ask-before-save)
- (setq emacsw32-eol-ask-before-save nil))))
-
-
-(defvar as-external-mail-mode-comment-pattern "^>.*$"
- "Regular expression for a comment line.")
-
-(defvar as-external-mail-mode-email-pattern
- (concat "[a-z0-9$%(*-=?[_][^<>\")!;:,{}]*"
- "\@"
- "\\(?:[a-z0-9\-]+\.\\)+[a-z0-9]\\{2,4\\}")
- "Regular expression for a mail address.")
-
-(defvar as-external-mail-mode-font-lock-keywords
- (list
- (list as-external-mail-mode-comment-pattern
- '(0 font-lock-comment-face))
- ;; (list as-external-mail-mode-email-pattern
- ;; '(0 font-lock-keyword-face))
- ))
-
-;;;###autoload
-(define-derived-mode as-external-for-mail-mode text-mode "ExtMail "
- "Setup for Firefox addon It's All Text to edit mail.
-Set normal mail comment markers in column 1 (ie >).
-
-Set `fill-column' to 90 and enable `wrap-to-fill-column-mode' so
-that it will look similar to how it will look in the sent plain
-text mail.
-
-See also `as-external-mode'."
- ;; To-do: Look at http://globs.org/articles.php?lng=en&pg=2
- (set (make-local-variable 'comment-column) 0)
- (set (make-local-variable 'comment-start) ">")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'font-lock-defaults)
- '((as-external-mail-mode-font-lock-keywords) nil))
- (setq fill-column 90)
- (mlinks-mode 1)
- (wrap-to-fill-column-mode 1))
-
-;;;###autoload
-(defun as-external-for-wiki ()
- "Setup for Firefox addon It's All Text to edit MediaWikis."
- (interactive)
- (require 'wikipedia-mode nil t)
- (if (not (featurep 'wikipedia-mode))
- (as-external-fall-back "Can't find file wikipedia-mode.el")
- (wikipedia-mode)))
-
-
-;;;###autoload
-(define-minor-mode as-external-mode
- "If non-nil check if Emacs is called as external editor.
-When Emacs is called as an external editor for example to edit
-text areas on a web page viewed with Firefox this library tries
-to help to setup the buffer in a useful way. It may for example
-set major and minor modes for the buffer.
-
-This can for example be useful when blogging or writing comments
-on blogs.
-
-See `as-external-alist' for more information."
- :global t
- :group 'as-external
- ;;(modify-coding-system-alist 'file "/itsalltext/" as-external-its-all-text-coding)
- (let ((coding-entry
- (cons
- as-external-its-all-text-regexp
- (cons as-external-its-all-text-coding
- as-external-its-all-text-coding))))
- ;;(message "as-external-mode=%s" as-external-mode)
- (if as-external-mode
- (progn
- (add-to-list 'file-coding-system-alist coding-entry)
- (add-hook 'server-visit-hook 'as-external-setup t))
- (setq file-coding-system-alist
- (delq coding-entry file-coding-system-alist))
- (remove-hook 'server-visit-hook 'as-external-setup))))
-
-(defun as-external-setup ()
- "Check if Emacs is used as an external editor.
-If so then turn on useful major and minor modes.
-This is done by checking `as-external-alist'."
- (condition-case err
- (as-external-setup-1)
- (error (message "as-external-setup error: %s" err))))
-
-(defvar as-external-my-frame nil)
-(make-variable-buffer-local 'as-external-my-frame)
-
-(defvar as-external-last-buffer nil)
-
-(defun as-external-server-window-fix-frames ()
- (condition-case err
- (with-current-buffer as-external-last-buffer
- (unless (buffer-live-p pause-buffer)
- (remove-hook 'pause-break-exit-hook 'as-external-server-window-fix-frames)
- (setq as-external-my-frame (or as-external-my-frame
- (make-frame)))
- (dolist (f (frame-list))
- (unless (eq f as-external-my-frame)
- (lower-frame f)))
- (raise-frame as-external-my-frame)))
- (error (message "%s" (error-message-string err)))))
-
-(defun as-external-server-window (buffer)
- (setq server-window nil)
- (with-current-buffer buffer
- (setq as-external-last-buffer (current-buffer))
- (run-with-idle-timer 2 nil 'as-external-server-window-fix-frames)
- (add-hook 'pause-break-exit-hook 'as-external-server-window-fix-frames)
- (add-hook 'kill-buffer-hook 'as-external-delete-my-frame nil t)))
-
-(defun as-external-delete-my-frame ()
- (let ((win (and (frame-live-p as-external-my-frame)
- (get-buffer-window nil as-external-my-frame))))
- (when (and win
- (= 1 (length (window-list as-external-my-frame 'no-mini))))
- (delete-frame as-external-my-frame)
- (lower-frame))))
-
-(defun as-external-setup-1 ()
- ;; Fix-me: How does one know if the file names are case sensitive?
- (unless (when (boundp 'nowait) nowait) ;; dynamically bound in `server-visit-files'
- (unless server-window
- ;; `server-goto-toplevel' has been done here.
- ;; Setup to use a new frame
- (setq server-window 'as-external-server-window))
- (catch 'done
- (dolist (rec as-external-alist)
- (let ((file-regexp (car rec))
- (setup-fun (cadr rec)))
- (when (symbolp file-regexp)
- (setq file-regexp (symbol-value file-regexp)))
- (when (string-match file-regexp (buffer-file-name))
- (funcall setup-fun)
- (throw 'done t)))))))
-
-(provide 'as-external)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; as-external.el ends here
diff --git a/emacs.d/nxhtml/util/buffer-bg.el b/emacs.d/nxhtml/util/buffer-bg.el
deleted file mode 100644
index d6459d6..0000000
--- a/emacs.d/nxhtml/util/buffer-bg.el
+++ /dev/null
@@ -1,89 +0,0 @@
-;;; buffer-bg.el --- Changing background color of windows
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-05-22T19:06:23+0200 Thu
-;; Version: 0.5
-;; Last-Updated: 2008-05-22T23:19:55+0200 Thu
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/buffer-bg.el
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; There is currently no way to change background colors of Emacs
-;; windows. This library implements a workaround using overlays.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defvar buffer-bg-overlay nil)
-(put 'buffer-bg-overlay 'permanent-local t)
-
-;;;###autoload
-(defun buffer-bg-set-color (color buffer)
- "Add an overlay with background color COLOR to buffer BUFFER.
-If COLOR is nil remove previously added overlay."
- (interactive
- (let* ((prompt (if buffer-bg-overlay
- "Background color (empty string to remove): "
- "Background color: "))
- (color (read-color prompt nil t)))
- (when (= 0 (length color))
- (setq color nil))
- (list color (current-buffer))
- ))
- (if (not color)
- (when buffer-bg-overlay
- (delete-overlay buffer-bg-overlay)
- (setq buffer-bg-overlay nil))
- (save-restriction
- (widen)
- (setq buffer-bg-overlay
- (make-overlay (point-min) (point-max) nil nil t))
- ;; Fix-me: Let the overlay have priority 0 which is the
- ;; lowest. Change this to below char properties if this is ever
- ;; allowed in Emacs.
- (overlay-put buffer-bg-overlay 'priority 0)
- (let* ((bg-face (list :background color))
- (bg-after (propertize (make-string 10 ?\n)
- 'face bg-face
- 'intangible t)))
- (overlay-put buffer-bg-overlay 'face bg-face)
- ;; This is just confusing, don't use it:
- ;;(overlay-put buffer-bg-overlay 'after-string bg-after)
- )
- )))
-
-
-(provide 'buffer-bg)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; buffer-bg.el ends here
diff --git a/emacs.d/nxhtml/util/chartg.el b/emacs.d/nxhtml/util/chartg.el
deleted file mode 100644
index 7470710..0000000
--- a/emacs.d/nxhtml/util/chartg.el
+++ /dev/null
@@ -1,844 +0,0 @@
-;;; chartg.el --- Google charts (and maybe other)
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-04-06 Sun
-(defconst chart:version "0.2") ;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-(defconst chartg-types
- '((line-chartg-x lc)
- (line-chartg-xy lxy)
- (line-chart ls)
-
- (bar-chartg-horizontal bhs)
- (bar-chartg-vertical bvs)
- (bar-chartg-horizontal-grouped bhg)
- (bar-chartg-vertical-grouped bvg)
-
- (pie-2-dimensional p)
- (pie-3-dimensional p3)
-
- (venn-diagram v)
- (scatter-plot s)
-
- (radar-chart r)
- (radar-chartg-w-splines rs)
-
- (geographical-map t)
- (meter gom)))
-
-(defconst chartg-types-keywords
- (mapcar (lambda (rec)
- (symbol-name (car rec)))
- chartg-types))
-
-(defvar chartg-mode-keywords-and-states
- '(("Output-file:" (accept file-name))
- ("Size:" (accept number))
- ("Data:" (accept number))
- ("Type:" (accept chartg-type))
- ))
-
-(defvar chartg-mode-keywords
- (mapcar (lambda (rec)
- (car rec))
- chartg-mode-keywords-and-states))
-
-;; Fix-me: I started to implement a parser, but I think I will drop it
-;; and wait for Semantic to be easily available instead. Or just use
-;; Calc/Org Tables.
-
-(defvar chartg-intermediate-states
- '((end-or-label (or end-of-file label))
- ))
-
-(defvar chartg-extra-keywords-and-states
- '(
- ;;("Provider:")
- ("Colors:")
- ("Solid-fill:")
- ("Linear-gradient:")
- ("Linear-stripes:")
- ("Chartg-title:" (and string end-or-label))
- ("Legends:" (accept string))
- ("Axis-types:")
- ("Axis-labels:")
- ("Axis-ranges:")
- ("Axis-styles:")
- ("Bar-thickness:")
- ("Bar-chartg-zero-line:")
- ("Bar-chartg-zero-line-2:")
- ("Line-styles-1:")
- ("Line-styles-2:")
- ("Grid-lines:")
- ("Shape-markers:")
- ("Range-markers:")
- ))
-
-(defvar chartg-extra-keywords
- (mapcar (lambda (rec)
- (car rec))
- chartg-extra-keywords-and-states))
-
-(defvar chartg-raw-keywords-and-states
- '(
- ("Google-chartg-raw:" (accept string))
- ))
-
-(defvar chartg-raw-keywords
- (mapcar (lambda (rec)
- (car rec))
- chartg-raw-keywords-and-states))
-
-(defvar chartg-mode-keywords-re (regexp-opt chartg-mode-keywords))
-(defvar chartg-extra-keywords-re (regexp-opt chartg-extra-keywords))
-(defvar chartg-types-keywords-re (regexp-opt chartg-types-keywords))
-(defvar chartg-raw-keywords-re (regexp-opt chartg-raw-keywords))
-
-(defvar chartg-font-lock-keywords
- `((,chartg-mode-keywords-re . font-lock-keyword-face)
- (,chartg-extra-keywords-re . font-lock-variable-name-face)
- (,chartg-types-keywords-re . font-lock-function-name-face)
- (,chartg-raw-keywords-re . font-lock-preprocessor-face)
- ))
-
-(defvar chartg-font-lock-defaults
- '(chartg-font-lock-keywords nil t))
-
-(defvar chartg-mode-syntax-table
- (let ((table (make-syntax-table)))
- (modify-syntax-entry ?\n "> " table)
- (modify-syntax-entry ?\; "< " table)
- table))
-
-(defun chartg-create (provider out-file size data type
- title legends &optional extras)
- "Create a chart image.
-PROVIDER is what to use for creating the chart. Currently only
-`google' for Google's chart API is supported.
-
-OUT-FILE is where the image goes.
-
-SIZE is a cons cell with pixel width and height.
-
-DATA is the data to draw the chart from. It is a list of data
-sets where each data set has the form:
-
- (list (list NUMBERS ...) (MIN . MAX)))
-
-TYPE can be the following:
-
-* Line charts
-
- - lc: Line chart with only y values. Each dataset is a new
- line.
-
- - lxy: Line chart with both x and y values. For each line there
- should be a pair of datasets, the first for x and the second
- for y. If the x dataset just contains a single -1 then values
- are evenly spaced along the x-axis.
-
- - ls: Like above, but axis are not drawn.
-
-* Bar charts:
-
- - bhs: horizontal bars.
- - bvs: vertical bars.
- - bhg, bvg: dito grouped.
-
-* Pie charts:
-
- - cht=p: one dimensional
- - cht=p3: three dimensional
-
-* Venn diagrams
-
- - cht=v: data should be specified as
- * the first three values specify the relative sizes of three
- circles, A, B, and C
- * the fourth value specifies the area of A intersecting B
- * the fifth value specifies the area of A intersecting C
- * the sixth value specifies the area of B intersecting C
- * the seventh value specifies the area of A intersecting B
- intersecting C
-
-* Scatter plots
-
- - cht=s: Supply a pair of datasets, first for x and second for
- y coordinates.
-
-* Radar charts
-
- - cht=r: straight lines.
- - cht=rs: splines.
-
- You will have to find out the format of the datasets
- yourself, I don't understand it ;-)
-
- Or perhaps mail google?
-
-* Maps
-
- - cht=t
-
- together with
-
- - chtm=AREA: AREA for provider `google' is currently one of
- * africa
- * asia
- * europe
- * middle_east
- * south_america
- * usa
- * world
-
-* Meter
-
- - cht=gom: A speed meter type meter. Takes a single value.
-
-TITLE is a string to use as title.
-
-LEGENDS is a list of labels to put on the data.
-
-EXTRAS is a list of extra arguments with the form
-
- (EXTRA-TYPE EXTRA-VALUE)
-
-Where EXTRA-TYPE is the extra argument type and EXTRA-VALUE the
-value. The following EXTRA-TYPEs are supported:
-
-* COLORS: value is a list of colors corresponding to the list of
- DATA. Each color have the format RRGGBB or RRGGBBTT where the
- first form is the normal way to specify colors in rgb-format
- and the second has an additional TT for transparence. TT=00
- means completely transparent and TT=FF means completely opaque.
-
-FILL-AREA are fill colors for data sets in line charts. It should
-be a list
-
- (list COLOR START-INDEX END-INDEX)
-
-"
- (message "(chartg-create %s %s %s %s %s %s %s" provider out-file size data type
- title legends)
- (unless (symbolp type)
- (error "Argument TYPE should be a symbol"))
- (unless (assoc type chartg-types)
- (error "Unknown chart type: %s" type))
- (cond
- ((eq provider 'google)
- (let* ((g-type (nth 1 (assoc type chartg-types)))
- (width (car size))
- (height (cdr size))
- ;;(size-par (format "&chs=%sx%s" width height))
- ;;
- numbers
- scales
- colors-par
- ;;
- url
- content
- )
- (setq url
- (format
- "http://chart.apis.google.com/chart?cht=%s&chs=%dx%d" g-type width height))
- ;;(setq url (concat url size-par))
- ;; Data and scales
- (unless data
- (error "No data"))
- (dolist (rec data)
- (let* ((rec-numbers (car rec))
- (number-str
- (let (str)
- (dolist (num rec-numbers)
- (setq str
- (if (not str)
- (number-to-string num)
- (concat str "," (number-to-string num)))))
- str))
- (rec-scale (cadr rec))
- (rec-min (car rec-scale))
- (rec-max (cdr rec-scale))
- (scale-str (when rec-scale (format "%s,%s" rec-min rec-max)))
- )
- (if (not numbers)
- (progn
- (setq numbers (concat "&chd=t:" number-str))
- (when (or scale-str
- (memq g-type '(p p3 gom)))
- (setq scales (concat "&chds=" scale-str))))
- (setq numbers (concat numbers "|" number-str))
- (when scale-str
- (setq scales (concat scales "," scale-str))))))
- (setq url (concat url numbers))
- (when scales (setq url (concat url scales)))
- ;; fix-me: encode the url
- (when title (setq url (concat url "&chtt=" (url-hexify-string title))))
- (when legends
- (let ((url-legends (mapconcat 'url-hexify-string legends "|"))
- (arg (if (memq g-type '(p p3 gom))
- "&chl="
- "&chdl=")))
- (setq url (concat url arg url-legends))))
- (dolist (extra extras)
- (let ((extra-type (car extra))
- (extra-value (cdr extra)))
- (cond
- ((eq extra-type 'GOOGLE-RAW)
- (setq url (concat url extra-value)))
- ((eq extra-type 'colors)
- ;; Colors
- (dolist (color extra-value)
- (if (not colors-par)
- (setq colors-par (concat "&chco=" color))
- (setq colors-par (concat colors-par "," color))))
- (when colors-par (setq url (concat url colors-par))))
- (t (error "Unsupported extra type: %s" extra-type)))))
-
- ;;(lwarn t :warning "url=%s" url)(top-level)
- ;;(setq url (concat url "&chxt=y"))
- (message "Sending %s" url)
- (setq content
- (with-current-buffer (url-retrieve-synchronously url)
- (goto-char (point-min))
- (if (search-forward "\n\n" nil t)
- (buffer-substring-no-properties (point) (point-max))
- (view-buffer-other-window (current-buffer))
- (error "Bad content"))))
- (let* ((is-html (string-match-p "</body></html>" content))
- (fname (progn
- (when is-html
- (setq out-file (concat (file-name-sans-extension out-file) ".html")))
- (expand-file-name out-file)
- ))
- (do-it (or (not (file-exists-p fname))
- (y-or-n-p
- (concat "File " fname " exists. Replace it? "))))
- (buf (find-buffer-visiting fname))
- (this-window (selected-window)))
- (when do-it
- (when buf (kill-buffer buf))
- (with-temp-file fname
- (insert content))
- (if (not is-html)
- (view-file-other-window fname)
- (chartg-show-last-error-file fname))
- (select-window this-window)))))
- (t (error "Unknown provider: %s" provider)))
- )
-
-(defun chartg-show-last-error-file (fname)
- (interactive)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'chartg-show-last-error-file fname) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert "Error, see ")
- (insert-text-button "result error page"
- 'action
- `(lambda (btn)
- (browse-url ,fname))))))
-
-(defvar chartg-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(meta tab)] 'chartg-complete)
- (define-key map [(control ?c) (control ?c)] 'chartg-make-chart)
- map))
-
-(defun chartg-missing-keywords ()
- (let ((collection (copy-sequence chartg-mode-keywords)))
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward chartg-mode-keywords-re nil t)
- (setq collection
- (delete (match-string-no-properties 0)
- collection)))))
- collection))
-
-;;;###autoload
-(defun chartg-complete ()
- (interactive)
- (let* ((here (point))
- (partial (when (looking-back (rx word-start
- (optional ?\")
- (0+ (any "[a-z]"))))
- (match-string-no-properties 0)))
- (part-pos (if partial
- (match-beginning 0)
- (setq partial "")
- (point)))
- (state (catch 'pos-state (chartg-get-state (point))))
- (msg "No completions")
- collection
- all
- prompt
- res)
- (when state
- (cond
- ((or (= (current-column) 0)
- (equal state 'need-label))
- (setq collection (append (chartg-missing-keywords)
- chartg-extra-keywords
- chartg-raw-keywords
- nil))
- (setq prompt "Label: "))
- ((equal state '(accept number))
- (setq res nil)
- (setq msg (propertize "Needs a number here!"
- 'face 'secondary-selection)))
- ((equal state '(accept chartg-type))
- (setq collection chartg-types-keywords)
- (setq prompt "Chart type: "))
- ((equal state '(accept file-name))
- (setq res
- (concat "\"" (read-file-name "Output-file: "
- nil
- ;; fix-me: handle partial
- partial)
- "\""))))
- (when collection
- (let ((all (if partial
- (all-completions partial collection)
- collection)))
- (setq res (when all
- (if (= (length all) 1)
- (car all)
- (completing-read prompt collection nil t partial)))))))
- (if (not res)
- (message "%s" msg)
- (insert (substring res (length partial))))))
-
-
-(defun chartg-get-state (want-pos-state)
- (let* (par-output-file
- par-provider
- par-size
- par-data par-data-temp
- par-data-min par-data-max
- par-type
- par-title
- par-legends
- par-google-raw
- (here (point))
- token-before-pos
- pos-state
- (state 'need-label)
- (problems
- (catch 'problems
- (save-restriction
- ;;(widen)
- (if want-pos-state
- (unless (re-search-backward chartg-mode-keywords-re nil t)
- (goto-char (point-min)))
- (goto-char (point-min)))
- (let (this-keyword
- this-start
- this-end
- params
- token
- token-pos
- next-token
- found-labels
- current-label)
- (while (or token
- (progn
- (setq pos-state state)
- (setq token-before-pos (point))
- (condition-case err
- (setq token (read (current-buffer)))
- (error
- (if (eq (car err) 'end-of-file)
- (unless (or (eq state 'need-label)
- (member '(quote |) state))
- (throw 'problems (format "Unexpected end, state=%s" state)))
- (throw 'problems
- (error-message-string err)))))))
- (message "token=%s, label=%s, state=%s" token current-label state)
- (when (and want-pos-state
- (>= (point) want-pos-state))
- (when (= (point) want-pos-state)
- ;; right after item
- (setq pos-state nil))
- (goto-char here)
- (throw 'pos-state pos-state))
- (when (and (listp state) (memq 'number state))
- (unless (numberp token)
- (save-match-data
- (let ((token-str (format "%s" token)))
- (setq token-str (replace-regexp-in-string "\\([0-9]\\),\\([0-9]\\)" "\\1\\2" token-str))
- (when (string-match-p "^[0-9]+$" token-str)
- (setq token (string-to-number token-str)))))))
- (cond ;; state
- ;; Label
- ((eq state 'need-label)
- (unless (symbolp token)
- (throw 'problems (format "Expected label, got %s" token)))
- (unless (member (symbol-name token)
- (append chartg-mode-keywords
- chartg-extra-keywords
- chartg-raw-keywords
- nil))
- (throw 'problems (format "Unknown label %s" token)))
- (when (member (symbol-name token) found-labels)
- (throw 'problems (format "Label %s defined twice" token)))
- (setq current-label token)
- (setq found-labels (cons current-label found-labels))
- (setq token nil)
- ;;(setq state 'need-value)
- (case current-label
- ('Output-file:
- (setq state '(accept file-name)))
- ('Size:
- (setq state '(accept number)))
- ('Data:
- (setq state '(accept number)))
- ('Type:
- (setq state '(accept chartg-type)))
- ('Chartg-title:
- (setq state '(accept string)))
- ('Legends:
- (setq state '(accept string)))
- ('Google-chartg-raw:
- (setq state '(accept string)))
- ))
- ;;;; Values
- ;; Alt
- ((equal state '(accept '| symbol))
- (if (eq '| token)
- (case current-label
- ('Legends:
- (setq token nil)
- (setq state '(accept string)))
- (t (error "internal error, current-label=%s, state=%s" current-label state)))
- (if (symbolp token)
- (progn
- ;;(setq token nil)
- (setq state 'need-label))
- (throw 'problems (format "Expected | or label, got %s" token)))))
- ;; Strings
- ((equal state '(accept string))
- (unless (stringp token)
- (throw 'problems "Expected string"))
- (case current-label
- ('Chartg-title:
- (setq par-title token)
- (setq token nil)
- (setq state 'need-label))
- ('Legends:
- (setq par-legends (cons token par-legends))
- (setq token nil)
- (setq state '(accept '| symbol)))
- ('Google-chartg-raw:
- (setq par-google-raw token)
- (setq token nil)
- (setq state 'need-label))
- (t (error "internal error, current-label=%s, state=%s" current-label state))))
- ;; Output file
- ((equal state '(accept file-name))
- (unless (stringp token)
- (throw 'problems "Expected file name string"))
- (assert (eq current-label 'Output-file:))
- (setq par-output-file token)
- (setq token nil)
- (setq state 'need-label))
- ;; Numbers
- ((equal state '(accept number))
- (unless (numberp token)
- (throw 'problems "Expected number"))
- (case current-label
- ('Size:
- (if (not par-size)
- (progn
- (setq par-size token)
- (setq token nil)
- (setq state '(accept number 'x 'X)))
- (setq par-size (cons par-size token))
- (setq token nil)
- (setq state 'need-label)))
- ('Data:
- ;;(assert (not par-data-temp))
- (setq par-data-temp (cons token par-data-temp))
- (setq par-data-min token)
- (setq par-data-max token)
- (setq token nil)
- (setq state '(accept number ', '| symbol))
- )
- (t (error "internal error, state=%s, current-label=%s" state current-label)))
- )
- ;; Numbers or |
- ((equal state '(accept number ', '| symbol))
- (if (numberp token)
- (progn
- (setq par-data-min (if par-data-min (min par-data-min token) token))
- (setq par-data-max (if par-data-max (max par-data-max token) token))
- (setq par-data-temp (cons token par-data-temp))
- (message "par-data-min/max=%s/%s, token=%s -- %s" par-data-min par-data-max token par-data-temp)
- (setq token nil))
- (if (eq ', token)
- (setq token nil)
- (if (or (eq '| token)
- (symbolp token))
- (progn
- (unless par-data-temp
- (throw 'problems "Empty data set"))
- (setq par-data (cons (list (reverse par-data-temp) (cons par-data-min par-data-max)) par-data))
- (setq par-data-temp nil)
- (setq par-data-min nil)
- (setq par-data-max nil)
- (if (not (eq '| token))
- (setq state 'need-label)
- (setq state '(accept number))
- (setq token nil)))
- (throw 'problems "Expected | or EOF")
- ))))
- ;; Numbers or x/X
- ((equal state '(accept number 'x 'X))
- (assert (eq current-label 'Size:))
- (let ((is-n (numberp token))
- (is-x (memq token '(x X))))
- (unless (or is-n is-x)
- (throw 'problems "Expected X or number"))
- (if is-x
- (progn
- (setq token nil)
- (setq state '(accept number)))
- (setq par-size (cons par-size token))
- (setq token nil)
- (setq state 'need-label))))
- ;; Chart type
- ((equal state '(accept chartg-type))
- (setq par-type token)
- (unless (assoc par-type chartg-types)
- (throw 'problems (format "Unknown chart type: %s" par-type)))
- (setq token nil)
- (setq state 'need-label))
- (t (error "internal error, state=%s" state))))))
- ;; fix-me here
-
- nil)))
- (when want-pos-state
- (goto-char here)
- (throw 'pos-state state))
- (unless problems
- (let ((missing-lab (chartg-missing-keywords)))
- (when missing-lab
- (setq problems (format "Missing required labels: %s" missing-lab)))))
- (if problems
- (let ((msg (if (listp problems)
- (nth 1 problems)
- problems))
- (where (if (listp problems)
- (nth 0 problems)
- token-before-pos)))
- (goto-char where)
- (skip-chars-forward " \t")
- (error msg))
- (goto-char here)
- ;;(defun chartg-create (out-file provider size data type &rest extras)
- (setq par-provider 'google)
- (setq par-legends (nreverse par-legends))
- (let ((extras nil))
- (when par-google-raw
- (setq extras (cons (cons 'GOOGLE-RAW par-google-raw) extras)))
- (chartg-create par-provider par-output-file par-size
- par-data par-type par-title par-legends extras))
- nil)))
-
-;;;###autoload
-(defun chartg-make-chart ()
- "Try to make a new chart.
-If region is active then make a new chart from data in the
-selected region.
-
-Else if current buffer is in `chartg-mode' then do it from the
-chart specifications in this buffer. Otherwise create a new
-buffer and initialize it with `chartg-mode'.
-
-If the chart specifications are complete enough to make a chart
-then do it and show the resulting chart image. If not then tell
-user what is missing.
-
-NOTE: This is beta, no alpha code. It is not ready.
-
-Below are some examples. To test them mark an example and do
-
- M-x chartg-make-chart
-
-* Example, simple x-y chart:
-
- Output-file: \"~/temp-chart.png\"
- Size: 200 200
- Data: 3 8 5 | 10 20 30
- Type: line-chartg-xy
-
-* Example, pie:
-
- Output-file: \"~/temp-depression.png\"
- Size: 400 200
- Data:
- 2,160,000
- 3,110,000
- 1,510,000
- 73,600
- 775,000
- 726,000
- 8,180,000
- 419,000
- Type: pie-3-dimensional
- Chartg-title: \"Depression hits on Google\"
- Legends:
- \"SSRI\"
- | \"Psychotherapy\"
- | \"CBT\"
- | \"IPT\"
- | \"Psychoanalysis\"
- | \"Mindfulness\"
- | \"Meditation\"
- | \"Exercise\"
-
-
-* Example, pie:
-
- Output-file: \"~/temp-panic.png\"
- Size: 400 200
- Data:
- 979,000
- 969,000
- 500,000
- 71,900
- 193,000
- 154,000
- 2,500,000
- 9,310,000
- Type: pie-3-dimensional
- Chartg-title: \"Depression hits on Google\"
- Legends:
- \"SSRI\"
- | \"Psychotherapy\"
- | \"CBT\"
- | \"IPT\"
- | \"Psychoanalysis\"
- | \"Mindfulness\"
- | \"Meditation\"
- | \"Exercise\"
-
-
-* Example using raw:
-
- Output-file: \"~/temp-chartg-slipsen-kostar.png\"
- Size: 400 130
- Data: 300 1000 30000
- Type: bar-chartg-horizontal
- Chartg-title: \"Vad killen i slips tjänar jämfört med dig och mig\"
- Google-chartg-raw: \"&chds=0,30000&chco=00cd00|ff4500|483d8b&chxt=y,x&chxl=0:|Killen+i+slips|Partiledarna|Du+och+jag&chf=bg,s,ffd700\"
-
-
-"
- (interactive)
- (if mark-active
- (let* ((rb (region-beginning))
- (re (region-end))
- (data (buffer-substring-no-properties rb re))
- (buf (generate-new-buffer "*Chart from region*")))
- (switch-to-buffer buf)
- (insert data)
- (chartg-mode))
- (unless (eq major-mode 'chartg-mode)
- (switch-to-buffer (generate-new-buffer "*Chart*"))
- (chartg-mode)))
- (chartg-get-state nil))
-
-;; (defun chartg-from-region (min max)
-;; "Try to make a new chart from data in selected region.
-;; See `chartg-mode' for examples you can test with this function."
-;; (interactive "r")
-;; (unless mark-active (error "No region selected"))
-;; (let* ((rb (region-beginning))
-;; (re (region-end))
-;; (data (buffer-substring-no-properties rb re))
-;; (buf (generate-new-buffer "*Chart from region*")))
-;; (switch-to-buffer buf)
-;; (insert data)
-;; (chartg-mode)
-;; (chartg-get-state nil)))
-
-(define-derived-mode chartg-mode fundamental-mode "Chart"
- "Mode for specifying charts.
-\\{chartg-mode-map}
-
-To make a chart see `chartg-make-chart'.
-
-"
- (set (make-local-variable 'font-lock-defaults) chartg-font-lock-defaults)
- (set (make-local-variable 'comment-start) ";")
- ;; Look within the line for a ; following an even number of backslashes
- ;; after either a non-backslash or the line beginning.
- (set (make-local-variable 'comment-start-skip)
- "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
- ;; Font lock mode uses this only when it KNOWS a comment is starting.
- (set (make-local-variable 'font-lock-comment-start-skip) ";+ *")
- (set (make-local-variable 'comment-add) 1) ;default to `;;' in comment-region
- (set (make-local-variable 'comment-column) 40)
- ;; Don't get confused by `;' in doc strings when paragraph-filling.
- (set (make-local-variable 'comment-use-global-state) t)
- (set-syntax-table chartg-mode-syntax-table)
- (when (looking-at (rx buffer-start (0+ whitespace) buffer-end))
- (insert ";; Type C-c C-c to make a chart, M-Tab to complete\n"))
- (let ((missing (chartg-missing-keywords)))
- (when missing
- (save-excursion
- (goto-char (point-max))
- (dolist (miss missing)
- (insert "\n" miss " "))))))
-
-;; Tests
-;;(chartg-create 'google "temp.png" '(200 . 150) '(((90 70) . nil)) 'pie-3-dimensional "test title" nil '((colors "FFFFFF" "00FF00")))
-
-;; Fix-me
-(add-to-list 'auto-mode-alist '("\\.mx-chart\\'" . chartg-mode))
-
-(provide 'chartg)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; chartg.el ends here
diff --git a/emacs.d/nxhtml/util/css-color.el b/emacs.d/nxhtml/util/css-color.el
deleted file mode 100644
index 38d400c..0000000
--- a/emacs.d/nxhtml/util/css-color.el
+++ /dev/null
@@ -1,983 +0,0 @@
-;;; css-color.el --- Highlight and edit CSS colors
-
-(defconst css-color:version "0.03")
-;; Copyright (C) 2008 Niels Giesen
-
-;; Author: Niels Giesen
-;; Keywords: processes, css, extensions, tools
-;; Some smaller changes made by Lennart Borgman
-
-;; Last-Updated: 2009-10-19 Mon
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Edit css-colors in hex, rgb or hsl notation in-place, with
-;; immediate feedback by font-locking. Cycle between color-spaces.
-
-;; Usage:
-
-;; (autoload 'css-color-mode "css-color" "" t)
-;; (add-hook 'css-mode-hook 'css-color-mode-turn-on)
-
-;; Css-Css-color.el propertizes colours in a CSS stylesheet found by
-;; font-locking code with a keymap. From that keymap, you can easily
-;; adjust values such as red green and blue, hue, saturation and
-;; value, or switch between different color (space) notations.
-
-;; It supports all 'css-colors', so hex, rgb(), hsl() and even HTML
-;; color names (although I wouldn't use them myself, it is nice to be
-;; able to quickly convert those), can be used and switched between.
-
-;; The rgb() notation can be expressed either in percentages or in
-;; values between 0-255.
-
-;; You can cycle between the different formats (with SPACE), so that
-;; it is possible to edit the color in hsl mode (which is more
-;; intuitive than hsv, although hsv has its merits too), and switch
-;; back to rgb or hex if so desired.
-
-;; With point on a color, the keys - and = to are bound to the down
-;; and up functions for channels (or 'fields'). Toggling percentage
-;; in rgb() is done with the % key (not sure if that is wise
-;; though). The TAB key is bound to go to the next channel, cycling
-;; when at the end. color.el propertizes the longhand hexcolours
-;; found by the
-
-;; Caveats:
-
-;; Notation cycling can often introduce small errors inherent to
-;; switching color spaces. Currently there is no check nor a warning
-;; for that.
-
-;; ToDo:
-
-;; Try and fix those conversion inaccuracies. This cannot be done
-;; completely I guess. But maybe we can check whether this has
-;; occured, and then warn.
-
-;;; Change log:
-
-;; 2009-01-11 Lennart Borgman
-;; - Minor code clean up.
-;; 2009-05-23 Lennart Borgman
-;; - Let bound m1 and m2.
-
-;;; Code:
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'mumamo nil t))
-
-;;;###autoload
-(defgroup css-color ()
- "Customization group for library `css-color'."
- :group 'css
- :group 'nxhtml)
-
-(defconst css-color-hex-chars "0123456789abcdefABCDEF"
- "Composing chars in hexadecimal notation, save for the hash (#) sign.")
-
-(defconst css-color-hex-re
- "#\\([a-fA-F[:digit:]]\\{6\\}\\|[a-fA-F[:digit:]]\\{3\\}\\)")
-
-(defconst css-color-hsl-re
- "hsla?(\\([[:digit:]]\\{1,3\\}\\),[[:space:]]*\\([[:digit:]]\\{1,3\\}\\(?:\.?[[:digit:]]*\\)\\)%,[[:space:]]*\\([[:digit:]]\\{1,3\\}\\)\\(?:\.?[[:digit:]]*\\)%)")
-
-(defconst css-color-rgb-re
- "rgba?(\\([[:digit:]]\\{1,3\\}\\(?:\.?[[:digit:]]*%\\)?\\),[[:space:]]*\\([[:digit:]]\\{1,3\\}\\(?:\.?[[:digit:]]*%\\)?\\),[[:space:]]*\\([[:digit:]]\\{1,3\\}\\(?:\.?[[:digit:]]*%\\)?\\)\\(:?,[[:space:]]*\\(0\.[0-9]+\\|1\\)\\)?)")
-
-(defconst css-color-html-colors
- '(("AliceBlue" "#F0F8FF")
- ("AntiqueWhite" "#FAEBD7")
- ("Aqua" "#00FFFF")
- ("Aquamarine" "#7FFFD4")
- ("Azure" "#F0FFFF")
- ("Beige" "#F5F5DC")
- ("Bisque" "#FFE4C4")
- ("Black" "#000000")
- ("BlanchedAlmond" "#FFEBCD")
- ("Blue" "#0000FF")
- ("BlueViolet" "#8A2BE2")
- ("Brown" "#A52A2A")
- ("BurlyWood" "#DEB887")
- ("CadetBlue" "#5F9EA0")
- ("Chartreuse" "#7FFF00")
- ("Chocolate" "#D2691E")
- ("Coral" "#FF7F50")
- ("CornflowerBlue" "#6495ED")
- ("Cornsilk" "#FFF8DC")
- ("Crimson" "#DC143C")
- ("Cyan" "#00FFFF")
- ("DarkBlue" "#00008B")
- ("DarkCyan" "#008B8B")
- ("DarkGoldenRod" "#B8860B")
- ("DarkGray" "#A9A9A9")
- ("DarkGrey" "#A9A9A9")
- ("DarkGreen" "#006400")
- ("DarkKhaki" "#BDB76B")
- ("DarkMagenta" "#8B008B")
- ("DarkOliveGreen" "#556B2F")
- ("Darkorange" "#FF8C00")
- ("DarkOrchid" "#9932CC")
- ("DarkRed" "#8B0000")
- ("DarkSalmon" "#E9967A")
- ("DarkSeaGreen" "#8FBC8F")
- ("DarkSlateBlue" "#483D8B")
- ("DarkSlateGray" "#2F4F4F")
- ("DarkSlateGrey" "#2F4F4F")
- ("DarkTurquoise" "#00CED1")
- ("DarkViolet" "#9400D3")
- ("DeepPink" "#FF1493")
- ("DeepSkyBlue" "#00BFFF")
- ("DimGray" "#696969")
- ("DimGrey" "#696969")
- ("DodgerBlue" "#1E90FF")
- ("FireBrick" "#B22222")
- ("FloralWhite" "#FFFAF0")
- ("ForestGreen" "#228B22")
- ("Fuchsia" "#FF00FF")
- ("Gainsboro" "#DCDCDC")
- ("GhostWhite" "#F8F8FF")
- ("Gold" "#FFD700")
- ("GoldenRod" "#DAA520")
- ("Gray" "#808080")
- ("Grey" "#808080")
- ("Green" "#008000")
- ("GreenYellow" "#ADFF2F")
- ("HoneyDew" "#F0FFF0")
- ("HotPink" "#FF69B4")
- ("IndianRed" "#CD5C5C")
- ("Indigo" "#4B0082")
- ("Ivory" "#FFFFF0")
- ("Khaki" "#F0E68C")
- ("Lavender" "#E6E6FA")
- ("LavenderBlush" "#FFF0F5")
- ("LawnGreen" "#7CFC00")
- ("LemonChiffon" "#FFFACD")
- ("LightBlue" "#ADD8E6")
- ("LightCoral" "#F08080")
- ("LightCyan" "#E0FFFF")
- ("LightGoldenRodYellow" "#FAFAD2")
- ("LightGray" "#D3D3D3")
- ("LightGrey" "#D3D3D3")
- ("LightGreen" "#90EE90")
- ("LightPink" "#FFB6C1")
- ("LightSalmon" "#FFA07A")
- ("LightSeaGreen" "#20B2AA")
- ("LightSkyBlue" "#87CEFA")
- ("LightSlateGray" "#778899")
- ("LightSlateGrey" "#778899")
- ("LightSteelBlue" "#B0C4DE")
- ("LightYellow" "#FFFFE0")
- ("Lime" "#00FF00")
- ("LimeGreen" "#32CD32")
- ("Linen" "#FAF0E6")
- ("Magenta" "#FF00FF")
- ("Maroon" "#800000")
- ("MediumAquaMarine" "#66CDAA")
- ("MediumBlue" "#0000CD")
- ("MediumOrchid" "#BA55D3")
- ("MediumPurple" "#9370D8")
- ("MediumSeaGreen" "#3CB371")
- ("MediumSlateBlue" "#7B68EE")
- ("MediumSpringGreen" "#00FA9A")
- ("MediumTurquoise" "#48D1CC")
- ("MediumVioletRed" "#C71585")
- ("MidnightBlue" "#191970")
- ("MintCream" "#F5FFFA")
- ("MistyRose" "#FFE4E1")
- ("Moccasin" "#FFE4B5")
- ("NavajoWhite" "#FFDEAD")
- ("Navy" "#000080")
- ("OldLace" "#FDF5E6")
- ("Olive" "#808000")
- ("OliveDrab" "#6B8E23")
- ("Orange" "#FFA500")
- ("OrangeRed" "#FF4500")
- ("Orchid" "#DA70D6")
- ("PaleGoldenRod" "#EEE8AA")
- ("PaleGreen" "#98FB98")
- ("PaleTurquoise" "#AFEEEE")
- ("PaleVioletRed" "#D87093")
- ("PapayaWhip" "#FFEFD5")
- ("PeachPuff" "#FFDAB9")
- ("Peru" "#CD853F")
- ("Pink" "#FFC0CB")
- ("Plum" "#DDA0DD")
- ("PowderBlue" "#B0E0E6")
- ("Purple" "#800080")
- ("Red" "#FF0000")
- ("RosyBrown" "#BC8F8F")
- ("RoyalBlue" "#4169E1")
- ("SaddleBrown" "#8B4513")
- ("Salmon" "#FA8072")
- ("SandyBrown" "#F4A460")
- ("SeaGreen" "#2E8B57")
- ("SeaShell" "#FFF5EE")
- ("Sienna" "#A0522D")
- ("Silver" "#C0C0C0")
- ("SkyBlue" "#87CEEB")
- ("SlateBlue" "#6A5ACD")
- ("SlateGray" "#708090")
- ("SlateGrey" "#708090")
- ("Snow" "#FFFAFA")
- ("SpringGreen" "#00FF7F")
- ("SteelBlue" "#4682B4")
- ("Tan" "#D2B48C")
- ("Teal" "#008080")
- ("Thistle" "#D8BFD8")
- ("Tomato" "#FF6347")
- ("Turquoise" "#40E0D0")
- ("Violet" "#EE82EE")
- ("Wheat" "#F5DEB3")
- ("White" "#FFFFFF")
- ("WhiteSmoke" "#F5F5F5")
- ("Yellow" "#FFFF00")
- ("YellowGreen" "#9ACD32")))
-
-(defvar css-color-html-re
- (concat "\\<\\("
- (funcall 'regexp-opt
- (mapcar 'car css-color-html-colors))
- "\\)\\>"))
-
-(defconst
- css-color-color-re
- "\\(?:#\\(?:[a-fA-F[:digit:]]\\{6\\}\\|[a-fA-F[:digit:]]\\{3\\}\\)\\|hsl(\\(?:[[:digit:]]\\{1,3\\}\\),[[:space:]]*\\(?:[[:digit:]]\\{1,3\\}\\)%,[[:space:]]*\\(?:[[:digit:]]\\{1,3\\}\\)%)\\|rgba?(\\(?:[[:digit:]]\\{1,3\\}%?\\),[[:space:]]*\\(?:[[:digit:]]\\{1,3\\}%?\\),[[:space:]]*\\(?:[[:digit:]]\\{1,3\\}%?\\)\\(?:,[[:space:]]*\\(?:0.[0-9]+\\|1\\)\\)?)\\)"
- "Regular expression containing only shy groups matching any type of CSS color")
-
-;; (defconst css-color-color-re
-;; (concat "\\(?1:"
-;; (mapconcat
-;; 'identity
-;; (list css-color-hex-re
-;; css-color-hsl-re
-;; css-color-rgb-re) "\\|")
-;; "\\)"))
-
-(defvar css-color-keywords
- `((,css-color-hex-re
- (0
- (progn
- (when (= 7 (- (match-end 0)
- (match-beginning 0)))
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'keymap css-color-map))
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'css-color-type 'hex)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'rear-nonsticky t)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'face (list :background
- (match-string-no-properties 0)
- :foreground
- (css-color-foreground-color
- (match-string-no-properties 0)))))))
- (,css-color-html-re
- (0
- (let ((color
- (css-color-string-name-to-hex (match-string-no-properties 0))))
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'keymap css-color-generic-map)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'css-color-type 'name)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'rear-nonsticky t)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'face (list :background
- color
- :foreground
- (css-color-foreground-color
- color))))))
- (,css-color-hsl-re
- (0
- (let ((color (concat "#" (apply 'css-color-hsl-to-hex
- (mapcar 'string-to-number
- (list
- (match-string-no-properties 1)
- (match-string-no-properties 2)
- (match-string-no-properties 3)))))))
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'keymap css-color-generic-map)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'css-color-type 'hsl)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'rear-nonsticky t)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'face (list :background
- color
- :foreground
- (css-color-foreground-color
- color))))))
- (,css-color-rgb-re
- (0
- (let ((color (css-color-string-rgb-to-hex (match-string-no-properties 0))))
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'keymap css-color-generic-map)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'css-color-type 'rgb)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'rear-nonsticky t)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'face (list :background
- color
- :foreground
- (css-color-foreground-color
- color))))))))
-
-
-;;;###autoload
-(define-minor-mode css-color-mode
- "Show hex color literals with the given color as background.
-In this mode hexadecimal colour specifications like #6600ff are
-displayed with the specified colour as background.
-
-Certain keys are bound to special colour editing commands when
-point is at a hexadecimal colour:
-
-\\{css-color-map}"
- :initial-value nil
- :group 'css-color
- (unless font-lock-defaults
- (error "Can't use css-color-mode for this major mode"))
- (if css-color-mode
- (progn
- (unless font-lock-mode (font-lock-mode 1))
- (css-color-font-lock-hook-fun)
- (add-hook 'font-lock-mode-hook 'css-color-font-lock-hook-fun nil t))
- (remove-hook 'font-lock-mode-hook 'css-color-font-lock-hook-fun t)
- (font-lock-remove-keywords nil css-color-keywords))
- ;;(font-lock-fontify-buffer)
- (save-restriction
- (widen)
- (mumamo-mark-for-refontification (point-min) (point-max))))
-
-(put 'css-color-mode 'permanent-local t)
-
-(defun css-color-turn-on-in-buffer ()
- "Turn on `css-color-mode' in `css-mode'."
- (when (derived-mode-p 'css-mode)
- (css-color-mode 1)))
-
-;;;###autoload
-(define-globalized-minor-mode css-color-global-mode css-color-mode
- css-color-turn-on-in-buffer
- :group 'css-color)
-
-(defun css-color-font-lock-hook-fun ()
- "Add css-color pattern to font-lock's."
- (if font-lock-mode
- (font-lock-add-keywords nil css-color-keywords t)
- (css-color-mode -1)))
-
-(defvar css-color-map
- (let ((m (make-sparse-keymap "css-color")))
- (define-key m "=" 'css-color-up)
- (define-key m "-" 'css-color-down)
- (define-key m "h" 'css-color-hue-up)
- (define-key m "H" 'css-color-hue-down)
- (define-key m "s" 'css-color-saturation-up)
- (define-key m "S" 'css-color-saturation-down)
- (define-key m "v" 'css-color-value-up)
- (define-key m "V" 'css-color-value-down)
- (define-key m "\t" 'css-color-next-channel)
- (define-key m " " 'css-color-cycle-type)
- m)
- "Mode map for `css-color-minor-mode'")
-
-(defvar css-color-generic-map
- (let ((m (make-sparse-keymap "css-color")))
- (define-key m "=" 'css-color-num-up)
- (define-key m "-" 'css-color-num-down)
- (define-key m " " 'css-color-cycle-type)
- (define-key m "%" 'css-color-toggle-percentage)
- (define-key m "\t" 'css-color-next-channel)
- m)
- "Mode map for simple numbers in `css-color-minor-mode'")
-
-(defun css-color-pal-lumsig (r g b)
- "Return PAL luminance signal, but in range 0-255."
- (+
- (* 0.3 r)
- (* 0.59 g)
- (* 0.11 b)))
-
-(defun css-color-foreground-color (hex-color)
- (multiple-value-bind (r g b) (css-color-hex-to-rgb hex-color)
- (if (< (css-color-pal-lumsig r g b) 128)
- "#fff"
- "#000")))
-
-;; Normalizing funs
-(defun css-color-normalize-hue (h)
- (mod (+ (mod h 360) 360) 360))
-
-(defun css-color-within-bounds (num min max)
- (min (max min num) max))
-
-;; Source: hex
-(defun css-color-hex-to-rgb (str)
- (cond
- ((not (string-match "^#?[a-fA-F[:digit:]]*$" str))
- (error "No valid hexadecimal: %s" str))
- ((= 0 (length str))
- nil)
- ((= (aref str 0) 35)
- (css-color-hex-to-rgb (substring str 1)))
- (;;(oddp (length str))
- (= (mod (length str) 2) 1)
- (css-color-hex-to-rgb (mapconcat (lambda (c)
- (make-string 2 c))
- (string-to-list str) "")))
- (t (cons (string-to-number (substring str 0 2) 16)
- (css-color-hex-to-rgb (substring str 2))))))
-
-(defun css-color-hex-to-hsv (hex)
- (multiple-value-bind (r g b) (css-color-hex-to-rgb hex)
- (css-color-rgb-to-hsv r g b)))
-
-;; Source: rgb
-(defun css-color-rgb-to-hex (r g b)
- "Return r g b as #rrggbb in hexadecimal, propertized to have
-the keymap `css-color-map'"
- (format "%02x%02x%02x" r g b)) ;val
-
-(defun css-color-rgb-to-hsv (r g b)
- "Return list of (hue saturation value).
-Arguments are: R = red; G = green; B = blue.
-Measure saturation and value on a scale from 0 - 100.
-GIMP-style, that is."
- (let* ((r (float r))
- (g (float g))
- (b (float b))
- (max (max r g b))
- (min (min r g b)))
- (values
- (round
- (cond ((and (= r g) (= g b)) 0)
- ((and (= r max)
- (>= g b))
- (* 60 (/ (- g b) (- max min))))
- ((and (= r max)
- (< g b))
- (+ 360 (* 60 (/ (- g b) (- max min)))))
- ((= max g)
- (+ 120 (* 60 (/ (- b r) (- max min)))))
- ((= max b)
- (+ 240 (* 60 (/ (- r g) (- max min))))))) ;hue
- (round (* 100 (if (= max 0) 0 (- 1 (/ min max))))) ;sat
- (round (/ max 2.55)))))
-
-(defun css-color-rgb-to-hsl (r g b)
- "Return R G B (in range 0-255) converted to HSL (0-360 for hue, rest in %)"
- (let* ((r (/ r 255.0))
- (g (/ g 255.0))
- (b (/ b 255.0))
- (h 0)
- (s 0)
- (l 0)
- (v (max r g b))
- (m (min r g b))
- (l (/ (+ m v) 2.0))
- (vm 0)
- (r2 0)
- (g2 0)
- (b2 0))
- (multiple-value-bind (h s v)
- (if (<= l 0)
- (values h s l)
- (setq vm (- v m)
- s vm)
- (if (>= 0 s)
- (values h s l)
- (setq s (/ s (if (<= l 0.5)
- (+ v m)
- (- 2.0 v m))))
- (if (not (= 0 vm))
- (setq r2 (/ (- v r) vm)
- g2 (/ (- v g) vm)
- b2 (/ (- v b) vm)))
- (cond ((= r v)
- (setq h (if (= g m)
- (+ 5.0 b2)
- (- 1.0 g2))))
- ((= g v)
- (setq h (if (= b m)
- (+ 1.0 r2)
- (- 3.0 b2))))
- (t
- (setq h (if (= r m)
- (+ 3.0 g2)
- (- 5.0 r2)))))
- (values (/ h 6.0) s l)))
- (list (round(* 360 h))
- (* 100 s)
- (* 100 l)))))
-
-;; Source: hsv
-(defun css-color-hsv-to-hsl (h s v)
- (multiple-value-bind (r g b) (css-color-hsv-to-rgb h s v)
- (css-color-rgb-to-hsl r g b)))
-
-(defun css-color-hsv-to-hex (h s v)
- (apply 'css-color-rgb-to-hex (css-color-hsv-to-rgb h s v)))
-
-(defun css-color-hsv-to-rgb (h s v)
- "Convert a point in the Hue, Saturation, Value (aka Brightness)
-color space to list of normalized Red, Green, Blue values.
-
-HUE is an angle in the range of 0 degrees inclusive to 360
-exclusive. The remainder of division by 360 is used for
-out-of-range values.
-SATURATION is in the range of 0 to 100.
-VALUE is in the range of 0 to 100.
-Returns a list of values in the range of 0 to 255.
-"
- ;; Coerce to float and get hue into range.
- (setq h (mod h 360.0)
- s (/ (float s) 100)
- v (/ (float v) 100))
- (let* ((hi (floor h 60.0))
- (f (- (/ h 60.0) hi))
- (p (* v (- 1.0 s)))
- (q (* v (- 1.0 (* f s))))
- ;; cannot use variable t, obviously.
- (u (* v (- 1.0 (* (- 1.0 f) s))))
- r g b)
- (case hi
- (0 (setq r v g u b p))
- (1 (setq r q g v b p))
- (2 (setq r p g v b u))
- (3 (setq r p g q b v))
- (4 (setq r u g p b v))
- (5 (setq r v g p b q)))
- (mapcar (lambda (color) (round (* 255 color))) (list r g b))))
-
-(defun css-color-hsv-to-prop-hexstring (color-data)
- (propertize
- (apply 'css-color-hsv-to-hex color-data)
- 'keymap css-color-map
- 'css-color color-data))
-
-;; Source: hsl
-(defun css-color-hsl-to-rgb-fractions (h s l)
- (let (m1 m2)
- (if (<= l 0.5)
- (setq m2 (* l (+ s 1)))
- (setq m2 (- (+ l s) (* l s))))
- (setq m1 (- (* l 2) m2))
- (values (css-color-hue-to-rgb m1 m2 (+ h (/ 1 3.0)))
- (css-color-hue-to-rgb m1 m2 h)
- (css-color-hue-to-rgb m1 m2 (- h (/ 1 3.0))))))
-
-(defun css-color-hsl-to-rgb (h s l)
- (multiple-value-bind (r g b)
- (css-color-hsl-to-rgb-fractions
- (/ h;; (css-color-normalize-hue h)
- 360.0)
- (/ s 100.0)
- (/ l 100.0))
- (values (css-color-within-bounds (* 256 r) 0 255)
- (css-color-within-bounds (* 256 g) 0 255)
- (css-color-within-bounds (* 256 b) 0 255))))
-
-(defun css-color-hsl-to-hex (h s l)
- (apply 'css-color-rgb-to-hex
- (css-color-hsl-to-rgb h s l)))
-
-(defun css-color-hue-to-rgb (x y h)
- (when (< h 0) (incf h))
- (when (> h 1) (decf h))
- (cond ((< h (/ 1 6.0))
- (+ x (* (- y x) h 6)))
- ((< h 0.5) y)
- ((< h (/ 2.0 3.0))
- (+ x (* (- y x) (- (/ 2.0 3.0) h) 6)))
- (t x)))
-
-(defun css-color-parse-hsl (str)
- (string-match
- css-color-hsl-re
- str)
- (mapcar 'string-to-number
- (list
- (match-string 1 str)
- (match-string 2 str)
- (match-string 3 str))))
-
-(defun css-color-inchue (color incr)
- (multiple-value-bind (h s v) color
- (css-color-hsv-to-prop-hexstring
- (list (+ incr h) s v))))
-
-(defun css-color-incsat (color incr)
- (multiple-value-bind (h s v) color
- (css-color-hsv-to-prop-hexstring
- (list h (css-color-within-bounds (+ incr s) 0 100) v))))
-
-(defun css-color-incval (color incr)
- (multiple-value-bind (h s v) color
- (css-color-hsv-to-prop-hexstring
- (list h s (css-color-within-bounds (+ incr v) 0 100)))))
-
-(defun css-color-hexval-beginning ()
- (skip-chars-backward css-color-hex-chars)
- (if (= (char-after) 35)
- (forward-char 1)))
-
-(defun css-color-replcolor-at-p (fun increment)
- (let ((pos (point)))
- (css-color-hexval-beginning)
- (insert
- (funcall fun
- (css-color-get-color-at-point)
- increment))
- (delete-region (point) (+ (point) 6))
- (goto-char pos)))
-
-(defun css-color-get-color-at-point ()
- (save-excursion
- (css-color-hexval-beginning)
- (let ((saved-color (get-text-property (point) 'css-color)))
- (or saved-color
- (css-color-hex-to-hsv
- (buffer-substring-no-properties (point) (+ (point) 6)))))))
-
-(defun css-color-adj-hue-at-p (increment)
- (interactive "p")
- (css-color-replcolor-at-p 'css-color-inchue increment))
-
-(defun css-color-adj-saturation-at-p (increment)
- (interactive "p")
- (css-color-replcolor-at-p 'css-color-incsat increment))
-
-(defun css-color-adj-value-at-p (increment)
- (interactive "p")
- (css-color-replcolor-at-p 'css-color-incval increment))
-
-(defun css-color-what-channel ()
- (let ((pos (point)))
- (prog1
- (/ (skip-chars-backward css-color-hex-chars) -2)
- (goto-char pos))))
-
-(defun css-color-adjust-hex-at-p (incr)
- (interactive "p")
- (let ((pos (point))
- (channel (css-color-what-channel)))
- (css-color-hexval-beginning)
- (let ((rgb
- (css-color-hex-to-rgb
- (buffer-substring-no-properties (point)
- (+ 6 (point))))))
- (setf (nth channel rgb)
- (css-color-within-bounds
- (+ incr (nth channel rgb))
- 0 255))
- (delete-region (point) (+ 6 (point)))
- (insert
- (propertize
- (apply 'format "%02x%02x%02x" rgb)
- 'keymap css-color-map
- 'css-color nil
- 'rear-nonsticky t)))
- (goto-char pos)))
-
-;; channels (r, g, b)
-(defun css-color-up (val)
- "Adjust R/G/B up."
- (interactive "p")
- (css-color-adjust-hex-at-p val))
-
-(defun css-color-down (val)
- "Adjust R/G/B down."
- (interactive "p")
- (css-color-adjust-hex-at-p (- val)))
-;; hue
-(defun css-color-hue-up (val)
- "Adjust Hue up."
- (interactive "p")
- (css-color-adj-hue-at-p val))
-
-(defun css-color-hue-down (val)
- "Adjust Hue down."
- (interactive "p")
- (css-color-adj-hue-at-p (- val)))
-;; saturation
-(defun css-color-saturation-up (val)
- "Adjust Saturation up."
- (interactive "p")
- (css-color-adj-saturation-at-p val))
-
-(defun css-color-saturation-down (val)
- "Adjust Saturation down."
- (interactive "p")
- (css-color-adj-saturation-at-p (- val)))
-;; value
-(defun css-color-value-up (val)
- "Adjust Value up."
- (interactive "p")
- (css-color-adj-value-at-p val))
-
-(defun css-color-value-down (val)
- "Adjust Value down."
- (interactive "p")
- (css-color-adj-value-at-p (- val)))
-
-(defun css-color-num-up (arg)
- "Adjust HEX number up."
- (interactive "p")
- (save-excursion
- (let ((digits "1234567890"))
- (skip-chars-backward digits)
- (when
- (looking-at "[[:digit:]]+")
- (replace-match
- (propertize
- (let ((num (+ (string-to-number (match-string 0)) arg)))
- ;max = 100 when at percentage
- (save-match-data
- (cond ((looking-at "[[:digit:]]+%")
- (setq num (min num 100)))
- ((looking-back "hsla?(")
- (setq num (css-color-normalize-hue num)))
- ((memq 'css-color-type (text-properties-at (point)))
- (setq num (min num 255)))))
- (number-to-string num))
- 'keymap
- css-color-generic-map))))))
-
-(defun css-color-num-down (arg)
- "Adjust HEX number down."
- (interactive "p")
- (save-excursion
- (let ((digits "1234567890"))
- (skip-chars-backward digits)
- (when
- (looking-at "[[:digit:]]+")
- (replace-match
- (propertize
- (let ((num (- (string-to-number (match-string 0)) arg)))
- ;max = 100 when at percentage
- (save-match-data
- (cond ((looking-back "hsla?(")
- (setq num (css-color-normalize-hue num)))
- (t (setq num (max 0 num)))))
- (number-to-string num))
- 'keymap css-color-generic-map))))))
-
-
-(defun css-color-beginning-of-color ()
- "Skip to beginning of color.
-
-Return list of point and color-type."
- (while (memq 'css-color-type (text-properties-at (point)))
- (backward-char 1))
- (forward-char 1)
- (cons (point) (plist-get (text-properties-at (point)) 'css-color-type)))
-
-(defun css-color-end-of-color ()
- "Skip to beginning of color.
-
-Return list of point and color-type."
- (while (plist-get (text-properties-at (point)) 'css-color-type)
- (forward-char 1))
- (cons (point) (plist-get (text-properties-at (1- (point))) 'css-color-type)))
-
-(defun css-color-color-info ()
- (destructuring-bind ((beg . type)
- (end . type))
- (list
- (css-color-beginning-of-color)
- (css-color-end-of-color))
- (list beg end type (buffer-substring-no-properties beg end))))
-
-(defconst css-color-type-circle '#1=(hex hsl rgb name . #1#))
-
-(defun css-color-next-type (sym)
- (cadr (member sym css-color-type-circle)))
-
-(defun css-color-cycle-type ()
- "Cycle color type."
- (interactive)
- (destructuring-bind (beg end type color) (css-color-color-info)
- (if (or (= 0 (length color)) (null type))
- (error "Not at color"))
- (delete-region beg end)
- (insert
- (propertize (funcall
- (intern-soft (format "css-color-string-%s-to-%s"
- type
- (css-color-next-type type)))
- color)
- 'keymap (if (eq (css-color-next-type type) 'hex)
- css-color-map
- css-color-generic-map) 'rear-nonsticky t))
- (goto-char beg)))
-
-(defun css-color-string-hex-to-hsl (str)
- (multiple-value-bind (h s l)
- (apply 'css-color-rgb-to-hsl
- (css-color-hex-to-rgb str))
- (format "hsl(%d,%d%%,%d%%)"
- h s l)))
-
-(defun css-color-string-hsl-to-rgb (str)
- (multiple-value-bind (h s l)
- (css-color-parse-hsl str)
- (apply 'format
- "rgb(%d,%d,%d)"
- (mapcar 'round (css-color-hsl-to-rgb h s l)))))
-
-(defun css-color-string-rgb-to-name (str)
- (let ((color (css-color-string-rgb-to-hex str)))
- (or (car (rassoc (list (upcase color)) css-color-html-colors)) ;if name ok
- color))) ;else return hex
-
-(defun css-color-string-name-to-hex (str)
- (let ((str (downcase str)))
- (cadr (assoc-if
- (lambda (a)
- (string=
- (downcase a)
- str))
- css-color-html-colors))))
-
-(defun css-color-string-rgb-to-hex (str)
- (save-match-data
- (string-match css-color-rgb-re str)
- (concat "#"
- (apply 'css-color-rgb-to-hex
- (mapcar
- ;;'string-to-number
- (lambda (s)
- (if (= (aref s (1- (length s))) ?\%)
- (round (* (string-to-number s) 2.55))
- (string-to-number s)))
- (list
- (match-string-no-properties 1 str)
- (match-string-no-properties 2 str)
- (match-string-no-properties 3 str)))))))
-
-(defun css-color-string-hsl-to-hex (str)
- (concat "#" (apply 'css-color-hsl-to-hex (css-color-parse-hsl str))))
-
-(defun css-color-next-channel ()
- "Cycle color channel."
- (interactive)
- (multiple-value-bind (beg end type color)
- (save-excursion (css-color-color-info))
- (case type
- ((hsl rgb)
- (if (not (re-search-forward ",\\|(" end t))
- (goto-char (+ beg 4))))
- (hex
- (cond ((> (point) (- end 3))
- (goto-char (+ 1 beg)))
- ((= (char-after) 35)
- (forward-char 1))
- ((evenp (- (point) beg))
- (forward-char 1))
- (t (forward-char 2)))))))
-
-(defun css-color-hexify-anystring (str)
- (cond ((string-match "^hsl" str)
- (css-color-string-hsl-to-hex str))
- ((string-match "^rgb" str)
- (css-color-string-rgb-to-hex str))
- (t str)))
-
-(defun css-color-toggle-percentage ()
- "Toggle percent ??"
- (interactive)
- (let ((pos (point)))
- (if (eq (nth 2 (save-excursion (css-color-color-info))) 'rgb)
- (let ((chars "%1234567890."))
- (skip-chars-backward chars)
- (when
- (looking-at "[[:digit:]]+\\(?:\.?[[:digit:]]*%\\)?%?")
- (let ((s (match-string 0)))
- (replace-match
- (propertize
- (if (= (aref s (1- (length s))) ?\%)
- (number-to-string (round (* (string-to-number s) 2.55)))
- (format "%d%%" (/ (string-to-number s) 2.55)))
- 'keymap css-color-generic-map
- 'rear-nonsticky t)))
- ;;(goto-char pos)
- ))
- (message "No toggling at point."))))
-
-;; provide some backwards-compatibility to hexcolor.el:
-(defvar css-color-fg-history nil)
-(defvar css-color-bg-history nil)
-
-;;;###autoload
-(defun css-color-test (fg-color bg-color)
- "Test colors interactively.
-The colors are displayed in the echo area. You can specify the
-colors as any viable css color. Example:
-
- red
- #f00
- #0C0
- #b0ff00
- hsla(100, 50%, 25%)
- rgb(255,100,120)"
- (interactive (list (completing-read "Foreground color: "
- css-color-html-colors
- nil nil nil nil css-color-fg-history)
- (completing-read "Background color: "
- css-color-html-colors
- nil nil nil nil css-color-bg-history)))
- (let* ((s (concat " Foreground: " fg-color ", Background: " bg-color " ")))
- (put-text-property 0 (length s)
- 'face (list
- :foreground (css-color-hexify-anystring fg-color)
- :background (css-color-hexify-anystring bg-color))
- s)
- (message "Here are the colors: %s" s)))
-
-(defun css-color-run-tests ()
- (interactive)
- (unless
- (progn
- (assert
- (string= (css-color-string-hex-to-hsl "#ffff00") "hsl(60,100%,50%)"))
- (assert
- (string= (css-color-string-rgb-to-hex "rgb(255, 50%, 0)")"#ff7f00"))
- (assert
- (string= (css-color-string-hsl-to-rgb "hsl(60, 100%, 50%)") "rgb(255,255,0)"))
- (assert
- (string= (css-color-string-hsl-to-hex "hsl(60, 100%, 50%)") "#ffff00")))
- (message "All tests passed")))
-
-(provide 'css-color)
-;;; css-color.el ends here
diff --git a/emacs.d/nxhtml/util/css-palette.el b/emacs.d/nxhtml/util/css-palette.el
deleted file mode 100644
index 44287be..0000000
--- a/emacs.d/nxhtml/util/css-palette.el
+++ /dev/null
@@ -1,471 +0,0 @@
-;;; css-palette.el
-
-(defconst css-palette:version "0.02")
-;; Copyright (C) 2008 Niels Giesen
-
-;; Author: Niels Giesen <nielsforkgiesen@gmailspooncom, but please
-;; replace the kitchen utensils with a dot before hitting "Send">
-;; Keywords: processes, css, multimedia, extensions, tools
-;; Homepage: http://niels.kicks-ass.org/
-
-;; This program is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; css-palette defines commands to have "palettes" inside a block
-;; comment to circumvent the absence of (color or other) variable
-;; definitions in the CSS specification. It can import and export GIMP
-;; color palettes. See the documentation of `css-palette-mode'
-;; for details of usage.
-
-;;; Installation:
-
-;; Something like:
-
-;; put it in your load-path.
-
-;; (autoload 'css-palette-mode "css-palette" "" t)
-;; (add-hook 'css-mode-hook
-;; (lambda ()
-;; (css-palette-mode t)))
-
-;; Notes:
-
-;; css-palette depends on css-color.el to do font-locking.
-
-;; ccs-palette is orthogonal to css-mode, so it could probably be used
-;; inside other language modes, provided they support multiline block
-;; comments.
-
-;;; Change log:
-
-;; 2009-01-11 Lennart Borgman
-;; - Minor code clean up.
-
-;;; Code:
-(require 'css-color)
-(eval-when-compile (require 'cl)) ;i'm a bad bad boy...
-
-(defconst css-palette-hex-chars "0123456789abcdefABCDEF"
- "Composing chars in hexadecimal notation, save for the hash (#) sign.")
-
-(defvar css-palette-mode-map
- (let ((m (make-sparse-keymap)))
- (define-key m "\C-c\C-c" 'css-palette-update-all)
- (define-key m "\C-c\C-i" 'css-palette-insert-reference)
- (define-key m "\C-c\C-p" 'css-palette-import-from-GIMP)
- (define-key m "\C-c\C-f" 'css-palette-insert-files)
- m)
- "Mode map for `css-palette-mode'")
-
-;;;###autoload
-(define-minor-mode css-palette-mode
- "Minor mode for palettes in CSS.
-
-The mode `css-palette-mode' acts on the first COLORS declaration in your
- file of the form:
-
-COLORS:
-\(
-c0 \"#6f5d25\" ;tainted sand
-c1 \"#000000\" ;Black
-c2 \"#cca42b\" ;goldenslumber
-c3 \"#6889cb\" ;far off sky
-c4 \"#fff\" ;strange aeons
-)
-
-Such declarations should appear inside a block comment, in order
- to be parsed properly by the LISP reader.
-
-Type \\[css-palette-update-all], and any occurence of
-
- color: #f55; /*[c3]*/
-
-will be updated with
-
- color: #6899cb; /*[c3]*/
-
-The following commands are available to insert key-value pairs
- and palette declarations:
- \\{css-palette-mode-map}
-
-You can extend or redefine the types of palettes by defining a
- new palette specification of the form (PATTERN REGEXP
- REF-FOLLOWS-VALUE), named according to the naming scheme
- css-palette:my-type, where
-
-PATTERN is a pattern containing two (%s) format directives which
- will be filled in with the variable and its value,
-
-REGEXP is a regular expression to match a value - variable
- pattern,
-
-and REF-FOLLOWS-VALUE defined whether or not the reference comes
- after the value. This allows for more flexibility.
-
-Note that, although the w3c spec at URL
- `http://www.w3.org/TR/CSS2/syndata.html#comments' says that
- comments \" may occur anywhere between tokens, and their
- contents have no influence on the rendering\", Internet
- Explorer does not think so. Better keep all your comments after
- a \"statement\", as per the default. This means `css-palette'
- is ill-suited for use within shorthands.
-
-See variable `css-palette:colors' for an example of a palette
- type.
-
-The extension mechanism means that palette types can be used to
- contain arbitrary key-value mappings.
-
-Besides the colors palette, css-palette defines the palette
- definition variables `css-palette:colors-outside' and
- `css-palette:files', for colors with the reference outside and
- for file url()'s respectively.
-
-You can fine-control which palette types css-palette should look
- at via the variable `css-palette-types'.
-
-"
- nil
- "-palette"
- css-palette-mode-map
- (css-color-mode +1))
-
-;;;###autoload
-(defgroup css-palette nil
- "Customization group for css-palette library.
-
-See function `css-palette-mode' for documentation"
- :group 'css-color)
-
-(defcustom css-palette:colors
- `("%s; /*[%s]*/ "
- ,(concat "\\("
- css-color-color-re
-;; (mapconcat
-;; 'identity
-;; (list css-color-hex-re
-;; css-color-hsl-re
-;; css-color-rgb-re) "\\|")
- "\\)"
- "[[:space:]]*;[[:space:]]*\/\\*\\[\\([^[:space:]]+\\)\\]\\*\/")
- t)
- "Color palette specification.
-
-See function `css-palette-mode' for documentation"
- :group 'css-palette
- :type '(list
- (string :tag "Pattern")
- (regexp :tag "Regexp")
- (boolean :tag "Reversed")))
-
-(defcustom css-palette:files
- '("url(%s); /*[%s]*/ "
- "url(\\([^)]+\\))[[:space:]]*;[[:space:]]*\/\\*\\[\\([^[:space:]]+\\)\\]\\*\/"
- t)
- "File palette specification.
-
-See function `css-palette-mode' for documentation"
- :group 'css-palette
- :type '(list
- (string :tag "Pattern")
- (regexp :tag "Regexp")
- (boolean :tag "Reversed")))
-
-(defcustom css-palette-types
- '(colors)
- "List of palette types to check for in buffer.
-
-See function `css-palette-mode' for documentation"
- :group 'css-palette
- :type '(repeat (symbol :tag "Palette type")))
-(make-variable-buffer-local 'css-palette-types)
-
-;; (defun css-palette-mode-turn-on ()
-;; "Turn on `css-palette-mode'."
-;; (css-palette-mode 1))
-
-;; ;;;###autoload
-;; (defcustom css-palette-mode-activate-p nil
-;; "Start `css-palette-mode' when `css-mode' is activated."
-;; :group 'css-palette
-;; :set (lambda (sym val)
-;; (set-default sym val)
-;; (if val
-;; (add-hook 'css-mode-hook 'css-palette-mode-turn-on)
-;; (remove-hook 'css-mode-hook 'css-palette-mode-turn-on)))
-;; :type 'boolean)
-
-(defun css-palette-turn-on-in-buffer ()
- "Turn on `css-palette-mode' in `css-mode'."
- (when (derived-mode-p 'css-mode)
- (message "turn-on-in-b:before (css-palette-mode 1) cb=%s" (current-buffer))
- (css-palette-mode 1)
- (message "turn-on-in-b:after (css-palette-mode 1)")
- ))
-
-;;;###autoload
-(define-globalized-minor-mode css-palette-global-mode css-palette-mode
- css-palette-turn-on-in-buffer
- :group 'css-color)
-
-(defun css-palette-get (key spec)
- (plist-get
- (css-palette-spec-to-plist
- (symbol-value
- (intern-soft
- (format "css-palette:%s" spec)))) key))
-
-(defun css-palette-spec-to-plist (palette)
- (destructuring-bind (pattern regexp ref-follows-value) palette
- (list :regexp regexp
- :pattern pattern
- :ref-follows-value ref-follows-value)))
-
-(defun css-palette-choose-type ()
- (intern-soft
- (if (null (cdr css-palette-types))
- (car css-palette-types)
- (completing-read "Type: "
- (mapcar 'symbol-name css-palette-types)))))
-
-(defun css-palette-get-declaration (type)
- "Return `css-palette' declaration of TYPE in current buffer.
-
-If none is found, throw an error."
- (let ((type (symbol-name type)))
- (save-excursion
- (goto-char (point-min))
- (or (re-search-forward (format "%s:"
- (upcase type)) nil t)
- (error "No %s declaration found in buffer; check value of variable
- `css-palette-types'" type))
- (let ((palette (read (current-buffer))))
- ;; Check (could be better..)
- (if (not (and
- (listp palette)
- (= 0 (% (length palette) 2))))
- (error "Invalid %s " type))
- palette))))
-
-(defun css-palette-update (type)
-"Update buffer references for palette of TYPE."
- (interactive (list
- (css-palette-choose-type)))
- (let ((palette (css-palette-get-declaration type))
- (regexp (css-palette-get :regexp type))
- (ref-follows-value (css-palette-get :ref-follows-value type)))
- (flet ((getval (key palette)
- (let ((value (plist-get palette (intern-soft key))))
- (if (null value)
- (error
- "%S not specified in %S palette "
- key
- type
- ;; (signal 'css-palette-not-found-error nil)
- )
- value))))
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward
- regexp
- (point-max) t)
- (replace-match
- (getval (match-string-no-properties (if ref-follows-value 2 1)) palette)
- nil nil nil (if ref-follows-value 1 2))))))
- (css-color-mode 1))
-
-(defun css-palette-update-all ()
- "Update all references for palettes in `css-palette-types'"
- (interactive)
- (catch 'err
- (mapc (lambda (type)
- (condition-case err
- (css-palette-update type)
- (if (y-or-n-p (format "%s, skip? " err))
- nil)))
- css-palette-types)))
-
-;; Reference Insertion
-(defun css-palette-insert-reference (type)
- "Insert `css-palette' reference of TYPE at point."
- (interactive
- (list (css-palette-choose-type)))
- (let* ((palette (css-palette-get-declaration type))
- (ref-follows-value (css-palette-get :ref-follows-value type))
- (pattern (css-palette-get :pattern type))
- (var
- (completing-read (format "%s variable: "
- (capitalize
- (substring (symbol-name type)
- 0 -1)))
- (loop for i on
- palette
- by 'cddr
- collect
- (css-palette-colorify
- (symbol-name (car i))
- (cadr i)))))
- (val (plist-get palette (read var))))
- (insert (apply 'format
- pattern
- (if ref-follows-value
- (list val var)
- (list var val))))
- (css-color-mode +1)))
-
-(defun css-palette-hex-color-p (str)
- (string-match "#\\([a-fA-F[:digit:]]\\{6\\}\\|[a-fA-F[:digit:]]\\{3\\}\\)" str))
-
-(defun css-palette-colorify (string color)
- (let ((color (if (css-palette-hex-color-p color)
- color
- "#000")))
- (propertize string
- 'font-lock-face
- (list :background color
- :foreground (css-color-foreground-color color)
- string)
- 'fontified t)))
-
-;; Imports
-(defun css-palette-from-existing-colors ()
- (interactive)
- (let ((palette)
- (count -1))
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "#[[:digit:]a-fA-F]\\{6\\}\\>" nil t)
- (if (not (member (match-string-no-properties 0) palette))
- (setq palette (append (list
- (match-string-no-properties 0)
- (intern(format "c%d" (incf count))))
- palette)))
- (save-match-data (re-search-forward ";" nil t))
- (insert (format "/*[%S]*/" (cadr (member (match-string-no-properties 0) palette))))))
- (insert (format "COLORS:\n%S" (nreverse palette)))
- (forward-sexp -1)
- (forward-char 1)
- (while
- (not (looking-at ")"))
- (forward-sexp 2)
- (newline)
- (indent-for-tab-command))))
-
-(defun css-palette-newest-GIMP-dir ()
- "Return newest (version-wise) ~/.gimp-n.n/palettes directory on disk.
-
-Return `nil' if none such directory is found."
- (catch 'none
- (concat
- (or
- (car
- (last
- (directory-files "~/" t "^.gimp-[[:digit:].]\\{3,\\}")))
- (throw 'none ()))
- "/palettes/")))
-
-(defun css-palette-import-from-GIMP ()
- "Import GIMP palette file as a `css-palette' palette.
-
-GIMP palettes can be made with the GIMP or on-line tools such as
-found at URL `http://colourlovers.com'."
- (interactive)
- (let ((file (read-file-name "File: " (css-palette-newest-GIMP-dir)))
- (this-buffer (current-buffer))
- (count -1))
- (insert "\nCOLORS:\n(\n")
- (with-temp-buffer
- (insert-file-contents file)
- (goto-char (point-min))
- (while (re-search-forward
- (concat
- "^"
- "[[:space:]]*\\([[:digit:]]+\\)" ;red
- "[[:space:]]+\\([[:digit:]]+\\)" ;green
- "[[:space:]]+\\([[:digit:]]+\\)" ;blue
- "[[:space:]]+\\(.*\\)$") ;name (=> used as comment)
- nil t)
- (destructuring-bind (rb re gb ge bb be nb ne &rest ignore)
- (cddr (match-data t))
- (let ((color
- (apply 'format "c%d \"#%02x%02x%02x\" ;%s\n"
- (incf count)
- (append
- (mapcar 'string-to-number
- (list
- (buffer-substring-no-properties rb re)
- (buffer-substring-no-properties gb ge)
- (buffer-substring-no-properties bb be)))
- (list (buffer-substring-no-properties nb ne))))))
- (with-current-buffer this-buffer
- (insert color))))))
- (insert ")")
- (message "C-c C-c to update colors")))
-
-(defun css-palette-insert-files (dir)
- "Insert a `css-palette' declaration for all files in DIR.
-
-Filenames are relative.
-Main use-case: an image directory."
- (interactive "DDirectory: ")
- (save-excursion
- (let ((image-count -1))
- (insert "\nFILES:\n(\n")
- (mapc
- (lambda (f)
- (insert
- (format "file-%d %S\n"
- (incf image-count)
- (file-relative-name
- f
- (file-name-directory (buffer-file-name))))))
- (directory-files dir t "...+"))
- (insert ")\n\n"))))
-
-;; Exports
-(defun css-palette-export-to-GIMP (type name columns)
- "Export the COLORS declaration to a GIMP (.gpl) palette.
-
-See also `gpl-mode' at URL
-`http://niels.kicks-ass.org/public/elisp/gpl.el'."
- (interactive
- (list
- (css-palette-choose-type)
- (read-string "Name: ")
- (read-number "Number of columns: " 2)))
- (let ((palette (css-palette-get-declaration type)))
- (find-file
- (concat (css-palette-newest-GIMP-dir)
- name
- ".gpl"))
- (insert
- (format "GIMP Palette
-Name: %s
-Columns: %d
-#
-" name columns))
- (loop for i on palette
- by 'cddr
- do
- (multiple-value-bind (r g b)(css-color-hex-to-rgb
- (css-color-hexify-anystring (cadr i)))
- (insert (format "%3d %3d %3d\t%s\n"
- r g b
- (car i))))))
- (if (featurep 'gpl)
- (gpl-mode)))
-
-(provide 'css-palette)
-;; css-palette.el ends here
diff --git a/emacs.d/nxhtml/util/css-simple-completion.el b/emacs.d/nxhtml/util/css-simple-completion.el
deleted file mode 100644
index 95bf27b..0000000
--- a/emacs.d/nxhtml/util/css-simple-completion.el
+++ /dev/null
@@ -1,238 +0,0 @@
-;;; css-simple-completion.el --- Partly context aware css completion
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-11-22 Sun
-;; Version:
-;; Last-Updated: 2009-11-22 Sun
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Simple partly context aware completion. Context is based on
-;; guessing mainly.
-;;
-;; This can be combined with with flymake-css.el that can check the
-;; syntax.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Fix-me: bad structure, does not fit completion frameworks
-(defun css-simple-completing-w-pred (regexp matnum prompt collection)
- (let (pre start len)
- (when (looking-back regexp (line-beginning-position) t)
- (setq pre (downcase (match-string matnum)))
- (setq len (length pre))
- (setq start (match-beginning matnum))
- (unless (try-completion pre collection)
- (throw 'result nil))
- (throw 'result (list start
- (completing-read prompt
- collection
- (lambda (alt)
- (and (>= (length alt) len)
- (string= pre
- (substring alt 0 len))))
- t
- pre))))))
-
-(defun css-simple-complete ()
- "Try to complete at current point.
-This tries to complete keywords, but no CSS values.
-
-This is of course a pity since the value syntax is a bit
-complicated. However you can at least check the syntax with
-flymake-css if you want to."
- (interactive)
- (let ((context (css-simple-guess-context))
- result
- cur
- pre
- start)
- (setq result
- (catch 'result
-
- (case context
-
- ( 'css-media-ids
- (css-simple-completing-w-pred "\\<[a-z0-9-]*" 0 "Media type: " css-media-ids))
-
- ( 'css-at-ids
- (css-simple-completing-w-pred "@\\([a-z0-9-]*\\)" 1 "At rule: @" css-at-ids))
-
- ( 'css-property-ids
- (css-simple-completing-w-pred "\\<[a-z-]*" 0 "CSS property name: " css-property-ids))
-
- ( 'css-simple-selectors
-
- ;; Fix-me: Break out the first two
- (when (looking-back "\\W#\\([a-z0-9-]*\\)")
- (setq cur (match-string 1))
- (setq start (match-beginning 1))
- (throw 'result (list (point)
- (read-string (concat "Html tag Id: " cur)))))
- (when (looking-back "\\W\\.\\([a-z0-9-]*\\)")
- (setq cur (match-string 1))
- (setq start (match-beginning 1))
- (throw 'result (list (point)
- (read-string (concat "CSS class name: " cur)))))
-
- (css-simple-completing-w-pred "[a-z0-9]:\\([a-z0-9-]*\\)" 1 "Pseudo id: " css-pseudo-ids)
-
- (css-simple-completing-w-pred "[a-z0-9-]+" 0 "HTML tag: " (cddr css-simple-selectors))
-
- (when (looking-back "\\<\\(?:#\\|\\.\\)")
- (setq pre nil)
- (while t
- (setq pre (completing-read "HTML tag, id or CSS class: " css-simple-selectors nil nil pre))
- (if (string= (substring pre 0 1) "#")
- (if (or (= 1 (length pre))
- (and (> (length pre) 2)
- (string= (substring pre 0 3) "# (")))
- (throw 'result (list (point) (concat "#" (read-string "Html tag id: #"))))
- (throw 'result (list (point) pre)))
- (if (string= (substring pre 0 1) ".")
- (if (or (= 1 (length pre))
- (and (> (length pre) 2)
- (string= (substring pre 0 3) ". (")))
- (throw 'result (list (point) (concat "." (read-string "CSS class name: ."))))
- (throw 'result (list (point) pre)))
- (when (member pre css-simple-selectors)
- (throw 'result (list (point) pre)))))
- ))))))
- (message "result=%S" result)
- (if result
- (let ((str (cadr result))
- (len (- (point) (car result))))
- (insert (substring str len)))
- (message "No matching alternatives"))))
-
-(defun css-simple-guess-context ()
- "Try to find a context matching none constant.
-Return the symbol corresponding to the context or nil if none
-could be found.
-
-The symbols are the names of the defconst holding the possibly
-matching ids.
-
-* Note: This function assumes that comments are fontified before
- point."
- ;; Kind of hand-written backward parser ... ;-)
- (let ((ignore-case t) ;; fix-me
- (here (point))
- (after-colon (and (not (bobp)) (eq (char-before) ?:)))
- ret)
- (prog1
- (catch 'return
- ;; No completion in comments.
- (when (eq (get-text-property (point) 'face)
- 'font-lock-comment-face)
- (throw 'return nil))
-
- ;; If we are not on whitespace then don't complete
- (css-simple-skip-backwards-to-code)
- (unless (or (eobp)
- (= (char-syntax (char-after)) ?\ )
- (< (point) here))
- (throw 'return nil))
-
- ;; Skip backwards to see if after first selector
- (let ((here2 (1+ (point))))
- (while (/= here2 (point))
- (setq here2 (point))
- (css-simple-skip-backwards-to-code)
- (when (and (not (bobp))
- (eq (char-before) ?,))
- (backward-char))
- (skip-chars-backward "#.:a-z0-9-")))
- ;; Selector
- (when (or (bobp)
- (eq (char-before) ?}))
- (throw 'return 'css-simple-selectors))
-
- ;; Property names
- (when (memq (char-before) '( ?{ ?\; ))
- (throw 'return 'css-property-ids))
-
- ;; If we are in the value we can't complete there yet.
- (when (eq (char-before) ?:)
- (throw 'return nil))
-
-
- ;; @
- (goto-char here)
- (skip-chars-backward "a-z0-9-")
- (when (eq (char-before) ?@)
- (throw 'return 'css-at-ids))
-
- ;; @media ids
- (when (looking-back "@media\\W+")
- (throw 'return 'css-media-ids))
-
- )
- (goto-char here))))
-;;; Fix-me: complete these ...
-;;css-descriptor-ids ;; Removed or?
-
-(defun css-simple-skip-backwards-to-code ()
- "Skip backwards until we reach code.
-Requires that comments are fontified."
- (let ((here (1+ (point))))
- (while (/= here (point))
- (setq here (point))
- (skip-syntax-backward " ")
- (unless (bobp)
- (when (memq (get-text-property (1- (point)) 'face)
- '(font-lock-comment-face font-lock-comment-delimiter-face))
- (goto-char (or (previous-single-property-change (1- (point)) 'face)
- (point-min))))))))
-
-(defconst css-simple-selectors
- '(". (for class)"
- "# (for id)"
- ;; HTML 4.01 tags
- "a" "abbr" "acronym" "address" "applet" "area" "b" "base" "basefont" "bdo" "big"
- "blockquote" "body" "br" "button" "caption" "center" "cite" "code" "col"
- "colgroup" "dd" "del" "dfn" "dir" "div" "dl" "dt" "em" "fieldset" "font" "form"
- "frame" "frameset" "head" "h1" "h2" "h3" "h4" "h5" "h6" "hr" "html" "i" "iframe" "img"
- "input" "ins" "kbd" "label" "legend" "li" "link" "map" "menu" "meta" "noframes"
- "noscript" "object" "ol" "optgroup" "option" "p" "param" "pre" "q" "s" "samp"
- "script" "select" "small" "span" "strike" "strong" "style" "sub" "sup" "table"
- "tbody" "td" "textarea" "tfoot" "th" "thead" "title" "tr" "tt" "u" "ul" "var"
- ))
-
-(provide 'css-simple-completion)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; css-simple-completion.el ends here
diff --git a/emacs.d/nxhtml/util/cus-new-user.el b/emacs.d/nxhtml/util/cus-new-user.el
deleted file mode 100644
index c727425..0000000
--- a/emacs.d/nxhtml/util/cus-new-user.el
+++ /dev/null
@@ -1,803 +0,0 @@
-;;; cus-new-user.el --- Customize some important options
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-07-10 Fri
-;; Version: 0.2
-;; Last-Updated: 2009-07-10 Fri
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Customize significant options for which different user
-;; environment expectations might dictate different defaults.
-;;
-;; After an idea of Scot Becker on Emacs Devel.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defvar cusnu-my-skin-widget nil)
-
-(defvar cusnu-insert-os-spec-fun nil)
-
-;;(customize-for-new-user)
-;;;###autoload
-(defun customize-for-new-user (&optional name)
- "Show special customization page for new user.
-"
- (interactive)
- ;;(setq debug-on-error t)
- ;;(setq buffer-read-only t)
- (require 'cus-edit)
- (let ((inhibit-read-only t)
- fill-pos)
- (pop-to-buffer (custom-get-fresh-buffer (or name "*Customizations for New Users*")))
- (buffer-disable-undo)
- (Custom-mode)
- (erase-buffer)
- (widget-insert (propertize "Easy Customization for New Users\n" 'face '(:weight bold :height 1.5)))
- (setq fill-pos (point))
- (widget-insert
- "Below are some custom options that new users often may want to
-tweak since they may make Emacs a bit more like what they expect from
-using other software in their environment.
-
-After this, at the bottom of this page, is a tool for exporting your own specific options.
-You choose which to export, make a description and give the group of options a new and click a button.
-Then you just mail it or put it on the web for others to use.
-
-Since Emacs runs in many environment and an Emacs user may use
-several of them it is hard to decide by default what a user
-wants/expects. Therefor you are given the possibility to easily
-do those changes here.
-
-Note that this is just a collection of normal custom options.
-There are no new options here.
-
-
-")
- (fill-region fill-pos (point))
-
- ;; Normal custom buffer header
- (let ((init-file (or custom-file user-init-file)))
- ;; Insert verbose help at the top of the custom buffer.
- (when custom-buffer-verbose-help
- (widget-insert "Editing a setting changes only the text in this buffer."
- (if init-file
- "
-To apply your changes, use the Save or Set buttons.
-Saving a change normally works by editing your init file."
- "
-Currently, these settings cannot be saved for future Emacs sessions,
-possibly because you started Emacs with `-q'.")
- "\nFor details, see ")
- (widget-create 'custom-manual
- :tag "Saving Customizations"
- "(emacs)Saving Customizations")
- (widget-insert " in the ")
- (widget-create 'custom-manual
- :tag "Emacs manual"
- :help-echo "Read the Emacs manual."
- "(emacs)Top")
- (widget-insert "."))
- (widget-insert "\n")
- ;; The custom command buttons are also in the toolbar, so for a
- ;; time they were not inserted in the buffer if the toolbar was in use.
- ;; But it can be a little confusing for the buffer layout to
- ;; change according to whether or nor the toolbar is on, not to
- ;; mention that a custom buffer can in theory be created in a
- ;; frame with a toolbar, then later viewed in one without.
- ;; So now the buttons are always inserted in the buffer. (Bug#1326)
-;;; (when (not (and (bound-and-true-p tool-bar-mode) (display-graphic-p)))
- (if custom-buffer-verbose-help
- (widget-insert "\n
- Operate on all settings in this buffer that are not marked HIDDEN:\n"))
- (let ((button (lambda (tag action active help icon)
- (widget-insert " ")
- (if (eval active)
- (widget-create 'push-button :tag tag
- :help-echo help :action action))))
- (commands custom-commands))
- (apply button (pop commands)) ; Set for current session
- (apply button (pop commands)) ; Save for future sessions
- (if custom-reset-button-menu
- (progn
- (widget-insert " ")
- (widget-create 'push-button
- :tag "Reset buffer"
- :help-echo "Show a menu with reset operations."
- :mouse-down-action 'ignore
- :action 'custom-reset))
- (widget-insert "\n")
- (apply button (pop commands)) ; Undo edits
- (apply button (pop commands)) ; Reset to saved
- (apply button (pop commands)) ; Erase customization
- (widget-insert " ")
- (pop commands) ; Help (omitted)
- (apply button (pop commands)))) ; Exit
- (widget-insert "\n\n")
-
- (widget-insert (propertize "\nThis part is for your own use\n" 'face '(:weight bold :height 1.5)))
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Editor emulator level
-
- (widget-insert "\n")
- (setq fill-pos (point))
- (widget-insert
-"Emacs can emulate some common editing behaviours (and some uncommon too).
-For the most common ones you can decide if you want to use them here:
-")
- (fill-region fill-pos (point))
- (cusnu-mark-part-desc fill-pos (point))
-
- ;; CUA Mode
- (cusnu-insert-options '((cua-mode custom-variable)))
-
- ;; Viper Mode
- (widget-insert "\n")
- (widget-insert (propertize "Viper" 'face 'custom-variable-tag))
- (widget-insert ":")
- (setq fill-pos (point))
- (widget-insert "
- Viper is currently set up in a special way, please see the
- command `viper-mode'. You can use custom to set up most of
- it. However if you want to load Viper at startup you must
- explicitly include \(require 'viper) in your .emacs.
-")
- (fill-region fill-pos (point))
-
- ;; Viper Mode
- (backward-delete-char 1)
- (cusnu-insert-options '((viper-mode custom-variable)))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; OS specific
-
- (widget-insert "\n")
- (setq fill-pos (point))
- (widget-insert (format "OS specific options (%s): \n" system-type))
- (fill-region fill-pos (point))
- (cusnu-mark-part-desc fill-pos (point))
-
- (if cusnu-insert-os-spec-fun
- (funcall cusnu-insert-os-spec-fun)
- (widget-insert "No OS specific customizations.\n"))
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Disputed settings
-
- (widget-insert "\n")
- (setq fill-pos (point))
- (widget-insert
-"Some old time Emacs users want to change the options below:
-")
- (fill-region fill-pos (point))
- (cusnu-mark-part-desc fill-pos (point))
-
- (cusnu-insert-options '((global-visual-line-mode custom-variable)))
- (cusnu-insert-options '((word-wrap custom-variable)))
- (cusnu-insert-options '((blink-cursor-mode custom-variable)))
- (cusnu-insert-options '((tool-bar-mode custom-variable)))
- (cusnu-insert-options '((tooltip-mode custom-variable)))
- ;;(cusnu-insert-options '((initial-scratch-message custom-variable)))
-
- (widget-insert "\n")
- (widget-insert (propertize "\n\nThis part is for exporting to others\n\n" 'face '(:weight bold :height 1.5)))
- (setq fill-pos (point))
- (widget-insert
-"My skin options - This is for exporting custom options to other users
-\(or maybe yourself on another computer).
-This works the following way:
-
-- You add a description of your options and the options you want to export below.
-Then you click on `Export my skin options'.
-This creates a file that you can send to other Emacs users.
-They simply open that file in Emacs and follow the instructions there to test your options
-and maybe save them for later use if they like them.
-\(You can follow the instructions yourself to see how it works.)
-
-Please change the group symbol name to something specific for you.
-")
- (fill-region fill-pos (point))
- (cusnu-mark-part-desc fill-pos (point))
-
- (widget-insert "\n")
- (set (make-local-variable 'cusnu-my-skin-widget)
- (car
- (cusnu-insert-options '((cusnu-my-skin-options custom-variable)))))
- (widget-insert "\n")
- (widget-create 'push-button
- :tag "Export my skin options "
- :action (lambda (&rest ignore)
- (let ((use-dialog-box nil))
- (call-interactively 'cusnu-export-my-skin-options))))
- (widget-insert "\n")
- (widget-create 'push-button
- :tag "Customize my skin options "
- :action (lambda (&rest ignore)
- (let ((use-dialog-box nil))
- (call-interactively 'cusnu-customize-my-skin-options))))
- (widget-insert "\n")
- (widget-create 'push-button
- :tag "Reset those options to saved values"
- :action (lambda (&rest ignore)
- (let ((use-dialog-box nil))
- (call-interactively 'cusnu-reset-my-skin-options))))
-
- ;; Finish setup buffer
- (mapc 'custom-magic-reset custom-options)
- (cusnu-make-xrefs)
- (widget-setup)
- (buffer-enable-undo)
- (goto-char (point-min)))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Example on Emacs+Emacw32
-(eval-when-compile (require 'emacsw32 nil t))
-(when (fboundp 'emacsw32-version)
- (defun cusnu-emacsw32-show-custstart (&rest args)
- (emacsw32-show-custstart))
- (setq cusnu-insert-os-spec-fun 'cusnu-insert-emacsw32-specific-part)
- (defun cusnu-insert-emacsw32-specific-part ()
- (cusnu-insert-options '((w32-meta-style custom-variable)))
- (widget-insert "\n")
- (widget-insert (propertize "EmacsW32" 'face 'custom-variable-tag))
- (widget-insert "
- Easy setup for Emacs+EmacsW32.")
- (widget-insert "\n ")
- (widget-create 'push-button :tag "Customize EmacsW32"
- ;;:help-echo help
- :action 'cusnu-emacsw32-show-custstart)
- (widget-insert "\n")))
-;; End example
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun cusnu-mark-part-desc (beg end)
- (let ((ovl (make-overlay beg end)))
- (overlay-put ovl 'face 'highlight)))
-
-(defun cusnu-make-xrefs (&optional beg end)
- (save-restriction
- (when (or beg end)
- (unless beg (setq beg (point-min)))
- (unless end (setq end (point-max)))
- (narrow-to-region beg end))
- (let ((here (point)))
- (goto-char (point-min))
- (cusnu-help-insert-xrefs 'cusnu-help-xref-button)
- (goto-char here))))
-
-(defun widget-info-link-action (widget &optional event)
- "Open the info node specified by WIDGET."
- (info-other-window (widget-value widget)))
-
-(defun widget-documentation-string-value-create (widget)
- ;; Insert documentation string.
- (let ((doc (widget-value widget))
- (indent (widget-get widget :indent))
- (shown (widget-get (widget-get widget :parent) :documentation-shown))
- (start (point)))
- (if (string-match "\n" doc)
- (let ((before (substring doc 0 (match-beginning 0)))
- (after (substring doc (match-beginning 0)))
- button)
- (when (and indent (not (zerop indent)))
- (insert-char ?\s indent))
- (insert before ?\s)
- (widget-documentation-link-add widget start (point))
- (setq button
- (widget-create-child-and-convert
- widget (widget-get widget :visibility-widget)
- :help-echo "Show or hide rest of the documentation."
- :on "Hide Rest"
- :off "More"
- :always-active t
- :action 'widget-parent-action
- shown))
- (when shown
- (setq start (point))
- (when (and indent (not (zerop indent)))
- (insert-char ?\s indent))
- (insert after)
- (widget-documentation-link-add widget start (point))
- (cusnu-make-xrefs start (point))
- )
- (widget-put widget :buttons (list button)))
- (when (and indent (not (zerop indent)))
- (insert-char ?\s indent))
- (insert doc)
- (widget-documentation-link-add widget start (point))))
- (insert ?\n))
-(defun cusnu-help-xref-button (match-number type what &rest args)
- (let ((beg (match-beginning match-number))
- (end (match-end match-number)))
- (if nil
- (let ((ovl (make-overlay beg end)))
- (overlay-put ovl 'face 'highlight))
- (let* ((tag (match-string match-number))
- (value what)
- (wid-type (cond
- ((eq type 'help-variable)
- 'variable-link)
- ((eq type 'help-function)
- 'function-link)
- ((eq type 'help-info)
- 'custom-manual)
- (t nil)))
- )
- (when wid-type
- (delete-region beg end)
- (backward-char)
- ;;(tag action active help icon)
- (widget-create wid-type
- ;;tag
- :value value
- :tag tag
- :keymap custom-mode-link-map
- :follow-link 'mouse-face
- :button-face 'custom-link
- :mouse-face 'highlight
- :pressed-face 'highlight
- ;;:help-echo help
- )))))
- )
-
-;; Override default ... ;-)
-(define-widget 'documentation-link 'link
- "Link type used in documentation strings."
- ;;:tab-order -1
- :help-echo "Describe this symbol"
- :button-face 'custom-link
- :action 'widget-documentation-link-action)
-
-(defun cusnu-xref-niy (&rest ignore)
- (message "Not implemented yet"))
-
-(defun cusnu-describe-function (wid &rest ignore)
- (let ((fun (widget-get wid :what))
- )
- (describe-function fun)))
-
-(defun cusnu-help-insert-xrefs (help-xref-button)
- ;; The following should probably be abstracted out.
- (unwind-protect
- (progn
- ;; Info references
- (save-excursion
- (while (re-search-forward help-xref-info-regexp nil t)
- (let ((data (match-string 2)))
- (save-match-data
- (unless (string-match "^([^)]+)" data)
- (setq data (concat "(emacs)" data))))
- (funcall help-xref-button 2 'help-info data))))
- ;; URLs
- (save-excursion
- (while (re-search-forward help-xref-url-regexp nil t)
- (let ((data (match-string 1)))
- (funcall help-xref-button 1 'help-url data))))
- ;; Mule related keywords. Do this before trying
- ;; `help-xref-symbol-regexp' because some of Mule
- ;; keywords have variable or function definitions.
- (if help-xref-mule-regexp
- (save-excursion
- (while (re-search-forward help-xref-mule-regexp nil t)
- (let* ((data (match-string 7))
- (sym (intern-soft data)))
- (cond
- ((match-string 3) ; coding system
- (and sym (coding-system-p sym)
- (funcall help-xref-button 6 'help-coding-system sym)))
- ((match-string 4) ; input method
- (and (assoc data input-method-alist)
- (funcall help-xref-button 7 'help-input-method data)))
- ((or (match-string 5) (match-string 6)) ; charset
- (and sym (charsetp sym)
- (funcall help-xref-button 7 'help-character-set sym)))
- ((assoc data input-method-alist)
- (funcall help-xref-button 7 'help-character-set data))
- ((and sym (coding-system-p sym))
- (funcall help-xref-button 7 'help-coding-system sym))
- ((and sym (charsetp sym))
- (funcall help-xref-button 7 'help-character-set sym)))))))
- ;; Quoted symbols
- (save-excursion
- (while (re-search-forward help-xref-symbol-regexp nil t)
- (let* ((data (match-string 8))
- (sym (intern-soft data)))
- (if sym
- (cond
- ((match-string 3) ; `variable' &c
- (and (or (boundp sym) ; `variable' doesn't ensure
- ; it's actually bound
- (get sym 'variable-documentation))
- (funcall help-xref-button 8 'help-variable sym)))
- ((match-string 4) ; `function' &c
- (and (fboundp sym) ; similarly
- (funcall help-xref-button 8 'help-function sym)))
- ((match-string 5) ; `face'
- (and (facep sym)
- (funcall help-xref-button 8 'help-face sym)))
- ((match-string 6)) ; nothing for `symbol'
- ((match-string 7)
-;;; this used:
-;;; #'(lambda (arg)
-;;; (let ((location
-;;; (find-function-noselect arg)))
-;;; (pop-to-buffer (car location))
-;;; (goto-char (cdr location))))
- (funcall help-xref-button 8 'help-function-def sym))
- ((and
- (facep sym)
- (save-match-data (looking-at "[ \t\n]+face\\W")))
- (funcall help-xref-button 8 'help-face sym))
- ((and (or (boundp sym)
- (get sym 'variable-documentation))
- (fboundp sym))
- ;; We can't intuit whether to use the
- ;; variable or function doc -- supply both.
- (funcall help-xref-button 8 'help-symbol sym))
- ((and
- (or (boundp sym)
- (get sym 'variable-documentation))
- (or
- (documentation-property
- sym 'variable-documentation)
- (condition-case nil
- (documentation-property
- (indirect-variable sym)
- 'variable-documentation)
- (cyclic-variable-indirection nil))))
- (funcall help-xref-button 8 'help-variable sym))
- ((fboundp sym)
- (funcall help-xref-button 8 'help-function sym)))))))
- ;; An obvious case of a key substitution:
- (save-excursion
- (while (re-search-forward
- ;; Assume command name is only word and symbol
- ;; characters to get things like `use M-x foo->bar'.
- ;; Command required to end with word constituent
- ;; to avoid `.' at end of a sentence.
- "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)*\\sw\\)" nil t)
- (let ((sym (intern-soft (match-string 1))))
- (if (fboundp sym)
- (funcall help-xref-button 1 'help-function sym)))))
- ;; Look for commands in whole keymap substitutions:
- (save-excursion
- ;; Make sure to find the first keymap.
- (goto-char (point-min))
- ;; Find a header and the column at which the command
- ;; name will be found.
-
- ;; If the keymap substitution isn't the last thing in
- ;; the doc string, and if there is anything on the
- ;; same line after it, this code won't recognize the end of it.
- (while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
- nil t)
- (let ((col (- (match-end 1) (match-beginning 1))))
- (while
- (and (not (eobp))
- ;; Stop at a pair of blank lines.
- (not (looking-at "\n\\s-*\n")))
- ;; Skip a single blank line.
- (and (eolp) (forward-line))
- (end-of-line)
- (skip-chars-backward "^ \t\n")
- (if (and (>= (current-column) col)
- (looking-at "\\(\\sw\\|\\s_\\)+$"))
- (let ((sym (intern-soft (match-string 0))))
- (if (fboundp sym)
- (funcall help-xref-button 0 'help-function sym))))
- (forward-line))))))
- ;;(set-syntax-table stab)
- ))
-
-(defun cusnu-insert-options (options)
- (widget-insert "\n")
- (setq custom-options
- (append
- (if (= (length options) 1)
- (mapcar (lambda (entry)
- (widget-create (nth 1 entry)
- ;;:documentation-shown t
- :custom-state 'unknown
- :tag (custom-unlispify-tag-name
- (nth 0 entry))
- :value (nth 0 entry)))
- options)
- (let ((count 0)
- (length (length options)))
- (mapcar (lambda (entry)
- (prog2
- (message "Creating customization items ...%2d%%"
- (/ (* 100.0 count) length))
- (widget-create (nth 1 entry)
- :tag (custom-unlispify-tag-name
- (nth 0 entry))
- :value (nth 0 entry))
- (setq count (1+ count))
- (unless (eq (preceding-char) ?\n)
- (widget-insert "\n"))
- (widget-insert "\n")))
- options)))
- custom-options))
- (unless (eq (preceding-char) ?\n)
- (widget-insert "\n"))
- custom-options
- )
-
-(defun cusnu-is-custom-obj (sym)
- "Return non-nil if symbol SYM is customizable."
- (or (get sym 'custom-type)
- (get sym 'face)
- (get sym 'custom-group)
- ))
-
-(define-widget 'custom-symbol 'symbol
- "A customizable symbol."
- :prompt-match 'cusnu-is-custom-obj
- :prompt-history 'widget-variable-prompt-value-history
- :complete-function (lambda ()
- (interactive)
- (lisp-complete-symbol 'cusnu-is-custom-obj))
- :tag "Custom option")
-
-(defun cusnu-set-my-skin-options (sym val)
- (set-default sym val)
- (let ((group (nth 0 val))
- (doc (nth 1 val))
- (members (nth 2 val)))
- (custom-declare-group group nil doc)
- (put group 'custom-group nil)
- (dolist (opt members)
- (let ((type (cusnu-get-opt-main-type opt)))
- (when type
- (custom-add-to-group group opt type))))))
-
-(defun cusnu-get-opt-main-type (opt)
- (when opt
- (cond ((get opt 'face) 'custom-face)
- ((get opt 'custom-type) 'custom-variable)
- ((get opt 'custom-group) 'custom-group))))
-
-(defgroup all-my-loaded-skin-groups nil
- "All your loaded skin groups."
- :group 'environment
- :group 'convenience)
-
-(defun cusnu-custom-group-p (symbol)
- (and (intern-soft symbol)
- (or (and (get symbol 'custom-loads)
- (not (get symbol 'custom-autoload)))
- (get symbol 'custom-group))))
-
-(defcustom cusnu-my-skin-options '(my-skin-group "My skin group.\n\n\n\n\n" nil)
- "Your custom skin-like options.
-The purpose of this variable is to provide for easy export a
-selection of variables you choose to set to other users.
-
-To send these values to other users you export them to a file
-with `cusnu-export-my-skin-options'."
- :type '(list (symbol :tag "My custom group symbol name (should be specific to you)")
- (string :tag "My custom group description")
- (repeat :tag "Add your custom options below"
- (custom-symbol :tag "My custom option")))
- :set 'cusnu-set-my-skin-options
- :group 'all-my-loaded-skin-groups)
-
-;;(cusnu-ring-bell "bell")
-(defun cusnu-ring-bell (format-string &rest args)
- (message "%s" (propertize (apply
- 'format format-string args) 'face 'secondary-selection))
- (ding)
- (throw 'bell nil))
-
-;;;###autoload
-(defun cusnu-export-my-skin-options (file)
- "Export to file FILE custom options in `cusnu-my-skin-options'.
-The options is exported to elisp code that other users can run to
-set the options that you have added to `cusnu-my-skin-options'.
-
-For more information about this see `cusnu-export-cust-group'."
- (interactive '(nil))
- (catch 'bell
- (let ((grp (nth 0 cusnu-my-skin-options))
- buf)
- (let ((state (plist-get (cdr cusnu-my-skin-widget) :custom-state)))
- (case state
- ((set saved) nil) ;;(error "test, state=%s" state))
- (standard (cusnu-ring-bell "Please enter your options first"))
- (t (cusnu-ring-bell "My Skin Options must be saved or set, use the State button, %s" state))))
- (unless (nth 2 cusnu-my-skin-options)
- (cusnu-ring-bell "You have not added any of your options"))
- (unless file
- (setq file (read-file-name "Save to file: ")))
- (when (file-exists-p file)
- (cusnu-ring-bell "File %s already exists, choose another file name" file))
- (setq buf (find-file-other-window file))
- (with-current-buffer buf
- (unless (eq major-mode 'emacs-lisp-mode) (emacs-lisp-mode))
- (unless (file-exists-p (buffer-file-name))
- (erase-buffer)))
- (cusnu-export-cust-group grp buf))))
-
-(defun cusnu-customize-my-skin-options ()
- (interactive)
- (customize-group-other-window (nth 0 cusnu-my-skin-options)))
-
-(defun cusnu-reset-my-skin-options ()
- "Reset to my defaults for those options.
-"
- (interactive)
- (cusnu-reset-group-options-to-my-defaults (nth 0 cusnu-my-skin-options)))
-
-(defun cusnu-reset-group-options-to-my-defaults (group)
- (dolist (sym-typ (get group 'custom-group))
- (let ((symbol (nth 0 sym-typ))
- ;;(type (cusnu-get-opt-main-type symbol))
- (type (nth 1 sym-typ))
- defval)
- (cond
- ((eq type 'custom-variable)
- ;; First try reset to saved.
- (let* ((set (or (get symbol 'custom-set) 'set-default))
- (value (get symbol 'saved-value))
- (comment (get symbol 'saved-variable-comment)))
- (cond ((or comment value)
- (put symbol 'variable-comment comment)
- (custom-push-theme 'theme-value symbol 'user 'set (car-safe value))
- (condition-case err
- (funcall set symbol (eval (car value)))
- (error (message "%s" err))))
- ;; If symbol was not saved then reset to standard.
- (t
- (unless (get symbol 'standard-value)
- (error "No standard setting known for %S" symbol))
- (put symbol 'variable-comment nil)
- (put symbol 'customized-value nil)
- (put symbol 'customized-variable-comment nil)
- (custom-push-theme 'theme-value symbol 'user 'reset)
- (custom-theme-recalc-variable symbol)
- (put symbol 'saved-value nil)
- (put symbol 'saved-variable-comment nil)
- ))))
- ((eq type 'custom-face)
- ;; First try reset to saved
- (let* ((value (get symbol 'saved-face))
- (comment (get symbol 'saved-face-comment)))
- (cond ((or value comment)
- (put symbol 'customized-face nil)
- (put symbol 'customized-face-comment nil)
- (custom-push-theme 'theme-face symbol 'user 'set value)
- (face-spec-set symbol value t)
- (put symbol 'face-comment comment))
- ;; If symbol was not saved then reset to standard.
- (t
- (setq value (get symbol 'face-defface-spec))
- (unless value
- (error "No standard setting for this face"))
- (put symbol 'customized-face nil)
- (put symbol 'customized-face-comment nil)
- (custom-push-theme 'theme-face symbol 'user 'reset)
- (face-spec-set symbol value t)
- (custom-theme-recalc-face symbol)
- ;; Do this later.
- (put symbol 'saved-face nil)
- (put symbol 'saved-face-comment nil)
- ))))
- (t (error "not iy"))))))
-
-(defun cusnu-export-cust-group (group buf)
- "Export custom group GROUP to end of buffer BUF.
-Only the options that has been customized will be exported.
-
-The group is exported as elisp code. Running the code will
-create a group with just those members. After this it opens a
-customization buffer with the new group.
-
-The code will also set the options to the customized values, but
-it will not save them in the users init file.
-
-See also the comment in the exported file."
- (let (start
- (doc (get group 'group-documentation))
- groups options faces
- (members (mapcar (lambda (rec)
- (car rec))
- (get group 'custom-group))))
- (with-current-buffer buf
- (insert (format-time-string ";; Here is my skin custom group %Y-%m-%d.\n"))
- (font-lock-mode 1)
- (insert (format ";;;;;; Customization group name: %s\n" group))
- (insert ";;\n")
- (let ((here (point)))
- (insert doc "\n")
- (comment-region here (point))
- (fill-region here (point)))
- (cusnu-get-options-and-faces members 'groups 'options 'faces)
- (unless (or options faces)
- (cusnu-ring-bell "There are no options or faces in %s customized by you" group))
- (insert "
-;; This file defines the group and sets the options in it, but does
-;; not save the values to your init file.
-;;
-;; To set the values evaluate this file. To do that open this file in Emacs and to
-;;
-;; M-x eval-buffer
-;;
-;; To go back to your default evaluate next line (place point at the end and to C-x C-e):
-")
- (insert (format ";; (cusnu-reset-group-options-to-my-defaults '%s)\n\n" group))
- (insert (format "(let ((grp '%s))\n" group))
- (insert (format " (custom-declare-group grp nil %S)\n" doc))
- (insert " (put grp 'custom-group nil)\n")
- (insert (format " (custom-add-to-group 'all-my-loaded-skin-groups '%s 'custom-group)\n" group))
- (dolist (opt members)
- (let ((type (cusnu-get-opt-main-type opt)))
- (when type
- (insert (format " (custom-add-to-group grp '%s '%s)\n"
- opt type)))))
- (insert " (custom-set-variables\n")
- (dolist (opt options)
- (let ((my-val (or (get opt 'saved-value)
- (get opt 'customized-value))))
- (when my-val
- (insert (format " '(%s %S)\n" opt (custom-quote (symbol-value opt)))))))
- (insert " )\n")
- (insert " (custom-set-faces\n")
- (dolist (opt faces)
- (let ((my-val (get opt 'customized-face)))
- (when my-val
- (insert (format " '(%s %S)\n" opt my-val)))))
- (insert " ))\n")
- (insert (format "\n(customize-group '%s)\n" group))
- )))
-
-(defun cusnu-get-options-and-faces (members groups-par options-par faces-par)
- (dolist (sym members)
- (insert (format ";; sym=%s\n" sym))
- (cond ((and (get sym 'custom-type)
- (or (get sym 'saved-value)
- (get sym 'customize-value)))
- (add-to-list options-par sym))
- ((and (get sym 'face)
- (get sym 'customized-face))
- (add-to-list faces-par sym))
- ((get sym 'custom-group)
- (unless (memq sym groups-par) ;; Don't loop
- (cusnu-get-options-and-faces groups-par options-par faces-par)))
- (t (insert ";; Not a custom variable or face: %s\n" sym)))))
-
-(provide 'cus-new-user)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; cus-new-user.el ends here
diff --git a/emacs.d/nxhtml/util/custsets.el b/emacs.d/nxhtml/util/custsets.el
deleted file mode 100644
index 0495dd8..0000000
--- a/emacs.d/nxhtml/util/custsets.el
+++ /dev/null
@@ -1,83 +0,0 @@
-;;; custsets.el --- Sets of named customizations
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-03-25T00:17:06+0100 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; After an idea expressed by among other Stephen Turnbull on the
-;; emacs devel list.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defcustom custsets-sets
- '(
- ("Windows"
- (cua-mode t)
- )
- )
- "Sets of customizations."
- :group 'custsets)
-
-(defun custsets-turn-on (set-name)
- (interactive "sCustomization set: ")
- (let ((set (assoc-string set-name custsets-sets t)))
- (unless set
- (error "Can't find customization set %s" set-name))
- (dolist (opt-rec (cdr set))
- (let* ((opt (car opt-rec))
- (val (cdr opt-rec))
- (saved-opt (get opt 'saved-value))
- (saved-val saved-opt) ;; fix-me
- (ask (if saved-opt
- (format "You have currently customized %s to %s. Change this to %s? "
- opt saved-opt val)
- (format "Customize %s to %s? " opt val)))
- )
- (when (y-or-n-p ask)
- (customize-set-variable opt val)
- (customize-set-value opt val)
- (customize-mark-to-save opt))
- )
- )
- (custom-save-all)))
-
-
-(provide 'custsets)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; custsets.el ends here
diff --git a/emacs.d/nxhtml/util/ecb-batch-compile.el b/emacs.d/nxhtml/util/ecb-batch-compile.el
deleted file mode 100644
index bdd86c6..0000000
--- a/emacs.d/nxhtml/util/ecb-batch-compile.el
+++ /dev/null
@@ -1,65 +0,0 @@
-;;; ecb-batch-compile.el --- Compile ecb in batch mode
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-25T04:46:35+0200 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Batch byte compile ecb:
-;;
-;; emacs -Q -l ecb-batch-compile
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-and-compile (require 'udev-ecb nil t))
-
-(let* ((this-file load-file-name)
- (this-dir (file-name-directory this-file))
- )
- (add-to-list 'load-path this-dir))
-
-;;(require 'udev-cedet)
-;;(udev-cedet-load-cedet t)
-
-(eval-when (eval)
- (udev-ecb-load-ecb)
- (ecb-byte-compile))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ecb-batch-compile.el ends here
diff --git a/emacs.d/nxhtml/util/ediff-url.el b/emacs.d/nxhtml/util/ediff-url.el
deleted file mode 100644
index 12329bd..0000000
--- a/emacs.d/nxhtml/util/ediff-url.el
+++ /dev/null
@@ -1,188 +0,0 @@
-;;; ediff-url.el --- Diffing buffer against downloaded url
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sat Nov 24 2007
-;; Version: 0.56
-;; Last-Updated: 2010-03-18 Thu
-;; URL: http://bazaar.launchpad.net/~nxhtml/nxhtml/main/annotate/head%3A/util/ediff-url.el
-;;
-;; Features that might be required by this library:
-;;
- ;; `mail-prsvr', `mm-util', `timer', `url-parse', `url-util',
- ;; `url-vars'.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This file contains a simple function, `ediff-url', to help you
-;; update a single file from the web.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'url-util)
-(eval-when-compile (require 'cl))
-
-(defvar ediff-url-read-url-history nil)
-
-(defun ediff-url-redir-launchpad (url)
- "Check if bazaar list page on Launchpad.
-If URL is a description page for a file uploaded to EmacsWiki
-suggest to use the download URL instead."
- (let* ((bazaar-url "http://bazaar.launchpad.net/")
- (bazaar-len (length bazaar-url)))
- (if (and (< bazaar-len (length url))
- (string= bazaar-url (substring url 0 bazaar-len)))
- (let* ((url-show-status nil) ;; just annoying showing status here
- (buffer (url-retrieve-synchronously url))
- (handle nil)
- (http-status nil)
- ;; Fix-me: better more flexible pattern?
- (dl-patt "<a href=\"\\(.*?\\)\">download file</a>")
- dl-url)
- (unless buffer
- (message "Got empty buffer for %s" url)
- (throw 'command-level nil))
- (with-current-buffer buffer
- (if (= 0 (buffer-size))
- (progn
- (message "Got empty page for %s" url)
- (throw 'command-level nil))
- (require 'url-http)
- (setq http-status (url-http-parse-response))
- (if (memq http-status '(200 201))
- (progn
- (goto-char (point-min))
- (unless (search-forward "\n\n" nil t)
- (error "Could not find header end in buffer for %s" url))
- (unless (re-search-forward dl-patt nil t)
- (error "Could not find download link"))
- (setq dl-url (match-string 1))
- (set-buffer-modified-p nil)
- (kill-buffer buffer)
- dl-url)
- (kill-buffer buffer)
- (setq buffer nil)
- (setq http-status
- (concat (number-to-string http-status)
- (case http-status
- (401 " (unauthorized)")
- (403 " (forbidden)")
- (404 " (not found)")
- (408 " (request timeout)")
- (410 " (gone)")
- (500 " (internal server error)")
- (503 " (service unavailable)")
- (504 " (gateway timeout)")
- (530 " (user access denied)")
- )))
- (message "Got status %s for %s" http-status url)
- (throw 'command-level nil)))))
- url)))
-
-(defun ediff-url-redir-emacswiki-description-page (url)
- "Check if description page on EmacsWiki.
-If URL is a description page for a file uploaded to EmacsWiki
-suggest to use the download URL instead."
- ;;(let* ((desc-url "http://www.emacswiki.org/emacs/")
- (let* ((emacswiki-url "http://www.emacswiki.org/")
- (emacswiki-len (length emacswiki-url)))
- (if (and (< emacswiki-len (length url))
- (string= emacswiki-url (substring url 0 emacswiki-len))
- (not (string-match-p "/download/" url)))
- (let ((prompt
- (concat "This seem to be the description page on EmacsWiki,"
- "\n\tdo you want the download url instead? ")))
- (when (y-or-n-p prompt)
- ;;(let ((start (+ 6 (string-match "/wiki/" url))))
- (let ((start (+ 7 (string-match "/emacs/" url))))
- (concat (substring url 0 start)
- "download/"
- (substring url start)))))
- ;; Not on the wiki, just return the url:
- url)))
-
-(defcustom ediff-url-redirects '(ediff-url-redir-emacswiki-description-page
- ediff-url-redir-launchpad
- )
- "List of functions checking url given to `ediff-url'.
-Each function should take an URL as argument and return this URL
-or a new URL."
- :type '(repeat function)
- :group 'ediff)
-
-;;;###autoload
-(defun ediff-url (url)
- "Compare current buffer to a web URL using `ediff-buffers'.
-Check URL using `ediff-url-redirects' before fetching the file.
-
-This is for checking downloaded file. A the file may have a comment
-telling the download URL of thise form in the header:
-
- ;; URL: http://the-server.net/the-path/the-file.el
-
-If not the user is asked for the URL."
- (interactive (let ((url-init (url-get-url-at-point)))
- (unless url-init
- (when (eq major-mode 'emacs-lisp-mode)
- (save-excursion
- (goto-char (point-min))
- (when (re-search-forward "URL:[ \t]*" nil t)
- (setq url-init (url-get-url-at-point))))))
- (list (read-from-minibuffer "Url for download file: "
- (cons (or url-init "") 1) ;nil
- nil nil
- 'ediff-url-read-url-history
- ;;url-init
- ))))
- (catch 'command-level ;; Fix-me: remove and let go to top later
- (unless (> (length url) 0)
- (message "No URL given, aborted by user")
- (throw 'command-level nil))
- ;; Check if URL seems reasonable
- (dolist (fun ediff-url-redirects)
- (setq url (funcall fun url)))
- ;; Fetch URL and run ediff
- (let* ((url-buf-name (concat "URL=" url))
- (url-buf (get-buffer url-buf-name)))
- (when url-buf
- (unless (y-or-n-p "Use previously downloaded url? ")
- (kill-buffer url-buf)
- (setq url-buf nil)))
- (unless url-buf
- (setq url-buf (get-buffer-create url-buf-name))
- (let ((current-major major-mode))
- (with-current-buffer url-buf
- (url-insert-file-contents url)
- ;; Assume same modes:
- (funcall current-major))))
- (ediff-buffers url-buf (current-buffer)))))
-
-(provide 'ediff-url)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ediff-url.el ends here
diff --git a/emacs.d/nxhtml/util/ffip.el b/emacs.d/nxhtml/util/ffip.el
deleted file mode 100644
index 42d1893..0000000
--- a/emacs.d/nxhtml/util/ffip.el
+++ /dev/null
@@ -1,304 +0,0 @@
-;;; ffip.el --- Find files in project
-;;
-;; Authors: extracted from rinari by Phil Hagelberg and Doug Alcorn
-;; Changed by Lennart Borgman
-;; Created: 2008-08-14T23:46:22+0200 Thu
-;; Version: 0.3
-;; Last-Updated: 2008-12-28 Sun
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Project data
-
-;; Fix-me: Change the inner structure of ffip projects
-(defvar ffip-project-name nil "Project name.")
-(defvar ffip-project-roots nil "Project directory roots.")
-(defvar ffip-project-type nil "Project type, `ffip-project-file-types'.")
-(defcustom ffip-project-file-types
- (list
- '(ruby "\\(\\.el$\\|\\.rb$\\|\\.js$\\|\\.emacs\\)")
- (list 'nxhtml (concat
- (regexp-opt '(".html" ".htm" ".xhtml"
- ".css"
- ".js"
- ".png" ".gif"
- ))
- "\\'"))
- )
- "Project types and file types.
-The values in this list are used to determine if a file belongs
-to the current ffip project. Entries have the form
-
- \(TYPE FILE-REGEXP)
-
-TYPE is the parameter set by `ffip-set-current-project'. Files
-matching FILE-REGEXP within the project roots are members of the
-project."
- :type '(repeat (list
- (symbol :tag "Type")
- (regexp :tag "File regexp")))
- :group 'ffip)
-
-(defvar ffip-project-file-matcher nil "Project file matcher.")
-(defvar ffip-project-files-table nil "Project file cache.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Project handling
-
-(defun ffip-reset-project ()
- "Clear project data."
- (remove-hook 'after-save-hook 'ffip-after-save)
- (setq ffip-project-name nil)
- (setq ffip-project-roots nil)
- (setq ffip-project-files-table nil)
- (setq ffip-project-type nil)
- (setq ffip-project-file-matcher nil))
-;;(ffip-reset-project)
-
-(defun ffip-is-current (name root type)
- "Return non-nil if NAME, ROOT and TYPE match current ffip project.
-See `ffip-set-current-project'."
- (and name
- (string= ffip-project-name name)
- (eq ffip-project-type type)
- (equal ffip-project-roots root)))
-
-;;;###autoload
-(defun ffip-set-current-project (name root type)
- "Setup ffip project NAME with top directory ROOT of type TYPE.
-ROOT can either be just a directory or a list of directory where
-the first used just for prompting purposes and the files in the
-rest are read into the ffip project.
-
-Type is a type in `ffip-project-file-types'."
- (unless (ffip-is-current name root type)
- (ffip-reset-project)
- (setq ffip-project-name name)
- (setq ffip-project-type type)
- (setq ffip-project-roots root)
- (message "Project %s with %s files setup for find-files-in-project"
- name (length ffip-project-files-table))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; File cache handling
-
-(defun ffip-cache-project-files (file-regexp)
- "Read files and cache their names within the ffip project."
- (let ((root ffip-project-roots))
- (message "... reading files in %s ..." root)
- (add-hook 'after-save-hook 'ffip-after-save)
- (if (not (listp root))
- (ffip-populate-files-table root file-regexp)
- (setq root (cdr root))
- (dolist (r root)
- (ffip-populate-files-table r file-regexp)))))
-
-(defun ffip-file-matcher ()
- (when ffip-project-type
- (cadr (assoc ffip-project-type ffip-project-file-types))))
-
-(defun ffip-project-files ()
- "Get a list of all files in ffip project.
-The members in the list has the format
-
- \(SHORT-NAME . FULL-NAME)
-
-where SHORT-NAME is a unique name (normally file name without
-directory) and FULL-NAME is the full file name."
- (unless ffip-project-files-table
- (let ((file-regexp (ffip-file-matcher)))
- (ffip-cache-project-files file-regexp)))
- ffip-project-files-table)
-
-;; Fix-me: Seems better to rewrite this to use
-;; project-find-settings-file.
-(defun ffip-project-root (&optional dir)
- (setq dir (or dir
- ffip-project-roots
- default-directory))
- ;;(locate-dominating-file "." "\\`\\find-file-in-project.el\\'")
- (let ((root (locate-dominating-file dir
- ;;"\\`\\.emacs-project\\'"
- "\\`\\.dir-settings\\.el\\'"
- )))
- (if root
- (file-name-directory root)
- dir)))
-
-(defun ffip-populate-files-table (file file-regexp)
- ;;(message "ffip-populate-files-table.file=%s" file)
- (if (file-directory-p file)
- (mapc (lambda (file)
- (ffip-populate-files-table file file-regexp))
- (directory-files (expand-file-name file) t "^[^\.]"))
- (let* ((file-name (file-name-nondirectory file))
- (existing-record (assoc file-name ffip-project-files-table))
- (unique-parts (ffip-get-unique-directory-names file
- (cdr existing-record))))
- (when (or (not file-regexp)
- (string-match file-regexp file-name))
- (if existing-record
- (let ((new-key (concat file-name " - " (car unique-parts)))
- (old-key (concat (car existing-record) " - "
- (cadr unique-parts))))
- (setf (car existing-record) old-key)
- (setq ffip-project-files-table
- (acons new-key file ffip-project-files-table)))
- (setq ffip-project-files-table
- (acons file-name file ffip-project-files-table)))))))
-
-(defun ffip-get-unique-directory-names (path1 path2)
- (let* ((parts1 (and path1 (split-string path1 "/" t)))
- (parts2 (and path2 (split-string path2 "/" t)))
- (part1 (pop parts1))
- (part2 (pop parts2))
- (looping t))
- (while (and part1 part2 looping)
- (if (equal part1 part2)
- (setq part1 (pop parts1) part2 (pop parts2))
- (setq looping nil)))
- (list part1 part2)))
-
-(defun ffip-file-is-in-project (file-name)
- "Return non-nil if file is in current ffip project."
- (save-match-data
- (let ((file-regexp (ffip-file-matcher))
- (roots ffip-project-roots)
- regexp)
- (if (not (listp roots))
- (setq roots (list roots))
- (setq roots (cdr roots)))
- (catch 'found
- (dolist (root roots)
- (setq file-regexp (concat root ".*" file-regexp))
- (when (string-match file-regexp file-name)
- (throw 'found t)))))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Updating on file changes
-
-(defun ffip-add-file-if-in-project (file-name)
- "Add file to cache if it in ffip project."
- (when (ffip-file-is-in-project file-name)
- ;; We have already checked so just use nil for the matcher.
- (ffip-populate-files-table file-name nil)))
-
-;; For after-save-hook
-(defun ffip-after-save ()
- "Check if a file should be added to cache."
- (condition-case err
- (ffip-add-file-if-in-project buffer-file-name)
- (error (message "%s" (error-message-string err)))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Interactive functions
-
-;;;###autoload
-(defun ffip-find-file-in-dirtree (root)
- "Find files in directory tree ROOT."
- (interactive "DFind file in directory tree: ")
- ;; Setup a temporary
- (let ((ffip-project-name nil)
- (ffip-project-roots nil)
- (ffip-project-files-table nil)
- (ffip-project-type nil)
- (ffip-project-file-matcher nil))
- (ffip-set-current-project "(temporary)" root nil)
- (call-interactively 'ffip-find-file-in-project)))
-
-(defun ffip-find-file-in-project (file)
- "Find files in current ffip project."
- (interactive
- (list
- (let* ((prompt (format "Find file in project %s: "
- ffip-project-name)))
- (if (memq ido-mode '(file 'both))
- (ido-completing-read prompt
- (mapcar 'car (ffip-project-files)))
- (let ((files (mapcar 'car (ffip-project-files))))
- (completing-read prompt
- files
- (lambda (elem) (member elem files))
- t))))))
- (find-file (cdr (assoc file ffip-project-files-table))))
-
-;;(global-set-key (kbd "C-x C-M-f") 'find-file-in-project)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Fix-me: This part should go somewhere else
-(eval-after-load 'ruby-mode
- '(progn
- (defun ffip-rails-project-files (&optional file)
- (let ((default-directory (or file (rails-root))))
- (unless (and ffip-project-roots
- (string= default-directory ffip-project-roots))
- (ffip-set-current-project
- "Rails proj"
- root
- (list default-directory
- (expand-file-name "app")
- (expand-file-name "lib")
- (expand-file-name "test"))
- 'ruby
- )))
- (ffip-project-files))
-
- (defun ffip-find-file-in-rails (file)
- (interactive
- (list (if (memq ido-mode '(file 'both))
- (ido-completing-read
- "Find file in project: "
- (mapcar 'car (ffip-rails-project-files)))
- (completing-read "Find file in project: "
- (mapcar 'car (rails-project-files))))))
- (find-file (cdr (assoc file ffip-project-files-table))))
-
- (define-key ruby-mode-map (kbd "C-x C-M-f") 'find-file-in-rails)
- (eval-after-load 'nxhtml-mode
- '(define-key nxhtml-mode-map (kbd "C-x C-M-f") 'find-file-in-rails))))
-
-(provide 'ffip)
-;;; ffip.el ends here
diff --git a/emacs.d/nxhtml/util/fold-dwim.el b/emacs.d/nxhtml/util/fold-dwim.el
deleted file mode 100644
index 11b3a3d..0000000
--- a/emacs.d/nxhtml/util/fold-dwim.el
+++ /dev/null
@@ -1,466 +0,0 @@
-;;; fold-dwim.el -- Unified user interface for Emacs folding modes
-;;
-;; Copyright (C) 2004 P J Heslin
-;;
-;; Author: Peter Heslin <p.j.heslin@dur.ac.uk>
-;; URL: http://www.dur.ac.uk/p.j.heslin/Software/Emacs/Download/fold-dwim.el
-(defconst fold-dwim:version "1.4")
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; If you do not have a copy of the GNU General Public License, you
-;; can obtain one by writing to the Free Software Foundation, Inc., 59
-;; Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-;;; Overview:
-;;
-;; DWIM stands for "do what I mean", as in the idea that one keystroke
-;; can do different things depending on the context. In this package,
-;; it means that, if the cursor is in a currently hidden folded
-;; construction, we want to show it; if it's not, we want to hide
-;; whatever fold the cursor is in.
-;;
-;; Some editors other than Emacs provide a single mechanism for
-;; folding text which various file types can exploit. The advantage
-;; of this arrangement is that the user only has to know one set of
-;; folding commands; the disadvantage is that the various file types
-;; are limited to using whatever functionality is provided centrally.
-;; Emacs by contrast provides a very general and powerful framework
-;; for hiding text, which major modes can use as they see fit. The
-;; advantage of this is that each major mode can deal with folding in
-;; the way that is suitable for that type of file; the disadvantage is
-;; that different major modes have different styles of folding, and
-;; provide different key bindings.
-;;
-;; In practice, matters are simpler than that, since most major modes
-;; delegate the task of folding to packages like outline.el and
-;; hideshow.el. The key bindings for these two packages alone,
-;; however, are numerous and for some people hard to type. Another
-;; usability complication arises when a package like AucTeX uses
-;; outline-minor-mode for some folds, and provides its own
-;; key-bindings for other kinds of folds. Likewise, nXML-mode
-;; provides its own style of folding for certain types of files, but
-;; for files that don't fit that paradigm (such as XHTML), you may
-;; want to use outline-minor-mode instead.
-;;
-;; The goal of this package is to reduce this complexity to three
-;; globally-defined keystrokes: one to toggle the state of the fold at
-;; point, whatever its type may be, one to hide all folds of all types
-;; in the buffer, and one to show all folds.
-;;
-;; This package currently knows about folding-mode (from folding.el),
-;; hs-minor-mode (from hideshow.el), outline-minor-mode (from
-;; outline.el), TeX-fold-mode (from AUCTeX), and nXML-mode outlining.
-;; More could be added. It is not necessary to have folding.el,
-;; AUCTeX or nXML-mode installed, if you just want to use it with the
-;; built-in modes.
-
-;;; Usage:
-;;
-;; You will need to have one or more of following minor modes switched
-;; on: hs-minor-mode, outline-minor-mode, TeX-fold-mode, folding-mode.
-;; Otherwise no folds may be found. There are three functions to try:
-;;
-;; fold-dwim-toggle: try to show any hidden text at the cursor; if no
-;; hidden text is found, try to hide the text at the cursor.
-;;
-;; fold-dwim-hide-all: hide all folds in the buffer.
-;;
-;; fold-dwim-show-all: show all folds in the buffer.
-
-;;; Configuration
-;;
-;; This package binds no keys by default, so you need to find three
-;; free and convenient key-bindings. This is what I use:
-;;
-;; (global-set-key (kbd "<f7>") 'fold-dwim-toggle)
-;; (global-set-key (kbd "<M-f7>") 'fold-dwim-hide-all)
-;; (global-set-key (kbd "<S-M-f7>") 'fold-dwim-show-all)
-;;
-
-;;; Advanced Configuration
-;;
-;; With respect to outline-minor-mode (or outline-mode), dwim-fold
-;; provides two different styles of usage. The first is a "nested"
-;; style which only shows top-level headings when you fold the whole
-;; buffer, and then allows you to drill down progressively through the
-;; other levels. The other is a "flat" style, whereby folding the
-;; entire buffer shows all headings at every level.
-;;
-;; The default is "flat", but if you want to change the default, you
-;; can set the value of fold-dwim-outline-style-default to be 'flat or
-;; 'nested. If you wish to override the default for a particular
-;; major mode, put a value of either 'flat or 'nested for the
-;; fold-dwim-outline-style property of the major-mode symbol, like so:
-;;
-;; (put 'org-mode 'fold-dwim-outline-style 'nested)
-;;
-;; At present, there is no way to customize nXML-mode outlining to use
-;; the nested style, since it is not really supported by that mode
-;; (there is no function to hide all text and subheadings in the
-;; buffer).
-
-;;; Compatibility
-;;
-;; Tested with GNU Emacs CVS (from Sept. 10, 2004), AUCTeX version
-;; 11.53, nxml-mode version 20041004, folding.el version 2.97.
-;;
-;; If there are any other important major or minor modes that do
-;; folding and that could usefully be handled in this package, please
-;; let me know.
-
-;;; Bugs
-;;
-;; It is possible that some of the various folding modes may interact
-;; badly if used together; I have not tested all permutations.
-;;
-;; The function fold-dwim-hide tries various folding modes in
-;; succession, and stops when it finds one that successfully makes a
-;; fold at point. This means that the order in which those modes are
-;; tried is significant. I have not spent a lot of time thinking
-;; about what the optimal order would be; all I care about is that
-;; hideshow and TeX-fold have priority over outline-minor-mode (since
-;; for me they usually fold smaller chunks of the file).
-;;
-;; I don't use folding.el myself, so that functionality is not well
-;; tested.
-
-;;; Changes
-;;
-;; 1.0 Initial release
-;; 1.1 Bugfix: test if folding-mode is bound
-;; 1.2 fold-dwim-hide-all and -show-all operate only on active region
-;; in transient-mark-mode.
-;; 1.3 Added outline-mode (Lennart Borgman)
-;; 1.4 Removed nxml-mode style folding (Lennart Borgman)
-;; + some functions used by nXhtml.
-
-(require 'outline)
-(require 'hideshow)
-
-;;;###autoload
-(defgroup fold-dwim nil
- "Unified interface to folding commands"
- :prefix "fold-dwim-"
- :group 'editing)
-
-(defcustom fold-dwim-outline-style-default 'flat
- "Default style in which to fold in outline-minor-mode: 'nested or
- 'flat."
- :type '(choice (const :tag "Flat (show all headings)" flat)
- (const :tag "Nested (nest headings hierarchically)" nested))
- :group 'fold-dwim)
-
-(defvar fold-dwim-toggle-selective-display 'nil
- "Set this non-nil to make fold-dwim functions use selective
- display (folding of all lines indented as much or more than the
- current line). Probably only useful for minor modes like
- makefile-mode that don't provide a more intelligent way of
- folding.")
-
-(make-variable-buffer-local
- 'fold-dwim-toggle-selective-display)
-
-(defun fold-dwim-maybe-recenter ()
- "It's annoyingly frequent that hiding a fold will leave you
-with point on the top or bottom line of the screen, looking at
-nothing but an ellipsis. TODO: only recenter if we end up near
-the top or bottom of the screen"
- (recenter))
-
-(defun fold-dwim-toggle-selective-display ()
- "Set selective display to indentation of current line"
- (interactive)
- (if (numberp selective-display)
- (set-selective-display nil)
- (save-excursion
- (beginning-of-line)
- (skip-chars-forward " \t")
- (let ((col (current-column)))
- (if (zerop col)
- (set-selective-display nil)
- (set-selective-display col))))))
-
-(defun fold-dwim-hide-all ()
- "Hide all folds of various kinds in the buffer or region"
- (interactive)
- (save-excursion
- (save-restriction
- (when (and transient-mark-mode mark-active)
- (narrow-to-region (region-beginning) (region-end)))
- (when (and (boundp 'TeX-fold-mode) TeX-fold-mode)
- (TeX-fold-buffer))
- (when hs-minor-mode
- (hs-hide-all))
- (when (or outline-minor-mode (eq major-mode 'outline-mode))
- (if (fold-dwim-outline-nested-p)
- (hide-sublevels 1)
- (hide-body)))
- ;; (when (derived-mode-p 'nxml-mode)
- ;; (nxml-hide-all-text-content))
- (when (and (boundp 'folding-mode) folding-mode)
- (folding-whole-buffer))))
- (fold-dwim-maybe-recenter))
-
-(defun fold-dwim-show-all ()
- "Show all folds of various kinds in the buffer or region"
- (interactive)
- (save-excursion
- (save-restriction
- (when (and transient-mark-mode mark-active)
- (narrow-to-region (region-beginning) (region-end)))
- (when (and (boundp 'TeX-fold-mode) TeX-fold-mode)
- (TeX-fold-clearout-buffer))
- (when hs-minor-mode
- (hs-show-all))
- ;; (when (derived-mode-p 'nxml-mode)
- ;; (nxml-show-all))
- (when (or outline-minor-mode (eq major-mode 'outline-mode))
- (show-all))
- (when (and (boundp 'folding-mode) folding-mode)
- (folding-open-buffer))
- (when fold-dwim-toggle-selective-display
- (set-selective-display 'nil)))))
-
-(defun fold-dwim-hide ()
- "Hide one item"
- (or (and (boundp 'TeX-fold-mode)
- TeX-fold-mode
- (let ((type (fold-dwim-auctex-env-or-macro)))
- (when type
- (TeX-fold-item type))))
- ;; Look for html headers.
- (when (and (derived-mode-p 'nxml-mode 'html-mode)
- outline-minor-mode)
- (when (save-excursion
- (save-match-data
- (looking-back (rx "<" (optional "/")
- "h" (any "1-6")
- (0+ (not (any "<")))))))
- (hide-entry)
- t))
- (and hs-minor-mode
- (when (save-excursion
- (or (hs-find-block-beginning) (hs-inside-comment-p)))
- (hs-hide-block)
- (hs-already-hidden-p)))
- ;; (and (derived-mode-p 'nxml-mode)
- ;; (condition-case nil
- ;; (save-excursion
- ;; (nxml-back-to-section-start))
- ;; (error nil))
- ;; (nxml-hide-text-content))
- (and (boundp 'folding-mode)
- folding-mode
- (condition-case nil
- (save-excursion
- (folding-hide-current-entry)
- t)
- (error nil)))
- (when (or outline-minor-mode (eq major-mode 'outline-mode))
- (if (fold-dwim-outline-nested-p)
- (hide-subtree)
- (hide-entry))))
- (fold-dwim-maybe-recenter))
-
-
-(defun fold-dwim-show ()
- "If point is in a closed or temporarily open fold,
- open it. Returns nil if nothing was done"
- (save-excursion
- (let ((stop))
- (when (and (or outline-minor-mode (eq major-mode 'outline-mode))
- (or (fold-dwim-outline-invisible-p (line-end-position))
- (and (bolp)
- (not (bobp))
- (fold-dwim-outline-invisible-p (1- (point))))))
- (if (not (fold-dwim-outline-nested-p))
- (show-entry)
- (show-children)
- (show-entry))
- (setq stop "outline-minor-mode"))
- (when (and (not stop)
- hs-minor-mode
- (hs-already-hidden-p))
- (hs-show-block)
- (setq stop "hs-minor-mode"))
- (when (and (not stop)
- (boundp 'TeX-fold-mode)
- TeX-fold-mode)
- (let ((overlays (overlays-at (point))))
- (while overlays
- (when (eq (overlay-get (car overlays) 'category) 'TeX-fold)
- (delete-overlay (car overlays))
- (setq stop "Tex-fold-mode"))
- (setq overlays (cdr overlays)))))
- ;; (when (and (not stop)
- ;; (derived-mode-p 'nxml-mode))
- ;; (let ((overlays (overlays-at (point))))
- ;; (while (and overlays (not stop))
- ;; (when (overlay-get (car overlays) 'nxml-outline-display)
- ;; (setq stop "nxml folding"))
- ;; (setq overlays (cdr overlays))))
- ;; (when stop
- ;; (nxml-show)))
- (when (and (not stop)
- (boundp 'folding-mode)
- folding-mode
- (save-excursion
- (beginning-of-line)
- (let ((current-line-mark (folding-mark-look-at)))
- (when (and (numberp current-line-mark)
- (= current-line-mark 0))
- (folding-show-current-entry)
- (setq stop "folding-mode"))))))
- stop)))
-
-;;;###autoload
-(defun fold-dwim-toggle ()
- "Toggle visibility or some other visual things.
-Try toggling different visual things in this order:
-
-- Images shown at point with `inlimg-mode'
-- Text at point prettified by `html-write-mode'.
-
-For the rest it unhides if possible, otherwise hides in this
-order:
-
-- `org-mode' header or something else using that outlines.
-- Maybe `fold-dwim-toggle-selective-display'.
-- `Tex-fold-mode' things.
-- In html if `outline-minor-mode' and after heading hide content.
-- `hs-minor-mode' things.
-- `outline-minor-mode' things. (Turns maybe on this.)
-
-It uses `fold-dwim-show' to show any hidden text at point; if no
-hidden fold is found, try `fold-dwim-hide' to hide the
-construction at the cursor.
-
-Note: Also first turn on `fold-dwim-mode' to get the keybinding
-for this function from it."
- (interactive)
- (fold-dwim-mode 1)
- (cond
- ((get-char-property (point) 'html-write)
- (html-write-toggle-current-tag))
- ((get-char-property (point) 'inlimg-img)
- (inlimg-toggle-display (point)))
- ((eq major-mode 'org-mode)
- (org-cycle))
- ((and (fboundp 'outline-cycle)
- outline-minor-mode)
- (outline-cycle))
- (t
- (unless (or outline-minor-mode hs-minor-mode)
- (outline-minor-mode 1))
- (if fold-dwim-toggle-selective-display
- (fold-dwim-toggle-selective-display)
- (let ((unfolded (fold-dwim-show)))
- (if unfolded
- (message "Fold DWIM showed: %s" unfolded)
- (fold-dwim-hide)))))))
-
-;;;###autoload
-(define-minor-mode fold-dwim-mode
- "Key binding for `fold-dwim-toggle'."
- :global t
- :group 'nxhtml
- :group 'foldit
- nil)
-
-;; Fix-me: Maybe move to fold-dwim and rethink?
-(defvar fold-dwim-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) ?+] 'fold-dwim-toggle)
- map))
-
-;;;###autoload
-(defun fold-dwim-unhide-hs-and-outline ()
- "Unhide everything hidden by Hide/Show and Outline.
-Ie everything hidden by `hs-minor-mode' and
-`outline-minor-mode'."
- (interactive)
- (hs-show-all)
- (show-all))
-
-;;;###autoload
-(defun fold-dwim-turn-on-hs-and-hide ()
- "Turn on minor mode `hs-minor-mode' and hide.
-If major mode is derived from `nxml-mode' call `hs-hide-block'
-else call `hs-hide-all'."
- (interactive)
- (hs-minor-mode 1)
- (foldit-mode 1)
- (if (derived-mode-p 'nxml-mode)
- (hs-hide-block)
- (hs-hide-all)))
-
-;;;###autoload
-(defun fold-dwim-turn-on-outline-and-hide-all ()
- "Turn on `outline-minor-mode' and call `hide-body'."
- (interactive)
- (outline-minor-mode 1)
- (foldit-mode 1)
- (hide-body))
-
-(defun fold-dwim-auctex-env-or-macro ()
- (let ((type (cond
- ;; Fold macro before env, unless it's begin or end
- ((save-excursion
- (let ((macro-start (TeX-find-macro-start)))
- (and macro-start
- (not (= macro-start (point)))
- (goto-char macro-start)
- (not (looking-at
- (concat (regexp-quote TeX-esc)
- "\\(begin\\|end\\)[ \t]*{"))))))
- 'macro)
- ((and (eq major-mode 'context-mode)
- (save-excursion
- (ConTeXt-find-matching-start) (point)))
- 'env)
- ((and (eq major-mode 'texinfo-mode)
- (save-excursion
- (Texinfo-find-env-start) (point)))
- 'env)
- ((and (eq major-mode 'latex-mode)
- (condition-case nil
- (save-excursion
- (LaTeX-find-matching-begin) (point)
- (not (looking-at "\\\\begin[ \t]*{document}")))
- (error nil)))
- 'env)
- (t
- nil))))
- type))
-
-(defun fold-dwim-outline-invisible-p (pos)
- "The version of this function in outline.el doesn't work so
- well for our purposes, because it doesn't distinguish between
- invisibility caused by outline, and that of other modes."
- (save-excursion
- (goto-char pos)
- (let ((overlays (overlays-at (point)))
- (found-one))
- (while overlays
- (when (eq (overlay-get (car overlays) 'invisible) 'outline)
- (setq found-one t))
- (setq overlays (cdr overlays)))
- found-one)))
-
-(defun fold-dwim-outline-nested-p ()
- "Are we using the flat or nested style for outline-minor-mode?"
- (let ((style (get major-mode 'fold-dwim-outline-style)))
- (if style
- (eq style 'nested)
- (eq fold-dwim-outline-style-default 'nested))))
-
-(provide 'fold-dwim)
diff --git a/emacs.d/nxhtml/util/foldit.el b/emacs.d/nxhtml/util/foldit.el
deleted file mode 100644
index 0ffacc3..0000000
--- a/emacs.d/nxhtml/util/foldit.el
+++ /dev/null
@@ -1,357 +0,0 @@
-;;; foldit.el --- Helpers for folding
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-08-10 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Defines `foldit-mode' which puts visual clues on hidden regions.
-;; Does not do any folding itself but works with `outline-minor-mode'
-;; and `hs-minor-mode'.
-;;
-;; Fix-me: reveal-mode does not work with this and I have no idea why
-;; ...
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Fix-me: start-tag-beg/start-tag-end are workarounds for smaller
-;; bugs in hs-minor-mode and outline-minor-mode. Maybe try to fix
-;; them... - but there are a whole bunch of other invisibilty related
-;; bugs that ought to be fixed first since otherwise it is impossible
-;; to know where point goes after hiding/unhiding.
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'hideshow))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'outline))
-
-(defsubst foldit-overlay-priority ()
- (1+ (or (and (boundp 'mlinks-link-overlay-priority)
- mlinks-link-overlay-priority)
- 100)))
-
-;;;###autoload
-(defgroup foldit nil
- "Customization group for foldit folding helpers."
- :group 'nxhtml)
-
-(defvar foldit-temp-at-point-ovl nil)
-(make-variable-buffer-local 'foldit-temp-at-point-ovl)
-
-;;;###autoload
-(define-minor-mode foldit-mode
- "Minor mode providing visual aids for folding.
-Shows some hints about what you have hidden and how to reveal it.
-
-Supports `hs-minor-mode', `outline-minor-mode' and major modes
-derived from `outline-mode'."
- :lighter nil
- (if foldit-mode
- (progn
- ;; Outline
- (add-hook 'outline-view-change-hook 'foldit-outline-change nil t)
- ;; Add our overlays
- (when (or (and (boundp 'outline-minor-mode) outline-minor-mode)
- ;; Fix-me: mumamo
- (derived-mode-p 'outline-mode)) (foldit-outline-change))
- ;; hs
- (unless (local-variable-p 'hs-set-up-overlay)
- (set (make-local-variable 'hs-set-up-overlay) 'foldit-hs-set-up-overlay))
- ;; Add our overlays
- (when (or (and (boundp 'hs-minor-mode) hs-minor-mode))
- (save-restriction
- (widen)
- (let (ovl)
- (dolist (ovl (overlays-in (point-min) (point-max)))
- (when (eq (overlay-get ovl 'invisible) 'hs)
- (funcall hs-set-up-overlay ovl)))))))
- ;; Outline
- (remove-hook 'outline-view-change-hook 'foldit-outline-change t)
- ;; hs
- (when (and (local-variable-p 'hs-set-up-overlay)
- (eq hs-set-up-overlay 'foldit-hs-set-up-overlay))
- (kill-local-variable 'hs-set-up-overlay))
- ;; Remove our overlays
- (save-restriction
- (widen)
- (let (ovl prop)
- (dolist (ovl (overlays-in (point-min) (point-max)))
- (when (setq prop (overlay-get ovl 'foldit))
- (case prop
- ;;('display (overlay-put ovl 'display nil))
- ('foldit (delete-overlay ovl))
- (t (delete-overlay ovl))
- )))))))
-
-(defcustom foldit-avoid '(org-mode)
- "List of major modes to avoid."
- :group 'foldit)
-
-;;;###autoload
-(define-globalized-minor-mode foldit-global-mode foldit-mode
- (lambda () (foldit-mode 1))
- :group 'foldit)
-
-(defun foldit-hidden-line-str (hidden-lines type)
- "String to display for hidden lines.
-HIDDEN-LINES are the number of lines and TYPE is a string
-indicating how they were hidden."
- (propertize (format " ...(%d %slines)" hidden-lines type)
- 'face 'shadow))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Outline
-
-(defvar foldit-outline-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map "\r" 'foldit-outline-show-entry)
- (define-key map [down-mouse-1] 'foldit-outline-show-entry)
- (define-key map [S-tab] 'mlinks-backward-link)
- (define-key map [tab] 'mlinks-forward-link)
- (define-key map "\t" 'mlinks-forward-link)
- map))
-
-(defun foldit-outline-change ()
- "Check outline overlays.
-Run this in `outline-view-change-hook'."
- ;; We get the variables FROM and TO here from `outline-flag-region'
- ;; so let us use them. But O is hidden...
- (let* (from
- to
- num-lines
- ovl
- (tag ""))
- (cond
- ((and (boundp 'start)
- start
- (boundp 'end)
- end)
- (setq from start)
- (setq to end))
- (t
- (setq from (point-min))
- (setq to (point-max))))
- (dolist (ovl (overlays-in from to))
- (when (eq (overlay-get ovl 'invisible) 'outline)
- (setq num-lines (count-lines (overlay-start ovl) (overlay-end ovl)))
- (overlay-put ovl 'display (concat
- (propertize "+" 'face 'mode-line)
- ""
- tag (foldit-hidden-line-str num-lines "")))
- (overlay-put ovl 'foldit 'display) ;; Should be a list...
- (overlay-put ovl 'keymap foldit-outline-keymap)
- (overlay-put ovl 'face 'lazy-highlight)
- (overlay-put ovl 'mouse-face 'highlight)
- (overlay-put ovl 'help-echo "Press RET to show hidden part")
- (overlay-put ovl 'mlinks-link t)
- (overlay-put ovl 'priority (foldit-overlay-priority))
- (mumamo-with-buffer-prepared-for-jit-lock
- (let* ((start-tag-beg (overlay-start ovl))
- (start-tag-end start-tag-beg))
- (put-text-property start-tag-beg (+ start-tag-beg 1)
- 'foldit-tag-end (copy-marker start-tag-end))))
- ))))
-
-(defvar foldit-outline-hide-again-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map "\r" 'foldit-outline-hide-again)
- (define-key map [down-mouse-1] 'foldit-outline-hide-again)
- (define-key map [S-tab] 'mlinks-backward-link)
- (define-key map [tab] 'mlinks-forward-link)
- (define-key map "\t" 'mlinks-forward-link)
- map))
-
-(defun foldit-outline-show-entry ()
- "Show hidden entry."
- (interactive)
- (let ((tag-end (get-text-property (point) 'foldit-tag-end)))
- (show-entry)
- (mumamo-with-buffer-prepared-for-jit-lock
- (set-text-properties (point) (+ (point) 2) 'foldit-tag-end))
- (when tag-end (goto-char tag-end))
- (foldit-add-temp-at-point-overlay "-"
- foldit-outline-hide-again-keymap
- "Press RET to hide again")))
-
-(defun foldit-outline-hide-again ()
- "Hide entry again."
- (interactive)
- (when (overlayp foldit-temp-at-point-ovl)
- (delete-overlay foldit-temp-at-point-ovl))
- (hide-entry))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Hide/Show
-
-(defvar foldit-hs-start-tag-end-func 'foldit-hs-default-start-tag-end)
-(make-variable-buffer-local 'foldit-hs-start-tag-end-func)
-(put 'foldit-hs-start-tag-end-func 'permanent-local t)
-
-(defun foldit-hs-default-start-tag-end (beg)
- "Find end of hide/show tag beginning at BEG."
- (min (+ beg 65)
- (save-excursion
- (goto-char beg)
- (line-end-position))))
-
-(defvar foldit-hs-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map "\r" 'foldit-hs-show-block)
- (define-key map [down-mouse-1] 'foldit-hs-show-block)
- (define-key map [S-tab] 'mlinks-backward-link)
- (define-key map [tab] 'mlinks-forward-link)
- (define-key map "\t" 'mlinks-forward-link)
- map))
-
-(defvar foldit-hs-hide-again-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map "\r" 'foldit-hs-hide-again)
- (define-key map [down-mouse-1] 'foldit-hs-hide-again)
- (define-key map [S-tab] 'mlinks-backward-link)
- (define-key map [tab] 'mlinks-forward-link)
- (define-key map "\t" 'mlinks-forward-link)
- map))
-
-(defun foldit-hs-set-up-overlay (ovl)
- "Set up overlay OVL for hide/show."
- (let* ((num-lines (count-lines (overlay-start ovl) (overlay-end ovl)))
- (here (point))
- (start-tag-beg (overlay-start ovl))
- (start-tag-end (funcall foldit-hs-start-tag-end-func start-tag-beg))
- (tag (buffer-substring start-tag-beg start-tag-end)))
- (goto-char here)
- ;;(overlay-put ovl 'isearch-open-invisible t)
- (overlay-put ovl 'display (concat
- (propertize "+" 'face 'mode-line)
- " "
- tag (foldit-hidden-line-str num-lines "h")))
- (overlay-put ovl 'foldit 'display)
- (overlay-put ovl 'keymap foldit-hs-keymap)
- (overlay-put ovl 'face 'next-error)
- (overlay-put ovl 'face 'lazy-highlight)
- (overlay-put ovl 'mouse-face 'highlight)
- (overlay-put ovl 'help-echo "Press RET to show hidden part")
- (overlay-put ovl 'mlinks-link t)
- (overlay-put ovl 'priority (foldit-overlay-priority))
- (mumamo-with-buffer-prepared-for-jit-lock
- (put-text-property start-tag-beg (+ start-tag-beg 1)
- 'foldit-tag-end (copy-marker start-tag-end)))))
-
-(defun foldit-hs-show-block ()
- "Show hidden block."
- (interactive)
- (let ((tag-end (get-text-property (point) 'foldit-tag-end)))
- (hs-show-block)
- (mumamo-with-buffer-prepared-for-jit-lock
- (set-text-properties (point) (+ (point) 2) 'foldit-tag-end))
- (when tag-end (goto-char tag-end))
- (foldit-add-temp-at-point-overlay "-"
- foldit-hs-hide-again-keymap
- "Press RET to hide again")))
-
-(defun foldit-hs-hide-again ()
- "Hide hide/show block again."
- (interactive)
- (when (overlayp foldit-temp-at-point-ovl)
- (delete-overlay foldit-temp-at-point-ovl))
- (hs-hide-block))
-
-
-;;; Fix-me: break out this
-;; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-(defun foldit-add-temp-at-point-overlay (marker keymap msg)
- "Add a temporary overlay with a marker MARKER and a keymap KEYMAP.
-The overlay is also given the help echo MSG.
-
-This overlay is removed as soon as point moves from current point."
- (let ((ovl (make-overlay (point) (1+ (point))))
- (real (buffer-substring (point) (1+ (point)))))
- (overlay-put ovl 'isearch-open-invisible t)
- (overlay-put ovl 'display (concat
- (propertize marker 'face 'mode-line)
- " "
- msg
- real))
- (overlay-put ovl 'foldit 'foldit)
- (overlay-put ovl 'keymap keymap)
- (overlay-put ovl 'face 'lazy-highlight)
- (overlay-put ovl 'mouse-face 'highlight)
- (overlay-put ovl 'help-echo msg)
- (overlay-put ovl 'mlinks-link t)
- (overlay-put ovl 'priority (foldit-overlay-priority))
- (setq foldit-temp-at-point-ovl ovl)
- (add-hook 'post-command-hook
- 'foldit-remove-temp-at-point-overlay
- nil t)))
-
-(defun foldit-remove-temp-at-point-overlay ()
- "Remove overlay made by `foldit-add-temp-at-point-overlay'."
- (condition-case err
- (unless (and foldit-temp-at-point-ovl
- (overlay-buffer foldit-temp-at-point-ovl)
- (= (overlay-start foldit-temp-at-point-ovl)
- (point)))
- (delete-overlay foldit-temp-at-point-ovl)
- (setq foldit-temp-at-point-ovl nil)
- (remove-hook 'post-command-hook 'foldit-remove-temp-at-point-overlay t)
- )
- (error (message "foldit-remove-temp-at-point-overlay: %s"
- (propertize (error-message-string err))))))
-;; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
-
-
-;; (defun put-before-on-invis ()
-;; (let* (o
-;; (io (catch 'io
-;; (dolist (o (overlays-at (1+ (point))))
-;; (when (overlay-get o 'invisible)
-;; (throw 'io o)))))
-;; (str (propertize "IOSTRING"
-;; 'face 'secondary-selection
-;; )))
-;; (overlay-put io 'before-string str)
-;; ;;(overlay-put io 'display "display")
-;; (overlay-put io 'display nil)
-;; ;;(overlay-put io 'after-string "AFTER")
-;; ))
-
-(provide 'foldit)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; foldit.el ends here
diff --git a/emacs.d/nxhtml/util/fupd.el b/emacs.d/nxhtml/util/fupd.el
deleted file mode 100644
index bb8b3af..0000000
--- a/emacs.d/nxhtml/util/fupd.el
+++ /dev/null
@@ -1,127 +0,0 @@
-;;; fupd.el --- Helper functions for updating files
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Tue Feb 28 17:21:20 2006
-;; Version: 0.1
-;; Last-Updated: Tue Feb 20 21:09:20 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Helper functions for updating files.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defun fupd-has-contents (file content)
- "Check if file FILE contains CONTENT.
-Return a vector with these elements:
-- elt 0: t if file contains CONTENT and buffer is not modified.
-- elt 1: t if file contains CONTENT.
-- elt 2: file buffer if file exists.
-- elt 3: nil unless file already was in a buffer."
- (let (ok same buffer old-buffer)
- (when (file-exists-p file)
- (setq buffer (get-file-buffer file))
- (setq old-buffer (when buffer t))
- (unless buffer
- (setq buffer (find-file-noselect file)))
- (with-current-buffer buffer
- (setq same (string=
- content
- (buffer-substring-no-properties
- (point-min) (point-max)))))
- (setq ok (and same
- (not (buffer-modified-p buffer)))))
- (vector ok same buffer old-buffer)))
-
-(defun fupd-ok (ret-val)
- "Return t if RET-VAL indicate file is uptodate.
-RET-VAL should be the return value from `fupd-has-contents'."
- (elt ret-val 0))
-
-(defun fupd-kill-new-buffer (ret-val)
- "Kill new buffer indicated by RET-VAL.
-RET-VAL should be the return value from `fupd-has-contents'."
- (unless (elt ret-val 3)
- (let ((buffer (elt ret-val 2)))
- (when (bufferp buffer)
- ;;(message "fupd-kill-new-buffer: %s" (buffer-file-name buffer))(sit-for 4)
- (kill-buffer buffer)))))
-
-;;(fupd-has-contents buffer-file-name (buffer-string))
-;;(fupd-update-file buffer-file-name (buffer-string))
-(defun fupd-update-file (file content)
- "Update file FILE with content CONTENT.
-Do nothing if the file already has that content. If the file was
-not in a buffer before kill the file's buffer afterwards.
-
-Return t if the file was updated, otherwise nil."
- (let* ((osbo (fupd-has-contents file content))
- (ok (elt osbo 0))
- (same (elt osbo 1))
- (buff (elt osbo 2))
- (oldb (elt osbo 3))
- wrote
- )
- (unless ok
- (if buff
- (with-current-buffer buff
- (unless same
- (erase-buffer)
- (insert content))
- (save-buffer)
- (setq wrote t)
- (unless oldb
- (kill-buffer (current-buffer))))
- (with-temp-buffer
- (insert content)
- (write-file file))))
- wrote))
-
-;; (defun fupd-copy-file (from-file to-file)
-;; (let (
-;; (from-buff (find-buffer-visiting from-file))
-;; (to-buff (find-buffer-visiting to-file))
-;; (from-attr (file-attributes from-file))
-;; (to-attr (file-attributes to-file))
-;; (from-size (nth 7 from-attr))
-;; (to-size (nth 7 to-attr))
-;; (from-mod (nth 5 from-attr))
-;; (to-mode (nth 5 to-attr))
-;; )
-;; ))
-
-(provide 'fupd)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; fupd.el ends here
diff --git a/emacs.d/nxhtml/util/gimpedit.el b/emacs.d/nxhtml/util/gimpedit.el
deleted file mode 100644
index e624e9f..0000000
--- a/emacs.d/nxhtml/util/gimpedit.el
+++ /dev/null
@@ -1,172 +0,0 @@
-;;; gimpedit.el --- Edit files with GIMP
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Wed May 23 14:59:50 2007
-(defconst gimpedit:version "0.31") ;;Version:
-;; Last-Updated: 2009-11-03 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `setup-helper', `w32-reg-iface', `w32-regdat'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Simple interface to start editing with GIMP.
-;;
-;; If you want to edit files from within Emacs see the doc string of
-;; `gimpedit-edit-buffer'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-and-compile (require 'w32-regdat nil t))
-
-;; (message "%S" (gimpedit-get-remote-command))
-(defun gimpedit-get-remote-command ()
- (if (featurep 'w32-regdat)
- (save-match-data
- (let ((cmd (w32-regdat-gimp-win-remote-cmd))
- cmd-list)
- (while (< 0 (length cmd))
- (cond
- ((or (string-match (rx string-start
- ?\"
- (submatch
- (0+ (not (any ?\"))))
- ?\"
- (0+ space))
- cmd)
- (string-match (rx string-start
- (submatch
- (0+ (not (any space))))
- (0+ space))
- cmd))
- (setq cmd-list (cons (match-string-no-properties 1 cmd) cmd-list))
- (setq cmd (substring cmd (match-end 0))))))
- (cadr cmd-list)))
- (if (memq system-type '(windows-nt))
- (let (prog)
- (catch 'found-prog
- (dolist (num '(2 3 4 5 6 7 8 9))
- (setq prog (concat (getenv "ProgramFiles")
- "\\GIMP-2.0\\bin\\gimp-2."
- (number-to-string num)
- ".exe"))
- (when (file-exists-p prog)
- (throw 'found-prog prog)))))
- "gimp")))
-
-;;;###autoload
-(defgroup gimpedit nil
- "Customization group for GIMP."
- :group 'external
- :group 'nxhtml)
-
-(defcustom gimpedit-remote-command (gimpedit-get-remote-command)
- "Program name to use when calling GIMP remotely.
-This could be be the full path to the program used when opening
-files with GIMP or a just the program file name if it is in the
-executables path.
-
-Example:
-
- The value is fetched from the registry on MS Windows if
- possible or is else given the default value:
-
- \"C:\\Program Files\\GIMP-2.0\\bin\\gimp-2.6.exe\"
-
- On other system it has the default value
-
- \"gimp\"."
- :type '(choice (file :tag "Full file name" :must-match t)
- (string :tag "File name (must be in path)"))
- :group 'gimpedit)
-
-;;;###autoload
-(defun gimpedit-edit-file (image-file &optional extra-args)
- "Edit IMAGE-FILE with GIMP.
-See also `gimpedit-edit-file'."
- (interactive (list (or (get-char-property (point) 'image-file)
- (read-file-name "Image to edit in GIMP: "))))
- (setq image-file (expand-file-name image-file))
- (apply 'call-process gimpedit-remote-command
- nil
- 0
- nil
- (reverse (cons image-file (reverse extra-args))))
- (let ((msg " Asked GIMP to open %s - you may have to switch to GIMP"))
- (put-text-property 0 (length msg) 'face 'highlight msg)
- (message msg (file-name-nondirectory image-file))))
-
-;;;###autoload
-(defun gimpedit-edit-buffer ()
- "Edit image file in current buffer with GIMP.
-See also `gimpedit-edit-file'.
-
-You may also be interested in gimpedit-mode with which you can edit
-gimp files from within Emacs using GIMP's scripting
-possibilities. See
-
- URL `http://www.emacswiki.org/emacs/GimpMode'"
- (interactive)
- (unless (buffer-file-name)
- (error
- "Can't edit in GIMP because this buffer does not have a file name."))
- (gimpedit-edit-file (buffer-file-name)))
-
-;;;###autoload
-(defun gimpedit-can-edit (file-name)
- (and file-name
- (member (downcase (file-name-extension file-name))
- '("png" "gif" "jpg" "jpeg"))))
-
-;; (defcustom gimpedit-point-key-bindings '(([(control ?c) ?&] gimpedit-edit-file))
-;; "Key bindings suggested for image links etc."
-;; :type '(repeat (list key-sequence function))
-;; :group 'gimpedit)
-
-;; (defun gimpedit-add-point-bindings (map)
-;; "Add `gimpedit-point-key-bindings' to point keymap MAP.
-;; Set it up like this:
-
-;; (eval-after-load 'gimpedit
-;; '(gimpedit-add-point-bindings MY-MAP))
-
-;; There must also be a character property `image-file' at point for this
-;; to work."
-;; (dolist (binding gimpedit-point-key-bindings)
-;; (let ((key (nth 0 binding))
-;; (fun (nth 1 binding)))
-;; (define-key map key fun))))
-
-(provide 'gimpedit)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; gimpedit.el ends here
diff --git a/emacs.d/nxhtml/util/gpl.el b/emacs.d/nxhtml/util/gpl.el
deleted file mode 100644
index a109555..0000000
--- a/emacs.d/nxhtml/util/gpl.el
+++ /dev/null
@@ -1,213 +0,0 @@
-;;; gpl.el --- Highlight and edit gpl color palettes
-
-(defconst gpl:version "0.01")
-;; Copyright (C) 2008 Niels Giesen
-
-;; Author: Niels Giesen
-;; Keywords: extensions, tools
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; GPL provides font-locking and has functions to edit the values
-;; of colors (hue, saturation value, red, green and blue vals)
-;; in-place in a simple, intuitive, and lightweight fashion. See the
-;; documentation of `gpl-mode'.
-
-;; The methods and keybindings used are roughly the same as in the new
-;; css-color mode. I should maybe have abstracted both color notation
-;; models better, but did not feel like it. With under 200 lines of
-;; code, it did not seem worth the effort.
-
-;; The css-color.el used is the one by Niels Giesen, at
-;; `http://niels.kicks-ass.org/public/elisp/css-color.el'.
-
-;; Installation:
-
-;; Put this file in your load-path. Put a declaration such as
-
-;; (autoload 'gpl-mode "gpl")
-;; (add-to-list 'auto-mode-alist
-;; '("\\.gpl\\'" . gpl-mode))
-
-;; In your initialization file (e.g. ~/.emacs) to make sure `gpl-mode'
-;; is started anytime you open a *.gpl file, and gpl-mode is only
-;; loaded when needed.
-
-;;; Code:
-(require 'css-color)
-
-(defvar gpl-keywords
- '(("^[[:space:]]*\\([a-fA-F[:digit:]]\\{1,3\\}\\)[[:space:]]+\\([a-fA-F[:digit:]]\\{1,3\\}\\)[[:space:]]+\\([a-fA-F[:digit:]]\\{1,3\\}\\)"
- (0
- (let ((color (concat "#" (apply 'css-color-rgb-to-hex
- (mapcar 'string-to-number
- (list
- (match-string-no-properties 1)
- (match-string-no-properties 2)
- (match-string-no-properties 3)))))))
-
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'keymap gpl-map)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'face (list :background
- color
- :foreground
- (css-color-foreground-color
- color))))))))
-
-;;;###autoload
-(define-derived-mode gpl-mode fundamental-mode "GPL"
- "Mode for font-locking and editing color palettes of the GPL format.
-
-Such palettes are used and produced by free software applications
-such as the GIMP, Inkscape, Scribus, Agave and on-line tools such
-as http://colourlovers.com.
-
-You can also use
-URL `http://niels.kicks-ass.org/public/elisp/css-palette.el' to import
-such palette into a css-file as hexadecimal color palette."
- (setq font-lock-defaults
- '((gpl-keywords)
- t)))
-
-(defvar gpl-map
- (let ((m (make-sparse-keymap)))
- (define-key m "=" 'gpl-up)
- (define-key m "-" 'gpl-down)
- (define-key m "h" 'gpl-hue-up)
- (define-key m "H" 'gpl-hue-down)
- (define-key m "v" 'gpl-value-up)
- (define-key m "V" 'gpl-value-down)
- (define-key m "s" 'gpl-saturation-up)
- (define-key m "S" 'gpl-saturation-down)
- m)
- "Mode map for `gpl-mode'")
-
-(defun gpl-get-color-at-point ()
- (or (get-text-property (point) 'color)
- (apply 'css-color-rgb-to-hsv
- (gpl-get-rgb-list-at-point))))
-
-(defun gpl-get-rgb-list-at-point ()
- (mapcar 'string-to-number
- (split-string
- (buffer-substring-no-properties
- (point-at-bol)
- (+ 11 (point-at-bol))) "[[:space:]]+" t)))
-
-(defun gpl-replcolor-at-p (fun increment)
- (let ((pos (point)))
- (beginning-of-line)
- (insert
- (funcall fun
- (gpl-get-color-at-point)
- increment))
- (delete-region (point) (+ (point) 11))
- (goto-char pos)))
-
-(defun gpl-hsv-to-gimp-color (h s v)
- (propertize
- (apply 'format "%3d %3d %3d"
- (css-color-hsv-to-rgb h s v))
- 'keymap gpl-map
- 'color (list h s v)))
-
-(defun gpl-what-channel ()
- (/ (- (point) (point-at-bol)) 4))
-
-(defun gpl-adjust-channel-at-p (incr)
- (interactive "p")
- (let ((pos (point))
- (channel (gpl-what-channel)))
- (beginning-of-line)
- (let ((rgb
- (gpl-get-rgb-list-at-point)))
- (setf (nth channel rgb)
- (css-color-within-bounds
- (+ incr (nth channel rgb))
- 0 255))
- (delete-region (point) (+ 11 (point)))
- (insert
- (propertize
- (apply 'format "%3d %3d %3d" rgb)
- 'keymap gpl-map
- 'color nil)))
- (goto-char pos)))
-
-(defun gpl-inchue (color incr)
- (destructuring-bind (h s v) color
- (gpl-hsv-to-gimp-color
- (+ incr h) s v)))
-
-(defun gpl-incsat (color incr)
- (destructuring-bind (h s v) color
- (gpl-hsv-to-gimp-color
- h (css-color-within-bounds (+ incr s) 0 100) v)))
-
-(defun gpl-incval (color incr)
- (destructuring-bind (h s v) color
- (gpl-hsv-to-gimp-color
- h s (css-color-within-bounds (+ incr v) 0 100))))
-
-(defun gpl-adj-hue-at-p (increment)
- (interactive "p")
- (gpl-replcolor-at-p 'gpl-inchue increment))
-
-(defun gpl-adj-saturation-at-p (increment)
- (interactive "p")
- (gpl-replcolor-at-p 'gpl-incsat increment))
-
-(defun gpl-adj-value-at-p (increment)
- (interactive "p")
- (gpl-replcolor-at-p 'gpl-incval increment))
-
-;; channels (r, g, b)
-(defun gpl-up (val)
- (interactive "p")
- (gpl-adjust-channel-at-p val))
-
-(defun gpl-down (val)
- (interactive "p")
- (gpl-adjust-channel-at-p (- val)))
-;; hue
-(defun gpl-hue-up (val)
- (interactive "p")
- (gpl-adj-hue-at-p val))
-
-(defun gpl-hue-down (val)
- (interactive "p")
- (gpl-adj-hue-at-p (- val)))
-;; saturation
-(defun gpl-saturation-up (val)
- (interactive "p")
- (gpl-adj-saturation-at-p val))
-
-(defun gpl-saturation-down (val)
- (interactive "p")
- (gpl-adj-saturation-at-p (- val)))
-;; value
-(defun gpl-value-up (val)
- (interactive "p")
- (gpl-adj-value-at-p val))
-
-(defun gpl-value-down (val)
- (interactive "p")
- (gpl-adj-value-at-p (- val)))
-
-(provide 'gpl)
-;;; gpl.el ends here
diff --git a/emacs.d/nxhtml/util/hfyview.el b/emacs.d/nxhtml/util/hfyview.el
deleted file mode 100644
index 0e0450d..0000000
--- a/emacs.d/nxhtml/util/hfyview.el
+++ /dev/null
@@ -1,651 +0,0 @@
-;;; hfyview.el --- View current buffer as html in web browser
-
-;; Copyright (C) 2005, 2006, 2007 by Lennart Borgman
-
-;; Author: Lennart Borgman
-;; Created: Fri Oct 21 2005
-(defconst hfyview:version "0.63") ;; Version:
-;; Last-Updated: 2010-04-16 Fri
-;; Keywords: printing
-;; URL: http://OurComments.org/Emacs/DL/elisp/hfyview.el
-;; Compatibility:
-;;
-;;
-;; Features that might be required by this library:
-;;
- ;; `easymenu'.
-;;
-;;
-;; htmlfontify.el is part of Emacs.
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This file shows the current buffer in your web browser with all
-;; the colors it has. The purpose is mainly to make it possible to
-;; easily print what you see in Emacs in colors on different
-;; platforms.
-;;
-;; Put this file in your load-path and in your .emacs this:
-;;
-;; (require 'hfyview)
-;;
-;; This defines the commands `hfyview-buffer', `hfyview-region' and
-;; `hfyview-window' which will show the whole or a part of the buffer
-;; in your web browser.
-;;
-;; You can add those commands to the menus by customizing
-;; `hfyview-quick-print-in-files-menu' to t. This will add an entry
-;; "Quick Print (Using Web Browser)" to the files menu.
-;;
-;;
-;; There is also a command `hfyview-frame' to take a "screen shot" of
-;; your current frame and produce an html look-alike page. If you
-;; turn on `hfyview-frame-mode' you get this function on the <apps>
-;; key in most situations.
-;;
-;;
-;; You can see an example of the output here:
-;;
-;; http://ourcomments.org/Emacs/nXhtml/doc/htmlfontify-example.html
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
-;; your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; To find out more about the GNU General Public License you can visit
-;; Free Software Foundation's website http://www.fsf.org/. Or, write
-;; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'htmlfontify))
-(require 'easymenu)
-
-(defvar hfyview-selected-window)
-
-(defvar hfyview-frame-mode-emulation-map
- (let ((m (make-sparse-keymap)))
- ;;(define-key m [apps] 'hfyview-frame)
- m))
-
-(defvar hfyview-frame-mode-emulation-maps
- (list (cons 'hfyview-frame-mode hfyview-frame-mode-emulation-map)))
-
-;; Fix-me: which are needed? Probably only viper, but have to test.
-(defconst hfyview-frame-mode-other-maps
- '(
- hfyview-frame-mode-emulation-map
- minibuffer-local-completion-map
- minibuffer-local-filename-completion-map
- minibuffer-local-isearch-map
- minibuffer-local-map
- ;; minibuffer-local-must-match-filename-map
- minibuffer-local-must-match-map
- minibuffer-local-ns-map
- viper-minibuffer-map
- isearch-mode-map))
-
-(define-minor-mode hfyview-frame-mode
- "Define some useful things for `hfyview-frame'.
-The <apps> key is bound to `hfyview-frame' in this mode. When
-this mode is on you can push <apps> to get all of what you see on
-the screen. Without it the minibuffer/echo area will not be
-shown."
- :global t
- :group 'htmlfontify
- (if hfyview-frame-mode
- (progn
- (add-hook 'pre-command-hook 'hfy-grab-minibuffer-content)
- (add-hook 'post-command-hook 'hfy-grab-echo-content)
- (add-to-list 'emulation-mode-map-alists 'hfyview-frame-mode-emulation-maps)
- (dolist (map hfyview-frame-mode-other-maps)
- (define-key (symbol-value map) [(apps)] 'hfyview-frame)
- )
- )
- (remove-hook 'pre-command-hook 'hfy-grab-minibuffer-content)
- (remove-hook 'post-command-hook 'hfy-grab-echo-content)
- (setq emulation-mode-map-alists (delq 'hfyview-frame-mode-emulation-maps emulation-mode-map-alists))
- (dolist (map hfyview-frame-mode-other-maps)
- (define-key (symbol-value map) [(apps)] nil))))
-
-(defun hfyview-fontify-region (start end)
- "Fontify region between START and END the htmlfontify way."
- ;; If the last command in mumamo resulted in a change of major-mode
- ;; the big bug watcher in mumamo will get us if we do not tell that
- ;; we know what we are doing:
- (let ((mumamo-just-changed-major nil))
- (if start
- (save-restriction
- (widen)
- (narrow-to-region start end)
- (assert (= end (point-max)))
- (assert (= start (point-min)))
- (htmlfontify-buffer))
- (htmlfontify-buffer))))
-
-(defun hfyview-buffer-1(start end show-source)
- "Convert current buffer between START and END to html.
-If SHOW-SOURCE is non-nil then also show produced html in other
-window."
- (let ((hbuf (hfyview-fontify-region start end)))
- (with-current-buffer hbuf
- (setq buffer-file-name nil)
- (browse-url-of-buffer))
- (when show-source (switch-to-buffer-other-window hbuf))
- hbuf))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;; Menus
-
-(defvar hfyview-print-menu (make-sparse-keymap "QP"))
-(defvar hfyview-print-region-menu (make-sparse-keymap "QPR"))
-(defvar hfyview-print-window-menu (make-sparse-keymap "QPW"))
-(defun hfyview-add-to-files-menu ()
- "Add \"Quick Print\" entry to file menu."
- ;; Why did I redo this???
- (setq hfyview-print-menu (make-sparse-keymap "QP"))
- (setq hfyview-print-region-menu (make-sparse-keymap "QPR"))
- (setq hfyview-print-window-menu (make-sparse-keymap "QPW"))
- ;; Main
- (define-key-after menu-bar-file-menu [hfyview-print]
- (list 'menu-item
- "Quick Print (Using Web Browser)"
- hfyview-print-menu
- :visible 'hfyview-print-visible)
- 'separator-print)
- ;; Main submenu
- (define-key hfyview-print-menu [hfyview-browser-frame-pre]
- '(menu-item "Print Preview Frame" hfyview-frame
- :help "Print preview frame with web browser"))
- (define-key hfyview-print-menu [hfyview-browser-window-pre]
- '(menu-item "Print Preview Window" hfyview-window
- :help "Print preview window with web browser"))
- (define-key hfyview-print-menu [hfyview-browser-region-pre]
- (list 'menu-item "Print Preview Region" 'hfyview-region
- :help "Print preview region with web browser"
- :enable 'mark-active))
- (define-key hfyview-print-menu [hfyview-separator-pre]
- '(menu-item "--"))
- (define-key hfyview-print-menu [hfyview-browser-pre]
- '(menu-item "Print Preview Buffer" hfyview-buffer
- :help "Print preview buffer with web browser"
- :visible t))
- )
-
-;;;###autoload
-(defcustom hfyview-quick-print-in-files-menu nil
- "Add Quick print entries to File menu if non-nil.
-If you set this to nil you have to restart Emacs to get rid of
-the Quick Print entry."
- :type 'boolean
- :set (lambda (sym val)
- (set-default sym val)
- (if val
- (hfyview-add-to-files-menu)))
- :group 'hfy-view)
-
-(defvar hfyview-print-visible t
- "Non-nil means show Quick Print entry on the file menu.")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;; Interactive commands
-
-;;;###autoload
-(defun hfyview-buffer (arg)
- "Convert buffer to html preserving faces and show in web browser.
-With command prefix ARG also show html source in other window."
- (interactive "P")
- (hfyview-buffer-1 nil nil arg))
-
-;;;###autoload
-(defun hfyview-region (arg)
- "Convert region to html preserving faces and show in web browser.
-With command prefix ARG also show html source in other window."
- (interactive "P")
- (hfyview-buffer-1 (region-beginning) (region-end) arg))
-
-;;;###autoload
-(defun hfyview-window (arg)
- "Convert window to html preserving faces and show in web browser.
-With command prefix ARG also show html source in other window."
- (interactive "P")
- (hfyview-buffer-1 (window-start) (window-end) arg))
-
-;;;###autoload
-(defun hfyview-frame (whole-buffers)
- "Convert frame to html preserving faces and show in web browser.
-Make an XHTML view of the current Emacs frame. Put it in a buffer
-named *hfyview-frame* and show that buffer in a web browser.
-
-If WHOLE-BUFFERS is non-nil then the whole content of the buffers
-is shown in the XHTML page, otherwise just the part that is
-visible currently on the frame.
-
-If you turn on the minor mode `hfyview-frame-mode' you can also
-get the minibuffer/echo area in the output. See this mode for
-details.
-
-With command prefix also show html source in other window."
- (interactive (list (y-or-n-p "Enter y for whole buffers, n for only visible part? ")))
- (let ((title "Emacs - Frame Dump")
- buf)
- (setq title (frame-parameter (selected-frame) 'name))
- (setq buf (hfyview-frame-1 whole-buffers title))
- (when current-prefix-arg
- (switch-to-buffer-other-window buf))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;; Internal commands
-
-(defconst hfyview-modline-format
- ;; There seems to be a bug in Firefox that prevents this from
- ;; displaying correctly. Anyway this is just a quick and reasonable
- ;; approximation.
- (concat "<div style=\"width:%sem; color:%s; background:%s; white-space:pre; overflow:hidden; font-family:monospace;\">"
- ;; Using <pre> gives empty line above and below
- ;;"<pre>"
- "-- (Unix)%s <b>%s</b> (%s%s) "
- (make-string 6 ?-)
- "%s" ;; Viper
- (make-string 200 ?-)
- ;;"</pre>"
- "</div>"))
-
-(defun hfyview-get-minors ()
- "Return string with active minor mode highlighters."
- (let ((minors ""))
- (dolist (mr minor-mode-alist)
- (let ((mm (car mr))
- (ml (cadr mr)))
- (when (symbol-value mm)
- (when (stringp ml)
- (setq minors (concat minors ml))))))
- minors))
-
-;; (hfyview-dekludge-string "<i> ")
-(defun hfyview-dekludge-string (str)
- "Return html quoted string STR."
- (mapconcat (lambda (c)
- (hfy-html-quote
- (char-to-string c)))
- (append str)
- ""))
-
-(defvar viper-mode-string) ;; Silence compiler
-
-(defun hfyview-fontify-win-to (win tag whole-buffer)
- "Return html code for window WIN.
-Sorround the code with the html tag <TAG>.
-WHOLE-BUFFER corresponds to the similar argument for
-`hfyview-frame-1'."
- (let* ((bstart (unless whole-buffer (window-start win)))
- (bend (unless whole-buffer (window-end win)))
- (hbuf (hfyview-fontify-region bstart bend))
- (edges (window-edges win))
- (width (- (nth 2 edges) (nth 0 edges)))
- (height (- (nth 3 edges) (nth 1 edges)))
- (border-color (or (hfy-triplet "SystemActiveBorder")
- "gray"))
- start
- end
- css-start
- css-end
- mod-fgcolor
- mod-bgcolor
- mod-width
- mod
- bu-name
- ma-name
- minors
- (window-start-line (point-min))
- (window-end-line (point-max))
- (is-selected-window (eq win hfyview-selected-window))
- (mark-viper "")
- )
- ;; Fix-me: fetch style too
- (with-current-buffer (window-buffer win)
- (unless whole-buffer
- (save-restriction
- (widen)
- (setq window-start-line (line-number-at-pos bstart))
- (setq window-end-line (line-number-at-pos bend))
- (unless (or (< (line-number-at-pos (point-min)) window-start-line)
- (> (line-number-at-pos (point-max)) window-end-line))
- (setq whole-buffer t))
- )
- )
- (setq mod-fgcolor (face-attribute (if is-selected-window 'mode-line 'mode-line-inactive) :foreground))
- (setq mod-bgcolor (face-attribute (if is-selected-window 'mode-line 'mode-line-inactive) :background))
- (setq mod-fgcolor (hfy-triplet mod-fgcolor))
- (setq mod-bgcolor (hfy-triplet mod-bgcolor))
- (setq mod (if (buffer-modified-p) "**" "--"))
- (when buffer-read-only
- (setq mod "%%"))
- (setq bu-name (buffer-name))
- (setq ma-name mode-name)
- (setq minors (hfyview-get-minors))
- (when (and (local-variable-p 'viper-mode-string) viper-mode-string)
- (setq mark-viper viper-mode-string))
- )
- ;; Compensate for scroll-bars
- (setq mod-width (+ width 1))
- (with-current-buffer hbuf
- (setq width (- width 2.5))
- (setq width (* 0.57 width))
- (setq height (+ height 2)) ;; For pre
- ;;(setq height (+ height 1.2)) ;; For horisontal scrollbar
- (setq height (* 1.16 height))
- (goto-char (point-min))
- (re-search-forward "<body.*?>")
- (setq start (point))
- (insert
- (format "<%s style=\"width:%sem; height:%sem; border: 1px solid %s; overflow:%s; padding:4px;\">\n"
- tag width height border-color
- (if whole-buffer "auto" "hidden") ;; overflow
- ))
- (goto-char (point-max))
- (setq end (search-backward "</body>"))
- (unless whole-buffer
- (insert
- (format "\n<div style=\"margin-top:2em; color: red; text-align: center; \"> Truncated to line %s - %s! </div>\n"
- window-start-line window-end-line)))
- (insert "</" tag ">\n")
- ;;(lwarn t :warning "%s" mark-viper)
- (insert (format hfyview-modline-format
- width
- mod-fgcolor mod-bgcolor mod
- (hfyview-dekludge-string bu-name)
- (hfyview-dekludge-string ma-name)
- (hfyview-dekludge-string minors)
- (hfyview-dekludge-string mark-viper)))
- (setq end (point))
- (goto-char (point-min))
- (search-forward "<style type=\"text/css\"><!--")
- (beginning-of-line)
- (setq css-start (point))
- (search-forward "--></style>")
- (setq css-end (point))
- (set-buffer-modified-p nil)
- (setq buffer-file-name nil))
- (list hbuf start end css-start css-end)))
-
-;; (defun hfyview-window-framed ()
-;; "Just a test"
-;; (interactive)
-;; (let* ((res (hfyview-fontify-win-to (selected-window) "div" nil))
-;; (hbuf (nth 0 res)))
-;; (with-current-buffer hbuf
-;; (browse-url-of-buffer))))
-
-(defun hfyview-fontify-tree-win (win whole-buffer)
- "Return html code for window WIN.
-WHOLE-BUFFER corresponds to the similar argument for
-`hfyview-frame-1'."
- (with-selected-window win
- (let* ((start (window-start))
- (end (window-end))
- (res (hfyview-fontify-win-to win "div" whole-buffer))
- (hbuf (nth 0 res)))
- (with-current-buffer hbuf
- (rename-buffer (generate-new-buffer-name (format "%s %s-%s" win start end))))
- ;;(lwarn t :warning "win=%s, hbuf=%s" win hbuf)
- res)))
-
-(defun hfyview-fontify-tree (wt whole-buffers)
- "Return list of html code for all windows in tree WT.
-WT should be the result of function `window-tree' or a subtree of
-this. For WHOLE-BUFFERS see `hfyview-frame-1'."
- (if (not (listp wt))
- (hfyview-fontify-tree-win wt whole-buffers)
- (let ((ret))
- (dolist (w (cddr wt))
- (setq ret (cons (hfyview-fontify-tree w whole-buffers) ret)))
- (list (car wt) ret))))
-
-(defun hfyview-frame-to-html (res)
- "Return list with css and html code for frame.
-RES is the collected result from `hfyview-fontify-tree'."
- (let ((html "")
- (css "")
- (first (car res))
- (td "<td style=\"vertical-align:top;\">")
- h)
- (cond
- ((memq first '(nil t))
- (dolist (sub (reverse (cadr res)))
- (let* ((fres (hfyview-frame-to-html sub))
- (h (nth 0 fres))
- (c (nth 1 fres)))
- (when first (setq h (concat "<tr>\n" h "</tr>\n")))
- (setq html (concat html h))
- (setq css (concat css c))))
- (unless first
- (setq html (concat "<tr>" html "</tr>\n")))
- (setq html (concat "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n" html "</table>\n"))
- (setq html (concat td html "</td>\n"))
- )
- ((bufferp first)
- ;; (buf start end)
- (let* ((buf (nth 0 res))
- (sta (nth 1 res))
- (end (nth 2 res))
- (cst (nth 3 res))
- (cnd (nth 4 res))
- (h
- ;;(concat "<td>" "temp" "</td>\n")
- (with-current-buffer buf (buffer-substring-no-properties sta end)))
- (c
- ;;(concat "<td>" "temp" "</td>\n")
- (with-current-buffer buf (buffer-substring-no-properties cst cnd))))
- (setq h (concat td h
- "</td>\n"))
- (setq html (concat html h))
- (setq css c)
- (kill-buffer buf)))
- (t
- (error "Uh?")))
- (list html css)))
-
-(defconst hfyview-xhtml-header
- "<?xml version=\"1.0\" encoding=\"utf-8\"?>
-<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"
-\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
-<html xmlns=\"http://www.w3.org/1999/xhtml\">
- <head>
- <title>%s</title>
-<style type=\"text/css\"><!--
-body { font-family: outline-courier new; font-stretch: normal; font-weight: 500; font-style: normal; color: rgb(0, 0, 0); font-size: 10pt; text-decoration: none; }
- --></style>
-%s
- </head>
- <body>\n")
-
-(defvar hfyview-xhtml-footer "</body>\n</html>\n")
-
-(defun hfyview-wm-border-color ()
- "Return CSS code for color to use in window borders."
- (or (hfy-triplet "SystemActiveTitle")
- (hfy-triplet "blue")))
-
-(defvar hfy-grabbed-echo-content nil)
-(defvar hfy-grabbed-minibuffer-content nil)
-(defvar hfyview-prompt-face nil)
-
-(defun hfyview-frame-minibuff (use-grabbed)
- "Return html code for minibuffer.
-If USE-GRABBED is non-nil use what has been grabbed by
-`hfy-grab-echo-content' or `hfy-grab-minibuffer-content'.
-Otherwise make a default content for the minibuffer."
- (if (and use-grabbed
- (or hfy-grabbed-echo-content
- hfy-grabbed-minibuffer-content))
- (let* ((str (if hfy-grabbed-echo-content
- hfy-grabbed-echo-content
- hfy-grabbed-minibuffer-content))
- (tmpbuf (get-buffer-create "*hfy-minibuff-temp*"))
- (hbuf (with-current-buffer tmpbuf
- (let ((inhibit-read-only t))
- (erase-buffer)
- ;; Fix-me: move the propertize to a new
- ;; copy-buffer in hfy-fontify-buffer. Explained
- ;; in mail to Vivek.
- (insert (propertize str
- 'read-only nil
- 'intangible nil
- 'field nil
- 'modification-hooks nil
- 'insert-in-front-hooks nil
- 'insert-behind-hooks nil
- 'point-entered nil
- 'point-left nil
- 'font-sticky nil
- 'rear-nonsticky nil
- ))
- (htmlfontify-buffer))))
- bdy-start
- bdy-end
- bdy-txt
- css-start
- css-end
- css-txt)
- (with-current-buffer hbuf
- (goto-char (point-min))
- (search-forward "<style type=\"text/css\"><!--")
- (beginning-of-line)
- (setq css-start (point))
- (search-forward "--></style>")
- (setq css-end (point))
- (goto-char (point-min))
- (search-forward "<pre>")
- (setq bdy-start (point))
- (goto-char (point-max))
- (search-backward "</pre>")
- (setq bdy-end (point))
- (list (buffer-substring css-start css-end)
- (buffer-substring bdy-start bdy-end))))
- (let ((mini-bg (face-attribute hfyview-prompt-face :background))
- (mini-fg (face-attribute hfyview-prompt-face :foreground)))
- (if (eq mini-fg 'unspecified)
- (setq mini-fg "")
- (setq mini-fg (concat "color:" (hfy-triplet mini-fg) "; ")))
- (if (eq mini-bg 'unspecified)
- (setq mini-bg "")
- (setq mini-bg (concat "background:" (hfy-triplet mini-bg) "; ")))
- (list nil
- (concat
- "<span style=\"" mini-fg mini-bg "\">"
- "&nbsp;M-x "
- "</span>"
- "&nbsp;"
- "hfyview-frame"
- )))))
-
-(defun hfyview-frame-1(whole-buffers frame-title)
- "Return buffer with html code for current frame.
-If WHOLE-BUFFERS is non-nil then make scrollable buffers in the
-html output. Otherwise just make html code for the currently
-visible part of the buffers.
-
-FRAME-TITLE is the title to show on the resulting html page."
- (let* ((wt (window-tree))
- (hfyview-selected-window (selected-window))
- (res (hfyview-fontify-tree (car wt) whole-buffers))
- (title-bg-color (hfyview-wm-border-color))
- (title-color (or (hfy-triplet "SystemHilightText")
- "white"))
- (title-style (concat (format "background-color:%s; color:%s;" title-bg-color title-color)
- "border: none; padding:4px; vertical-align: middle;"))
- (outbuf (get-buffer-create "frame"))
- html
- css
- ;; (face-attribute 'minibuffer-prompt :foreground)
- (hfyview-prompt-face (plist-get minibuffer-prompt-properties 'face))
- minibuf
- (frame-width (* 0.56 (frame-width)))
- table-style
- (icon-file (expand-file-name "../etc/images/icons/emacs_16.png" exec-directory))
- (img-tag (if (file-exists-p icon-file)
- (concat "<img src=\"file://" icon-file "\" height=\"16\" width=\"16\" />")))
- mini-css
- mini-html
- )
- (setq table-style
- (format "border: solid %s; width:%sem;"
- (hfyview-wm-border-color)
- frame-width
- ))
- (setq minibuf (hfyview-frame-minibuff hfyview-frame-mode))
- (setq mini-css (nth 0 minibuf))
- (setq mini-html (nth 1 minibuf))
- (when (string= mini-html "") (setq mini-html "&nbsp;"))
- (setq res (hfyview-frame-to-html res))
- (setq html (nth 0 res))
- (setq css (nth 1 res))
- (with-current-buffer outbuf
- ;;(lwarn t :warning "outbuf=%s" outbuf)
- (erase-buffer)
- (insert (format hfyview-xhtml-header
- (concat "Emacs frame dump - " frame-title)
- css)
- (if mini-css mini-css "")
- (format "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"%s\">\n" table-style)
- "<tr>\n"
- (format "<td style=\"%s\">%s&nbsp;&nbsp;%s</td>\n" title-style img-tag
- (hfyview-dekludge-string frame-title))
- "</tr>\n"
- "<tr>\n"
- html
- "</tr>\n"
- "<tr>\n"
- "<td style=\"padding:1px;\">\n"
- mini-html
- "</td>\n"
- "</tr>\n"
- "</table>\n"
- hfyview-xhtml-footer)
- (browse-url-of-buffer)
- outbuf)))
-
-(defun hfy-grab-echo-content ()
- "Return echo area content."
- (setq hfy-grabbed-echo-content (current-message)))
-
-(defun hfy-grab-minibuffer-content ()
- "Return minibuffer content."
- ;;(interactive)
- (let* ((mw (minibuffer-window))
- (mb (window-buffer mw)))
- (setq hfy-grabbed-minibuffer-content
- (with-current-buffer mb
- (buffer-substring
- (point-min) (point-max)))
- )))
-
-;;(add-hook 'pre-command-hook 'grab-minibuffer-content nil t)
-;;(remove-hook 'pre-command-hook 'grab-minibuffer-content) t)
-
-(provide 'hfyview)
-;;; hfyview.el ends here
diff --git a/emacs.d/nxhtml/util/hl-needed.el b/emacs.d/nxhtml/util/hl-needed.el
deleted file mode 100644
index 7a160b6..0000000
--- a/emacs.d/nxhtml/util/hl-needed.el
+++ /dev/null
@@ -1,402 +0,0 @@
-;;; hl-needed.el --- Turn on highlighting of line and column when needed
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Fri Nov 30 21:19:18 2007
-;; Version: 0.60
-;; Last-Updated: 2010-03-19 Fri
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/hl-needed.el
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `hl-line', `vline'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This is yet another highlight line and/or column idea. The idea is
-;; to try to show line and column only when it is probably most
-;; needed. See `hl-needed-mode' for more info.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'hl-line)
-(require 'vline nil t)
-
-;;;###autoload
-(defgroup hl-needed nil
- "Customization group for `hl-needed-mode'."
- :group 'convenience)
-
-(defcustom hl-needed-always nil
- "Highlight always.
-This is similar to turning on `vline-mode' and `hl-line-mode'"
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-mark-line t
- "Highlight line."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-mark-column t
- "Highlight column."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-in-readonly-buffers nil
- "Do not highlight in read-only buffers unless non-nil."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-not-in-modes
- '(wab-compilation-mode
- custom-mode)
- "List of modes where highlighting should not be done."
- :type '(repeat function)
- :group 'hl-needed)
-
-;;(setq hl-needed-idle-time 5)
-(defcustom hl-needed-idle-time 20
- "Highligh current line and/or column if Emacs is idle for more seconds.
-If nil do not turn on `hl-line-mode' when Emacs is idle."
- :type '(choice (const :tag "Don't turn on when Emacs is idle" nil)
- (integer :tag "Turn on after (seconds)"))
- :group 'hl-needed)
-
-(defcustom hl-needed-on-mouse t
- "Highlight current line and/or column on clicks."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-on-new-window t
- "Highlight current line and/or column on new window selection."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-on-new-buffer t
- "Highlight current line and/or column on new buffer selection."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-on-config-change t
- "Highlight current line and/or column on window conf change."
- :type 'boolean
- :group 'hl-needed)
-
-(defcustom hl-needed-on-scrolling t
- "Highlight current line and/or column after scrolling."
- :type 'boolean
- :group 'hl-needed)
-
-(defvar hl-needed-face 'hl-needed-face)
-(defface hl-needed-face
- '((t (:inherit highlight)))
- "Face for flashing."
- :group 'hl-needed)
-
-(defcustom hl-needed-flash-delay 0.0
- "Time to wait before turning on flash highlighting.
-If a key is pressed before this flash highlighting is not done."
- :type 'float
- :group 'hl-needed)
-
-(defcustom hl-needed-flash-duration 1.0
- "Turn off flash highlighting after this number of second.
-Highlighting is turned off only if it was turned on because of
-some change. It will not be turned off if it was turned on
-because Emacs was idle for more than `hl-needed-idle-time'.
-
-The default time is choosen to not disturb too much. I believe
-human short attention may often be of this time. \(Compare eye
-contact time.)"
- :type 'float
- :group 'hl-needed)
-
-(defcustom hl-needed-currently-fun 'hl-needed-currently
- "Function that checks if highlighting should be done.
-The function should return nil if not needed and non-nil
-otherwise."
- :type 'function
- :group 'hl-needed)
-
-(defvar hl-needed-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) ?? ??] 'hl-needed-show)
- map))
-
-;;;###autoload
-(define-minor-mode hl-needed-mode
- "Try to highlight current line and column when needed.
-This is a global minor mode. It can operate in some different
-ways:
-
-- Highlighting can be on always, see `hl-needed-always'.
-
-Or, it can be turned on depending on some conditions. In this
-case highlighting is turned off after each command and turned on
-again in the current window when either:
-
-- A new window was selected, see `hl-needed-on-new-window'.
-- A new buffer was selected, see `hl-needed-on-new-buffer'.
-- Window configuration was changed, see `hl-needed-on-config-change'.
-- Buffer was scrolled see `hl-needed-on-scrolling'.
-- A window was clicked with the mouse, see `hl-needed-on-mouse'.
-
-After this highlighting may be turned off again, normally after a
-short delay, see `hl-needed-flash'.
-
-If either highlighting was not turned on or was turned off again
-it will be turned on when
-
-- Emacs has been idle for `hl-needed-idle-time' seconds.
-
-See also `hl-needed-not-in-modes' and `hl-needed-currently-fun'.
-
-Note 1: For columns to be highlighted vline.el must be available.
-
-Note 2: This mode depends on `hl-line-mode' and `vline-mode' and
-tries to cooperate with them. If you turn on either of these that
-overrides the variables for turning on the respective
-highlighting here."
- :global t
- :group 'hl-needed
- ;;:keymap hl-needed-mode-map
- (if hl-needed-mode
- (progn
- ;;(unless (memq major-mode hl-needed-not-in-modes) (setq hl-needed-window t))
- (when (featurep 'hl-needed) (hl-needed-show))
- (add-hook 'post-command-hook 'hl-needed-post-command)
- (add-hook 'pre-command-hook 'hl-needed-pre-command)
- (add-hook 'window-configuration-change-hook 'hl-needed-config-change)
- )
- (remove-hook 'post-command-hook 'hl-needed-post-command)
- (remove-hook 'pre-command-hook 'hl-needed-pre-command)
- (remove-hook 'window-configuration-change-hook 'hl-needed-config-change)
- (hl-needed-cancel-timer)
- (hl-needed-cancel-flash-timer)
- (hl-needed-hide)))
-
-(defvar hl-needed-timer nil)
-(defvar hl-needed-flash-timer nil)
-(defvar hl-needed-window nil)
-(defvar hl-needed-buffer nil)
-(defvar hl-needed-window-start nil)
-(defvar hl-needed-flash-this nil)
-(defvar hl-needed-config-change nil)
-
-(defvar hl-needed-old-blink nil)
-(defun hl-needed-show ()
- "Highlight current line and/or column now."
- (interactive)
- (when (with-no-warnings (called-interactively-p))
- (setq hl-needed-flash-this nil)
- (unless hl-needed-mode
- (message "Use hl-needed-hide to remove highlighting")))
- (setq hl-needed-old-blink nil) ;; So blink is not turned on by hl-needed-hide
- (hl-needed-hide)
- (unless (active-minibuffer-window)
- (setq hl-needed-old-blink blink-cursor-mode)
- (when blink-cursor-mode
- (blink-cursor-mode -1)
- ;;(when (timerp blink-cursor-timer) (cancel-timer blink-cursor-timer))
- (blink-cursor-end)
- )
- (unless hl-line-mode
- (when hl-needed-mark-line
- (let ((hl-line-mode t)
- (hl-line-sticky-flag nil)
- (hl-line-face hl-needed-face))
- (hl-line-highlight))))
- (unless vline-mode
- (when hl-needed-mark-column
- (when (featurep 'vline)
- (let ((vline-style 'face)
- (vline-face hl-line-face)
- (vline-current-window-only t))
- (vline-show)))))))
-
-(defun hl-needed-hide ()
- (interactive)
- (when (and hl-needed-old-blink
- (not blink-cursor-mode))
- (blink-cursor-mode 1))
- (setq hl-needed-old-blink nil)
- (unless hl-line-mode
- (hl-line-unhighlight))
- (when (featurep 'vline)
- (unless vline-mode
- (vline-clear))))
-
-(defun hl-needed-cancel-timer ()
- (when (timerp hl-needed-timer) (cancel-timer hl-needed-timer))
- (setq hl-needed-timer nil))
-
-(defun hl-needed-start-timer (wait)
- (hl-needed-cancel-timer)
- (setq hl-needed-timer
- (run-with-idle-timer wait
- nil 'hl-needed-show-in-timer)))
-
-(defun hl-needed-show-in-timer ()
- "Turn on with special error handling.
-Erros may go unnoticed in timers. This should prevent it."
- (condition-case err
- (save-match-data ;; runs in timer
- (hl-needed-show))
- (error
- (lwarn 'hl-needed-show
- :error "%s" (error-message-string err)))))
-
-(defun hl-needed-hide-in-timer ()
- "Turn off with special error handling.
-Erros may go unnoticed in timers. This should prevent it."
- (condition-case err
- (unless hl-needed-always
- (hl-needed-hide))
- (error
- (lwarn 'hl-needed-hide
- :error "%s" (error-message-string err)))))
-
-(defun hl-needed-hide-flash-in-timer ()
- "Turn off with special error handling.
-Erros may go unnoticed in timers. This should prevent it."
- (condition-case err
- (unless hl-needed-always
- (hl-needed-hide)
- (hl-needed-start-timer hl-needed-idle-time))
- (error
- (lwarn 'hl-needed-hide
- :error "%s" (error-message-string err)))))
-
-(defun hl-needed-currently ()
- "Check if `hl-line-mode' is needed in buffer."
- ;; Check for change of buffer and window
- (if hl-needed-always
- t
- (unless (or (memq major-mode hl-needed-not-in-modes)
- isearch-mode
- (and buffer-read-only
- (not hl-needed-in-readonly-buffers)))
- (or (and hl-needed-on-new-window
- (not (eq hl-needed-window (selected-window))))
- ;;(progn (message "here1") nil)
- (and hl-needed-on-new-buffer
- (not (eq hl-needed-buffer (current-buffer))))
- ;;(progn (message "here2") nil)
- (and hl-needed-on-config-change
- hl-needed-config-change)
- ;;(progn (message "here3") nil)
- (and hl-needed-on-mouse
- (listp last-input-event)
- (memq (car last-input-event) '(mouse-1 mouse-2 mouse-3)))
- ;;(progn (message "here4") nil)
- (and hl-needed-on-scrolling
- (and (not (eq hl-needed-window-start (window-start)))
- (< 1
- (abs
- (- (line-number-at-pos hl-needed-window-start)
- (line-number-at-pos (window-start)))))))))))
-
-(defun hl-needed-cancel-flash-timer ()
- (when (timerp hl-needed-flash-timer) (cancel-timer hl-needed-flash-timer))
- (setq hl-needed-flash-timer nil))
-
-(defun hl-needed-start-maybe-flash-timer ()
- (when (and hl-needed-flash-this
- (not hl-needed-always))
- (hl-needed-cancel-flash-timer)
- (setq hl-needed-flash-timer
- (run-with-timer (+ hl-needed-flash-delay hl-needed-flash-duration)
- nil 'hl-needed-hide-flash-in-timer))))
-
-(defvar hl-needed-pre-command-time (current-time))
-
-(defun hl-needed-check ()
- ;; Cancel `hl-line-mode' and timer
- (unless (active-minibuffer-window)
- (if (funcall hl-needed-currently-fun)
- (progn
- ;; Some time calc for things that pause to show us where we are:
- (let* ((time-pre hl-needed-pre-command-time)
- (time-now (current-time))
- (pre (+ (nth 1 time-pre) (* 0.0000001 (nth 2 time-pre))))
- (now (+ (nth 1 time-now) (* 0.0000001 (nth 2 time-now)))))
- (if (< 1 (- now pre)) ;; Fix-me: option?
- nil ;; Don't show anything here, it just disturbs
- ;;(hl-needed-show)
- (hl-needed-start-timer hl-needed-flash-delay)
- (hl-needed-start-maybe-flash-timer))))
- ;; Submit an idle timer that can turn highlighting on.
- (hl-needed-start-timer hl-needed-idle-time)))
- (setq hl-needed-config-change nil)
- (unless (active-minibuffer-window)
- (setq hl-needed-window (selected-window))
- (setq hl-needed-buffer (current-buffer))
- (setq hl-needed-window-start (window-start))))
-
-(defvar hl-needed-after-active-minibuffer nil)
-
-(defun hl-needed-pre-command ()
- ;;(message "active-minibuffer-window=%s" (active-minibuffer-window))
- (setq hl-needed-after-active-minibuffer (active-minibuffer-window))
- (condition-case err
- (progn
- (hl-needed-cancel-timer)
- (hl-needed-cancel-flash-timer)
- (hl-needed-hide)
- (setq hl-needed-flash-this hl-needed-flash-duration)
- (setq hl-needed-pre-command-time (current-time)))
- (error
- (message "hl-needed-pre-command error: %s" err))))
-
-(defun hl-needed-post-command ()
- (condition-case err
- (if (eq last-command 'keyboard-quit)
- (hl-needed-hide)
- (hl-needed-check))
- (error
- (message "hl-needed-post-command error: %s" err))))
-
-(defvar hl-needed-minibuffer-active nil)
-
-(defun hl-needed-config-change ()
- (condition-case err
- (if (active-minibuffer-window)
- (setq hl-needed-minibuffer-active t)
- ;; Changing buffer in the echo area is a config change. Catch this:
- (setq hl-needed-config-change (not hl-needed-after-active-minibuffer))
- (setq hl-needed-after-active-minibuffer nil)
- (setq hl-needed-minibuffer-active nil))
- (error
- (message "hl-needed-config-change error: %s" err))))
-
-(provide 'hl-needed)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; hl-needed.el ends here
diff --git a/emacs.d/nxhtml/util/html-write.el b/emacs.d/nxhtml/util/html-write.el
deleted file mode 100644
index c7a7c76..0000000
--- a/emacs.d/nxhtml/util/html-write.el
+++ /dev/null
@@ -1,455 +0,0 @@
-;;; html-write.el --- Hide some tags for writing text in XHTML
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-10-03T01:29:44+0200 Thu
-(defconst html-write:version "0.6") ;; Version:
-;; Last-Updated: 2009-08-11 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; The minor mode `html-write-mode' displays simple tags like <i>,
-;; <b>, <em>, <strong> or <a> with appropriate faces (for example bold
-;; and italic) instead of displaying the tags.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Silence byte compiler
-(defvar jit-lock-start)
-(defvar jit-lock-end)
-
-(eval-when-compile (require 'mumamo)) ;; Just for the defmacro ...
-(eval-when-compile (require 'mlinks nil t))
-
-;;;###autoload
-(defgroup html-write nil
- "Customization group for html-write."
- :group 'nxhtml
- :group 'convenience)
-
-(defface html-write-base
- '((t (:inherit font-lock-type-face)))
- "Face from which other faces inherits."
- :group 'html-write)
-
-(defface html-write-em
- '((t (:inherit html-write-base :slant italic)))
- "Face used for <em> tags."
- :group 'html-write)
-
-(defface html-write-strong
- '((t (:inherit html-write-base :weight bold)))
- "Face used for <strong> tags."
- :group 'html-write)
-
-(defface html-write-link
- '((t (:inherit html-write-base :underline t)))
- "Face used for <a> tags."
- :group 'html-write)
-
-(defconst html-write-tag-list
- '(("i" html-write-em-tag-actions)
- ("b" html-write-strong-tag-actions)
- ("em" html-write-em-tag-actions)
- ("strong" html-write-strong-tag-actions)
- ("a" html-write-a-tag-actions)
- ;;("img" html-write-img-tag-actions t)
- )
- "List of tags that should be hidden.
-A record in the list has the format
-
- \(TAG HANDLE [SINGLE])
-
-where
-- TAG is the tag name string.
-
-- HANDLE is a function to call when hiding the tag. It takes
- three parameters, TAG-BEGIN, TAG-END and OVERLAY. TAG-BEGIN
- and TAG-END are start and end of the start tag. OVERLAY is an
- overlay used for faces, keymaps etc that covers the whole tag."
- )
-
-(defun html-write-em-tag-actions (tag-begin tag-end overlay)
- "Do actions for <em> tags for tag between TAG-BEGIN and TAG-END.
-OVERLAY is the overlay added by `html-write-mode' for this tag."
- (overlay-put overlay 'face 'html-write-em))
-
-(defun html-write-strong-tag-actions (tag-begin tag-end overlay)
- "Do actions for <strong> tags for tag between TAG-BEGIN and TAG-END.
-OVERLAY is the overlay added by `html-write-mode' for this tag."
- (overlay-put overlay 'face 'html-write-strong))
-
-;; Fix-me
-(defun html-write-img-tag-actions (tag-begin tag-end overlay)
- "Do actions for <img> tags for tag between TAG-BEGIN and TAG-END.
-OVERLAY is the overlay added by `html-write-mode' for this tag."
- (save-match-data
- (let ((here (point-marker))
- href)
- (save-restriction
- (narrow-to-region tag-begin tag-end)
- (goto-char tag-begin)
- (when (looking-at (rx (*? anything)
- (1+ space)
- "src=\""
- (submatch
- (+ (not (any "\"\n"))))
- "\""))
- (setq href (match-string-no-properties 1))))
- (when href
- (overlay-put overlay 'display (concat "image " href))
- (overlay-put overlay 'html-write-url href))
- (goto-char (point)))))
-
-(defun html-write-point-entered-echo (left entered)
- (let ((msg (get-char-property entered 'help-echo)))
- (when msg (message "%s" msg))))
-
-(defun html-write-a-tag-actions (tag-begin tag-end overlay)
- "Do actions for <a> tags for tag between TAG-BEGIN and TAG-END.
-OVERLAY is the overlay added by `html-write-mode' for this tag."
- (save-match-data
- (let ((here (point-marker))
- href)
- (save-restriction
- (narrow-to-region tag-begin tag-end)
- (goto-char tag-begin)
- (when (looking-at (rx (*? anything)
- (1+ space)
- "href=\""
- (submatch
- (+ (not (any "\"\n"))))
- "\""))
- (setq href (match-string-no-properties 1))))
- (when href
- (overlay-put overlay 'face 'html-write-link)
- (overlay-put overlay 'help-echo href)
- ;; Fix-me: Seems like point-entered must be a text prop
- (overlay-put overlay 'point-entered 'html-write-point-entered-echo)
- (overlay-put overlay 'mouse-face 'highlight)
- (if (eq ?# (string-to-char href))
- (setq href (concat "file:///" buffer-file-name href))
- (when (file-exists-p href)
- (setq href (expand-file-name href))))
- (overlay-put overlay 'html-write-url href))
- (goto-char (point)))))
-
-(defun html-write-get-tag-ovl ()
- "Get tag overlay at current point."
- (catch 'ranges
- (dolist (ovl (overlays-at (point)))
- (let ((ranges (overlay-get ovl 'html-write)))
- (when ranges
- (throw 'ranges ovl))))))
-
-(defun html-write-toggle-current-tag ()
- "Toggle display of tag at current point."
- (interactive)
- (let* ((ovl (html-write-get-tag-ovl))
- (hiding-ranges (overlay-get ovl 'html-write))
- (invis (get-text-property (caar hiding-ranges) 'invisible))
- (ovl-start (overlay-start ovl))
- (ovl-end (overlay-end ovl)))
- (if invis
- (progn
- (overlay-put ovl 'html-face (overlay-get ovl 'face))
- (overlay-put ovl 'face 'highlight)
- (dolist (range hiding-ranges)
- (let ((start (car range))
- (end (cdr range)))
- (mumamo-with-buffer-prepared-for-jit-lock
- (put-text-property start end 'invisible nil)))))
- (delete-overlay ovl)
- (html-write-hide-tags ovl-start ovl-end))))
-
-(defun html-write-browse-link ()
- "Browse link in current tag."
- (interactive)
- (let* ((ovl (html-write-get-tag-ovl))
- (url (overlay-get ovl 'html-write-url)))
- (unless url
- (error "No link in this tag"))
- (browse-url url)
- ))
-
-(defvar html-write-keymap
- (let ((map (make-sparse-keymap))
- keys)
- (define-key map [(control ?c) ?+] 'html-write-toggle-current-tag)
- (define-key map [(control ?c) ?!] 'html-write-browse-link)
- (define-key map [mouse-1] 'html-write-browse-link)
- (when (featurep 'mlinks)
- (setq keys (where-is-internal 'mlinks-goto mlinks-mode-map))
- (dolist (key keys)
- (define-key map key 'html-write-mlinks-goto))
- (setq keys (where-is-internal 'mlinks-goto-other-window mlinks-mode-map))
- (dolist (key keys)
- (define-key map key 'html-write-mlinks-goto-other-window))
- (setq keys (where-is-internal 'mlinks-goto-other-frame mlinks-mode-map))
- (dolist (key keys)
- (define-key map key 'html-write-mlinks-goto-other-frame))
- )
- map))
-
-(defun html-write-mlinks-goto ()
- "Goto link."
- (interactive)
- (html-write-mlinks-goto-1 'mlinks-goto))
-
-(defun html-write-mlinks-goto-other-window ()
- "Goto link in other window."
- (interactive)
- (html-write-mlinks-goto-1 'mlinks-goto-other-window))
-
-(defun html-write-mlinks-goto-other-frame ()
- "Goto link in other frame."
- (interactive)
- (html-write-mlinks-goto-1 'mlinks-goto-other-frame))
-
-(defun html-write-mlinks-goto-1 (goto-fun)
- (let* ((ovl (html-write-get-tag-ovl))
- (ovl-start (overlay-start ovl))
- (ovl-end (overlay-end ovl))
- (here (point-marker)))
- (goto-char ovl-start)
- (skip-chars-forward "^\"" ovl-end)
- (forward-char)
- (unless (funcall goto-fun) (goto-char here))
- ))
-
-;;(html-write-make-hide-tags-regexp)
-(defun html-write-make-hide-tags-regexp ()
- "Make regexp used for finding tags to hide."
- ;; fix-me: single tags. Fix-me: what did I mean??? Maybe &lt; etc...
- (let ((tags-re
- (mapconcat 'identity
- (mapcar (lambda (elt)
- (if (stringp elt)
- elt
- (car elt)))
- html-write-tag-list)
- "\\|")))
- (concat
- "<\\(?1:"
- "\\(?:" tags-re "\\)"
- "\\)[^>]*>\\(?3:[^<]*\\)\\(?2:</\\1>\\)"
- )))
-
-(defvar html-write-pending-changes nil)
-(make-variable-buffer-local 'html-write-pending-changes)
-(put 'html-write-pending-changes 'permanent-local t)
-
-
-(defun html-write-hide-tags (start end)
- "Hide tags matching `html-write-tag-list' between START and END."
- ;;(message "html-write-hide-tags %s %s" start end)
- (let ((here (point-marker))
- (buffer-name (buffer-file-name))
- (dbg nil))
- (save-restriction
- (widen)
- (goto-char start)
- (save-match-data
- (let ((hide-tags-regexp (html-write-make-hide-tags-regexp)))
- (when dbg (message "before search start=%s end=%s, point=%s" start end (point)))
- (while (re-search-forward hide-tags-regexp end t)
- (let* ((ovl (make-overlay (match-beginning 0) (match-end 0)
- nil t nil))
- (tag-fun (cadr (assoc (match-string-no-properties 1)
- html-write-tag-list)))
- hiding-ranges)
- ;;(overlay-put ovl 'face 'font-lock-variable-name-face)
- (overlay-put ovl 'keymap html-write-keymap)
- (setq hiding-ranges
- (list (cons (1- (match-beginning 1)) (match-beginning 3))
- (cons (match-beginning 2) (match-end 2))))
- (overlay-put ovl 'html-write hiding-ranges)
- (mumamo-with-buffer-prepared-for-jit-lock
- (dolist (range hiding-ranges)
- (let ((start (car range))
- (end (cdr range)))
- (put-text-property start end 'invisible 'html-write)
- ;; Fix-me: more careful rear-nonsticky?
- (put-text-property (1- end) end
- 'rear-nonsticky '(invisible)))))
- ;; Let tag-fun override
- (when tag-fun
- (funcall tag-fun (match-end 1) (match-beginning 3) ovl))
- )))))
- (goto-char here)))
-
-(defun html-write-reveal-tags (start end)
- "Reveal tags between START and END."
- (let ((here (point-marker)))
- (save-restriction
- (widen)
- (goto-char (point-min))
- (save-match-data
- (mumamo-with-buffer-prepared-for-jit-lock
- (remove-text-properties start
- end
- '(invisible html-write))
- (dolist (ovl (overlays-in start end))
- (when (overlay-get ovl 'html-write)
- (let ((end (overlay-end ovl)))
- (remove-list-of-text-properties (1- end) end '(rear-nonsticky))
- (delete-overlay ovl)))))))
- (goto-char here)))
-
-;;;###autoload
-(define-minor-mode html-write-mode
- "Minor mode for convenient display of some HTML tags.
-When this mode is on a tag in `html-write-tag-list' is displayed as
-the inner text of the tag with a face corresponding to the tag.
-By default for example <i>...</i> is displayed as italic and
-<a>...</a> is displayed as an underlined clickable link.
-
-Only non-nested tags are hidden. The idea is just that it should
-be easier to read and write, not that it should look as html
-rendered text.
-
-See the customization group `html-write' for more information about
-faces.
-
-The following keys are defined when you are on a tag handled by
-this minor mode:
-
-\\{html-write-keymap}
-
-IMPORTANT: Most commands you use works also on the text that is
-hidden. The movement commands is an exception, but as soon as
-you edit the buffer you may also change the hidden parts.
-
-Hint: Together with `wrap-to-fill-column-mode' this can make it
-easier to see what text you are actually writing in html parts of
-a web file."
- :group 'html-write
- (if t
- (if html-write-mode
- (html-write-font-lock t)
- (html-write-font-lock nil)
- (save-restriction
- (widen)
- (html-write-reveal-tags (point-min) (point-max))))))
-(put html-write-mode 'permanent-local t)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Font lock
-
-(defun html-write-jit-extend-after-change (start end old-len)
- "For JIT lock extending.
-Should be on `jit-lock-after-change-extend-region-functions'.
-
-START, END and OLD-LEN are the parameters from after change."
- (let ((our-ovls nil))
- (dolist (ovl (append (overlays-in start end)
- (overlays-at start)
- nil))
- ;; Leave the overlays until re-fontification time, but note their extent.
- (when (overlay-get ovl 'html-write)
- (setq jit-lock-start (min jit-lock-start (overlay-start ovl)))
- (setq jit-lock-end (max jit-lock-end (overlay-end ovl)))))))
-
-
-(defun html-write-fontify (bound)
- ;;(message "html-write-fontify %s" bound)
- (let (tag-ovl)
- ;;(save-match-data
- (let* ((hide-tags-regexp (html-write-make-hide-tags-regexp))
- (next-tag (re-search-forward hide-tags-regexp bound t))
- (tag-beg (when next-tag (match-beginning 0)))
- (tag-end (when next-tag (match-end 0)))
- (tag-nam (when next-tag (match-string-no-properties 1)))
- (tag-fun (when next-tag (cadr (assoc tag-nam html-write-tag-list))))
- tag-hid
- (old-start (next-single-char-property-change (max (point-min) (1- (point))) 'html-write nil bound)))
- ;;(message "here a old-start=%s, tag-beg/end=%s/%s" old-start tag-beg tag-end)
- (setq tag-ovl (when next-tag (make-overlay tag-beg tag-end)))
- (when old-start
- ;; Fix-me: maybe valid, perhaps better keep it then?
- (let ((ovl (catch 'ovl
- (dolist (o (append (overlays-at old-start)
- (overlays-in old-start (1+ old-start))
- nil))
- (when (overlay-get o 'html-write)
- (throw 'ovl o))))))
- (when ovl ;; fix-me: there should be one...
- ;;(message "here b")
- (mumamo-with-buffer-prepared-for-jit-lock
- (remove-list-of-text-properties (overlay-start ovl) (overlay-end ovl) '(invisible html-write)))
- (delete-overlay ovl))))
- ;;(html-write-hide-tags start end)
- ;;(message "here d, tag-ovl=%s" tag-ovl)
- (when tag-ovl
- (overlay-put tag-ovl 'face 'font-lock-variable-name-face)
- (overlay-put tag-ovl 'keymap html-write-keymap)
- (setq tag-hid
- (list (cons (1- (match-beginning 1)) (match-beginning 3))
- (cons (match-beginning 2) (match-end 2))))
- (overlay-put tag-ovl 'html-write tag-hid)
- (when tag-fun
- (funcall tag-fun (match-end 1) (match-beginning 3) tag-ovl))
- (mumamo-with-buffer-prepared-for-jit-lock
- (dolist (range tag-hid)
- (let ((start (car range))
- (end (cdr range)))
- (put-text-property start end 'invisible 'html-write)
- ;;(put-text-property start end 'html-write t)
- ;; Fix-me: more careful rear-nonsticky?
- (put-text-property (1- end) end
- 'rear-nonsticky '(invisible)))))))
- ;;)
- (when tag-ovl
- (set-match-data (list (copy-marker (overlay-start tag-ovl))
- (copy-marker (overlay-end tag-ovl))))
- (goto-char (1+ (overlay-end tag-ovl)))
- t)))
-
-(defun html-write-font-lock (on)
- ;; See mlinks.el
- (let* ((add-or-remove (if on 'font-lock-add-keywords 'font-lock-remove-keywords))
- (fontify-fun 'html-write-fontify)
- (args (list nil `(( ,fontify-fun ( 0 'html-write-base t ))))))
- (when fontify-fun
- (when on (setq args (append args (list t))))
- (apply add-or-remove args)
- (font-lock-mode -1)
- (font-lock-mode 1)
- )))
-
-(provide 'html-write)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; html-write.el ends here
diff --git a/emacs.d/nxhtml/util/idn.el b/emacs.d/nxhtml/util/idn.el
deleted file mode 100644
index 21f7a4c..0000000
--- a/emacs.d/nxhtml/util/idn.el
+++ /dev/null
@@ -1,151 +0,0 @@
-;;; idn.el --- Recommended Identifier Profiles for IDN
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2010-03-24 Wed
-;; Version: 0.1
-;; Last-Updated: 2010-03-26 Fri
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `nxhtml-base'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Functions for handling IDN chars defined by
-;; `http://www.unicode.org/reports/tr39/'.
-;;
-;; See `idn-is-recommended'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;; Fix-me: You have to change this if you are not using nXhtml:
-(require 'nxhtml-base)
-(defvar uts39-datadir (expand-file-name "etc/uts39/" nxhtml-install-dir))
-
-(defun idn-init (bv)
- (save-match-data
- (let* ((idnchars-file (expand-file-name "idnchars.txt" uts39-datadir))
- (idnchars-old (find-buffer-visiting idnchars-file))
- (idnchars-buf (or idnchars-old
- (if (not (file-exists-p idnchars-file))
- (message "Can't find file %S" idnchars-file)
- (find-file-noselect idnchars-file))))
- here
- (range-patt (rx bol
- (group (repeat 4 (any xdigit)))
- (optional ".."
- (group (repeat 4 (any xdigit))))))
- (num-idn 0))
- (when idnchars-buf
- (with-current-buffer idnchars-buf
- (setq here (point))
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward range-patt nil t)
- (let* ((str-beg (match-string 0))
- (str-end (match-string 2))
- (beg (string-to-number str-beg 16))
- (end (or (when str-end (string-to-number str-end 16))
- beg)))
- ;;(message "str-beg=%S str-end=%S" str-beg str-end)
- (dotimes (ii (1+ (- end beg)))
- (let ((num (+ ii beg)))
- ;;(message "setting idn-char %s #%4x" num num)
- (setq num-idn (1+ num-idn))
- (aset bv num t))))))
- (goto-char here))
- (unless idnchars-old (kill-buffer idnchars-buf))
- (message "Found %d IDN chars" num-idn)
- t))))
-
-(defconst idn-char-vector
- (let ((bv (make-bool-vector (* 256 256) nil)))
- (when (idn-init bv)
- ;; (string-to-number "002D" 16)
- ;; Make a quick sanity check:
- (unless (and (not (aref bv 44))
- (aref bv 45))
- (message "idn-char-vector: Bad idn data in file idnchars.txt"))
- bv))
- "Boolean vector with recommended IDN chars.")
-
-
-;;(idn-is-recommended 0)
-;;(idn-is-recommended 65535)
-(defsubst idn-is-recommended (char)
- "Return t if character CHAR is a recommended IDN char.
-See URL `http://www.unicode.org/reports/tr39/'.
-
-Data is initialized from the file idnchars.txt in the directory
-`uts39-datadir'. This file is fetched from the above URL."
- (aref idn-char-vector char))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Below are some help functions that can be commented out.
-
-;;(global-set-key [f9] 'idn-char-at-point)
-(defun idn-char-at-point (pos)
- "Tell if char at POS is an recommended IDN char.
-Default POS is current point."
- (interactive "d")
- (let* ((this-char (char-after pos))
- (recommended (idn-is-recommended this-char)))
- (message "IDN char at point: %s (#%000x)" recommended this-char)))
-
-(defun idn-list-chars ()
- "Show all IDN chars.
-For more info see `idn-is-recommended'.
-
-Note: This may crash Emacs currently, at least on w32."
- (interactive)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'idn-list-chars) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert
- "Recommended Identifier Characters for IDN:\n\n")
- (let ((col 0)
- (cnt 0))
- (dotimes (nn (length idn-char-vector))
- (when (aref idn-char-vector nn)
- (setq cnt (1+ cnt))
- (setq col (mod (1+ col) 20))
- (when (= col 0) (insert "\n "))
- (insert " " (char-to-string nn))))
- (insert "\n\n"
- (format "There were %d IDN chars defined in `idn-char-vector'." cnt))
- ))))
-
-(provide 'idn)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; idn.el ends here
diff --git a/emacs.d/nxhtml/util/inlimg.el b/emacs.d/nxhtml/util/inlimg.el
deleted file mode 100644
index 9b07fb3..0000000
--- a/emacs.d/nxhtml/util/inlimg.el
+++ /dev/null
@@ -1,429 +0,0 @@
-;;; inlimg.el --- Display images inline
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-09-27
-(defconst inlimg:version "0.7") ;; Version:
-;; Last-Updated: 2009-07-14 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Display images inline. See `inlimg-mode' for more information.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'ourcomments-util nil t))
-
-(defvar inlimg-assoc-ext
- '((png (".png"))
- (gif (".gif"))
- (tiff (".tiff"))
- (jpeg (".jpg" ".jpeg"))
- (xpm (".xpm"))
- (xbm (".xbm"))
- (pbm (".pbm"))))
-
-(defvar inlimg-img-regexp nil)
-(make-variable-buffer-local 'inlimg-img-regexp)
-(put 'inlimg-img-regexp 'permanent-local t)
-
-(defvar inlimg-img-regexp-html
- (rx (or (and "<img"
- (1+ space)
- (0+ (1+ (not (any " <>")))
- (1+ space))
- "src=\""
- (group (1+ (not (any "\""))))
- "\""
- (*? anything)
- "/>")
- (and "url("
- ?\"
- (group (1+ (not (any "\)"))))
- ?\"
- ")"
- )
- (and "url("
- (group (+? (not (any ")"))))
- ")"
- )
- )))
-
-(defvar inlimg-img-regexp-org
- (rx-to-string
- `(and "[[file:"
- (group (+? (not (any "\]")))
- ,(let ((types nil))
- (dolist (typ image-types)
- (when (image-type-available-p typ)
- (dolist (ext (cadr (assoc typ inlimg-assoc-ext)))
- (setq types (cons ext types)))))
- (cons 'or types)))
- "]"
- (optional "["
- (+? (not (any "\]")))
- "]")
- "]"
- )))
-
-(defconst inlimg-modes-img-values
- '(
- (html-mode inlimg-img-regexp-html)
- (org-mode inlimg-img-regexp-org)
- ))
-
-(defun inlimg-img-spec-p (spec)
- (assoc spec inlimg-modes-img-values))
-
-;;;###autoload
-(defgroup inlimg nil
- "Customization group for inlimg."
- :group 'nxhtml)
-
-(defcustom inlimg-margins '(50 . 5)
- "Margins when displaying image."
- :type '(cons (integer :tag "Left margin")
- (integer :tag "Top margin"))
- :set (lambda (sym val)
- (set-default sym val)
- (when (fboundp 'inlimg-update-all-buffers)
- (inlimg-update-all-buffers)))
- :group 'inlimg)
-
-(defcustom inlimg-slice '(0 0 400 100)
- "How to slice images."
- :type '(choice (const :tag "Show whole images" nil)
- (list :tag "Show slice of image"
- (integer :tag "Top")
- (integer :tag "Left")
- (integer :tag "Width")
- (integer :tag "Height")))
- :set (lambda (sym val)
- (set-default sym val)
- (when (fboundp 'inlimg-update-all-buffers)
- (inlimg-update-all-buffers)))
- :group 'inlimg)
-
-(define-widget 'inlimg-spec-widget 'symbol
- "An inline image specification."
- :complete-function (lambda ()
- (interactive)
- (lisp-complete-symbol 'inlimg-img-spec-p))
- :prompt-match 'inlimg-img-spec-p
- :prompt-history 'widget-function-prompt-value-history
- :match-alternatives '(inlimg-img-spec-p)
- :validate (lambda (widget)
- (unless (inlimg-img-spec-p (widget-value widget))
- (widget-put widget :error (format "Invalid function: %S"
- (widget-value widget)))
- widget))
- :value 'org-mode
- :tag "Inlimg image values spec name")
-
-;; (customize-option 'inlimg-mode-specs)
-(defcustom inlimg-mode-specs
- '(
- (xml-mode html-mode)
- (sgml-mode html-mode)
- (nxml-mode html-mode)
- (php-mode html-mode)
- (css-mode html-mode)
- )
- "Equivalent mode for image tag search.
-Note that derived modes \(see info) are recognized by default.
-
-To add new image tag patterns modify `inlimg-modes-img-values'."
- :type '(repeat
- (list (major-mode-function :tag "Major mode")
- (inlimg-spec-widget :tag "Use tags as specified in")))
- :group 'inlimg)
-
-(defface inlimg-img-tag '((t :inherit 'lazy-highlight))
- "Face added to img tag when displaying image."
- :group 'inlimg)
-
-(defface inlimg-img-remote '((t :inherit 'isearch-fail))
- "Face used for notes telling image is remote."
- :group 'inlimg)
-
-(defface inlimg-img-missing '((t :inherit 'trailing-whitespace))
- "Face used for notes telling image is missing."
- :group 'inlimg)
-
-(defvar inlimg-img-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) ?+] 'inlimg-toggle-display)
- (define-key map [(control ?c) ?%] 'inlimg-toggle-slicing)
- map)
- "Keymap on image overlay.")
-
-(eval-after-load 'gimp
- '(gimp-add-point-bindings inlimg-img-keymap))
-
-(defsubst inlimg-ovl-p (ovl)
- "Return non-nil if OVL is an inlimg image overlay."
- (overlay-get ovl 'inlimg-img))
-
-(defun inlimg-ovl-valid-p (ovl)
- (and (overlay-get ovl 'inlimg-img)
- inlimg-img-regexp
- (save-match-data
- (let ((here (point)))
- (goto-char (overlay-start ovl))
- (prog1
- (looking-at (symbol-value inlimg-img-regexp))
- (goto-char here))))))
-
-(defun inlimg-next (pt display-image)
- "Display or hide next image after point PT.
-If DISPLAY-IMAGE is non-nil then display image, otherwise hide it.
-
-Return non-nil if an img tag was found."
- (when inlimg-img-regexp
- (let (src dir beg end img ovl remote beg-face)
- (goto-char pt)
- (save-match-data
- (when (re-search-forward (symbol-value inlimg-img-regexp) nil t)
- (setq src (or (match-string-no-properties 1)
- (match-string-no-properties 2)
- (match-string-no-properties 3)))
- (setq beg (match-beginning 0))
- (setq beg-face (get-text-property beg 'face))
- (setq remote (string-match "^https?://" src))
- (setq end (- (line-end-position) 0))
- (setq ovl (catch 'old-ovl
- (dolist (ovl (overlays-at beg))
- (when (inlimg-ovl-p ovl)
- (throw 'old-ovl ovl)))
- nil))
- (unless ovl
- (setq ovl (make-overlay beg end))
- (overlay-put ovl 'inlimg-img t)
- (overlay-put ovl 'priority 100)
- (overlay-put ovl 'face 'inlimg-img-tag)
- (overlay-put ovl 'keymap inlimg-img-keymap))
- (overlay-put ovl 'image-file src)
- (overlay-put ovl 'inlimg-slice inlimg-slice)
- (if display-image
- (unless (memq beg-face '(font-lock-comment-face font-lock-string-face))
- (unless remote
- (setq dir (if (buffer-file-name)
- (file-name-directory (buffer-file-name))
- default-directory))
- (setq src (expand-file-name src dir)))
- (if (or remote (not (file-exists-p src)))
- (setq img (propertize
- (if remote " Image is on the web " " Image not found ")
- 'face (if remote 'inlimg-img-remote 'inlimg-img-missing)))
- (setq img (create-image src nil nil
- :relief 5
- :margin inlimg-margins))
- (setq img (inlimg-slice-img img inlimg-slice)))
- (let ((str (copy-sequence "\nX")))
- (setq str (propertize str 'face 'inlimg-img-tag))
- (put-text-property 1 2 'display img str)
- (overlay-put ovl 'after-string str)))
- (overlay-put ovl 'after-string nil))))
- ovl)))
-
-(defun inlimg-slice-img (img slice)
- (if (not slice)
- img
- (let* ((sizes (image-size img t))
- (width (car sizes))
- (height (cdr sizes))
- (sl-left (nth 0 slice))
- (sl-top (nth 1 slice))
- (sl-width (nth 2 slice))
- (sl-height (nth 3 slice)))
- (when (> sl-left width) (setq sl-left 0))
- (when (> (+ sl-left sl-width) width) (setq sl-width (- width sl-left)))
- (when (> sl-top height) (setq sl-top 0))
- (when (> (+ sl-top sl-height) height) (setq sl-height (- height sl-top)))
- (setq img (list img))
- (setq img (cons (append '(slice)
- slice
- (list sl-top sl-left sl-width sl-height)
- nil)
- img)))))
-
-;;;###autoload
-(define-minor-mode inlimg-mode
- "Display images inline.
-Search buffer for image tags. Display found images.
-
-Image tags are setup per major mode in `inlimg-mode-specs'.
-
-Images are displayed on a line below the tag referencing them.
-The whole image or a slice of it may be displayed, see
-`inlimg-slice'. Margins relative text are specified in
-`inlimg-margins'.
-
-See also the commands `inlimg-toggle-display' and
-`inlimg-toggle-slicing'.
-
-Note: This minor mode uses `font-lock-mode'."
- :keymap nil
- :group 'inlimg
- (if inlimg-mode
- (progn
- (let ((major-mode (or (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode
- (fboundp 'mumamo-main-major-mode)
- (mumamo-main-major-mode))
- major-mode)))
- (inlimg-get-buffer-img-values)
- (unless inlimg-img-regexp
- (message "inlim-mode: No image spec, can't do anything"))
- (add-hook 'font-lock-mode-hook 'inlimg-on-font-lock-off))
- (inlimg-font-lock t))
- (inlimg-font-lock nil)
- (inlimg-delete-overlays)))
-(put 'inlimg-mode 'permanent-local t)
-
-(defun inlimg-delete-overlays ()
- (save-restriction
- (widen)
- (let (ovl)
- (dolist (ovl (overlays-in (point-min) (point-max)))
- (when (inlimg-ovl-p ovl)
- (delete-overlay ovl))))))
-
-(defun inlimg-get-buffer-img-values ()
- (let* (rec
- (spec (or (catch 'spec
- (dolist (rec inlimg-mode-specs)
- (when (derived-mode-p (car rec))
- (throw 'spec (nth 1 rec)))))
- major-mode))
- (values (when spec (nth 1 (assoc spec inlimg-modes-img-values))))
- )
- (setq inlimg-img-regexp values)
- ))
-
-(defun inlimg--global-turn-on ()
- (inlimg-get-buffer-img-values)
- (when inlimg-img-regexp
- (inlimg-mode 1)))
-
-;;;###autoload
-(define-globalized-minor-mode inlimg-global-mode inlimg-mode inlimg--global-turn-on)
-
-;;;###autoload
-(defun inlimg-toggle-display (point)
- "Toggle display of image at point POINT.
-See also the command `inlimg-mode'."
- (interactive (list (point)))
- (let ((here (point))
- (ovl
- (catch 'ovl
- (dolist (ovl (overlays-at (point)))
- (when (inlimg-ovl-p ovl)
- (throw 'ovl ovl)))))
- is-displayed)
- (if (not ovl)
- (message "No image at point %s" here)
- (setq is-displayed (overlay-get ovl 'after-string))
- (inlimg-next (overlay-start ovl) (not is-displayed))
- (goto-char here))))
-
-;;;###autoload
-(defun inlimg-toggle-slicing (point)
- "Toggle slicing of image at point POINT.
-See also the command `inlimg-mode'."
- (interactive (list (point)))
- (let* ((here (point))
- (ovl
- (catch 'ovl
- (dolist (ovl (overlays-at (point)))
- (when (inlimg-ovl-p ovl)
- (throw 'ovl ovl)))))
- (inlimg-slice inlimg-slice)
- is-displayed)
- (if (not ovl)
- (message "No image at point %s" here)
- (setq is-displayed (overlay-get ovl 'after-string))
- (when (overlay-get ovl 'inlimg-slice)
- (setq inlimg-slice nil))
- (inlimg-next (overlay-start ovl) is-displayed)
- (goto-char here))))
-
-
-(defun inlimg-font-lock-fun (bound)
- (let ((here (point))
- old-ovls new-ovls ovl)
- (goto-char (line-beginning-position))
- (dolist (ovl (overlays-in (point) bound))
- (when (inlimg-ovl-p ovl)
- (setq old-ovls (cons ovl old-ovls))))
- (while (and (< (point) bound)
- (setq ovl (inlimg-next (point) t)))
- (setq new-ovls (cons ovl new-ovls)))
- (dolist (ovl old-ovls)
- (unless (inlimg-ovl-valid-p ovl)
- (delete-overlay ovl)
- ))))
-
-;; Fix-me: This stops working for changes with nxhtml-mumamo-mode, but
-;; works for nxhtml-mode and html-mumamo-mode...
-(defvar inlimg-this-is-not-font-lock-off nil)
-(defun inlimg-font-lock (on)
- (let ((add-or-remove (if on 'font-lock-add-keywords 'font-lock-remove-keywords))
- (link-fun))
- (funcall add-or-remove nil
- `((inlimg-font-lock-fun
- 1
- mlinks-link
- prepend)))
- (let ((inlimg-this-is-not-font-lock-off t)
- (mumamo-multi-major-mode nil))
- (font-lock-mode -1)
- (font-lock-mode 1))))
-
-(defun inlimg-on-font-lock-off ()
- (unless (or inlimg-this-is-not-font-lock-off
- (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode))
- (when inlimg-mode
- (inlimg-mode -1)
- )))
-(put 'inlimg-on-font-lock-off 'permanent-local-hook t)
-
-
-(provide 'inlimg)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; inlimg.el ends here
diff --git a/emacs.d/nxhtml/util/key-cat.el b/emacs.d/nxhtml/util/key-cat.el
deleted file mode 100644
index ac4938c..0000000
--- a/emacs.d/nxhtml/util/key-cat.el
+++ /dev/null
@@ -1,329 +0,0 @@
-;;; key-cat.el --- List key bindings by category
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Sat Jan 28 2006
-;; Version: 0.25
-;; Last-Updated: 2009-05-09 Sat
-;; Keywords:
-;; Compatibility:
-;;
-;; Requires Emacs 22.
-;;
-;; Features that might be required by this library:
-;;
- ;; `cl'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Display help that looks like a reference sheet for common
-;; commands.
-;;
-;; To use this in your .emacs put
-;;
-;; (require 'key-cat)
-;;
-;; Then use the command
-;;
-;; M-x key-cat-help
-;;
-;; For more information see that command.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-(defconst key-cat-cmd-list
- '(
- (error-testing
- (commands
- :visible nil
- hallo
- key-cat-help
- key-cat-where-is
- ))
- ("Help"
- (commands
- help-for-help
- info-emacs-manual
- info
- ))
- ("Special Functions and Keys"
- ;; For similar functions that are most often bound to a specific key
- (commands
- key-cat-tab
- key-cat-complete
- )
- )
- ("Files, Buffers and Windows"
- (commands
- find-file
- save-buffer
- write-file
- split-window-vertically
- split-window-horizontally
- delete-other-windows
- other-window
- buffer-menu
- ))
- ("Search and replace"
- (commands
- isearch-forward
- isearch-backward
- query-replace
- isearch-forward-regexp
- isearch-backward-regexp
- query-replace-regexp
- occur
- lgrep
- rgrep
- ))
- ("Lines"
- (commands
- move-beginning-of-line
- move-end-of-line
- kill-line
- ))
- ("Words"
- (commands
- forward-word
- backward-word
- kill-word
- ))
- ("Region"
- (commands
- set-mark-command
- ;;cua-set-mark
- kill-region
- copy-region-as-kill
- yank
- yank-pop
- ))
- ("Undo"
- (commands
- undo
- ))
- ("Viper"
- (commands
- :visible (lambda()
- (and (featurep 'viper)
- viper-mode))
- viper-next-line
- viper-previous-line
- viper-forward-word
- viper-backward-word
- viper-forward-Word
- viper-backward-Word
- viper-repeat
- viper-forward-char
- viper-backward-char
- viper-next-line-at-bol
- viper-previous-line-at-bol
- viper-command-argument
- viper-digit-argument
- ))
- )
- "List with common commands to display by `key-cat-help'.
-The elements of this list corresponds to sections to show in the
-help. Each element consists of sublists beginning with the
-keyword 'commands. The sublists may after 'command contain the
-keyword :visible which takes a variable or function as argument.
-If the argument evaluates to non-nil the list is shown."
- )
-
-
-(defvar key-cat-cmd-list-1 nil)
-
-(defun key-cat-help()
- "Display reference sheet style help for common commands.
-See also `key-cat-cmd-list'."
- (interactive)
- (if (> 22 emacs-major-version)
- (message "Sorry, this requires Emacs 22 or later")
- ;; Delay to get correct bindings when running through M-x
- (setq key-cat-cmd-list-1 key-cat-cmd-list)
- (run-with-timer 0.1 nil 'key-cat-help-internal)))
-
-(defun key-cat-help-internal() ;(category)
- (message "Please wait ...")
- (condition-case err
- (save-match-data ;; runs in timer
- (let ((result))
- (help-setup-xref (list #'key-cat-help)
- (interactive-p))
- ;; (push (list "Changing commands"
- ;; (list
- ;; 'command
- ;; indent-line-function
- ;; ))
- ;; key-cat-cmd-list-1)
- (dolist (catentry key-cat-cmd-list-1)
- (let ((category (car catentry))
- (commands (cdr catentry))
- (cmds)
- (keyw)
- (visible)
- (visible-fun)
- (cmdstr)
- (doc))
- (dolist (cmdlist commands)
- (setq cmdlist (cdr cmdlist))
- (setq visible t)
- (while (keywordp (setq keyw (car cmdlist)))
- (setq cmdlist (cdr cmdlist))
- (case keyw
- (:visible (setq visible-fun (pop cmdlist))
- (setq visible (if (symbolp visible-fun)
- (progn
- (symbol-value visible-fun))
- (funcall visible-fun)))
- )
- ))
- (when visible
- (dolist (cmd cmdlist)
- (setq cmds (cons cmd cmds)))))
- (when cmds
- (push (format "\n%s:\n"
- (let ((s (format "%s" category)))
- (put-text-property 0 (length s)
- 'face (list
- 'bold
- )
- s)
- s))
- result))
- (setq cmds (reverse cmds))
- (dolist (cmd cmds)
- (setq cmdstr
- (let ((s "Where to find it:" ))
- (put-text-property 0 (length s)
- 'face '(:slant italic
- :background "RGB:dd/dd/ff"
- ) s) s))
- (if (not (functionp cmd))
- (cond
- ((eq 'key-cat-tab cmd)
- (let ((s "Indent line"))
- (put-text-property 0 (length s) 'face '(:foreground "blue") s)
- (push s result))
- (push ":\n" result)
- (push (concat
- " "
- "Indent current line (done by specific major mode function).\n")
- result)
- (push (format " %17s %s\n" cmdstr (key-description [tab])) result)
- )
- ((eq 'key-cat-complete cmd)
- (let ((s "Completion"))
- (put-text-property 0 (length s) 'face '(:foreground "blue") s)
- (push s result))
- (push ":\n" result)
- (push (concat
- " "
- "Performe completion at point (done by specific major mode function).\n")
- result)
- (push (format " %17s %s\n" cmdstr (key-description [meta tab])) result)
- )
- (t
- (let ((s (format "`%s': (not a function)\n" cmd)))
- (put-text-property 0 (length s) 'face '(:foreground "red") s)
- (push s result))))
- (let ((keys (key-cat-where-is cmd)))
- (push (format "`%s':\n" cmd) result)
- (setq doc (documentation cmd t))
- (push
- (concat
- " "
- (if doc
- (substring doc 0 (string-match "\n" doc))
- "(not documented)")
- "\n")
- result)
- (if (not keys)
- (if (interactive-form cmd)
- (push (format " %17s M-x %s\n" cmdstr cmd) result)
- (let ((s "(not an interactive command)"))
- (put-text-property 0 (length s) 'face '(:foreground "red") s)
- (push (format " %17s %s\n" cmdstr s) result)))
- (dolist (key keys)
- (push (format " %17s " cmdstr) result)
- (push (format "%s\n"
- (if (eq (elt key 0) 'xmenu-bar)
- "Menus"
- (key-description key)))
- result)
- (setq cmdstr ""))))))))
- (save-excursion
- (with-current-buffer (help-buffer)
- (with-output-to-temp-buffer (help-buffer)
- (insert
- (let ((s "Some important commands\n"))
- (put-text-property 0 (length s)
- 'face '(:weight bold
- :height 1.5
- :foreground "RGB:00/00/66") s)
- s))
- (setq result (reverse result))
- (dolist (r result)
- (insert r))
- )))
- (message "")))
- (error (message "%s" (error-message-string err)))))
-
-;; Mostly copied from `where-is':
-(defun key-cat-where-is (definition)
- "Return key sequences that invoke the command DEFINITION.
-Argument is a command definition, usually a symbol with a function definition."
- (let ((func (indirect-function definition))
- (defs nil)
- (all-keys))
- ;; In DEFS, find all symbols that are aliases for DEFINITION.
- (mapatoms (lambda (symbol)
- (and (fboundp symbol)
- (not (eq symbol definition))
- (eq func (condition-case ()
- (indirect-function symbol)
- (error symbol)))
- (push symbol defs))))
- ;; Look at all the symbols--first DEFINITION,
- ;; then its aliases.
- (dolist (symbol (cons definition defs))
- (let* ((remapped (command-remapping symbol))
- (keys (where-is-internal
- ;;symbol overriding-local-map nil nil remapped)))
- symbol nil nil nil remapped)))
- (when keys
- (dolist (key keys)
- (setq all-keys (cons key all-keys))))))
- all-keys))
-
-
-
-(provide 'key-cat)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; key-cat.el ends here
diff --git a/emacs.d/nxhtml/util/majmodpri.el b/emacs.d/nxhtml/util/majmodpri.el
deleted file mode 100644
index 7bdbea6..0000000
--- a/emacs.d/nxhtml/util/majmodpri.el
+++ /dev/null
@@ -1,448 +0,0 @@
-;;; majmodpri.el --- Major mode priorities handling
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-26
-(defconst majmodpri:version "0.62") ;;Version:
-;; Last-Updated: 2009-04-30 Thu
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Different elisp libraries may try to handle the same type of files.
-;; They normally do that by entering their major mode for a file type
-;; in `auto-mode-alist' or the other lists affecting `normal-mode'.
-;; Since the libraries may be loaded in different orders in different
-;; Emacs sessions this can lead to rather stochastic choices of major
-;; mode.
-;;
-;; This library tries to give the control of which major modes will be
-;; used back to the user. It does that by letting the user set up
-;; priorities among the major modes. This priorities are used to sort
-;; the lists used by `normal-mode'.
-;;
-;; To setup this libray and get more information do
-;;
-;; M-x customize-group RET majmodpri RET
-;;
-;; Or, see the commands `majmodpri-sort-lists'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'ourcomments-indirect-fun nil t))
-
-;;;; Idle sorting
-
-(defvar majmodpri-idle-sort-timer nil)
-
-(defun majmodpri-cancel-idle-sort ()
- "Cancel idle sorting request."
- (when majmodpri-idle-sort-timer
- (cancel-timer majmodpri-idle-sort-timer)
- (setq majmodpri-idle-sort-timer nil)))
-
-(defun majmodpri-start-idle-sort ()
- "Request idle sorting."
- (majmodpri-cancel-idle-sort)
- (setq majmodpri-idle-sort-timer
- (run-with-idle-timer 0 nil 'majmodpri-sort-lists-in-timer)))
-
-(defun majmodpri-sort-lists-in-timer ()
- (condition-case err
- (save-match-data ;; runs in timer
- (majmodpri-sort-lists))
- (error (message "(majmodpri-sort-lists): %s" err))))
-
-
-;;;; Sorting
-
-(defvar majmodpri-schwarzian-ordnum nil)
-(defun majmodpri-schwarzian-in (rec)
- "Transform REC before sorting."
- (setq majmodpri-schwarzian-ordnum (1+ majmodpri-schwarzian-ordnum))
- (let ((mode (cdr rec)))
- (list
- (list mode majmodpri-schwarzian-ordnum)
- rec)))
-
-(defun majmodpri-schwarzian-out (rec)
- "Get original value of REC after sorting."
- (cadr rec))
-
-;; Fix-me: default for Emacs 22??
-(defcustom majmodpri-no-nxml (< emacs-major-version 23)
- "Don't use multi major modes with nxml if non-nil.
-The default for Emacs prior to version 23 is to not use this
-multi major modes by default since there are some problems.
-
-This gives those multi major mode lower priority, but it does not
-prevent use of them."
- :type 'boolean
- :group 'majmodpri)
-
-;; (majmodpri-priority 'html-mumamo-mode)
-;; (majmodpri-priority 'nxhtml-mumamo-mode)
-(defsubst majmodpri-priority (mode)
- "Return major mode MODE priority."
- (if (and majmodpri-no-nxml
- ;; (symbolp mode)
- ;; (save-match-data
- ;; (string-match "nxhtml-mumamo" (symbol-name mode))))
- (let* ((real (or (ourcomments-indirect-fun mode)
- mode))
- (chunk (when real (get real 'mumamo-chunk-family)))
- (major-mode (when chunk
- (cadr chunk))))
- (when major-mode
- (derived-mode-p 'nxml-mode))))
- 0
- (length (memq mode majmodpri-mode-priorities))))
-
-(defun majmodpri-compare-auto-modes (rec1 rec2)
- "Compare record REC1 and record REC2.
-Comparision:
-
-- First check `majmodpri-mode-priorities'.
-- Then use old order in list."
- (let* ((schw1 (car rec1))
- (schw2 (car rec2))
- (mod1 (nth 0 schw1))
- (mod2 (nth 0 schw2))
- (ord1 (nth 1 schw1))
- (ord2 (nth 1 schw2))
- (pri1 (majmodpri-priority mod1))
- (pri2 (majmodpri-priority mod2)))
- (cond
- ((/= pri1 pri2) (> pri1 pri2))
- (t (> ord1 ord2)))))
-
-;;(benchmark 100 (quote (majmodpri-sort-lists)))
-;;(defvar my-auto-mode-alist nil)
-(defun majmodpri-sort-auto-mode-alist ()
- "Sort `auto-mode-alist' after users priorities."
- (setq majmodpri-schwarzian-ordnum 0)
- ;; Do not reorder function part, but put it first.
- (let (fun-list
- mod-list)
- (dolist (rec auto-mode-alist)
- (if (listp (cdr rec))
- (setq fun-list (cons rec fun-list))
- (setq mod-list (cons rec mod-list))))
- (setq fun-list (nreverse fun-list))
- (setq auto-mode-alist
- (append
- fun-list
- (mapcar 'majmodpri-schwarzian-out
- (sort
- (mapcar 'majmodpri-schwarzian-in mod-list)
- 'majmodpri-compare-auto-modes))))))
-
-(defun majmodpri-sort-magic-list (magic-mode-list-sym)
- "Sort list MAGIC-MODE-LIST-SYM after users priorities."
- (let ((orig-ordnum 0))
- (set magic-mode-list-sym
- ;; S out
- (mapcar (lambda (rec)
- (cadr rec))
- ;; Sort
- (sort
- ;; S in
- (mapcar (lambda (rec)
- (setq orig-ordnum (1+ orig-ordnum))
- (let ((mode (cdr rec)))
- (list
- (list mode orig-ordnum)
- rec)))
- (symbol-value magic-mode-list-sym))
- (lambda (rec1 rec2)
- (let* ((schw1 (car rec1))
- (schw2 (car rec2))
- (mod1 (nth 0 schw1))
- (mod2 (nth 0 schw2))
- (ord1 (nth 1 schw1))
- (ord2 (nth 1 schw2))
- (pri1 (majmodpri-priority mod1))
- (pri2 (majmodpri-priority mod2)))
- (cond
- ((/= pri1 pri2) (> pri1 pri2))
- (t (> ord1 ord2))))))))))
-
-;;;###autoload
-(defun majmodpri-sort-lists ()
- "Sort the list used when selecting major mode.
-Only sort those lists choosen in `majmodpri-lists-to-sort'.
-Sort according to priorities in `majmodpri-mode-priorities'.
-Keep the old order in the list otherwise.
-
-The lists can be sorted when loading elisp libraries, see
-`majmodpri-sort-after-load'.
-
-See also `majmodpri-apply-priorities'."
- (interactive)
- ;;(message "majmodpri-sort-lists running ...")
- (majmodpri-cancel-idle-sort)
- (when (memq 'magic-mode-alist majmodpri-lists-to-sort)
- (majmodpri-sort-magic-list 'magic-mode-alist))
- (when (memq 'auto-mode-alist majmodpri-lists-to-sort)
- (majmodpri-sort-auto-mode-alist))
- (when (memq 'magic-fallback-mode-alist majmodpri-lists-to-sort)
- (majmodpri-sort-magic-list 'magic-fallback-mode-alist))
- ;;(message "majmodpri-sort-lists running ... (done)")
- )
-
-
-;;;###autoload
-(defun majmodpri-apply ()
- "Sort major mode lists and apply to existing buffers.
-Note: This function is suitable to add to
-`desktop-after-read-hook'. It will restore the multi major modes
-in buffers."
- (majmodpri-apply-priorities t))
-
-(defun majmodpri-sort-apply-to-current ()
- "Sort lists and apply to current buffer."
- (majmodpri-sort-lists)
- (add-hook 'find-file-hook 'normal-mode t t))
-
-(defun majmodpri-check-normal-mode ()
- "Like `normal-mode', but keep major mode if same."
- (let ((keep-mode-if-same t)
- (old-major-mode major-mode)
- (old-mumamo-multi-major-mode (when (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)))
- (report-errors "File mode specification error: %s"
- (set-auto-mode t))
- ;;(msgtrc "majmodpri-check %s %s %s" (current-buffer) major-mode mumamo-multi-major-mode)
- (unless (and (eq old-major-mode major-mode)
- (or (not old-mumamo-multi-major-mode)
- (eq old-mumamo-multi-major-mode mumamo-multi-major-mode)))
- (msgtrc "majmodpri-check changing")
- (report-errors "File local-variables error: %s"
- (hack-local-variables))
- ;; Turn font lock off and on, to make sure it takes account of
- ;; whatever file local variables are relevant to it.
- (when (and font-lock-mode
- ;; Font-lock-mode (now in font-core.el) can be ON when
- ;; font-lock.el still hasn't been loaded.
- (boundp 'font-lock-keywords)
- (eq (car font-lock-keywords) t))
- (setq font-lock-keywords (cadr font-lock-keywords))
- (font-lock-mode 1))
- (message "majmodpri-apply-priorities: buffer=%s, %s,%s => %s,%s"
- (current-buffer)
- old-major-mode
- old-mumamo-multi-major-mode
- major-mode
- (when (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)))))
-
-;;;###autoload
-(defun majmodpri-apply-priorities (change-modes)
- "Apply major mode priorities.
-First run `majmodpri-sort-lists' and then if CHANGE-MODES is
-non-nil apply to existing file buffers. If interactive ask
-before applying."
- (interactive '(nil))
- (message "majmodpri-apply-priorities running ...")
- (majmodpri-sort-lists)
- (when (or change-modes
- (with-no-warnings (called-interactively-p)))
- (let (file-buffers)
- (dolist (buffer (buffer-list))
- (with-current-buffer buffer
- (let ((name (buffer-name))
- (file buffer-file-name))
- (or (string= (substring name 0 1) " ") ;; Internal
- (not file)
- (setq file-buffers (cons buffer file-buffers))))))
- (if (not file-buffers)
- (when change-modes
- ;;(message "majmodpri-apply-priorities: No file buffers to change modes in")
- )
- (when (with-no-warnings (called-interactively-p))
- (setq change-modes
- (y-or-n-p "Check major mode in all file visiting buffers? ")))
- (when change-modes
- (dolist (buffer file-buffers)
- (with-current-buffer buffer
- (let ((old-major major-mode))
- (majmodpri-check-normal-mode)
- )))))))
- (message "majmodpri-apply-priorities running ... (done)"))
-
-
-;;;; Custom
-
-;;;###autoload
-(defgroup majmodpri nil
- "Customization group for majmodpri.el"
- :group 'nxhtml
- )
-
-(defcustom majmodpri-mode-priorities
- '(
- cperl-mumamo-mode
- csound-sgml-mumamo-mode
- django-nxhtml-mumamo-mode
- django-html-mumamo-mode
- embperl-nxhtml-mumamo-mode
- embperl-html-mumamo-mode
- eruby-nxhtml-mumamo-mode
- eruby-html-mumamo-mode
- genshi-nxhtml-mumamo-mode
- genshi-html-mumamo-mode
- jsp-nxhtml-mumamo-mode
- jsp-html-mumamo-mode
- laszlo-nxml-mumamo-mode
- metapost-mumamo-mode
- mjt-nxhtml-mumamo-mode
- mjt-html-mumamo-mode
- noweb2-mumamo-mode
- ;;org-mumamo-mode
- perl-mumamo-mode
- smarty-nxhtml-mumamo-mode
- smarty-html-mumamo-mode
- ;;tt-html-mumamo-mode
-
- nxhtml-mumamo-mode
- html-mumamo-mode
- nxml-mumamo-mode
- nxml-mode
-
- javascript-mode
- ;;espresso-mode
- rhtml-mode
- )
- "Priority list for major modes.
-Modes that comes first have higher priority.
-See `majmodpri-sort-lists' for more information."
- :type '(repeat symbol)
- :set (lambda (sym val)
- (set-default sym val)
- (when (and (boundp 'majmodpri-sort-after-load)
- majmodpri-sort-after-load)
- (majmodpri-start-idle-sort)))
- :group 'majmodpri)
-
-(defcustom majmodpri-lists-to-sort
- '(magic-mode-alist auto-mode-alist magic-fallback-mode-alist)
- ;;nil
- "Which major mode lists to sort.
-See `majmodpri-sort-lists' for more information."
- :type '(set (const magic-mode-alist)
- (const auto-mode-alist)
- (const magic-fallback-mode-alist))
- :set (lambda (sym val)
- (set-default sym val)
- (when (and (boundp 'majmodpri-sort-after-load)
- majmodpri-sort-after-load)
- (majmodpri-start-idle-sort)))
- :group 'majmodpri)
-
-(defcustom majmodpri-sort-after-load
- '(
- chart
- gpl
- ;;nxhtml-autoload
- php-mode
- rnc-mode
- ruby-mode
- )
- "Sort major mode lists after loading elisp libraries if non-nil.
-This should not really be needed since just loading a library
-should not change how Emacs behaves. There are however quite a
-few thirt party libraries that does change `auto-mode-alist'
-\(including some of my own) since that sometimes seems
-reasonable. Some of them are in the default value of this
-variable.
-
-There are two possibilities for sorting here:
-
-- Value=list of features (default). Sort immediately after loading a
- library in the list. Apply to current buffer.
-
-- Value=t. Sort after loading any library. Sorting is then not
- done immediately. Instead it runs in an idle timer. This
- means that if several elisp libraries are loaded in a command
- then the sorting will only be done once, after the command has
- finished. After sorting apply to all buffers.
-
-Note that the default does break Emacs rule that loading a
-library should not change how Emacs behave. On the other hand
-the default tries to compensate for that the loaded libraries
-breaks this rule by changing `auto-mode-alist'.
-
-See `majmodpri-sort-lists' for more information."
- :type '(choice (const :tag "Never" nil)
- (const :tag "After loading any elisp library" t)
- (repeat :tag "After loading specified features" symbol))
- :set (lambda (sym val)
- (set-default sym val)
- ;; Clean up `after-load-alist' first.
- (setq after-load-alist
- (delq nil
- (mapcar (lambda (rec)
- (unless (member (cadr rec)
- '((majmodpri-start-idle-sort)
- (majmodpri-sort-lists)))
- rec))
- after-load-alist)))
- (when val
- ;;(message "majmodpri-sort-after-load: val=%s" val)
- (let ((sort-and-apply nil))
- (if (not (listp val))
- (add-to-list 'after-load-alist
- (if (eq val t)
- '(".*" (majmodpri-start-idle-sort))
- '("." (majmodpri-sort-lists))))
- (dolist (feat val)
- ;;(message "feat=%s" feat)
- (if (featurep feat)
- (setq sort-and-apply t)
- (if (eq val t)
- (eval-after-load feat '(majmodpri-start-idle-sort))
- (eval-after-load feat '(majmodpri-sort-apply-to-current))))))
- (when sort-and-apply
- ;;(message "majmodpri-sort-after-load: sort-and-apply")
- (majmodpri-apply-priorities t))
- (if (eq val t)
- (majmodpri-start-idle-sort)
- (majmodpri-apply-priorities t)))))
- :group 'majmodpri)
-
-
-(provide 'majmodpri)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; majmodpri.el ends here
diff --git a/emacs.d/nxhtml/util/markchars.el b/emacs.d/nxhtml/util/markchars.el
deleted file mode 100644
index e1179b7..0000000
--- a/emacs.d/nxhtml/util/markchars.el
+++ /dev/null
@@ -1,151 +0,0 @@
-;;; markchars.el --- Mark chars fitting certain characteristics
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2010-03-22 Mon
-;; Version:
-;; Last-Updated: 2010-03-25 Thu
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; Required feature `markchars' was not provided.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Mark special chars, by default non-ascii, non-IDN chars. See
-;; `markchars-mode'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'idn)
-
-;;;###autoload
-(defgroup markchars nil
- "Customization group for `markchars-mode'."
- :group 'convenience)
-
-(defface markchars-light
- '((t (:underline "light blue")))
- "Light face for `markchars-mode' char marking."
- :group 'markchars)
-
-(defface markchars-heavy
- '((t (:underline "magenta")))
- "Heavy face for `markchars-mode' char marking."
- :group 'markchars)
-
-(defcustom markchars-face 'markchars-heavy
- "Pointer to face used for marking chars."
- :type 'face
- :group 'markchars)
-
-;; (markchars-nonidn-fun (point-max))
-;; åäö
-;; character: å (229, #o345, #xe5)
-;; (idn-is-recommended 229) => t
-;; 152F ; 00B7 0034 ; SL # ( ᔯ → ·4 ) CANADIAN SYLLABICS YWE → MIDDLE DOT, DIGIT FOUR # {source:835} á§4 {[source:696]}
-
-(defun markchars-nonidn-fun (bound)
- "Font lock matcher for non-IDN, non-ascii chars."
- (let* ((beg (catch 'beg
- (while (< (point) bound)
- (let ((char (char-after)))
- (unless (or (< char 256)
- (idn-is-recommended char))
- (throw 'beg (point)))
- (forward-char)))))
- (end (when beg
- (catch 'end
- (while (< (point) bound)
- (let ((char (char-after (point))))
- (when (or (< char 256)
- (idn-is-recommended char))
- (throw 'end (point)))
- (forward-char)))))))
- (when beg
- (setq end (or end bound))
- (set-match-data (list (copy-marker beg) (copy-marker end)))
- t)))
-
-(defcustom markchars-keywords (or (when (fboundp 'idn-is-recommended) 'markchars-nonidn-fun)
- "[[:nonascii:]]+")
- "Regexp or function for font lock to use for characters to mark.
-By default it matches non-IDN, non-ascii chars."
- :type '(choice (const :tag "Non-ascii chars" "[[:nonascii:]]+")
- (const :tag "Non IDN chars (Unicode.org tr39 suggestions)" markchars-nonidn-fun))
- :group 'markchars)
-
-(defvar markchars-used-keywords nil
- "Keywords currently used for font lock.")
-(put 'markchars-used-keywords 'permanent-local t)
-
-(defun markchars-set-keywords ()
- "Set `markchars-used-keywords' from options."
- (set (make-local-variable 'markchars-used-keywords)
- (list
- (list markchars-keywords
- (list 0 '(put-text-property (match-beginning 0) (match-end 0)
- 'face markchars-face))))))
-
-;;;###autoload
-(define-minor-mode markchars-mode
- "Mark special characters.
-Which characters to mark are defined by `markchars-keywords'.
-
-The default is to mark non-IDN, non-ascii chars with a magenta
-underline.
-
-For information about IDN chars see `idn-is-recommended'.
-
-If you change anything in the customization group `markchars' you
-must restart this minor mode for the changes to take effect."
- :group 'markchars
- :lighter " ø"
- (if markchars-mode
- (progn
- (markchars-set-keywords)
- (font-lock-add-keywords nil markchars-used-keywords))
- (font-lock-remove-keywords nil markchars-used-keywords))
- ;; Fix-me: Something like mumamo-mark-for-refontification should be in Emacs.
- (if (fboundp 'mumamo-mark-for-refontification)
- (save-restriction
- (widen)
- (mumamo-mark-for-refontification (point-min) (point-max)))
- (font-lock-fontify-buffer)))
-
-;;;###autoload
-(define-globalized-minor-mode markchars-global-mode markchars-mode
- (lambda () (markchars-mode 1))
- :group 'markchars)
-
-(provide 'markchars)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; markchars.el ends here
diff --git a/emacs.d/nxhtml/util/mlinks.el b/emacs.d/nxhtml/util/mlinks.el
deleted file mode 100644
index 0f81654..0000000
--- a/emacs.d/nxhtml/util/mlinks.el
+++ /dev/null
@@ -1,1367 +0,0 @@
-;;; mlinks.el --- Minor mode making major mode dependent links
-;;
-;; Author: Lennar Borgman
-;; Created: Tue Jan 16 2007
-(defconst mlinks:version "0.28") ;;Version:
-;; Last-Updated: 2010-01-05 Tue
-;; Keywords:
-;; Compatibility:
-;;
-;; Fxeatures that might be required by this library:
-;;
-;; `appmenu', `cl', `mail-prsvr', `mm-util', `ourcomments-util',
-;; `url-expand', `url-methods', `url-parse', `url-util',
-;; `url-vars'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This file implements the minor mode `mlinks-mode' that create
-;; hyperlinks for different major modes. Such links can be visible or
-;; invisible. The meanings of the links are defined per mode.
-;;
-;; Examples:
-;;
-;; - In in html style modes the links are visible they can mean either
-;; open a file for editing, go to an achnor or view the link in a
-;; web browser etc.
-;;
-;; - In emacs lisp mode the links are invisible, but maybe highlighed
-;; when point or mouse is on them. (Having them highlighted when
-;; point is on them can be a quick way to check that you have
-;; spelled a symbol correct.) The meanings of the links in emacs
-;; lisp mode are go to definition.
-;;
-;; Common to links that open a buffer in Emacs is that you can the
-;; buffer opened in the same window, the other window or in a new
-;; frame. The same key binding is used in all major modes for this.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; FIX-ME: url-hexify-string etc
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'appmenu nil t))
-(eval-when-compile (require 'mumamo nil t))
-(eval-when-compile (require 'ourcomments-util nil t))
-
-(require 'rx)
-(require 'url-parse)
-(require 'url-expand)
-
-(defvar mlinks-point-hilighter-overlay nil)
-(make-variable-buffer-local 'mlinks-point-hilighter-overlay)
-(put 'mlinks-point-hilighter-overlay 'permanent-local t)
-
-;;;###autoload
-(defgroup mlinks nil
- "Customization group for `mlinks-mode'."
- :group 'nxhtml
- :group 'hypermedia)
-
-(defvar mlinks-link-face 'mlinks-link-face)
-(defface mlinks-link-face
- '((t (:inherit highlight)))
- "Face normally active links have on them."
- :group 'mlinks)
-
-(defvar mlinks-hyperactive-link-face 'mlinks-hyperactive-link-face)
-(defface mlinks-hyperactive-link-face
- '((t (:inherit isearch)))
- "Face hyper active links have on them."
- :group 'mlinks)
-
-(defvar mlinks-font-lock-face 'mlinks-font-lock-face)
-(defface mlinks-font-lock-face
- '((t :inherit link))
- "Default face for MLinks' links."
- :group 'mlinks)
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Mode function bindings
-
-;;(customize-option mlinks-mode-functions)
-(defcustom mlinks-mode-functions
- '(
- ;; For message buffer etc.
- (fundamental-mode
- ((goto mlinks-elisp-goto)
- (hili mlinks-elisp-hili)
- (hion t)
- )
- )
- (emacs-lisp-mode
- ((goto mlinks-elisp-goto)
- (hili mlinks-elisp-hili)
- (hion t)
- )
- )
- ;; *scractch*
- (lisp-interaction-mode
- ((goto mlinks-elisp-goto)
- (hili mlinks-elisp-hili)
- (hion t)
- )
- )
- (help-mode
- ((goto mlinks-elisp-goto)
- (hili mlinks-elisp-hili)
- (hion t)
- )
- )
- (Info-mode
- ((goto mlinks-elisp-goto)
- (hili mlinks-elisp-hili)
- (hion t)
- )
- )
- (Custom-mode
- ((goto mlinks-elisp-custom-goto)
- (hili mlinks-elisp-hili)
- (hion t)
- (fontify mlinks-custom-fontify)
- )
- )
- (text-mode
- ((goto mlinks-goto-plain-url)
- (hion t)
- (fontify mlinks-plain-urls-fontify)
- )
- )
- (nxhtml-mode
- ((hion t)
- (fontify mlinks-html-fontify)
- (goto mlinks-html-style-goto)
- )
- )
- (nxml-mode
- ((hion t)
- (fontify mlinks-html-fontify)
- (goto mlinks-html-style-goto)
- )
- )
- (sgml-mode
- ((hion t)
- (fontify mlinks-html-fontify)
- (goto mlinks-html-style-goto)
- )
- )
- (html-mode
- ((hion t)
- (fontify mlinks-html-fontify)
- (goto mlinks-html-style-goto)
- )
- )
- )
- "Defines MLinks hyperlinks for major modes.
-"
- ;; Each element in the list is a list with two elements
-
- ;; \(MAJOR-MODE SETTINGS)
-
- ;; where MAJOR-MODE is the major mode for which the settings SETTINGS should be used.
- ;; SETTINGS is an association list which can have the following element types
-
- ;; \(hili HILIGHT-FUN) ;; Mandatory
- ;; \(goto GOTO-FUN) ;; Mandatory
- ;; \(hion HION-BOOL) ;; Optional
- ;; \(next NEXT-FUN) ;; Optional
- ;; \(prev PREV-FUN) ;; Optional
-
- ;; Where
- ;; - HILIGHT-FUN is the function to hilight a link when point is
- ;; inside the link. This is done when Emacs is idle.
- ;; - GOTO-FUN is the function to follow the link at point.
- ;; - HION-BOOL is t or nil depending on if hilighting should be on
- ;; by default.
- ;; - NEXT-FUN is the function to go to the next link.
- ;; - PREV-FUN is the function to go to the previous link."
- ;; ;;:type '(repeat (alist :key-type symbol :value-type (alist :key-type symbol :value symbol)))
- :type '(alist :key-type major-mode-function
- :value-type (list
- (set
- (const :tag "Enable MLinks in this major mode" hion)
- (const :tag "Mark All Links" mark)
- (list :tag "Enable" (const :tag "Hilighting" hili) function)
- (list :tag "Enable" (const :tag "Follow Link" goto) function)
- (list :tag "Enable" (const :tag "Goto Next Link" next) function)
- (list :tag "Enable" (const :tag "Goto Previous Link" prev) function)
- )))
- :group 'mlinks)
-
-
-(defun mlinks-get-mode-value (which)
- (let* ((major major-mode)
- (mode-rec (assoc major mlinks-mode-functions)))
- (catch 'mode-rec
- (while (and major
- (not mode-rec))
- (setq major (get major 'derived-mode-parent))
- (setq mode-rec (assoc major mlinks-mode-functions))
- (when mode-rec (throw 'mode-rec nil))))
- (when mode-rec
- (let* ((mode (car mode-rec))
- (funs-alist (cadr mode-rec))
- (funs (assoc which funs-alist)))
- (cdr funs)))))
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Minor modes
-
-;; (appmenu-dump-keymap mlinks-mode-map)
-(defvar mlinks-mode-map
- (let ((m (make-sparse-keymap "mlinks")))
- (define-key m [(control ?c) ?\r ?\r] 'mlinks-goto)
- (define-key m [(control ?c) ?\r ?w] 'mlinks-goto-other-window)
- (define-key m [(control ?c) ?\r ?f] 'mlinks-goto-other-frame)
- (define-key m [(control ?c) ?\r ?n] 'mlinks-next-saved-position)
- (define-key m [(control ?c) ?\r ?p] 'mlinks-prev-saved-position)
- (define-key m [(control ?c) ?\r S-tab] 'mlinks-backward-link)
- (define-key m [(control ?c) ?\r tab] 'mlinks-forward-link)
- (define-key m [(control ?c) ?\r ?h] 'mlinks-toggle-hilight)
- (define-key m [(control ?c) ?\r ?c] 'mlinks-copy-link-text)
- m))
-
-;;;###autoload
-(define-minor-mode mlinks-mode
- "Recognizes certain parts of a buffer as hyperlinks.
-The hyperlinks are created in different ways for different major
-modes with the help of the functions in the list
-`mlinks-mode-functions'.
-
-The hyperlinks can be hilighted when point is over them. Use
-`mlinks-toggle-hilight' to toggle this feature for the current
-buffer.
-
-All keybindings in this mode are by default done under the prefi§x
-key
-
- C-c RET
-
-which is supposed to be a kind of mnemonic for link (alluding to
-the RET key commonly used in web browser to follow a link).
-\(Unfortunately this breaks the rules in info node `Key Binding
-Conventions'.) Below are the key bindings defined by this mode:
-
-\\{mlinks-mode-map}
-
-For some major modes `mlinks-backward-link' and
-`mlinks-forward-link' will take you to the previous/next link.
-By default the link moved to will be active, see
-`mlinks-active-links'.
-
-"
- nil
- " L"
- nil
- :keymap mlinks-mode-map
- :group 'mlinks
- (if mlinks-mode
- (progn
- (mlinks-add-appmenu)
- (mlinks-start-point-hilighter)
- (mlinks-add-font-lock))
- (mlinks-stop-point-hilighter)
- (when mlinks-point-hilighter-overlay
- (when (overlayp mlinks-point-hilighter-overlay)
- (delete-overlay mlinks-point-hilighter-overlay))
- (setq mlinks-point-hilighter-overlay nil))
- (mlinks-remove-font-lock)))
-(put 'mlinks-mode 'permanent-local t)
-
-(defun mlinks-turn-on-in-buffer ()
- (let ((hion (unless (and (boundp 'mumamo-set-major-running)
- mumamo-set-major-running)
- (mlinks-get-mode-value 'hion))))
- (when hion (mlinks-mode 1))))
-
-;;;###autoload
-(define-globalized-minor-mode mlinks-global-mode mlinks-mode
- mlinks-turn-on-in-buffer
- "Turn on `mlink-mode' in all buffer where it is specified.
-This is specified in `mlinks-mode-functions'."
- :group 'mlinks)
-
-;; The problem with global minor modes:
-(when (and mlinks-global-mode
- (not (boundp 'define-global-minor-mode-bug)))
- (mlinks-global-mode 1))
-
-;;(define-toggle mlinks-active-links t
-(define-minor-mode mlinks-active-links
- "Use quick movement keys on active links if non-nil.
-When moving to an mlink with `mlinks-forward-link' or
-`mlinks-backward-link' the link moved to will be in an active
-state. This is marked with a new color \(the face `isearch').
-When the new color is shown the following keys are active
-
-\\{mlinks-hyperactive-point-hilighter-keymap}
-Any command cancels this state."
- :global t
- :init-value t
- :group 'mlinks)
-
-
-
-(defun mlinks-link-text-prop-range (pos)
- (let* ((link-here (get-text-property pos 'mlinks-link))
- (beg (when link-here (previous-single-char-property-change (+ pos 1) 'mlinks-link)))
- (end (when link-here (next-single-char-property-change (- pos 0) 'mlinks-link))))
- (when (and beg end)
- (cons beg end))))
-
-(defun mlinks-link-range (pos)
- (or (mlinks-link-text-prop-range pos)
- (let ((funs-- (mlinks-get-mode-value 'hili)))
- (when funs--
- (save-match-data
- (run-hook-with-args-until-success 'funs--))))))
-
-(defun mlinks-link-at-point ()
- "Get link at point."
- (mlinks-point-hilighter-1)
- (when (and mlinks-point-hilighter-overlay
- (overlay-buffer mlinks-point-hilighter-overlay))
- (let* ((ovl mlinks-point-hilighter-overlay)
- (beg (overlay-start ovl))
- (end (overlay-end ovl)))
- (buffer-substring-no-properties beg end))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; At point highligher
-
-(defvar mlinks-point-hilighter-timer nil)
-
-(defun mlinks-stop-point-hilighter ()
- (when (timerp mlinks-point-hilighter-timer)
- (cancel-timer mlinks-point-hilighter-timer)
- (setq mlinks-point-hilighter-timer nil)))
-
-(defun mlinks-start-point-hilighter ()
- (mlinks-stop-point-hilighter)
- (setq mlinks-point-hilighter-timer
- (run-with-idle-timer 0.1 t 'mlinks-point-hilighter)))
-
-(defvar mlinks-link-overlay-priority 100)
-
-(defun mlinks-make-point-hilighter-overlay (bounds)
- (unless mlinks-point-hilighter-overlay
- (setq mlinks-point-hilighter-overlay
- (make-overlay (car bounds) (cdr bounds)))
- (overlay-put mlinks-point-hilighter-overlay 'priority mlinks-link-overlay-priority)
- (overlay-put mlinks-point-hilighter-overlay 'mouse-face 'highlight)
- (mlinks-set-normal-point-hilight)
- ))
-
-(defun mlinks-point-hilighter ()
- "Mark link at point if any.
-This moves the hilight point overlay to point or deletes it."
- ;; This runs in a timer, protect it.
- (condition-case err
- (let ((inhibit-point-motion-hooks t))
- (mlinks-point-hilighter-1))
- (error "mlinks-point-hilighter error: %s" (error-message-string err))))
-
-(defun mlinks-point-hilighter-1 ()
- (when mlinks-mode
- (let ((bounds-- (mlinks-link-range (point))))
- (if bounds--
- (if mlinks-point-hilighter-overlay
- (move-overlay mlinks-point-hilighter-overlay (car bounds--) (cdr bounds--))
- (mlinks-make-point-hilighter-overlay bounds--))
- (when mlinks-point-hilighter-overlay
- (delete-overlay mlinks-point-hilighter-overlay))))))
-
-(defvar mlinks-hyperactive-point-hilighter-keymap
- (let ((m (make-sparse-keymap "mlinks")))
- (define-key m [S-tab] 'mlinks-backward-link)
- (define-key m [tab] 'mlinks-forward-link)
- (define-key m "\t" 'mlinks-forward-link)
- (define-key m [?\r] 'mlinks-goto)
- (define-key m [?w] 'mlinks-goto-other-window)
- (define-key m [?f] 'mlinks-goto-other-frame)
- (define-key m [mouse-1] 'mlinks-goto)
- (set-keymap-parent m mlinks-mode-map)
- m))
-
-(defvar mlinks-point-hilighter-keymap
- (let ((m (make-sparse-keymap "mlinks")))
- (define-key m [mouse-1] 'mlinks-goto)
- (set-keymap-parent m mlinks-mode-map)
- m))
-
-(defun mlinks-point-hilighter-pre-command ()
- (condition-case err
- (unless (let ((map (overlay-get mlinks-point-hilighter-overlay 'keymap)))
- (where-is-internal this-command
- (list
- map)))
- (mlinks-set-normal-point-hilight)
- (unless mlinks-point-hilighter-timer
- (delete-overlay mlinks-point-hilighter-overlay)))
- (error (message "mlinks-point-hilighter-pre-command: %s" err))))
-(put 'mlinks-point-hilighter-pre-command 'permanent-local t)
-
-(defun mlinks-set-hyperactive-point-hilight ()
- "Make link hyper active, ie add some special key binding.
-Used after jumping specifically to a link. The idea is that the
-user may want to easily jump between links in this state."
- (add-hook 'pre-command-hook 'mlinks-point-hilighter-pre-command nil t)
- (mlinks-point-hilighter)
- (overlay-put mlinks-point-hilighter-overlay 'face mlinks-hyperactive-link-face)
- (overlay-put mlinks-point-hilighter-overlay 'keymap mlinks-hyperactive-point-hilighter-keymap))
-
-(defun mlinks-set-normal-point-hilight ()
- "Make link normally active as if you happened to be on it."
- (remove-hook 'pre-command-hook 'mlinks-point-hilighter-pre-command t)
- (mlinks-point-hilighter)
- (overlay-put mlinks-point-hilighter-overlay 'face mlinks-link-face)
- (overlay-put mlinks-point-hilighter-overlay 'keymap mlinks-point-hilighter-keymap))
-
-(defun mlinks-set-point-hilight-after-jump-to ()
- "Set hilight style after jump to link."
- (if mlinks-active-links
- (mlinks-set-hyperactive-point-hilight)
- (mlinks-set-normal-point-hilight)))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Jumping around
-
-(defvar mlinks-places nil)
-(make-variable-buffer-local 'mlinks-placesn)
-(put 'mlinks-places 'permanent-local t)
-
-(defvar mlinks-places-n 0)
-(make-variable-buffer-local 'mlinks-places-n)
-(put 'mlinks-places-n 'permanent-local t)
-
-(defun mlinks-has-links ()
- (or (mlinks-get-mode-value 'fontify)
- (when (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- ;; Fix-me: just assume multi major has it... Need a list of
- ;; major modes. There is no way to get such a list for the
- ;; multi major mode (since you can't know what the chunk
- ;; functions will return. However you can get a list of
- ;; current chunks major mode.
- t
- )))
-
-(defun mlinks-backward-link ()
- "Go to previous `mlinks-mode' link in buffer."
- (interactive)
- (if (not (mlinks-has-links))
- (message "There is no way to go to previous link for this major mode")
- (let ((res (mlinks-prev-link)))
- (if res
- (progn
- (goto-char res)
- (mlinks-set-point-hilight-after-jump-to))
- (message "No previous link found")))))
-
-(defun mlinks-forward-link ()
- "Go to next `mlinks-mode' link in buffer."
- (interactive)
- (if (not (mlinks-has-links))
- (message "There is no way to go to next link for this major mode")
- (let ((res (mlinks-next-link)))
- (if res
- (progn
- (goto-char res)
- (mlinks-set-point-hilight-after-jump-to))
- (message "No next link found")))))
-
-
-(defun mlinks-goto ()
- "Follow `mlinks-mode' link at current point.
-Save the current position so that they can be move to again by
-`mlinks-prev-saved-position' and `mlinks-next-saved-position'.
-
-Return non-nil if link was followed, otherewise nil."
- (interactive)
- (mlinks-goto-1 nil))
-
-(defun mlinks-goto-other-window ()
- "Like `mlinks-goto' but opens in other window.
-Uses `switch-to-buffer-other-window'."
- (interactive)
- (mlinks-goto-1 'other-window))
-
-(defun mlinks-goto-other-frame ()
- "Like `mlinks-goto' but opens in other frame.
-Uses `switch-to-buffer-other-frame'."
- (interactive)
- (mlinks-goto-1 'other-frame))
-
-(defun mlinks-goto-1(where)
- (push-mark)
- (let* ((funs (mlinks-get-mode-value 'goto))
- (old (point-marker))
- (mlinks-temp-buffer-where where)
- (res (run-hook-with-args-until-success 'funs)))
- (if (not res)
- (progn
- (message "Don't know how to follow this MLink link")
- nil)
- (unless (= old (point-marker))
- (let* ((prev (car mlinks-places)))
- (when (or (not prev)
- ;;(not (markerp prev))
- (not (marker-buffer prev))
- (/= old prev))
- (setq mlinks-places (cons old mlinks-places))
- (setq mlinks-places-n (length mlinks-places))))))))
-
-
-(defun mlinks-prev-saved-position ()
- "Go to previous position saved by `mlinks-goto'."
- (interactive)
- (unless (mlinks-goto-n (1- mlinks-places-n))
- (message "No previous MLink position")))
-
-(defun mlinks-next-saved-position ()
- "Go to next position saved by `mlinks-goto'."
- (interactive)
- (unless (mlinks-goto-n (1+ mlinks-places-n))
- (message "No next MLink position")))
-
-(defun mlinks-goto-n (to)
- (if (not mlinks-places)
- (message "No saved MLinks positions")
- (let ((minp 1)
- (maxp (length mlinks-places)))
- (if (<= to minp)
- (progn
- (setq to minp)
- (message "Going to first MLinks position"))
- (if (>= to maxp)
- (progn
- (setq to maxp)
- (message "Going to last MLinks position"))))
- (setq mlinks-places-n to)
- (let ((n (- maxp to))
- (places mlinks-places)
- place
- buffer
- point)
- (while (> n 0)
- (setq places (cdr places))
- (setq n (1- n)))
- (setq place (car places))
- (mlinks-switch-to-buffer (marker-buffer place))
- (goto-char place)))))
-
-(defvar mlinks-temp-buffer-where nil)
-(defun mlinks-switch-to-buffer (buffer)
- (mlinks-switch-to-buffer-1 buffer mlinks-temp-buffer-where))
-
-(defun mlinks-switch-to-buffer-1(buffer where)
- (cond
- ((null where)
- (switch-to-buffer buffer))
- ((eq where 'other-window)
- (switch-to-buffer-other-window buffer))
- ((eq where 'other-frame)
- (switch-to-buffer-other-frame buffer))
- (t
- (error "Invalid argument, where=%s" where))))
-
-;; FIXME: face, var
-(defun mlinks-custom (var)
- (customize-option var)
- )
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; AppMenu support
-
-(defun mlinks-appmenu ()
- (when mlinks-mode
- ;; Fix-me: reverse the list
- (let ((link-val (mlinks-link-at-point))
- (map (make-sparse-keymap "mlinks"))
- (num 2))
- (when (mlinks-get-mode-value 'prev)
- (define-key map [mlinks-next-link]
- (list 'menu-item "Next Link" 'mlinks-forward-link)))
- (when (mlinks-get-mode-value 'next)
- (define-key map [mlinks-prev-link]
- (list 'menu-item "Previous Link" 'mlinks-backward-link)))
- (when link-val
- (let* ((possible (when (member major-mode '(html-mode nxhtml-mode nxml-mode sqml-mode text-mode))
- (mlinks-html-possible-href-actions link-val)))
- (mailto (assoc 'mailto possible))
- (view-web (assoc 'view-web possible))
- (view-web-base (assoc 'view-web-base possible))
- (edit (assoc 'edit possible))
- (file (nth 1 edit))
- (anchor (nth 2 edit))
- (choices)
- (answer)
- )
- (when (> (length map) num)
- (define-key map [mlinks-href-sep] (list 'menu-item "--")))
- (setq num (length map))
- (when view-web
- (define-key map [mlinks-href-view-web]
- (list 'menu-item "Browse Link Web Url"
- `(lambda () (interactive)
- (browse-url ,link-val)))))
- (when view-web-base
- (define-key map [mlinks-href-view-web-based]
- (list 'menu-item "Browse Link Web Url (base URL found)"
- `(lambda () (interactive)
- (browse-url (cdr ,view-web-base))))))
- (when mailto
- (define-key map [mlinks-href-mail]
- (list 'menu-item (concat "&Mail to " (substring link-val 7))
- `(lambda () (interactive)
- (mlinks-html-mail-to ,link-val)))))
- (when edit
- (when (and (file-exists-p file)
- (not anchor)
- (assoc 'upload possible))
- (let ((abs-file (expand-file-name file)))
- (define-key map [mlinks-href-upload]
- (list 'menu-item "Upload Linked File"
- `(lambda () (interactive)
- (html-upl-upload-file ,abs-file))))))
- (when (and (file-exists-p file)
- (not anchor)
- (assoc 'edit-gimp possible))
- (let ((abs-file (expand-file-name file)))
- (define-key map [mlinks-href-edit-gimp]
- (list 'menu-item "Edit Linked File with GIMP"
- `(lambda () (interactive)
- (gimpedit-edit-file ,abs-file))))))
- (when (and (file-exists-p file)
- (assoc 'view-local possible))
- (let ((url (concat "file:///" (expand-file-name file))))
- (when anchor
- (let ((url-anchor (concat url "#" anchor)))
- (define-key map [mlinks-href-view-file-at]
- (list 'menu-item (concat "Browse Linked File URL at #" anchor)
- `(lambda () (interactive)
- (browse-url ,url-anchor))))))
- (define-key map [mlinks-href-view-file]
- (list 'menu-item "&Browse Linked File URL"
- `(lambda () (interactive)
- (browse-url ,url))))))
- (when (> (length map) num)
- (define-key map [mlinks-href-sep-2] (list 'menu-item "--")))
- (setq num (length map))
- (unless (equal file (buffer-file-name))
- (define-key map [mlinks-href-edit]
- (list 'menu-item "&Open Linked File"
- `(lambda () (interactive) (mlinks-goto))))
- (define-key map [mlinks-href-edit-window]
- (list 'menu-item "&Open Linked File in Other Window"
- `(lambda () (interactive) (mlinks-goto-other-window))))
- (define-key map [mlinks-href-edit-frame]
- (list 'menu-item "&Open Linked File in New Frame"
- `(lambda () (interactive) (mlinks-goto-other-frame))))
- )
- (when (and (file-exists-p file) anchor)
- (define-key map [mlinks-href-edit-at]
- (list 'menu-item (concat "Open Linked File &at #" anchor)
- `(lambda () (interactive)
- (mlinks-goto)))))
- )
- (when (> (length map) num)
- (define-key map [mlinks-href-sep-1] (list 'menu-item "--")))
- (setq num (length map))
- (when link-val
- (define-key map [mlinks-href-copy-link]
- (list 'menu-item "&Copy Link Text"
- 'mlinks-copy-link-text)))))
- (when (> (length map) 2)
- map))))
-
-(defun mlinks-add-appmenu ()
- "Add entries for MLinks to AppMenu."
- (when (featurep 'appmenu)
- (appmenu-add 'mlinks 100 'mlinks-mode "Current MLink" 'mlinks-appmenu)))
-
-(defun mlinks-copy-link-text ()
- "Copy text of `mlinks-mode' link at point to clipboard."
- (interactive)
- (mlinks-point-hilighter)
- (let ((ovl mlinks-point-hilighter-overlay))
- (if (and ovl
- (overlayp ovl)
- (overlay-buffer ovl)
- (eq (current-buffer)
- (overlay-buffer ovl))
- (<= (overlay-start ovl)
- (point))
- (>= (overlay-end ovl)
- (point)))
- (let* ((beg (overlay-start ovl))
- (end (overlay-end ovl))
- (str (buffer-substring beg end)))
- (copy-region-as-kill beg end)
- (message "Copied %d chars to clipboard" (length str)))
- (message "No link here to copy"))))
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;; text-mode etc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar mlinks-plain-urls-regexp
- (rx-to-string `(or (submatch (optional "mailto:")
- (regexp ,(concat
- ;;"[a-z0-9$%(*-=?[_][^<>\")!;:,{}]*"
- "[a-z0-9$%(*=?[_-][^<>\")!;:,{}]*"
- "\@"
- "\\(?:[a-z0-9\-]+\.\\)+[a-z0-9]\\{2,4\\}")))
- (submatch (or (regexp "https?://")
- "www.")
- (1+ (any ,url-get-url-filename-chars))
- )
- )))
-
-(defun mlinks-plain-urls-fontify (bound)
- (mlinks-fontify bound mlinks-plain-urls-regexp 0))
-
-(defun mlinks-goto-plain-url ()
- (let* ((range (mlinks-link-range (point)))
- (link (when range (buffer-substring-no-properties (car range) (cdr range)))))
- ;;(mlinks-html-href-act-on link)
- (when (= 0 (string-match mlinks-plain-urls-regexp link))
- (let ((which (if (match-end 1) 1 2)))
- (cond
- ((= 1 which)
- (mlinks-html-mail-to link)
- t)
- ((= 2 which)
- (browse-url link)
- t)
- (t nil))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;; nxhtml-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun mlinks-html-style-goto ()
- (mlinks-html-style-mode-fun t))
-
-(defvar mlinks-html-link-regexp
- ;; This value takes care of nxhtml-strval-mode (and is therefore a little bit incorrect ...)
- ;;"\\(?:^\\|[[:space:]]\\)\\(?:href\\|src\\)[[:space:]]*=[[:space:]]*\"\\([^<«\"]*\\)\""
- (rx (or "^" space)
- (or "href" "src")
- (0+ space)
- "="
- (0+ space)
- (submatch
- (or
- (seq "\""
- (and
- (0+ (not (any "\""))))
- "\"")
- (seq "'"
- (and
- (0+ (not (any "\'"))))
- "'")))))
-
-(defun mlinks-html-style-mode-fun (goto)
- (let (start
- end
- bounds)
- (save-excursion
- (forward-char)
- (when (< 0 (skip-chars-forward "^\"'" (line-end-position)))
- (forward-char)
- (save-match-data
- (when (looking-back
- mlinks-html-link-regexp
- (line-beginning-position -1))
- (let ((which (if (match-beginning 1) 1 2)))
- (setq start (1+ (match-beginning which)))
- (setq end (1- (match-end which))))
- (setq bounds (cons start end))))))
- (when start
- (if (not goto)
- bounds
- (let ((href-val (buffer-substring-no-properties start end)))
- (mlinks-html-href-act-on href-val))
- t))))
-
-(defun mlink-check-file-to-edit (file)
- (assert (file-name-absolute-p file))
- (let ((file-dir (file-name-directory file)))
- (unless (file-directory-p file-dir)
- (if (file-directory-p (file-name-directory file))
- (if (yes-or-no-p (format "Directory %s does not exist. Create it? " file-dir))
- (make-directory file-dir)
- (setq file nil))
- (if (yes-or-no-p (format "Directory %s and its parent does not exist. Create them? " file-dir))
- (make-directory file-dir t)
- (setq file nil))))
- file))
-
-(defun mlinks-html-edit-at (file &optional anchor)
- (let ((abs-file (if (file-name-absolute-p file)
- file
- (expand-file-name file))))
- (if (or (file-directory-p abs-file)
- (string= abs-file
- (file-name-as-directory abs-file)))
- (if (file-directory-p abs-file)
- (when (y-or-n-p (format "Do you want to edit the directory %s? : " abs-file))
- (dired abs-file))
- (message "Can't find directory %s" abs-file))
- (when (mlink-check-file-to-edit abs-file)
- (let ((b (find-file-noselect abs-file)))
- (mlinks-switch-to-buffer b))
- (when anchor
- (let ((here (point))
- (anchor-regexp (concat "\\(?:id\\|name\\)[[:space:]]*=[[:space:]]*\"" anchor "\"")))
- (goto-char (point-min))
- (if (search-forward-regexp anchor-regexp nil t)
- (backward-char 2)
- (message "Anchor \"%s\" not found" anchor)
- (goto-char here))))))))
-
-(defun mlinks-html-mail-to (addr)
- (browse-url addr))
-
-(defun mlinks-html-href-act-on (href-val)
- (if href-val
- (let* ((possible (mlinks-html-possible-href-actions href-val))
- (edit (assoc 'edit possible))
- (file (nth 1 edit))
- (anchor (nth 2 edit))
- )
- (cond (edit
- (mlinks-html-edit-at file anchor)
- t)
- ((assoc 'mailto possible)
- (when (y-or-n-p "This is a mail address. Do you want to send a message to this mail address? ")
- (mlinks-html-mail-to href-val)))
- ((assoc 'view-web possible)
- (when (y-or-n-p "Can't edit this URL, it is on the web. View the URL in your web browser? ")
- (browse-url href-val)))
- ((assoc 'view-web-base possible)
- (when (y-or-n-p "Can't edit, based URL is to the web. View resulting URL in your web browser? ")
- (browse-url (cdr (assoc 'view-web-base possible)))))
- (t
- (message "Do not know how to handle this URL"))
- ))
- (message "No value for href attribute")))
-
-(defun mlinks-html-possible-href-actions (link)
- (let ((urlobj (url-generic-parse-url link))
- (edit nil)
- (possible nil))
- (cond ((member (url-type urlobj) '("http" "https"))
- (add-to-list 'possible (cons 'view-web link)))
- ((member (url-type urlobj) '("mailto"))
- (add-to-list 'possible (cons 'mailto link)))
- ((url-host urlobj)
- (message "Do not know how to handle this URL"))
- (t (setq edit t)))
- (when edit
- (let ((base-href (mlinks-html-find-base-href)))
- (when base-href
- (let ((baseobj (url-generic-parse-url base-href)))
- (setq edit nil)
- (cond ((member (url-type baseobj) '("http" "https"))
- (add-to-list 'possible (cons 'view-web-base (url-expand-file-name link base-href))))
- ((url-host urlobj)
- (message "Do not know how to handle this URL"))
- (t (setq edit t)))))
- (when edit
- (let* ((full (split-string (url-filename urlobj) "#"))
- (file (nth 0 full))
- (anchor (nth 1 full))
- )
- (when (equal file "")
- (setq file (buffer-file-name)))
- (when base-href
- ;; We know at this point it is not a http url
- (setq file (expand-file-name file base-href)))
- (let ((ext (downcase (file-name-extension file))))
- (when (member ext '("htm" "html"))
- (add-to-list 'possible (cons 'view-local (list file anchor))))
- (when (and (featurep 'gimpedit)
- (member ext '("gif" "png" "jpg" "jpeg")))
- (add-to-list 'possible (cons 'edit-gimp (list file anchor)))))
- (when (featurep 'html-upl)
- (add-to-list 'possible (cons 'upload (list file anchor))))
- (add-to-list 'possible (cons 'edit (list file anchor)))))))
- possible))
-
-(defun mlinks-html-find-base-href ()
- "Return base href found in the current file."
- (let ((base-href))
- (save-excursion
- (goto-char (point-min))
- (while (and (not base-href)
- (search-forward-regexp "<!--[^!]*-->\\|<base[[:space:]]" nil t))
- (when (equal " " (char-to-string (char-before)))
- (backward-char 6)
- (when (looking-at "<base [^>]*href *= *\"\\(.*?\\)\"")
- (setq base-href (match-string-no-properties 1))))))
- base-href))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;; Custom-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun mlinks-elisp-custom-goto ()
- (mlinks-elisp-mode-fun 'custom))
-
-(defvar mlinks-custom-link-regexp
- (rx "`"
- (group
- (1+ (not (any "'"))))
- "'"))
-
-(defun mlinks-custom-fontify (bound)
- (mlinks-fontify bound mlinks-custom-link-regexp 0))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;; emacs-lisp-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun mlinks-elisp-goto ()
- (mlinks-elisp-mode-fun 'source))
-
-(defun mlinks-elisp-hili ()
- (mlinks-elisp-mode-fun nil))
-
-(defun mlinks-elisp-mode-fun (goto)
- (let ((symbol-name (thing-at-point 'symbol)))
- (when symbol-name
- (let ((bounds-- (bounds-of-thing-at-point 'symbol))
- ret--)
- (if (save-excursion
- (goto-char (cdr bounds--))
- (looking-back (concat "(\\(?:require\\|featurep\\)\s+'" symbol-name)
- (line-beginning-position)))
- (progn
- (setq ret-- bounds--)
- (when goto
- (mlinks-elisp-mode-require symbol-name)))
- (when (mlinks-elisp-mode-symbol symbol-name goto)
- (setq ret-- bounds--)))
- ret--))))
-
-(defun mlinks-elisp-function (symbol)
- "Go to an elisp function."
- (interactive "aElisp function: ")
- (mlinks-elisp-mode-symbol (symbol-name symbol) 'source))
-
-(defun mlinks-elisp-mode-symbol (symbol-name-- goto--)
- ;; Fix-me: use uninterned variables (see mail from Miles)
- ;; Make these names a bit strange because they are boundp at the time of checking:
- (let ((symbol-- (intern-soft symbol-name--))
- defs--)
- (when (and symbol-- (boundp symbol--))
- (add-to-list 'defs-- 'variable))
- (when (fboundp symbol--)
- (add-to-list 'defs-- 'function))
- (when (facep symbol--)
- (add-to-list 'defs-- 'face))
- ;; Avoid some fails hits
- (when (memq symbol--
- '(goto t
- bounds-- funs-- ret--
- symbol-- defs-- symbol-name-- goto--))
- (setq defs-- nil))
- (let (defs-places
- def)
- (if (not goto--)
- (progn
- defs--)
- (if (not defs--)
- (progn
- (message "Could not find definition of '%s" symbol-name--)
- nil)
- (dolist (type (cond
- ((eq goto-- 'source)
- '(nil defvar defface))
- ((eq goto-- 'custom)
- '(defvar defface))
- (t
- (error "Bad goto-- value: %s" goto--))))
- (condition-case err
- (add-to-list 'defs-places
- (cons
- type
- (save-excursion
- (let* ((bp (find-definition-noselect symbol-- type))
- (b (car bp))
- (p (cdr bp)))
- (unless p
- (with-current-buffer b
- (save-restriction
- (widen)
- (setq bp (find-definition-noselect symbol-- type)))))
- bp))))
- (error
- ;;(lwarn '(mlinks) :error "%s" (error-message-string err))
- (when t
- (cond
- ((eq (car err) 'search-failed))
- ((and (eq (car err) 'error)
- (string= (error-message-string err)
- (format "Don't know where `%s' is defined" symbol--))))
- (t
- (message "%s: %s" (car err) (error-message-string err))))))))
- (if (= 1 (length defs-places))
- (setq def (car defs-places))
- (let ((many nil)
- lnk)
- (dolist (d defs-places)
- (if (not lnk)
- (setq lnk (cdr d))
- (unless (equal lnk (cdr d))
- (setq many t))))
- (if (not many)
- (setq def (car defs-places))
- (let* ((alts (mapcar (lambda (elt)
- (let ((type (car elt))
- str)
- (setq str
- (cond
- ((not type)
- "Function")
- ((eq type 'defvar)
- "Variable")
- ((eq type 'defface)
- "Face")))
- (cons str elt)))
- defs-places))
- (stralts (mapcar (lambda (elt)
- (car elt))
- alts))
- (completion-ignore-case t)
- (stralt (completing-read "Type: " stralts nil t))
- (alt (assoc stralt alts)))
- (setq def (cdr alt))))))
- (when def
- (cond
- ((eq goto-- 'source)
- ;; Be sure to go to the real sources from CVS:
- (let* ((buf (car (cdr def)))
- ;; Avoid going to source
- ;;(file (find-source-lisp-file (with-current-buffer buf buffer-file-name)) )
- (file (with-current-buffer buf buffer-file-name))
- (orig-buf (find-file-noselect file)))
- (mlinks-switch-to-buffer orig-buf)
- (let ((p (cdr (cdr def))))
- ;; Fix-me: Move this test to a more general place.
- (if (or (< p (point-min))
- (> p (point-max)))
- ;; Check for cloned indirect buffers.
- (progn
- (setq orig-buf
- (catch 'view-in-buf
- (dolist (indirect-buf (buffer-list))
- ;;(message "base-buffer=%s, orig-buf=%s, eq => %s" (buffer-base-buffer indirect-buf) orig-buf (eq (buffer-base-buffer indirect-buf) orig-buf))
- (when (eq (buffer-base-buffer indirect-buf) orig-buf)
- (with-current-buffer indirect-buf
- ;;(message "indirect-buf=%s" indirect-buf)
- (unless (or (< p (point-min))
- (> p (point-max)))
- ;;(message "switching")
- ;;(mlinks-switch-to-buffer indirect-buf)
- (message "mlinks: Switching to indirect buffer because of narrowing")
- (throw 'view-in-buf indirect-buf)
- ))
- ))))
- (when orig-buf
- (mlinks-switch-to-buffer orig-buf))
- ;;(message "cb=%s" (current-buffer))
- (if (or (< p (point-min))
- (> p (point-max)))
- (when (y-or-n-p (format "%s is invisible because of narrowing. Widen? " symbol--))
- (widen)
- (goto-char p))
- (goto-char p)))
- (goto-char p)))))
- ((eq goto-- 'custom)
- (mlinks-custom symbol--))
- (t
- (error "Back goto-- value again: %s" goto--)))))))))
-
-(defun mlinks-elisp-mode-require (module)
- (let ((where mlinks-temp-buffer-where))
- (cond
- ((null where)
- (find-library module))
- ((eq where 'other-window)
- (other-window 1)
- (find-library module))
- ((eq where 'other-frame)
- (make-frame-command)
- (find-library module))
- (t
- (error "Invalid argument, where=%s" where)))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;; Helpers when adopting for modes ;;;;;;;;;;;;;;;;;
-
-;;; Save this, do not delete this comment:
-
-;; (defun mlinks-hit-test ()
-;; "Just a helper function for adding support for new modes."
-;; (let* (
-;; (s0 (if (match-string 0) (match-string 0) ""))
-;; (s1 (if (match-string 1) (match-string 1) ""))
-;; (s2 (if (match-string 2) (match-string 2) ""))
-;; (s3 (if (match-string 3) (match-string 3) ""))
-;; )
-;; (message "match0=%s, match1=%s, match2=%s, match3=%s" s0 s1 s2 s3)))
-
-;; (defun mlinks-handle-reg-fun-list (reg-fun-list)
-;; "Just a helper function."
-;; (let (done
-;; regexp
-;; hitfun
-;; m
-;; p
-;; b
-;; )
-;; (dolist (rh reg-fun-list)
-;; (message "rh=%s" rh);(sit-for 2)
-;; (unless done
-;; (setq regexp (car rh))
-;; (setq hitfun (cadr rh))
-;; (message "regexp=%s, hitfun=%s" regexp hitfun);(sit-for 1)
-;; (when (and (save-match-data
-;; (setq m (re-search-backward regexp (line-beginning-position) t))
-;; (> p (match-beginning 0))))
-;; (setq done t)
-;; (setq b (match-beginning 0))
-;; (setq e (match-end 0))
-;; )
-;; (if (not (and b e
-;; (< b p)
-;; (< p e)))
-;; (message "MLinks Mode did not find any link here")
-;; (goto-char b)
-;; (if (not (looking-at regexp))
-;; (error "Internal error, regexp %s, no match looking-at" regexp)
-;; (let ((last (car mlinks-places))
-;; (m (make-marker)))
-;; (set-marker m (line-beginning-position))
-;; (when (or (not last)
-;; (/= m last))
-;; (setq mlinks-places (cons m mlinks-places))))
-;; (funcall hitfun))
-;; )))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Font Lock use
-
-(defvar mlinks-link-update-pos-max nil)
-(make-variable-buffer-local 'mlinks-link-update-pos-max)
-(put 'mlinks-link-update-pos-max 'permanent-local t)
-
-(defun mlinks-remove-font-lock ()
- "Remove info from font-lock."
- (when (mlinks-want-font-locking)
- (mlink-font-lock nil)))
-
-(defun mlinks-add-font-lock ()
- "Add info to font-lock."
- (when (mlinks-want-font-locking)
- (mlink-font-lock t)))
-
-(defun mlinks-want-font-locking ()
- (or (mlinks-get-mode-value 'fontify)
- (mlinks-get-mode-value 'next-mark)))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Font Lock integration
-
-(defun mlink-font-lock (on)
- (let* ((add-or-remove (if on 'font-lock-add-keywords 'font-lock-remove-keywords))
- (fontify-fun (car (mlinks-get-mode-value 'fontify)))
- (args (list nil `(( ,fontify-fun ( 0 mlinks-font-lock-face t ))))))
- (when fontify-fun
- ;; Note: Had a lot of trouble with this which I modelled first
- ;; after dlink. Using hi-lock as a model made it work with
- ;; mumamo too.
- ;;
- ;; Next arg, HOW, is needed to get it to work with mumamo. This
- ;; adds it last, like hi-lock.
- (when on (setq args (append args (list t))))
- (apply add-or-remove args)
- (font-lock-mode -1)
- (font-lock-mode 1))))
-
-(defun mlinks-html-fontify (bound)
- (mlinks-fontify bound mlinks-html-link-regexp 1))
-
-(defun mlinks-fontify (bound regexp border)
- (let ((start (point))
- end-start
- stop next-stop
- (more t)
- old-beg old-end
- (wn 1)
- ret)
- ;; Note: we shouldnot use save-match-data here. Instead
- ;; set-match-data is called below!
- (if (not (re-search-forward regexp bound t))
- (setq end-start bound)
- (setq ret t)
- (setq end-start (- (point) 2))
- (let* ((which (if (match-beginning 1) 1 2))
- (beg (+ (match-beginning which) border))
- (end (- (match-end which) border)))
- (put-text-property beg end 'mlinks-link t)
- (set-match-data (list (copy-marker end) (copy-marker beg)))))
- (setq stop start)
- (setq next-stop -1)
- (while (and (> 100 (setq wn (1+ wn)))
- (setq next-stop (next-single-char-property-change stop 'mlinks-link nil end-start))
- (/= next-stop stop))
- (setq stop next-stop)
- (if (get-text-property stop 'mlinks-link)
- (setq old-beg stop)
- (when old-beg
- (remove-list-of-text-properties old-beg stop '(mlinks-link 'mouse-face)))))
- ret))
-
-(defun mlinks-next-link ()
- "Find next link, fontify as necessary."
- (let* ((here (point))
- (prev-pos (point))
- (fontified-here (get-text-property (max (point-min) (1- prev-pos)) 'fontified))
- (fontified-to (next-single-char-property-change prev-pos 'fontified))
- (pos (next-single-char-property-change prev-pos 'mlinks-link nil
- (or fontified-to (point-max))))
- (fontified-all (and fontified-here (not fontified-to)))
- ready
- next-fontified-to)
- (while (not (or ready
- (and fontified-all
- (not pos))))
- (if pos
- (progn
- (unless (get-text-property pos 'mlinks-link)
- ;; Get to next link
- (setq prev-pos pos)
- (setq pos (next-single-char-property-change prev-pos 'mlinks-link nil
- (or fontified-to (point-max)))))
- (when pos
- (setq ready (get-text-property pos 'mlinks-link))
- (setq prev-pos pos)
- (unless ready (setq pos nil))))
- (unless (or fontified-all fontified-to)
- (if (get-text-property prev-pos 'fontified)
- (setq fontified-all
- (not (setq fontified-to
- (next-single-char-property-change prev-pos 'fontified))))
- (setq fontified-to ( or (previous-single-char-property-change prev-pos 'fontified)
- 1))))
- (setq next-fontified-to (min (+ fontified-to 5000)
- (point-max)))
- (mumamo-with-buffer-prepared-for-jit-lock
- (progn
- (put-text-property fontified-to next-fontified-to 'fontified t)
- (font-lock-fontify-region fontified-to next-fontified-to)))
- (setq fontified-to (next-single-char-property-change (1- next-fontified-to)
- 'fontified))
- (setq fontified-all (not fontified-to))
- (setq pos (next-single-char-property-change prev-pos 'mlinks-link nil
- (or fontified-to (point-max))))))
- (when ready prev-pos)))
-
-(defun mlinks-prev-link ()
- "Find previous link, fontify as necessary."
- (let* ((prev-pos (point))
- (fontified-from (previous-single-char-property-change prev-pos 'fontified))
- (fontified-here (get-text-property (max (point-min) (1- prev-pos)) 'fontified))
- (fontified-all (and fontified-here (not fontified-from)))
- (pos (when fontified-here
- (previous-single-char-property-change prev-pos 'mlinks-link nil
- (or fontified-from 1))))
- ready
- next-fontified-from)
- (while (not (or ready
- (and fontified-all
- (not pos))))
- (assert (numberp prev-pos) t)
- (if pos
- (progn
- (when (and (> (1- pos) (point-min))
- (get-text-property (1- pos) 'mlinks-link))
- ;; Get out of current link
- (setq prev-pos pos)
- (setq pos (previous-single-char-property-change prev-pos 'mlinks-link nil
- (or fontified-from 1))))
- (when pos
- (setq prev-pos pos)
- (setq ready (and (get-text-property pos 'fontified)
- (or (= 1 pos)
- (not (get-text-property (1- pos) 'mlinks-link)))
- (get-text-property pos 'mlinks-link)))
- (unless ready (setq pos nil))))
- (setq next-fontified-from (max (- fontified-from 5000)
- (point-min)))
- (mumamo-with-buffer-prepared-for-jit-lock
- (progn
- (put-text-property next-fontified-from fontified-from 'fontified t)
- (font-lock-fontify-region next-fontified-from fontified-from)))
- (setq fontified-from (previous-single-char-property-change
- (1+ next-fontified-from) 'fontified))
- (setq fontified-all (not fontified-from))
- (setq pos (previous-single-char-property-change prev-pos 'mlinks-link nil
- (or fontified-from 1)))))
- (when ready pos)))
-
-
-;;; This is for the problem reported by some Asian users:
-;;;
-;;; Lisp error: (invalid-read-syntax "] in a list")
-;;;
-;; Local Variables:
-;; coding: utf-8
-;; End:
-
-(provide 'mlinks)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mlinks.el ends here
diff --git a/emacs.d/nxhtml/util/mumamo-aspnet.el b/emacs.d/nxhtml/util/mumamo-aspnet.el
deleted file mode 100644
index c6bb2c7..0000000
--- a/emacs.d/nxhtml/util/mumamo-aspnet.el
+++ /dev/null
@@ -1,227 +0,0 @@
-;;; mumamo-aspnet.el --- Support for ASP .Net in `mumamo-mode'.
-;;
-;;;;; John: Please change here to what you want:
-;; Author: John J Foerch (jjfoerch A earthlink O net)
-;; Maintainer:
-;; Created: ??
-;; Version: ==
-;; Last-Updated: Wed Dec 12 21:55:11 2007 (3600 +0100)
-;; URL: http://OurComments.org/Emacs/Emacs.html
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Support for ASP .Net in `mumamo-mode'. If you want to use VB then
-;; you have to get the vb mode that this is written for here:
-;;
-;; http://www.emacswiki.org/cgi-bin/wiki/VbDotNetMode
-;;
-;; A C# mode is already included in nXhtml. That is the one that this
-;; library has been tested with.
-;;
-;;
-;;; Usage:
-;;
-;; Put this file in you Emacs `load-path' and add in your .emacs:
-;;
-;; (eval-after-load 'mumamo
-;; (require 'mumamo-aspnet)
-;; (mumamo-aspnet-add-me))
-;;
-;; A file with the extension .aspx will no be opened with nxhtml-mode
-;; as the main major mode and with chunks in csharp-mode etc.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(eval-when-compile (require 'mumamo))
-
-;;;
-
-;; (defun mumamo-aspnet-add-me()
-;; "Make mumamo aware of the ASP.Net extension."
-;; (add-to-list 'mumamo-chunk-family-list
-;; '("ASP.Net nXhtml Family" nxhtml-mode
-;; (mumamo-chunk-aspnet
-;; mumamo-chunk-aspnet-script
-;; mumamo-chunk-inlined-style
-;; mumamo-chunk-inlined-script
-;; mumamo-chunk-style=
-;; mumamo-chunk-onjs=
-;; ))
-;; t)
-;; (add-to-list 'mumamo-chunk-family-list
-;; '("ASP.Net XHTML Family" html-mode
-;; (mumamo-chunk-aspnet
-;; mumamo-chunk-aspnet-script
-;; mumamo-chunk-inlined-style
-;; mumamo-chunk-inlined-script
-;; mumamo-chunk-style=
-;; mumamo-chunk-onjs=
-;; ))
-;; t)
-
-
-;; (add-to-list 'mumamo-filenames-list
-;; '("\\.aspx\\'" "ASP.Net nXhtml Family"))
-;; ;; Make it SET for current session in Custom.
-;; (customize-set-variable 'mumamo-filenames-list mumamo-filenames-list)
-;; (customize-set-value 'mumamo-filenames-list mumamo-filenames-list)
-
-;; ;; this is how to set up mode aliases, should we need them.
-;; (add-to-list 'mumamo-major-modes '(csharp-mode csharp-mode))
-;; (add-to-list 'mumamo-major-modes '(vbnet-mode vbnet-mode))
-;; ;; Make it SET for current session in Custom.
-;; (customize-set-variable 'mumamo-major-modes mumamo-major-modes)
-;; (customize-set-value 'mumamo-major-modes mumamo-major-modes)
-;; )
-
-
-;;; aspnet
-
-(defvar mumamo-aspnet-page-language-mode-spec nil
- "A mumamo mode-spec for the default language of an ASP.Net page.
-This is what is set with the directive `@ Page Language' on the
-page.
-
-Internal variable.")
-(make-variable-buffer-local 'mumamo-aspnet-page-language-mode-spec)
-;;(add-to-list 'mumamo-survive 'mumamo-aspnet-page-language-mode-spec)
-(put 'mumamo-aspnet-page-language-mode-spec 'permanent-local t)
-
-(defconst mumamo-aspnet-language-regex
- (rx (0+ (not (any ">")))
- word-start "language" (0+ space) "=" (0+ space) ?\" (submatch (0+ (not (any ?\" ?>)))) ?\"
- ))
-
-(defun mumamo-aspnet-get-page-language-mode-spec ()
- (or mumamo-aspnet-page-language-mode-spec
- (save-excursion
- (goto-char (point-min))
- (when (search-forward "<%@ Page")
- (let ((case-fold-search t))
- (when (looking-at mumamo-aspnet-language-regex)
- (mumamo-aspnet-mode-spec-for-language (match-string 1))))))
- 'fundamental-mode))
-
-(defun mumamo-aspnet-get-mode-for-chunk (&optional chunk-type)
- (cond ((eq chunk-type 'script)
- (mumamo-get-major-mode-substitute
- (or (if (looking-at mumamo-aspnet-language-regex)
- (mumamo-aspnet-mode-spec-for-language (match-string 1))
- (mumamo-aspnet-get-page-language-mode-spec))
- 'fundamental-mode)
- 'fontification))
- ((eq chunk-type 'directive)
- 'fundamental-mode)
- ;;(t (mumamo-mode-from-modespec
- (t (mumamo-get-major-mode-substitute
- (mumamo-aspnet-get-page-language-mode-spec)
- 'fontification
- ))))
-
-
-(defun mumamo-chunk-aspnet(pos min max)
- "Find <% ... %>."
- (mumamo-find-possible-chunk pos min max
- 'mumamo-search-bw-exc-start-aspnet
- 'mumamo-search-bw-exc-end-jsp
- 'mumamo-search-fw-exc-start-jsp
- 'mumamo-search-fw-exc-end-jsp))
-
-(defun mumamo-search-bw-exc-start-aspnet(pos min)
- ;;(let ((exc-start (mumamo-search-bw-exc-start-str pos min "<%")))
- (let ((exc-start (mumamo-chunk-start-bw-str pos min "<%")))
- (when (and exc-start
- (<= exc-start pos))
- (cons exc-start
- (mumamo-aspnet-get-mode-for-chunk
- (if (eq (char-after exc-start) ?@)
- 'directive))))))
-
-(defconst mumamo-aspnet-script-tag-start-regex
- (rx "<script" word-end
- (0+ (not (any ">")))
- word-start "runat" (0+ space) "=" (0+ space) ?\" "server" ?\"
- (0+ (not (any ">")))
- ">"
- ))
-
-(defun mumamo-aspnet-mode-spec-for-language (language)
- (let ((language (downcase language)))
- (cond ((equal language "c#") 'csharp-mode)
- ((equal language "vb") 'vbnet-mode)
- (t 'fundamental-mode))))
-
-(defun mumamo-search-bw-exc-start-aspnet-script(pos min)
- (goto-char (+ pos 7))
- (let ((marker-start (search-backward "<script" min t))
- exc-mode
- exc-start)
- (when marker-start
- (when (looking-at mumamo-aspnet-script-tag-start-regex)
- (setq exc-start (match-end 0))
- (setq exc-mode (mumamo-aspnet-get-mode-for-chunk 'script))
- (goto-char exc-start)
- (when (<= exc-start pos)
- (cons (point) exc-mode))))))
-
-(defun mumamo-search-fw-exc-start-aspnet-script(pos max)
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<script" max t))
- exc-mode)
- (when exc-start
- (goto-char (- exc-start 7))
- (when (looking-at mumamo-aspnet-script-tag-start-regex)
- (goto-char (match-end 0))
- (point)
- ))))
-
-(defun mumamo-chunk-aspnet-script(pos min max)
- "Find inlined script, <script runat=\"server\">...</script>."
- (mumamo-find-possible-chunk pos min max
- 'mumamo-search-bw-exc-start-aspnet-script
- 'mumamo-search-bw-exc-end-inlined-script
- 'mumamo-search-fw-exc-start-aspnet-script
- 'mumamo-search-fw-exc-end-inlined-script))
-
-;; Fix-me: define a multi major mode for asp. Or maybe just drop this
-;; file?
-
-(provide 'mumamo-aspnet)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mumamo-aspnet.el ends here
diff --git a/emacs.d/nxhtml/util/mumamo-fun.el b/emacs.d/nxhtml/util/mumamo-fun.el
deleted file mode 100644
index eb3c5c2..0000000
--- a/emacs.d/nxhtml/util/mumamo-fun.el
+++ /dev/null
@@ -1,3333 +0,0 @@
-;;; mumamo-fun.el --- Multi major mode functions
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-03-09T01:35:21+0100 Sun
-;; Version: 0.51
-;; Last-Updated: 2008-08-04T17:54:29+0200 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `backquote', `bytecomp', `cl', `flyspell', `ispell', `mumamo',
-;; `sgml-mode'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Defines some "multi major modes" functions. See mumamo.el for more
-;; information.
-;;
-;;;; Usage:
-;;
-;; See mumamo.el for how to use the multi major mode functions
-;; defined here.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (add-to-list 'load-path default-directory))
-(eval-when-compile (require 'mumamo))
-(eval-when-compile (require 'sgml-mode))
-;;(mumamo-require)
-
-;;;#autoload
-;;(defun mumamo-fun-require ())
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; File wide key bindings
-
-(defun mumamo-multi-mode-map ()
- "Return mumamo multi mode keymap."
- (symbol-value
- (intern-soft (concat (symbol-name mumamo-multi-major-mode) "-map"))))
-
-;; (defun mumamo-multi-mode-hook-symbol ()
-;; "Return mumamo multi mode hook symbol."
-;; (intern-soft (concat (symbol-name mumamo-multi-major-mode) "-hook")))
-
-;;;###autoload
-(defun mumamo-define-html-file-wide-keys ()
- "Define keys in multi major mode keymap for html files."
- (let ((map (mumamo-multi-mode-map)))
- (define-key map [(control ?c) (control ?h) ?b] 'nxhtml-browse-file)
- ))
-;; (defun mumamo-add-html-file-wide-keys (hook)
-;; (add-hook hook 'mumamo-define-html-file-wide-keys)
-;; )
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Chunk search routines for XHTML things
-
-(defun mumamo-chunk-attr= (pos min max attr= attr=is-regex attr-regex submode)
- "This should work similar to `mumamo-find-possible-chunk'.
-See `mumamo-chunk-style=' for an example of use.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-chunk-attr=-new pos max attr= attr=is-regex attr-regex submode))
-
-(defun mumamo-chunk-attr=-new-fw-exc-fun (pos max)
- ;;(msgtrc "(mumamo-chunk-attr=-new-fw-exc-fun %s %s)" pos max)
- (save-match-data
- (let ((here (point))
- first-dq
- next-dq
- (this-chunk (mumamo-get-existing-new-chunk-at pos)))
- (if this-chunk
- (goto-char (overlay-end this-chunk))
- (goto-char (overlay-end mumamo-last-chunk)))
- (setq first-dq (search-forward "\"" max t))
- (unless (bobp)
- (backward-char)
- (condition-case err
- (with-syntax-table (standard-syntax-table)
- (setq next-dq (scan-sexps (point) 1)))
- (error nil)))
- (prog1
- next-dq
- (goto-char here)))))
-
-(defun mumamo-chunk-attr=-new-find-borders-fun (start-border end-border dummy)
- ;;(setq borders (funcall find-borders-fun start-border end-border exc-mode))
- (save-match-data
- (let ((here (point))
- (end2 (when end-border (1- end-border)))
- start2)
- (goto-char start-border)
- (save-match-data
- (setq start2 (search-forward "\"" (+ start-border 200) t)))
- (goto-char here)
- (list start2 end2))))
-
-(defun mumamo-chunk-attr=-new (pos
- ;;min
- max
- attr=
- attr=is-regex
- attr-regex
- submode)
- ;;(message "\n(mumamo-chunk-attr=-new %s %s %s %s %s %s)" pos max attr= attr=is-regex attr-regex submode)
- ;;(mumamo-condition-case err
- (condition-case err
- (save-match-data
- (let ((here (point))
- (next-attr= (progn
- ;; fix-me:
- (if (not attr=is-regex)
- (goto-char (+ pos (length attr=)))
- (goto-char pos)
- (skip-chars-forward "a-zA-Z="))
- (goto-char pos)
- (if attr=is-regex
- (re-search-forward attr= max t)
- (search-forward attr= max t))))
- next-attr-sure
- ;;next-attr=
- start start-border
- end end-border
- exc-mode
- borders
- exc-start-next
- exc-end-next
- exc-start-next
- exc-end-next
- (tries 0)
- (min (1- pos))
- look-max
- )
- ;; make sure if we have find prev-attr= or not
- (unless (eq (char-after) ?\")
- (setq next-attr= nil))
- (when next-attr=
- (forward-char)
- (skip-chars-forward "^\"")
- (setq look-max (+ (point) 2)))
- (while (and next-attr=
- (< min (point))
- (not next-attr-sure)
- (< tries 5))
- ;;(msgtrc "attr=-new: min=%s, point=%s" min (point))
- (setq tries (1+ tries))
- ;;(if (not (re-search-backward "<[^?]" (- min 300) t))
- (if (not (re-search-backward "<[^?]\\|\?>" (- min 300) t))
- (setq next-attr= nil)
- ;;(if (looking-at attr-regex)
- (if (let ((here (point)))
- (prog1
- (re-search-forward attr-regex look-max t)
- (goto-char here)))
- ;;(if (mumamo-end-in-code (point) next-attr= 'php-mode)
- (setq next-attr-sure 'found)
- (unless (bobp)
- (backward-char)
- ;;(msgtrc "attr=-new 1: min=%s, point=%s" min (point))
- (setq next-attr= (if attr=is-regex
- (re-search-backward attr= (- min 300) t)
- (search-backward attr= (- min 300) t)))))))
- (unless next-attr-sure (setq next-attr= nil))
-
-
- ;; find prev change and if inside style= the next change
- (when next-attr=
- (setq exc-start-next (match-beginning 1))
- (setq exc-end-next (match-end 2))
- (when (>= exc-start-next pos)
- (if (> pos exc-end-next)
- (progn
- (setq start (+ (match-end 2) 1))
- ;;(setq start-border (+ (match-end 2) 2))
- )
- (setq exc-mode submode)
- (setq start (match-beginning 1))
- (setq start-border (match-beginning 2))
- (setq end (1+ (match-end 2)))
- (setq end-border (1- end)))
- ))
- ;; find next change
- (unless end
- (if start
- (goto-char start)
- (goto-char pos)
- (search-backward "<" min t))
- ;;(msgtrc "attr=-new 2: min=%s, point=%s" min (point))
- (setq next-attr= (if attr=is-regex
- (re-search-forward attr= max t)
- (search-forward attr= max t)))
- (when (and next-attr=
- (search-backward "<" min t))
- (when (looking-at attr-regex)
- (setq end (match-beginning 1)))))
- (when start (assert (>= start pos) t))
- (when end (assert (<= pos end) t))
- ;;(message "start-border=%s end-border=%s" start-border end-border)
- (when (or start-border end-border)
- (setq borders (list start-border end-border nil)))
- ;; (message "mumamo-chunk-attr=-new: %s"
- ;; (list start
- ;; end
- ;; exc-mode
- ;; borders
- ;; nil ;; parseable-by
- ;; 'mumamo-chunk-attr=-new-fw-exc-fun ;; fw-exc-fun
- ;; 'mumamo-chunk-attr=-new-find-borders-fun ;; find-borders-fun
- ;; ))
- (goto-char here)
- (setq end nil)
- (when (or start end)
- (list start
- end
- exc-mode
- borders
- nil ;; parseable-by
- 'mumamo-chunk-attr=-new-fw-exc-fun ;; fw-exc-fun
- 'mumamo-chunk-attr=-new-find-borders-fun ;; find-borders-fun
- ))))
- (error (mumamo-display-error 'mumamo-chunk-attr=-new "%s" (error-message-string err)))
- ))
-
-;;;; xml pi
-
-(defvar mumamo-xml-pi-mode-alist
- '(("php" . php-mode)
- ("python" . python-mode))
- "Alist used by `mumamo-chunk-xml-pi' to get exception mode." )
-
-;; Fix-me: make it possible to make the borders part of the php chunk
-;; so that parsing of them by nxml may be skipped. Or, rather if the
-;; borders are not part of the chunk then assume nxml can not parse
-;; the chunk and the borders.
-;; (defun mumamo-search-bw-exc-start-xml-pi-1 (pos min lt-chars)
-;; "Helper for `mumamo-chunk-xml-pi'.
-;; POS is where to start search and MIN is where to stop.
-;; LT-CHARS is just <?.
-
-;; Actual use is in `mumamo-search-bw-exc-start-xml-pi'."
-;; (let ((exc-start (mumamo-chunk-start-bw-str (+ pos 2) min lt-chars))
-;; spec
-;; exc-mode
-;; hit)
-;; (when exc-start
-;; (goto-char exc-start)
-;; (when (and (not (looking-at "xml"))
-;; (looking-at (rx (0+ (any "a-z")))))
-;; ;; (setq exc-start (match-end 0)) include it in sub chunk instead
-;; (setq exc-start (- exc-start 2))
-;; (setq spec (match-string-no-properties 0))
-;; (setq exc-mode (assoc spec mumamo-xml-pi-mode-alist))
-;; (when exc-mode (setq exc-mode (cdr exc-mode)))
-;; (setq hit t)
-;; )
-;; (when hit
-;; (unless exc-mode
-;; ;;(setq exc-mode 'fundamental-mode)
-;; ;; Fix-me: Better assume php-mode
-;; (setq exc-mode 'php-mode))
-;; (when (<= exc-start pos)
-;; ;;(cons exc-start exc-mode)
-;; (list exc-start exc-mode nil)
-;; )))))
-
-;; (defun mumamo-search-bw-exc-start-xml-pi (pos min)
-;; "Helper for `mumamo-chunk-xml-pi'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-search-bw-exc-start-xml-pi-1 pos min "<?"))
-
-(defun mumamo-search-fw-exc-start-xml-pi-new (pos max)
- (let ((here (point))
- start
- spec
- exc-mode
- ret)
- (setq start (search-forward "<?" max t))
- (when (and start
- (looking-at (rx (0+ (any "a-z")))))
- (setq spec (match-string-no-properties 0))
- (unless (string= spec "xml")
- (when (= 0 (length spec))
- (setq spec "php"))
- (setq exc-mode (assoc spec mumamo-xml-pi-mode-alist))
- (if exc-mode
- (setq exc-mode (cdr exc-mode))
- (setq exc-mode 'mumamo-bad-mode))
- (setq ret (list (- start 2) exc-mode nil))))
- (goto-char here)
- ret))
-
-(defun mumamo-xml-pi-end-is-xml-end (pos)
- "Return t if the ?> at pos is end of <?xml."
- (when (> 1000 pos)
-;;; (assert (and (= (char-after pos) ??)
-;;; (= (char-after (1+ pos)) ?>)))
- (save-excursion
- (save-restriction
- (widen)
- (save-match-data
- (when (search-backward "<" (- pos 150) t)
- (when (looking-at (rx line-start "<\?xml" (1+ space)))
- (mumamo-msgfntfy "mumamo-xml-pi-end-is-xml-end %s => t" pos)
- t)))))))
-
-;; (defun mumamo-search-bw-exc-end-xml-pi (pos min)
-;; "Helper for `mumamo-chunk-xml-pi'.
-;; POS is where to start search and MIN is where to stop."
-;; ;; Fix me: merge xml header
-;; (mumamo-msgfntfy "mumamo-search-bw-exc-end-xml-pi %s %s" pos min)
-;; ;;(let ((end-pos (mumamo-chunk-end-bw-str pos min "?>")))
-;; (let ((end-pos (mumamo-chunk-end-bw-str-inc pos min "?>")))
-;; (mumamo-msgfntfy " end-pos=%s" end-pos)
-;; (when end-pos
-;; (unless (or (mumamo-xml-pi-end-is-xml-end end-pos)
-;; (= (save-restriction
-;; (widen)
-;; (char-after (- end-pos 1)))
-;; ?<))
-;; (mumamo-msgfntfy " returning end-pos")
-;; end-pos))))
-
-(defun mumamo-search-fw-exc-end-xml-pi (pos max)
- "Helper for `mumamo-chunk-xml-pi'.
-POS is where to start search and MAX is where to stop."
- ;; Fix me: merge xml header
- ;;(let ((end-pos (mumamo-chunk-end-fw-str pos max "?>")))
- (save-match-data
- (let ((end-pos (mumamo-chunk-end-fw-str-inc pos max "?>")))
- (when end-pos
- (unless (mumamo-xml-pi-end-is-xml-end end-pos)
- end-pos)))))
-
-(defun mumamo-search-fw-exc-start-xml-pi-1 (pos max lt-chars)
- "Helper for `mumamo-chunk-xml-pi'.
-POS is where to start search and MAX is where to stop.
-
-Used in `mumamo-search-fw-exc-start-xml-pi'. For an explanation
-of LT-CHARS see `mumamo-search-bw-exc-start-xml-pi-1'."
- (goto-char pos)
- (skip-chars-backward "a-zA-Z")
- ;;(let ((end-out (mumamo-chunk-start-fw-str (point) max lt-chars)))
- (let ((end-out (mumamo-chunk-start-fw-str-inc (point) max lt-chars))
- spec
- exc-mode
- hit)
- (when (looking-at "xml")
- (if t ;(= 1 pos)
- (setq end-out (mumamo-chunk-start-fw-str-inc (1+ (point)) max lt-chars))
- (setq end-out nil)))
- (when end-out
- ;; Get end-out:
- (if (looking-at (rx (0+ (any "a-z"))))
- (progn
- ;;(setq end-out (match-end 0))
- (setq end-out (- (match-beginning 0) 2))
- (setq spec (match-string-no-properties 0))
- (setq exc-mode (assoc spec mumamo-xml-pi-mode-alist))
- (if exc-mode
- (setq exc-mode (cdr exc-mode))
- (setq exc-mode 'php-mode))
- (setq end-out (list end-out exc-mode nil))
- )
- (setq end-out nil))
- end-out)))
-
-(defun mumamo-search-fw-exc-start-xml-pi-old (pos max)
- "Helper for `mumamo-chunk-xml-pi'.
-POS is where to start search and MAX is where to stop."
- (mumamo-search-fw-exc-start-xml-pi-1 pos max "<?"))
-
-;; Add a find-borders-fun here so that for example src="<?php some
-;; code ?>" can be handled.
-;;
-;; Fix-me: Maybe generalize for other values than <?php
-(defun mumamo-find-borders-xml-pi (start end exc-mode)
- (let (start-border
- end-border
- (inc t)
- ;;(begin-mark "<?php")
- (begin-mark "<?")
- (end-mark "?>")
- (here (point)))
- (if (and inc) ;; exc-mode)
- (progn
- (when start
- ;;(setq start-border (+ start (length begin-mark)))
- (goto-char (+ start (length begin-mark)))
- (skip-chars-forward "=a-zA-Z")
- (setq start-border (point))
- )
- (when end
- (setq end-border
- (- end (length end-mark)))))
- (if (and (not inc) (not exc-mode))
- (progn
- (when start
- (setq start-border
- (+ start (length end-mark))))
- (when end
- (setq end-border (- end (length begin-mark)))
- ;;(goto-char end)
- ;;(skip-chars-forward "=a-zA-Z")
- ;;(setq end-border (point))
- ))))
- (goto-char here)
- (when (or start-border end-border)
- (list start-border end-border))))
-
-(defun mumamo-chunk-xml-pi (pos min max)
- "Find process instruction, <? ... ?>. Return range and wanted mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-xml-pi
- ;; 'mumamo-search-bw-exc-end-xml-pi
- ;; 'mumamo-search-fw-exc-start-xml-pi-old
- ;; 'mumamo-search-fw-exc-end-xml-pi
- ;; 'mumamo-find-borders-xml-pi)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-xml-pi-new
- 'mumamo-search-fw-exc-end-xml-pi
- 'mumamo-find-borders-xml-pi))
-
-
-;;;; <style ...>
-
-(defconst mumamo-style-tag-start-regex
- (rx "<style"
- space
- (0+ (not (any ">")))
- "type"
- (0+ space)
- "="
- (0+ space)
- ?\"
- "text/css"
- ?\"
- (0+ (not (any ">")))
- ">"
- ;; FIX-ME: Commented out because of bug in Emacs
- ;;
- ;;(optional (0+ space) "<![CDATA[")
- ))
-
-;; (defun mumamo-search-bw-exc-start-inlined-style (pos min)
-;; "Helper for `mumamo-chunk-inlined-style'.
-;; POS is where to start search and MIN is where to stop."
-;; (goto-char (+ pos 6))
-;; (let ((marker-start (search-backward "<style" min t))
-;; exc-mode
-;; exc-start)
-;; (when marker-start
-;; (when (looking-at mumamo-style-tag-start-regex)
-;; (setq exc-start (match-end 0))
-;; (goto-char exc-start)
-;; (when (<= exc-start pos)
-;; ;;(cons (point) 'css-mode)
-;; ;;(list (point) 'css-mode '(nxml-mode))
-;; ;; Fix-me: Kubica looping problem
-;; (list (point) 'css-mode)
-;; )
-;; ))))
-
-;; (defun mumamo-search-bw-exc-end-inlined-style (pos min)
-;; "Helper for `mumamo-chunk-inlined-style'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "</style>"))
-
-;; (defun mumamo-search-fw-exc-start-inlined-style-old (pos max)
-;; "Helper for `mumamo-chunk-inlined-style'.
-;; POS is where to start search and MAX is where to stop."
-;; (goto-char (1+ pos))
-;; (skip-chars-backward "^<")
-;; ;; Handle <![CDATA[
-;; (when (and
-;; (eq ?< (char-before))
-;; (eq ?! (char-after))
-;; (not (bobp)))
-;; (backward-char)
-;; (skip-chars-backward "^<"))
-;; (unless (bobp)
-;; (backward-char 1))
-;; (let ((exc-start (search-forward "<style" max t))
-;; exc-mode)
-;; (when exc-start
-;; (goto-char (- exc-start 6))
-;; (when (looking-at mumamo-style-tag-start-regex)
-;; (goto-char (match-end 0))
-;; (point)
-;; ))))
-
-(defun mumamo-search-fw-exc-end-inlined-style (pos max)
- "Helper for `mumamo-chunk-inlined-style'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "</style>")))
-
-;; (defun mumamo-chunk-inlined-style-old (pos min max)
-;; "Find <style>...</style>. Return range and 'css-mode.
-;; See `mumamo-find-possible-chunk' for POS, MIN and MAX."
-;; (mumamo-find-possible-chunk pos min max
-;; 'mumamo-search-bw-exc-start-inlined-style
-;; 'mumamo-search-bw-exc-end-inlined-style
-;; 'mumamo-search-fw-exc-start-inlined-style-old
-;; 'mumamo-search-fw-exc-end-inlined-style))
-
-(defun mumamo-search-fw-exc-start-inlined-style (pos max)
- "Helper for `mumamo-chunk-inlined-style'.
-POS is where to start search and MAX is where to stop."
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<style" max t))
- exc-mode)
- (when exc-start
- (goto-char (- exc-start 6))
- (when (looking-at mumamo-style-tag-start-regex)
- (goto-char (match-end 0))
- (list (point) 'css-mode nil)
- ))))
-
-(defun mumamo-chunk-inlined-style (pos min max)
- "Find <style>...</style>. Return range and 'css-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-inlined-style
- 'mumamo-search-fw-exc-end-inlined-style))
-
-;;;; <script ...>
-
-(defconst mumamo-script-tag-start-regex
- (rx "<script"
- space
- (0+ (not (any ">")))
- "type"
- (0+ space)
- "="
- (0+ space)
- ?\"
- ;;(or "text" "application")
- ;;"/"
- ;;(or "javascript" "ecmascript")
- "text/javascript"
- ?\"
- (0+ (not (any ">")))
- ">"
- ;; FIX-ME: Commented out because of bug in Emacs
- ;;
- ;;(optional (0+ space) "<![CDATA[" )
- ))
-
-;; (defun mumamo-search-bw-exc-start-inlined-script (pos min)
-;; "Helper for `mumamo-chunk-inlined-script'.
-;; POS is where to start search and MIN is where to stop."
-;; (goto-char (+ pos 7))
-;; (let ((marker-start (when (< min (point)) (search-backward "<script" min t)))
-;; exc-mode
-;; exc-start)
-;; (when marker-start
-;; (when (looking-at mumamo-script-tag-start-regex)
-;; (setq exc-start (match-end 0))
-;; (goto-char exc-start)
-;; (when (<= exc-start pos)
-;; ;;(cons (point) 'javascript-mode)
-;; (list (point) 'javascript-mode '(nxml-mode))
-;; )
-;; ))))
-
-;; (defun mumamo-search-bw-exc-end-inlined-script (pos min)
-;; "Helper for `mumamo-chunk-inlined-script'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "</script>"))
-
-;; (defun mumamo-search-fw-exc-start-inlined-script-old (pos max)
-;; "Helper for `mumamo-chunk-inlined-script'.
-;; POS is where to start search and MAX is where to stop."
-;; (goto-char (1+ pos))
-;; (skip-chars-backward "^<")
-;; ;; Handle <![CDATA[
-;; (when (and
-;; (eq ?< (char-before))
-;; (eq ?! (char-after))
-;; (not (bobp)))
-;; (backward-char)
-;; (skip-chars-backward "^<"))
-;; (unless (bobp)
-;; (backward-char 1))
-;; (let ((exc-start (search-forward "<script" max t))
-;; exc-mode)
-;; (when exc-start
-;; (goto-char (- exc-start 7))
-;; (when (looking-at mumamo-script-tag-start-regex)
-;; (goto-char (match-end 0))
-;; (point)
-;; ))))
-
-(defun mumamo-search-fw-exc-end-inlined-script (pos max)
- "Helper for `mumamo-chunk-inlined-script'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "</script>")))
-
-;; (defun mumamo-chunk-inlined-script-old (pos min max)
-;; "Find <script>...</script>. Return range and 'javascript-mode.
-;; See `mumamo-find-possible-chunk' for POS, MIN and MAX."
-;; (mumamo-find-possible-chunk pos min max
-;; 'mumamo-search-bw-exc-start-inlined-script
-;; 'mumamo-search-bw-exc-end-inlined-script
-;; 'mumamo-search-fw-exc-start-inlined-script-old
-;; 'mumamo-search-fw-exc-end-inlined-script))
-
-(defun mumamo-search-fw-exc-start-inlined-script (pos max)
- "Helper for `mumamo-chunk-inlined-script'.
-POS is where to start search and MAX is where to stop."
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<script" max t))
- exc-mode)
- (when exc-start
- (goto-char (- exc-start 7))
- (when (looking-at mumamo-script-tag-start-regex)
- (goto-char (match-end 0))
- (list (point) 'javascript-mode '(nxml-mode))
- ))))
-
-(defun mumamo-chunk-inlined-script (pos min max)
- "Find <script>...</script>. Return range and 'javascript-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-inlined-script
- 'mumamo-search-fw-exc-end-inlined-script))
-
-;;;; on[a-z]+=\"javascript:"
-
-(defconst mumamo-onjs=-attr=
- (rx
- ;;"on[a-z]+="
- (or "onclick" "ondblclick" "onmousedown" "onmousemove" "onmouseout" "onmouseover" "onmouseup" "onkeydown" "onkeypress" "onkeyup")
- "="))
-
-(defconst mumamo-onjs=-attr-regex
- (rx point
- (or "<" "?>")
- (* (not (any ">")))
- space
- (submatch
- ;;"on" (1+ (any "a-za-z"))
- (or "onclick" "ondblclick" "onmousedown" "onmousemove" "onmouseout" "onmouseover" "onmouseup" "onkeydown" "onkeypress" "onkeyup")
- "=")
- (0+ space)
- ?\"
- (submatch
- (opt "javascript:")
- (0+
- (not (any "\""))))
- ))
-
-(defun mumamo-chunk-onjs=(pos min max)
- "Find javascript on...=\"...\". Return range and 'javascript-mode."
- (mumamo-chunk-attr= pos min max mumamo-onjs=-attr= t mumamo-onjs=-attr-regex
- 'javascript-mode))
-
-;;;; py:somthing=\"python\"
-
-(defconst mumamo-py:=-attr= "py:[a-z]+=")
-
-(defconst mumamo-py:=-attr-regex
- (rx point
- (or "<" "?>")
- (* (not (any ">")))
- space
- (submatch
- "py:" (1+ (any "a-za-z"))
- "=")
- (0+ space)
- ?\"
- (submatch
- (0+
- (not (any "\""))))
- ))
-
-(defun mumamo-chunk-py:=(pos min max)
- "Find python py:...=\"...\". Return range and 'python-mode."
- (mumamo-chunk-attr= pos min max mumamo-py:=-attr= t mumamo-py:=-attr-regex
- 'python-mode))
-
-(defun mumamo-chunk-py:match (pos min max)
- (save-match-data
- (let ((here (point))
- (py:match (progn
- (goto-char pos)
- (re-search-forward (rx "py:match"
- (1+ space)
- (0+ (not (any ">")))
- word-start
- (submatch "path=")
- (0+ space)
- ?\"
- (submatch
- (0+
- (not (any "\"")))))
- max t)))
- start end borders
- )
- (when py:match
- (setq start (match-beginning 1))
- (setq end (match-end 2))
- (setq borders (list (match-end 1) (1- end)))
- )
- (goto-char here)
- (when start
- (list start
- end
- 'python-mode
- borders
- nil ;; parseable-by
- 'mumamo-chunk-attr=-new-fw-exc-fun ;; fw-exc-fun
- 'mumamo-chunk-attr=-new-find-borders-fun ;; find-borders-fun
- )))))
-
-;;;; style=
-
-(defconst mumamo-style=start-regex
- (rx "<"
- (0+ (not (any ">")))
- space
- (submatch "style=")
- (0+ space)
- ?\"
- (submatch
- (0+
- (not (any "\""))))
- ))
-
-(defun mumamo-chunk-style=(pos min max)
- "Find style=\"...\". Return range and 'css-mode."
- (mumamo-chunk-attr= pos min max "style=" nil mumamo-style=start-regex
- 'css-mode))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; HTML w html-mode
-
-(put 'mumamo-alt-php-tags-mode 'permanent-local t)
-(define-minor-mode mumamo-alt-php-tags-mode
- "Minor mode for using '(?php' instead of '<?php' in buffer.
-When turning on this mode <?php is replace with (?php in the buffer.
-If you write the buffer to file (?php is however written as <?php.
-
-When turning off this mode (?php is replace with <?php in the buffer.
-
-The purpose of this minor mode is to work around problems with
-using the `nxml-mode' parser in php files. `nxml-mode' knows
-damned well that you can not have the character < in strings and
-I can't make it forget that. For PHP programmers it is however
-very convient to use <?php ... ?> in strings.
-
-There is no reason to use this minor mode unless you want XML
-validation and/or completion in your php file. If you do not
-want that then you can simply use a multi major mode based on
-`html-mode' instead of `nxml-mode'/`nxhtml-mode'. Or, of course,
-just `php-mode' if there is no html code in the file."
- :lighter "<?php "
- (if mumamo-alt-php-tags-mode
- (progn
- ;;(unless mumamo-multi-major-mode (error "Only for mumamo multi major modes"))
- (unless (let ((major-mode (mumamo-main-major-mode)))
- (derived-mode-p 'nxml-mode))
- ;;(error "Mumamo multi major mode must be based on nxml-mode")
- )
- (unless (memq 'mumamo-chunk-alt-php (caddr mumamo-current-chunk-family))
- (error "Mumamo multi major must have chunk function mumamo-chunk-alt-php"))
-
- ;; Be paranoid about the file/content write hooks
- (when (<= emacs-major-version 22)
- (with-no-warnings
- (when local-write-file-hooks ;; obsolete, but check!
- (error "Will not do this because local-write-file-hooks is non-nil"))))
- (remove-hook 'write-contents-functions 'mumamo-alt-php-write-contents t)
- (when write-contents-functions
- (error "Will not do this because write-contents-functions is non-nil"))
- (when (delq 'recentf-track-opened-file (copy-sequence write-file-functions))
- (error "Will not do this because write-file-functions is non-nil"))
-
- (add-hook 'write-contents-functions 'mumamo-alt-php-write-contents t t)
- (put 'write-contents-functions 'permanent-local t)
- (save-restriction
- (let ((here (point)))
- (widen)
- (goto-char (point-min))
- (while (search-forward "<?php" nil t)
- (replace-match "(?php"))
- (goto-char (point-min))
- (while (search-forward "<?=" nil t)
- (replace-match "(?="))
- (goto-char (point-min))
- (while (search-forward "?>" nil t)
- (replace-match "?)"))
- (goto-char here))))
- (save-restriction
- (let ((here (point)))
- (widen)
- (goto-char (point-min))
- (while (search-forward "(?php" nil t)
- (replace-match "<?php"))
- (goto-char (point-min))
- (while (search-forward "(?=" nil t)
- (replace-match "<?="))
- (goto-char (point-min))
- (while (search-forward "?)" nil t)
- (replace-match "?>"))
- (goto-char here)))
- (remove-hook 'write-contents-functions 'mumamo-alt-php-write-contents t)))
-
-(defun mumamo-chunk-alt-php (pos min max)
- "Find (?php ... ?), return range and `php-mode'.
-Workaround for the problem that I can not tame `nxml-mode' to recognize <?php.
-
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (when mumamo-alt-php-tags-mode
- (mumamo-quick-static-chunk pos min max "(?php" "?)" t 'php-mode t)))
-
-(defun mumamo-chunk-alt-php= (pos min max)
- "Find (?= ... ?), return range and `php-mode'.
-Workaround for the problem that I can not tame `nxml-mode' to recognize <?php.
-
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (when mumamo-alt-php-tags-mode
- (mumamo-quick-static-chunk pos min max "(?=" "?)" t 'php-mode t)))
-
-;;;###autoload
-(define-mumamo-multi-major-mode html-mumamo-mode
- "Turn on multiple major modes for (X)HTML with main mode `html-mode'.
-This covers inlined style and javascript and PHP."
- ("HTML Family" html-mode
- (mumamo-chunk-xml-pi
- mumamo-chunk-alt-php
- mumamo-chunk-alt-php=
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(add-hook 'html-mumamo-mode-hook 'mumamo-define-html-file-wide-keys)
-(mumamo-inherit-sub-chunk-family 'html-mumamo-mode)
-
-;; (define-mumamo-multi-major-mode xml-pi-only-mumamo-mode
-;; "Test"
-;; ("HTML Family" html-mode
-;; (mumamo-chunk-xml-pi
-;; )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; XHTML w nxml-mode
-
-(defun mumamo-alt-php-write-contents ()
- "For `write-contents-functions' when `mumamo-chunk-alt-php' is used."
- (let ((here (point)))
- (save-match-data
- (save-restriction
- (widen)
- (condition-case nil
- (atomic-change-group
- (progn
- (goto-char (point-min))
- (while (search-forward "(?php" nil t)
- (replace-match "<?php"))
- (goto-char (point-min))
- (while (search-forward "(?=" nil t)
- (replace-match "<?="))
- (goto-char (point-min))
- (while (search-forward "?)" nil t)
- (replace-match "?>"))
- (basic-save-buffer-1)
- (signal 'mumamo-error-ind-0 nil)))
- (mumamo-error-ind-0)))
- (set-buffer-modified-p nil))
- (goto-char here))
- ;; saved, return t
- t)
-
-;;;###autoload
-(define-mumamo-multi-major-mode nxml-mumamo-mode
- "Turn on multiple major modes for (X)HTML with main mode `nxml-mode'.
-This covers inlined style and javascript and PHP.
-
-See also `mumamo-alt-php-tags-mode'."
- ("nXml Family" nxml-mode
- (mumamo-chunk-xml-pi
- mumamo-chunk-alt-php
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(add-hook 'nxml-mumamo-mode-hook 'mumamo-define-html-file-wide-keys)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Mason (not ready)
-;; http://www.masonhq.com/docs/manual/Devel.html#examples_and_recommended_usage
-
-(defun mumamo-chunk-mason-perl-line (pos min max)
- (mumamo-whole-line-chunk pos min max "%" 'perl-mode))
-
-(defun mumamo-chunk-mason-perl-single (pos min max)
- (mumamo-quick-static-chunk pos min max "<% " " %>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-perl-block (pos min max)
- (mumamo-quick-static-chunk pos min max "<%perl>" "</%perl>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-perl-init (pos min max)
- (mumamo-quick-static-chunk pos min max "<%init>" "</%init>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-perl-once (pos min max)
- (mumamo-quick-static-chunk pos min max "<%once>" "</%once>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-perl-cleanup (pos min max)
- (mumamo-quick-static-chunk pos min max "<%cleanup>" "</%cleanup>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-perl-shared (pos min max)
- (mumamo-quick-static-chunk pos min max "<%shared>" "</%shared>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-simple-comp (pos min max)
- (mumamo-quick-static-chunk pos min max "<& " " &>" t 'text-mode t))
-
-(defun mumamo-chunk-mason-args (pos min max)
- ;; Fix-me: perl-mode is maybe not the best here?
- (mumamo-quick-static-chunk pos min max "<%args>" "</%args>" t 'perl-mode t))
-
-(defun mumamo-chunk-mason-doc (pos min max)
- (mumamo-quick-static-chunk pos min max "<%doc>" "</%doc>" t 'mumamo-comment-mode t))
-
-(defun mumamo-chunk-mason-text (pos min max)
- (mumamo-quick-static-chunk pos min max "<%text>" "</%text>" t 'text-mode t))
-
-;; component calls with content
-
-;; (defun mumamo-chunk-mason-compcont-bw-exc-start-fun (pos min)
-;; (let ((exc-start (mumamo-chunk-start-bw-str-inc pos min "<&| ")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'html-mode))))
-
-;; (defun mumamo-chunk-mason-compcont-fw-exc-start-fun-old (pos max)
-;; (mumamo-chunk-start-fw-str-inc pos max "<&| "))
-
-(defun mumamo-chunk-mason-compcont-fw-exc-end-fun (pos max)
- (mumamo-chunk-end-fw-str-inc pos max "</&>"))
-
-(defun mumamo-chunk-mason-compcont-find-borders-fun (start end dummy)
- (when dummy
- (list
- (when start
- (save-match-data
- (let ((here (point))
- ret)
- (goto-char start)
- (when (re-search-forward "[^>]* &>" end t)
- (setq ret (point))
- (goto-char here)
- ret))
- ))
- (when end (- end 4))
- dummy)))
-
-;; (defun mumamo-chunk-mason-compcont-old (pos min max)
-;; (mumamo-find-possible-chunk-new pos
-;; max
-;; 'mumamo-chunk-mason-compcont-bw-exc-start-fun
-;; 'mumamo-chunk-mason-compcont-fw-exc-start-fun-old
-;; 'mumamo-chunk-mason-compcont-fw-exc-end-fun
-;; 'mumamo-chunk-mason-compcont-find-borders-fun))
-
-(defun mumamo-chunk-mason-compcont-fw-exc-start-fun (pos max)
- (let ((where (mumamo-chunk-start-fw-str-inc pos max "<&| ")))
- (when where
- (list where 'html-mode nil))))
-
-(defun mumamo-chunk-mason-compcont (pos min max)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-chunk-mason-compcont-fw-exc-start-fun
- 'mumamo-chunk-mason-compcont-fw-exc-end-fun
- 'mumamo-chunk-mason-compcont-find-borders-fun))
-
-;;;###autoload
-(define-mumamo-multi-major-mode mason-html-mumamo-mode
- "Turn on multiple major modes for Mason using main mode `html-mode'.
-This covers inlined style and javascript."
- ("Mason html Family" html-mode
- (
- mumamo-chunk-mason-perl-line
- mumamo-chunk-mason-perl-single
- mumamo-chunk-mason-perl-block
- mumamo-chunk-mason-perl-init
- mumamo-chunk-mason-perl-once
- mumamo-chunk-mason-perl-cleanup
- mumamo-chunk-mason-perl-shared
- mumamo-chunk-mason-simple-comp
- mumamo-chunk-mason-compcont
- mumamo-chunk-mason-args
- mumamo-chunk-mason-doc
- mumamo-chunk-mason-text
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(add-hook 'mason-html-mumamo-mode-hook 'mumamo-define-html-file-wide-keys)
-(mumamo-inherit-sub-chunk-family-locally 'mason-html-mumamo-mode 'mason-html-mumamo-mode)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Embperl
-
-(defun mumamo-chunk-embperl-<- (pos min max)
- "Find [- ... -], return range and `perl-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "[-" "-]" t 'perl-mode t))
-
-(defun mumamo-chunk-embperl-<+ (pos min max)
- "Find [+ ... +], return range and `perl-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "[+" "+]" t 'perl-mode nil))
-
-(defun mumamo-chunk-embperl-<! (pos min max)
- "Find [! ... !], return range and `perl-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "[!" "!]" t 'perl-mode t))
-
-(defun mumamo-chunk-embperl-<$ (pos min max)
- "Find [$ ... $], return range and `perl-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; This is a bit tricky since [$var] etc must be avoided.
- (let* ((begin-mark "[$")
- (end-mark "$]")
- (good-chars '(32 ;space
- 10 ;line feed
- 9 ;tab
- ))
- ;; (search-bw-exc-start (lambda (pos min)
- ;; (let ((not-found t)
- ;; (next-char nil)
- ;; (exc-start (mumamo-chunk-start-bw-str
- ;; pos min begin-mark))
- ;; (here (point)))
- ;; (while (and not-found
- ;; exc-start)
- ;; (setq next-char (char-after (+ (point) 2)))
- ;; (if (memq next-char good-chars)
- ;; (setq not-found nil)
- ;; (setq exc-start
- ;; (search-backward begin-mark
- ;; min t))))
- ;; (when (and exc-start
- ;; (<= exc-start pos))
- ;; (cons exc-start 'perl-mode)))))
- ;; (search-bw-exc-end (lambda (pos min)
- ;; (mumamo-chunk-end-bw-str pos min end-mark)))
- ;; (search-fw-exc-start-old (lambda (pos max)
- ;; (let ((not-found t)
- ;; (next-char nil)
- ;; (exc-start (mumamo-chunk-start-fw-str
- ;; pos max begin-mark))
- ;; (here (point)))
- ;; (while (and not-found
- ;; exc-start)
- ;; (setq next-char (char-after))
- ;; (if (memq next-char good-chars)
- ;; (setq not-found nil)
- ;; (setq exc-start
- ;; (search-forward begin-mark
- ;; max t))))
- ;; exc-start)))
- (search-fw-exc-start (lambda (pos max)
- (let ((not-found t)
- (next-char nil)
- (exc-start (mumamo-chunk-start-fw-str
- pos max begin-mark))
- (here (point)))
- (while (and not-found
- exc-start)
- (setq next-char (char-after))
- (if (memq next-char good-chars)
- (setq not-found nil)
- (setq exc-start
- (search-forward begin-mark
- max t))))
- (list exc-start 'perl-mode))))
- (search-fw-exc-end (lambda (pos max)
- (save-match-data
- (mumamo-chunk-end-fw-str pos max end-mark))))
- )
- ;; (mumamo-find-possible-chunk pos min max
- ;; search-bw-exc-start
- ;; search-bw-exc-end
- ;; search-fw-exc-start-old
- ;; search-fw-exc-end)
- (mumamo-possible-chunk-forward pos max
- search-fw-exc-start
- search-fw-exc-end)
- ))
-
-;;;###autoload
-(define-mumamo-multi-major-mode embperl-html-mumamo-mode
- "Turn on multiple major modes for Embperl files with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("Embperl HTML Family" html-mode
- (mumamo-chunk-embperl-<-
- mumamo-chunk-embperl-<+
- mumamo-chunk-embperl-<!
- mumamo-chunk-embperl-<$
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; django
-
-(defun mumamo-chunk-django4(pos min max)
- "Find {% comment %}. Return range and `django-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{% comment %}" "{% endcomment %}" t 'mumamo-comment-mode t))
-
-(defun mumamo-chunk-django3(pos min max)
- "Find {# ... #}. Return range and `django-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{#" "#}" t 'mumamo-comment-mode t))
-
-(defun mumamo-chunk-django2(pos min max)
- "Find {{ ... }}. Return range and `django-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{{" "}}" t 'django-variable-mode t))
-
-(defun mumamo-chunk-django (pos min max)
- "Find {% ... %}. Return range and `django-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (let ((chunk (mumamo-quick-static-chunk pos min max "{%" "%}" t 'django-mode t)))
- (when chunk
- (setcdr (last chunk) '(mumamo-template-indentor))
- chunk)))
-
-;; (defun mumamo-search-bw-exc-start-django (pos min)
-;; "Helper for `mumamo-chunk-django'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str-inc pos min "{%")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'django-mode))))
-
-;; (defun mumamo-search-bw-exc-start-django2(pos min)
-;; "Helper for `mumamo-chunk-django2'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str-inc pos min "{{")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'django-mode))))
-
-;; (defun mumamo-search-bw-exc-start-django3(pos min)
-;; "Helper for `mumamo-chunk-django3'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str-inc pos min "{#")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'mumamo-comment-mode))))
-
-;; (defun mumamo-search-bw-exc-start-django4(pos min)
-;; "Helper for `mumamo-chunk-django4'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str-inc pos min
-;; "{% comment %}")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'mumamo-comment-mode))))
-
-;; (defun mumamo-search-bw-exc-end-django (pos min)
-;; "Helper for `mumamo-chunk-django'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str-inc pos min "%}"))
-
-;; (defun mumamo-search-bw-exc-end-django2(pos min)
-;; "Helper for `mumamo-chunk-django2'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str-inc pos min "}}"))
-
-;; (defun mumamo-search-bw-exc-end-django3(pos min)
-;; "Helper for `mumamo-chunk-django3'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str-inc pos min "#}"))
-
-;; (defun mumamo-search-bw-exc-end-django4(pos min)
-;; "Helper for `mumamo-chunk-django4'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str-inc pos min "{% endcomment %}"))
-
-(defun mumamo-search-fw-exc-start-django (pos max)
- "Helper for `mumamo-chunk-django'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-start-fw-str-inc pos max "{%"))
-
-(defun mumamo-search-fw-exc-start-django2(pos max)
- "Helper for `mumamo-chunk-django2'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-start-fw-str-inc pos max "{{"))
-
-(defun mumamo-search-fw-exc-start-django3(pos max)
- "Helper for `mumamo-chunk-django3'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-start-fw-str-inc pos max "{#"))
-
-(defun mumamo-search-fw-exc-start-django4(pos max)
- "Helper for `mumamo-chunk-django4'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-start-fw-str-inc pos max "{% comment %}"))
-
-(defun mumamo-search-fw-exc-end-django (pos max)
- "Helper for `mumamo-chunk-django'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-end-fw-str-inc pos max "%}"))
-
-(defun mumamo-search-fw-exc-end-django2(pos max)
- "Helper for `mumamo-chunk-django2'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-end-fw-str-inc pos max "}}"))
-
-(defun mumamo-search-fw-exc-end-django3(pos max)
- "Helper for `mumamo-chunk-django3'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-end-fw-str-inc pos max "#}"))
-
-(defun mumamo-search-fw-exc-end-django4(pos max)
- "Helper for `mumamo-chunk-django4'.
-POS is where to start search and MAX is where to stop."
- (mumamo-chunk-end-fw-str-inc pos max "{% endcomment %}"))
-
-;;;###autoload
-(define-mumamo-multi-major-mode django-html-mumamo-mode
- "Turn on multiple major modes for Django with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("Django HTML Family" html-mode
- (mumamo-chunk-django4
- mumamo-chunk-django
- mumamo-chunk-django2
- mumamo-chunk-django3
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Genshi / kid
-
-;; {% python ... %}
-(defun mumamo-chunk-genshi%(pos min max)
- "Find {% python ... %}. Return range and `genshi-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{% python" "%}" t 'python-mode t))
-
-;; ${expr}
-(defun mumamo-chunk-genshi$(pos min max)
- "Find ${ ... }, return range and `python-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (let ((chunk
- (mumamo-quick-static-chunk pos min max "${" "}" t 'python-mode t)))
- (when chunk
- ;; Test for clash with %}
- (let ((sub-mode (nth 2 chunk))
- (start (nth 0 chunk)))
- (if sub-mode
- chunk
- ;;(message "point.1=%s" (point))
- (when (and start
- (eq ?% (char-before start)))
- ;;(message "point.2=%s" (point))
- ;;(message "clash with %%}, chunk=%s" chunk)
- ;;(setq chunk nil)
- (setcar chunk (1- start))
- )
- ;;(message "chunk.return=%s" chunk)
- chunk)))))
-
-;; Fix-me: Because of the way chunks currently are searched for there
-;; is an error when a python chunk is used. This is because mumamo
-;; gets confused by the %} ending and the } ending. This can be
-;; solved by running a separate phase to get the chunks first and
-;; during that phase match start and end of the chunk.
-
-
-;; Note: You will currently get fontification errors if you use
-;; python chunks
-
-;; {% python ... %}
-
-;; The reason is that the chunk routines currently do not know when
-;; to just look for the } or %} endings. However this should not
-;; affect your editing normally.
-
-;;;###autoload
-(define-mumamo-multi-major-mode genshi-html-mumamo-mode
- "Turn on multiple major modes for Genshi with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("Genshi HTML Family" html-mode
- (
- ;;mumamo-chunk-genshi%
- mumamo-chunk-genshi$
- mumamo-chunk-py:=
- mumamo-chunk-py:match
- mumamo-chunk-xml-pi
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; MJT
-
-;; ${expr}
-(defun mumamo-chunk-mjt$(pos min max)
- "Find ${ ... }, return range and `javascript-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "${" "}" t 'javascript-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode mjt-html-mumamo-mode
- "Turn on multiple major modes for MJT with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("MJT HTML Family" html-mode
- (
- mumamo-chunk-mjt$
- mumamo-chunk-xml-pi
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; smarty
-
-(defun mumamo-chunk-smarty-literal (pos min max)
- "Find {literal} ... {/literal}. Return range and 'html-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{literal}" "{/literal}" t 'html-mode t))
-
-(defun mumamo-chunk-smarty-t (pos min max)
- "Find {t} ... {/t}. Return range and 'html-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{t}" "{/t}" t 'text-mode t))
-
-(defun mumamo-chunk-smarty-comment (pos min max)
- "Find {* ... *}. Return range and 'mumamo-comment-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{*" "*}" t 'mumamo-comment-mode nil))
-
-(defun mumamo-chunk-smarty (pos min max)
- "Find { ... }. Return range and 'smarty-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "{" "}" t 'smarty-mode nil))
-
-;;;###autoload
-(define-mumamo-multi-major-mode smarty-html-mumamo-mode
- "Turn on multiple major modes for Smarty with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("Smarty HTML Family" html-mode
- (mumamo-chunk-xml-pi
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- ;;mumamo-chunk-inlined-style
- ;;mumamo-chunk-inlined-script
- mumamo-chunk-smarty-literal
- mumamo-chunk-smarty-t
- mumamo-chunk-smarty-comment
- mumamo-chunk-smarty
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; ssjs - server side javascript
-
-;; http://www.sitepoint.com/blogs/2009/03/10/server-side-javascript-will-be-as-common-as-php/
-;;
-;; It looks like there are different syntaxes, both
-;;
-;; <script runat="server">...</script> and <% ... %>.
-
-(defun mumamo-chunk-ssjs-% (pos min max)
- "Find <% ... %>. Return range and 'javascript-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "<%" "%>" t 'javascript-mode t))
-
-(defconst mumamo-ssjs-tag-start-regex
- (rx "<script"
- space
- (0+ (not (any ">")))
- "runat"
- (0+ space)
- "="
- (0+ space)
- ?\"
- ;;(or "text" "application")
- ;;"/"
- ;;(or "javascript" "ecmascript")
- (or "server" "both" "server-proxy")
- ?\"
- (0+ (not (any ">")))
- ">"
- ;; FIX-ME: Commented out because of bug in Emacs
- ;;
- ;;(optional (0+ space) "<![CDATA[" )
- ))
-
-;; (defun mumamo-search-bw-exc-start-inlined-ssjs (pos min)
-;; "Helper for `mumamo-chunk-inlined-ssjs'.
-;; POS is where to start search and MIN is where to stop."
-;; (goto-char (+ pos 7))
-;; (let ((marker-start (when (< min (point)) (search-backward "<script" min t)))
-;; exc-mode
-;; exc-start)
-;; (when marker-start
-;; (when (looking-at mumamo-ssjs-tag-start-regex)
-;; (setq exc-start (match-end 0))
-;; (goto-char exc-start)
-;; (when (<= exc-start pos)
-;; ;;(cons (point) 'javascript-mode)
-;; (list (point) 'javascript-mode '(nxml-mode))
-;; )
-;; ))))
-
-;; (defun mumamo-search-fw-exc-start-inlined-ssjs-old (pos max)
-;; "Helper for `mumamo-chunk-inlined-ssjs'.
-;; POS is where to start search and MAX is where to stop."
-;; (goto-char (1+ pos))
-;; (skip-chars-backward "^<")
-;; ;; Handle <![CDATA[
-;; (when (and
-;; (eq ?< (char-before))
-;; (eq ?! (char-after))
-;; (not (bobp)))
-;; (backward-char)
-;; (skip-chars-backward "^<"))
-;; (unless (bobp)
-;; (backward-char 1))
-;; (let ((exc-start (search-forward "<script" max t))
-;; exc-mode)
-;; (when exc-start
-;; (goto-char (- exc-start 7))
-;; (when (looking-at mumamo-ssjs-tag-start-regex)
-;; (goto-char (match-end 0))
-;; (point)
-;; ))))
-
-(defun mumamo-search-fw-exc-start-inlined-ssjs (pos max)
- "Helper for `mumamo-chunk-inlined-ssjs'.
-POS is where to start search and MAX is where to stop."
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<script" max t))
- exc-mode)
- (when exc-start
- (goto-char (- exc-start 7))
- (when (looking-at mumamo-ssjs-tag-start-regex)
- (goto-char (match-end 0))
- (list (point) 'javascript-mode)
- ))))
-
-(defun mumamo-chunk-inlined-ssjs (pos min max)
- "Find <script runat=...>...</script>. Return range and 'javascript-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-inlined-ssjs
- ;; 'mumamo-search-bw-exc-end-inlined-script
- ;; 'mumamo-search-fw-exc-start-inlined-ssjs-old
- ;; 'mumamo-search-fw-exc-end-inlined-script)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-inlined-ssjs
- 'mumamo-search-fw-exc-end-inlined-script))
-
-;;;###autoload
-(define-mumamo-multi-major-mode ssjs-html-mumamo-mode
- "Turn on multiple major modes for SSJS with main mode `html-mode'.
-This covers inlined style and javascript."
- ("HTML Family" html-mode
- (mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-inlined-ssjs
- mumamo-chunk-ssjs-%
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(add-hook 'html-mumamo-mode-hook 'mumamo-define-html-file-wide-keys)
-(mumamo-inherit-sub-chunk-family 'ssjs-html-mumamo-mode)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; gsp
-
-(defun mumamo-chunk-gsp (pos min max)
- "Find <% ... %>. Return range and 'groovy-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "<%" "%>" t 'groovy-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode gsp-html-mumamo-mode
- "Turn on multiple major modes for GSP with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("GSP HTML Family" html-mode
- (mumamo-chunk-gsp
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; jsp - Java Server Pages
-
-(defun mumamo-chunk-jsp (pos min max)
- "Find <% ... %>. Return range and 'java-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "<%" "%>" t 'java-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode jsp-html-mumamo-mode
- "Turn on multiple major modes for JSP with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("JSP HTML Family" html-mode
- (mumamo-chunk-jsp
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; eruby
-
-;; Fix-me: Maybe take care of <%= and <%- and -%>, but first ask the
-;; ruby people if this is worth doing.
-;;
-;; See also http://wiki.rubyonrails.org/rails/pages/UnderstandingViews
-(defun mumamo-chunk-eruby (pos min max)
- "Find <% ... %>. Return range and 'ruby-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (let ((chunk (mumamo-quick-static-chunk pos min max "<%" "%>" t 'ruby-mode t)))
- (when chunk
- ;; Put indentation type on 'mumamo-next-indent on the chunk:
- ;; Fix-me: use this!
- (setcdr (last chunk) '(mumamo-template-indentor))
- chunk)))
-
-(defun mumamo-chunk-eruby-quoted (pos min max)
- "Find \"<%= ... %>\". Return range and 'ruby-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-
-This is a workaround for problems with strings."
- (let ((chunk (mumamo-quick-static-chunk pos min max "\"<%=" "%>\"" t 'ruby-mode t)))
- (when chunk
- ;; Put indentation type on 'mumamo-next-indent on the chunk:
- ;; Fix-me: use this!
- (setcdr (last chunk) '(mumamo-template-indentor))
- chunk)))
-
-(defun mumamo-chunk-eruby-comment (pos min max)
- "Find <%# ... %>. Return range and 'ruby-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-
-This is needed since otherwise the end marker is thought to be
-part of a comment."
- (mumamo-quick-static-chunk pos min max "<%#" "%>" t 'mumamo-comment-mode t))
-
-;; (defun mumamo-search-bw-exc-start-ruby (pos min)
-;; "Helper for `mumamo-chunk-ruby'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str pos min "<%")))
-;; (when (and exc-start
-;; (<= exc-start pos))
-;; (cons exc-start 'ruby-mode))))
-
-;;;###autoload
-(define-mumamo-multi-major-mode eruby-mumamo-mode
- "Turn on multiple major mode for eRuby with unspecified main mode.
-Current major-mode will be used as the main major mode."
- ("eRuby Family" nil
- (mumamo-chunk-eruby-comment
- mumamo-chunk-eruby
- )))
-
-;;;###autoload
-(define-mumamo-multi-major-mode eruby-html-mumamo-mode
- "Turn on multiple major modes for eRuby with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("eRuby Html Family" html-mode
- (
- mumamo-chunk-eruby-comment
- mumamo-chunk-eruby
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-;;;###autoload
-(define-mumamo-multi-major-mode eruby-javascript-mumamo-mode
- "Turn on multiple major modes for eRuby with main mode `javascript-mode'."
- ("eRuby Html Family" javascript-mode
- (
- mumamo-chunk-eruby-comment
- mumamo-chunk-eruby-quoted
- mumamo-chunk-eruby
- ;;mumamo-chunk-inlined-style
- ;;mumamo-chunk-inlined-script
- ;;mumamo-chunk-style=
- ;;mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; heredoc
-
-(defcustom mumamo-heredoc-modes
- '(
- ("HTML" html-mode)
- ("CSS" css-mode)
- ("JAVASCRIPT" javascript-mode)
- ("JAVA" java-mode)
- ("GROOVY" groovy-mode)
- ("SQL" sql-mode)
- )
- "Matches for heredoc modes.
-The entries in this list have the form
-
- (REGEXP MAJOR-MODE-SPEC)
-
-where REGEXP is a regular expression that should match the
-heredoc marker line and MAJOR-MODE-SPEC is the major mode spec to
-use in the heredoc part.
-
-The major mode spec is translated to a major mode using
-`mumamo-major-mode-from-modespec'."
- :type '(repeat
- (list
- regexp
- (function :tag "Major mode")))
- :group 'mumamo-modes)
-
-(defun mumamo-mode-for-heredoc (marker)
- "Return major mode associated with MARKER.
-Use first match in `mumamo-heredoc-modes'.
-If no match use `text-mode'."
- (let ((mode (catch 'mode
- (save-match-data
- (dolist (rec mumamo-heredoc-modes)
- (let ((regexp (nth 0 rec))
- (mode (nth 1 rec)))
- (when (string-match regexp marker)
- (throw 'mode mode))))))))
- (if mode
- (mumamo-major-mode-from-modespec mode)
- 'text-mode)))
-
-(defun mumamo-chunk-heredoc (pos min max lang)
- "This should work similar to `mumamo-find-possible-chunk'.
-POS, MIN and MAX have the same meaning as there.
-
-LANG is the programming language.
-Supported values are 'perl."
- ;; Fix-me: LANG
- ;; Fix-me: use mumamo-end-in-code
- (mumamo-condition-case err
- (let ((old-point (point)))
- (goto-char pos)
- (beginning-of-line)
- (let (next-<<
- (want-<< t)
- heredoc-mark
- end-mark-len
- heredoc-line
- delimiter
- skipped
- (skip-b "")
- start-inner
- end
- exc-mode
- fw-exc-fun
- border-fun
- allow-code-after
- start-outer
- ps
- )
- (goto-char pos)
- (beginning-of-line)
- (case lang
- ('sh
- (setq allow-code-after t)
- (while want-<<
- (setq next-<< (search-forward "<<" max t))
- (if (not next-<<)
- (setq want-<< nil) ;; give up
- ;; Check inside string or comment.
- (setq ps (parse-partial-sexp (line-beginning-position) (point)))
- (unless (or (nth 3 ps) (nth 4 ps))
- (setq want-<< nil))))
- (when next-<<
- (setq start-outer (- (point) 2))
- (when (= (char-after) ?-)
- (setq skip-b "\t*")
- (unless (eolp) (forward-char)))
- ;; fix-me: space
- (setq skipped (skip-chars-forward " \t"))
- (when (memq (char-after) '(?\" ?\'))
- (setq delimiter (list (char-after))))
- (if (and (> skipped 0) (not delimiter))
- (setq heredoc-mark "")
- (when (looking-at (rx-to-string
- `(and (regexp ,(if delimiter
- (concat delimiter "\\([^\n<>;]+\\)" delimiter)
- "\\([^ \t\n<>;]+\\)"))
- (or blank line-end))))
- (setq heredoc-mark (buffer-substring-no-properties
- (match-beginning 1)
- (match-end 1)))))
- (when heredoc-mark
- (setq heredoc-line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
- (setq start-inner (1+ (point-at-eol)))
- (setq end-mark-len (length heredoc-mark))
- )))
- ('w32-ps (error "No support for windows power shell yet"))
- ('php
- (while want-<<
- (setq next-<< (search-forward "<<<" max t))
- ;; Check inside string or comment.
- (if (not next-<<)
- (setq want-<< nil) ;; give up
- (setq ps (parse-partial-sexp (line-beginning-position) (- (point) 0)))
- (unless (or (nth 3 ps) (nth 4 ps))
- (setq want-<< nil))))
- (when next-<<
- (setq start-outer (- (point) 3))
- (skip-chars-forward " \t")
- (when (looking-at (concat "\\([^\n;]*\\)[[:blank:]]*\n"))
- (setq heredoc-mark (buffer-substring-no-properties
- (match-beginning 1)
- (match-end 1)))
- (setq heredoc-line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
- ;; fix-me: nowdoc
- (when (and (= ?\' (string-to-char heredoc-mark))
- (= ?\' (string-to-char (substring heredoc-mark (1- (length heredoc-mark))))))
- (setq heredoc-mark (substring heredoc-mark 1 (- (length heredoc-mark) 1))))
- (setq end-mark-len (1+ (length heredoc-mark)))
- (setq start-inner (match-end 0)))))
- ('perl
- (setq allow-code-after t)
- (while want-<<
- (setq next-<< (search-forward "<<" max t))
- (if (not next-<<)
- (setq want-<< nil) ;; give up
- ;; Check inside string or comment.
- (setq ps (parse-partial-sexp (line-beginning-position) (point)))
- (unless (or (nth 3 ps) (nth 4 ps))
- (setq want-<< nil))))
- (when next-<<
- (setq start-outer (- (point) 2))
- ;; fix-me: space
- (setq skipped (skip-chars-forward " \t"))
- (when (memq (char-after) '(?\" ?\'))
- (setq delimiter (list (char-after))))
- (if (and (> skipped 0) (not delimiter))
- (setq heredoc-mark "") ;; blank line
- (when (looking-at (rx-to-string
- `(and (regexp ,(if delimiter
- (concat delimiter "\\([^\n;]*\\)" delimiter)
- "\\([^ \t\n<>;]+\\)"))
- (or blank ";"))))
- (setq heredoc-mark (buffer-substring-no-properties
- (match-beginning 1)
- (match-end 1)))))
- (when heredoc-mark
- (setq heredoc-line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
- ;;(setq start-inner (1+ (match-end 0)))
- (setq start-inner (1+ (point-at-eol)))
- (setq end-mark-len (length heredoc-mark))
- )))
- ('python
- (unless (eobp) (forward-char))
- (while want-<<
- (setq next-<< (re-search-forward "\"\"\"\\|'''" max t))
- (setq start-outer (- (point) 3))
- (if (not next-<<)
- (setq want-<< nil) ;; give up
- ;; Check inside string or comment.
- (setq ps (parse-partial-sexp (line-beginning-position) (- (point) 3)))
- (unless (or (nth 3 ps) (nth 4 ps))
- (setq want-<< nil)))))
- ('ruby
- (while want-<<
- (setq next-<< (search-forward "<<" max t))
- (if (not next-<<)
- (setq want-<< nil) ;; give up
- ;; Check inside string or comment.
- (setq ps (parse-partial-sexp (line-beginning-position) (point)))
- (unless (or (nth 3 ps) (nth 4 ps))
- (setq want-<< nil))))
- (when next-<<
- (setq start-outer (- (point) 2))
- (when (= (char-after) ?-)
- (setq skip-b "[ \t]*")
- (forward-char))
- (when (looking-at (concat "[^\n[:blank:]]*"))
- (setq heredoc-mark (buffer-substring-no-properties
- (match-beginning 0)
- (match-end 0)))
- (setq end-mark-len (length heredoc-mark))
- (setq heredoc-line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
- (setq start-inner (match-end 0)))))
- (t (error "next-<< not implemented for lang %s" lang)))
- (when start-inner (assert (<= pos start-inner) t))
- (goto-char old-point)
- (when (or start-inner end)
- (let ((endmark-regexp
- (case lang
- ('sh (concat "^" skip-b heredoc-mark "$"))
- ('php (concat "^" heredoc-mark ";?$"))
- ('perl (concat "^" heredoc-mark "$"))
- ('python (concat "^" heredoc-mark "[[:space:]]*"))
- ('ruby (concat "^" skip-b heredoc-mark "$"))
- (t (error "mark-regexp not implemented for %s" lang)))))
- ;; Fix-me: rename start-inner <=> start-outer...
- (setq border-fun `(lambda (start end exc-mode)
- ;; Fix-me: use lengths...
- (list
- (if ,allow-code-after nil (+ start (- ,start-inner ,start-outer 1)))
- (when end (- end ,end-mark-len)))))
- (setq fw-exc-fun `(lambda (pos max)
- (save-match-data
- (let ((here (point)))
- (goto-char pos)
- (prog1
- (when (re-search-forward ,endmark-regexp max t)
- (- (point) 1 ,(length heredoc-mark))
- (- (point) 0)
- )
- (goto-char here)))))))
- (setq exc-mode (mumamo-mode-for-heredoc heredoc-line))
- (list start-inner end exc-mode nil nil fw-exc-fun nil)
- ;; Fix me: Add overriding for inner chunks (see
- ;; http://www.emacswiki.org/emacs/NxhtmlMode#toc13). Maybe
- ;; make fw-exc-fun a list (or a cons, since overriding is
- ;; probably all that I want to add)? And make the
- ;; corresponding chunk property a list too?
- ;;(list start-outer end exc-mode (list start-inner end) nil fw-exc-fun border-fun 'heredoc)
- (list (if allow-code-after start-inner start-outer)
- end exc-mode (list start-inner end) nil fw-exc-fun border-fun 'heredoc)
- )))
- (error (mumamo-display-error 'mumamo-chunk-heredoc
- "%s" (error-message-string err)))))
-
-
-;;;; Unix style sh heredoc
-
-(defun mumamo-chunk-sh-heredoc (pos min max)
- "Find sh here docs.
-See `mumamo-find-possible-chunk' for POS, MIN
-and MAX."
- (let ((r (mumamo-chunk-heredoc pos min max 'sh)))
- r))
-
-;;;###autoload
-(define-mumamo-multi-major-mode sh-heredoc-mumamo-mode
- "Turn on multiple major modes for sh heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes."
- ("SH HereDoc" sh-mode
- (mumamo-chunk-sh-heredoc
- )))
-(mumamo-inherit-sub-chunk-family 'sh-heredoc-mumamo-mode)
-
-
-;;;; PHP heredoc
-
-(defun mumamo-chunk-php-heredoc (pos min max)
- "Find PHP here docs.
-See `mumamo-find-possible-chunk' for POS, MIN
-and MAX."
- (let ((r (mumamo-chunk-heredoc pos min max 'php)))
- r))
-
-;;;###autoload
-(define-mumamo-multi-major-mode php-heredoc-mumamo-mode
- "Turn on multiple major modes for PHP heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes."
- ("PHP HereDoc" php-mode
- (mumamo-chunk-php-heredoc
- )))
-(mumamo-inherit-sub-chunk-family 'php-heredoc-mumamo-mode)
-(mumamo-inherit-sub-chunk-family-locally 'php-heredoc-mumamo-mode 'html-mumamo-mode)
-
-
-;;;; Perl heredoc
-
-(defun mumamo-chunk-perl-heredoc (pos min max)
- "Find perl here docs.
-See `mumamo-find-possible-chunk' for POS, MIN
-and MAX."
- (let ((r (mumamo-chunk-heredoc pos min max 'perl)))
- r))
-
-;;;###autoload
-(define-mumamo-multi-major-mode perl-heredoc-mumamo-mode
- "Turn on multiple major modes for Perl heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes."
- ("Perl HereDoc" perl-mode
- (mumamo-chunk-perl-heredoc
- )))
-(mumamo-inherit-sub-chunk-family 'perl-heredoc-mumamo-mode)
-
-;;;###autoload
-(define-mumamo-multi-major-mode cperl-heredoc-mumamo-mode
- "Turn on multiple major modes for Perl heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes."
- ("Perl HereDoc" cperl-mode
- (mumamo-chunk-perl-heredoc
- )))
-(mumamo-inherit-sub-chunk-family 'cperl-heredoc-mumamo-mode)
-
-
-;;;; Python heredoc
-
-(defun mumamo-chunk-python-heredoc (pos min max)
- "Find python here docs.
-See `mumamo-find-possible-chunk' for POS, MIN
-and MAX."
- (let ((r (mumamo-chunk-heredoc pos min max 'python)))
- r))
-
-;;;###autoload
-(define-mumamo-multi-major-mode python-heredoc-mumamo-mode
- "Turn on multiple major modes for Perl heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes."
- ("Python HereDoc" python-mode
- (mumamo-chunk-python-heredoc
- )))
-(mumamo-inherit-sub-chunk-family 'python-heredoc-mumamo-mode)
-
-
-;;;; Ruby heredoc
-
-(defun mumamo-chunk-ruby-heredoc (pos min max)
- "Find Ruby here docs.
-See `mumamo-find-possible-chunk' for POS, MIN
-and MAX."
- (let ((r (mumamo-chunk-heredoc pos min max 'ruby)))
- r))
-
-;;;###autoload
-(define-mumamo-multi-major-mode ruby-heredoc-mumamo-mode
- "Turn on multiple major modes for Ruby heredoc document.
-See `mumamo-heredoc-modes' for how to specify heredoc major modes."
- ("Ruby HereDoc" ruby-mode
- (mumamo-chunk-ruby-heredoc
- )))
-(mumamo-inherit-sub-chunk-family 'ruby-heredoc-mumamo-mode)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Tex meta
-
-;; (defun mumamo-search-bw-textext-start (pos min)
-;; "Helper for `mumamo-chunk-textext'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str pos min "textext(\""))
-;; (exc-mode 'plain-tex-mode))
-;; (when exc-start
-;; (when (<= exc-start pos)
-;; (cons exc-start exc-mode)))))
-
-(defconst mumamo-textext-end-regex
- (rx "textext("
- (0+
- (0+ (not (any "\"()")))
- ?\"
- (0+ (not (any "\"")))
- ?\"
- )
- (0+ (not (any "\"()")))
- ")"))
-
-(defun mumamo-textext-test-is-end (pos)
- "Helper for `mumamo-chunk-textext'.
-Return POS if POS is at the end of textext chunk."
- (when pos
- (let ((here (point))
- hit)
- (goto-char (+ 2 pos))
- (when (looking-back mumamo-textext-end-regex)
- (setq hit t))
- (goto-char here)
- (when hit pos))))
-
-;; (defun mumamo-search-bw-textext-end (pos min)
-;; "Helper for `mumamo-chunk-textext'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((end (mumamo-chunk-end-bw-str pos min "\")"))
-;; res)
-;; (while (and end
-;; (not (setq res (mumamo-textext-test-is-end end))))
-;; (setq end (mumamo-chunk-end-bw-str (1- end) min "\")")))
-;; res))
-
-;; (defun mumamo-search-fw-textext-start-old (pos max)
-;; "Helper for `mumamo-chunk-textext'.
-;; POS is where to start search and MAX is where to stop."
-;; (mumamo-chunk-start-fw-str pos max "textext(\""))
-
-(defun mumamo-search-fw-textext-start (pos max)
- "Helper for `mumamo-chunk-textext'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "textext(\"")))
- (when where
- (list where 'plain-tex-mode))))
-
-(defun mumamo-search-fw-textext-end (pos max)
- "Helper for `mumamo-chunk-textext'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (let ((end (mumamo-chunk-end-fw-str pos max "\")")))
- (mumamo-textext-test-is-end end))))
-
-(defun mumamo-chunk-textext (pos min max)
- "Find textext or TEX chunks. Return range and 'plain-tex-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-textext-start
- ;; 'mumamo-search-bw-textext-end
- ;; 'mumamo-search-fw-textext-start-old
- ;; 'mumamo-search-fw-textext-end)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-textext-start
- 'mumamo-search-fw-textext-end))
-
-;; (defun mumamo-search-bw-verbatimtex-start (pos min)
-;; "Helper for `mumamo-chunk-verbatimtextext'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str pos min "\nverbatimtex"))
-;; (exc-mode 'plain-tex-mode))
-;; (when exc-start
-;; (when (<= exc-start pos)
-;; (cons exc-start exc-mode)))))
-
-;; (defun mumamo-search-bw-verbatimtex-end (pos min)
-;; "Helper for `mumamo-chunk-verbatimtextext'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "\netex"))
-
-;; (defun mumamo-search-fw-verbatimtex-start-old (pos max)
-;; "Helper for `mumamo-chunk-verbatimtextext'.
-;; POS is where to start search and MAX is where to stop."
-;; (mumamo-chunk-start-fw-str pos max "\nverbatimtex"))
-
-(defun mumamo-search-fw-verbatimtex-start (pos max)
- "Helper for `mumamo-chunk-verbatimtextext'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "\nverbatimtex")))
- (when where
- (list where 'plain-tex-mode))))
-
-(defun mumamo-search-fw-verbatimtex-end (pos max)
- "Helper for `mumamo-chunk-verbatimtextext'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "\netex")))
-
-(defun mumamo-chunk-verbatimtex (pos min max)
- "Find verbatimtex - etex chunks. Return range and 'plain-tex-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-verbatimtex-start
- ;; 'mumamo-search-bw-verbatimtex-end
- ;; 'mumamo-search-fw-verbatimtex-start-old
- ;; 'mumamo-search-fw-verbatimtex-end)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-verbatimtex-start
- 'mumamo-search-fw-verbatimtex-end))
-
-;; (defun mumamo-search-bw-btex-start (pos min)
-;; "Helper for `mumamo-chunk-btex'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str pos min "\nverbatimtex"))
-;; (exc-mode 'plain-tex-mode))
-;; (when exc-start
-;; (when (<= exc-start pos)
-;; (cons exc-start exc-mode)))))
-
-;; (defun mumamo-search-bw-btex-end (pos min)
-;; "Helper for `mumamo-chunk-btex'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "\netex"))
-
-;; (defun mumamo-search-fw-btex-start-old (pos max)
-;; "Helper for `mumamo-chunk-btex'.
-;; POS is where to start search and MAX is where to stop."
-;; (mumamo-chunk-start-fw-str pos max "\nverbatimtex"))
-
-(defun mumamo-search-fw-btex-start (pos max)
- "Helper for `mumamo-chunk-btex'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "\nverbatimtex")))
- (when where
- (list where 'plain-tex-mode))))
-
-(defun mumamo-search-fw-btex-end (pos max)
- "Helper for `mumamo-chunk-btex'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "\netex")))
-
-(defun mumamo-chunk-btex (pos min max)
- "Find btex - etex chunks.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-btex-start
- ;; 'mumamo-search-bw-btex-end
- ;; 'mumamo-search-fw-btex-start-old
- ;; 'mumamo-search-fw-btex-end)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-btex-start
- 'mumamo-search-fw-btex-end))
-
-;;;###autoload
-(define-mumamo-multi-major-mode metapost-mumamo-mode
- "Turn on multiple major modes for MetaPost."
- ("MetaPost TeX Family" metapost-mode
- (mumamo-chunk-textext
- mumamo-chunk-verbatimtex
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; OpenLaszlo
-
-(defconst mumamo-lzx-method-tag-start-regex
- (rx "<method"
- (optional
- space
- (0+ (not (any ">"))))
- ">"
- ;; FIX-ME: Commented out because of bug in Emacs
- ;;
- ;;(optional (0+ space) "<![CDATA[" )
- ))
-
-(defun mumamo-search-bw-exc-start-inlined-lzx-method (pos min)
- "Helper for `mumamo-chunk-inlined-lzx-method'.
-POS is where to start search and MIN is where to stop."
- (goto-char (+ pos 7))
- (let ((marker-start (search-backward "<method" min t))
- exc-mode
- exc-start)
- (when marker-start
- (when (looking-at mumamo-lzx-method-tag-start-regex)
- (setq exc-start (match-end 0))
- (goto-char exc-start)
- (when (<= exc-start pos)
- (cons (point) 'javascript-mode))
- ))))
-
-;; (defun mumamo-search-bw-exc-end-inlined-lzx-method (pos min)
-;; "Helper for `mumamo-chunk-inlined-lzx-method'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "</method>"))
-
-;; (defun mumamo-search-fw-exc-start-inlined-lzx-method-old (pos max)
-;; "Helper for `mumamo-chunk-inlined-lzx-method'.
-;; POS is where to start search and MAX is where to stop."
-;; (goto-char (1+ pos))
-;; (skip-chars-backward "^<")
-;; ;; Handle <![CDATA[
-;; (when (and
-;; (eq ?< (char-before))
-;; (eq ?! (char-after))
-;; (not (bobp)))
-;; (backward-char)
-;; (skip-chars-backward "^<"))
-;; (unless (bobp)
-;; (backward-char 1))
-;; (let ((exc-start (search-forward "<method" max t))
-;; exc-mode)
-;; (when exc-start
-;; (goto-char (- exc-start 7))
-;; (when (looking-at mumamo-lzx-method-tag-start-regex)
-;; (goto-char (match-end 0))
-;; (point)
-;; ))))
-
-(defun mumamo-search-fw-exc-start-inlined-lzx-method (pos max)
- "Helper for `mumamo-chunk-inlined-lzx-method'.
-POS is where to start search and MAX is where to stop."
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<method" max t))
- exc-mode)
- (when exc-start
- (goto-char (- exc-start 7))
- (when (looking-at mumamo-lzx-method-tag-start-regex)
- (goto-char (match-end 0))
- (list (point) 'javascript-mode)
- ))))
-
-(defun mumamo-search-fw-exc-end-inlined-lzx-method (pos max)
- "Helper for `mumamo-chunk-inlined-lzx-method'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "</method>")))
-
-(defun mumamo-chunk-inlined-lzx-method (pos min max)
- "Find <method>...</method>. Return range and 'javascript-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-inlined-lzx-method
- ;; 'mumamo-search-bw-exc-end-inlined-lzx-method
- ;; 'mumamo-search-fw-exc-start-inlined-lzx-method-old
- ;; 'mumamo-search-fw-exc-end-inlined-lzx-method)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-inlined-lzx-method
- 'mumamo-search-fw-exc-end-inlined-lzx-method))
-
-(defconst mumamo-lzx-handler-tag-start-regex
- (rx "<handler"
- (optional
- space
- (0+ (not (any ">"))))
- ">"
- ;; FIX-ME: Commented out because of bug in Emacs
- ;;
- ;;(optional (0+ space) "<![CDATA[" )
- ))
-
-;; (defun mumamo-search-bw-exc-start-inlined-lzx-handler (pos min)
-;; "Helper for `mumamo-chunk-inlined-lzx-handler'.
-;; POS is where to start search and MIN is where to stop."
-;; (goto-char (+ pos 8))
-;; (let ((marker-start (search-backward "<handler" min t))
-;; exc-mode
-;; exc-start)
-;; (when marker-start
-;; (when (looking-at mumamo-lzx-handler-tag-start-regex)
-;; (setq exc-start (match-end 0))
-;; (goto-char exc-start)
-;; (when (<= exc-start pos)
-;; (cons (point) 'javascript-mode))
-;; ))))
-
-;; (defun mumamo-search-bw-exc-end-inlined-lzx-handler (pos min)
-;; "Helper for `mumamo-chunk-inlined-lzx-handler'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "</handler>"))
-
-;; (defun mumamo-search-fw-exc-start-inlined-lzx-handler-old (pos max)
-;; "Helper for `mumamo-chunk-inlined-lzx-handler'.
-;; POS is where to start search and MAX is where to stop."
-;; (goto-char (1+ pos))
-;; (skip-chars-backward "^<")
-;; ;; Handle <![CDATA[
-;; (when (and
-;; (eq ?< (char-before))
-;; (eq ?! (char-after))
-;; (not (bobp)))
-;; (backward-char)
-;; (skip-chars-backward "^<"))
-;; (unless (bobp)
-;; (backward-char 1))
-;; (let ((exc-start (search-forward "<handler" max t))
-;; exc-mode)
-;; (when exc-start
-;; (goto-char (- exc-start 8))
-;; (when (looking-at mumamo-lzx-handler-tag-start-regex)
-;; (goto-char (match-end 0))
-;; (point)
-;; ))))
-
-(defun mumamo-search-fw-exc-start-inlined-lzx-handler (pos max)
- "Helper for `mumamo-chunk-inlined-lzx-handler'.
-POS is where to start search and MAX is where to stop."
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<handler" max t))
- exc-mode)
- (when exc-start
- (goto-char (- exc-start 8))
- (when (looking-at mumamo-lzx-handler-tag-start-regex)
- (goto-char (match-end 0))
- (list (point) 'javascript-mode)
- ))))
-
-(defun mumamo-search-fw-exc-end-inlined-lzx-handler (pos max)
- "Helper for `mumamo-chunk-inlined-lzx-handler'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "</handler>")))
-
-(defun mumamo-chunk-inlined-lzx-handler (pos min max)
- "Find <handler>...</handler>. Return range and 'javascript-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-inlined-lzx-handler
- ;; 'mumamo-search-bw-exc-end-inlined-lzx-handler
- ;; 'mumamo-search-fw-exc-start-inlined-lzx-handler-old
- ;; 'mumamo-search-fw-exc-end-inlined-lzx-handler)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-inlined-lzx-handler
- 'mumamo-search-fw-exc-end-inlined-lzx-handler))
-
-
-;;;###autoload
-(define-mumamo-multi-major-mode laszlo-nxml-mumamo-mode
- "Turn on multiple major modes for OpenLaszlo."
- ("OpenLaszlo Family" nxml-mode
- (mumamo-chunk-inlined-script
- mumamo-chunk-inlined-lzx-method
- mumamo-chunk-inlined-lzx-handler
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; csound
-
-;; (defun mumamo-search-bw-exc-start-csound-orc (pos min)
-;; "Helper for `mumamo-chunk-csound-orc'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str pos min "<csinstruments>")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'csound-orc-mode))))
-
-;; (defun mumamo-search-bw-exc-end-csound-orc (pos min)
-;; "Helper for `mumamo-chunk-csound-orc'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "</csinstruments>"))
-
-;; (defun mumamo-search-fw-exc-start-csound-orc-old (pos max)
-;; "Helper for `mumamo-chunk-csound-orc'.
-;; POS is where to start search and MAX is where to stop."
-;; (mumamo-chunk-start-fw-str pos max "<csinstruments>"))
-
-(defun mumamo-search-fw-exc-start-csound-orc (pos max)
- "Helper for `mumamo-chunk-csound-orc'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "<csinstruments>")))
- (when where
- (list where 'csound-orc-mode))))
-
-(defun mumamo-search-fw-exc-end-csound-orc (pos max)
- "Helper for `mumamo-chunk-csound-orc'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "</csinstruments>")))
-
-(defun mumamo-chunk-csound-orc (pos min max)
- "Find <csinstruments>...</...>. Return range and 'csound-orc-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-csound-orc
- ;; 'mumamo-search-bw-exc-end-csound-orc
- ;; 'mumamo-search-fw-exc-start-csound-orc-old
- ;; 'mumamo-search-fw-exc-end-csound-orc)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-csound-orc
- 'mumamo-search-fw-exc-end-csound-orc))
-
-;; (defun mumamo-search-bw-exc-start-csound-sco (pos min)
-;; "Helper for `mumamo-chunk-csound-sco'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-str pos min "<csscore>")))
-;; (and exc-start
-;; (<= exc-start pos)
-;; (cons exc-start 'csound-sco-mode))))
-
-;; (defun mumamo-search-bw-exc-end-csound-sco (pos min)
-;; "Helper for `mumamo-chunk-csound-sco'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "</csscore>"))
-
-;; (defun mumamo-search-fw-exc-start-csound-sco-old (pos max)
-;; "Helper for `mumamo-chunk-csound-sco'.
-;; POS is where to start search and MAX is where to stop."
-;; (mumamo-chunk-start-fw-str pos max "<csscore>"))
-
-(defun mumamo-search-fw-exc-start-csound-sco (pos max)
- "Helper for `mumamo-chunk-csound-sco'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "<csscore>")))
- (when where
- (list where 'csound-sco-mode))))
-
-(defun mumamo-search-fw-exc-end-csound-sco (pos max)
- "Helper for `mumamo-chunk-csound-sco'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "</csscore>")))
-
-(defun mumamo-chunk-csound-sco (pos min max)
- "Found <csscore>...</csscore>. Return range and 'csound-sco-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-csound-sco
- ;; 'mumamo-search-bw-exc-end-csound-sco
- ;; 'mumamo-search-fw-exc-start-csound-sco-old
- ;; 'mumamo-search-fw-exc-end-csound-sco)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-csound-sco
- 'mumamo-search-fw-exc-end-csound-sco))
-
-;;;###autoload
-(define-mumamo-multi-major-mode csound-sgml-mumamo-mode
- "Turn on mutiple major modes for CSound orc/sco Modes."
- ("CSound orc/sco Modes" sgml-mode
- (mumamo-chunk-csound-sco
- mumamo-chunk-csound-orc
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; noweb
-
-;;;###autoload
-(defgroup mumamo-noweb2 nil
- "Customization group for `noweb2-mumamo-mode'."
- :group 'mumamo-modes)
-
-(defcustom mumamo-noweb2-mode-from-ext
- '(
- ("php" . php-mode)
- ("c" . c-mode)
- )
- "File extension regexp to major mode mapping.
-Used by `noweb2-mumamo-mode'."
- :type '(repeat
- (cons regexp major-mode-function))
- :group 'mumamo-noweb2)
-
-(defvar mumamo-noweb2-found-mode-from-ext nil
- "Major modes determined from file names. Internal use.")
-
-(defun mumamo-noweb2-chunk-start-fw (pos max)
- "Helper for `mumamo-noweb2-chunk'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-re pos max "^<<\\(.*?\\)>>="))
- (exc-mode 'text-mode))
- (when where
- (let* ((file-name (match-string-no-properties 1))
- (file-ext (when file-name (file-name-extension file-name))))
- (when file-ext
- (setq exc-mode (catch 'major
- (dolist (rec mumamo-noweb2-mode-from-ext)
- (when (string-match (car rec) file-ext)
- (throw 'major (cdr rec))))
- nil))))
- (list where exc-mode))))
-
-;; (defun mumamo-noweb2-chunk-start-bw (pos min)
-;; "Helper for `mumamo-noweb2-chunk'.
-;; POS is where to start search and MIN is where to stop."
-;; (let ((exc-start (mumamo-chunk-start-bw-re pos min "^<<\\(.*?\\)>>="))
-;; (exc-mode 'text-mode))
-;; (when exc-start
-;; (let* ((file-name (match-string 1))
-;; (file-ext (when file-name (file-name-extension file-name))))
-;; (when file-ext
-;; (setq exc-mode (catch 'major
-;; (dolist (rec mumamo-noweb2-mode-from-ext)
-;; (when (string-match (car rec) file-ext)
-;; (throw 'major (cdr rec))))
-;; nil))
-;; (unless exc-mode
-;; (setq exc-mode
-;; (cdr (assoc file-ext mumamo-noweb2-found-mode-from-ext)))
-;; (unless exc-mode
-;; ;; Get the major mode from file name
-;; (with-temp-buffer
-;; (setq buffer-file-name file-name)
-;; (condition-case err
-;; (normal-mode)
-;; (error (message "error (normal-mode): %s"
-;; (error-message-string err))))
-;; (setq exc-mode (or major-mode
-;; 'text-mode))
-;; (add-to-list 'mumamo-noweb2-found-mode-from-ext
-;; (cons file-ext exc-mode)))
-;; ))))
-;; (cons exc-start exc-mode))))
-
-(defun mumamo-noweb2-chunk-end-fw (pos max)
- "Helper for `mumamo-noweb2-chunk'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-re pos max "^@")))
-
-;; (defun mumamo-noweb2-chunk-end-bw (pos min)
-;; "Helper for `mumamo-noweb2-chunk'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-re pos min "^@"))
-
-(defun mumamo-noweb2-code-chunk (pos min max)
- "Find noweb chunks. Return range and found mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (save-match-data
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-noweb2-chunk-start-bw
- ;; 'mumamo-noweb2-chunk-end-bw
- ;; 'mumamo-noweb2-chunk-start-fw-old
- ;; 'mumamo-noweb2-chunk-end-fw)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-noweb2-chunk-start-fw
- 'mumamo-noweb2-chunk-end-fw)))
-
-
-;;;###autoload
-(define-mumamo-multi-major-mode noweb2-mumamo-mode
- "Multi major mode for noweb files."
- ("noweb Family" latex-mode
- (mumamo-noweb2-code-chunk)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Template-Toolkit
-
-
-
-;; (setq auto-mode-alist
-;; (append '(("\\.tt2?$" . tt-mode)) auto-mode-alist ))
-
-;;(require 'tt-mode)
-(defun mumamo-chunk-tt (pos min max)
- "Find [% ... %], return range and `tt-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-
-This is for Template Toolkit.
-See URL `http://dave.org.uk/emacs/' for `tt-mode'."
- (mumamo-quick-static-chunk pos min max "[%" "%]" t 'tt-mode nil))
-
-(define-mumamo-multi-major-mode tt-html-mumamo-mode
- "Turn on multiple major modes for TT files with main mode `nxhtml-mode'.
-TT = Template-Toolkit.
-
-This also covers inlined style and javascript."
- ("TT HTML Family" html-mode
- (mumamo-chunk-tt
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Asp
-
-;;;; asp <%@language="javscript"%>
-
-(defvar mumamo-asp-default-major 'asp-js-mode)
-(make-variable-buffer-local 'mumamo-asp-default-major)
-(put 'mumamo-asp-default-major 'permanent-local t)
-
-(defconst mumamo-asp-lang-marker
- (rx "<%@"
- (0+ space)
- "language"
- (0+ space)
- "="
- (0+ space)
- "\""
- (submatch (1+ (not (any "\""))))
- "\""
- (0+ space)))
-
-(defun mumamo-search-fw-exc-start-jsp (pos min max)
- ;; fix-me
- )
-(defun mumamo-chunk-asp (pos min max)
- "Find <% ... %>. Return range and 'asp-js-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; Fix-me: this is broken!
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-exc-start-asp
- ;; 'mumamo-search-bw-exc-end-jsp
- ;; 'mumamo-search-fw-exc-start-jsp-old
- ;; 'mumamo-search-fw-exc-end-jsp)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-exc-start-asp
- 'mumamo-search-fw-exc-end-jsp))
-
-
-;;;; asp <% ...>
-
-(defun mumamo-chunk-asp% (pos min max)
- "Find <% ... %>. Return range and 'asp-js-mode or 'asp-vb-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (let* ((chunk (mumamo-quick-static-chunk pos min max "<%" "%>" t 'java-mode t))
- (beg (nth 0 chunk))
- (here (point))
- glang)
- (when chunk
- (goto-char beg)
- (if (looking-at mumamo-asp-lang-marker)
- (progn
- (setq glang (downcase (match-string 1)))
- (cond
- ((string= glang "javascript")
- (setq mumamo-asp-default-major 'asp-js-mode))
- ((string= glang "vbscript")
- (setq mumamo-asp-default-major 'asp-vb-mode))
- )
- (setcar (nthcdr 2 chunk) 'mumamo-comment-mode))
- (setcar (nthcdr 2 chunk) mumamo-asp-default-major))
- chunk)))
-
-;;;; asp <script ...>
-
-(defconst mumamo-asp-script-tag-start-regex
- (rx "<script"
- space
- (0+ (not (any ">")))
- "language"
- (0+ space)
- "="
- (0+ space)
- ?\"
- ;;(or "text" "application")
- ;;"/"
- ;;(or "javascript" "ecmascript")
- ;; "text/javascript"
- (submatch
- (or "javascript" "vbscript"))
- ?\"
- (0+ (not (any ">")))
- ">"
- ;; FIX-ME: Commented out because of bug in Emacs
- ;;
- ;;(optional (0+ space) "<![CDATA[" )
- ))
-
-;; (defun mumamo-asp-search-bw-exc-start-inlined-script (pos min)
-;; "Helper function for `mumamo-asp-chunk-inlined-script'.
-;; POS is where to start search and MIN is where to stop."
-;; (goto-char (+ pos 7))
-;; (let ((marker-start (search-backward "<script" min t))
-;; (exc-mode 'asp-vb-mode)
-;; exc-start
-;; lang)
-;; (when marker-start
-;; (when (looking-at mumamo-asp-script-tag-start-regex)
-;; (setq lang (downcase (match-string-no-properties 1)))
-;; (cond
-;; ((string= lang "javascript")
-;; (setq exc-mode 'asp-js-mode))
-;; ((string= lang "vbscript")
-;; (setq exc-mode 'asp-vb-mode))))
-;; (setq exc-start (match-end 0))
-;; (goto-char exc-start)
-;; (when (<= exc-start pos)
-;; (cons (point) exc-mode))
-;; )))
-
-;; (defun mumamo-asp-search-fw-exc-start-inlined-script-old (pos max)
-;; "Helper for `mumamo-chunk-inlined-script'.
-;; POS is where to start search and MAX is where to stop."
-;; (goto-char (1+ pos))
-;; (skip-chars-backward "^<")
-;; ;; Handle <![CDATA[
-;; (when (and
-;; (eq ?< (char-before))
-;; (eq ?! (char-after))
-;; (not (bobp)))
-;; (backward-char)
-;; (skip-chars-backward "^<"))
-;; (unless (bobp)
-;; (backward-char 1))
-;; (let ((exc-start (search-forward "<script" max t))
-;; exc-mode)
-;; (when exc-start
-;; (goto-char (- exc-start 7))
-;; (when (looking-at mumamo-asp-script-tag-start-regex)
-;; (goto-char (match-end 0))
-;; (point)
-;; ))))
-
-(defun mumamo-asp-search-fw-exc-start-inlined-script (pos max)
- "Helper for `mumamo-chunk-inlined-script'.
-POS is where to start search and MAX is where to stop."
- (goto-char (1+ pos))
- (skip-chars-backward "^<")
- ;; Handle <![CDATA[
- (when (and
- (eq ?< (char-before))
- (eq ?! (char-after))
- (not (bobp)))
- (backward-char)
- (skip-chars-backward "^<"))
- (unless (bobp)
- (backward-char 1))
- (let ((exc-start (search-forward "<script" max t))
- (exc-mode 'asp-vb-mode)
- (lang "vbscript"))
- (when exc-start
- (goto-char (- exc-start 7))
- (when (looking-at mumamo-asp-script-tag-start-regex)
- (goto-char (match-end 0))
- (setq lang (downcase (match-string-no-properties 1)))
- (cond
- ((string= lang "javascript")
- (setq exc-mode 'asp-js-mode))
- ((string= lang "vbscript")
- (setq exc-mode 'asp-vb-mode)))
- (list (point) exc-mode)
- ))))
-
-(defun mumamo-asp-chunk-inlined-script (pos min max)
- "Find <script language=... runat=...>...</script>. Return 'asp-js-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-asp-search-bw-exc-start-inlined-script
- ;; 'mumamo-search-bw-exc-end-inlined-script
- ;; 'mumamo-asp-search-fw-exc-start-inlined-script-old
- ;; 'mumamo-search-fw-exc-end-inlined-script)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-asp-search-fw-exc-start-inlined-script
- 'mumamo-search-fw-exc-end-inlined-script))
-
-;;;###autoload
-(define-mumamo-multi-major-mode asp-html-mumamo-mode
- "Turn on multiple major modes for ASP with main mode `html-mode'.
-This also covers inlined style and javascript."
- ("ASP Html Family" html-mode
- (mumamo-chunk-asp%
- mumamo-asp-chunk-inlined-script
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Org-mode
-
-(defcustom mumamo-org-submodes
- '(
- (emacs-lisp emacs-lisp-mode)
- (ruby ruby-mode)
- (python python-mode)
- (sh sh-mode)
- (R R-mode)
- (ditaa picture-mode)
- )
- "Alist for conversion of org #+BEGIN_SRC specifier to major mode.
-Works kind of like `mumamo-major-modes'.
-
-This may be used for example for org-babel \(see URL
-`http://orgmode.org/worg/org-contrib/babel/')."
- :type '(alist
- :key-type (symbol :tag "Symbol in #BEGIN_SRC specifier")
- :value-type (repeat (choice
- (command :tag "Major mode")
- (symbol :tag "Major mode (not yet loaded)")))
- )
- :group 'mumamo-modes)
-
-(defun mumamo-org-mode-from-spec (major-spec)
- "Translate MAJOR-SPEC to a major mode.
-Translate MAJOR-SPEC used in #BEGIN_SRC to a major mode.
-
-See `mumamo-org-submodes' for an explanation."
- (mumamo-major-mode-from-spec major-spec mumamo-org-submodes))
-
-(defun mumamo-chunk-org-html (pos min max)
- "Find #+BEGIN_HTML ... #+END_HTML, return range and `html-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "#+BEGIN_HTML" "#+END_HTML" nil 'html-mode nil))
-
-;; (defun mumamo-search-bw-org-src-start (pos min)
-;; "Helper for `mumamo-chunk-org-src'.
-;; POS is where to start search and MIN is where to stop."
-;; (let* ((exc-start (mumamo-chunk-start-bw-str pos min "#+BEGIN_SRC"))
-;; (exc-mode (when exc-start
-;; (let ((here (point)))
-;; (goto-char exc-start)
-;; (prog1
-;; (read (current-buffer))
-;; (goto-char here))))))
-;; (setq exc-mode (mumamo-org-mode-from-spec exc-mode))
-;; ;;(setq exc-mode (eval exc-mode))
-;; ;;(setq exc-mode 'text-mode)
-;; ;;(when exc-mode (setq exc-mode (quote exc-mode)))
-;; ;;(assert (eq exc-mode 'emacs-lisp-mode) t)
-;; (when exc-start
-;; (when (<= exc-start pos)
-;; (cons exc-start exc-mode)))))
-
-;; (defun mumamo-search-bw-org-src-end (pos min)
-;; "Helper for `mumamo-chunk-org-src'.
-;; POS is where to start search and MIN is where to stop."
-;; (mumamo-chunk-end-bw-str pos min "#+END_SRC"))
-
-;; (defun mumamo-search-fw-org-src-start-old (pos max)
-;; "Helper for `mumamo-chunk-org-src'.
-;; POS is where to start search and MAX is where to stop."
-;; (mumamo-chunk-start-fw-str pos max "#+BEGIN_SRC"))
-
-(defun mumamo-search-fw-org-src-start (pos max)
- "Helper for `mumamo-chunk-org-src'.
-POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "#+BEGIN_SRC")))
- (when where
- (let ((exc-mode (let ((here (point)))
- (goto-char where)
- (prog1
- (read (current-buffer))
- (goto-char here)))))
- (setq exc-mode (mumamo-org-mode-from-spec exc-mode))
- (list where exc-mode)))))
-
-(defun mumamo-search-fw-org-src-end (pos max)
- "Helper for `mumamo-chunk-org-src'.
-POS is where to start search and MAX is where to stop."
- (save-match-data
- (mumamo-chunk-end-fw-str pos max "#+END_SRC")))
-
-(defun mumamo-chunk-org-src (pos min max)
- "Find #+BEGIN_SRC ... #+END_SRC, return range and choosen major mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-
-See Info node `(org) Literal Examples' for how to specify major
-mode."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-search-bw-org-src-start
- ;; 'mumamo-search-bw-org-src-end
- ;; 'mumamo-search-fw-org-src-start-old
- ;; 'mumamo-search-fw-org-src-end)
- (mumamo-possible-chunk-forward pos max
- 'mumamo-search-fw-org-src-start
- 'mumamo-search-fw-org-src-end))
-
-;;;###autoload
-(define-mumamo-multi-major-mode org-mumamo-mode
- "Turn on multiple major modes for `org-mode' files with main mode `org-mode'.
-** Note about HTML subchunks:
-Unfortunately this only allows `html-mode' (not `nxhtml-mode') in
-sub chunks."
- ("Org Mode + Html" org-mode
- (mumamo-chunk-org-html
- mumamo-chunk-org-src
- )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Mako
-
-;; See http://www.makotemplates.org/docs/syntax.html
-
-;;; Comments mode
-;; Fix-me: move to mumamo.el
-(defconst mumamo-comment-font-lock-keywords
- (list
- (cons "\\(.*\\)" (list 1 font-lock-comment-face))
- ))
-(defvar mumamo-comment-font-lock-defaults
- '(mumamo-comment-font-lock-keywords t t))
-
-(define-derived-mode mumamo-comment-mode nil "Comment chunk"
- "For comment blocks."
- (set (make-local-variable 'font-lock-defaults) mumamo-comment-font-lock-defaults))
-
-
-
-(defun mumamo-chunk-mako-<% (pos min max)
- "Find <% ... %> and <%! ... %>. Return range and `python-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;; (mumamo-find-possible-chunk pos min max
- ;; 'mumamo-mako-<%-bw-start
- ;; 'mumamo-mako-<%-bw-end
- ;; 'mumamo-mako-<%-fw-start-old
- ;; 'mumamo-mako-<%-fw-end
- ;; 'mumamo-mako-<%-find-borders)
- (let ((chunk (mumamo-possible-chunk-forward pos max
- 'mumamo-mako-<%-fw-start
- 'mumamo-mako-<%-fw-end
- 'mumamo-mako-<%-find-borders
- )))
- (when chunk
- (setcdr (last chunk) '(mumamo-template-indentor))
- chunk)))
-
-(defun mumamo-mako-<%-find-borders (start end exc-mode)
- (when exc-mode
- (list
- (when start
- (+ start
- (if (eq ?! (char-after (+ start 2)))
- 3
- 2)))
- (when end (- end 2))
- exc-mode)))
-
-;; (defun mumamo-mako-<%-bw-start (pos min)
-;; (let ((here (point))
-;; start
-;; ret
-;; )
-;; (goto-char (+ pos 3))
-;; (setq start (re-search-backward "<%!?\\(?:[ \t]\\|$\\)" min t))
-;; (when (and start (<= start pos))
-;; (setq ret (list start 'python-mode)))
-;; (goto-char here)
-;; ret))
-
-;; (defun mumamo-mako-<%-bw-end (pos min)
-;; (mumamo-chunk-end-bw-str-inc pos min "%>")) ;; ok
-
-;; (defun mumamo-mako-<%-fw-start-old (pos max)
-;; (let ((here (point))
-;; start
-;; ret)
-;; (goto-char pos)
-;; (setq start
-;; (re-search-forward "<%!?\\(?:[ \t]\\|$\\)" max t))
-;; (when start
-;; (setq ret (match-beginning 0)))
-;; (goto-char here)
-;; ret))
-
-(defun mumamo-mako-<%-fw-start (pos max)
- (let ((here (point))
- start
- ret)
- (goto-char pos)
- (setq start
- (re-search-forward "<%!?\\(?:[ \t]\\|$\\)" max t))
- (when start
- (setq ret (match-beginning 0)))
- (goto-char here)
- (when ret
- (list ret 'python-mode))))
-
-(defun mumamo-mako-<%-fw-end (pos max)
- (save-match-data
- (mumamo-chunk-end-fw-str-inc pos max "%>"))) ;; ok
-
-
-
-(defun mumamo-chunk-mako-% (pos min max)
- "Find % python EOL. Return range and `python-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (let ((chunk (mumamo-whole-line-chunk pos min max "%" 'python-mode)))
- (when chunk
- (setcdr (last chunk) '(mumamo-template-indentor))
- chunk)))
-
-(defun mumamo-chunk-mako-one-line-comment (pos min max)
- "Find ## comment EOL. Return range and `python-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-whole-line-chunk pos min max "##" 'mumamo-comment-mode))
-
-;; Fix-me: Move this to mumamo.el
-;; Fix-me: does not work with new chunk div
-(defun mumamo-whole-line-chunk-fw-exc-end-fun (pos max)
- (let ((here (point)))
- (goto-char pos)
- (prog1
- (line-end-position)
- (goto-char here))))
-
-(defun mumamo-whole-line-chunk (pos min max marker mode)
- (let* ((here (point))
- (len-marker (length marker))
- (pattern (rx-to-string `(and bol (0+ blank) ,marker blank) t))
- (whole-line-chunk-borders-fun
- `(lambda (start end dummy)
- (let ((start-border (+ start ,len-marker)))
- (list start-border nil))))
- beg
- end
- ret)
- (goto-char pos)
- (setq beg (re-search-forward pattern max t))
- (when beg
- (setq beg (- beg len-marker 1))
- (setq end (line-end-position))
- (setq ret (list beg
- end
- mode
- (let ((start-border (+ beg len-marker)))
- (list start-border nil))
- nil
- 'mumamo-whole-line-chunk-fw-exc-end-fun
- whole-line-chunk-borders-fun
- )))
- (goto-char here)
- ret))
-
-;; (defun mumamo-single-regexp-chunk (pos min max begin-mark end-mark mode)
-;; "Not ready yet. `mumamo-quick-static-chunk'"
-;; (let ((here (point))
-;; (len-marker (length marker))
-;; beg
-;; end
-;; ret)
-;; (goto-char pos)
-;; (setq beg (line-beginning-position))
-;; (setq end (line-end-position))
-;; (unless (or (when min (< beg min))
-;; (when max (> end max))
-;; (= pos end))
-;; (goto-char beg)
-;; (skip-chars-forward " \t")
-;; (when (and
-;; (string= marker (buffer-substring-no-properties (point) (+ (point) len-marker)))
-;; (memq (char-after (+ (point) len-marker))
-;; '(?\ ?\t ?\n))
-;; (>= pos (point)))
-;; (setq ret
-;; (list (point)
-;; end
-;; mode
-;; (let ((start-border (+ (point) len-marker)))
-;; (list start-border nil))))))
-;; (unless ret
-;; (let ((range-regexp
-;; (concat "^[ \t]*"
-;; "\\("
-;; (regexp-quote marker)
-;; "[ \t\n].*\\)$")))
-;; ;; Backward
-;; (goto-char pos)
-;; (unless (= pos (line-end-position))
-;; (goto-char (line-beginning-position)))
-;; (setq beg (re-search-backward range-regexp min t))
-;; (when beg (setq beg (match-end 1)))
-;; ;; Forward, take care of indentation part
-;; (goto-char pos)
-;; (unless (= pos (line-end-position))
-;; (goto-char (line-beginning-position)))
-;; (setq end (re-search-forward range-regexp max t))
-;; (when end (setq end (match-beginning 1))))
-;; (setq ret (list beg end)))
-;; (goto-char here)
-;; ;;(setq ret nil)
-;; ret))
-
-
-(defun mumamo-chunk-mako-<%doc (pos min max)
- (mumamo-quick-static-chunk pos min max "<%doc>" "</%doc>" t 'mumamo-comment-mode t))
-
-(defun mumamo-chunk-mako-<%include (pos min max)
- (mumamo-quick-static-chunk pos min max "<%include" "/>" t 'html-mode t))
-
-(defun mumamo-chunk-mako-<%inherit (pos min max)
- (mumamo-quick-static-chunk pos min max "<%inherit" "/>" t 'html-mode t))
-
-(defun mumamo-chunk-mako-<%namespace (pos min max)
- (mumamo-quick-static-chunk pos min max "<%namespace" "/>" t 'html-mode t))
-
-(defun mumamo-chunk-mako-<%page (pos min max)
- (mumamo-quick-static-chunk pos min max "<%page" "/>" t 'html-mode t))
-
-;; Fix-me: this is not correct
-(defun mumamo-chunk-mako-<%def (pos min max)
- (mumamo-quick-static-chunk pos min max "<%def" "</%def>" t 'html-mode t))
-
-(defun mumamo-chunk-mako$(pos min max)
- "Find ${ ... }, return range and `python-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (mumamo-quick-static-chunk pos min max "${" "}" t 'python-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode mako-html-mumamo-mode
- "Turn on multiple major modes for Mako with main mode `html-mode'.
-This also covers inlined style and javascript."
-;; Fix-me: test case
-;;
-;; Fix-me: Add chunks for the tags, but make sure these are made
-;; invisible to nxml-mode parser.
-;;
-;; Fix-me: Maybe finally add that indentation support for one-line chunks?
- ("Mako HTML Family" html-mode
- (
- mumamo-chunk-mako-one-line-comment
- mumamo-chunk-mako-<%doc
- mumamo-chunk-mako-<%include
- mumamo-chunk-mako-<%inherit
- mumamo-chunk-mako-<%namespace
- mumamo-chunk-mako-<%page
-
- mumamo-chunk-mako-<%def
- ;;mumamo-chunk-mako-<%namesp:name
- ;;mumamo-chunk-mako-<%call
- ;;mumamo-chunk-mako-<%text
-
- mumamo-chunk-mako-<%
- mumamo-chunk-mako-%
- mumamo-chunk-mako$
-
- mumamo-chunk-xml-pi
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- mumamo-chunk-style=
- mumamo-chunk-onjs=
- )))
-(mumamo-inherit-sub-chunk-family-locally 'mako-html-mumamo-mode 'mako-html-mumamo-mode)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; XSL
-
-;;;###autoload
-(define-mumamo-multi-major-mode xsl-nxml-mumamo-mode
- "Turn on multi major mode for XSL with main mode `nxml-mode'.
-This covers inlined style and javascript."
- ("XSL nXtml Family" nxml-mode
- (
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- )))
-
-;;;###autoload
-(define-mumamo-multi-major-mode xsl-sgml-mumamo-mode
- "Turn on multi major mode for XSL with main mode `sgml-mode'.
-This covers inlined style and javascript."
- ("XSL SGML Family" sgml-mode
- (
- mumamo-chunk-inlined-style
- mumamo-chunk-inlined-script
- )))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Markdown
-
-(defun mumamo-chunk-markdown-html-1 (pos min max)
- (save-restriction
- (goto-char pos)
- (narrow-to-region (or min (point)) (or max (point-max)))
- (save-match-data
- (let ((here (point)))
- (when (re-search-forward (rx (* space)
- (submatch "<")
- (* (any "a-z"))
- (or ">" (any " \t\n")))
- nil t)
- (let ((beg (match-beginning 1))
- (end))
- (goto-char beg)
- (condition-case err
- (progn
- (while (not (sgml-skip-tag-forward 1)))
- (setq end (point)))
- (error (message "mumamo-chunk-markdown-html-1: %s" err)))
- (goto-char here)
- (when (and beg end)
- (cons beg end))))))))
-
-(defun mumamo-chunk-markdown-html-fw-exc-fun (pos max)
- (let ((beg-end (mumamo-chunk-markdown-html-1 pos nil max)))
- (cdr beg-end)))
-
-(defun mumamo-chunk-markdown-html (pos min max)
- "Find a chunk of html code in `markdown-mode'.
-Return range and `html-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- (let ((beg-end (mumamo-chunk-markdown-html-1 pos nil max)))
- (when beg-end
- (let ((beg (car beg-end))
- (end (cdr beg-end)))
- (list beg end 'html-mode
- nil ;; borders
- nil ;; parseable y
- 'mumamo-chunk-markdown-html-fw-exc-fun
- nil ;; find-borders fun
- )))))
-
-;;;###autoload
-(define-mumamo-multi-major-mode markdown-html-mumamo-mode
- "Turn on multi major markdown mode in buffer.
-Main major mode will be `markdown-mode'.
-Inlined html will be in `html-mode'.
-
-You need `markdown-mode' which you can download from URL
-`http://jblevins.org/projects/markdown-mode/'."
- ("Markdown HTML Family" markdown-mode
- (
- mumamo-chunk-markdown-html
- )))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Latex related
-
-(defun mumamo-latex-closure-chunk (pos min max)
- (mumamo-quick-static-chunk pos min max "\\begin{clojure}" "\\end{clojure}" t 'clojure-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode latex-clojure-mumamo-mode
- "Turn on multi major mode latex+clojure.
-Main major mode will be `latex-mode'.
-Subchunks will be in `clojure-mode'.
-
-You will need `clojure-mode' which you can download from URL
-`http://github.com/jochu/clojure-mode/tree'."
- ("Latex+clojur Family" latex-mode
- (
- mumamo-latex-closure-chunk
- )))
-
-(add-to-list 'auto-mode-alist '("\\.lclj\\'" . latex-clojure-mumamo-mode))
-
-
-(defun mumamo-latex-haskell-chunk (pos min max)
- (mumamo-quick-static-chunk pos min max "\\begin{code}" "\\end{code}" t 'haskell-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode latex-haskell-mumamo-mode
- "Turn on multi major mode latex+haskell.
-Main major mode will be `latex-mode'.
-Subchunks will be in `haskell-mode'.
-
-You will need `haskell-mode' which you can download from URL
-`http://projects.haskell.org/haskellmode-emacs/'."
- ("Latex+haskell Family" latex-mode
- (
- mumamo-latex-haskell-chunk
- )))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Python + ReST
-
-;; From Martin Soto
-
-(defun python-rst-long-string-chunk (pos min max)
- "Find Python long strings. Return range and 'mumamo-comment-mode.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX."
- ;;(mumamo-quick-static-chunk pos min max "\"\"\"((" "))\"\"\"" nil 'rst-mode nil))
- (mumamo-quick-static-chunk pos min max "\"\"\"" "\"\"\"" t 'rst-mode t))
-
-;;;###autoload
-(define-mumamo-multi-major-mode python-rst-mumamo-mode
- "Turn on multiple major modes for Python with RestructuredText docstrings."
- ("Python ReST Family" python-mode
- (
- python-rst-long-string-chunk
- )))
-
-
-(provide 'mumamo-fun)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mumamo-fun.el ends here
diff --git a/emacs.d/nxhtml/util/mumamo-regions.el b/emacs.d/nxhtml/util/mumamo-regions.el
deleted file mode 100644
index 077be60..0000000
--- a/emacs.d/nxhtml/util/mumamo-regions.el
+++ /dev/null
@@ -1,311 +0,0 @@
-;;; mumamo-regions.el --- user defined regions with mumamo
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-05-31 Sun
-;; Version: 0.5
-;; Last-Updated: 2009-06-01 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Add temporary mumamo chunks (called mumamo regions). This are
-;; added interactively from a highlighted region.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'mumamo))
-(eval-when-compile (require 'ourcomments-widgets))
-(require 'ps-print) ;; For ps-print-ensure-fontified
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Internal side functions etc
-
-(defvar mumamo-regions nil
- "List of active mumamo regions. Internal use only.
-The entries in this list should be like this
-
- \(OVL-DEF OVL-CHUNK)
-
-where OVL-DEF is an overlay containing the definitions, ie `major-mode'.
-OVL-CHUNK is the definitions set up temporarily for mumamo chunks.
-
-The fontification functions in mumamo looks in this list, but the
-chunk dividing functions defined by
-`define-mumamo-multi-major-mode' does not. The effect is that
-the normal chunks exists regardless of what is in this list, but
-fontification etc is overridden by what this list says.")
-(make-variable-buffer-local 'mumamo-regions)
-(put 'mumamo-regions 'permanent-local t)
-
-(defun mumamo-add-region-1 (major start end buffer)
- "Add a mumamo region with major mode MAJOR from START to END.
-Return the region. The returned value can be used in
-`mumamo-clear-region'.
-
-START and END should be markers in the buffer BUFFER. They may
-also be nil in which case they extend the region to the buffer
-boundaries."
- (unless mumamo-multi-major-mode
- (mumamo-temporary-multi-major))
- (or (not start)
- (markerp start)
- (eq (marker-buffer start) buffer)
- (error "Bad arg start: %s" start))
- (or (not end)
- (markerp end)
- (eq (marker-buffer end) buffer)
- (error "Bad arg end: %s" end))
- (let ((ovl (make-overlay start end)))
- (overlay-put ovl 'mumamo-region 'defined)
- (overlay-put ovl 'face 'mumamo-region)
- (overlay-put ovl 'priority 2)
- (mumamo-region-set-major ovl major)
- (setq mumamo-regions (cons (list ovl nil) mumamo-regions))
- (mumamo-mark-for-refontification (overlay-start ovl) (overlay-end ovl))
- (message "Added mumamo region from %d to %d" (+ 0 start) (+ 0 end))
- ovl))
-
-(defun mumamo-clear-region-1 (region-entry)
- "Clear mumamo region REGION-ENTRY.
-The entry must have been returned from `mumamo-add-region-1'."
- (let ((buffer (overlay-buffer (car region-entry)))
- (entry (cdr region-entry)))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer
- (let ((ovl1 (car region-entry))
- (ovl2 (cadr region-entry)))
- (delete-overlay ovl1)
- (when ovl2
- (mumamo-mark-for-refontification (overlay-start ovl2) (overlay-end ovl2))
- (delete-overlay ovl2))
- (setq mumamo-regions (delete region-entry mumamo-regions)))))))
-
-(defvar mumamo-region-priority 0)
-(make-variable-buffer-local 'mumamo-region-priority)
-(put 'mumamo-region-priority 'permanent-local t)
-
-(defun mumamo-get-region-from-1 (point)
- "Return mumamo region values for POINT.
-The return value is either mumamo chunk or a cons with
-information about where regions starts to hide normal chunks.
-Such a cons has the format \(BELOW . OVER) where each of them is
-a position or nil."
- (when mumamo-regions
- (save-restriction
- (widen)
- (let* ((start nil)
- (end nil)
- (major nil)
- hit-reg
- ret-val)
- (catch 'found-major
- (dolist (reg mumamo-regions)
- (assert (eq (overlay-get (car reg) 'mumamo-region) 'defined) t)
- (assert (or (not (cadr reg)) (overlayp (cadr reg))))
- (let* ((this-ovl (car reg))
- (this-start (overlay-start this-ovl))
- (this-end (overlay-end this-ovl)))
- (when (<= this-end point)
- (setq start this-end))
- (when (< point this-start)
- (setq end this-start))
- (when (and (<= this-start point)
- (< point this-end))
- (setq major (overlay-get this-ovl 'mumamo-major-mode))
- (setq start (max this-start (or start this-start)))
- (setq end (min this-end (or end this-end)))
- (setq hit-reg reg)
- (throw 'found-major nil)))))
- (if major
- (progn
- (setq ret-val (nth 1 hit-reg))
- (when ret-val (assert (eq (overlay-get ret-val 'mumamo-region) 'used) t))
- (if ret-val
- (move-overlay ret-val start end)
- (setq ret-val (make-overlay start end nil t nil)) ;; fix-me
- (setcar (cdr hit-reg) ret-val)
- (overlay-put ret-val 'mumamo-region 'used)
- (overlay-put ret-val 'priority ;; above normal chunks + chunks on chunks
- (setq mumamo-region-priority (1+ mumamo-region-priority)))
- ;;(overlay-put ret-val 'face '(:background "chocolate")) ;; temporary
- (overlay-put ret-val 'mumamo-major-mode
- (overlay-get (car hit-reg) 'mumamo-major-mode))))
- (setq ret-val (cons start end)))
- ;;(message "mumamo-get-region-from-1, point=%s ret-val=%s" point ret-val)
- ret-val))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; User side functions
-
-(defun mumamo-temporary-multi-major ()
- "Turn on a temporary multi major mode from buffers current mode.
-Define one if no one exists. It will have no chunk dividing
-routines. It is meant mainly to be used with mumamo regions when
-there is no mumamo multi major mode in the buffer and the user
-wants to add a mumamo region \(which requires a multi major mode
-to work)."
- (when mumamo-multi-major-mode
- (error "Mumamo is already active in buffer"))
- (let* ((temp-mode-name (concat "mumamo-1-"
- (symbol-name major-mode)))
- (temp-mode-sym (intern-soft temp-mode-name)))
- (unless (and temp-mode-sym
- (fboundp temp-mode-sym))
- (setq temp-mode-sym (intern temp-mode-name))
- (eval
- `(define-mumamo-multi-major-mode ,temp-mode-sym
- "Temporary multi major mode."
- ("Temporary" ,major-mode nil))))
- (put temp-mode-sym 'mumamo-temporary major-mode)
- (funcall temp-mode-sym)))
-
-(defface mumamo-region
- '((t (:background "white")))
- "Face for mumamo-region regions."
- :group 'mumamo)
-
-;;;###autoload
-(defun mumamo-add-region ()
- "Add a mumamo region from selection.
-Mumamo regions are like another layer of chunks above the normal chunks.
-They does not affect the normal chunks, but they overrides them.
-
-To create a mumamo region first select a visible region and then
-call this function.
-
-If the buffer is not in a multi major mode a temporary multi
-major mode will be created applied to the buffer first.
-To get out of this and get back to a single major mode just use
-
- M-x normal-mode"
- (interactive)
- (if (not mark-active)
- (message (propertize "Please select a visible region first" 'face 'secondary-selection))
- (let ((beg (region-beginning))
- (end (region-end))
- (maj (mumamo-region-read-major)))
- (mumamo-add-region-1 maj (copy-marker beg) (copy-marker end) (current-buffer))
- (setq deactivate-mark t))))
-
-;;;###autoload
-(defun mumamo-add-region-from-string ()
- "Add a mumamo region from string at point.
-Works as `mumamo-add-region' but for string or comment at point.
-
-Buffer must be fontified."
- (interactive)
- ;; assure font locked.
- (require 'ps-print)
- (ps-print-ensure-fontified (point-min) (point-max))
- (let ((the-face (get-text-property (point) 'face)))
- (if (not (memq the-face
- '(font-lock-doc-face
- font-lock-string-face
- font-lock-comment-face)))
- (message "No string or comment at point")
- (let ((beg (previous-single-property-change (point) 'face))
- (end (next-single-property-change (point) 'face))
- (maj (mumamo-region-read-major)))
- (setq beg (or (when beg (1+ beg))
- (point-min)))
- (setq end (or (when end (1- end))
- (point-max)))
- (mumamo-add-region-1 maj (copy-marker beg) (copy-marker end) (current-buffer))))))
-;; (dolist (o (overlays-in (point-min) (point-max))) (delete-overlay o))
-(defun mumamo-clear-all-regions ()
- "Clear all mumamo regions in buffer.
-For information about mumamo regions see `mumamo-add-region'."
- (interactive)
- (unless mumamo-multi-major-mode
- (error "There can be no mumamo regions to clear unless in multi major modes"))
- (while mumamo-regions
- (mumamo-clear-region-1 (car mumamo-regions))
- (setq mumamo-regions (cdr mumamo-regions)))
- (let ((old (get mumamo-multi-major-mode 'mumamo-temporary)))
- (when old (funcall old)))
- (message "Cleared all mumamo regions"))
-
-(defun mumamo-region-read-major ()
- "Prompt user for major mode.
-Accept only single major mode, not mumamo multi major modes."
- (let ((major (read-command "Major mode: ")))
- (unless (major-modep major) (error "Not a major mode: %s" major))
- (when (mumamo-multi-major-modep major) (error "Multi major modes not allowed: %s" major))
- (when (let ((major-mode major))
- (derived-mode-p 'nxml-mode))
- (error "%s is based on nxml-mode and can't be used here" major))
- major))
-
-(defun mumamo-region-at (point)
- "Return mumamo region at POINT."
- (let ((ovls (overlays-at (point))))
- (catch 'overlay
- (dolist (o ovls)
- (when (overlay-get o 'mumamo-region)
- (throw 'overlay o)))
- nil)))
-
-(defun mumamo-region-set-major (ovl major)
- "Change major mode for mumamo region at point.
-For information about mumamo regions see `mumamo-add-region'.
-
-If run non-interactively then OVL should be a mumamo region and
-MAJOR the major mode to set for that region."
- (interactive
- (list (or (mumamo-region-at (point))
- (error "There is no mumamo region at point"))
- (mumamo-region-read-major)))
- (overlay-put ovl 'mumamo-major-mode `(,major))
- (overlay-put ovl 'help-echo (format "Mumamo region, major mode `%s'" major)))
-
-(defun mumamo-clear-region (ovl)
- "Clear the mumamo region at point.
-For information about mumamo regions see `mumamo-add-region'.
-
-If run non-interactively then OVL should be the mumamo region to
-clear."
- (interactive
- (list (or (mumamo-region-at (point))
- (error "There is no mumamo region at point"))))
- (let ((region-entry (rassoc (list ovl) mumamo-regions)))
- (unless region-entry
- (error "No mumamo region found at point"))
- (mumamo-clear-region-1 region-entry)))
-
-
-(provide 'mumamo-regions)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mumamo-regions.el ends here
diff --git a/emacs.d/nxhtml/util/mumamo-trace.el b/emacs.d/nxhtml/util/mumamo-trace.el
deleted file mode 100644
index 72b839b..0000000
--- a/emacs.d/nxhtml/util/mumamo-trace.el
+++ /dev/null
@@ -1,6 +0,0 @@
-(trace-function-background 'mumamo-fontify-region-1)
-(trace-function-background 'mumamo-fontify-region-with)
-(trace-function-background 'mumamo-mark-for-refontification)
-(trace-function-background 'syntax-ppss-flush-cache)
-
-;;(untrace-all)
diff --git a/emacs.d/nxhtml/util/mumamo.el b/emacs.d/nxhtml/util/mumamo.el
deleted file mode 100644
index c59300f..0000000
--- a/emacs.d/nxhtml/util/mumamo.el
+++ /dev/null
@@ -1,9101 +0,0 @@
-;;; mumamo.el --- Multiple major modes in a buffer
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Maintainer:
-;; Created: Fri Mar 09 2007
-(defconst mumamo:version "0.91") ;;Version:
-;; Last-Updated: 2009-10-19 Mon
-;; URL: http://OurComments.org/Emacs/Emacs.html
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `appmenu', `apropos', `backquote', `button', `bytecomp', `cl',
-;; `comint', `compile', `easymenu', `flyspell', `grep', `ido',
-;; `ispell', `mail-prsvr', `mlinks', `mm-util', `nxml-enc',
-;; `nxml-glyph', `nxml-mode', `nxml-ns', `nxml-outln',
-;; `nxml-parse', `nxml-rap', `nxml-util', `ourcomments-util',
-;; `recentf', `ring', `rng-dt', `rng-loc', `rng-match',
-;; `rng-parse', `rng-pttrn', `rng-uri', `rng-util', `rng-valid',
-;; `rx', `sgml-mode', `timer', `tool-bar', `tree-widget',
-;; `url-expand', `url-methods', `url-parse', `url-util',
-;; `url-vars', `wid-edit', `xmltok'.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Commentary:
-;;
-;; In some cases you may find that it is quite hard to write one major
-;; mode that does everything for the type of file you want to handle.
-;; That is the case for example for a PHP file where there comes
-;; useful major modes with Emacs for the html parts, and where you can
-;; get a major mode for PHP from other sources (see EmacsWiki for
-;; Aaron Hawleys php-mode.el, or the very similar version that comes
-;; with nXhtml).
-;;
-;; Using one major mode for the HTML part and another for the PHP part
-;; sounds like a good solution. But this means you want to use (at
-;; least) two major modes in the same buffer.
-;;
-;; This file implements just that, support for MUltiple MAjor MOdes
-;; (mumamo) in a buffer.
-;;
-;;
-;;;; Usage:
-;;
-;; The multiple major mode support is turned on by calling special
-;; functions which are used nearly the same way as major modes. See
-;; `mumamo-defined-multi-major-modes' for more information about those
-;; functions.
-;;
-;; Each such function defines how to take care of a certain mix of
-;; major functions in the buffer. We call them "multi major modes".
-;;
-;; You may call those functions directly (like you can with major mode
-;; functions) or you may use them in for example `auto-mode-alist'.
-;;
-;; You can load mumamo in your .emacs with
-;;
-;; (require 'mumamo-fun)
-;;
-;; or you can generate an autoload file from mumamo-fun.el
-;;
-;; Note that no multi major mode functions are defined in this file.
-;; Together with this file comes the file mumamo-fun.el that defines
-;; some such functions. All those functions defined in that file are
-;; marked for autoload.
-;;
-;;
-;;
-;; Thanks to Stefan Monnier for beeing a good and knowledgeable
-;; speaking partner for some difficult parts while I was trying to
-;; develop this.
-;;
-;; Thanks to RMS for giving me support and ideas about the programming
-;; interface. That simplified the code and usage quite a lot.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; How to add support for a new mix of major modes
-;;
-;; This is done by creating a new function using
-;; `define-mumamo-multi-major-mode'. See that function for more
-;; information.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Information for major mode authors
-;;
-;; There are a few special requirements on major modes to make them
-;; work with mumamo:
-;;
-;; - fontification-functions should be '(jit-lock-function). However
-;; nxml-mode derivates can work too, see the code for more info.
-;;
-;; - narrowing should be respected during fontification and
-;; indentation when font-lock-dont-widen is non-nil.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Information for minor mode authors
-;;
-;; Some minor modes are written to be specific for the file edited in
-;; the buffer and some are written to be specific for a major
-;; modes. Others are emulating another editor. Those are probably
-;; global, but might still have buffer local values.
-;;
-;; Those minor modes that are not meant to be specific for a major
-;; mode should probably survive changing major mode in the
-;; buffer. That is mostly not the case in Emacs today.
-;;
-;; There are (at least) two type of values for those minor modes that
-;; sometimes should survive changing major mode: buffer local
-;; variables and functions added locally to hooks.
-;;
-;; * Some buffer local variables are really that - buffer local. Other
-;; are really meant not for the buffer but for the major mode or
-;; some minor mode that is local to the buffer.
-;;
-;; If the buffer local variable is meant for the buffer then it is
-;; easy to make them survive changing major mode: just add
-;;
-;; (put 'VARIABLE 'permanent-local t)
-;;
-;; to those variables. That will work regardless of the way major
-;; mode is changed.
-;;
-;; If one only wants the variables to survive the major mode change
-;; that is done when moving between chunks with different major
-;; modes then something different must be used. To make a variable
-;; survive this, but not a major mode change for the whole buffer,
-;; call any the function `mumamo-make-variable-buffer-permanent':
-;;
-;; (mumamo-make-variable-buffer-permanent 'VARIABLE)
-;;
-;; * For functions entered to local hooks use this
-;;
-;; (put 'FUNSYM 'permanent-local-hook t)
-;; (add-hook 'HOOKSYM 'FUNSYM nil t)
-;;
-;; where HOOKSYM is the hook and FUNSYM is the function.
-;;
-;; * Some functions that are run in `change-major-mode' and dito
-;; after- must be avoided when mumamo changes major mode. The
-;; functions to avoid should be listed in
-;;
-;; `mumamo-change-major-mode-no-nos'
-;; `mumamo-after-change-major-mode-no-nos'
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Comments on code etc:
-;;
-;; This is yet another way to try to get different major modes for
-;; different chunks of a buffer to work. (I borrowed the term "chunk"
-;; here from multi-mode.el.) I am aware of two main previous elisp
-;; packages that tries to do this, multi-mode.el and mmm-mode.el.
-;; (See http://www.emacswiki.org/cgi-bin/wiki/MultipleModes where
-;; there are also some other packages mentioned.) The solutions in
-;; those are a bit different from the approach here.
-;;
-;; The idea of doing it the way mumamo does it is of course based on a
-;; hope that switching major mode when moving between chunks should be
-;; quick. I found that it took from 0 - 62 000 ms, typically 0 - 16
-;; 000 ms on a 3ghz cpu. However unfortunately this is not the whole
-;; truth. It could take longer time, depending on what is run in the
-;; hooks: The major mode specific hook, `after-change-major-mode-hook'
-;; and `change-major-mode-hook'.
-;;
-;; Because it currently may take long enough time switching major mode
-;; when moving between chunks to disturb smooth moving around in the
-;; buffer I have added a way to let the major mode switching be done
-;; after moving when Emacs is idle. This is currently the default, but
-;; see the custom variable `mumamo-set-major-mode-delay'.
-;;
-;; Since the intention is to set up the new major mode the same way as
-;; it should have been done if this was a major mode for the whole
-;; buffer these hooks must be run. However if this idea is developed
-;; further some of the things done in these hooks (like switching on
-;; minor modes) could perhaps be streamlined so that switching minor
-;; modes off and then on again could be avoided. In fact there is
-;; already tools for this in mumamo.el, see the section below named
-;; "Information for minor mode authors".
-;;
-;; Another problem is that the major modes must use
-;; `font-lock-fontify-region-function'. Currently the only major
-;; modes I know that does not do this are `nxml-mode' and its
-;; derivatives.
-;;
-;; The indentation is currently working rather ok, but with the price
-;; that buffer modified is sometimes set even though there are no
-;; actual changes. That seems a bit unnecessary and it could be
-;; avoided if the indentation functions for the the various major
-;; modes were rewritten so that you could get the indentation that
-;; would be done instead of actually doing the indentation. (Or
-;; mumamo could do this better, but I do not know how right now.)
-;;
-;; See also "Known bugs and problems etc" below.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Known bugs:
-;;
-;; - See the various FIX-ME for possible bugs. See also below.
-;;
-;;
-;;;; Known problems and ideas:
-;;
-;; - There is no way in Emacs to tell a mode not to change
-;; fontification when changing to or from that mode.
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'cc-engine))
-(eval-when-compile (require 'desktop))
-(eval-when-compile (require 'flyspell))
-(eval-when-compile (require 'rngalt nil t))
-(eval-when-compile (require 'nxml-mode nil t))
-(eval-when-compile
- (when (featurep 'nxml-mode)
- (require 'rng-valid nil t)
- ;;(require 'rngalt nil t)
- ))
-(eval-when-compile (require 'sgml-mode)) ;; For sgml-xml-mode
-;; For `define-globalized-minor-mode-with-on-off':
-;;(require 'ourcomments-util)
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; rng-valid.el support
-
-(defvar rng-get-major-mode-chunk-function nil
- "Function to use to get major mode chunk.
-It should take one argument, the position where to get the major
-mode chunk.
-
-This is to be set by multiple major mode frame works, like
-mumamo.
-
-See also `rng-valid-nxml-major-mode-chunk-function' and
-`rng-end-major-mode-chunk-function'. Note that all three
-variables must be set.")
-(make-variable-buffer-local 'rng-get-major-mode-chunk-function)
-(put 'rng-get-major-mode-chunk-function 'permanent-local t)
-
-(defvar rng-valid-nxml-major-mode-chunk-function nil
- "Function to use to check if nxml can parse major mode chunk.
-It should take one argument, the chunk.
-
-For more info see also `rng-get-major-mode-chunk-function'.")
-(make-variable-buffer-local 'rng-valid-nxml-major-mode-chunk-function)
-(put 'rng-valid-nxml-major-mode-chunk-function 'permanent-local t)
-
-(defvar rng-end-major-mode-chunk-function nil
- "Function to use to get the end of a major mode chunk.
-It should take one argument, the chunk.
-
-For more info see also `rng-get-major-mode-chunk-function'.")
-(make-variable-buffer-local 'rng-end-major-mode-chunk-function)
-(put 'rng-end-major-mode-chunk-function 'permanent-local t)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Some variables
-
-(defvar mumamo-major-mode-indent-line-function nil)
-(make-variable-buffer-local 'mumamo-major-mode-indent-line-function)
-
-(defvar mumamo-buffer-locals-per-major nil)
-(make-variable-buffer-local 'mumamo-buffer-locals-per-major)
-(put 'mumamo-buffer-locals-per-major 'permanent-local t)
-
-(defvar mumamo-just-changed-major nil
- "Avoid refontification when switching major mode.
-Set to t by `mumamo-set-major'. Checked and reset to nil by
-`mumamo-jit-lock-function'.")
-(make-variable-buffer-local 'mumamo-just-changed-major)
-
-(defvar mumamo-multi-major-mode nil
- "The function that handles multiple major modes.
-If this is nil then multiple major modes in the buffer is not
-handled by mumamo.
-
-Set by functions defined by `define-mumamo-multi-major-mode'.")
-(make-variable-buffer-local 'mumamo-multi-major-mode)
-(put 'mumamo-multi-major-mode 'permanent-local t)
-
-(defvar mumamo-set-major-running nil
- "Internal use. Handling of mumamo turn off.")
-
-(defun mumamo-chunk-car (chunk prop)
- (car (overlay-get chunk prop)))
-
-(defun mumamo-chunk-cadr (chunk prop)
- (cadr (overlay-get chunk prop)))
-
-;; (let ((l '(1 2))) (setcar (nthcdr 1 l) 10) l)
-;; setters
-(defsubst mumamo-chunk-value-set-min (chunk-values min)
- "In CHUNK-VALUES set min value to MIN.
-CHUNK-VALUES should have the format return by
-`mumamo-create-chunk-values-at'."
- (setcar (nthcdr 0 chunk-values) min))
-(defsubst mumamo-chunk-value-set-max (chunk-values max)
- "In CHUNK-VALUES set max value to MAX.
-See also `mumamo-chunk-value-set-min'."
- (setcar (nthcdr 1 chunk-values) max))
-(defsubst mumamo-chunk-value-set-syntax-min (chunk-values min)
- "In CHUNK-VALUES set min syntax diff value to MIN.
-See also `mumamo-chunk-value-set-min'."
- (setcar (nthcdr 3 chunk-values) min))
-(defsubst mumamo-chunk-value-set-syntax-max (chunk-values max)
- "In CHUNK-VALUES set max syntax diff value to MAX.
-See also `mumamo-chunk-value-set-min'."
- (setcar (nthcdr 3 chunk-values) max))
-;; getters
-(defsubst mumamo-chunk-value-min (chunk-values)
- "Get min value from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'."
- (nth 0 chunk-values))
-(defsubst mumamo-chunk-value-max (chunk-values)
- "Get max value from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'."
- (nth 1 chunk-values))
-(defsubst mumamo-chunk-value-major (chunk-values)
- "Get major value from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'."
- (nth 2 chunk-values))
-(defsubst mumamo-chunk-value-syntax-min (chunk-values)
- "Get min syntax diff value from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'."
- (nth 3 chunk-values))
-(defsubst mumamo-chunk-value-syntax-max (chunk-values)
- "Get max syntax diff value from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'."
- (nth 4 chunk-values))
-(defsubst mumamo-chunk-value-parseable-by (chunk-values)
- "Get parseable-by from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'.
-For parseable-by see `mumamo-find-possible-chunk'."
- (nth 5 chunk-values))
-;; (defsubst mumamo-chunk-prev-chunk (chunk-values)
-;; "Get previous chunk from CHUNK-VALUES.
-;; See also `mumamo-chunk-value-set-min'."
-;; (nth 6 chunk-values))
-(defsubst mumamo-chunk-value-fw-exc-fun (chunk-values)
- "Get function that find chunk end from CHUNK-VALUES.
-See also `mumamo-chunk-value-set-min'."
- (nth 6 chunk-values))
-
-(defsubst mumamo-chunk-major-mode (chunk)
- "Get major mode specified in CHUNK."
- ;;(assert chunk)
- ;;(assert (overlay-buffer chunk))
- (let ((mode-spec (if chunk
- (mumamo-chunk-car chunk 'mumamo-major-mode)
- (mumamo-main-major-mode))))
- (mumamo-major-mode-from-modespec mode-spec)))
-
-(defsubst mumamo-chunk-syntax-min-max (chunk no-obscure)
- (when chunk
- (let* ((ovl-end (overlay-end chunk))
- (ovl-start (overlay-start chunk))
- (syntax-min (min ovl-end
- (+ ovl-start
- (or (overlay-get chunk 'mumamo-syntax-min-d)
- 0))))
- ;;(dummy (msgtrc "chunk-syntax-min-max:syntax-min=%s, chunk=%S" syntax-min chunk))
- (syntax-max
- (max ovl-start
- (- (overlay-end chunk)
- (or (overlay-get chunk 'mumamo-syntax-max-d)
- 0)
- (if (= (1+ (buffer-size))
- (overlay-end chunk))
- 0
- ;; Note: We must subtract one here because
- ;; overlay-end is +1 from the last point in the
- ;; overlay.
- ;;
- ;; This cured the problem with
- ;; kubica-freezing-i.html that made Emacs loop
- ;; in `font-lock-extend-region-multiline'. But
- ;; was it really this one, I can't find any
- ;; 'font-lock-multiline property. So it should
- ;; be `font-lock-extend-region-whole-lines'.
- ;;
- ;; Should not the problem then be the value of font-lock-end?
- ;;
- ;; Fix-me: however this is not correct since it
- ;; leads to not fontifying the last character in
- ;; the chunk, see bug 531324.
- ;;
- ;; I think this is cured by now. I have let
- ;; bound `font-lock-extend-region-functions'
- ;; once more before the call to
- ;; `font-lock-fontify-region'.
- 0
- ;;0
- ))))
- (obscure (unless no-obscure (overlay-get chunk 'obscured)))
- (region-info (cadr obscure))
- (obscure-min (car region-info))
- (obscure-max (cdr region-info))
- ;;(dummy (message "syn-mn-mx:obs=%s r-info=%s ob=%s/%s" obscure region-info obscure-min obscure-max ))
- (actual-min (max (or obscure-min ovl-start)
- (or syntax-min ovl-start)))
- (actual-max (min (or obscure-max ovl-end)
- (or syntax-max ovl-end)))
- (maj (mumamo-chunk-car chunk 'mumamo-major-mode))
- ;;(dummy (message "syn-mn-mx:obs=%s r-info=%s ob=%s/%s ac=%s/%s" obscure region-info obscure-min obscure-max actual-min actual-max))
- )
- (cons actual-min actual-max))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Macros
-
-;; Borrowed from font-lock.el
-(defmacro mumamo-save-buffer-state (varlist &rest body)
- "Bind variables according to VARLIST and eval BODY restoring buffer state.
-Do not record undo information during evaluation of BODY."
- (declare (indent 1) (debug let))
- (let ((modified (make-symbol "modified")))
- `(let* ,(append varlist
- `((,modified (buffer-modified-p))
- (buffer-undo-list t)
- (inhibit-read-only t)
- (inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t)
- deactivate-mark
- buffer-file-name
- buffer-file-truename))
- (progn
- ,@body)
- (unless ,modified
- (restore-buffer-modified-p nil)))))
-
-;; From jit-lock.el:
-(defmacro mumamo-jit-with-buffer-unmodified (&rest body)
- "Eval BODY, preserving the current buffer's modified state."
- (declare (debug t))
- (let ((modified (make-symbol "modified")))
- `(let ((,modified (buffer-modified-p)))
- (unwind-protect
- (progn ,@body)
- (unless ,modified
- (restore-buffer-modified-p nil))))))
-
-(defmacro mumamo-with-buffer-prepared-for-jit-lock (&rest body)
- "Execute BODY in current buffer, overriding several variables.
-Preserves the `buffer-modified-p' state of the current buffer."
- (declare (debug t))
- `(mumamo-jit-with-buffer-unmodified
- (let ((buffer-undo-list t)
- (inhibit-read-only t)
- (inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t)
- deactivate-mark
- buffer-file-name
- buffer-file-truename)
- ,@body)))
-
-(defmacro mumamo-condition-case (var body-form &rest handlers)
- "Like `condition-case', but optional.
-If `mumamo-use-condition-case' is non-nil then do
-
- (condition-case VAR
- BODY-FORM
- HANDLERS).
-
-Otherwise just evaluate BODY-FORM."
- (declare (indent 2) (debug t))
- `(if (not mumamo-use-condition-case)
- (let* ((debugger (or mumamo-debugger 'debug))
- (debug-on-error (if debugger t debug-on-error)))
- ,body-form)
- (condition-case ,var
- ,body-form
- ,@handlers)))
-
-(defmacro mumamo-msgfntfy (format-string &rest args)
- "Give some messages during fontification.
-This macro should just do nothing during normal use. However if
-there are any problems you can uncomment one of the lines in this
-macro and recompile/reeval mumamo.el to get those messages.
-
-You have to search the code to see where you will get them. All
-uses are in this file.
-
-FORMAT-STRING and ARGS have the same meaning as for the function
-`message'."
- ;;(list 'apply (list 'quote 'msgtrc) format-string (append '(list) args))
- ;;(list 'apply (list 'quote 'message) format-string (append '(list) args))
- ;;(list 'progn 'apply (list 'quote 'message) format-string (append '(list) args) nil)
- ;; (condition-case err
- ;; (list 'apply (list 'quote 'message) format-string (append '(list) args)) ;; <--
- ;; (error (message "err in msgfntfy %S" err)))
- ;;(message "%s %S" format-string args)
- ;;(list 'apply (list 'quote 'message) (list 'concat "%s: " format-string)
- ;; (list 'get-internal-run-time) (append '(list) args))
- )
-;;(mumamo-msgfntfy "my-format=%s" (get-internal-run-time))
-
-(defmacro mumamo-msgindent (format-string &rest args)
- "Give some messages during indentation.
-This macro should just do nothing during normal use. However if
-there are any problems you can uncomment one of the lines in this
-macro and recompile/reeval mumamo.el to get those messages.
-
-You have to search the code to see where you will get them. All
-uses are in this file.
-
-FORMAT-STRING and ARGS have the same meaning as for the function
-`message'."
- ;;(list 'apply (list 'quote 'msgtrc) format-string (append '(list) args))
- ;;(list 'apply (list 'quote 'message) format-string (append '(list) args)) ;; <---
- ;;(list 'apply (list 'quote 'message) (list 'concat "%s: " format-string)
- ;; (list 'get-internal-run-time) (append '(list) args))
- )
-
-(defmacro mumamo-with-major-mode-setup (major for-what &rest body)
- "Run code with some local variables set as in specified major mode.
-Set variables as needed for major mode MAJOR when doing FOR-WHAT
-and then run BODY using `with-syntax-table'.
-
-FOR-WHAT is used to choose another major mode than MAJOR in
-certain cases. It should be 'fontification or 'indentation.
-
-Note: We must let-bind the variables here instead of make them buffer
-local since they otherwise could be wrong at \(point) in top
-level \(ie user interaction level)."
- (declare (indent 2) (debug t))
- `(let ((need-major-mode (mumamo-get-major-mode-substitute ,major ,for-what)))
- ;;(msgtrc "mumamo-with-major-mode-setup %s => %s, modified=%s" ,major need-major-mode (buffer-modified-p))
- ;;(msgtrc "with-major-mode-setup <<<<<<<<<< body=%S\n>>>>>>>>>>" '(progn ,@body))
- ;;(msgtrc "with-major-mode-setup:in buffer %s after-chunk=%s" (current-buffer) (when (boundp 'after-chunk) after-chunk))
- (let ((major-mode need-major-mode)
- (evaled-set-mode (mumamo-get-major-mode-setup need-major-mode)))
- ;;(message ">>>>>> before %s" evaled-set-mode)
- ;;(message ">>>>>> before %s, body=%s" evaled-set-mode (list ,@body))
- (funcall (symbol-value evaled-set-mode)
- (list 'progn
- ,@body))
- ;;(mumamo-msgfntfy "<<<<<< after evaled-set-mode modified=%s" (buffer-modified-p))
- )))
-
-(defmacro mumamo-with-major-mode-fontification (major &rest body)
- "With fontification variables set as major mode MAJOR eval BODY.
-This is used during font locking and indentation. The variables
-affecting those are set as they are in major mode MAJOR.
-
-See the code in `mumamo-fetch-major-mode-setup' for exactly which
-local variables that are set."
- (declare (indent 1) (debug t))
- `(mumamo-with-major-mode-setup ,major 'fontification
- ,@body))
-;; Fontification disappears in for example *grep* if
-;; font-lock-mode-major-mode is 'permanent-local t.
-;;(put 'font-lock-mode-major-mode 'permanent-local t)
-
-(defmacro mumamo-with-major-mode-indentation (major &rest body)
- "With indentation variables set as in another major mode do things.
-Same as `mumamo-with-major-mode-fontification' but for
-indentation. See that function for some notes about MAJOR and
-BODY."
- (declare (indent 1) (debug t))
- `(mumamo-with-major-mode-setup ,major 'indentation ,@body))
-
-;; fix-me: tell no sub-chunks in sub-chunks
-;;;###autoload
-(defmacro define-mumamo-multi-major-mode (fun-sym spec-doc chunks)
- "Define a function that turn on support for multiple major modes.
-Define a function FUN-SYM that set up to divide the current
-buffer into chunks with different major modes.
-
-The documentation string for FUN-SYM should contain the special
-documentation in the string SPEC-DOC, general documentation for
-functions of this type and information about chunks.
-
-The new function will use the definitions in CHUNKS \(which is
-called a \"chunk family\") to make the dividing of the buffer.
-
-The function FUN-SYM can be used to setup a buffer instead of a
-major mode function:
-
-- The function FUN-SYM can be called instead of calling a major
- mode function when you want to use multiple major modes in a
- buffer.
-
-- The defined function can be used instead of a major mode
- function in for example `auto-mode-alist'.
-
-- As the very last thing FUN-SYM will run the hook FUN-SYM-hook,
- just as major modes do.
-
-- There is also a general hook, `mumamo-turn-on-hook', which is
- run when turning on mumamo with any of these functions. This
- is run right before the hook specific to any of the functions
- above that turns on the multiple major mode support.
-
-- The multi major mode FUN-SYM has a keymap named FUN-SYM-map.
- This overrides the major modes' keymaps since it is handled as
- a minor mode keymap.
-
-- There is also a special mumamo keymap, `mumamo-map' that is
- active in every buffer with a multi major mode. This is also
- handled as a minor mode keymap and therefor overrides the major
- modes' keymaps.
-
-- However when this support for multiple major mode is on the
- buffer is divided into chunks, each with its own major mode.
-
-- The chunks are fontified according the major mode assigned to
- them for that.
-
-- Indenting is also done according to the major mode assigned to
- them for that.
-
-- The actual major mode used in the buffer is changed to the one
- in the chunk when moving point between these chunks.
-
-- When major mode is changed the hooks for the new major mode,
- `after-change-major-mode-hook' and `change-major-mode-hook' are
- run.
-
-- There will be an alias for FUN-SYM called mumamo-alias-FUN-SYM.
- This can be used to check whic multi major modes have been
- defined.
-
-** A little bit more technical description:
-
-The dividing of a buffer into chunks is done during fontification
-by `mumamo-get-chunk-at'.
-
-The name of the function is saved in in the buffer local variable
-`mumamo-multi-major-mode' when the function is called.
-
-All functions defined by this macro is added to the list
-`mumamo-defined-multi-major-modes'.
-
-Basically Mumamo handles only major modes that uses jit-lock.
-However as a special effort also `nxml-mode' and derivatives
-thereof are handled. Since it seems impossible to me to restrict
-those major modes fontification to only a chunk without changing
-`nxml-mode' the fontification is instead done by
-`html-mode'/`sgml-mode' for chunks using `nxml-mode' and its
-derivates.
-
-CHUNKS is a list where each entry have the format
-
- \(CHUNK-DEF-NAME MAIN-MAJOR-MODE SUBMODE-CHUNK-FUNCTIONS)
-
-CHUNK-DEF-NAME is the key name by which the entry is recognized.
-MAIN-MAJOR-MODE is the major mode used when there is no chunks.
-If this is nil then `major-mode' before turning on this mode will
-be used.
-
-SUBMODE-CHUNK-FUNCTIONS is a list of the functions that does the
-chunk division of the buffer. They are tried in the order they
-appear here during the chunk division process.
-
-If you want to write new functions for chunk divisions then
-please see `mumamo-find-possible-chunk'. You can perhaps also
-use `mumamo-quick-static-chunk' which is more easy-to-use
-alternative. See also the file mumamo-fun.el where there are
-many routines for chunk division.
-
-When you write those new functions you may want to use some of
-the functions for testing chunks:
-
- `mumamo-test-create-chunk-at' `mumamo-test-create-chunks-at-all'
- `mumamo-test-easy-make' `mumamo-test-fontify-region'
-
-These are in the file mumamo-test.el."
- ;;(let ((c (if (symbolp chunks) (symbol-value chunks) chunks))) (message "c=%S" c))
- (let* (;;(mumamo-describe-chunks (make-symbol "mumamo-describe-chunks"))
- (turn-on-fun (if (symbolp fun-sym)
- fun-sym
- (error "Parameter FUN-SYM must be a symbol")))
- (turn-on-fun-alias (intern (concat "mumamo-alias-" (symbol-name fun-sym))))
- ;; Backward compatibility nXhtml v 1.60
- (turn-on-fun-old (when (string= (substring (symbol-name fun-sym) -5)
- "-mode")
- (intern (substring (symbol-name fun-sym) 0 -5))))
- (turn-on-hook (intern (concat (symbol-name turn-on-fun) "-hook")))
- (turn-on-map (intern (concat (symbol-name turn-on-fun) "-map")))
- (turn-on-hook-doc (concat "Hook run at the very end of `"
- (symbol-name turn-on-fun) "'."))
- (chunks2 (if (symbolp chunks)
- (symbol-value chunks)
- chunks))
- (docstring
- (concat
- spec-doc
- "
-
-
-
-This function is called a multi major mode. It sets up for
-multiple major modes in the buffer in the following way:
-
-"
- ;; Fix-me: During byte compilation the next line is not
- ;; expanded as I thought because the functions in CHUNKS
- ;; are not defined. How do I fix this? Move out the
- ;; define-mumamo-multi-major-mode calls?
- (funcall 'mumamo-describe-chunks chunks2)
- "
-At the very end this multi major mode function runs first the hook
-`mumamo-turn-on-hook' and then `" (symbol-name turn-on-hook) "'.
-
-There is a keymap specific to this multi major mode, but it is
-not returned by `current-local-map' which returns the chunk's
-major mode's local keymap.
-
-The multi mode keymap is named `" (symbol-name turn-on-map) "'.
-
-
-
-The main use for a multi major mode is to use it instead of a
-normal major mode in `auto-mode-alist'. \(You can of course call
-this function directly yourself too.)
-
-The value of `mumamo-multi-major-mode' tells you which multi
-major mode if any has been turned on in a buffer. For more
-information about multi major modes please see
-`define-mumamo-multi-major-mode'.
-
-Note: When adding new font-lock keywords for major mode chunks
-you should use the function `mumamo-refresh-multi-font-lock'
-afterwards.
-" )))
- `(progn
- ;;(add-to-list 'mumamo-defined-multi-major-modes (cons (car ',chunks2) ',turn-on-fun))
- (mumamo-add-to-defined-multi-major-modes (cons (car ',chunks2) ',turn-on-fun))
- (defvar ,turn-on-hook nil ,turn-on-hook-doc)
- (defvar ,turn-on-map (make-sparse-keymap)
- ,(concat "Keymap for multi major mode function `"
- (symbol-name turn-on-fun) "'"))
- (defvar ,turn-on-fun nil)
- (make-variable-buffer-local ',turn-on-fun)
- (put ',turn-on-fun 'permanent-local t)
- (put ',turn-on-fun 'mumamo-chunk-family (copy-tree ',chunks2))
- (put ',turn-on-fun-alias 'mumamo-chunk-family (copy-tree ',chunks2))
- (defun ,turn-on-fun nil ,docstring
- (interactive)
- (let ((old-major-mode (or mumamo-major-mode
- major-mode)))
- (kill-all-local-variables)
- (run-hooks 'change-major-mode-hook)
- (setq mumamo-multi-major-mode ',turn-on-fun)
- (setq ,turn-on-fun t)
- (mumamo-add-multi-keymap ',turn-on-fun ,turn-on-map)
- (setq mumamo-current-chunk-family (copy-tree ',chunks2))
- (mumamo-turn-on-actions old-major-mode)
- (run-hooks ',turn-on-hook)))
- (defalias ',turn-on-fun-alias ',turn-on-fun)
- (when (intern-soft ',turn-on-fun-old)
- (defalias ',turn-on-fun-old ',turn-on-fun))
- )))
-
-;;;###autoload
-(defun mumamo-add-to-defined-multi-major-modes (entry)
- (add-to-list 'mumamo-defined-multi-major-modes entry))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Debugging etc
-
-(defsubst mumamo-while (limit counter where)
- (let ((count (symbol-value counter)))
- (if (= count limit)
- (progn
- (msgtrc "Reached (while limit=%s, where=%s)" limit where)
- nil)
- (set counter (1+ count)))))
-
-;; (defun dbg-smarty-err ()
-;; ;; (insert "}{")
-
-;; ;; (insert "}{")
-;; ;; (backward-char)
-;; ;; (backward-char)
-;; ;; (search-backward "}")
-
-;; ;; This gives an error rather often, but not always:
-;; (delete-char 3)
-;; (search-backward "}")
-;; )
-
-;; (defun dbg-smarty-err2 ()
-;; (forward-char 5)
-;; (insert "}{")
-;; ;; Start in nxhtml part and make sure the insertion is in smarty
-;; ;; part. Gives reliably an error if moved backward so point stay in
-;; ;; the new nxhtml-mode part, otherwise not.
-;; ;;
-;; ;; Eh, no. If chunk family is changed and reset there is no more an
-;; ;; error.
-;; ;;
-;; ;; Seems to be some race condition, but I am unable to understand
-;; ;; how. I believed that nxml always left in a reliable state. Is
-;; ;; this a state problem in mumamo or nxml? I am unable to make it
-;; ;; happen again now.
-;; ;;
-;; ;; I saw one very strange thing: The error message got inserted in
-;; ;; the .phps buffer once. How could this happen? Is this an Emacs
-;; ;; bug? Can't see how this could happen since it is the message
-;; ;; function that outputs the message. A w32 race condition? Are
-;; ;; people aware that the message queue runs in parallell? (I have
-;; ;; tried to ask on the devel list, but got no answer at that time.)
-;; (backward-char 2)
-;; )
-
-
-(defvar msgtrc-buffer
- "*Messages*"
- ;;"*trace-output*"
- "Buffer or name of buffer for trace messages.
-See `msgtrc'."
- )
-
-(defun msgtrc (format-string &rest args)
- "Print message to `msgtrc-buffer'.
-Arguments FORMAT-STRING and ARGS are like for `message'."
- (if nil
- nil ;;(apply 'message format-string args)
- ;; bug#3350 prevents use of this:
- (let ((trc-buffer (get-buffer-create msgtrc-buffer))
- ;; Cure 3350: Stop insert from deactivating the mark
- (deactivate-mark))
- (with-current-buffer trc-buffer
- (goto-char (point-max))
- (insert "MU:" (apply 'format format-string args) "\n")
- ;;(insert "constant string\n")
- (when buffer-file-name (write-region nil nil buffer-file-name))))))
-
-(defvar mumamo-message-file-buffer nil)
-(defsubst mumamo-msgtrc-to-file ()
- "Start writing message to file. Erase `msgtrc-buffer' first."
- (unless mumamo-message-file-buffer
- (setq mumamo-message-file-buffer (find-file-noselect "c:/emacs/bugs/temp-messages.txt"))
- (setq msgtrc-buffer mumamo-message-file-buffer)
- (with-current-buffer mumamo-message-file-buffer
- (erase-buffer))))
-
-(defvar mumamo-display-error-lwarn nil
- "Set to t to call `lwarn' on fontification errors.
-If this is t then `*Warnings*' buffer will popup on fontification
-errors.")
-(defvar mumamo-display-error-stop nil
- "Set to t to stop fontification on errors.")
-
-(defun mumamo-message-with-face (msg face)
- "Put MSG with face FACE in *Messages* buffer."
- (let ((start (+ (with-current-buffer msgtrc-buffer
- (point-max))
- 1))
- ;; This is for the echo area:
- (msg-with-face (propertize (format "%s" msg)
- 'face face)))
-
- (msgtrc "%s" msg-with-face)
- ;; This is for the buffer:
- (with-current-buffer msgtrc-buffer
- (goto-char (point-max))
- (backward-char)
- (put-text-property start (point)
- 'face face))))
-
-;;(run-with-idle-timer 1 nil 'mumamo-show-report-message)
-(defun mumamo-show-report-message ()
- "Tell the user there is a long error message."
- (save-match-data ;; runs in timer
- (mumamo-message-with-face
- "MuMaMo error, please look in the *Messages* buffer"
- 'highlight)))
-
-;; This code can't be used now because `debugger' is currently not
-;; useable in timers. I keep it here since I hope someone will make it
-;; possible in the future.
-;;
-;; (defmacro mumamo-get-backtrace-if-error (bodyform)
-;; "Evaluate BODYFORM, return a list with error message and backtrace.
-;; If there is an error in BODYFORM then return a list with the
-;; error message and the backtrace as a string. Otherwise return
-;; nil."
-;; `(let* ((debugger
-;; (lambda (&rest debugger-args)
-;; (let ((debugger-ret (with-output-to-string (backtrace))))
-;; ;; I believe we must put the result in a buffer,
-;; ;; otherwise `condition-case' might erase it:
-;; (with-current-buffer (get-buffer-create "TEMP GET BACKTRACE")
-;; (erase-buffer)
-;; (insert debugger-ret)))))
-;; (debug-on-error t)
-;; (debug-on-signal t))
-;; (mumamo-condition-case err
-;; (progn
-;; ,bodyform
-;; nil)
-;; (error
-;; (let* ((errmsg (error-message-string err))
-;; (dbg1-ret
-;; (with-current-buffer
-;; (get-buffer "TEMP GET BACKTRACE") (buffer-string)))
-;; ;; Remove lines from this routine:
-;; (debugger-lines (split-string dbg1-ret "\n"))
-;; (dbg-ret (mapconcat 'identity (nthcdr 6 debugger-lines) "\n"))
-;; )
-;; (list errmsg (concat errmsg "\n" dbg-ret)))))))
-
-;;(mumamo-display-error 'test-lwarn-type "testing 1=%s, 2=%s" "one" 'two)
-(defun mumamo-display-error (lwarn-type format-string &rest args)
- "Display a message plus traceback in the *Messages* buffer.
-Use this for errors that happen during fontification or when
-running a timer.
-
-LWARN-TYPE is used as the type argument to `lwarn' if warnings
-are displayed. FORMAT-STRING and ARGS are used as the
-corresponding arguments to `message' and `lwarn'.
-
-All the output from this function in the *Messages* buffer is
-displayed with the highlight face. After the message printed by
-`message' is traceback from where this function was called.
-Note: There is no error generated, just a traceback that is put
-in *Messages* as above.
-
-Display an error message using `message' and colorize it using
-the `highlight' face to make it more prominent. Add a backtrace
-colored with the `highlight' face to the buffer *Messages*. Then
-display the error message once again after this so that the user
-can see it.
-
-If `mumamo-display-error-lwarn' is non-nil, indicate the error by
-calling `lwarn'. This will display the `*Warnings*' buffer and
-thus makes it much more easy to spot that there was an error.
-
-If `mumamo-display-error-stop' is non-nil raise an error that may
-stop fontification."
-
- ;; Warnings are sometimes disturbning, make it optional:
- (when mumamo-display-error-lwarn
- (apply 'lwarn lwarn-type :error format-string args))
-
- (let ((format-string2 (concat "%s: " format-string))
- (bt (with-output-to-string (backtrace))))
-
- (mumamo-message-with-face
- (concat
- (apply 'format format-string2 lwarn-type args)
- "\n"
- (format "** In buffer %s\n" (current-buffer))
- bt)
- 'highlight)
-
- ;; Output message once again so the user can see it:
- (apply 'message format-string2 lwarn-type args)
- ;; But ... there might be more messages so wait until things has
- ;; calmed down and then show a message telling that there was an
- ;; error and that there is more information in the *Messages*
- ;; buffer.
- (run-with-idle-timer 1 nil 'mumamo-show-report-message)
-
- ;; Stop fontifying:
- (when mumamo-display-error-stop
- ;;(font-lock-mode -1)
- (setq font-lock-mode nil)
- (when (timerp jit-lock-context-timer)
- (cancel-timer jit-lock-context-timer))
- (when (timerp jit-lock-defer-timer)
- (cancel-timer jit-lock-defer-timer))
- (apply 'error format-string2 lwarn-type args))))
-
-
-(defun mumamo-debug-to-backtrace (&rest debugger-args)
- "This function should give a backtrace during fontification errors.
-The variable `debugger' should then be this function. See the
-function `debug' for an explanation of DEBUGGER-ARGS.
-
-Fix-me: Can't use this function yet since the display routines
-uses safe_eval and safe_call."
- (mumamo-display-error 'mumamo-debug-to-backtrace
- "%s"
- (nth 1 debugger-args)))
-
-;; (defun my-test-err3 ()
-;; (interactive)
-;; (let ((debugger 'mumamo-debug-to-backtrace)
-;; (debug-on-error t))
-;; (my-err)
-;; ))
-;;(my-test-err3()
-
-;;(set-default 'mumamo-use-condition-case nil)
-;;(set-default 'mumamo-use-condition-case t)
-(defvar mumamo-use-condition-case t)
-(make-variable-buffer-local 'mumamo-use-condition-case)
-(put 'mumamo-use-condition-case 'permanent-local t)
-
-(defvar mumamo-debugger 'mumamo-debug-to-backtrace)
-(make-variable-buffer-local 'mumamo-debugger)
-(put 'mumamo-debugger 'permanent-local t)
-
-;; (defun my-test-err4 ()
-;; (interactive)
-;; (mumamo-condition-case err
-;; (my-errx)
-;; (arith-error (message "here"))
-;; (error (message "%s, %s" err (error-message-string err)))
-;; ))
-
-(defvar mumamo-warned-once nil)
-(make-variable-buffer-local 'mumamo-warned-once)
-(put 'mumamo-warned-once 'permanent-local t)
-
- ; (append '(0 1) '(a b))
-(defun mumamo-warn-once (type message &rest args)
- "Warn only once with TYPE, MESSAGE and ARGS.
-If the same problem happens again then do not warn again."
- (let ((msgrec (append (list type message) args)))
- (unless (member msgrec mumamo-warned-once)
- (setq mumamo-warned-once
- (cons msgrec mumamo-warned-once))
- ;;(apply 'lwarn type :warning message args)
- (apply 'message (format "%s: %s" type message) args)
- )))
-
-(defun mumamo-add-help-tabs ()
- "Add key bindings for moving between buttons.
-Add bindings similar to those in `help-mode' for moving between
-text buttons."
- (local-set-key [tab] 'forward-button)
- (local-set-key [(meta tab)] 'backward-button)
- (local-set-key [(shift tab)] 'backward-button)
- (local-set-key [backtab] 'backward-button))
-
-(defun mumamo-insert-describe-button (symbol type)
- "Insert a text button that describes SYMBOL of type TYPE."
- (let ((func `(lambda (btn)
- (funcall ',type ',symbol))))
- (mumamo-add-help-tabs)
- (insert-text-button
- (symbol-name symbol)
- :type 'help-function
- 'face 'link
- 'action func)))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Custom group
-
-;;;###autoload
-(defgroup mumamo nil
- "Customization group for multiple major modes in a buffer."
- :group 'editing
- :group 'languages
- :group 'sgml
- :group 'nxhtml
- )
-
-;;(setq mumamo-set-major-mode-delay -1)
-;;(setq mumamo-set-major-mode-delay 5)
-(defcustom mumamo-set-major-mode-delay idle-update-delay
- "Delay this number of seconds before setting major mode.
-When point enters a region where the major mode should be
-different than the current major mode, wait until Emacs has been
-idle this number of seconds before switching major mode.
-
-If negative switch major mode immediately.
-
-Ideally the switching of major mode should occur immediately when
-entering a region. However this can make movements a bit unsmooth
-for some major modes on a slow computer. Therefore on a slow
-computer use a short delay.
-
-If you have a fast computer and want to use mode specific
-movement commands then set this variable to -1.
-
-I tried to measure the time for switching major mode in mumamo.
-For most major modes it took 0 ms, but for `nxml-mode' and its
-derivate it took 20 ms on a 3GHz CPU."
- :type 'number
- :group 'mumamo)
-
-
-(defgroup mumamo-display nil
- "Customization group for mumamo chunk display."
- :group 'mumamo)
-
-(defun mumamo-update-this-buffer-margin-use ()
- (mumamo-update-buffer-margin-use (current-buffer)))
-
-(define-minor-mode mumamo-margin-info-mode
- "Display chunk info in margin when on.
-Display chunk depth and major mode where a chunk begin in left or
-right margin. \(The '-mode' part of the major mode is stripped.)
-
-See also `mumamo-margin-use'.
-
-Note: When `linum-mode' is on the right margin is always used
-now \(since `linum-mode' uses the left)."
- :group 'mumamo-display
- (mumamo-update-this-buffer-margin-use)
- (if mumamo-margin-info-mode
- (progn
- ;;(add-hook 'window-configuration-change-hook 'mumamo-update-this-buffer-margin-use nil t)
- (add-hook 'linum-mode-hook 'mumamo-update-this-buffer-margin-use nil t)
- )
- ;;(remove-hook 'window-configuration-change-hook 'mumamo-update-this-buffer-margin-use t)
- (remove-hook 'linum-mode-hook 'mumamo-update-this-buffer-margin-use t)
- ))
-;;(put 'mumamo-margin-info-mode 'permanent-local t)
-
-(defun mumamo-margin-info-mode-turn-off ()
- (mumamo-margin-info-mode -1))
-(put 'mumamo-margin-info-mode-turn-off 'permanent-local-hook t)
-
-(define-globalized-minor-mode mumamo-margin-info-global-mode mumamo-margin-info-mode
- (lambda () (when (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- (mumamo-margin-info-mode 1)))
- :group 'mumamo-display)
-
-(defcustom mumamo-margin-use '(left-margin 13)
- "Display chunk info in left or right margin if non-nil."
- :type '(list (radio (const :tag "Display chunk info in left margin" left-margin)
- (const :tag "Display chunk info in right margin" right-margin))
- (integer :tag "Margin width (when used)" :value 13))
- :set (lambda (sym val)
- (set-default sym val)
- (when (fboundp 'mumamo-update-all-buffers-margin-use)
- (mumamo-update-all-buffers-margin-use)))
- :group 'mumamo-display)
-
-(defun mumamo-update-all-buffers-margin-use ()
- (dolist (buf (buffer-list))
- (mumamo-update-buffer-margin-use buf)))
-
-(define-minor-mode mumamo-no-chunk-coloring
- "Use no background colors to distinguish chunks.
-When this minor mode is on in a buffer no chunk coloring is done
-in that buffer. This is overrides `mumamo-chunk-coloring'. It
-is meant for situations when you temporarily need to remove the
-background colors."
- :lighter " ø"
- :group 'mumamo-display
- (font-lock-mode -1)
- (font-lock-mode 1))
-(put 'mumamo-no-chunk-coloring 'permanent-local t)
-
-
-;; (setq mumamo-chunk-coloring 4)
-(defcustom mumamo-chunk-coloring 0
- "Color chunks with depth greater than or equal to this.
-When 0 all chunks will be colored. If 1 all sub mode chunks will
-be colored, etc."
- :type '(integer :tag "Color chunks with depth greater than this")
- :group 'mumamo-display)
-
-(defface mumamo-background-chunk-major
- '((((class color) (min-colors 88) (background dark))
- ;;:background "blue3")
- :background "MidnightBlue")
- (((class color) (min-colors 88) (background light))
- ;;:background "lightgoldenrod2")
- :background "cornsilk")
- (((class color) (min-colors 16) (background dark))
- :background "blue4")
- (((class color) (min-colors 16) (background light))
- :background "cornsilk")
- (((class color) (min-colors 8))
- :background "blue")
- (((type tty) (class mono))
- :inverse-video t)
- (t :background "gray"))
- "Background colors for chunks in sub modes.
-You should only specify :background here, otherwise it will
-interfere with syntax highlighting."
- :group 'mumamo-display)
-
-(defface mumamo-background-chunk-submode1
- '((((class color) (min-colors 88) (background dark))
- ;;:background "blue3")
- :background "DarkGreen"
- ;;:background "#081010"
- )
- (((class color) (min-colors 88) (background light))
- ;;:background "lightgoldenrod2")
- :background "Azure")
- (((class color) (min-colors 16) (background dark))
- :background "blue3")
- (((class color) (min-colors 16) (background light))
- :background "azure")
- (((class color) (min-colors 8))
- :background "Blue")
- (((type tty) (class mono))
- :inverse-video t)
- (t :background "gray"))
- "Background colors for chunks in major mode.
-You should only specify :background here, otherwise it will
-interfere with syntax highlighting."
- :group 'mumamo-display)
-
-(defface mumamo-background-chunk-submode2
- '((((class color) (min-colors 88) (background dark))
- ;;:background "blue3")
- :background "dark green")
- (((class color) (min-colors 88) (background light))
- ;;:background "lightgoldenrod2")
- :background "#e6ff96")
- (((class color) (min-colors 16) (background dark))
- :background "blue3")
- (((class color) (min-colors 16) (background light))
- :background "azure")
- (((class color) (min-colors 8))
- :background "blue")
- (((type tty) (class mono))
- :inverse-video t)
- (t :background "gray"))
- "Background colors for chunks in major mode.
-You should only specify :background here, otherwise it will
-interfere with syntax highlighting."
- :group 'mumamo-display)
-
-(defface mumamo-background-chunk-submode3
- '((((class color) (min-colors 88) (background dark))
- ;;:background "blue3")
- :background "dark green")
- (((class color) (min-colors 88) (background light))
- ;;:background "lightgoldenrod2")
- :background "#f7d1f4")
- ;;:background "green")
- (((class color) (min-colors 16) (background dark))
- :background "blue3")
- (((class color) (min-colors 16) (background light))
- :background "azure")
- (((class color) (min-colors 8))
- :background "blue")
- (((type tty) (class mono))
- :inverse-video t)
- (t :background "gray"))
- "Background colors for chunks in major mode.
-You should only specify :background here, otherwise it will
-interfere with syntax highlighting."
- :group 'mumamo-display)
-
-(defface mumamo-background-chunk-submode4
- '((((class color) (min-colors 88) (background dark))
- ;;:background "blue3")
- :background "dark green")
- (((class color) (min-colors 88) (background light))
- ;;:background "lightgoldenrod2")
- :background "orange")
- (((class color) (min-colors 16) (background dark))
- :background "blue3")
- (((class color) (min-colors 16) (background light))
- :background "azure")
- (((class color) (min-colors 8))
- :background "blue")
- (((type tty) (class mono))
- :inverse-video t)
- (t :background "gray"))
- "Background colors for chunks in major mode.
-You should only specify :background here, otherwise it will
-interfere with syntax highlighting."
- :group 'mumamo-display)
-
-(defcustom mumamo-background-chunk-major 'mumamo-background-chunk-major
- "Background colors for chunks in major mode.
-Pointer to face with background color.
-
-If you do not want any special background color use the face named
-default."
- :type 'face
- :group 'mumamo-display)
-
-(defcustom mumamo-background-chunk-submode1 'mumamo-background-chunk-submode1
- "Background colors for chunks in sub modes.
-Pointer to face with background color.
-
-If you do not want any special background color use the face named
-default."
- :type 'face
- :group 'mumamo-display)
-
-(defcustom mumamo-background-chunk-submode2 'mumamo-background-chunk-submode2
- "Background colors for chunks in sub modes.
-Pointer to face with background color.
-
-If you do not want any special background color use the face named
-default."
- :type 'face
- :group 'mumamo-display)
-
-(defcustom mumamo-background-chunk-submode3 'mumamo-background-chunk-submode3
- "Background colors for chunks in sub modes.
-Pointer to face with background color.
-
-If you do not want any special background color use the face named
-default."
- :type 'face
- :group 'mumamo-display)
-
-(defcustom mumamo-background-chunk-submode4 'mumamo-background-chunk-submode4
- "Background colors for chunks in sub modes.
-Pointer to face with background color.
-
-If you do not want any special background color use the face named
-default."
- :type 'face
- :group 'mumamo-display)
-
-;; Fix-me: use and enhance this
-(defcustom mumamo-background-colors '(mumamo-background-chunk-major
- mumamo-background-chunk-submode1
- mumamo-background-chunk-submode2
- mumamo-background-chunk-submode3
- mumamo-background-chunk-submode4
- )
- "List of background colors in order of use.
-First color is for main major mode chunks, then for submode
-chunks, sub-submode chunks etc. Colors are reused in cyclic
-order.
-
-The default colors are choosen so that inner chunks has a more
-standing out color the further in you get. This is supposed to
-be helpful when you make mistakes and the chunk nesting is not
-what you intended.
-
-Note: Only the light background colors have been set by me. The
-dark background colors might currently be unuseful.
-Contributions and suggestions are welcome!
-
-The values in the list should be symbols. Each symbol should either be
-
- 1: a variable symbol pointing to a face (or beeing nil)
- 2: a face symbol
- 3: a function with one argument (subchunk depth) returning a
- face symbol"
- :type '(repeat symbol)
- :group 'mumamo-display)
-
-;;(mumamo-background-color 0)
-;;(mumamo-background-color 1)
-;;(mumamo-background-color 2)
-(defun mumamo-background-color (sub-chunk-depth)
- (when (and (not mumamo-no-chunk-coloring)
- (or (not (integerp mumamo-chunk-coloring)) ;; Old values
- (>= sub-chunk-depth mumamo-chunk-coloring)))
- (let* ((idx (when mumamo-background-colors
- (mod sub-chunk-depth (length mumamo-background-colors))))
- (sym (when idx (nth idx mumamo-background-colors)))
- fac)
- (when sym
- (when (boundp sym)
- (setq fac (symbol-value sym))
- (unless (facep fac) (setq fac nil)))
- (unless fac
- (when (facep sym)
- (setq fac sym)))
- (unless fac
- (when (fboundp sym)
- (setq fac (funcall sym sub-chunk-depth))))
- (when fac
- (unless (facep fac)
- (setq fac nil)))
- fac
- ))))
-
-(defface mumamo-border-face-in
- '((t (:inherit font-lock-preprocessor-face :bold t :italic t :underline t)))
- "Face for marking borders."
- :group 'mumamo-display)
-
-(defface mumamo-border-face-out
- '((t (:inherit font-lock-preprocessor-face :bold t :italic t :underline t)))
- "Face for marking borders."
- :group 'mumamo-display)
-
-
-(defgroup mumamo-indentation nil
- "Customization group for mumamo chunk indentation."
- :group 'mumamo)
-
-(defcustom mumamo-submode-indent-offset 2
- "Indentation of submode relative outer major mode.
-If this is nil then indentation first non-empty line in a
-subchunk will \(normally) be 0. See however
-`mumamo-indent-line-function-1' for special handling of first
-line in subsequent subchunks.
-
-See also `mumamo-submode-indent-offset-0'."
- :type '(choice integer
- (const :tag "No special"))
- :group 'mumamo-indentation)
-
-(defcustom mumamo-submode-indent-offset-0 0
- "Indentation of submode at column 0.
-This value overrides `mumamo-submode-indent-offset' when the
-outer major mode above has indentation 0."
- :type '(choice integer
- (const :tag "No special"))
- :group 'mumamo-indentation)
-
-(defcustom mumamo-indent-major-to-use
- '(
- ;;(nxhtml-mode html-mode)
- (html-mode nxhtml-mode)
- )
- "Major mode to use for indentation.
-This is normally the major mode specified for the chunk. Here you
-can make exceptions."
- :type '(repeat
- (list (symbol :tag "Major mode symbol specified")
- (command :tag "Major mode to use")))
- :group 'mumamo-indentation)
-
-;;(mumamo-indent-get-major-to-use 'nxhtml-mode)
-;;(mumamo-indent-get-major-to-use 'html-mode)
-(defun mumamo-indent-get-major-to-use (major depth)
- (or (and (= depth 0)
- (cadr (assq major mumamo-indent-major-to-use)))
- major))
-
-(defcustom mumamo-indent-widen-per-major
- '(
- (php-mode (use-widen))
- (nxhtml-mode (use-widen (html-mumamo-mode nxhtml-mumamo-mode)))
- (html-mode (use-widen (html-mumamo-mode nxhtml-mumamo-mode)))
- )
- "Wether do widen buffer during indentation.
-If not then the buffer is narrowed to the current chunk when
-indenting a line in a chunk."
- :type '(repeat
- (list (symbol :tag "Major mode symbol")
- (set
- (const :tag "Widen buffer during indentation" use-widen)
- (repeat (command :tag "Widen if multi major is any of those"))
- )))
- :group 'mumamo-indentation)
-
-
-;;;###autoload
-(defgroup mumamo-hi-lock-faces nil
- "Faces for hi-lock that are visible in mumamo multiple modes.
-This is a workaround for the problem that text properties are
-always hidden behind overlay dito.
-
-This faces are not as visible as those that defines background
-colors. However they use underlining so they are at least
-somewhat visible."
- :group 'hi-lock
- :group 'mumamo-display
- :group 'faces)
-
-(defface hi-mumamo-yellow
- '((((min-colors 88) (background dark))
- (:underline "yellow1"))
- (((background dark)) (:underline "yellow"))
- (((min-colors 88)) (:underline "yellow1"))
- (t (:underline "yellow")))
- "Default face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-pink
- '((((background dark)) (:underline "pink"))
- (t (:underline "pink")))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-green
- '((((min-colors 88) (background dark))
- (:underline "green1"))
- (((background dark)) (:underline "green"))
- (((min-colors 88)) (:underline "green1"))
- (t (:underline "green")))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-blue
- '((((background dark)) (:underline "light blue"))
- (t (:underline "light blue")))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-black-b
- '((t (:weight bold :underline t)))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-blue-b
- '((((min-colors 88)) (:weight bold :underline "blue1"))
- (t (:weight bold :underline "blue")))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-green-b
- '((((min-colors 88)) (:weight bold :underline "green1"))
- (t (:weight bold :underline "green")))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-(defface hi-mumamo-red-b
- '((((min-colors 88)) (:weight bold :underline "red1"))
- (t (:weight bold :underline "red")))
- "Face for hi-lock mode."
- :group 'mumamo-hi-lock-faces)
-
-
-;; (defcustom mumamo-check-chunk-major-same nil
-;; "Check if main major mode is the same as normal mode."
-;; :type 'boolean
-;; :group 'mumamo)
-
-;; (customize-option 'mumamo-major-modes)
-;;(require 'django)
-
-(defgroup mumamo-modes nil
- "Customization group for mumamo chunk modes."
- :group 'mumamo)
-
-(defcustom mumamo-major-modes
- '(
- (asp-js-mode
- js-mode ;; Not autoloaded in the pretest
- javascript-mode
- espresso-mode
- ecmascript-mode)
- (asp-vb-mode
- visual-basic-mode)
- ;;(css-mode fundamental-mode)
- (javascript-mode
- js-mode ;; Not autoloaded in the pretest
- javascript-mode
- espresso-mode
- ;;js2-fl-mode
- ecmascript-mode)
- (java-mode
- jde-mode
- java-mode)
- (groovy-mode
- groovy-mode)
- ;; For Emacs 22 that do not have nxml by default
- ;; Fix me: fallback when autoload fails!
- (nxhtml-mode
- nxhtml-mode
- html-mode)
- )
- "Alist for conversion of chunk major mode specifier to major mode.
-Each entry has the form
-
- \(MAJOR-SPEC MAJORMODE ...)
-
-where the symbol MAJOR-SPEC specifies the code type and should
-match the value returned from `mumamo-find-possible-chunk'. The
-MAJORMODE symbols are major modes that can be used for editing
-that code type. The first available MAJORMODE is the one that is
-used.
-
-The MAJOR-SPEC symbols are used by the chunk definitions in
-`define-mumamo-multi-major-mode'.
-
-The major modes are not specified directly in the chunk
-definitions. Instead a chunk definition contains a symbol that
-is looked up in this list to find the chunk's major mode.
-
-The reason for doing it this way is to make it possible to use
-new major modes with existing multi major modes. If for example
-someone writes a new CSS mode that could easily be used instead
-of the current one in `html-mumamo-mode'.
-
-Lookup in this list is done by `mumamo-major-mode-from-modespec'."
- :type '(alist
- :key-type (symbol :tag "Symbol for major mode spec in chunk")
- :value-type (repeat (choice
- (command :tag "Major mode")
- (symbol :tag "Major mode (not yet loaded)")))
- )
- :group 'mumamo-modes)
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; JIT lock functions
-
-(defun mumamo-jit-lock-function (start)
- "This function is added to `fontification-functions' by mumamo.
-START is a parameter given to functions in that hook."
- (mumamo-msgfntfy "mumamo-jit-lock-function %s, ff=%s, just-changed=%s"
- start
- (when start
- (save-restriction
- (widen)
- (get-text-property start 'fontified)))
- mumamo-just-changed-major)
- ;;(msgtrc "jit-lock-function %s, ff=%s, just-changed=%s" start (get-text-property start 'fontified) mumamo-just-changed-major)
- ;;(msgtrc "mumamo-jit-lock-function enter: font-lock-keywords-only def=%s" (default-value 'font-lock-keywords-only))
- (if mumamo-just-changed-major
- (setq mumamo-just-changed-major nil))
- (let ((ret (jit-lock-function start)))
- (mumamo-msgfntfy "mumamo-jit-lock-function EXIT %s, ff=%s, just-changed=%s"
- start
- (when start
- (save-restriction
- (widen)
- (get-text-property start 'fontified)))
- mumamo-just-changed-major)
- ;;(msgtrc "mumamo-jit-lock-function exit: font-lock-keywords-only def=%s" (default-value 'font-lock-keywords-only))
- ret))
-
-(defun mumamo-jit-lock-register (fun &optional contextual)
- "Replacement for `jit-lock-register'.
-Avoids refontification, otherwise same. FUN and CONTEXTUAL has
-the some meaning as there."
- (add-hook 'jit-lock-functions fun nil t)
- (when (and contextual jit-lock-contextually)
- (set (make-local-variable 'jit-lock-contextually) t))
-
- ;;(jit-lock-mode t)
- ;;
- ;; Replace this with the code below from jit-lock-mode t part:
- (setq jit-lock-mode t)
-
- ;; Mark the buffer for refontification.
- ;; This is what we want to avoid in mumamo:
- ;;(jit-lock-refontify)
-
- ;; Install an idle timer for stealth fontification.
- (when (and jit-lock-stealth-time (null jit-lock-stealth-timer))
- (setq jit-lock-stealth-timer
- (run-with-idle-timer jit-lock-stealth-time t
- 'jit-lock-stealth-fontify)))
-
- ;; Create, but do not activate, the idle timer for repeated
- ;; stealth fontification.
- (when (and jit-lock-stealth-time (null jit-lock-stealth-repeat-timer))
- (setq jit-lock-stealth-repeat-timer (timer-create))
- (timer-set-function jit-lock-stealth-repeat-timer
- 'jit-lock-stealth-fontify '(t)))
-
- ;; Init deferred fontification timer.
- (when (and jit-lock-defer-time (null jit-lock-defer-timer))
- (setq jit-lock-defer-timer
- (run-with-idle-timer jit-lock-defer-time t
- 'jit-lock-deferred-fontify)))
-
- ;; Initialize contextual fontification if requested.
- (when (eq jit-lock-contextually t)
- (unless jit-lock-context-timer
- (setq jit-lock-context-timer
- (run-with-idle-timer jit-lock-context-time t
- 'jit-lock-context-fontify)))
- (setq jit-lock-context-unfontify-pos
- (or jit-lock-context-unfontify-pos (point-max))))
-
- ;; Setup our hooks.
- ;;(add-hook 'after-change-functions 'jit-lock-after-change t t)
- ;;(add-hook 'after-change-functions 'mumamo-jit-lock-after-change t t)
- (add-hook 'after-change-functions 'mumamo-after-change t t)
- ;; Set up fontification to call jit:
- (let ((ff (reverse fontification-functions)))
- (mapc (lambda (f)
- ;;(unless (eq f 'jit-lock-function)
- (remove-hook 'fontification-functions f t))
- ;;)
- ff))
- (add-hook 'fontification-functions 'mumamo-jit-lock-function nil t)
- )
-
-;; Fix-me: integrate this with fontify-region!
-(defvar mumamo-find-chunks-timer nil)
-(make-variable-buffer-local 'mumamo-find-chunks-timer)
-(put 'mumamo-find-chunks-timer 'permanent-local t)
-
-(defvar mumamo-find-chunk-delay idle-update-delay)
-(make-variable-buffer-local 'mumamo-find-chunk-delay)
-(put 'mumamo-find-chunk-delay 'permanent-local t)
-
-(defun mumamo-stop-find-chunks-timer ()
- "Stop timer that find chunks."
- (when (and mumamo-find-chunks-timer
- (timerp mumamo-find-chunks-timer))
- (cancel-timer mumamo-find-chunks-timer))
- (setq mumamo-find-chunks-timer nil))
-
-(defun mumamo-start-find-chunks-timer ()
- "Start timer that find chunks."
- (mumamo-stop-find-chunks-timer)
- ;; (setq mumamo-find-chunks-timer
- ;; (run-with-idle-timer mumamo-find-chunk-delay nil
- ;; 'mumamo-find-chunks-in-timer (current-buffer)))
- )
-
-(defun mumamo-find-chunks-in-timer (buffer)
- "Run `mumamo-find-chunks' in buffer BUFFER in a timer."
- (mumamo-msgfntfy "mumamo-find-chunks-in-timer %s" buffer)
- ;;(message "mumamo-find-chunks-in-timer %s" buffer)
- (condition-case err
- (when (buffer-live-p buffer)
- (with-current-buffer buffer
- (mumamo-find-chunks nil "mumamo-find-chunks-in-timer")))
- (error (message "mumamo-find-chunks error: %s" err))))
-
-
-(defvar mumamo-last-chunk nil)
-(make-variable-buffer-local 'mumamo-last-chunk)
-(put 'mumamo-last-chunk 'permanent-local t)
-
-(defvar mumamo-last-change-pos nil)
-(make-variable-buffer-local 'mumamo-last-change-pos)
-(put 'mumamo-last-change-pos 'permanent-local t)
-
-;; Fix-me: maybe this belongs to contextual fontification? Eh,
-;; no. Unfortunately there is not way to make that handle more than
-;; multiple lines.
-(defvar mumamo-find-chunk-is-active nil
- "Protect from recursive calls.")
-
-;; Fix-me: temporary things for testing new chunk routines.
-(defvar mumamo-find-chunks-level 0)
-(setq mumamo-find-chunks-level 0)
-
-(defvar mumamo-old-tail nil)
-(make-variable-buffer-local 'mumamo-old-tail)
-(put 'mumamo-old-tail 'permanent-local t)
-
-(defun mumamo-update-obscure (chunk pos)
- "Update obscure cache."
- (let ((obscured (overlay-get chunk 'obscured))
- region-info)
- (unless (and obscured (= (car obscured) pos))
- (setq region-info (mumamo-get-region-from pos))
- ;;(msgtrc "update-obscure:region-info=%s" region-info)
- ;; This should not be a chunk here
- (mumamo-put-obscure chunk pos region-info))))
-
-(defun mumamo-put-obscure (chunk pos region-or-chunk)
- "Cache obscure info."
- (assert (overlayp chunk) t)
- (when pos (assert (or (markerp pos) (integerp pos)) t))
- (let* ((region-info (if (overlayp region-or-chunk)
- (cons (overlay-start region-or-chunk)
- (overlay-end region-or-chunk))
- region-or-chunk))
- (obscured (when pos (list pos region-info))))
- ;;(msgtrc "put-obscure:region-info=%s, obscured=%s" region-info obscured)
- (when region-info (assert (consp region-info) t))
- (assert (not (overlayp region-info)) t)
- (overlay-put chunk 'obscured obscured)
- (setq obscured (overlay-get chunk 'obscured))
- ;;(msgtrc " obscured=%s" obscured)
- ))
-
-(defun mumamo-get-region-from (point)
- "Return mumamo region values for POINT."
- ;; Note: `mumamo-get-region-from-1' is defined in mumamo-regions.el
- (when (fboundp 'mumamo-get-region-from-1)
- (mumamo-get-region-from-1 point)))
-
-(defun mumamo-clear-chunk-ppss-cache (chunk)
- (overlay-put chunk 'mumamo-ppss-cache nil)
- (overlay-put chunk 'mumamo-ppss-last nil)
- (overlay-put chunk 'mumamo-ppss-stats nil))
-
-(defun mumamo-find-chunks (end tracer)
- "Find or create chunks from last known chunk.
-Ie, start from the end of `mumamo-last-chunk' if this is
-non-nil, otherwise 1.
-
-If END is nil then continue till end of buffer or until any input
-is available. In this case the return value is undefined.
-
-Otherwise END must be a position in the buffer. Return the
-mumamo chunk containing the position. If `mumamo-last-chunk'
-ends before END then create chunks upto END."
- (when mumamo-multi-major-mode
- (let ((chunk (mumamo-find-chunks-1 end tracer))
- region-info)
- (when (and end chunk (featurep 'mumamo-regions))
- (setq region-info (mumamo-get-region-from end))
- ;;(msgtrc "find-chunks:region-info=%s" region-info)
- (if (overlayp region-info)
- (setq chunk region-info)
- ;;(overlay-put chunk 'obscured (list end region-info))))
- (mumamo-put-obscure chunk end region-info)))
- ;;(msgtrc "find-chunks ret chunk=%s" chunk)
- chunk)))
-
-(defun mumamo-move-to-old-tail (first-check-from)
- "Divide the chunk list.
-Make it two parts. The first, before FIRST-CHECK-FROM is still
-correct but we want to check those after. Put thosie in
-`mumamo-old-tail'."
- (let ((while-n0 0))
- (while (and (mumamo-while 500 'while-n0 "mumamo-last-chunk first-check-from")
- mumamo-last-chunk
- first-check-from
- (< first-check-from (overlay-end mumamo-last-chunk)))
- (overlay-put mumamo-last-chunk 'mumamo-next-chunk mumamo-old-tail)
- (setq mumamo-old-tail mumamo-last-chunk)
- (overlay-put mumamo-old-tail 'mumamo-is-new nil)
- (when nil ;; For debugging
- (overlay-put mumamo-old-tail
- 'face
- (list :background
- (format "red%d" (overlay-get mumamo-old-tail 'mumamo-depth)))))
- (setq mumamo-last-chunk
- (overlay-get mumamo-last-chunk 'mumamo-prev-chunk)))))
-
-(defun mumamo-delete-empty-chunks-at-end ()
- ;; fix-me: later? Delete empty chunks at end, will be recreated if really needed
- (let ((while-n1 0))
- (while (and (mumamo-while 500 'while-n1 "mumamo-last-chunk del empty chunks")
- mumamo-last-chunk
- ;;(= (point-max) (overlay-end mumamo-last-chunk))
- (= (overlay-end mumamo-last-chunk) (overlay-start mumamo-last-chunk)))
- ;;(msgtrc "delete-overlay at end")
- (delete-overlay mumamo-last-chunk)
- (setq mumamo-last-chunk (overlay-get mumamo-last-chunk 'mumamo-prev-chunk))
- (when mumamo-last-chunk (overlay-put mumamo-last-chunk 'mumamo-next-chunk nil)))))
-
-
-(defun mumamo-delete-chunks-upto (ok-pos)
- "Delete old chunks upto OK-POS."
- (or (not mumamo-old-tail)
- (overlay-buffer mumamo-old-tail)
- (setq mumamo-old-tail nil))
- (let ((while-n2 0))
- (while (and (mumamo-while 500 'while-n2 "mumamo-old-tail")
- (and mumamo-old-tail (< (overlay-start mumamo-old-tail) ok-pos)))
- (mumamo-mark-for-refontification (overlay-start mumamo-old-tail) (overlay-end mumamo-old-tail))
- ;;(msgtrc "find-chunks:ok-pos=%s, not eq delete %s" ok-pos mumamo-old-tail)
- (delete-overlay mumamo-old-tail)
- (setq mumamo-old-tail (overlay-get mumamo-old-tail 'mumamo-next-chunk))
- (or (not mumamo-old-tail)
- (overlay-buffer mumamo-old-tail)
- (setq mumamo-old-tail nil)))))
-
-(defun mumamo-reuse-old-tail-head ()
- ;;(msgtrc "reusing %S" mumamo-old-tail)
- (setq mumamo-last-chunk mumamo-old-tail)
- (overlay-put mumamo-last-chunk 'mumamo-is-new t)
- (mumamo-clear-chunk-ppss-cache mumamo-last-chunk)
- (overlay-put mumamo-last-chunk 'face (mumamo-background-color (overlay-get mumamo-last-chunk 'mumamo-depth)))
- (setq mumamo-old-tail (overlay-get mumamo-old-tail 'mumamo-next-chunk)))
-
-(defun mumamo-old-tail-fits (this-new-values)
- (and mumamo-old-tail
- (overlay-buffer mumamo-old-tail)
- (mumamo-new-chunk-equal-chunk-values mumamo-old-tail this-new-values)))
-
-(defun mumamo-find-chunks-1 (end tracer) ;; min max)
- ;; Note: This code must probably be reentrant. The globals changed
- ;; here are `mumamo-last-chunk' and `mumamo-old-tail'. They must be
- ;; handled as a pair.
- (mumamo-msgfntfy "")
- (setq mumamo-find-chunks-level (1+ mumamo-find-chunks-level))
- (unless (and (overlayp mumamo-last-chunk) (overlay-buffer mumamo-last-chunk)) (setq mumamo-last-chunk nil))
- (save-restriction
- (widen)
- (let* ((mumamo-find-chunks-1-active t)
- (here (point))
- ;; Any changes?
- (change-min (car mumamo-last-change-pos))
- (change-max (cdr mumamo-last-change-pos))
- (chunk-at-change-min (when change-min (mumamo-get-existing-new-chunk-at change-min nil)))
- (chunk-at-change-min-start (when chunk-at-change-min (overlay-start chunk-at-change-min)))
- ;; Check if change is near border
- (this-syntax-min-max
- (when chunk-at-change-min
- (mumamo-update-obscure chunk-at-change-min chunk-at-change-min-start)
- (mumamo-chunk-syntax-min-max chunk-at-change-min nil)))
- (this-syntax-min (car this-syntax-min-max))
- (in-min-border (when this-syntax-min (>= this-syntax-min change-min)))
- (first-check-from (if chunk-at-change-min
- (if (or in-min-border
- ;; Fix-me: 20?
- (> 20 (- change-min chunk-at-change-min-start)))
- (max 1
- (- chunk-at-change-min-start 1))
- chunk-at-change-min-start)
- (when change-min
- (goto-char change-min)
- (skip-chars-backward "^\n")
- (unless (bobp) (backward-char))
- (prog1 (point) (goto-char here))))))
- (when (and chunk-at-change-min (= 0 (- (overlay-end chunk-at-change-min)
- (overlay-start chunk-at-change-min))))
- (assert in-min-border)) ;; 0 len must be in border
- (setq mumamo-last-change-pos nil)
- (when chunk-at-change-min
- (mumamo-move-to-old-tail first-check-from)
- (mumamo-delete-empty-chunks-at-end))
- ;; Now mumamo-last-chunk is the last in the top chain and
- ;; mumamo-old-tail the first in the bottom chain.
-
- (let* (
- ;;(last-chunk-is-closed (when mumamo-last-chunk (overlay-get mumamo-last-chunk 'mumamo-is-closed)))
- (last-chunk-is-closed t)
- (ok-pos (or (and mumamo-last-chunk
- (- (overlay-end mumamo-last-chunk)
- ;;(or (and last-chunk-is-closed 1)
- (or (and (/= (overlay-end mumamo-last-chunk)
- (1+ (buffer-size)))
- 1)
- 0)))
- 0))
- (end-param end)
- (end (or end (point-max)))
- this-new-values
- this-new-chunk
- prev-chunk
- first-change-pos
- interrupted
- (while-n3 0))
- (when (>= ok-pos end)
- (setq this-new-chunk (mumamo-get-existing-new-chunk-at end nil))
- (unless this-new-chunk
- (error "Could not find new chunk ok-pos-new=%s > end=%s (ovls at end=%s), level=%d, old-tail=%s, %S"
- ok-pos end (overlays-in end end)
- mumamo-find-chunks-level mumamo-old-tail tracer)))
- (unless this-new-chunk
- (save-match-data
- (unless mumamo-find-chunk-is-active
- ;;(setq mumamo-find-chunk-is-active t)
- (mumamo-stop-find-chunks-timer)
- (mumamo-save-buffer-state nil
- (progn
-
- ;; Loop forward until end or buffer end ...
- (while (and (mumamo-while 1500 'while-n3 "until end")
- (or (not end)
- (<= ok-pos end))
- ;;(prog1 t (msgtrc "ok-pos=%s in while" ok-pos))
- (< ok-pos (point-max))
- (not (setq interrupted (and (not end)
- (input-pending-p)))))
- ;; Narrow to speed up. However the chunk divider may be
- ;; before ok-pos here. Assume that the marker is not
- ;; longer than 200 chars. fix-me.
- (narrow-to-region (max (- ok-pos 200) 1)
- (1+ (buffer-size)))
- ;; If this was after a change within one chunk then tell that:
- (let ((use-change-max (when (and change-max
- chunk-at-change-min
- (overlay-buffer chunk-at-change-min)
- (< change-max
- (overlay-end chunk-at-change-min))
- (or (not mumamo-last-chunk)
- (> change-max (overlay-end mumamo-last-chunk))))
- change-max))
- (use-chunk-at-change-min (when (or (not mumamo-last-chunk)
- (not (overlay-buffer mumamo-last-chunk))
- (not chunk-at-change-min)
- (not (overlay-buffer chunk-at-change-min))
- (> (overlay-end chunk-at-change-min)
- (overlay-end mumamo-last-chunk)))
- chunk-at-change-min
- )))
- (setq this-new-values (mumamo-find-next-chunk-values
- mumamo-last-chunk
- first-check-from
- use-change-max
- use-chunk-at-change-min)))
- (if (not this-new-values)
- (setq ok-pos (point-max))
- (setq first-check-from nil)
- (setq ok-pos (or (mumamo-new-chunk-value-max this-new-values) ;;(overlay-end this-chunk)
- (point-max)))
- ;;(msgtrc "ok-pos=%s, point-max=%s max=%s" ok-pos (point-max) (mumamo-new-chunk-value-max this-new-values))
- ;; With the new organization all chunks are created here.
- (if (mumamo-old-tail-fits this-new-values)
- (mumamo-reuse-old-tail-head)
- (mumamo-delete-chunks-upto ok-pos)
- ;; Create chunk and chunk links
- (setq mumamo-last-chunk (mumamo-new-create-chunk this-new-values))
- ;;(setq last-chunk-is-closed (overlay-get mumamo-last-chunk 'mumamo-is-closed))
- (unless first-change-pos
- (setq first-change-pos (mumamo-new-chunk-value-min this-new-values))))))
- (setq this-new-chunk mumamo-last-chunk)))
- (widen)
- (when (or interrupted
- (and mumamo-last-chunk
- (overlayp mumamo-last-chunk)
- (overlay-buffer mumamo-last-chunk)
- (buffer-live-p (overlay-buffer mumamo-last-chunk))
- (< (overlay-end mumamo-last-chunk) (point-max))))
- (mumamo-start-find-chunks-timer)
- )
- (when first-change-pos
- (setq jit-lock-context-unfontify-pos
- (if jit-lock-context-unfontify-pos
- (min jit-lock-context-unfontify-pos first-change-pos)
- first-change-pos))))
- (goto-char here)
- (setq mumamo-find-chunk-is-active nil)))
-
- ;; fix-me: continue here
- (when chunk-at-change-min (mumamo-clear-chunk-ppss-cache chunk-at-change-min))
- (setq mumamo-find-chunks-level (1- mumamo-find-chunks-level))
- ;; Avoid empty overlays at the end of the buffer. Those can
- ;; come from for example deleting to the end of the buffer.
- (when this-new-chunk
- ;; Fix-me: can this happen now?
- (setq prev-chunk (overlay-get this-new-chunk 'mumamo-prev-chunk))
- (when (and prev-chunk
- (overlay-buffer prev-chunk)
- (= (overlay-start this-new-chunk) (overlay-end this-new-chunk))
- (= (overlay-start prev-chunk) (overlay-end prev-chunk)))
- (overlay-put prev-chunk 'mumamo-next-chunk nil)
- (overlay-put prev-chunk 'mumamo-prev-chunk nil)
- ;;(msgtrc "find-chunks:deleting this-new-chunk %s" this-new-chunk)
- (delete-overlay this-new-chunk)
- (setq this-new-chunk prev-chunk)
- )
- (while (and mumamo-old-tail
- (overlay-buffer mumamo-old-tail)
- (= (overlay-start mumamo-old-tail) (overlay-end mumamo-old-tail)))
- (assert (not (eq mumamo-old-tail (overlay-get mumamo-old-tail 'mumamo-next-chunk))) t)
- (setq prev-chunk mumamo-old-tail)
- (setq mumamo-old-tail (overlay-get mumamo-old-tail 'mumamo-next-chunk))
- ;;(msgtrc "mumamo-find-chunks-1:after mumamo-old-tail=%s" mumamo-old-tail)
- (delete-overlay prev-chunk)
- )
- )
- ;;(unless (overlay-get mumamo-last-chunk 'mumamo-is-closed)
- (unless t ;(= (overlay-end mumamo-last-chunk) (save-restriction (widen) (point-max)))
- ;; Check that there are no left-over old chunks
- (save-restriction
- (widen)
- (dolist (o (overlays-in (point-min) (point-max)))
- (when (and (overlay-get o 'mumamo-depth)
- (not (overlay-get o 'mumamo-is-new)))
- (error "mumamo-find-chunks: left over chunk: %s end=%s, last-chunk=%s" o end mumamo-last-chunk)))))
- (when end-param
- ;;(msgtrc "find-chunks:Exit.end-param=%s, this-new-chunk=%s, point-max=%s, last=%s" end-param this-new-chunk (point-max) mumamo-last-chunk)
- (let* ((ret this-new-chunk)
- (ret-beg (overlay-start ret))
- (ret-end (overlay-end ret)))
- (unless (and (<= ret-beg end-param)
- (<= end-param ret-end))
- (error "mumamo-find-chunks: Bad ret=%s, end=%s" ret end-param))
- ;;(msgtrc "find-chunks=>%S" ret)
- ret))))))
-
-(defun mumamo-find-chunk-after-change (min max)
- "Save change position after a buffer change.
-This should be run after a buffer change. For MIN see
-`after-change-functions'."
- ;; Fix-me: Maybe use a list of all min, max instead?
- (mumamo-start-find-chunks-timer)
- ;;(msgtrc "(mumamo-find-chunk-after-change %s %s)" min max)
- (setq min (copy-marker min nil))
- (setq max (copy-marker max t))
- (setq mumamo-last-change-pos
- (if mumamo-last-change-pos
- (let* ((old-min (car mumamo-last-change-pos))
- (old-max (cdr mumamo-last-change-pos))
- (new-min (min min old-min))
- (new-max (max max old-max)))
- (cons new-min new-max))
- (cons min max))))
-
-(defun mumamo-after-change (min max old-len)
- "Everything that needs to be done in mumamo after a change.
-This is run in the `after-change-functions' hook. For MIN, MAX
-and OLD-LEN see that variable."
- ;;(msgtrc "mumamo-after-change BEGIN min/max/old-len=%s/%s/%s" min max old-len)
- ;;(msgtrc "mumamo-after-change BEGIN")
- (mumamo-find-chunk-after-change min max)
- (mumamo-jit-lock-after-change min max old-len)
- (mumamo-msgfntfy "mumamo-after-change EXIT")
- ;;(msgtrc "mumamo-after-change EXIT mumamo-last-change-pos=%s" mumamo-last-change-pos)
- )
-
-(defun mumamo-jit-lock-after-change (min max old-len)
- ;; Fix-me: Should not this be on
- ;; jit-lock-after-change-externd-region-functions??
- "Replacement for `jit-lock-after-change'.
-Does the nearly the same thing as that function, but takes
-care of that there might be different major modes at MIN and MAX.
-It also marks for refontification only in the current mumamo chunk.
-
-OLD-LEN is the pre-change length.
-
-Jit-lock after change functions is organized this way:
-
-`jit-lock-after-change' (doc: Mark the rest of the buffer as not
-fontified after a change) is added locally to the hook
-`after-change-functions'. This function runs
-`jit-lock-after-change-extend-region-functions'."
- (when (and jit-lock-mode (not memory-full))
- (mumamo-msgfntfy "mumamo-jit-lock-after-change ENTER %s %s %s" min max old-len)
- ;; Why is this nil?:
- (mumamo-msgfntfy " mumamo-jit-lock-after-change: font-lock-extend-after-change-region-function=%s" font-lock-extend-after-change-region-function)
- (let* ((ovl-min (mumamo-get-existing-new-chunk-at min nil))
- (ovl-max (when (or (not ovl-min)
- (< (overlay-end ovl-min) max))
- (mumamo-get-existing-new-chunk-at max nil)))
- (major-min (when ovl-min (mumamo-chunk-major-mode ovl-min)))
- (major-max (when ovl-max (mumamo-chunk-major-mode ovl-max)))
- (r-min nil)
- (r-max nil)
- (new-min min)
- (new-max max))
- (if (and major-min (eq major-min major-max))
- (setq r-min
- (when major-min
- (mumamo-jit-lock-after-change-1 min max old-len major-min)))
- (setq r-min
- (when major-min
- (mumamo-jit-lock-after-change-1 min max old-len major-min)))
- (setq r-max
- (when major-max
- (mumamo-jit-lock-after-change-1 min max old-len major-max))))
- (mumamo-msgfntfy "mumamo-jit-lock-after-change r-min,max=%s,%s major-min,max=%s,%s" r-min r-max major-min major-max)
- (when r-min
- (setq new-min (min new-min (car r-min)))
- (setq new-max (max new-max (cdr r-min))))
- (when r-max
- (setq new-min (min new-min (car r-max)))
- (setq new-max (max new-max (cdr r-max))))
- (setq new-min (max new-min (point-min)))
- (setq new-max (min new-max (point-max)))
- ;; Make sure we change at least one char (in case of deletions).
- (setq new-max (min (max new-max (1+ new-min)) (point-max)))
- (mumamo-msgfntfy "mumamo-jit-lock-after-change new-min,max=%s,%s" new-min new-max)
- (mumamo-mark-for-refontification new-min new-max)
-
- ;; Mark the change for deferred contextual refontification.
- ;;(setq jit-lock-context-unfontify-pos nil) (setq message-log-max t)
- (when jit-lock-context-unfontify-pos
- (setq jit-lock-context-unfontify-pos
- ;; Here we use `start' because nothing guarantees that the
- ;; text between start and end will be otherwise refontified:
- ;; usually it will be refontified by virtue of being
- ;; displayed, but if it's outside of any displayed area in the
- ;; buffer, only jit-lock-context-* will re-fontify it.
- (min jit-lock-context-unfontify-pos new-min))
- ;;(with-current-buffer (get-buffer "*Messages*") (erase-buffer))
- (mumamo-msgfntfy "mumamo-jit-lock-after-change EXIT unfontify-pos=%s" jit-lock-context-unfontify-pos)
- ;;(message "mumamo-jit-lock-after-change.unfontify-pos=%s" jit-lock-context-unfontify-pos)
- ))))
-;;(min jit-lock-context-unfontify-pos jit-lock-start))))))
-;;(put 'mumamo-jit-lock-after-change 'permanent-local-hook t)
-(put 'mumamo-after-change 'permanent-local-hook t)
-
-(defun mumamo-jit-lock-after-change-1 (min max old-len major)
- "Extend the region the same way jit-lock does it.
-This function tries to extend the region between MIN and MAX the
-same way jit-lock does it after a change. OLD-LEN is the
-pre-change length.
-
-The extending of the region is done as if MAJOR was the major
-mode."
- (mumamo-with-major-mode-fontification major
- `(progn
- (let ((jit-lock-start ,min)
- (jit-lock-end ,max))
- ;;(mumamo-msgfntfy "mumamo-mumamo-jit-lock-after-change-1 jlacer=%s" ,jit-lock-after-change-extend-region-functions)
- (mumamo-with-buffer-prepared-for-jit-lock
- ;;(font-lock-extend-jit-lock-region-after-change ,min ,max ,old-len)
- (run-hook-with-args 'jit-lock-after-change-extend-region-functions min max old-len)
- ;;(setq jit-lock-end (min (max jit-lock-end (1+ min)) (point-max)))
-
-;;; ;; Just run the buffer local function:
-;;; (dolist (extend-fun jit-lock-after-change-extend-region-functions)
-;;; (when (fboundp extend-fun)
-;;; (funcall extend-fun ,min ,max ,old-len)))
- )
- (setq min jit-lock-start)
- (setq max jit-lock-end)
- ;;(syntax-ppss-flush-cache min)
- )))
- (mumamo-msgfntfy "mumamo-mumamo-jit-lock-after-change-1 EXIT %s" (cons min max))
- (cons min max))
-
-(defun mumamo-mark-chunk ()
- "Mark chunk and move point to beginning of chunk."
- (interactive)
- (let ((chunk (mumamo-find-chunks (point) "mumamo-mark-chunk")))
- (unless chunk (error "There is no MuMaMo chunk here"))
- (goto-char (overlay-start chunk))
- (push-mark (overlay-end chunk) t t)))
-
-(defun mumamo-narrow-to-chunk-inner ()
- (interactive)
- (let* ((chunk (mumamo-find-chunks (point) "mumamo-narrow-to-chunk-innner"))
- (syntax-min-max (mumamo-chunk-syntax-min-max chunk t))
- (syntax-min (car syntax-min-max))
- (syntax-max (cdr syntax-min-max)))
- (narrow-to-region syntax-min syntax-max)))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Font lock functions
-
-(defadvice hi-lock-set-pattern (around use-overlays activate)
- (if mumamo-multi-major-mode
- (let ((font-lock-fontified nil))
- ad-do-it)
- ad-do-it))
-
-;;;###autoload
-(defun mumamo-mark-for-refontification (min max)
- "Mark region between MIN and MAX for refontification."
- ;;(msgtrc "mark-for-refontification A min,max=%s,%s point-min,max=%s,%s modified=%s" min max (point-min) (point-max) (buffer-modified-p) )
- ;;(mumamo-backtrace "mark-for-refontification")
- (mumamo-msgfntfy "mumamo-mark-for-refontification A min,max=%s,%s point-min,max=%s,%s modified=%s" min max (point-min) (point-max) (buffer-modified-p) )
- (assert (<= min max))
- (when (< min max)
- (save-restriction
- (widen)
- (mumamo-msgfntfy "mumamo-mark-for-refontification B min,max=%s,%s point-min,max=%s,%s modified=%s" min max (point-min) (point-max) (buffer-modified-p) )
- ;;(mumamo-with-buffer-prepared-for-jit-lock
- (mumamo-save-buffer-state nil
- (put-text-property min max 'fontified nil)
- ))))
-
-
-;; Fix me: The functions in this list must be replaced by variables
-;; pointing to anonymous functions for buffer local values of
-;; fontification keywords to be supported. And that is of course
-;; necessary for things like hi-lock etc. (Or..., perhaps some kind of
-;; with-variable-values... as RMS suggested once... but that will not
-;; help here...)
-;;
-;; Seems like font-lock-add-keywords must be advised...
-(defvar mumamo-internal-major-modes-alist nil
- "Alist with info for different major modes.
-Internal use only. This is automatically set up by
-`mumamo-get-major-mode-setup'.")
-(setq mumamo-internal-major-modes-alist nil)
-(put 'mumamo-internal-major-modes-alist 'permanent-local t)
-
-(defvar mumamo-ppss-last-chunk nil
- "Internal variable used to avoid unnecessary flushing.")
-(defvar mumamo-ppss-last-major nil
- "Internal variable used to avoid unnecessary flushing.")
-
-;;(mumamo-get-major-mode-substitute 'nxhtml-mode 'fontification)
-;;(mumamo-get-major-mode-substitute 'nxhtml-mode 'indentation)
-;;(mumamo-get-major-mode-substitute 'css-mode 'fontification)
-;;(mumamo-get-major-mode-substitute 'css-mode 'indentation)
-;; (assq 'nxml-mode mumamo-major-mode-substitute)
-(defconst mumamo-major-mode-substitute
- '(
- (nxhtml-mode (html-mode nxhtml-mode))
- ;;(nxhtml-mode (html-mode))
- (nxhtml-genshi-mode (html-mode nxhtml-mode))
- (nxhtml-mjt-mode (html-mode nxhtml-mode))
- (nxml-mode (sgml-mode))
- )
- "Major modes substitute to use for fontification and indentation.
-The entries in this list has either of the formats
-
- \(MAJOR (FONT-MODE INDENT-MODE))
- \(MAJOR (FONT-MODE))
-
-where major is the major mode in a mumamo chunk and FONT-MODE is
-the major mode for fontification of that chunk and INDENT-MODE is
-dito for indentation. In the second form the same mode is used
-for indentation as for fontification.")
-
-;;(mumamo-get-major-mode-substitute 'nxhtml-mode 'indentation)
-;;(mumamo-get-major-mode-substitute 'nxhtml-mode 'fontification)
-(defun mumamo-get-major-mode-substitute (major for-what)
- "For major mode MAJOR return major mode to use for FOR-WHAT.
-FOR-WHAT can be either 'fontification or indentation.
-
-mumamo must handle fontification and indentation for `major-mode'
-by using other major mode if the functions for this in
-`major-mode' are not compatible with mumamo. This functions
-looks in the table `mumamo-major-mode-substitute' for get major
-mode to use."
- ;;(when (eq for-what 'indentation) (message "subst.major=%s" major))
- (let ((m (assq major mumamo-major-mode-substitute))
- ret-major)
- (if (not m)
- (setq ret-major major)
- (setq m (nth 1 m))
- (setq ret-major
- (cond
- ((eq for-what 'fontification)
- (nth 0 m))
- ((eq for-what 'indentation)
- (nth 1 m))
- (t
- (mumamo-display-error 'mumamo-get-major-mode-substitute
- "Bad parameter, for-what=%s" for-what))))
- (unless ret-major (setq ret-major major)))
- (unless (commandp ret-major) (setq ret-major 'mumamo-bad-mode))
- ;;(when (eq for-what 'indentation) (message "ret.ind=%s, major=%s, m=%s" ret major m))
- ret-major))
-
-(defun mumamo-assert-fontified-t (start end)
- "Assert that the region START to END has 'fontified t."
- (let ((start-ok (get-text-property start 'fontified))
- (first-not-ok
- (next-single-property-change (1+ start) 'fontified nil end)))
- (when (not start-ok)
- (message "==== mumamo-assert-fontified-t %s-%s start not ok" start end))
- (when (not (= first-not-ok end))
- (message "==== mumamo-assert-fontified-t %s-%s first not ok=%s" start end first-not-ok))))
-
-;; Keep this separate for easier debugging.
-(defun mumamo-do-fontify (start end verbose chunk-syntax-min chunk-syntax-max chunk-major)
- "Fontify region between START and END.
-If VERBOSE is non-nil then print status messages during
-fontification.
-
-CHUNK-SYNTAX-MIN, CHUNK-SYNTAX-MAX and CHUNK-MAJOR are the
-chunk's min point, max point and major mode.
-
-During fontification narrow the buffer to the chunk to make
-syntactic fontification work. If chunks starts or end with \"
-then the first respective last char then exclude those chars from
-from the narrowed part, since otherwise the syntactic
-fontification can't find out where strings start and stop.
-
-Note that this function is run under
-`mumamo-with-major-mode-fontification'.
-
-This function takes care of `font-lock-dont-widen' and
-`font-lock-extend-region-functions'. Normally
-`font-lock-default-fontify-region' does this, but that function
-is not called when mumamo is used!
-
-PS: `font-lock-fontify-syntactically-region' is the main function
-that does syntactic fontification."
- ;;(msgtrc "mumamo-do-fontify enter: font-lock-keywords-only def=%s" (default-value 'font-lock-keywords-only))
- ;;(msgtrc "mumamo-do-fontify <<<<<<< %s %s %s %s %s %s" start end verbose chunk-syntax-min chunk-syntax-max chunk-major)
- ;;(msgtrc "font-lock-keywords=%S" font-lock-keywords)
- ;;(mumamo-assert-fontified-t start end)
- (mumamo-condition-case err
- (let* ((font-lock-dont-widen t)
- (font-lock-extend-region-functions
- ;; nil
- font-lock-extend-region-functions
- )
- ;; Extend like in `font-lock-default-fontify-region':
- (funs font-lock-extend-region-functions)
- (font-lock-beg (max chunk-syntax-min start))
- (font-lock-end (min chunk-syntax-max end))
- (while-n1 0))
- ;;(while (and (> 500 (setq while-n1 (1+ while-n1)))
- (while (and (mumamo-while 500 'while-n1 "funs")
- funs)
- (setq funs (if (or (not (funcall (car funs)))
- (eq funs font-lock-extend-region-functions))
- (cdr funs)
- ;; If there's been a change, we should go through
- ;; the list again since this new position may
- ;; warrant a different answer from one of the fun
- ;; we've already seen.
- font-lock-extend-region-functions)))
- ;; But we must restrict to the chunk here:
- (let ((new-start (max chunk-syntax-min font-lock-beg))
- (new-end (min chunk-syntax-max font-lock-end)))
- ;;(msgtrc "do-fontify %s %s, chunk-syntax-min,max=%s,%s, new: %s %s" start end chunk-syntax-min chunk-syntax-max new-start new-end)
- ;; A new condition-case just to catch errors easier:
- (when (< new-start new-end)
- (mumamo-condition-case err
- (save-restriction
- ;;(when (and (>= 625 (point-min)) (<= 625 (point-max))) (msgtrc "multi at 625=%s" (get-text-property 625 'font-lock-multiline)))
- ;;(msgtrc "(narrow-to-region %s %s)" chunk-syntax-min chunk-syntax-max)
- (when (< chunk-syntax-min chunk-syntax-max)
- (narrow-to-region chunk-syntax-min chunk-syntax-max)
- ;; Now call font-lock-fontify-region again but now
- ;; with the chunk font lock parameters:
- (setq font-lock-syntactically-fontified (1- new-start))
- (mumamo-msgfntfy "ENTER font-lock-fontify-region %s %s %s" new-start new-end verbose)
- ;;(msgtrc "mumamo-do-fontify: font-lock-keywords-only =%s in buffer %s, def=%s" font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- (let (font-lock-extend-region-functions)
- (font-lock-fontify-region new-start new-end verbose))
- (mumamo-msgfntfy "END font-lock-fontify-region %s %s %s" new-start new-end verbose)
- )
- )
- (error
- (mumamo-display-error 'mumamo-do-fontify-2
- "mumamo-do-fontify m=%s, s/e=%s/%s syn-min/max=%s/%s: %s"
- chunk-major
- start end
- chunk-syntax-min chunk-syntax-max
- (error-message-string err)))))))
- (error
- (mumamo-display-error 'mumamo-do-fontify
- "mumamo-do-fontify m=%s, s=%s, e=%s: %s"
- chunk-major start end (error-message-string err)))
- )
- (mumamo-msgfntfy "mumamo-do-fontify exit >>>>>>> %s %s %s %s %s %s" start end verbose chunk-syntax-min chunk-syntax-max chunk-major)
- ;;(msgtrc "mumamo-do-fontify exit: font-lock-keywords-only def=%s" (default-value 'font-lock-keywords-only))
- )
-
-(defun mumamo-do-unfontify (start end)
- "Unfontify region between START and END."
- (mumamo-condition-case err
- (font-lock-unfontify-region start end)
- (error
- (mumamo-display-error 'mumamo-do-unfontify "%s"
- (error-message-string err)))))
-
-(defun mumamo-fontify-region-with (start end verbose major chunk-syntax-min chunk-syntax-max)
- "Fontify from START to END.
-If VERBOSE is non-nil then print status messages during
-fontification.
-
-Do the fontification as in major mode MAJOR.
-
-Narrow to region CHUNK-SYNTAX-MIN and CHUNK-SYNTAX-MAX during
-fontification."
- ;; The text property 'fontified is always t here due to the way
- ;; jit-lock works!
-
- ;;(msgtrc "fontify-region-with %s %s %s %s, ff=%s" start end verbose major (get-text-property start 'fontified))
- ;;(mumamo-assert-fontified-t start end)
- ;;(msgtrc "mumamo-fontify-region-with enter: font-lock-keywords-only def=%s" (default-value 'font-lock-keywords-only))
- (mumamo-condition-case err
- (progn
- ;;(msgtrc "mumamo-fontify-region-with: font-lock-keywords-only =%s in buffer %s, def=%s" font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- (mumamo-with-major-mode-fontification major
- `(mumamo-do-fontify ,start ,end ,verbose ,chunk-syntax-min ,chunk-syntax-max major))
- )
- (error
- (mumamo-display-error 'mumamo-fontify-region-with "%s"
- (error-message-string err))))
- ;;(msgtrc "mumamo-fontify-region-with exit: font-lock-keywords-only def=%s" (default-value 'font-lock-keywords-only))
- )
-
-(defun mumamo-unfontify-region-with (start end major)
- "Unfontify from START to END as in major mode MAJOR."
- (mumamo-msgfntfy "mumamo-unfontify-region-with %s %s %s, ff=%s"
- start
- end
- major
- (when start
- (save-restriction
- (widen)
- (get-text-property start 'fontified))))
- (mumamo-with-major-mode-fontification major
- `(mumamo-do-unfontify ,start ,end)))
-
-
-
-(defun mumamo-backtrace (label)
- (msgtrc "%s:backtrace in START buffer %s <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n%s"
- label (current-buffer) (with-output-to-string (backtrace)))
- (msgtrc "%s:backtrace in END buffer %s >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" label (current-buffer)))
-
-(defun mumamo-unfontify-buffer ()
- "Unfontify buffer.
-This function is called when the minor mode function
-`font-lock-mode' is turned off. \(It is the value of
-`font-lock-unfontify-uffer-function')."
- (when (and mumamo-multi-major-mode
- (not (and (boundp 'mumamo-find-chunks-1-active)
- mumamo-find-chunks-1-active)))
- ;;(mumamo-backtrace "unfontify-buffer")
- ;;(msgtrc "mumamo-unfontify-buffer:\n%s" (with-output-to-string (backtrace)))
- (save-excursion
- (save-restriction
- (widen)
- (let ((ovls (overlays-in (point-min) (point-max)))
- (main-major (mumamo-main-major-mode)))
- (dolist (o ovls)
- (when (overlay-get o 'mumamo-is-new)
- (let ((major (mumamo-chunk-major-mode o)))
- (when major
- (unless (mumamo-fun-eq major main-major)
- (mumamo-unfontify-chunk o))
- ;;(msgtrc "delete-overlay 1")
- (delete-overlay o)
- ))))
- (mumamo-unfontify-region-with (point-min) (point-max)
- (mumamo-main-major-mode)))))))
-
-
-(defun mumamo-fontify-buffer ()
- "For `font-lock-fontify-buffer-function' call.
-Not sure when this normally is done. However some functions call
-this to ensure that the whole buffer is fontified."
- (mumamo-msgfntfy "===> mumamo-fontify-buffer-function called")
- ;;(font-lock-default-fontify-buffer)
- (unless mumamo-set-major-running
- ;; This function is normally not called, but when new patterns
- ;; have been added by hi-lock it will be called. In this case we
- ;; need to make buffer local fontification variables:
- (set (make-local-variable 'mumamo-internal-major-modes-alist) nil)
- (jit-lock-refontify)))
-
-
-(defun mumamo-unfontify-chunk (chunk) ; &optional start end)
- "Unfontify mumamo chunk CHUNK."
- (let* ((major (mumamo-chunk-major-mode chunk))
- ;;(start (overlay-start chunk))
- ;;(end (overlay-end chunk))
- (syntax-min-max (mumamo-chunk-syntax-min-max chunk t))
- (syntax-min (car syntax-min-max))
- (syntax-max (cdr syntax-min-max))
- (font-lock-dont-widen t))
- (when (< syntax-min syntax-max)
- (save-restriction
- (narrow-to-region syntax-min syntax-max)
- (mumamo-unfontify-region-with syntax-min syntax-max major)))))
-
-(defun mumamo-fontify-region (start end &optional verbose)
- "Fontify between START and END.
-Take the major mode chunks into account while doing this.
-
-If VERBOSE do the verbously.
-
-The value of `font-lock-fontify-region-function' when
-mumamo is used is this function."
- (mumamo-msgfntfy "++++++ mumamo-fontify-regionX %s %s %s, skip=%s" start end verbose mumamo-just-changed-major)
- ;;(msgtrc "mumamo-fontify-region: font-lock-keywords-only =%s in buffer %s, def=%s" font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- ;;(mumamo-assert-fontified-t start end)
- ;; If someone else tries to fontify the buffer ...
- (if (and mumamo-just-changed-major
- ;; The above variable is reset in `post-command-hook' so
- ;; check if we are in a recursive search. (Note: There are
- ;; other situation when this can occur. It might be best to
- ;; remove this test later, or make it optional.)
- ;;
- ;; skip the test for now:
- nil
- (= 0 (recursion-depth)))
- (mumamo-display-error 'mumamo-fontify-region
- "Just changed major, should not happen")
- (mumamo-condition-case err
- (mumamo-fontify-region-1 start end verbose)
- (error
- (mumamo-display-error 'mumamo-fontify-region "%s"
- (error-message-string err))))))
-
-(defconst mumamo-dbg-pretend-fontified nil
- "Set this to t to be able to debug more easily.
-This is for debugging `mumamo-fontify-region-1' more easily by
-just calling it. It will make that function believe that the text
-has a non-nil 'fontified property.")
-
-(defun mumamo-exc-mode (chunk)
- "Return sub major mode for CHUNK.
-If chunk is a main major mode chunk return nil, otherwise return
-the major mode for the chunk."
- (let ((major (mumamo-chunk-major-mode chunk)))
- (unless (mumamo-fun-eq major (mumamo-main-major-mode))
- major)))
-
-;;; Chunk in chunk needs push/pop relative prev chunk
-(defun mumamo-chunk-push (chunk prop val)
- (let* ((prev-chunk (overlay-get chunk 'mumamo-prev-chunk))
- (prev-val (when prev-chunk (overlay-get prev-chunk prop))))
- (overlay-put chunk prop (cons val prev-val))))
-(defun mumamo-chunk-pop (chunk prop)
- (overlay-put chunk prop (cdr (overlay-get (overlay-get chunk 'mumamo-prev-chunk)
- prop))))
-
-;; (defvar mumamo-chunks-to-remove nil
-;; "Internal. Chunk overlays marked for removal.")
-;; (make-variable-buffer-local 'mumamo-chunks-to-remove)
-
-(defun mumamo-flush-chunk-syntax (chunk chunk-min chunk-max)
- "Flush syntax cache for chunk CHUNK.
-This includes removing text property 'syntax-table between
-CHUNK-MIN and CHUNK-MAX."
- ;; syntax-ppss-flush-cache
- (overlay-put chunk 'syntax-ppss-last nil)
- (overlay-put chunk 'syntax-ppss-cache nil)
- (overlay-put chunk 'syntax-ppss-stats nil)
- (mumamo-save-buffer-state nil
- (remove-list-of-text-properties chunk-min chunk-max '(syntax-table))))
-
-;; Fix-me: If I open nxhtml-changes.html and then go to the bottom of
-;; the file at once syntax-ppss seems to be upset. It is however cured
-;; by doing some change above the region that is badly fontified.
-(defun mumamo-fontify-region-1 (start end verbose)
- "Fontify region between START and END.
-If VERBOSE is non-nil then print status messages during
-fontification.
-
-This is called from `mumamo-fontify-region' which is the value of
-`font-lock-fontify-region-function' when mumamo is used. \(This
-means that it ties into the normal font lock framework in Emacs.)
-
-Note: The purpose of extracting this function from
-`mumamo-fontify-region' \(which is the only place where it is
-called) is to make debugging easier. Edebug will without this
-function just step over the `condition-case' in
-`mumamo-fontify-region'.
-
-The fontification is done in steps:
-
-- First a mumamo chunk is found or created at the start of the
- region with `mumamo-get-chunk-at'.
-- Then this chunk is fontified according to the major mode for
- that chunk.
-- If the chunk did not encompass the whole region then this
- procedure is repeated with the rest of the region.
-
-If some mumamo chunk in the region between START and END has been
-marked for removal \(for example by `mumamo-jit-lock-after-change') then
-they are removed by this function.
-
-For some main major modes \(see `define-mumamo-multi-major-mode') the
-main major modes is first used to fontify the whole region. This
-is because otherwise the fontification routines for that mode may
-have trouble finding the correct starting state in a chunk.
-
-Special care has been taken for chunks that are strings, ie
-surrounded by \"...\" since they are fontified a bit special in
-most major modes."
- ;; Fix-me: unfontifying should be done using the correct syntax table etc.
- ;; Fix-me: refontify when new chunk
- ;;(msgtrc "fontify-region-1: font-lock-keywords-only =%s in buffer %s, def=%s" font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- (save-match-data
- (let* ((old-point (point))
- (here start)
- (main-major (mumamo-main-major-mode))
- (fontified-t ;;(or mumamo-dbg-pretend-fontified
- ;; (get-text-property here 'fontified))
- t)
- after-change-functions ;; Fix-me: tested adding this to avoid looping
- (first-new-ovl nil)
- (last-new-ovl nil)
- (chunk-at-start-1 (mumamo-find-chunks start "mumamo-fontify-region-1"))
- (while-n1 0)
- )
- (when chunk-at-start-1
- (unless (= start (1- (overlay-end chunk-at-start-1)))
- (setq chunk-at-start-1 nil)))
- ;;(while (and (> 500 (setq while-n1 (1+ while-n1)))
- (while (and (mumamo-while 9000 'while-n1 "fontified-t")
- fontified-t
- (< here end))
- ;;(msgtrc "mumamo-fontify-region-1 heree 1, here=%s, end=%s" here end)
- ;;(mumamo-assert-fontified-t here end)
- ;;(mumamo-assert-fontified-t start end)
- ;; Check where new chunks should be, adjust old chunks as
- ;; necessary. Refontify inside end-start and outside of
- ;; start-end mark for refontification when major-mode has
- ;; changed or there was no old chunk.
- ;;
- ;; Fix-me: Join chunks!
- (let* ((chunk (mumamo-find-chunks here "mumamo-fontify-region-1 2"))
- (chunk-min (when chunk (overlay-start chunk)))
- (chunk-max (when chunk (overlay-end chunk)))
- (chunk-min-1 (when chunk (if (> chunk-min (point-min)) (1- chunk-min) (point-min))))
- (chunk-max-1 (when chunk (if (< chunk-max (point-max)) (1+ chunk-max) (point-max))))
- (chunk-min-face (when chunk (get-text-property chunk-min-1 'face)))
- (chunk-max-face (when chunk (get-text-property chunk-max-1 'face)))
- (chunk-major (when chunk (mumamo-chunk-major-mode chunk)))
- max ; (min chunk-max end))
- )
- (assert chunk)
-
- (setq chunk-min (when chunk (overlay-start chunk)))
- (setq chunk-max (when chunk (overlay-end chunk)))
- (setq chunk-min-1
- (when chunk
- (if (> chunk-min (point-min)) (1- chunk-min) (point-min)))) ;chunk-min
- (setq chunk-max-1
- (when chunk
- (if (< chunk-max (point-max)) (1+ chunk-max) (point-max)))) ;chunk-max
- (setq chunk-min-face
- (when chunk (get-text-property chunk-min-1 'face)))
- (setq chunk-max-face
- (when chunk (get-text-property chunk-max-1 'face)))
- (setq chunk-major (when chunk (mumamo-chunk-major-mode chunk)))
-
- (if (and first-new-ovl (overlay-buffer first-new-ovl))
- (setq last-new-ovl chunk)
- (setq last-new-ovl chunk)
- (setq first-new-ovl chunk))
- ;;(mumamo-assert-fontified-t chunk-min chunk-max)
-
- (setq max (min chunk-max end))
-
- (assert chunk) (assert (overlay-buffer chunk)) (assert chunk-min)
- (assert chunk-max) (assert chunk-major)
- ;; Fix-me: The next assertion sometimes fails. Could it be
- ;; that this loop is continuing even after a change in the
- ;; buffer? How do I stop that? When?:
- ;;(assert (or (= here start) (= here chunk-min)) nil "h=%s, s=%s, cm=%s-%s, e=%s, chunk-major=%s" here start chunk-min chunk-max end chunk-major)
- ;;(assert (not (mumamo-fun-eq prev-major chunk-major)))
- ;;(when prev-chunk
- ;; (assert (= (overlay-end prev-chunk) (overlay-start chunk))))
-
- ;; Fontify
- ;;(msgtrc "\nmumamo-fontify-region-1 before chunk=%s" chunk)
- (mumamo-update-obscure chunk here)
- (let* ((syntax-min-max (mumamo-chunk-syntax-min-max chunk nil))
- (syntax-min (car syntax-min-max))
- (syntax-max (cdr syntax-min-max))
- (chunk-min (overlay-start chunk))
- (chunk-max (overlay-end chunk))
- (border-min-max (mumamo-chunk-syntax-min-max chunk t))
- (border-min (car border-min-max))
- (border-max (cdr border-min-max))
- )
- ;;(msgtrc "fontify-region-1:syntax-min-max=%S, chunk=%S" syntax-min-max chunk)
- ;;(msgtrc "chunk mumamo-border-face: %s" chunk)
- (mumamo-msgfntfy "mumamo-fontify-region-1, here=%s chunk-min=%s syn-mn/mx=%s/%s" here chunk-min syntax-min syntax-max)
- (when (<= here syntax-min)
- (mumamo-flush-chunk-syntax chunk syntax-min syntax-max))
- (when (and (<= here syntax-min)
- (< chunk-min border-min))
- ;;(msgtrc "face-in: %s-%s" chunk-min border-min)
- (put-text-property chunk-min border-min 'face 'mumamo-border-face-in)
- )
- (when (and (<= chunk-max max)
- ;;(< (1+ border-max) chunk-max))
- (< border-max chunk-max))
- ;;(put-text-property (1+ border-max) chunk-max
- (put-text-property border-max chunk-max
- 'face 'mumamo-border-face-out))
- (mumamo-fontify-region-with here max verbose chunk-major
- syntax-min syntax-max))
-
- ;;(setq prev-major chunk-major)
- ;;(setq prev-chunk chunk)
- (setq here (if (= max here) (1+ max) max))
- ;;(setq fontified-t (or mumamo-dbg-pretend-fontified (get-text-property (1- here) 'fontified)))
- )
- ;;(msgtrc "ft here end=%s %s %s" fontified-t here end)
- )
- (goto-char old-point)
- ;;(msgtrc "b first-new-ovl=%s last-new-ovl=%s" first-new-ovl last-new-ovl)
- (unless fontified-t
- ;; Fix-me: I am not sure what to do here. Probably just
- ;; refontify the rest between start and end. But does not
- ;; this lead to unnecessary refontification?
- ;;(msgtrc "not sure, here=%s, end=%s" here end)
- (unless (= here (point-max))
- (mumamo-mark-for-refontification here end)))
- ))
- ;;(msgtrc "EXIT mumamo-fontify-region-1")
- )
-
-
-(defvar mumamo-known-buffer-local-fontifications
- '(
- font-lock-mode-hook
- ;;
- css-color-mode
- hi-lock-mode
- hi-lock-file-patterns
- hi-lock-interactive-patterns
- wrap-to-fill-column-mode
- ))
-
-(defconst mumamo-irrelevant-buffer-local-vars
- '(
- ;; This list was fetched with
- ;; emacs-Q, fundamental-mode
- after-change-functions
- ;;auto-composition-function
- ;;auto-composition-mode
- ;;auto-composition-mode-major-mode
- buffer-auto-save-file-format
- buffer-auto-save-file-name
- buffer-backed-up
- buffer-display-count
- buffer-display-time
- buffer-file-format
- buffer-file-name
- buffer-file-truename
- buffer-invisibility-spec
- buffer-read-only
- buffer-saved-size
- buffer-undo-list
- change-major-mode-hook
- ;;char-property-alias-alist
- cursor-type
- default-directory
- delay-mode-hooks
- enable-multibyte-characters
- ;;font-lock-mode
- ;;font-lock-mode-major-mode
- ;;major-mode
- mark-active
- mark-ring
- mode-name
- point-before-scroll
- ;; Handled by font lock etc
- font-lock-defaults
- font-lock-fontified
- font-lock-keywords
- ;;font-lock-keywords-only
- font-lock-keywords-case-fold-search
- font-lock-mode
- ;;font-lock-mode-major-mode
- font-lock-set-defaults
- font-lock-syntax-table
- ;;font-lock-beginning-of-syntax-function
- syntax-begin-function
- fontification-functions
- jit-lock-context-unfontify-pos
- jit-lock-mode
- ;; Mumamo
- font-lock-fontify-buffer-function
- jit-lock-contextually
- jit-lock-functions
- ;; More symbols from visual inspection
- before-change-functions
- delayed-mode-hooks
- isearch-mode
- line-move-ignore-invisible
- local-abbrev-table
- ;;syntax-ppss-last
- ;;syntax-ppss-cache
-
- ;; Cua
- cua--explicit-region-start
- ;; Viper
- viper--intercept-key-maps
- viper--key-maps
- viper-ALPHA-char-class
- viper-current-state
- viper-emacs-global-user-minor-mode
- viper-emacs-intercept-minor-mode
- viper-emacs-kbd-minor-mode
- viper-emacs-local-user-minor-mode
- viper-emacs-state-modifier-minor-mode
- viper-insert-basic-minor-mode
- viper-insert-diehard-minor-mode
- viper-insert-global-user-minor-mode
- viper-insert-intercept-minor-mode
- viper-insert-kbd-minor-mode
- viper-insert-local-user-minor-mode
- viper-insert-minibuffer-minor-mode
- viper-insert-point
- viper-insert-state-modifier-minor-mode
- viper-intermediate-command
- viper-last-posn-while-in-insert-state
- viper-minibuffer-current-face
- viper-mode-string
- viper-non-word-characters
- viper-replace-minor-mode
- viper-replace-overlay
- viper-undo-functions
- viper-undo-needs-adjustment
- viper-vi-basic-minor-mode
- viper-vi-diehard-minor-mode
- viper-vi-global-user-minor-mode
- viper-vi-intercept-minor-mode
- viper-vi-kbd-minor-mode
- viper-vi-local-user-minor-mode
- viper-vi-minibuffer-minor-mode
- viper-vi-state-modifier-minor-mode
- ;; hs minor mode
- hs-adjust-block-beginning
- hs-block-start-mdata-select
- hs-block-start-regexp
- hs-c-start-regexp
- hs-forward-sexp-func
- hs-minor-mode
- ;; Imenu
- imenu-case-fold-search
- imenu-generic-expression
- ;; Fix-me: add more here
- ))
-
-(defun mumamo-get-relevant-buffer-local-vars ()
- "Get list of buffer local variables to save.
-Like `buffer-local-variables', but remove variables that are
-known to not be necessary to save for fontification, indentation
-or filling \(or that can even disturb things)."
- (let (var-vals)
- (dolist (vv (buffer-local-variables))
- (unless (or (not (listp vv))
- (memq (car vv) mumamo-irrelevant-buffer-local-vars)
- (let* ((sym (car vv))
- (val (symbol-value sym)))
- (or (markerp val)
- (overlayp val))))
- (let ((ent (list (car vv) (custom-quote (cdr vv)))))
- (setq var-vals (cons ent var-vals)))))
- ;; Sorting is for debugging/testing
- (setq var-vals (sort var-vals
- (lambda (a b)
- (string< (symbol-name (car a))
- (symbol-name (car b))))))
- var-vals))
-
-(defvar mumamo-major-modes-local-maps nil
- "An alist with major mode and local map.
-An entry in the list looks like
-
- \(MAJOR-MODE LOCAL-KEYMAP)")
-
-;; (defun mumamo-font-lock-keyword-hook-symbol (major)
-;; "Return hook symbol for adding font-lock keywords to MAJOR."
-;; (intern (concat "mumamo-" (symbol-name major) "-font-lock-keyword-hook")))
-
-;; (defun mumamo-remove-font-lock-hook (major setup-fun)
-;; "For mode MAJOR remove function SETUP-FUN.
-;; See `mumamo-add-font-lock-hook' for more information."
-;; (remove-hook (mumamo-font-lock-keyword-hook-symbol major) setup-fun))
-
-(defun mumamo-refresh-multi-font-lock (major)
- "Refresh font lock information for mode MAJOR in chunks.
-If multi fontification functions for major mode MAJOR is already
-setup up they will be refreshed.
-
-If MAJOR is nil then all font lock information for major modes
-used in chunks will be refreshed.
-
-After calling font-lock-add-keywords or changing the
-fontification in other ways you must call this function for the
-changes to take effect. However already fontified buffers will
-not be refontified. You can use `normal-mode' to refontify
-them.
-
-Fix-me: Does not work yet."
-
- (setq mumamo-internal-major-modes-alist
- (if (not major)
- nil
- (assq-delete-all major mumamo-internal-major-modes-alist))))
-
-;; RMS had the following idea:
-;;
-;; Suppose we add a Lisp primitive to bind a set of variables under
-;; the control of an alist. Would it be possible to eliminate these
-;; helper functions and use that primitive instead?
-;;
-;;; But wouldn't it be better to test this version first? There is
-;;; no hurry, this version works and someone might find that there
-;;; is a better way to do this than with helper functions.
-;;
-;; OK with me, as long as this point doesn't get forgotten.
-(defun mumamo-fetch-major-mode-setup (major keywords mode-keywords add-keywords how)
- "Return a helper function to do fontification etc like in major mode MAJOR.
-Fetch the variables affecting font locking, indentation and
-filling by calling the major mode MAJOR in a temporary buffer.
-
-Make a function with one parameter BODY which is elisp code to
-eval. The function should let bind the variables above, sets the
-syntax table temporarily to the one used by the major mode
-\(using the mode symbol name to find it) and then evaluates body.
-
-Name this function mumamo-eval-in-MAJOR. Put the code for this
-function in the property `mumamo-defun' on this function symbol.
-
-
-** Some notes about background etc.
-
-The function made here is used in `mumamo-with-major-mode-setup'.
-The code in the function parameter BODY is typically involved in
-fontification, indentation or filling.
-
-The main reasons for doing it this way is:
-
-- It is faster and than setting the major mode directly.
-- It does not affect buffer local variables."
- ;; (info "(elisp) Other Font Lock Variables")
- ;; (info "(elisp) Syntactic Font Lock)
- ;;(msgtrc "fetch-major 1: font-lock-keywords-only =%s" font-lock-keywords-only)
- (let ((func-sym (intern (concat "mumamo-eval-in-" (symbol-name major))))
- (func-def-sym (intern (concat "mumamo-def-eval-in-" (symbol-name major))))
- ;;(add-keywords-hook (mumamo-font-lock-keyword-hook-symbol major))
- byte-compiled-fun
- (fetch-func-definition `(lambda (body))) ;;`(defun ,func-sym (body)))
- temp-buf-name
- temp-buf)
- ;; font-lock-mode can't be turned on in buffers whose names start
- ;; with a char with white space syntax. Temp buffer names are
- ;; such and it is not possible to change name of a temp buffer.
- (setq temp-buf-name (concat "mumamo-fetch-major-mode-setup-" (symbol-name major)))
- (setq temp-buf (get-buffer temp-buf-name))
- (when temp-buf (kill-buffer temp-buf))
- (setq temp-buf (get-buffer-create temp-buf-name))
- ;;(msgtrc "fetch-major-mode-setup in buffer %s, after-chunk=%s, before with-current-buffer" (current-buffer) (when (boundp 'after-chunk) after-chunk))
- (with-current-buffer temp-buf
-
- (mumamo-msgfntfy "mumamo-fetch-major-mode-setup %s" major)
- (let ((mumamo-fetching-major t)
- mumamo-multi-major-mode)
- ;;(msgtrc "fetch-major-mode-setup in buffer %s, before (funcall %s)" (current-buffer) major)
- (funcall major)
- )
-
- (mumamo-msgfntfy ">>> mumamo-fetch-major-mode-setup A font-lock-mode=%s" font-lock-mode)
- (font-lock-mode 1)
- (mumamo-msgfntfy "<<< mumamo-fetch-major-mode-setup B font-lock-mode=%s" font-lock-mode)
- (mumamo-msgfntfy "mumamo-fetch-major-mode-setup: fetching jit-lock-after-change-extend-region-functions A=%s" jit-lock-after-change-extend-region-functions)
-
- ;; Note: font-lock-set-defaults must be called before adding
- ;; keywords. Otherwise Emacs loops. I have no idea why. Hm,
- ;; probably wrong, it is likely to be nxhtml-mumamo that is the
- ;; problem. Does not loop in html-mumamo.
- ;;(msgtrc "\n--------------------")
- (font-lock-set-defaults)
- ;; Fix-me: but hi-lock still does not work... what have I
- ;; forgotten??? font-lock-keywords looks ok...
- (when keywords
- (if add-keywords
- (progn
- ;;(msgtrc "fetch:font-lock-add-keywords %S %S %S" (if mode-keywords major nil) keywords how)
- (font-lock-add-keywords (if mode-keywords major nil) keywords how)
- ;;(font-lock-add-keywords major keywords how)
- ;;(msgtrc "fetch:font-lock-keywords=%S" font-lock-keywords)
- )
- (font-lock-remove-keywords (if mode-keywords major nil) keywords)
- ;;(font-lock-remove-keywords major keywords)
- )
- (unless mode-keywords (font-lock-mode -1) (font-lock-mode 1))
- ;;(msgtrc "fetch-major-mode-setup:font-lock-keywords=%S" font-lock-keywords)
- )
- ;;(run-hooks add-keywords-hook)
-
- (add-to-list 'mumamo-major-modes-local-maps
- (let ((local-map (current-local-map)))
- (cons major-mode (if local-map
- (copy-keymap local-map)
- 'no-local-map))))
-
- (mumamo-msgfntfy "mumamo-fetch-major-mode-setup: fetching jit-lock-after-change-extend-region-functions B=%s" jit-lock-after-change-extend-region-functions)
- (let* ((syntax-sym (intern-soft (concat (symbol-name major) "-syntax-table")))
- (fetch-func-definition-let
- ;; Be XML compliant:
- (list
- (list 'sgml-xml-mode
- ;;(when (mumamo-derived-from-mode ',major 'sgml-mode) t))
- (when (mumamo-derived-from-mode major 'sgml-mode) t))
-
- ;; We need to copy the variables that we need and
- ;; that are not automatically buffer local, but
- ;; could be it. Arguably it is a bug if they are not
- ;; buffer local though we have to adapt.
-
- ;; From cc-mode.el:
- (list 'indent-line-function (custom-quote indent-line-function))
- (list 'indent-region-function (custom-quote indent-region-function))
- (list 'normal-auto-fill-function (custom-quote normal-auto-fill-function))
- (list 'comment-start (custom-quote comment-start))
- (list 'comment-end (custom-quote comment-end))
- (list 'comment-start-skip (custom-quote comment-start-skip))
- (list 'comment-end-skip (custom-quote comment-end-skip))
- (list 'comment-multi-line (custom-quote comment-multi-line))
- (list 'comment-line-break-function (custom-quote comment-line-break-function))
- (list 'paragraph-start (custom-quote paragraph-start))
- (list 'paragraph-separate (custom-quote paragraph-separate))
- (list 'paragraph-ignore-fill-prefix (custom-quote paragraph-ignore-fill-prefix))
- (list 'adaptive-fill-mode (custom-quote adaptive-fill-mode))
- (list 'adaptive-fill-regexp (custom-quote adaptive-fill-regexp))
-
- ;;; Try doing the font lock things last, keywords really last
- (list 'font-lock-multiline (custom-quote font-lock-multiline))
- (list 'font-lock-extend-after-change-region-function (custom-quote font-lock-extend-after-change-region-function))
- (list 'font-lock-extend-region-functions (custom-quote font-lock-extend-region-functions))
- (list 'font-lock-comment-start-skip (custom-quote font-lock-comment-start-skip))
- (list 'font-lock-comment-end-skip (custom-quote font-lock-comment-end-skip))
- (list 'font-lock-syntactic-keywords (custom-quote font-lock-syntactic-keywords))
-
- (list 'font-lock-keywords (custom-quote font-lock-keywords))
- ;;(list 'font-lock-keywords-alist (custom-quote font-lock-keywords-alist))
- ;;(list 'font-lock-removed-keywords-alist (custom-quote font-lock-removed-keywords-alist))
-
- ;; Fix-me: uncommenting this line (as it should be)
- ;; sets font-lock-keywords-only to t globally...: bug 3467
- (list 'font-lock-keywords-only (custom-quote font-lock-keywords-only))
-
- (list 'font-lock-keywords-case-fold-search (custom-quote font-lock-keywords-case-fold-search))
-
- (list 'font-lock-set-defaults t) ; whether we have set up defaults.
-
- ;; Set from font-lock-defaults normally:
- (list 'font-lock-defaults (custom-quote (copy-tree font-lock-defaults)))
- ;; Syntactic Font Lock
- (list 'font-lock-syntax-table (custom-quote font-lock-syntax-table)) ;; See nXhtml bug 400415
- (list 'syntax-begin-function (custom-quote syntax-begin-function))
- (list 'font-lock-syntactic-face-function (custom-quote font-lock-syntactic-face-function))
-
- ;; Other Font Lock Variables
- (list 'font-lock-mark-block-function (custom-quote font-lock-mark-block-function))
- (list 'font-lock-extra-managed-props (custom-quote font-lock-extra-managed-props))
- ;; This value is fetched from font-lock:
- (list 'font-lock-fontify-buffer-function (custom-quote font-lock-fontify-buffer-function))
- (list 'font-lock-unfontify-buffer-function (custom-quote font-lock-unfontify-buffer-function))
- (list 'font-lock-fontify-region-function (custom-quote font-lock-fontify-region-function))
- (list 'font-lock-unfontify-region-function (custom-quote font-lock-unfontify-region-function))
-
- ;; Jit Lock Variables
- (list 'jit-lock-after-change-extend-region-functions (custom-quote jit-lock-after-change-extend-region-functions))
-
- ;;(list 'syntax-table (custom-quote (copy-syntax-table (syntax-table))))
- ;;(list 'mumamo-original-syntax-begin-function (custom-quote syntax-begin-function))
- (list 'syntax-begin-function (custom-quote syntax-begin-function))
- (list 'fill-paragraph-function (custom-quote fill-paragraph-function))
- (list 'fill-forward-paragraph-function
- (when (boundp 'fill-forward-paragraph-function)
- (custom-quote fill-forward-paragraph-function)))
-
- ;; newcomment
- (list 'comment-use-global-state (custom-quote (when (boundp 'comment-use-global-state) comment-use-global-state)))
-
- ;; parsing sexps
- (list 'multibyte-syntax-as-symbol (custom-quote multibyte-syntax-as-symbol))
- (list 'parse-sexp-ignore-comments (custom-quote parse-sexp-ignore-comments))
- (list 'parse-sexp-lookup-properties (custom-quote parse-sexp-lookup-properties))
- ;; fix-me: does not the next line work?
- (list 'forward-sexp-function (custom-quote forward-sexp-function))
- ))
- (relevant-buffer-locals (mumamo-get-relevant-buffer-local-vars))
- )
- ;;(append '(1 2) '(3 4) '((eval body)))
- (mumamo-msgfntfy "===========> before setq fetch-func-definition %s" func-sym)
- ;; Avoid doublets
- (dolist (fetched fetch-func-definition-let)
- (let ((fvar (car fetched)))
- (setq relevant-buffer-locals (assq-delete-all fvar relevant-buffer-locals))))
- (setq fetch-func-definition
- (append fetch-func-definition
- `((let ,(append fetch-func-definition-let
- relevant-buffer-locals)
- (with-syntax-table ,(if syntax-sym
- syntax-sym
- '(standard-syntax-table));;'syntax-table
- ;; fix-me: Protect against font-lock-keywords-only to t globally...: bug 3467
- ;;(msgtrc "%s enter 1: font-lock-keywords-only def=%s, body=%S" ',major (default-value 'font-lock-keywords-only) body)
- (let (;(font-lock-keywords-only font-lock-keywords-only)
- ret)
- ;;(msgtrc "%s enter 2: font-lock-keywords-only def=%s" ',major (default-value 'font-lock-keywords-only))
- (setq ret (eval body))
- ;;(msgtrc "%s exit 1: font-lock-keywords-only def=%s" ',major (default-value 'font-lock-keywords-only))
- ret))
- ;;(msgtrc "in %s 1: font-lock-keywords-only =%s in buffer %s, def=%s" ',func-sym font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- )
- ;;(msgtrc "in %s 2: font-lock-keywords-only =%s in buffer %s, def=%s" ',func-sym font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- ;;(message "backtrace there:\n%s" (with-output-to-string (backtrace)))
- )))
-
- (setq byte-compiled-fun (let ((major-syntax-table))
- (byte-compile fetch-func-definition)))
- (assert (functionp byte-compiled-fun))
- (unless keywords
- (eval `(defvar ,func-sym nil))
- (eval `(defvar ,func-def-sym ,fetch-func-definition))
- (set func-sym byte-compiled-fun) ;; Will be used as default
- (assert (functionp (symbol-value func-sym)) t)
- (funcall (symbol-value func-sym) nil)
- (put func-sym 'permanent-local t)
- (put func-def-sym 'permanent-local t))))
- (kill-buffer temp-buf)
- ;; Use the new value in current buffer.
- (when keywords
- ;;(set (make-local-variable func-sym) (symbol-value func-sym))
- ;;(msgtrc "fetch: major=%s func-def-sym=%s cb=%s fetch-func-definition=%s" major func-def-sym (current-buffer) fetch-func-definition)
- ;;(msgtrc "fetch: major=%s func-def-sym=%s cb=%s fetch-func-definition" major func-def-sym (current-buffer))
- (set (make-local-variable func-sym) byte-compiled-fun)
- (set (make-local-variable func-def-sym) fetch-func-definition)
- (put func-sym 'permanent-local t)
- (put func-def-sym 'permanent-local t))
- (assert (functionp (symbol-value func-sym)) t)
- ;; return a list def + fun
- (cons func-sym func-def-sym)))
-
-;; Fix-me: maybe a hook in font-lock-add-keywords??
-(defun mumamo-ad-font-lock-keywords-helper (major keywords how add-keywords)
- ;;(msgtrc "ad-font-lock-keywords-helper %s %s %s %s" major keywords how add-keywords)
- (if major
- (mumamo-fetch-major-mode-setup major keywords t t how)
- ;; Fix-me: Can't do that, need a list of all
- ;; mumamo-current-chunk-family chunk functions major
- ;; modes. But this is impossible since the major modes might
- ;; be determined dynamically. As a work around look in current
- ;; chunks.
- (let ((majors (list (mumamo-main-major-mode))))
- (dolist (entry mumamo-internal-major-modes-alist)
- (let ((major (car entry))
- (fun-var-sym (caadr entry)))
- (when (local-variable-p fun-var-sym)
- (setq majors (cons (car entry) majors)))))
- (dolist (major majors)
- (setq major (mumamo-get-major-mode-substitute major 'fontification))
- ;;(msgtrc "(fetch-major-mode-setup %s %s %s %s %s)" major keywords nil t how)
- (mumamo-fetch-major-mode-setup major keywords nil add-keywords how))
- ;;(font-lock-mode -1) (font-lock-mode 1)
- )))
-
-;; Fix-me: This has stopped working again 2009-11-04, but I do not know when it began...
-(defadvice font-lock-add-keywords (around
- mumamo-ad-font-lock-add-keywords
- activate
- compile)
- (if (or (boundp 'mumamo-fetching-major) (boundp 'mumamo-add-font-lock-called) (not mumamo-multi-major-mode))
- ad-do-it
- (let (mumamo-multi-major-mode
- mumamo-add-font-lock-called
- (major (ad-get-arg 0))
- (keywords (ad-get-arg 1))
- (how (ad-get-arg 2)))
- (mumamo-ad-font-lock-keywords-helper major keywords how t))))
-
-(defadvice font-lock-remove-keywords (around
- mumamo-ad-font-lock-remove-keywords
- activate
- compile)
- (if (or (boundp 'mumamo-fetching-major) (boundp 'mumamo-add-font-lock-called) (not mumamo-multi-major-mode))
- ad-do-it
- (let (mumamo-multi-major-mode
- mumamo-add-font-lock-called
- (major (ad-get-arg 0))
- (keywords (ad-get-arg 1)))
- (mumamo-ad-font-lock-keywords-helper major keywords nil nil))))
-
-(defun mumamo-bad-mode ()
- "MuMaMo replacement for a major mode that could not be loaded."
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'mumamo-bad-mode)
- (setq mode-name
- (propertize "Mumamo Bad Mode"
- 'face 'font-lock-warning-face)))
-
-;;(mumamo-get-major-mode-setup 'css-mode)
-;;(mumamo-get-major-mode-setup 'fundamental-mode)
-(defun mumamo-get-major-mode-setup (use-major)
- "Return function for evaluating code in major mode USE-MAJOR.
-Fix-me: This doc string is wrong, old:
-
-Get local variable values for major mode USE-MAJOR. These
-variables are used for indentation and fontification. The
-variables are returned in a list with the same format as
-`mumamo-fetch-major-mode-setup'.
-
-The list of local variable values which is returned by this
-function is cached in `mumamo-internal-major-modes-alist'. This
-avoids calling the major mode USE-MAJOR for each chunk during
-fontification and speeds up fontification significantly."
- ;; Fix-me: Problems here can cause mumamo to loop badly when this
- ;; function is called over and over again. To avoid this add a
- ;; temporary entry using mumamo-bad-mode while trying to fetch the
- ;; correct mode.
-
- ;;(assq 'mumamo-bad-mode mumamo-internal-major-modes-alist)
- (let ((use-major-entry (assq use-major mumamo-internal-major-modes-alist))
- bad-mode-entry
- dummy-entry
- fun-var-sym
- fun-var-def-sym)
- (unless use-major-entry
- ;; Get mumamo-bad-mode entry and add a dummy entry based on
- ;; this to avoid looping.
- (setq bad-mode-entry
- (assq 'mumamo-bad-mode mumamo-internal-major-modes-alist))
- (unless bad-mode-entry
- ;; Assume it is safe to get the mumamo-bad-mode entry ;-)
- (add-to-list 'mumamo-internal-major-modes-alist
- (list 'mumamo-bad-mode
- (mumamo-fetch-major-mode-setup 'mumamo-bad-mode nil nil nil nil)))
- (setq bad-mode-entry
- (assq 'mumamo-bad-mode mumamo-internal-major-modes-alist)))
- (setq dummy-entry (list use-major (cadr bad-mode-entry)))
- ;; Before fetching setup add the dummy entry and then
- ;; immediately remove it.
- (add-to-list 'mumamo-internal-major-modes-alist dummy-entry)
- (setq use-major-entry (list use-major
- (mumamo-fetch-major-mode-setup use-major nil nil nil nil)))
- (setq mumamo-internal-major-modes-alist
- (delete dummy-entry
- mumamo-internal-major-modes-alist))
- (add-to-list 'mumamo-internal-major-modes-alist use-major-entry))
- (setq fun-var-sym (caadr use-major-entry))
- (setq fun-var-def-sym (cdadr use-major-entry))
- (assert (functionp (symbol-value fun-var-sym)) t)
- (assert (eq 'lambda (car (symbol-value fun-var-def-sym))) t)
- ;; Always make a buffer local value for keywords.
- (unless (local-variable-p fun-var-sym)
- (set (make-local-variable fun-var-sym) (symbol-value fun-var-sym))
- (set (make-local-variable fun-var-def-sym) (symbol-value fun-var-def-sym)))
- (caadr (or (assq use-major mumamo-internal-major-modes-alist)
- ))))
-;; (assq use-major
-;; (add-to-list 'mumamo-internal-major-modes-alist
-;; (list use-major
-;; (mumamo-fetch-major-mode-setup
-;; use-major nil nil nil))))))))
-
-(defun mumamo-remove-all-chunk-overlays ()
- "Remove all CHUNK overlays from the current buffer."
- (save-restriction
- (widen)
- (mumamo-delete-new-chunks)))
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Creating and accessing chunks
-
-(defun mumamo-define-no-mode (mode-sym)
- "Fallback major mode when no major mode for MODE-SYM is found."
- (let ((mumamo-repl4 (intern (format "mumamo-4-%s" mode-sym)))
- (lighter (format "No %s" mode-sym))
- (doc (format "MuMaMo replacement for %s which was not found."
- mode-sym)))
- (if (commandp mumamo-repl4)
- mumamo-repl4
- (eval `(defun ,mumamo-repl4 ()
- ,doc
- (interactive)
- (kill-all-local-variables)
- (setq major-mode ',mumamo-repl4)
- (setq mode-name
- (propertize ,lighter
- 'face 'font-lock-warning-face)))))))
-;;(mumamo-define-no-mode 'my-ownB-mode)
-
-;;(mumamo-major-mode-from-modespec 'javascript-mode)
-(defun mumamo-major-mode-from-modespec (major-spec)
- "Translate MAJOR-SPEC to a major mode.
-Translate MAJOR-SPEC used in chunk definitions of multi major
-modes to a major mode.
-
-See `mumamo-major-modes' for an explanation."
- (mumamo-major-mode-from-spec major-spec mumamo-major-modes))
-
-(defun mumamo-major-mode-from-spec (major-spec table)
- (unless major-spec
- (mumamo-backtrace "mode-from-modespec, major-spec is nil"))
- (let ((modes (cdr (assq major-spec table)))
- (mode 'mumamo-bad-mode))
- (setq mode
- (catch 'mode
- (dolist (m modes)
- (when (functionp m)
- (let ((def (symbol-function m)))
- (when (and (listp def)
- (eq 'autoload (car def)))
- (mumamo-condition-case err
- (load (nth 1 def))
- (error (setq m nil)))))
- (when m (throw 'mode m))))
- nil))
- (unless mode
- (if (functionp major-spec)
- ;; As a last resort allow spec to be a major mode too:
- (setq mode major-spec)
- (if modes
- (mumamo-warn-once '(mumamo-major-mode-from-modespec)
- "Couldn't find an available major mode for specification %s,\n alternatives are:\n %s"
- major-spec modes)
- (mumamo-warn-once '(mumamo-major-mode-from-modespec)
- "Couldn't find an available major mode for spec %s"
- major-spec))
- ;;(setq mode 'fundamental-mode)
- (setq mode (mumamo-define-no-mode major-spec))
- ))
- (mumamo-msgfntfy " mumamo-major-mode-from-modespec %s => %s" major-spec mode)
- mode))
-
-(defun mumamo-get-existing-new-chunk-at (pos &optional first)
- "Return last existing chunk at POS if any.
-However if FIRST get first existing chunk at POS instead."
- ;;(msgtrc "(mumamo-get-existing-new-chunk-at %s)" pos)
- (let ((chunk-ovl)
- (orig-pos pos))
- (when (= pos (point-max))
- (setq pos (1- pos)))
- (when (= pos 0) (setq pos 1))
- (dolist (o (overlays-in pos (1+ pos)))
- (when (and (overlay-get o 'mumamo-is-new)
- ;; Because overlays-in need to have a range of length
- ;; > 0 we might have got overlays that is after our
- ;; orig-pos:
- (<= (overlay-start o) orig-pos))
- ;; There can be two, choose the last or first depending on
- ;; FIRST.
- (if chunk-ovl
- ;; (when (or (> (overlay-end o) (overlay-start o))
- ;; (overlay-get o 'mumamo-prev-chunk))
- (when (if first
- (< (overlay-end o) (overlay-end chunk-ovl))
- (> (overlay-end o) (overlay-end chunk-ovl))
- )
- (setq chunk-ovl o))
- (setq chunk-ovl o))))
- chunk-ovl))
-
-(defun mumamo-get-chunk-save-buffer-state (pos)
- "Return chunk overlay at POS. Preserve state."
- (let (chunk)
- ;;(mumamo-save-buffer-state nil
- ;;(setq chunk (mumamo-get-chunk-at pos)))
- (setq chunk (mumamo-find-chunks pos "mumamo-get-chunk-save-buffer-state"))
- ;;)
- chunk))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Chunk and chunk family properties
-
-(defun mumamo-syntax-maybe-completable (pnt)
- "Return non-nil if at point PNT non-printable characters may occur.
-This just considers existing chunks."
- (let* ((chunk (mumamo-find-chunks pnt "mumamo-syntax-maybe-completable"))
- syn-min-max)
- (if (not chunk)
- t
- (mumamo-update-obscure chunk pnt)
- (setq syn-min-max (mumamo-chunk-syntax-min-max chunk nil))
- ;;(and (> pnt (1+ (mumamo-chunk-syntax-min chunk)))
- (and (> pnt (1+ (car syn-min-max)))
- ;;(< pnt (1- (mumamo-chunk-syntax-max chunk)))))))
- (< pnt (1- (cdr syn-min-max)))))))
-
-(defvar mumamo-current-chunk-family nil
- "The currently used chunk family.")
-(make-variable-buffer-local 'mumamo-current-chunk-family)
-(put 'mumamo-current-chunk-family 'permanent-local t)
-
-;; (defvar mumamo-main-major-mode nil)
-;; (make-variable-buffer-local 'mumamo-main-major-mode)
-;; (put 'mumamo-main-major-mode 'permanent-local t)
-
-(defun mumamo-main-major-mode ()
- "Return major mode used when there are no chunks."
- (let ((mm (cadr mumamo-current-chunk-family)))
- (if mm mm
- (msgtrc "main-major-mode => nil, mumamo-current-chunk-family=%s" mumamo-current-chunk-family))))
-;;; (let ((main (cadr mumamo-current-chunk-family)))
-;;; (if main
-;;; main
-;;; mumamo-main-major-mode)))
-
-;; (defun mumamo-unset-chunk-family ()
-;; "Set chunk family to nil, ie undecided."
-;; (interactive)
-;; (setq mumamo-current-chunk-family nil))
-
-;; (defun mumamo-define-chunks (chunk-family)
-;; "Set the CHUNK-FAMILY used to divide the buffer."
-;; (setq mumamo-current-chunk-family chunk-family))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; General chunk search routines
-
-;; search start forward
-
-;;(defun mumamo-search-fw-exc-start-str (pos max marker)
-(defun mumamo-chunk-start-fw-str (pos max marker)
- "General chunk function helper.
-A chunk function helper like this can be used in
-`mumamo-find-possible-chunk' to find the borders of a chunk.
-There are several functions like this that comes with mumamo.
-Their names tell what they do. Lets look at the parts of the
-name of this function:
-
- mumamo-chunk: All this helper functions begins so
- -start-: Search for the start of a chunk
- -fw-: Search forward
- -str: Search for a string
-
-Instead of '-start-' there could be '-end-', ie end.
-Instead of '-fw-' there could be '-bw-', ie backward.
-Instead of '-str' there could be '-re', ie regular expression.
-
-There could also be a '-inc' at the end of the name. If the name
-ends with this then the markers should be included in the chunks,
-otherwise not.
-
-The argument POS means where to start the search. MAX means how
-far to search (when searching backwards the argument is called
-'min' instead). MARKER is a string or regular expression (see
-the name) to search for."
- (assert (stringp marker))
- (let ((pm (point-min))
- (cb (current-buffer)))
- (message "cb=%s" cb)
- (goto-char (max pm (- pos (length marker)))))
- (search-forward marker max t))
-
-(defun mumamo-chunk-start-fw-re (pos max marker)
- "General chunk function helper.
-See `mumamo-chunk-start-fw-str' for more information and the
-meaning of POS, MAX and MARKER."
- (assert (stringp marker))
- (goto-char (- pos (length marker)))
- (re-search-forward marker max t))
-
-(defun mumamo-chunk-start-fw-str-inc (pos max marker)
- "General chunk function helper.
-See `mumamo-chunk-start-fw-str' for more information and the
-meaning of POS, MAX and MARKER."
- (assert (stringp marker))
- (goto-char pos)
- (let ((start (search-forward marker max t)))
- (when start (setq start (- start (length marker))))))
-
-;; search start backward
-
-;; (defun mumamo-chunk-start-bw-str (pos min marker)
-;; "General chunk function helper.
-;; See `mumamo-chunk-start-fw-str' for more information and the
-;; meaning of POS, MIN and MARKER."
-;; ;;(assert (stringp marker))
-;; (let (start-in)
-;; (goto-char pos)
-;; (setq start-in (search-backward marker min t))
-;; (when start-in
-;; ;; do not include the marker
-;; (setq start-in (+ start-in (length marker))))
-;; start-in))
-
-;; (defun mumamo-chunk-start-bw-re (pos min marker)
-;; "General chunk function helper.
-;; See `mumamo-chunk-start-fw-str' for more information and the
-;; meaning of POS, MIN and MARKER."
-;; (assert (stringp marker))
-;; (let (start-in)
-;; (goto-char pos)
-;; (setq start-in (re-search-backward marker min t))
-;; (when start-in
-;; ;; do not include the marker
-;; (setq start-in (match-end 0)))
-;; start-in))
-
-;; (defun mumamo-chunk-start-bw-str-inc (pos min marker)
-;; "General chunk function helper.
-;; See `mumamo-chunk-start-fw-str' for more information and the
-;; meaning of POS, MIN and MARKER."
-;; (assert (stringp marker))
-;; (goto-char (+ pos (length marker)))
-;; (search-backward marker min t))
-
-;; search end forward
-
-(defun mumamo-chunk-end-fw-str (pos max marker)
- "General chunk function helper.
-See `mumamo-chunk-start-fw-str' for more information and the
-meaning of POS, MAX and MARKER."
- (assert (stringp marker))
- ;;(goto-char (1+ pos)) ;; 1+ cause otherwise ?> is at point
- (goto-char pos)
- (let (end-in)
- (setq end-in (search-forward marker max t))
- (when end-in
- ;; do not include the marker
- (setq end-in (- end-in (length marker))))
- end-in))
-
-(defun mumamo-chunk-end-fw-re (pos max marker)
- "General chunk function helper.
-See `mumamo-chunk-start-fw-str' for more information and the
-meaning of POS, MAX and MARKER."
- (assert (stringp marker))
- (goto-char (1+ pos)) ;; 1+ cause otherwise ?> is at point
- (let (end-in)
- (setq end-in (re-search-forward marker max t))
- (when end-in
- ;; do not include the marker
- (setq end-in (match-beginning 0)))
- end-in))
-
-(defun mumamo-chunk-end-fw-str-inc (pos max marker)
- "General chunk function helper.
-See `mumamo-chunk-start-fw-str' for more information and the
-meaning of POS, MAX and MARKER."
- (assert (stringp marker))
- ;;(goto-char (1+ pos)) ;; 1+ cause otherwise ?> is at point
- (goto-char (1+ (- pos (length marker))))
- ;;(msgtrc "mumamo-chunk-end-fw-str-inc %s %s %s, point=%s point-max=%s" pos max marker (point) (point-max))
- (search-forward marker max t))
-
-;; search end backward
-
-;; (defun mumamo-chunk-end-bw-str (pos min marker)
-;; "General chunk function helper.
-;; See `mumamo-chunk-start-fw-str' for more information and the
-;; meaning of POS, MIN and MARKER."
-;; (assert (stringp marker))
-;; (goto-char (+ pos (length marker)))
-;; (search-backward marker min t))
-
-;; (defun mumamo-chunk-end-bw-re (pos min marker)
-;; "General chunk function helper.
-;; See `mumamo-chunk-start-fw-str' for more information and the
-;; meaning of POS, MIN and MARKER."
-;; (assert (stringp marker))
-;; (goto-char (+ pos (length marker)))
-;; (re-search-backward marker min t))
-
-(defun mumamo-chunk-end-bw-str-inc (pos min marker)
- "General chunk function helper.
-See `mumamo-chunk-start-fw-str' for more information and the
-meaning of POS, MIN and MARKER."
- (assert (stringp marker))
- (goto-char pos)
- (let ((end (search-backward marker min t)))
- (when end (setq end (+ end (length marker))))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; General chunk routines
-
-;; (defvar mumamo-known-chunk-start nil "Internal use only!.")
-
-(defconst mumamo-string-syntax-table
- (let ((tbl (copy-syntax-table)))
- (modify-syntax-entry ?\" "\"" tbl)
- (modify-syntax-entry ?\' "\"" tbl)
- tbl)
- "Just for \"..\" and '...'.")
-
-;; "..." '...' "..'.." '.."..'
-(defun mumamo-guess-in-string (pos)
- "If POS is in a string then return string start position.
-Otherwise return nil."
- (when (and (>= pos (point-min)))
- (let ((here (point))
- (inhibit-field-text-motion t)
- line-beg
- parsed
- str-char
- str-pos)
- (goto-char pos)
- (setq line-beg (line-beginning-position))
- (setq parsed (with-syntax-table mumamo-string-syntax-table
- (parse-partial-sexp line-beg pos)))
- (setq str-char (nth 3 parsed))
- (when str-char
- (skip-chars-backward (string ?^ str-char))
- (setq str-pos (point)))
- (goto-char here)
- str-pos)))
-
-;;; The main generic chunk routine
-
-;; Fix-me: new routine that really search forward only. Rewrite
-;; `mumamo-quick-static-chunk' first with this.
-(defun mumamo-possible-chunk-forward (pos
- max
- chunk-start-fun
- chunk-end-fun
- &optional borders-fun)
- "Search forward from POS to MAX for possible chunk.
-Return as a list with values
-
- \(START END CHUNK-MAJOR BORDERS PARSEABLE-BY CHUNK-END-FUN BORDERS-FUN)
-
-START and END are start and end of the possible chunk.
-CHUNK-MAJOR is the major mode specifier for this chunk. \(Note
-that this specifier is translated to a major mode through
-`mumamo-major-modes'.)
-
-START-BORDER and END-BORDER may be nil. Otherwise they should be
-the position where the border ends respectively start at the
-corresponding end of the chunk.
-
-BORDERS is the return value of the optional BORDERS-FUN which
-takes three parameters, START, END and EXCEPTION-MODE in the
-return values above. BORDERS may be nil and otherwise has this
-format:
-
- \(START-BORDER END-BORDER CHUNK-MAJOR CHUNK-END-FUN)
-
-PARSEABLE-BY is a list of major modes with parsers that can parse
-the chunk.
-
-CHUNK-START-FUN and CHUNK-END-FUN should be functions that
-searches forward from point for start and end of chunk. They
-both take two parameters, POS and MAX above. If no possible
-chunk is found both these functions should return nil, otherwise
-see below.
-
-CHUNK-START-FUN should return a list of the form below if a
-possible chunk is found:
-
- (START CHUNK-MAJOR PARSEABLE-BY)
-
-CHUNK-END-FUN should return the end of the chunk.
-
-"
- ;;(msgtrc "possible-chunk-forward %s %s" pos max)
- (let ((here (point))
- start-rec
- start
- end
- chunk-major
- parseable-by
- borders
- ret
- )
- (goto-char pos)
- ;; Fix-me: check valid. Should this perhaps be done in the
- ;; function calling this instead?
- ;;(mumamo-end-in-code syntax-min syntax-max curr-major)
- (setq start-rec (funcall chunk-start-fun (point) max))
- (when start-rec
- (setq start (nth 0 start-rec))
- (setq chunk-major (nth 1 start-rec))
- (setq parseable-by (nth 2 start-rec))
- (goto-char start)
- ;; Fix-me: check valid
- ;;(setq end (funcall chunk-end-fun (point) max))
- (when borders-fun
- (let ((start-border (when start (unless (and (= 1 start)
- (not chunk-major))
- start)))
- (end-border (when end (unless (and (= (point-max) end)
- (not chunk-major))
- end))))
- (setq borders (funcall borders-fun start-border end-border chunk-major))))
- (setq ret (list start end chunk-major borders parseable-by chunk-end-fun borders-fun)))
- (goto-char here)
- ret))
-
-;; Fix-me: This routine has some difficulties. One of the more
-;; problematic things is that chunk borders may depend on the
-;; surrounding chunks syntax. Patterns that possibly could be chunk
-;; borders might instead be parts of comments or strings in cases
-;; where they should not be valid borders there.
-(defun mumamo-find-possible-chunk (pos
- min max
- bw-exc-start-fun ;; obsolete
- bw-exc-end-fun
- fw-exc-start-fun
- fw-exc-end-fun
- &optional find-borders-fun)
- (mumamo-find-possible-chunk-new pos
- ;;min
- max
- bw-exc-start-fun
- ;;bw-exc-end-fun
- fw-exc-start-fun
- fw-exc-end-fun
- find-borders-fun))
-
-(defun mumamo-find-possible-chunk-new (pos
- ;;min
- max
- bw-exc-start-fun
- ;;bw-exc-end-fun
- fw-exc-start-fun
- fw-exc-end-fun
- &optional find-borders-fun)
- ;; This should return no end value!
- "Return list describing a possible chunk that starts after POS.
-No notice is taken about existing chunks and no chunks are
-created. The description returned is for the smallest possible
-chunk which is delimited by the function parameters.
-
-POS must be less than MAX.
-
-The function BW-EXC-START-FUN takes two parameters, POS and
-MIN. It should search backward from POS, bound by MIN, for
-exception start and return a cons or a list:
-
- \(FOUND-POS . EXCEPTION-MODE)
- \(FOUND-POS EXCEPTION-MODE PARSEABLE-BY)
-
-Here FOUND-POS is the start of the chunk. EXCEPTION-MODE is the
-major mode specifier for this chunk. \(Note that this specifier
-is translated to a major mode through `mumamo-major-modes'.)
-
-PARSEABLE-BY is a list of parsers that can handle the chunk
-beside the one that may be used by the chunks major mode.
-Currently only the XML parser in `nxml-mode' is recognized. In
-this list it should be the symbol `nxml-mode'.
-
-The functions FW-EXC-START-FUN and FW-EXC-END-FUN should search
-for exception start or end, forward resp backward. Those two
-takes two parameters, start position POS and max position MAX,
-and should return just the start respectively the end of the
-chunk.
-
-For all three functions the position returned should be nil if
-search fails.
-
-
-Return as a list with values
-
- \(START END EXCEPTION-MODE BORDERS PARSEABLE-BY FR-EXC-FUN FIND-BORDERS-FUN)
-
-**Fix-me: FIND-BORDERS-FUN must be split for chunks-in-chunks!
-
-The bounds START and END are where the exception starts or stop.
-Either of them may be nil, in which case this is equivalent to
-`point-min' respectively `point-max'.
-
-If EXCEPTION-MODE is non-nil that is the submode for this
-range. Otherwise the main major mode should be used for this
-chunk.
-
-BORDERS is the return value of the optional FIND-BORDERS-FUN
-which takes three parameters, START, END and EXCEPTION-MODE in
-the return values above. BORDERS may be nil and otherwise has
-this format:
-
- \(START-BORDER END-BORDER EXCEPTION-MODE FW-EXC-FUN)
-
-START-BORDER and END-BORDER may be nil. Otherwise they should be
-the position where the border ends respectively start at the
-corresponding end of the chunk.
-
-PARSEABLE-BY is a list of major modes with parsers that can parse
-the chunk.
-
-FW-EXC-FUN is the function that finds the end of the chunk. This
-is either FW-EXC-START-FUN or FW-EXC-END-FUN.
-
----- * Note: This routine is used by to create new members for
-chunk families. If you want to add a new chunk family you could
-most often do that by writing functions for this routine. Please
-see the many examples in mumamo-fun.el for how this can be done.
-See also `mumamo-quick-static-chunk'."
- ;;(msgtrc "====")
- ;;(msgtrc "find-poss-new %s %s %s %s %s %s" pos max bw-exc-start-fun fw-exc-start-fun fw-exc-end-fun find-borders-fun)
-
- ;;(mumamo-condition-case err
- (progn
- (assert (and (<= pos max)) nil
- "mumamo-chunk: pos=%s, max=%s, bt=%S"
- pos max (with-output-to-string (backtrace)))
- ;; "in" refers to "in exception" and "out" is then in main
- ;; major mode.
- (let (start-in-cons
- exc-mode
- fw-exc-mode
- fw-exc-fun
- parseable-by
- start-in start-out
- end-in end-out
- start end
- ;;end-of-exception
- wants-end-type
- found-valid-end
- (main-major (mumamo-main-major-mode))
- borders
- border-beg
- border-end)
- ;;;; find start of range
- ;;
- ;; start normal
- ;;
- ;;(setq start-out (funcall bw-exc-end-fun pos min))
- ;; Do not check end here!
- ;;(setq start-out (funcall fw-exc-end-fun pos max))
- ;;(msgtrc "find-poss-new.start-out=%s" start-out)
- ;; start exception
- (setq start-in (funcall fw-exc-start-fun pos max))
- ;;(msgtrc "find-poss-new.start-in=%s" start-in)
- (when (listp start-in)
- (setq fw-exc-mode (nth 1 start-in))
- (setq start-in (car start-in)))
- ;; compare
- (when (and start-in start-out)
- (if (> start-in start-out)
- (setq start-in nil)
- (setq start-out nil)))
- (cond
- (start-in
- (setq start-in-cons (funcall bw-exc-start-fun start-in pos))
- ;;(msgtrc "find-poss-new.start-in=%s start-in-cons=%s" start-in start-in-cons)
- (when start-in-cons
- (assert (= start-in (car start-in-cons)))
- (setq exc-mode (cdr start-in-cons)))
- (setq start start-in))
- (start-out
- (setq start start-out))
- )
- (when (and exc-mode
- (listp exc-mode))
- (setq parseable-by (cadr exc-mode))
- (setq exc-mode (car exc-mode)))
- ;; borders
- (when find-borders-fun
- (let ((start-border (when start (unless (and (= 1 start)
- (not exc-mode))
- start)))
- (end-border (when end (unless (and (= (point-max) end)
- (not exc-mode))
- end))))
- (setq borders (funcall find-borders-fun start-border end-border exc-mode))))
- ;; check
- (setq border-beg (nth 0 borders))
- (setq border-end (nth 1 borders))
- ;;(when start (assert (<= start pos)))
- ;;(assert (or (not start) (= start pos)))
- (when border-beg
- (assert (<= start border-beg)))
- ;; Fix-me: This is just totally wrong in some pieces and a
- ;; desperate try after seeing the problems with wp-app.php
- ;; around line 1120. Maybe this can be used when cutting chunks
- ;; from top to bottom however.
- (when nil ;end
- (let ((here (point))
- end-line-beg
- end-in-string
- start-in-string
- (start-border (or (nth 0 borders) start))
- (end-border (or (nth 1 borders) end)))
- ;; Check if in string
- ;; Fix-me: add comments about why and examples + tests
- ;; Fix-me: must loop to find good borders ....
- (when end
- ;; Fix-me: more careful positions for guess
- (setq end-in-string
- (mumamo-guess-in-string
- ;;(+ end 2)
- (1+ end-border)
- ))
- (when end-in-string
- (when start
- (setq start-in-string
- (mumamo-guess-in-string
- ;;(- start 2)
- (1- start-border)
- )))
- (if (not start-in-string)
- (setq end nil)
- (if exc-mode
- (if (and start-in-string end-in-string)
- ;; If both are in a string and on the same line then
- ;; guess this is actually borders, otherwise not.
- (unless (= start-in-string end-in-string)
- (setq start nil)
- (setq end nil))
- (when start-in-string (setq start nil))
- (when end-in-string (setq end nil)))
- ;; Fix-me: ???
- (when start-in-string (setq start nil))
- ))
- (unless (or start end)
- (setq exc-mode nil)
- (setq borders nil)
- (setq parseable-by nil))))))
-
- (when (or start end exc-mode borders parseable-by)
- (setq fw-exc-fun (if exc-mode
- ;; Fix-me: this is currently correct,
- ;; but will change if exc mode in exc
- ;; mode is allowed.
- fw-exc-end-fun
- ;; Fix-me: these should be collected later
- ;;fw-exc-start-fun
- nil
- ))
- (mumamo-msgfntfy "--- mumamo-find-possible-chunk-new %s" (list start end exc-mode borders parseable-by fw-exc-fun))
- ;;(message "--- mumamo-find-possible-chunk-new %s" (list start end exc-mode borders parseable-by fw-exc-fun))
- (when fw-exc-mode
- (unless (eq fw-exc-mode exc-mode)
- ;;(message "fw-exc-mode=%s NEQ exc-mode=%s" fw-exc-mode exc-mode)
- ))
- ;;(msgtrc "find-poss-new returns %s" (list start end exc-mode borders parseable-by fw-exc-fun find-borders-fun))
- (when fw-exc-fun
- (list start end exc-mode borders parseable-by fw-exc-fun find-borders-fun)))))
- ;;(error (mumamo-display-error 'mumamo-chunk "%s" (error-message-string err)))
-
- ;;)
- )
-
-;; (defun temp-overlays-here ()
-;; (interactive)
-;; (let* ((here (point))
-;; (ovl-at (overlays-at here))
-;; (ovl-in (overlays-in here (1+ here)))
-;; (ovl-in0 (overlays-in here here))
-;; )
-;; (with-output-to-temp-buffer (help-buffer)
-;; (help-setup-xref (list #'temp-overlays-at) (interactive-p))
-;; (with-current-buffer (help-buffer)
-;; (insert (format "overlays-at %s:\n%S\n\n" here ovl-at))
-;; (insert (format "overlays-in %s-%s:\n%S\n\n" here (1+ here) ovl-in))
-;; (insert (format "overlays-in %s-%s:\n%S\n\n" here here ovl-in0))
-;; ))))
-;; (defun temp-cursor-pos ()
-;; (interactive)
-;; (what-cursor-position t))
-;; ;;(global-set-key [f9] 'temp-cursor-pos)
-;; (defun temp-test-new-create-chunk ()
-;; (interactive)
-;; (mumamo-delete-new-chunks)
-;; ;;(setq x1 nil)
-;; (let (x1
-;; (first t))
-;; (while (or first x1)
-;; (setq first nil)
-;; (setq x1 (mumamo-new-create-chunk (mumamo-find-next-chunk-values x1 nil nil nil)))))
-;; )
-
-;; (defun temp-create-last-chunk ()
-;; (interactive)
-;; (mumamo-new-create-chunk (mumamo-find-next-chunk-values mumamo-last-chunk nil nil nil)))
-
-(defun mumamo-delete-new-chunks ()
- (setq mumamo-last-chunk nil)
- (save-restriction
- (widen)
- (let ((ovls (overlays-in (point-min) (point-max))))
- (dolist (ovl ovls)
- (when (overlay-get ovl 'mumamo-is-new)
- ;;(msgtrc "delete-overlay %s delete-new-chunks" ovl)
- (delete-overlay ovl))))))
-
-(defun mumamo-new-create-chunk (new-chunk-values)
- "Create and return a chunk from NEW-CHUNK-VALUES.
-When doing this store the functions for creating the next chunk
-after this in the properties below of the now created chunk:
-
-- 'mumamo-next-major: is nil or the next chunk's major mode.
-- 'mumamo-next-end-fun: function that searches for end of AFTER-CHUNK
-- 'mumamo-next-border-fun: functions that finds borders"
- ;;((1 696 nxhtml-mode nil nil nil nil) (696 nil php-mode nil nil nil nil))
- ;;(current (list curr-min curr-max curr-major curr-border-min curr-border-max curr-parseable curr-fw-exc-fun))
- ;;(msgtrc "######new-create.chunk.new-chunk-values=%s" new-chunk-values)
- (when new-chunk-values
- (let* ((this-values (nth 0 new-chunk-values))
- (next-values (nth 1 new-chunk-values))
- (next-major (nth 0 next-values))
- (next-end-fun (nth 1 next-values))
- (next-border-fun (nth 2 next-values))
- (next-depth-diff (nth 3 next-values))
- (next-indent (nth 4 next-values))
- (this-beg (nth 0 this-values))
- (this-end (nth 1 this-values))
- (this-maj (nth 2 this-values))
- (this-bmin (nth 3 this-values))
- (this-bmax (nth 4 this-values))
- (this-pable (nth 5 this-values))
- (this-after-chunk (nth 7 this-values))
- ;;(this-is-closed (nth 8 this-values))
- (this-insertion-type-beg (nth 8 this-values))
- (this-insertion-type-end (nth 9 this-values))
- ;;(this-is-closed (and this-end (< 1 this-end)))
- (this-after-chunk-depth (when this-after-chunk
- (overlay-get this-after-chunk 'mumamo-depth)))
- (depth-diff (if this-after-chunk
- (overlay-get this-after-chunk 'mumamo-next-depth-diff)
- 1))
- (depth (if this-after-chunk-depth
- (+ this-after-chunk-depth depth-diff)
- 0))
- ;;(fw-funs (nth 6 this-values))
- ;;(borders-fun (nth 7 this-values))
- ;;(this-is-closed (when (or this-end (mumamo-fun-eq this-maj (mumamo-main-major-mode))) t))
- (use-this-end (if this-end this-end (1+ (buffer-size)))) ;(save-restriction (widen) (point-max))))
- (this-chunk (when (and (<= this-beg use-this-end)
- ;; Avoid creating two empty overlays
- ;; at the this-end - but what if we are
- ;; not creating, just changing the
- ;; last overlay ...
- ;;
- ;; (not (and (= this-beg use-this-end)
- ;; (= use-this-end (1+ (buffer-size)))
- ;; this-after-chunk
- ;; (= 0 (- (overlay-end this-after-chunk) (overlay-start this-after-chunk)))
- ;; ))
- )
- (when (= this-beg 1)
- (if (= use-this-end 1)
- (assert (mumamo-fun-eq (mumamo-main-major-mode) this-maj) t)
- (if this-after-chunk ;; not first
- (assert (not (mumamo-fun-eq (mumamo-main-major-mode) this-maj)) t)
- (assert (mumamo-fun-eq (mumamo-main-major-mode) this-maj) t))))
- ;;(message "Create chunk %s - %s" this-beg use-this-end)
- ;;(make-overlay this-beg use-this-end nil nil (not this-is-closed))
- (make-overlay this-beg use-this-end nil this-insertion-type-beg this-insertion-type-end)
- ))
- ;; Fix-me: move to mumamo-find-next-chunk-values
- (this-border-fun (when (and this-chunk this-after-chunk)
- ;;(overlay-get this-after-chunk 'mumamo-next-border-fun)
- (mumamo-chunk-car this-after-chunk 'mumamo-next-border-fun)
- ))
- (this-borders (when this-border-fun
- ;;(msgtrc "(funcall %s %s %s %s)" this-border-fun this-beg this-end this-maj)
- (funcall this-border-fun this-beg this-end this-maj)))
- ;; Fix-me, check: there is no first border when moving out.
- (this-borders-min (when (= 1 depth-diff)
- (nth 0 this-borders)))
- ;; Fix-me, check: there is no bottom border when we move
- ;; further "in" since borders are now always inside
- ;; sub-chunks (if I remember correctly...).
- ;;(this-borders-max (when (and this-is-closed
- (this-borders-max (when (and (not this-insertion-type-end)
- (/= 1 next-depth-diff))
- (nth 1 this-borders)))
- )
- ;;(msgtrc "created %s, major=%s" this-chunk this-maj)
- (when (> depth 4) (error "Chunk depth > 4"))
- (setq this-bmin nil)
- (setq this-bmax nil)
- (when this-borders-min (setq this-bmin (- this-borders-min this-beg)))
- (when this-borders-max (setq this-bmax (- this-end this-borders-max)))
- ;;(when this-after-chunk (message "this-after-chunk.this-end=%s, this-beg=%s, this-end=%s" (overlay-end this-after-chunk) this-beg this-end))
- ;;(message "fw-funs=%s" fw-funs)
- (when this-chunk
- (overlay-put this-chunk 'mumamo-is-new t)
- (overlay-put this-chunk 'face (mumamo-background-color depth))
- (overlay-put this-chunk 'mumamo-depth depth)
- ;; Values for next chunk
- (overlay-put this-chunk 'mumamo-next-depth-diff next-depth-diff)
- (assert (symbolp next-major) t)
- (overlay-put this-chunk 'mumamo-next-major next-major)
- ;; Values for this chunk
- ;;(overlay-put this-chunk 'mumamo-is-closed this-is-closed)
- (overlay-put this-chunk 'mumamo-insertion-type-end this-insertion-type-end)
- (overlay-put this-chunk 'mumamo-syntax-min-d this-bmin)
- (overlay-put this-chunk 'mumamo-syntax-max-d this-bmax)
- (overlay-put this-chunk 'mumamo-prev-chunk this-after-chunk)
- (overlay-put this-chunk 'mumamo-next-indent next-indent)
- (when this-after-chunk (overlay-put this-after-chunk 'mumamo-next-chunk this-chunk))
-
- ;;(msgtrc "\n<<<<<<<<<<<<<<<<< next-depth-diff/depth-diff=%s/%s, this-maj=%s, this-after-chunk=%s" next-depth-diff depth-diff this-maj this-after-chunk)
- ;;(overlay-put this-chunk 'mumamo-next-end-fun next-end-fun)
- (cond
- ((= 1 next-depth-diff)
- (mumamo-chunk-push this-chunk 'mumamo-next-border-fun next-border-fun)
- (mumamo-chunk-push this-chunk 'mumamo-next-end-fun next-end-fun))
- ((= -1 next-depth-diff)
- (mumamo-chunk-pop this-chunk 'mumamo-next-border-fun)
- (mumamo-chunk-pop this-chunk 'mumamo-next-end-fun))
- ((= 0 next-depth-diff)
- nil)
- (t (error "next-depth-diff=%s" next-depth-diff)))
- ;;(msgtrc "mumamo-next-end-fun=%S" (overlay-get this-chunk 'mumamo-next-end-fun))
-
- ;; Fix-me: replace 'mumamo-major-mode with multi major mode to make it more flexible.
- (cond
- ((= 1 depth-diff)
- (mumamo-chunk-push this-chunk 'mumamo-major-mode this-maj))
- ((= -1 depth-diff)
- (mumamo-chunk-pop this-chunk 'mumamo-major-mode)
- )
- (t (error "depth-diff=%s" depth-diff)))
-
- (overlay-put this-chunk 'mumamo-parseable-by this-pable)
- (overlay-put this-chunk 'created (current-time-string))
- (mumamo-update-chunk-margin-display this-chunk)
- (setq mumamo-last-chunk this-chunk) ;; Use this chunk!!!!
- ;; Get syntax-begin-function for syntax-ppss:
- (let* ((syntax-begin-function
- (mumamo-with-major-mode-fontification this-maj
- ;; Do like in syntax.el:
- '(if syntax-begin-function
- (progn
- syntax-begin-function)
- (when (and (not syntax-begin-function)
- ;; fix-me: How to handle boundp here?
- (boundp 'syntax-begin-function)
- syntax-begin-function)
- syntax-begin-function)))))
- (mumamo-msgfntfy "Got syntax-begin-function, modified=%s" (buffer-modified-p))
- (overlay-put this-chunk 'syntax-begin-function syntax-begin-function))
- )
- ;;(msgtrc "Created %s, this=%s, next=%s" this-chunk this-values next-values)
- this-chunk
- )
- ))
-
-(defun mumamo-update-chunk-margin-display (chunk)
- "Set before-string of CHUNK as spec by `mumamo-margin-use'."
- ;; Fix-me: This is not displayed. Emacs bug?
- ;;(overlay-put this-chunk 'before-string `((margin left-margin) ,(format "%d %s" depth maj)))
- (if (not mumamo-margin-info-mode)
- (overlay-put chunk 'before-string nil)
- (let* ((depth (overlay-get chunk 'mumamo-depth))
- (maj (mumamo-chunk-car chunk 'mumamo-major-mode))
- (strn (propertize (format "%d" depth)
- 'face (list :inherit (or (mumamo-background-color depth)
- 'default)
- :foreground "#505050"
- :underline t
- :slant 'normal
- :weight 'normal
- )))
- (maj-name (substring (symbol-name maj) 0 -5))
- (strm (propertize maj-name 'face
- (list :foreground "#a0a0a0" :underline nil
- :background (frame-parameter nil 'background-color)
- :weight 'normal
- :slant 'normal)))
- str
- (margin (mumamo-margin-used)))
- (when (> (length strm) 5) (setq strm (substring strm 0 5)))
- (setq str (concat strn
- strm
- (propertize " " 'face 'default)
- ))
- (overlay-put chunk 'before-string
- (propertize " " 'display
- `((margin ,margin) ,str))))))
-
-(defun mumamo-update-chunks-margin-display (buffer)
- "Apply `update-chunk-margin-display' to all chunks in BUFFER."
- (with-current-buffer buffer
- (save-restriction
- (widen)
- (let ((chunk (mumamo-find-chunks 1 "margin-disp"))
- (while-n0 0))
- (while (and (mumamo-while 1500 'while-n0 "chunk")
- chunk)
- (mumamo-update-chunk-margin-display chunk)
- (setq chunk (overlay-get chunk 'mumamo-next-chunk)))))))
-
-(defvar mumamo-margin-used nil)
-(make-variable-buffer-local 'mumamo-margin-used)
-(put 'mumamo-margin-used 'permanent-local t)
-
-(defun mumamo-margin-used ()
- (setq mumamo-margin-used
- (if (and (boundp 'linum-mode) linum-mode) 'right-margin (nth 0 mumamo-margin-use))))
-
-;; (defun mumamo-set-window-margins-used (win)
-;; "Set window margin according to `mumamo-margin-use'."
-;; ;; Fix-me: old-margin does not work, break it up
-;; (let* ((old-margin-used mumamo-margin-used)
-;; (margin-used (mumamo-margin-used))
-;; (width (nth 1 mumamo-margin-use))
-;; (both-widths (window-margins win))
-;; (old-left (eq old-margin-used 'left-margin))
-;; (left (eq margin 'left-margin)))
-;; ;; Change only the margin we used!
-;; (if (not mumamo-margin-info-mode)
-;; (progn
-;; (set-window-margins win
-;; (if left nil (car both-widths))
-;; (if (not left) nil (cdr both-widths)))
-;; )
-;; ;;(msgtrc "set-window-margins-used margin-info-mode=t")
-;; (case margin-used
-;; ('left-margin (set-window-margins win width (when old-left (cdr both-widths))))
-;; ('right-margin (set-window-margins win (car both-widths) width))))))
-
-(defun mumamo-update-buffer-margin-use (buffer)
- ;;(msgtrc "update-buffer-margin-use %s" buffer)
- (when (fboundp 'mumamo-update-chunks-margin-display)
- (with-current-buffer buffer
- (when mumamo-multi-major-mode
- (let* ((old-margin-used mumamo-margin-used)
- (margin-used (mumamo-margin-used))
- (old-is-left (eq old-margin-used 'left-margin))
- (is-left (eq margin-used 'left-margin))
- (width (nth 1 mumamo-margin-use))
- (need-update nil))
- (if (not mumamo-margin-info-mode)
- (when old-margin-used
- (setq need-update t)
- (setq old-margin-used nil)
- (if old-is-left
- (setq left-margin-width 0)
- (setq right-margin-width 0)))
- (unless (and (eq old-margin-used margin-used)
- (= width (if old-is-left left-margin-width right-margin-width)))
- (setq need-update t)
- (if is-left
- (setq left-margin-width width)
- (setq right-margin-width width))
- (unless (eq old-margin-used margin-used)
- (if old-is-left
- (setq left-margin-width 0)
- (setq right-margin-width 0)))))
- (when need-update
- (mumamo-update-chunks-margin-display buffer)
- (dolist (win (get-buffer-window-list buffer))
- (set-window-buffer win buffer)))
- )
- ;; Note: window update must be before buffer update because it
- ;; uses old-margin from the call to function margin-used.
- ;; (dolist (win (get-buffer-window-list buffer))
- ;; (mumamo-set-window-margins-used win))
- ;; (mumamo-update-chunks-margin-display buffer)
- ))))
-
-(defun mumamo-new-chunk-value-min (values)
- (let ((this-values (nth 0 values)))
- (nth 0 this-values)))
-
-(defun mumamo-new-chunk-value-max (values)
- (let ((this-values (nth 0 values)))
- (nth 1 this-values)))
-
-(defun mumamo-new-chunk-equal-chunk-values (chunk values)
- ;;(msgtrc "eq? chunk=%S, values=%S" chunk values)
- (let* (;; Chunk
- (chunk-is-new (overlay-get chunk 'mumamo-is-new))
- ;;(chunk-is-closed (overlay-get chunk 'mumamo-is-closed))
- (chunk-insertion-type-end (overlay-get chunk 'mumamo-insertion-type-end))
- (chunk-next-major (overlay-get chunk 'mumamo-next-major))
- (chunk-next-end-fun (mumamo-chunk-car chunk 'mumamo-next-end-fun))
- (chunk-next-border-fun (mumamo-chunk-car chunk 'mumamo-next-border-fun))
- (chunk-next-chunk-diff (overlay-get chunk 'mumamo-next-depth-diff))
- (chunk-beg (overlay-start chunk))
- (chunk-end (overlay-end chunk))
- (chunk-bmin (overlay-get chunk 'mumamo-syntax-min-d))
- (chunk-bmax (overlay-get chunk 'mumamo-syntax-max-d))
- (chunk-prev-chunk (overlay-get chunk 'mumamo-prev-chunk))
- (chunk-major-mode (mumamo-chunk-car chunk 'mumamo-major-mode))
- (chunk-pable (overlay-get chunk 'mumamo-parseable-by))
- (chunk-depth-diff (if chunk-prev-chunk
- (overlay-get chunk-prev-chunk 'mumamo-next-depth-diff)
- 0))
- ;; Values
- (this-values (nth 0 values))
- (next-values (nth 1 values))
- (values-next-major (nth 0 next-values))
- (values-next-end-fun (nth 1 next-values))
- (values-next-border-fun (nth 2 next-values))
- (values-next-depth-diff (nth 3 next-values))
- (values-beg (nth 0 this-values))
- (values-end (nth 1 this-values))
- (values-major-mode (nth 2 this-values))
- (values-bmin (nth 3 this-values))
- (values-bmax (nth 4 this-values))
- (values-pable (nth 5 this-values))
- (values-prev-chunk (nth 7 this-values))
- (values-insertion-type-beg (nth 8 this-values))
- (values-insertion-type-end (nth 9 this-values))
- ;;(values-is-closed (when values-end t))
- )
- ;;(msgtrc "values=%S" values)
- (and t ;chunk-is-new
- (eq chunk-next-major values-next-major)
-
- ;; Can't check chunk-next-end-fun or chunk-next-border-fun
- ;; here since they are fetched from prev chunk:
- ;;(progn (message "eq-c-v: here b: %s /= %s" chunk-next-end-fun values-next-end-fun) t)
- ;;(eq chunk-next-end-fun values-next-end-fun)
- ;;(progn (message "eq-c-v: here c, %s /= %s" chunk-next-border-fun values-next-border-fun) t)
- ;;(eq chunk-next-border-fun values-next-border-fun)
-
- (= chunk-next-chunk-diff values-next-depth-diff)
- (= chunk-beg values-beg)
- ;;(progn (message "eq-c-v: here b") t)
- ;; (and (equal chunk-is-closed values-is-closed)
- ;; (or (not chunk-is-closed)
- (and (equal chunk-insertion-type-end values-insertion-type-end)
- (or ;;chunk-insertion-type-end
- (= chunk-end values-end)))
- ;;(progn (message "eq-c-v: here c, %s /= %s" chunk-major-mode values-major-mode) t)
- (or (= -1 chunk-depth-diff)
- (eq chunk-major-mode values-major-mode))
- ;;(progn (message "eq-c-v: here d") t)
- (equal chunk-pable values-pable)
- ;;(progn (message "eq-c-v: here e") t)
- (eq chunk-prev-chunk values-prev-chunk)
- ;;(progn (message "eq-c-v: here f") t)
- ;;(eq chunk-is-closed values-is-closed)
- (eq chunk-insertion-type-end values-insertion-type-end)
- ;; fix-me: bmin bmax
- ;;(and chunk-bmin values-bmin (= chunk-bmin values-bmin))
- ;;(and chunk-bmax values-bmax (= chunk-bmax values-bmax))
- )
- ))
-
-(defvar mumamo-sub-chunk-families nil
- "Chunk dividing routines for sub chunks.
-A major mode in a sub chunk can inherit chunk dividing routines
-from multi major modes. This is the way chunks in chunks is
-implemented.
-
-This variable is an association list with entries of the form
-
- \(CHUNK-MAJOR CHUNK-FAMILY)
-
-where CHUNK-MAJOR is the major mode in a chunk and CHUNK-FAMILY
-is a chunk family \(ie the third argument to
-`define-mumamo-multi-major-mode'.
-
-You can use the function `mumamo-inherit-sub-chunk-family' to add
-to this list.")
-
-(defvar mumamo-multi-local-sub-chunk-families nil
- "Multi major mode local chunk dividing rourines for sub chunks.
-Like `mumamo-sub-chunk-families' specific additions for multi
-major modes. The entries have the form
-
- \((CHUNK-MAJOR . MULTI-MAJOR) CHUNK-FAMILY)
-
-Use the function `mumamo-inherit-sub-chunk-family-locally' to add
-to this list.")
-
-;;(mumamo-get-sub-chunk-funs 'html-mode)
-(defun mumamo-get-sub-chunk-funs (major)
- "Get chunk family sub chunk with major mode MAJOR."
- (let ((rec (or
- (assoc (cons major mumamo-multi-major-mode) mumamo-multi-local-sub-chunk-families)
- (assoc major mumamo-sub-chunk-families))))
- (caddr (cadr rec))))
-
-(defun mumamo-inherit-sub-chunk-family-locally (multi-major multi-using)
- "Add chunk dividing routines from MULTI-MAJOR locally.
-The dividing routines from multi major mode MULTI-MAJOR can then
-be used in sub chunks in buffers using multi major mode
-MULTI-USING."
- (let* ((chunk-family (get multi-major 'mumamo-chunk-family))
- (major (nth 1 chunk-family)))
- (let ((major-mode major))
- (when (derived-mode-p 'nxml-mode)
- (error "Major mode %s major can't be used in sub chunks" major)))
- (add-to-list 'mumamo-multi-local-sub-chunk-families
- (list (cons major multi-using) chunk-family))))
-
-(defun mumamo-inherit-sub-chunk-family (multi-major)
- "Inherit chunk dividing routines from multi major modes.
-Add chunk family from multi major mode MULTI-MAJOR to
-`mumamo-sub-chunk-families'.
-
-Sub chunks with major mode the same as MULTI-MAJOR mode will use
-this chunk familyu to find subchunks."
- (let* ((chunk-family (get multi-major 'mumamo-chunk-family))
- (major (nth 1 chunk-family)))
- (let ((major-mode major))
- (when (derived-mode-p 'nxml-mode)
- (error "Major mode %s major can't be used in sub chunks" major)))
- (add-to-list 'mumamo-sub-chunk-families (list major chunk-family))))
-
-(defun mumamo-find-next-chunk-values (after-chunk from after-change-max chunk-at-after-change)
- "Search forward for start of next chunk.
-Return a list with chunk values for next chunk after AFTER-CHUNK
-and some values for the chunk after it.
-
-For the first chunk AFTER-CHUNK is nil. Otherwise the values in stored in AFTER-CHUNK
-is used to find the new chunk, its border etc.
-
-
-See also `mumamo-new-create-chunk' for more information."
- ;;(msgtrc "(find-next-chunk-values %s %s %s %s)" after-chunk from after-change-max chunk-at-after-change)
- ;;(mumamo-backtrace "find-next")
- (when after-chunk
- (unless (eq (overlay-buffer after-chunk)
- (current-buffer))
- (error "mumamo-find-next-chunk-values: after-chunk=%S, cb=%S" after-chunk (current-buffer))))
- (let* ((here (point))
- (max (point-max))
- ;;(after-chunk-is-closed (when after-chunk-valid (overlay-get after-chunk 'mumamo-is-closed)))
- (after-chunk-insertion-type-end (when after-chunk (overlay-get after-chunk 'mumamo-insertion-type-end)))
- ;; Note that "curr-*" values are fetched from "mumamo-next-*" values in after-chunk
- (curr-min (if after-chunk (overlay-end after-chunk) 1))
- (curr-end-fun (when after-chunk
- (mumamo-chunk-car after-chunk 'mumamo-next-end-fun)))
- (curr-border-fun (when curr-end-fun (mumamo-chunk-car after-chunk 'mumamo-next-border-fun)))
- (curr-syntax-min-max (when curr-border-fun (funcall curr-border-fun
- (overlay-end after-chunk)
- nil nil)))
- (curr-syntax-min (or (car curr-syntax-min-max)
- (when after-chunk (overlay-end after-chunk))
- 1))
- (search-from (or nil ;from
- curr-syntax-min))
- ;;(dummy (msgtrc "search-from=%s" search-from))
- (main-chunk-funs (let ((chunk-info (cdr mumamo-current-chunk-family)))
- (cadr chunk-info)))
- (curr-major (if after-chunk
- (or
- ;; 'mumamo-next-major is used when we are going into a sub chunk.
- (overlay-get after-chunk 'mumamo-next-major)
- ;; We are going out of a sub chunk.
- (mumamo-chunk-cadr after-chunk 'mumamo-major-mode))
- (mumamo-main-major-mode)))
- ;;(dummy (msgtrc "curr-major=%s" curr-major))
- (curr-chunk-funs
- (if (or (not after-chunk)
- (= 0 (+ (overlay-get after-chunk 'mumamo-depth)
- (overlay-get after-chunk 'mumamo-next-depth-diff))))
- main-chunk-funs
- (mumamo-get-sub-chunk-funs curr-major)))
- curr-max
- next-max
- curr-max-found
- next-min
- curr-border-min
- curr-border-max
- curr-parseable
- next-fw-exc-fun
- next-indent
- next-major
- curr-end-fun-end
- next-border-fun
- ;; The insertion types for the new chunk
- (curr-insertion-type-beg (when after-chunk after-chunk-insertion-type-end))
- curr-insertion-type-end
- next-depth-diff
- r-point
- )
- (unless (and after-chunk-insertion-type-end
- (= (1+ (buffer-size)) ;; ie point-max
- (overlay-end after-chunk)))
- (when (>= max search-from)
- (when curr-end-fun
- ;; If after-change-max is non-nil here then this function has
- ;; been called after changes that are all in one chunk. We
- ;; need to check if the chunk right border have been changed,
- ;; but we do not have to look much longer than the max point
- ;; of the change.
- ;;(message "set after-change-max nil") (setq after-change-max nil)
- (let* ((use-max (if nil ;;after-change-max
- (+ after-change-max 100)
- max))
- (chunk-end (and chunk-at-after-change
- (overlay-end chunk-at-after-change)))
- ;;(use-min (max (- search-from 2) (point-min)))
- (use-min curr-syntax-min)
- (possible-end-fun-end t)
- (end-search-pos use-min))
- ;; The code below takes care of the case when to subsequent
- ;; chunks have the same ending delimiter. (Maybe a while
- ;; loop is bit overkill here.)
- (while (and possible-end-fun-end
- (not curr-end-fun-end)
- (< end-search-pos use-max))
- (setq curr-end-fun-end (funcall curr-end-fun end-search-pos use-max))
- (if (not curr-end-fun-end)
- (setq possible-end-fun-end nil)
- (cond ((and t ;after-chunk-is-closed
- (< curr-end-fun-end (overlay-end after-chunk)))
- (setq curr-end-fun-end nil)
- (setq end-search-pos (1+ end-search-pos)))
- ;; See if the end is in code
- ((let* ((syn2-min-max (when curr-border-fun
- (funcall curr-border-fun
- (overlay-end after-chunk)
- curr-end-fun-end
- nil)))
- (syn2-max (or (cadr syn2-min-max)
- curr-end-fun-end)))
- (not (mumamo-end-in-code use-min syn2-max curr-major)))
- (setq end-search-pos (1+ curr-end-fun-end))
- (setq curr-end-fun-end nil)
- ))))
- (unless curr-end-fun-end
- ;; Use old end if valid
- (and after-change-max
- chunk-end
- (= -1 (overlay-get chunk-at-after-change 'mumamo-next-depth-diff))
- (< after-change-max chunk-end)
- chunk-end))
- ;; Fix-me: Check if old chunk is valid. It is not valid if
- ;; depth-diff = -1 and curr-end-fun-end is not the same as
- ;; before.
-
- ;; Fix-me: this test should also be made for other chunks
- ;; searches, but this catches most problems I think.
- ;; (or (not curr-end-fun-end)
- ;; ;; Fix-me: The bug in wiki-090804-js.html indicates that
- ;; ;; we should not subtract 1 here. The subchunk there
- ;; ;; ends with </script> and this can't be in column 1
- ;; ;; when the line before ends with a // style js comment
- ;; ;; unless we don't subtract 1.
- ;; ;;
- ;; ;; However wiki-strange-hili-080629.html does not work
- ;; ;; then because then the final " in style="..." is
- ;; ;; included in the scan done in mumamo-end-in-code.
- ;; ;;
- ;; ;; The solution is to check for the syntax borders here.
- ;; (let* ((syn2-min-max (when curr-border-fun
- ;; (funcall curr-border-fun
- ;; (overlay-end after-chunk)
- ;; curr-end-fun-end
- ;; nil)))
- ;; (syntax-max (or (cadr syn2-min-max)
- ;; curr-end-fun-end)))
- ;; ;;(mumamo-end-in-code syntax-min (- curr-end-fun-end 1) curr-major)
- ;; ;;
- ;; ;; fix-me: This should be really in the individual
- ;; ;; routines that finds possible chunks. Mabye this is
- ;; ;; possible to fix now when just looking forward for
- ;; ;; chunks?
- ;; (mumamo-end-in-code curr-syntax-min syntax-max curr-major)
- ;; )
- ;; (setq curr-end-fun-end nil))
- ;; Use old result if valid
- ;; (and nil ;(not curr-end-fun-end)
- ;; chunk-at-after-change
- ;; (= -1 (overlay-get chunk-at-after-change 'mumamo-next-depth-diff))
- ;; (setq curr-end-fun-end (overlay-end chunk-at-after-change)))
- ;;(msgtrc "find-next-chunk-values:curr-end-fun-end after end-in-code=%s" curr-end-fun-end)
- ))
- ;;(msgtrc "find-next-chunk-values:here d, curr-min=%s, after-chunk=%s" curr-min after-chunk)
- (when (listp curr-chunk-funs)
- ;;(msgtrc "find-next-chunk-values:curr-chunk-funs=%s" curr-chunk-funs)
- (setq r-point (point))
- (dolist (fn curr-chunk-funs)
- ;;(msgtrc "find-next-chunk-values:before (r (funcall fn search-from search-from max)), fn=%s search-from=%s, max=%s" fn search-from max)
- (assert (= r-point (point)) t)
- (let* ((r (funcall fn search-from search-from max))
- (rmin (nth 0 r))
- (rmax (nth 1 r))
- (rmajor-sub (nth 2 r))
- (rborder (nth 3 r))
- (rparseable (nth 4 r))
- (rfw-exc-fun (nth 5 r))
- (rborder-fun (nth 6 r))
- (rindent (nth 7 r))
- (rborder-min (when rborder (nth 0 rborder)))
- (rborder-max (when rborder (nth 1 rborder)))
- ;;(rmin-found rmin)
- )
- ;;(msgtrc "find-next-chunk-values:fn=%s, r=%s" fn r)
- (goto-char r-point)
- (when r
- (when rmax (message "mumamo warning: Bad r=%s, nth 1 should be nil" r))
- (unless (or rmin rmax)
- (error "Bad r=%s, fn=%s" r fn))
- (unless rfw-exc-fun
- (error "No fw-exc-fun returned from fn=%s, r=%s" fn r))
- (unless rmajor-sub
- (error "No major mode for sub chunk, fn=%s, r=%s" fn r)))
- (when r
- (mumamo-msgfntfy " fn=%s, r=%s" fn r)
- (unless rmin (setq rmin (point-max)))
- ;;(unless rmax (setq rmax (point-min)))
- ;; Do not allow zero length chunks
- (unless rmax (setq rmax (point-max)))
- (unless (and (> rmin 1)
- rmax
- (= rmin rmax))
- ;; comparision have to be done differently if we are in an
- ;; exception part or not. since we are doing this from top to
- ;; bottom the rules are:
- ;;
- ;; - exception parts always outrules non-exception part. when
- ;; in exception part the min start point should be used.
- ;; - when in non-exception part the max start point and the
- ;; min end point should be used.
- ;;
- ;; check if first run:
-
- ;; Fix-me: there is some bug here when borders are not
- ;; included and are not 0 width.
- (if (not next-min)
- (progn
- (setq next-min rmin)
- (setq curr-border-min rborder-min)
- (setq next-max rmax)
- (setq curr-border-max rborder-max)
- ;;(setq curr-max-found rmin-found)
- (setq curr-parseable rparseable)
- (setq next-fw-exc-fun rfw-exc-fun)
- (setq next-border-fun rborder-fun)
- (setq next-indent rindent)
- (setq next-major rmajor-sub))
- (if rmajor-sub
- (if next-major
- (when (or (not next-min)
- (< rmin next-min))
- (setq next-min rmin)
- (setq curr-border-min rborder-min)
- (when rmax (setq max rmax))
- (setq curr-border-max rborder-max)
- ;;(when rmin-found (setq curr-max-found t))
- (setq curr-parseable rparseable)
- (setq next-fw-exc-fun rfw-exc-fun)
- (setq next-border-fun rborder-fun)
- (setq next-indent rindent)
- (setq next-major rmajor-sub))
- (setq next-min rmin)
- (setq curr-border-min rborder-min)
- (when rmax (setq max rmax))
- (setq curr-border-max rborder-max)
- ;;(when rmin-found (setq curr-max-found t))
- (setq curr-parseable rparseable)
- (setq next-fw-exc-fun rfw-exc-fun)
- (setq next-border-fun rborder-fun)
- (setq next-indent rindent)
- (setq next-major rmajor-sub))
- (unless next-major
- (when (> next-min rmin)
- (setq next-min rmin)
- (setq curr-border-min rborder-min))
- (when (and rmax max
- (> rmax max))
- ;;(setq max-found rmin-found)
- ;;(when rmin-found (setq curr-max-found t))
- (when rmax (setq max rmax))
- (setq curr-border-max rborder-max))
- ))))
- (mumamo-msgfntfy "next-min/max=%s/%s border=%s/%s search-from=%s" next-min max curr-border-min curr-border-max search-from)
- ;; check!
- (when (and next-min max)
- ;;(assert (>= next-min search-from) t)
- (assert (<= search-from max) t)
- (when curr-border-min
- (assert (<= next-min curr-border-min) t)
- (assert (<= curr-border-min max) t))
- (when curr-border-max
- (assert (<= next-min curr-border-max) t)
- (assert (<= curr-border-max max) t))))
- )))
- (goto-char here)
- (setq curr-max-found (or curr-max-found curr-end-fun-end))
- (when t ;curr-max-found
- (setq curr-max (if max max (point-max)))
- (setq curr-max (min (if next-min next-min curr-max)
- (if curr-end-fun-end curr-end-fun-end curr-max))))
- ;;(setq curr-max nil)
- (setq next-depth-diff (cond
- ( (and curr-max curr-end-fun-end
- (= curr-max curr-end-fun-end))
- -1)
- ( (= curr-max (1+ (buffer-size)))
- 0)
- ( t 1)))
- (when (= -1 next-depth-diff) ;; We will pop it from 'mumamo-major-mode
- (setq next-major nil))
- (when curr-max
- (unless (>= curr-max curr-min)
- (error "curr-max is not >= curr-min")))
- ;;(setq curr-is-closed (and curr-max (< 1 curr-max)))
- (when (and curr-max (= 1 curr-max))
- (assert (mumamo-fun-eq curr-major (mumamo-main-major-mode)) t)
- )
- (assert (symbolp next-major) t)
- ;; Fix-me: see for example rr-min8.php
- (when (or ;;(not after-chunk)
- (= curr-max (1+ (buffer-size)))
- (cond
- ((= next-depth-diff 1)
- next-border-fun)
- ((= next-depth-diff -1)
- next-border-fun)
- ((= next-depth-diff 0)
- t)
- (t (error "next-depth-diff=%s" next-depth-diff))))
- (setq curr-insertion-type-end t))
- (let ((current (list curr-min curr-max curr-major curr-border-min curr-border-max curr-parseable
- curr-chunk-funs after-chunk
- ;;curr-is-closed
- curr-insertion-type-beg
- curr-insertion-type-end
- ))
- (next (list next-major next-fw-exc-fun next-border-fun next-depth-diff next-indent)))
- ;;(msgtrc "find-next-chunk-values=> current=%s, next=%s" current next)
- (list current next))))))
-
-;; Fix-me: This should check if the new chunk should be
-;; parsed or not
-;; (defsubst mumamo-chunk-nxml-parseable (chunk)
-;; (mumamo-fun-eq (mumamo-main-major-mode)
-;; (mumamo-chunk-major-mode xml-chunk)))
-
-(defun mumamo-valid-nxml-point (pos)
- "Return non-nil if position POS is in an XML chunk."
- (memq 'nxml-mode (get-text-property pos 'mumamo-parseable-by)))
-
-(defun mumamo-valid-nxml-chunk (chunk)
- "Return t if chunk CHUNK should be valid XML."
- (when chunk
- (let ((major-mode (mumamo-chunk-major-mode chunk))
- (region (overlay-get chunk 'mumamo-region))
- (parseable-by (overlay-get chunk 'mumamo-parseable-by)))
- ;;(message "mumamo-valid-nxml-chunk: major-mode=%s, parseble-by=%s" major-mode parseable-by)
- (or region
- (derived-mode-p 'nxml-mode)
- (memq 'nxml-mode parseable-by)))))
-
-;; A good test case for the use of this is the troublesome code in the
-;; first line of xml-as-string.php in nxml/nxhtml/bug-tests. Currently
-;; this test code is however splitted and it looks like the code below
-;; can't handle the line above if the line looks like below. The ?> is
-;; still thought to be a border. Does this mean that ' is not treated
-;; as a string separator?
-;;
-;; <?php header("Content-type:application/xml; charset=utf-8"); echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
-;;
-;; However there are the reverse cases also, in lines like
-;;
-;; href="<?php $this->url($url); ?>"
-;; <!-- <td><?php insert_a_lot_of_html(); ?>
-;;
-;; These are supposedly handled by using this test at the right
-;; place... However it is not very clear in all cases whether chunk
-;; dividers in comments and strings should be valid or not...
-;;
-;; For example in the first case above the php divider should be
-;; valid. Probably it should be that in the second case too, but how
-;; should mumamo know that?
-;;
-;; Fix-me: I think a per "chunk divider function + context" flag is
-;; needed to handle this. Probably this will work the same for all web
-;; dev things, ie the opening sub chunk divider is ALWAYS
-;; valid. However that is not true for things like CSS, Javascript etc
-;; in (X)HTML.
-
-(defun mumamo-end-in-code (syntax-start syntax-end major)
- "Return t if possible syntax end is not in a string or comment.
-Assume that the sexp syntax is nil at SYNTAX-START return t if
-position SYNTAX-END is not in a string or comment according to
-the sexp syntax using major mode MAJOR."
- ;; Fix-me: This can't always detect html comments: <!--
- ;; ... -->. Could this be solved by RMS suggestion with a
- ;; function/defmacro that binds variables to their global values?
- (mumamo-msgfntfy "point-min,max=%s,%s syntax-start,end=%s,%s, major=%s" (point-min) (point-max) syntax-start syntax-end major)
- ;;(msgtrc "end-in-code:here a after-chunk=%s" (when (boundp 'after-chunk) after-chunk))
- (assert (and syntax-start syntax-end) t)
- (let ((doesnt-here (point))
- doesnt-ret)
- (save-restriction
- (widen)
- ;;(msgtrc "end-in-code:here a2 after-chunk=%s" (when (boundp 'after-chunk) after-chunk))
- (mumamo-with-major-mode-fontification major
- `(let (ppss)
- ;; fix-me: Use main major mode, and `syntax-ppss'. Change the
- ;; defadvice of this to make that possible.
- ;;(msgtrc "end-in-code:here b after-chunk=%s" (when (boundp 'after-chunk) after-chunk))
- (setq ppss (parse-partial-sexp ,syntax-start (+ ,syntax-end 0)))
- ;;(msgtrc "end-in-code %s %s %s:ppss=%S" ,syntax-start ,syntax-end ',major ppss)
- ;;(msgtrc "end-in-code:here c after-chunk=%s" (when (boundp 'after-chunk) after-chunk))
- ;; If inside a string or comment then the end marker is
- ;; invalid:
- ;;(msgtrc "mumamo-end-in-code:ppss=%s" ppss)
- (if (or (nth 3 ppss)
- (nth 4 ppss))
- (progn
- ;;(msgtrc "invalid end, syntax-end =%s" syntax-end)
- (setq doesnt-ret nil)
- (if (nth 4 ppss) ;; in comment, check if single line comment
- (let ((here (point))
- eol-pos)
- ;;(msgtrc "end-in-code, was in comment, ppss=%S" ppss)
- (goto-char ,syntax-end)
- (setq eol-pos (line-end-position))
- (goto-char here)
- (setq ppss (parse-partial-sexp ,syntax-start (+ eol-pos 1)))
- ;;(msgtrc "end-in-code, in comment, new ppss %s %s=%S" ,syntax-start (+ eol-pos 1) ppss)
- (unless (nth 4 ppss)
- (setq doesnt-ret t)))))
- (setq doesnt-ret t)
- ;;(msgtrc "valid end, syntax-end =%s" syntax-end)
- ))))
- (goto-char doesnt-here)
- ;;(msgtrc "end-in-code:ret=%s" doesnt-ret)
- doesnt-ret))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Easy chunk defining
-
-(defun mumamo-quick-chunk-forward (pos
- min max
- begin-mark end-mark inc mode
- mark-is-border)
- ;;(msgtrc "quick-chunk-forward %s %s %s" pos min max)
- (let ((search-fw-exc-start
- `(lambda (pos max)
- (let ((exc-start
- (if ,inc
- (mumamo-chunk-start-fw-str-inc pos max ,begin-mark)
- (mumamo-chunk-start-fw-str pos max ,begin-mark))))
- (when exc-start
- (list exc-start mode nil)))))
- (search-fw-exc-end
- `(lambda (pos max)
- ;;(msgtrc "search-fw-exc-end %s %s, inc=%s, end-mark=%s" pos max ,inc ,end-mark)
- (save-match-data
- (let ((ret (if ,inc
- (mumamo-chunk-end-fw-str-inc pos max ,end-mark)
- (mumamo-chunk-end-fw-str pos max ,end-mark))))
- ;;(msgtrc "search-fw-exc-end ret=%s" ret)
- ret))))
- (find-borders
- (when mark-is-border
- `(lambda (start end exc-mode)
- (let ((start-border)
- (end-border))
- (if (and ,inc);; exc-mode)
- (progn
- (when start
- (setq start-border
- (+ start (length ,begin-mark))))
- (when end
- (setq end-border
- (- end (length ,end-mark)))))
- (if (and (not ,inc) (not exc-mode))
- (progn
- (when start
- (setq start-border
- (+ start (length ,end-mark))))
- (when end
- (setq end-border
- (- end (length ,begin-mark)))))))
- (when (or start-border end-border)
- (mumamo-msgfntfy "quick.start-border/end=%s/%s, start/end=%s/%s exc-mode=%s" start-border end-border start end exc-mode)
- (list start-border end-border)))))))
- (mumamo-possible-chunk-forward pos max
- search-fw-exc-start
- search-fw-exc-end
- find-borders)))
-
-(defun mumamo-quick-static-chunk (pos
- min max
- begin-mark end-mark inc mode
- mark-is-border)
- (if t
- (mumamo-quick-chunk-forward pos min max begin-mark end-mark inc mode mark-is-border)
- ;; (let ((old (mumamo-quick-static-chunk-old pos min max begin-mark end-mark inc mode mark-is-border))
- ;; (new (mumamo-quick-chunk-forward pos min max begin-mark end-mark inc mode mark-is-border)))
- ;; (unless (equal old new) (msgtrc "equal=%s\n\told=%S\n\tnew=%S" (equal old new) old new))
- ;; (if nil old new))
- ))
-
-;; (defun mumamo-quick-static-chunk-old (pos
-;; min max
-;; begin-mark end-mark inc mode
-;; mark-is-border)
-;; "Quick way to make a chunk function with static dividers.
-;; Here is an example of how to use it:
-
-;; (defun mumamo-chunk-embperl-<- (pos min max)
-;; \"Find [- ... -], return range and perl-mode.\"
-;; (mumamo-quick-static-chunk pos min max \"[-\" \"-]\" nil 'perl-mode))
-
-;; As you can see POS, MIN and MAX comes from argument of the
-;; function you define.
-
-;; BEGIN-MARK should be a string that begins the chunk.
-;; END-MARK should be a string that ends the chunk.
-
-;; If INC is non-nil then the dividers are included in the chunk.
-;; Otherwise they are instead made parts of the surrounding chunks.
-
-;; MODE should be the major mode for the chunk.
-
-;; If MARK-IS-BORDER is non-nil then the marks are just borders and
-;; not supposed to have the same syntax as the inner part of the
-
-;; Fix-me: This can only be useful if the marks are included in the
-;; chunk, ie INC is non-nil. Should not these two arguments be
-;; mixed then?
-;; "
-;; (mumamo-msgfntfy "quick.pos=%s min,max=%s,%s begin-mark/end=%s/%s mark-is-border=%s" pos min max begin-mark end-mark mark-is-border)
-;; (let ((search-bw-exc-start
-;; `(lambda (pos min)
-;; (let ((exc-start
-;; (if ,inc
-;; (mumamo-chunk-start-bw-str-inc pos min begin-mark)
-;; (mumamo-chunk-start-bw-str pos min begin-mark))))
-;; (when (and exc-start
-;; (<= exc-start pos))
-;; (cons exc-start mode)))))
-;; (search-bw-exc-end
-;; `(lambda (pos min)
-;; (if ,inc
-;; (mumamo-chunk-end-bw-str-inc pos min ,end-mark)
-;; (mumamo-chunk-end-bw-str pos min ,end-mark))))
-;; (search-fw-exc-start
-;; `(lambda (pos max)
-;; (if ,inc
-;; (mumamo-chunk-start-fw-str-inc pos max ,begin-mark)
-;; (mumamo-chunk-start-fw-str pos max ,begin-mark))))
-;; (search-fw-exc-end
-;; `(lambda (pos max)
-;; (save-match-data
-;; (if ,inc
-;; (mumamo-chunk-end-fw-str-inc pos max ,end-mark)
-;; (mumamo-chunk-end-fw-str pos max ,end-mark)))))
-;; (find-borders
-;; (when mark-is-border
-;; `(lambda (start end exc-mode)
-;; (let ((start-border)
-;; (end-border))
-;; (if (and ,inc exc-mode)
-;; (progn
-;; (when start
-;; (setq start-border
-;; (+ start (length ,begin-mark))))
-;; (when end
-;; (setq end-border
-;; (- end (length ,end-mark)))))
-;; (if (and (not ,inc) (not exc-mode))
-;; (progn
-;; (when start
-;; (setq start-border
-;; (+ start (length ,end-mark))))
-;; (when end
-;; (setq end-border
-;; (- end (length ,begin-mark)))))))
-;; (when (or start-border end-border)
-;; (mumamo-msgfntfy "quick.start-border/end=%s/%s, start/end=%s/%s exc-mode=%s" start-border end-border start end exc-mode)
-;; (list start-border end-border)))))))
-;; (mumamo-find-possible-chunk pos min max
-;; search-bw-exc-start
-;; search-bw-exc-end
-;; search-fw-exc-start
-;; search-fw-exc-end
-;; find-borders)))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Changing the major mode that the user sees
-
-(defvar mumamo-unread-command-events-timer nil)
-(make-variable-buffer-local 'mumamo-unread-command-events-timer)
-
-(defun mumamo-unread-command-events (command-keys new-major old-last-command)
- "Sync new keymaps after changing major mode in a timer.
-Also tell new major mode.
-
-COMMAND-KEYS is the keys entered after last command and the call
-to `mumamo-idle-set-major-mode' \(which is done in an idle
-timer). Those keys are added to `unread-command-events' so they
-can be used in the new keymaps. They should be in the format
-returned by
-
- \(listify-key-sequence (this-command-keys-vector))
-
-NEW-MAJOR mode is the new major mode.
-
-OLD-LAST-COMMAND is the value of `last-command' after switching
-major mode. \(This is cleared by the function `top-level' so
-this function will not see it since it is run in a timer.)"
- (mumamo-condition-case err
- (progn
- ;; last-command seems to be cleared by top-level so set it
- ;; back here.
- (unless last-command
- (setq last-command old-last-command))
- (when (< 0 (length command-keys))
- ;;(setq last-command-char nil) ;; For `viper-command-argument'
- (setq unread-command-events (append command-keys nil)))
- (message "Switched to %s" new-major))
- (error
- (let ((mumamo-display-error-lwarn t))
- (mumamo-display-error 'mumamo-unread-command-events "err=%s" err)))))
-
-(defvar mumamo-idle-set-major-mode-timer nil)
-(make-variable-buffer-local 'mumamo-idle-set-major-mode-timer)
-(put 'mumamo-idle-set-major-mode-timer 'permanent-local t)
-
-(defun mumamotemp-pre-command ()
- "Temporary command for debugging."
- (message "mumamotemp-pre 1: modified=%s %s" (buffer-modified-p) (current-buffer)))
-(defun mumamotemp-post-command ()
- "Temporary command for debugging."
- (message "mumamotemp-post 1: modified=%s %s" (buffer-modified-p) (current-buffer)))
-(put 'mumamotemp-pre-command 'permanent-local-hook t)
-(put 'mumamotemp-post-command 'permanent-local-hook t)
-(defun mumamotemp-start ()
- "Temporary command for debugging."
- (add-hook 'post-command-hook 'mumamotemp-post-command nil t)
- (add-hook 'pre-command-hook 'mumamotemp-pre-command nil t))
-
-(defsubst mumamo-cancel-idle-set-major-mode ()
- (when (timerp mumamo-idle-set-major-mode-timer)
- (cancel-timer mumamo-idle-set-major-mode-timer))
- (setq mumamo-idle-set-major-mode-timer nil))
-
-(defun mumamo-request-idle-set-major-mode ()
- "Setup to change major mode from chunk when Emacs is idle."
- (mumamo-cancel-idle-set-major-mode)
- (setq mumamo-idle-set-major-mode-timer
- (run-with-idle-timer
- mumamo-set-major-mode-delay
- nil
- 'mumamo-idle-set-major-mode (current-buffer) (selected-window))))
-
-(defvar mumamo-done-first-set-major nil)
-(make-variable-buffer-local 'mumamo-done-first-set-major)
-(put 'mumamo-done-first-set-major 'permanent-local t)
-
-;; Fix-me: Add a property to the symbol instead (like in CUA).
-(defvar mumamo-safe-commands-in-wrong-major
- '(self-insert-command
- fill-paragraph ;; It changes major mode
- forward-char
- viper-forward-char
- backward-char
- viper-backward-char
- next-line
- viper-next-line
- previous-line
- viper-previous-line
- scroll-down
- cua-scroll-down
- scroll-up
- cua-scroll-up
- move-beginning-of-line
- move-end-of-line
- nonincremental-search-forward
- nonincremental-search-backward
- mumamo-backward-chunk
- mumamo-forward-chunk
- ;; Fix-me: add more
- )
- )
-
-(defun mumamo-fetch-local-map (major)
- "Fetch local keymap for major mode MAJOR.
-Do that by turning on the major mode in a new buffer. Add the
-keymap to `mumamo-major-modes-local-maps'.
-
-Return the fetched local map."
- (let (temp-buf-name
- temp-buf
- local-map)
- (setq temp-buf-name (concat "mumamo-fetch-major-mode-local-"
- (symbol-name major)))
- (setq temp-buf (get-buffer temp-buf-name))
- (when temp-buf (kill-buffer temp-buf))
- (setq temp-buf (get-buffer-create temp-buf-name))
- (with-current-buffer temp-buf
- (let ((mumamo-fetching-major t))
- (funcall major))
- (setq local-map (current-local-map))
- (when local-map (setq local-map (copy-keymap (current-local-map))))
- (add-to-list 'mumamo-major-modes-local-maps
- (cons major-mode local-map)))
- (kill-buffer temp-buf)
- local-map))
-
-(defvar mumamo-post-command-chunk nil)
-(make-variable-buffer-local 'mumamo-post-command-chunk)
-
-(defun mumamo-post-command-get-chunk (pos)
- "Get chunk at POS fast."
- (let ((have-regions (and (boundp 'mumamo-regions)
- mumamo-regions)))
- (when have-regions (setq mumamo-post-command-chunk nil))
- (if (and mumamo-post-command-chunk
- (overlayp mumamo-post-command-chunk)
- ;;(progn (message "here a=%s" mumamo-post-command-chunk) t)
- (overlay-buffer mumamo-post-command-chunk)
- ;;(progn (message "here b=%s" mumamo-post-command-chunk) t)
- (< pos (overlay-end mumamo-post-command-chunk))
- ;;(progn (message "here c=%s" mumamo-post-command-chunk) t)
- (>= pos (overlay-start mumamo-post-command-chunk))
- ;;(progn (message "here d=%s" mumamo-post-command-chunk) t)
- (mumamo-chunk-major-mode mumamo-post-command-chunk)
- ;;(progn (msgtrc "here e=%s" mumamo-post-command-chunk) t)
- )
- mumamo-post-command-chunk
- ;;(msgtrc "--------------- new post-command-chunk")
- (setq mumamo-post-command-chunk
- (or (unless have-regions (mumamo-get-existing-new-chunk-at (point) nil))
- (mumamo-find-chunks (point) "post-command-get-chunk"))))))
-
-;; (setq mumamo-set-major-mode-delay 10)
-(defun mumamo-set-major-post-command ()
- "Change major mode if necessary after a command.
-If the major mode for chunk at `window-point' differ from current
-major mode then change major mode to that for the chunk. If
-however `mumamo-set-major-mode-delay' is greater than 0 just
-request a change of major mode when Emacs is idle that long.
-
-See the variable above for an explanation why a delay might be
-needed \(and is the default)."
- ;;(msgtrc "set-major-post-command here")
- (let* ((in-pre-hook (memq 'mumamo-set-major-pre-command pre-command-hook))
- (ovl (unless in-pre-hook (mumamo-post-command-get-chunk (point))))
- (major (when ovl (mumamo-chunk-major-mode ovl)))
- (set-it-now (not (or in-pre-hook (mumamo-fun-eq major major-mode)))))
- ;;(msgtrc "set-major-post-command ovl=%s, in-pre-hook=%s" ovl in-pre-hook)
- (if (not set-it-now)
- (unless (mumamo-fun-eq major major-mode)
- (when mumamo-idle-set-major-mode-timer
- (mumamo-request-idle-set-major-mode)))
- (if mumamo-done-first-set-major
- (if (<= 0 mumamo-set-major-mode-delay)
- ;; Window point has been moved to a new chunk with a new
- ;; major mode. Major mode will not be changed directly,
- ;; but in an idle timer or in pre-command-hook. To avoid
- ;; that the user get the wrong key bindings for the new
- ;; chunk fetch the local map directly and apply that.
- (let* ((map-rec (assoc major mumamo-major-modes-local-maps))
- (map (cdr map-rec)))
- (unless map
- (setq map (mumamo-fetch-local-map major)))
- (unless (eq map 'no-local-map)
- (use-local-map map))
- (add-hook 'pre-command-hook 'mumamo-set-major-pre-command nil t)
- (mumamo-request-idle-set-major-mode))
- (mumamo-set-major major ovl)
- (message "Switched to %s" major-mode))
- (mumamo-set-major major ovl)))))
-
-(defun mumamo-set-major-pre-command ()
- "Change major mode if necessary before a command.
-When the key sequence that invoked the command is in current
-local map and major mode is not the major mode for the current
-mumamo chunk then set major mode to that for the chunk."
- (mumamo-condition-case err
- ;; First see if we can avoid changing major mode
- (if (memq this-command mumamo-safe-commands-in-wrong-major)
- (mumamo-request-idle-set-major-mode)
- ;;(message "pre point=%s" (point))
- (let* ((ovl (mumamo-find-chunks (point) "mumamo-set-major-pre-command"))
- (major (mumamo-chunk-major-mode ovl)))
- ;;(message "pre point=%s" (point))
- (if (not major)
- (lwarn '(mumamo-set-major-pre-command) :error "major=%s" major)
- (when (or (not (mumamo-fun-eq major-mode major))
- (not (mumamo-set-major-check-keymap)))
- (setq major-mode nil)
- (mumamo-set-major major ovl)
- ;; Unread the last command key sequence
- (setq unread-command-events
- (append (listify-key-sequence (this-command-keys-vector))
- unread-command-events))
- ;; Some commands, like `viper-command-argument' need to
- ;; know the last command, so tell them.
- (setq this-command (lambda ()
- (interactive)
- (setq this-command last-command)))))))
- (error
- (mumamo-display-error 'mumamo-set-major-pre-command
- "cb:%s, %s" (current-buffer) (error-message-string err)))))
-
-(defun mumamo-idle-set-major-mode (buffer window)
- "Set major mode from mumamo chunk when Emacs is idle.
-Do this only if current buffer is BUFFER and then do it in window
-WINDOW.
-
-See the variable `mumamo-set-major-mode-delay' for an
-explanation."
- (save-match-data ;; runs in idle timer
- (mumamo-msgfntfy "mumamo-idle-set-major-mode b=%s, window=%s" buffer window)
- (with-selected-window window
- ;; According to Stefan Monnier we need to set the buffer too.
- (with-current-buffer (window-buffer window)
- (when (eq buffer (current-buffer))
- (mumamo-condition-case err
- ;;(let* ((ovl (mumamo-get-chunk-at (point)))
- ;;(message "idle point=%s" (point))
- (let* ((ovl (mumamo-find-chunks (point) "mumamo-idle-set-major-mode"))
- (major (mumamo-chunk-major-mode ovl))
- (modified (buffer-modified-p)))
- ;;(message "idle point=%s" (point))
- (unless (mumamo-fun-eq major major-mode)
- ;;(message "mumamo-set-major at A")
- (mumamo-set-major major ovl)
- ;; Fix-me: This is a bug workaround. Possibly in Emacs.
- (when (and (buffer-modified-p)
- (not modified))
- (set-buffer-modified-p nil))
- ;; sync keymap
- (when (timerp mumamo-unread-command-events-timer)
- (cancel-timer mumamo-unread-command-events-timer))
- (when unread-command-events
- ;; Save unread keys before calling `top-level' which
- ;; will clear them.
- (setq mumamo-unread-command-events-timer
- (run-with-idle-timer
- 0 nil
- 'mumamo-unread-command-events
- unread-command-events
- major last-command))
- (top-level)
- )))
- (error
- (mumamo-display-error 'mumamo-idle-set-major-mode
- "cb=%s, err=%s" (current-buffer) err))))))))
-
-(defun mumamo-post-command-1 (&optional no-debug)
- "See `mumamo-post-command'.
-Turn on `debug-on-error' unless NO-DEBUG is nil."
- (unless no-debug (setq debug-on-error t))
- (setq mumamo-find-chunks-level 0)
- (mumamo-msgfntfy "mumamo-post-command-1 ENTER: font-lock-mode=%s" font-lock-mode)
- (if font-lock-mode
- (mumamo-set-major-post-command)
- ;;(mumamo-on-font-lock-off)
- )
- ;;(msgtrc "mumamo-post-command-1 EXIT: font-lock-keywords-only =%s" (default-value 'font-lock-keywords-only))
- )
-
-
-
-
-(defvar mumamo-bug-3467-w14 41)
-(defvar mumamo-bug-3467-w15 51)
-;;(mumamo-check-has-bug3467 t)
-;;(kill-local-variable 'mumamo-bug-3467-w14)
-(defun mumamo-check-has-bug3467 (verbose)
- (let ((has-bug nil))
- (with-temp-buffer
- (let ((mumamo-bug-3467-w14 42)
- (mumamo-bug-3467-w15 52))
- (when verbose (message "mumamo-bug-3467-w14 maybe let: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w14 (default-value 'mumamo-bug-3467-w14)))
- (when verbose (message "mumamo-bug-3467-w15 maybe let: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w15 (default-value 'mumamo-bug-3467-w15)))
- (set (make-local-variable 'mumamo-bug-3467-w14) 43)
- (set-default 'mumamo-bug-3467-w14 44)
- (set-default 'mumamo-bug-3467-w15 54)
- (when verbose (message "mumamo-bug-3467-w14 maybe let: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w14 (default-value 'mumamo-bug-3467-w14)))
- (when verbose (message "mumamo-bug-3467-w15 maybe let: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w15 (default-value 'mumamo-bug-3467-w15))))
- (when verbose (message "mumamo-bug-3467-w14 top level: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w14 (default-value 'mumamo-bug-3467-w14)))
- (when (/= mumamo-bug-3467-w14 43) (setq has-bug t))
- (when (/= (default-value 'mumamo-bug-3467-w14) 41) (setq has-bug t))
- (when verbose (message "mumamo-bug-3467-w15 top level: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w15 (default-value 'mumamo-bug-3467-w15)))
- )
- (when verbose (message "mumamo-bug-3467-w14 top level: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w14 (default-value 'mumamo-bug-3467-w14)))
- (when verbose (message "mumamo-bug-3467-w15 top level: in buffer %s=%S, global=%S" (current-buffer) mumamo-bug-3467-w15 (default-value 'mumamo-bug-3467-w15)))
- (or has-bug
- (local-variable-p 'mumamo-bug-3467-w14)
- (/= (default-value 'mumamo-bug-3467-w14) 41)
- )
- ))
-
-(defvar mumamo-has-bug3467 (mumamo-check-has-bug3467 nil))
-
-(defun mumamo-emacs-start-bug3467-timer-if-needed ()
- "Work around for Emacs bug 3467. The only one I have found."
- (when mumamo-has-bug3467
- (run-with-idle-timer 0 nil 'mumamo-emacs-bug3467-workaround)))
-
-(defun mumamo-emacs-bug3467-workaround ()
- "Work around for Emacs bug 3467. The only one I have found."
- (set-default 'font-lock-keywords-only nil))
-
-
-
-
-(defun mumamo-post-command ()
- "Run this in `post-command-hook'.
-Change major mode if necessary."
- ;;(msgtrc "mumamo-post-command")
- (when mumamo-multi-major-mode
- (mumamo-condition-case err
- (mumamo-post-command-1 t)
- (error
- (mumamo-msgfntfy "mumamo-post-command %S" err)
- ;; Warnings are to disturbing when run in post-command-hook,
- ;; but this message is important so show it with an highlight.
- (message
- (propertize
- "%s\n- Please try M-: (mumamo-post-command-1) to see what happened."
- 'face 'highlight)
- (error-message-string err))))))
-
-(defun mumamo-change-major-function ()
- "Function added to `change-major-mode-hook'.
-Remove mumamo when changing to a new major mode if the change is
-not done because point was to a new chunk."
- (unless mumamo-set-major-running
- (mumamo-turn-off-actions)))
-
-(defun mumamo-derived-from-mode (major from-mode)
- "Return t if major mode MAJOR is derived from FROM-MODE."
- (let ((major-mode major))
- (derived-mode-p from-mode)))
-
-;; This is the new version of add-hook. For its origin see
-;; http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg00169.html
-;;
-;;(unless (> emacs-major-version 22)
-(defvar mumamo-test-add-hook nil
- "Internal use.")
-(unless (and t
- (let ((has-it nil))
- ;;(add-hook 'mumamo-test-add-hook 'mumamo-jit-lock-after-change nil t)
- (add-hook 'mumamo-test-add-hook 'mumamo-after-change nil t)
- (setq has-it (eq 'permanent-local-hook
- (get 'mumamo-test-add-hook 'permanent-local)))
- has-it))
- (defun add-hook (hook function &optional append local)
- "Add to the value of HOOK the function FUNCTION.
-FUNCTION is not added if already present.
-FUNCTION is added (if necessary) at the beginning of the hook list
-unless the optional argument APPEND is non-nil, in which case
-FUNCTION is added at the end.
-
-The optional fourth argument, LOCAL, if non-nil, says to modify
-the hook's buffer-local value rather than its default value.
-This makes the hook buffer-local if needed, and it makes t a member
-of the buffer-local value. That acts as a flag to run the hook
-functions in the default value as well as in the local value.
-
-HOOK should be a symbol, and FUNCTION may be any valid function. If
-HOOK is void, it is first set to nil. If HOOK's value is a single
-function, it is changed to a list of functions."
- (or (boundp hook) (set hook nil))
- (or (default-boundp hook) (set-default hook nil))
- (if local (unless (local-variable-if-set-p hook)
- (set (make-local-variable hook) (list t)))
- ;; Detect the case where make-local-variable was used on a hook
- ;; and do what we used to do.
- (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook)))
- (setq local t)))
- (let ((hook-value (if local (symbol-value hook) (default-value hook))))
- ;; If the hook value is a single function, turn it into a list.
- (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda))
- (setq hook-value (list hook-value)))
- ;; Do the actual addition if necessary
- (unless (member function hook-value)
- (setq hook-value
- (if append
- (append hook-value (list function))
- (cons function hook-value))))
- ;; Set the actual variable
- (if local
- (progn
- ;; If HOOK isn't a permanent local,
- ;; but FUNCTION wants to survive a change of modes,
- ;; mark HOOK as partially permanent.
- (and (symbolp function)
- (get function 'permanent-local-hook)
- (not (get hook 'permanent-local))
- (put hook 'permanent-local 'permanent-local-hook))
- (set hook hook-value))
- (set-default hook hook-value))))
- )
-
-
-(defvar mumamo-survive-hooks
- '(
- ;; activate-mark-hook after-change-functions after-save-hook
- ;; before-save-functions auto-save-hook before-revert-hook
- ;; buffer-access-fontify-functions calendar-load-hook
- ;; command-line-functions compilation-finish-function
- ;; deactivate-mark-hook find-file-hook
- ;; find-file-not-found-functions first-change-hook
- ;; kbd-macro-termination-hook kill-buffer-hook
- ;; kill-buffer-query-functions menu-bar-update-hook
- ;; post-command-hook pre-abbrev-expand-hook pre-command-hook
- ;; write-contents-functions write-file-functions
- ;; write-region-annotate-functions
- ;; c-special-indent-hook
- ))
-
-;;
-;; Emulation modes
-;;
-;; These variables should have 'permanant-local t set in their
-;; packages IMO, but now they do not have that.
-(eval-after-load 'viper-cmd
- (progn
- (put 'viper-after-change-functions 'permanent-local t)
- (put 'viper-before-change-functions 'permanent-local t)
- ))
-(eval-after-load 'viper
- (progn
- (put 'viper-post-command-hooks 'permanent-local t)
- (put 'viper-pre-command-hooks 'permanent-local t)
- ;;minor-mode-map-alist
- ;; viper-mode-string -- is already buffer local, globally void
- (put 'viper-mode-string 'permanent-local t)
- ))
-;;viper-tut--part
-(eval-after-load 'viper-init
- (progn
- (put 'viper-d-com 'permanent-local t)
- (put 'viper-last-insertion 'permanent-local t)
- (put 'viper-command-ring 'permanent-local t)
- (put 'viper-vi-intercept-minor-mode 'permanent-local t)
- (put 'viper-vi-basic-minor-mode 'permanent-local t)
- (put 'viper-vi-local-user-minor-mode 'permanent-local t)
- (put 'viper-vi-global-user-minor-mode 'permanent-local t)
- (put 'viper-vi-state-modifier-minor-mode 'permanent-local t)
- (put 'viper-vi-diehard-minor-mode 'permanent-local t)
- (put 'viper-vi-kbd-minor-mode 'permanent-local t)
- (put 'viper-insert-intercept-minor-mode 'permanent-local t)
- (put 'viper-insert-basic-minor-mode 'permanent-local t)
- (put 'viper-insert-local-user-minor-mode 'permanent-local t)
- (put 'viper-insert-global-user-minor-mode 'permanent-local t)
- (put 'viper-insert-state-modifier-minor-mode 'permanent-local t)
- (put 'viper-insert-diehard-minor-mode 'permanent-local t)
- (put 'viper-insert-kbd-minor-mode 'permanent-local t)
- (put 'viper-replace-minor-mode 'permanent-local t)
- (put 'viper-emacs-intercept-minor-mode 'permanent-local t)
- (put 'viper-emacs-local-user-minor-mode 'permanent-local t)
- (put 'viper-emacs-global-user-minor-mode 'permanent-local t)
- (put 'viper-emacs-kbd-minor-mode 'permanent-local t)
- (put 'viper-emacs-state-modifier-minor-mode 'permanent-local t)
- (put 'viper-vi-minibuffer-minor-mode 'permanent-local t)
- (put 'viper-insert-minibuffer-minor-mode 'permanent-local t)
- (put 'viper-automatic-iso-accents 'permanent-local t)
- (put 'viper-special-input-method 'permanent-local t)
- (put 'viper-intermediate-command 'permanent-local t)
- ;; already local: viper-undo-needs-adjustment
- (put 'viper-began-as-replace 'permanent-local t)
- ;; already local: viper-replace-overlay
- ;; already local: viper-last-posn-in-replace-region
- ;; already local: viper-last-posn-while-in-insert-state
- ;; already local: viper-sitting-in-replace
- (put 'viper-replace-chars-to-delete 'permanent-local t)
- (put 'viper-replace-region-chars-deleted 'permanent-local t)
- (put 'viper-current-state 'permanent-local t)
- (put 'viper-cted 'permanent-local t)
- (put 'viper-current-indent 'permanent-local t)
- (put 'viper-preserve-indent 'permanent-local t)
- (put 'viper-auto-indent 'permanent-local t)
- (put 'viper-electric-mode 'permanent-local t)
- ;; already local: viper-insert-point
- ;; already local: viper-pre-command-point
- (put 'viper-com-point 'permanent-local t)
- (put 'viper-ex-style-motion 'permanent-local t)
- (put 'viper-ex-style-editing 'permanent-local t)
- (put 'viper-ESC-moves-cursor-back 'permanent-local t)
- (put 'viper-delete-backwards-in-replace 'permanent-local t)
- ;; already local: viper-related-files-and-buffers-ring
- (put 'viper-local-search-start-marker 'permanent-local t)
- (put 'viper-search-overlay 'permanent-local t)
- (put 'viper-last-jump 'permanent-local t)
- (put 'viper-last-jump-ignore 'permanent-local t)
- (put 'viper-minibuffer-current-face 'permanent-local t)
- ;; already local: viper-minibuffer-overlay
- (put 'viper-command-ring 'permanent-local t)
- (put 'viper-last-insertion 'permanent-local t)
- ))
-(eval-after-load 'viper-keym
- (progn
- ;; already local: viper-vi-local-user-map
- ;; already local: viper-insert-local-user-map
- ;; already local: viper-emacs-local-user-map
- (put 'viper--key-maps 'permanent-local t)
- (put 'viper--intercept-key-maps 'permanent-local t)
- ;; already local: viper-need-new-vi-local-map
- ;; already local: viper-need-new-insert-local-map
- ;; already local: viper-need-new-emacs-local-map
- ))
-(eval-after-load 'viper-mous
- (progn
- (put 'viper-mouse-click-search-noerror 'permanent-local t)
- (put 'viper-mouse-click-search-limit 'permanent-local t)
- ))
-(eval-after-load 'viper-util
- (progn
- (put 'viper-syntax-preference 'permanent-local t)
- (put 'viper-non-word-characters 'permanent-local t)
- (put 'viper-ALPHA-char-class 'permanent-local t)
- ))
-
-(eval-after-load 'cua-base
- (progn
- (put 'cua-inhibit-cua-keys 'permanent-local t)
- (put 'cua--explicit-region-start 'permanent-local t)
- (put 'cua--status-string 'permanent-local t)
- ))
-;; This is for the defvar in ido.el:
-(eval-after-load 'ido
- (progn
- (put 'cua-inhibit-cua-keys 'permanent-local t)
- ))
-(eval-after-load 'cua-rect
- (progn
- (put 'cua--rectangle 'permanent-local t)
- (put 'cua--rectangle-overlays 'permanent-local t)
- ))
-(eval-after-load 'edt
- (progn
- (put 'edt-select-mode 'permanent-local t)
- ))
-(eval-after-load 'tpu-edt
- (progn
- (put 'tpu-newline-and-indent-p 'permanent-local t)
- (put 'tpu-newline-and-indent-string 'permanent-local t)
- (put 'tpu-saved-delete-func 'permanent-local t)
- (put 'tpu-buffer-local-map 'permanent-local t)
- (put 'tpu-mark-flag 'permanent-local t)
- ))
-(eval-after-load 'vi
- (progn
- (put 'vi-add-to-mode-line 'permanent-local t)
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-scroll-amount
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-shift-width
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-ins-point
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-ins-length
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-ins-repetition
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-ins-overwrt-p
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-ins-prefix-code
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-last-change-command
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-last-shell-command
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-last-find-char
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-mark-alist
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-insert-state
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-mode-old-local-map
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-mode-old-mode-name
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-mode-old-major-mode
- ;;Warning (mumamo-per-buffer-local-vars): Not a local variable: vi-mode-old-case-fold
- ;;
- ))
-(eval-after-load 'vi
- (progn
- (put 'vip-emacs-local-map 'permanent-local t)
- (put 'vip-insert-local-map 'permanent-local t)
- (put 'vip-insert-point 'permanent-local t)
- (put 'vip-com-point 'permanent-local t)
- (put 'vip-current-mode 'permanent-local t)
- (put 'vip-emacs-mode-line-buffer-identification 'permanent-local t)
- (put 'vip-current-major-mode 'permanent-local t)
- ))
-
-(eval-after-load 'hi-lock
- (progn
- (put 'hi-lock-mode 'permanent-local t)
- ))
-
-;;
-;; Minor modes that are not major mode specific
-;;
-
-(put 'visual-line-mode 'permanent-local t)
-
-(eval-after-load 'flymake
- (progn
- ;; hook functions:
- (put 'flymake-after-change-function 'permanent-local-hook t)
- (put 'flymake-after-save-hook 'permanent-local-hook t)
- (put 'flymake-kill-buffer-hook 'permanent-local-hook t)
- ;; hooks:
-;;; (put 'after-change-functions 'permanent-local 'permanent-local-hook)
-;;; (put 'after-save-hook 'permanent-local 'permanent-local-hook)
-;;; (put 'kill-buffer-hook 'permanent-local 'permanent-local-hook)
- ;; vars:
- (put 'flymake-mode 'permanent-local t)
- (put 'flymake-is-running 'permanent-local t)
- (put 'flymake-timer 'permanent-local t)
- (put 'flymake-last-change-time 'permanent-local t)
- (put 'flymake-check-start-time 'permanent-local t)
- (put 'flymake-check-was-interrupted 'permanent-local t)
- (put 'flymake-err-info 'permanent-local t)
- (put 'flymake-new-err-info 'permanent-local t)
- (put 'flymake-output-residual 'permanent-local t)
- (put 'flymake-mode-line 'permanent-local t)
- (put 'flymake-mode-line-e-w 'permanent-local t)
- (put 'flymake-mode-line-status 'permanent-local t)
- (put 'flymake-temp-source-file-name 'permanent-local t)
- (put 'flymake-master-file-name 'permanent-local t)
- (put 'flymake-temp-master-file-name 'permanent-local t)
- (put 'flymake-base-dir 'permanent-local t)))
-
-;; (eval-after-load 'imenu
-;; (progn
-;; ;; Fix-me: imenu is only useful for main major mode. The menu
-;; ;; disappears in sub chunks because it is tighed to
-;; ;; local-map. Don't know what to do about that. I do not
-;; ;; understand the reason for binding it to local-map, but I
-;; ;; suspect the intent is to have different menu items for
-;; ;; different modes. Could not that be achieved by deleting the
-;; ;; menu and creating it again when changing major mode? (That must
-;; ;; be implemented in imenu.el of course.)
-;; ;;
-;; ;; hook functions:
-;; ;;; (put 'imenu-update-menubar 'permanent-local-hook t)
-;; ;; hooks:
-;; (put 'menu-bar-update-hook 'permanent-local 'permanent-local-hook)
-;; ;; vars:
-;; (put 'imenu-generic-expression 'permanent-local t)
-;; (put 'imenu-create-index-function 'permanent-local t)
-;; (put 'imenu-prev-index-position-function 'permanent-local t)
-;; (put 'imenu-extract-index-name-function 'permanent-local t)
-;; (put 'imenu-name-lookup-function 'permanent-local t)
-;; (put 'imenu-default-goto-function 'permanent-local t)
-;; (put 'imenu--index-alist 'permanent-local t)
-;; (put 'imenu--last-menubar-index-alist 'permanent-local t)
-;; (put 'imenu-syntax-alist 'permanent-local t)
-;; (put 'imenu-case-fold-search 'permanent-local t)
-;; (put 'imenu-menubar-modified-tick 'permanent-local t)
-;; ))
-
-(eval-after-load 'longlines
- (progn
- ;; Fix-me: take care of longlines-mode-off
- (put 'longlines-mode 'permanent-local t)
- (put 'longlines-wrap-beg 'permanent-local t)
- (put 'longlines-wrap-end 'permanent-local t)
- (put 'longlines-wrap-point 'permanent-local t)
- (put 'longlines-showing 'permanent-local t)
- (put 'longlines-decoded 'permanent-local t)
- ;;
- (put 'longlines-after-change-function 'permanent-local-hook t)
- (put 'longlines-after-revert-hook 'permanent-local-hook t)
- (put 'longlines-before-revert-hook 'permanent-local-hook t)
- (put 'longlines-decode-buffer 'permanent-local-hook t)
- (put 'longlines-decode-region 'permanent-local-hook t)
- (put 'longlines-mode-off 'permanent-local-hook t)
- (put 'longlines-post-command-function 'permanent-local-hook t)
- (put 'longlines-window-change-function 'permanent-local-hook t)
- ;;(put 'mail-indent-citation 'permanent-local-hook t)
- ))
-
-
-;; Fix-me: Rails, many problematic things:
-
-;;; Fix-me: No idea about these, where are they used?? Add them to
-;;; mumamo-per-buffer-local-vars?:
-;; predictive-main-dict
-;; predictive-prog-mode-main-dict
-;; predictive-use-auto-learn-cache
-;; predictive-dict-autosave-on-kill-buffer
-(eval-after-load 'inf-ruby
- (progn
- (put 'inferior-ruby-first-prompt-pattern 'permanent-local t)
- (put 'inferior-ruby-prompt-pattern 'permanent-local t)
- ))
-
-;;; These are for the output buffer (no problems):
-;; font-lock-keywords-only
-;; font-lock-defaults -- always buffer local
-;; scroll-margin
-;; scroll-preserve-screen-position
-
-(eval-after-load 'rails-script
- (progn
- (put 'rails-script:run-after-stop-hook 'permanent-local t)
- (put 'rails-script:show-buffer-hook 'permanent-local t)
- (put 'rails-script:output-mode-ret-value 'permanent-local t)
- ))
-
-;;; No problems I believe (it is in output buffer):
-;; compilation-error-regexp-alist-alist
-;; compilation-error-regexp-alist
-
-;;; Fix-me: This is in the minor mode, what to do? Looks like it
-;;; should have 'permanent-local t - in this case. I have added it to
-;;; mumamo-per-buffer-local-vars for now.
-;; tags-file-name
-
-(eval-after-load 'rails
- (progn
- (put 'rails-primary-switch-func 'permanent-local t)
- (put 'rails-secondary-switch-func 'permanent-local t)
- ))
-
-;; (defun test-js-perm ()
-;; (put 'js--quick-match-re 'permanent-local t)
-;; (put 'js--quick-match-re-func 'permanent-local t)
-;; (put 'js--cache-end 'permanent-local t)
-;; (put 'js--last-parse-pos 'permanent-local t)
-;; (put 'js--state-at-last-parse-pos 'permanent-local t)
-;; (put 'js--tmp-location 'permanent-local t))
-;; (test-js-perm)
-
-(defvar mumamo-per-buffer-local-vars
- '(
- buffer-file-name
- left-margin-width
- right-margin-width
- ;; Fix-me: This is to prevent font-lock-mode turning off/on, but
- ;; is it necessary?
- ;;font-lock-mode-major-mode
- tags-file-name
- nxhtml-menu-mode
- ;; Fix-me: adding rng timers here stops Emacs from looping after
- ;; indenting in ind-0-error.php, but I have no clue why. Hm. This
- ;; problem is gone, but I forgot why.
- rng-c-current-token ;;rng-cmpct.el:132:(make-variable-buffer-local 'rng-c-current-token)
- rng-c-escape-positions ;;rng-cmpct.el:341:(make-variable-buffer-local 'rng-c-escape-positions)
- rng-c-file-name ;;rng-cmpct.el:344:(make-variable-buffer-local 'rng-c-file-name)
- rng-current-schema-file-name ;;rng-loc.el:37:(make-variable-buffer-local 'rng-current-schema-file-name)
- rng-current-schema ;;rng-pttrn.el:71:(make-variable-buffer-local 'rng-current-schema)
- ;;rng-validate-timer is permanent-local t
- ;;rng-validate-timer ;;rng-valid.el:141:(make-variable-buffer-local 'rng-validate-timer)
- ;;rng-validate-quick-timer is permanent-local t
- ;;rng-validate-quick-timer ;;rng-valid.el:146:(make-variable-buffer-local 'rng-validate-quick-timer)
- rng-error-count ;;rng-valid.el:153:(make-variable-buffer-local 'rng-error-count)
- rng-message-overlay ;;rng-valid.el:158:(make-variable-buffer-local 'rng-message-overlay)
- rng-message-overlay-inhibit-point ;;rng-valid.el:165:(make-variable-buffer-local 'rng-message-overlay-inhibit-point)
- rng-message-overlay-current ;;rng-valid.el:169:(make-variable-buffer-local 'rng-message-overlay-current)
- rng-validate-up-to-date-end ;;rng-valid.el:188:(make-variable-buffer-local 'rng-validate-up-to-date-end)
- rng-conditional-up-to-date-start ;;rng-valid.el:199:(make-variable-buffer-local 'rng-conditional-up-to-date-start)
- rng-conditional-up-to-date-end ;;rng-valid.el:205:(make-variable-buffer-local 'rng-conditional-up-to-date-end)
- rng-validate-mode ;;rng-valid.el:212:(make-variable-buffer-local 'rng-validate-mode)
- rng-dtd ;;rng-valid.el:215:(make-variable-buffer-local 'rng-dtd)
-
- nxml-syntax-highlight-flag ;; For pre-Emacs nxml
- ;;nxml-ns-state - not buffer local currently
- nxml-prolog-regions ;;snxml-mode.el:362:(make-variable-buffer-local 'nxml-prolog-regions)
- nxml-last-fontify-end ;;dnxml-mode.el:367:(make-variable-buffer-local 'nxml-last-fontify-end)
- nxml-degraded ;;dnxml-mode.el:373:(make-variable-buffer-local 'nxml-degraded)
- nxml-char-ref-extra-display ;;ynxml-mode.el:397:(make-variable-buffer-local 'nxml-char-ref-extra-display)
- nxml-prolog-end ;;dnxml-rap.el:92:(make-variable-buffer-local 'nxml-prolog-end)
- nxml-scan-end ;;dnxml-rap.el:107:(make-variable-buffer-local 'nxml-scan-end)
-
- ;;buffer-invisibility-spec
- ;;header-line-format
-
- ;; Fix-me: These must be handled with 'permanent-local since they may be changed:
- line-move-visual ;;simple.el:4537: (kill-local-variable 'line-move-visual)
- word-wrap ;;simple.el:4538: (kill-local-variable 'word-wrap)
- truncate-lines ;;simple.el:4539: (kill-local-variable 'truncate-lines)
- truncate-partial-width-windows ;;simple.el:4540: (kill-local-variable 'truncate-partial-width-windows)
- fringe-indicator-alist ;;simple.el:4541: (kill-local-variable 'fringe-indicator-alist)
- visual-line--saved-state ;;simple.el:4544: (kill-local-variable 'visual-line--saved-state)))
- vis-mode-saved-buffer-invisibility-spec ;;simple.el:6237: (kill-local-variable 'vis-mode-saved-buffer-invisibility-spec))
-
- )
- "Per buffer local variables.
-See also `mumamo-per-main-major-local-vars'.")
-
-;; Fix-me: use this, but how exactly? I think the var values must be
-;; picked up at every change from main major mode. And restored after
-;; changing to the new major mode - but maybe a bit differently if
-;; this is the main major mode.
-(defvar mumamo-per-main-major-local-vars
- '(
- buffer-invisibility-spec
- header-line-format
- )
- "Per main major local variables.
-Like `mumamo-per-buffer-local-vars', but this is fetched from the
-main major mode.")
-
-;; (when nil
-;; (make-variable-buffer-local 'mumamo-survive-minor-modes)
-;; (put 'mumamo-survive-minor-modes 'permanent-local t)
-;; (defvar mumamo-survive-minor-modes nil
-;; "Hold local minor mode variables specific major modes.
-;; Those values are saved when leaving a chunk with a certain
-;; major mode and restored when entering a chunk with the same
-;; major mode again.
-
-;; The value of this variable is an associative list where the key
-;; is a list with
-
-;; \(MAJOR-MODE MINOR-MODE)
-
-;; and the value is a stored value for the minor mode.")
-;; )
-
-(defun mumamo-make-variable-buffer-permanent (var)
- "Make buffer local value of VAR survive when moving point to a new chunk.
-When point is moved between chunks in a multi major mode the
-major mode will be changed. This will by default kill all local
-variables unless they have a non-nil `permanent-local' property
-\(see info node `(elisp)Creating Buffer-Local').
-
-If you do not want to put a `permanent-local' property on a
-variable you can instead use this function to make variable VAR
-survive chunk switches in all mumamo multi major mode buffers."
- ;; If you want it to survive chunk switches only in the current
- ;; buffer then use `mumamo-make-local-permanent' instead."
- (pushnew var (default-value 'mumamo-per-buffer-local-vars)))
-
-;; ;; Fix-me: use local value
-;; ;; Fix-me: delelete local value when exiting mumamo
-;; (defun mumamo-make-local-permanent (var)
-;; "Make buffer local value of VAR survive when moving point to a new chunk.
-;; This is for the current buffer only.
-;; In most cases you almost certainly want to use
-;; `mumamo-make-variable-buffer-permanent' instead."
-;; (pushnew var mumamo-per-buffer-local-vars))
-
-(defvar mumamo-per-buffer-local-vars-done-by-me nil
- "Variables set by mumamo already.
-Used to avoid unnecessary warnings if setting major mode fails.")
-
-;; (mumamo-hook-p 'viper-pre-command-hooks)
-;; (mumamo-hook-p 'viper-before-change-functions)
-;; (mumamo-hook-p 'c-special-indent-hook)
-(defun mumamo-hook-p (sym)
- "Try to detect if SYM is a hook variable.
-Just check the name."
- (let ((name (symbol-name sym)))
- (or (string= "-hook" (substring name -5))
- (string= "-hooks" (substring name -6))
- (string= "-functions" (substring name -10)))))
-
-(defvar mumamo-major-mode nil)
-(make-variable-buffer-local 'mumamo-major-mode)
-(put 'mumamo-major-mode 'permanent-local t)
-
-(defvar mumamo-change-major-mode-no-nos
- '((font-lock-change-mode t)
- (longlines-mode-off t)
- global-font-lock-mode-cmhh
- (nxml-cleanup t)
- (turn-off-hideshow t))
- "Avoid running these in `change-major-mode-hook'.")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Remove things from hooks temporarily
-
-;; Fix-me: This is a bit disorganized, could not decide which level I
-;; wanted this on.
-
-(defvar mumamo-after-change-major-mode-no-nos
- '(;;nxhtml-global-minor-mode-enable-in-buffers
- global-font-lock-mode-enable-in-buffers)
- "Avoid running these in `after-change-major-mode-hook'.")
-
-(defvar mumamo-removed-from-hook nil)
-
-(defun mumamo-remove-from-hook (hook remove)
- "From hook HOOK remove functions in list REMOVE.
-Save HOOK and the list of functions removed to
-`mumamo-removed-from-hook'."
- (let (did-remove
- removed)
- (dolist (rem remove)
- ;;(message "rem.rem=%s" rem)
- (setq did-remove nil)
- (if (listp rem)
- (when (memq (car rem) (symbol-value hook))
- (setq did-remove t)
- (remove-hook hook (car rem) t))
- (when (memq rem (symbol-value hook))
- (setq did-remove t)
- (remove-hook hook rem)))
- (when did-remove
- (setq removed (cons rem removed))))
- (setq mumamo-removed-from-hook
- (cons (cons hook removed)
- mumamo-removed-from-hook))))
-
-(defun mumamo-addback-to-hooks ()
- "Add back what was removed by `mumamo-remove-from-hook'."
- ;;(message "mumamo-removed-from-hook=%s" mumamo-removed-from-hook)
- (dolist (rem-rec mumamo-removed-from-hook)
- (mumamo-addback-to-hook (car rem-rec) (cdr rem-rec))))
-
-(defun mumamo-addback-to-hook (hook removed)
- "Add to hook HOOK the list of functions in REMOVED."
- ;;(message "addback: hook=%s, removed=%s" hook removed)
- (dolist (rem removed)
- ;;(message "add.rem=%s" rem)
- (if (listp rem)
- (add-hook hook (car rem) nil t)
- (add-hook hook rem))))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; Compare mumamo-irrelevant-buffer-local-vars
-(defvar mumamo-buffer-locals-dont-set
- '(
- adaptive-fill-mode
- adaptive-fill-first-line-regexp
- adaptive-fill-regexp
- add-log-current-defun-header-regexp
- auto-composition-function
- auto-composition-mode
- auto-composition-mode-major-mode
- auto-fill-chars
-
- beginning-of-defun-function
- buffer-auto-save-file-format
- buffer-auto-save-file-name
- buffer-backed-up
- buffer-display-count
- buffer-display-time
- buffer-file-coding-system
- buffer-file-format
- buffer-file-name
- buffer-file-truename
- buffer-invisibility-spec
- buffer-read-only
- buffer-saved-size
- buffer-undo-list
-
- c++-template-syntax-table
- c-<-op-cont-regexp
- c-<>-multichar-token-regexp
- c->-op-cont-regexp
- c-after-suffixed-type-decl-key
- c-after-suffixed-type-maybe-decl-key
- c-anchored-cpp-prefix
- c-assignment-op-regexp
- c-at-vsemi-p-fn
- c-backslash-column
- c-backslash-max-column
- ;;c-basic-offset
- c-before-font-lock-function
- c-block-comment-prefix
- c-block-comment-start-regexp
- c-block-prefix-charset
- c-block-stmt-1-key
- c-block-stmt-2-key
- c-brace-list-key
- c-cast-parens
- c-class-key
- c-cleanup-list
- c-colon-type-list-re
- c-comment-only-line-offset
- c-comment-prefix-regexp
- c-comment-start-regexp
- c-current-comment-prefix
- c-decl-block-key
- c-decl-hangon-key
- c-decl-prefix-or-start-re
- c-decl-prefix-re
- c-decl-start-re
- c-doc-comment-start-regexp
- c-doc-comment-style
- c-found-types
- c-get-state-before-change-function
- c-hanging-braces-alist
- c-hanging-colons-alist
- c-hanging-semi&comma-criteria
- c-identifier-key
- c-identifier-start
- c-identifier-syntax-modifications
- c-identifier-syntax-table
- ;;c-indent-comment-alist
- ;;c-indent-comments-syntactically-p
- ;;c-indentation-style
- c-keywords-obarray
- c-keywords-regexp
- c-known-type-key
- c-label-kwds-regexp
- c-label-minimum-indentation
- c-label-prefix-re
- c-line-comment-starter
- c-literal-start-regexp
- c-multiline-string-start-char
- c-nonlabel-token-key
- c-nonsymbol-chars
- c-nonsymbol-token-regexp
- c-not-decl-init-keywords
- ;;c-offsets-alist
- c-old-BOM
- c-old-EOM
- c-opt-<>-arglist-start
- c-opt-<>-arglist-start-in-paren
- c-opt-<>-sexp-key
- c-opt-asm-stmt-key
- c-opt-bitfield-key
- c-opt-block-decls-with-vars-key
- c-opt-block-stmt-key
- c-opt-cpp-macro-define-id
- c-opt-cpp-macro-define-start
- c-opt-cpp-prefix
- c-opt-cpp-start
- c-opt-extra-label-key
- c-opt-friend-key
- c-opt-identifier-concat-key
- c-opt-inexpr-brace-list-key
- c-opt-method-key
- c-opt-op-identifier-prefix
- c-opt-postfix-decl-spec-key
- c-opt-type-component-key
- c-opt-type-concat-key
- c-opt-type-modifier-key
- c-opt-type-suffix-key
- c-other-decl-block-key
- c-other-decl-block-key-in-symbols-alist
- c-overloadable-operators-regexp
- c-paragraph-separate
- c-paragraph-start
- c-paren-stmt-key
- c-prefix-spec-kwds-re
- c-primary-expr-regexp
- c-primitive-type-key
- c-recognize-<>-arglists
- c-recognize-colon-labels
- c-recognize-knr-p
- c-recognize-paren-inexpr-blocks
- c-recognize-paren-inits
- c-recognize-typeless-decls
- c-regular-keywords-regexp
- c-simple-stmt-key
- c-special-brace-lists
- c-special-indent-hook
- c-specifier-key
- c-stmt-delim-chars
- c-stmt-delim-chars-with-comma
- c-string-escaped-newlines
- c-symbol-key
- c-symbol-start
- c-syntactic-eol
- c-syntactic-ws-end
- c-syntactic-ws-start
- c-type-decl-end-used
- c-type-decl-prefix-key
- c-type-decl-suffix-key
- c-type-prefix-key
- c-vsemi-status-unknown-p-fn
-
- case-fold-search
- comment-end
- comment-end-skip
- comment-indent-function
- comment-line-break-function
- comment-multi-line
- comment-start
- comment-start-skip
- cursor-type
-
- default-directory
- defun-prompt-regexp
- delay-mode-hooks
-
- enable-multibyte-characters
- end-of-defun-function
-
- fill-paragraph-function
- font-lock-beginning-of-syntax-function
- font-lock-defaults
- font-lock-extend-after-change-region-function
- font-lock-extend-region-functions
- font-lock-fontified
- font-lock-fontify-buffer-function
- font-lock-fontify-region-function
- font-lock-keywords
- ;;font-lock-keywords-only
- font-lock-keywords-case-fold-search
- font-lock-mode
- font-lock-mode-hook
- font-lock-mode-major-mode
- font-lock-multiline
- font-lock-set-defaults
- font-lock-syntactic-keywords
- font-lock-syntactically-fontified
- font-lock-syntax-table
- font-lock-unfontify-buffer-function
- font-lock-unfontify-region-function
- fontification-functions
- forward-sexp-function
-
- indent-line-function
- indent-region-function
- imenu--index-alist
- imenu--last-menubar-index-alist
- imenu-create-index-function
- imenu-menubar-modified-tick
- isearch-mode
-
- jit-lock-after-change-extend-region-functions
- jit-lock-context-unfontify-pos
- jit-lock-contextually
- jit-lock-functions
- jit-lock-mode
-
- line-move-ignore-invisible
- local-abbrev-table
-
- major-mode
- mark-active
- ;;mark-ring
- mode-line-process
- mode-name
-
- normal-auto-fill-function
- ;;nxhtml-menu-mode-major-mode
-
- open-paren-in-column-0-is-defun-start
- outline-level
- outline-regexp
-
- paragraph-ignore-fill-prefix
- paragraph-separate
- paragraph-start
- parse-sexp-ignore-comments
- parse-sexp-lookup-properties
- php-mode-pear-hook
- point-before-scroll
-
- ;; More symbols from visual inspection
- ;;before-change-functions
- ;;delayed-mode-hooks
- ;;imenu-case-fold-search
- ;;imenu-generic-expression
- rngalt-completing-read-tag
- rngalt-completing-read-attribute-name
- rngalt-completing-read-attribute-value
- rngalt-complete-first-try
- rngalt-complete-last-try
- rngalt-complete-tag-hooks
-
- syntax-begin-function
- )
- "Buffer local variables that is not saved/set per chunk.
-This is supposed to contain mostly buffer local variables
-specific to major modes and that are not meant to be customized
-by the user.
-")
-
-(when (< emacs-major-version 23)
- (defadvice c-after-change (around
- mumamo-ad-c-after-change
- activate
- compile
- )
- ;;(msgtrc "c-after-change: major-mode=%s c-nonsymbol-token-regexp=%s" major-mode c-nonsymbol-token-regexp)
- (when (or (not mumamo-multi-major-mode)
- (derived-mode-p 'c-mode))
- ad-do-it))
- )
-
-(defun mumamo-save-per-major-local-vars (major)
- "Save some per major local variables for major mode MAJOR.
-This should be called before switching to a new chunks major
-mode."
- ;;(message "mumamo-save-per-major-local-vars %s %s" major (current-buffer))
- (let ((locals (buffer-local-variables)))
- (setq locals (mapcar (lambda (local)
- (unless
- (or (memq (car local) mumamo-buffer-locals-dont-set)
- (memq (car local) mumamo-per-buffer-local-vars)
- (memq (car local) mumamo-per-main-major-local-vars)
- (get (car local) 'permanent-local))
- local))
- locals))
- (setq locals (delq nil locals))
- (setq locals (sort locals (lambda (sym-a sym-b)
- (string< (symbol-name (car sym-a))
- (symbol-name (car sym-b))))))
- (setq mumamo-buffer-locals-per-major
- (assq-delete-all major mumamo-buffer-locals-per-major))
- (setq mumamo-buffer-locals-per-major
- (cons (cons major-mode locals)
- mumamo-buffer-locals-per-major))))
-
-;; (benchmark 1000 '(mumamo-save-per-major-local-vars major-mode))
-;; (benchmark 1000 '(mumamo-restore-per-major-local-vars major-mode))
-(defvar mumamo-restore-per-major-local-vars-in-hook-major nil)
-(defun mumamo-restore-per-major-local-vars-in-hook ()
- "Restore some per major mode local variables.
-Call `mumamo-restore-per-major-local-vars'.
-Use `mumamo-restore-per-major-local-vars-in-hook-major' as the
-major mode.
-
-This should be called in the major mode setup hook."
- (mumamo-restore-per-major-local-vars
- mumamo-restore-per-major-local-vars-in-hook-major)
- (setq mumamo-restore-per-major-local-vars-in-hook-major nil))
-(put 'mumamo-restore-per-major-local-vars-in-hook 'permanent-local-hook t)
-
-(defun mumamo-restore-per-major-local-vars (major)
- "Restore some per major local variables for major mode MAJOR.
-This should be called after switching to a new chunks major
-mode."
- (let ((locals (cdr (assq major mumamo-buffer-locals-per-major)))
- var
- perm)
- (dolist (rec locals)
- (setq var (car rec))
- (setq perm (get var 'permanent-local))
- (unless (or perm
- (memq var mumamo-buffer-locals-dont-set))
- (set (make-local-variable var) (cdr rec))))))
-
-;; (defun mumamo-testing-new ()
-;; (let ((locals (buffer-local-variables))
-;; var
-;; perm
-;; )
-;; (dolist (rec locals)
-;; (setq var (car rec))
-;; (setq perm (get var 'permanent-local))
-;; (unless (or perm
-;; (memq var mumamo-buffer-locals-dont-set))
-;; (setq var (cdr rec))))
-;; ))
-;; ;;(benchmark 1000 '(mumamo-testing-new))
-
-(defun mumamo-get-hook-value (hook remove)
- "Return hook HOOK value with entries in REMOVE removed.
-Remove also t. The value returned is a list of both local and
-default values."
- (let ((value (append (symbol-value hook) (default-value hook) nil)))
- (dolist (rem remove)
- (setq value (delq rem value)))
- (delq t value)))
-
-;; FIX-ME: Clean up the different ways of surviving variables during
-;; change of major mode.
-(defvar mumamo-set-major-keymap-checked nil)
-(make-variable-buffer-local 'mumamo-set-major-keymap-checked)
-
-(defvar mumamo-org-startup-done nil)
-(make-variable-buffer-local 'mumamo-org-startup-done)
-(put 'mumamo-org-startup-done 'permanent-local t)
-
-
-(defun mumamo-font-lock-fontify-chunk ()
- "Like `font-lock-default-fontify-buffer' but for a chunk.
-Buffer must be narrowed to inner part of chunk when this function
-is called."
- (let ((verbose (if (numberp font-lock-verbose)
- (and (> font-lock-verbose 0)
- (> (- (point-max) (point-min)) font-lock-verbose))
- font-lock-verbose))
- font-lock-extend-region-functions ;; accept narrowing
- (font-lock-unfontify-region-function 'ignore))
- ;;(setq verbose t)
- (with-temp-message
- (when verbose
- (format "Fontifying %s part %s-%s (%s)..." (buffer-name) (point-min) (point-max) font-lock-verbose))
- (condition-case err
- (save-excursion
- (save-match-data
- (font-lock-fontify-region (point-min) (point-max) verbose)
- (font-lock-after-fontify-buffer)
- (setq font-lock-fontified t)))
- (msgtrc "font-lock-fontify-chunk: %s" (error-message-string err))
- ;; We don't restore the old fontification, so it's best to unfontify.
- (quit (mumamo-font-lock-unfontify-chunk))))))
-
-
-(defun mumamo-font-lock-unfontify-chunk ()
- "Like `font-lock-default-unfontify-buffer' for .
-Buffer must be narrowed to chunk when this function is called."
- ;; Make sure we unfontify etc. in the whole buffer.
- (save-restriction
- ;;(widen)
- (font-lock-unfontify-region (point-min) (point-max))
- (font-lock-after-unfontify-buffer)
- (setq font-lock-fontified nil)))
-
-(defun mumamo-set-major (major chunk)
- "Set major mode to MAJOR for mumamo."
- (mumamo-msgfntfy "mumamo-set-major %s, %s" major (current-buffer))
- (mumamo-cancel-idle-set-major-mode)
- (remove-hook 'pre-command-hook 'mumamo-set-major-pre-command t)
- ;;(mumamo-backtrace "mumamo-set-major")
- (remove-hook 'text-mode-hook 'viper-mode) ;; Fix-me: maybe add it back...
- (let ((start-time (get-internal-run-time))
- end-time
- used-time
- ;; Viper
- viper-vi-state-mode-list
- viper-emacs-state-mode-list
- viper-insert-state-mode-list
- ;; Org-Mode
- (org-inhibit-startup mumamo-org-startup-done)
- ;; Tell `mumamo-change-major-function':
- (mumamo-set-major-running major)
- ;; Fix-me: Take care of the new values added to these hooks!
- ;; That looks difficult. We may after this have changes to
- ;; both buffer local value and global value. The global
- ;; changes are in this variable, but the buffer local values
- ;; have been set once again.
- (change-major-mode-hook (mumamo-get-hook-value
- 'change-major-mode-hook
- mumamo-change-major-mode-no-nos))
- (after-change-major-mode-hook (mumamo-get-hook-value
- 'after-change-major-mode-hook
- mumamo-after-change-major-mode-no-nos))
- ;; Some major modes deactivates the mark, we do not want that:
- deactivate-mark
- ;; Font lock
- (font-lock-mode font-lock-mode)
- ;; We have to save and reset the cursor type, at least when
- ;; Viper is used
- (old-cursor-type cursor-type)
- ;; Protect last-command: fix-me: probably remove
- (last-command last-command)
- ;; Fix-me: remove this
- (old-rng-schema-file (when (boundp 'rng-current-schema-file-name) rng-current-schema-file-name))
- ;; Local vars, per buffer and per major mode
- per-buffer-local-vars-state
- per-main-major-local-vars-state
- )
- ;; We are not changing mode from font-lock's point of view, so do
- ;; not tell font-lock (let binding these hooks is probably not a
- ;; good choice since they may contain other stuff too):
- (setq mumamo-removed-from-hook nil)
- (mumamo-remove-from-hook 'change-major-mode-hook mumamo-change-major-mode-no-nos)
-
- ;;;;;;;;;;;;;;;;
- ;; Save per buffer local variables
- (dolist (sym (reverse mumamo-per-buffer-local-vars))
- (when (boundp sym)
- (when (and (get sym 'permanent-local)
- (not (memq sym mumamo-per-buffer-local-vars-done-by-me))
- (not (mumamo-hook-p sym)))
- (delq sym mumamo-per-buffer-local-vars)
- (lwarn 'mumamo-per-buffer-local-vars :warning
- "Already 'permanent-local t: %s" sym))))
- (dolist (var mumamo-per-buffer-local-vars)
- (if (local-variable-p var)
- (push (cons var (symbol-value var))
- per-buffer-local-vars-state)))
-
- ;;;;;;;;;;;;;;;;
- ;; Save per main major local variables
- (when (mumamo-fun-eq major-mode (mumamo-main-major-mode))
- (dolist (var mumamo-per-main-major-local-vars)
- (if (local-variable-p var)
- (push (cons var (symbol-value var))
- per-main-major-local-vars-state))))
-
- ;; For all hooks that probably can have buffer local values, go
- ;; through the buffer local values and look for a permanent-local
- ;; property on each function. Remove those functions that does not
- ;; have it. Then make the buffer local value of the hook survive
- ;; by putting a permanent-local property on it.
- (unless (> emacs-major-version 22)
- (dolist (hk mumamo-survive-hooks)
- (put hk 'permanent-local t)
- (when (local-variable-p hk)
- (let ((hkv (copy-sequence (symbol-value hk))))
- (dolist (v hkv)
- (unless (or (eq v t)
- (get v 'permanent-local-hook))
- (remove-hook hk v t)
- ))))))
-
- (run-hooks 'mumamo-change-major-mode-hook)
-
- (setq mumamo-major-mode major)
-
- ;;;;;;;;;;;;;;;;
- ;; Save per major mode local variables before switching major
- (mumamo-save-per-major-local-vars major-mode)
- ;; Prepare to restore per major mode local variables after
- ;; switching back to major-mode, but do it in the greatest
- ;; ancestor's mode hook (see `run-mode-hooks'):
- (let (ancestor-hook-sym
- parent-hook-sym
- (parent major))
- ;; We want the greatest ancestor's mode hook:
- (setq parent-hook-sym (intern-soft (concat (symbol-name parent) "-hook")))
- (when parent-hook-sym (setq ancestor-hook-sym parent-hook-sym))
- (while (get parent 'derived-mode-parent)
- (setq parent (get parent 'derived-mode-parent))
- (setq parent-hook-sym (intern-soft (concat (symbol-name parent) "-hook")))
- (when parent-hook-sym (setq ancestor-hook-sym parent-hook-sym)))
- (when ancestor-hook-sym
- ;; Put first in local hook to run it first:
- (setq mumamo-restore-per-major-local-vars-in-hook-major major)
- (add-hook ancestor-hook-sym
- 'mumamo-restore-per-major-local-vars-in-hook
- nil t))
-
- ;;(msgtrc "set-major A: buffer-invisibility-spec=%S" buffer-invisibility-spec)
- ;;(msgtrc "set-major A: word-wrap=%S, cb=%s" word-wrap (current-buffer))
- ;;(mumamo-backtrace "set-major")
- (let ((here (point)))
- (unwind-protect
- (save-restriction
- (let* ((minmax (mumamo-chunk-syntax-min-max chunk t))
- (min (car minmax))
- (max (cdr minmax))
- (here (point))
- ;; Fix-me: For some reason let binding did not help. Is this a bug or?
- ;;
- ;;(font-lock-fontify-buffer-function 'mumamo-font-lock-fontify-chunk)
- (old-bf (buffer-local-value 'font-lock-fontify-buffer-function (current-buffer)))
- (inhibit-redisplay t) ;; Fix-me: said to be for internal purposes only
- )
- (narrow-to-region min max)
- (set (make-local-variable 'font-lock-fontify-buffer-function) 'mumamo-font-lock-fontify-chunk)
- ;;(message "funcall major=%s, %s" major font-lock-fontify-buffer-function)
- ;;(message "before funcall: function=%s" font-lock-fontify-buffer-function)
- (put 'font-lock-fontify-buffer-function 'permanent-local t)
- (funcall major) ;; <-----------------------------------------------
- (put 'font-lock-fontify-buffer-function 'permanent-local nil)
- (when old-bf
- (set (make-local-variable 'font-lock-fontify-buffer-function) old-bf))
- ))
- (goto-char here)))
- ;;(msgtrc "set-major B: buffer-invisibility-spec=%S" buffer-invisibility-spec)
- ;;(msgtrc "set-major B: word-wrap=%S, cb=%s" word-wrap (current-buffer))
-
- (setq font-lock-mode-major-mode major) ;; Tell font-lock it is ok
- (set (make-local-variable 'font-lock-function) 'mumamo-font-lock-function)
- (if (not ancestor-hook-sym)
- (mumamo-restore-per-major-local-vars major)
- (remove-hook ancestor-hook-sym
- 'mumamo-restore-per-major-local-vars-in-hook
- t)))
- ;;(msgtrc "set-major c: buffer-invisibility-spec=%S" buffer-invisibility-spec)
-
- (when (mumamo-fun-eq major 'org-mode) (setq mumamo-org-startup-done t))
-
- (setq mumamo-major-mode-indent-line-function (cons major-mode indent-line-function))
- (make-local-variable 'indent-line-function)
-
- (setq mode-name (concat (format-mode-line mode-name)
- (save-match-data
- (replace-regexp-in-string
- "-mumamo-mode$" ""
- (format "/%s" mumamo-multi-major-mode)))))
-
- (dolist (hk mumamo-survive-hooks) (put hk 'permanent-local nil))
-
- ;; (when (and (featurep 'flymake)
- ;; flymake-mode)
- ;; (add-hook 'after-change-functions 'flymake-after-change-function nil t)
- ;; (add-hook 'after-save-hook 'flymake-after-save-hook nil t)
- ;; (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t))
-
- ;;;;;;;;;;;;;;;;
- ;; Restore per buffer local variables
-
- ;; (dolist (sym mumamo-per-buffer-local-vars)
- ;; (when (boundp sym)
- ;; (put sym 'permanent-local nil)))
- ;;(msgtrc "per-buffer-local-vars-state=%S" per-buffer-local-vars-state)
- (dolist (saved per-buffer-local-vars-state)
- ;;(msgtrc "restore p buffer: %s, local=%s" (car saved) (local-variable-p (car saved)))
- (unless (local-variable-p (car saved))
- (set (make-local-variable (car saved)) (cdr saved))))
-
- ;;;;;;;;;;;;;;;;
- ;; Restore per main major local variables
- (unless (mumamo-fun-eq major-mode (mumamo-main-major-mode))
- (dolist (saved per-main-major-local-vars-state)
- (set (make-local-variable (car saved)) (cdr saved))))
-
- (mumamo-addback-to-hooks)
-
- (setq cursor-type old-cursor-type)
- (run-hooks 'mumamo-after-change-major-mode-hook)
-
- (when (derived-mode-p 'nxml-mode)
- (when (and old-rng-schema-file
- (not (string= old-rng-schema-file rng-current-schema-file-name)))
- (let ((rng-schema-change-hook nil)) ;(list 'rng-alidate-clear)))
- (condition-case err
- (progn
- (rng-set-schema-file-1 old-rng-schema-file)
- (rng-what-schema))
- (nxml-file-parse-error
- (nxml-display-file-parse-error err)))
- (when rng-validate-mode
- ;; Fix-me: Change rng-validate variables so that this is
- ;; not necessary any more.
- (rng-validate-mode 0)
- (rng-validate-mode 1))
- )))
- ;; The nxml-parser should not die:
- (when (mumamo-derived-from-mode (mumamo-main-major-mode) 'nxml-mode)
- (add-hook 'after-change-functions 'rng-after-change-function nil t)
- (add-hook 'after-change-functions 'nxml-after-change nil t)
- ;; Added these for Emacs 22:
- (unless nxml-prolog-end (setq nxml-prolog-end 1))
- (unless nxml-scan-end (setq nxml-scan-end (copy-marker 1))))
-
-;;; (when (and global-font-lock-mode
-;;; font-lock-global-modes
-;;; font-lock-mode)
-;;; (when global-font-lock-mode
-;;; (add-hook 'change-major-mode-hook 'global-font-lock-mode-cmhh))
-;;; (add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
-
- (mumamo-set-fontification-functions)
-
- ;; If user has used M-x flyspell-mode then we need to correct it:
- ;; Fix-me: This is inflexible. Need flyspell to cooperate.
- (when (featurep 'flyspell)
- (setq flyspell-generic-check-word-predicate 'mumamo-flyspell-verify))
-
- (if mumamo-done-first-set-major
- (setq mumamo-just-changed-major t)
- (mumamo-msgfntfy "mumamo-set-major: ----- removing 'fontified")
- ;; Set up to fontify buffer
- (mumamo-save-buffer-state nil
- (remove-list-of-text-properties (point-min) (point-max) '(fontified)))
- (setq mumamo-done-first-set-major t))
-
- ;; Timing, on a 3ghz cpu:
- ;;
- ;; used-time=(0 0 0), major-mode=css-mode
- ;; used-time=(0 0 0), major-mode=ecmascript-mode
- ;; used-time=(0 0 0), major-mode=html-mode
- ;; used-time=(0 0 203000), major-mode=nxhtml-mode
- ;;
- ;; After some changes 2007-04-25:
- ;;
- ;; used-time=(0 0 15000), major-mode=nxhtml-mode
- ;;
- ;; which is 15 ms. That seems acceptable though I am not sure
- ;; everything is correct when switching to nxhtml-mode yet. I
- ;; will have to wait for bug reports ;-)
- ;;
- ;; The delay is clearly noticeable and disturbing IMO unless you
- ;; change major mode in an idle timer.
- ;;
- ;;(setq end-time (get-internal-run-time))
- ;;(setq used-time (time-subtract end-time start-time))
- )
- (setq mumamo-set-major-keymap-checked nil)
- ;; Fix-me: Seems like setting/checking the keymap in a timer is
- ;; problematc. This is an Emacs bug.
- ;;(run-with-idle-timer 1 nil 'mumamo-set-major-check-keymap)
- ;;(force-mode-line-update) (message "force-mode-line-update called")
- )
-
-(defun mumamo-set-major-check-keymap ()
- "Helper to work around an Emacs bug when setting local map in a timer."
- (or mumamo-set-major-keymap-checked
- (setq mumamo-set-major-keymap-checked
- (let ((map-sym (intern-soft (concat (symbol-name major-mode) "-map"))))
- (if (not map-sym)
- t ;; Don't know what to do
- (equal (current-local-map)
- (symbol-value map-sym)))))))
-
-(defvar mumamo-original-fill-paragraph-function nil)
-(make-variable-buffer-local 'mumamo-original-fill-paragraph-function)
-
-(defun mumamo-setup-local-fontification-vars ()
- "Set up buffer local variables for mumamo style fontification."
- (make-local-variable 'font-lock-fontify-region-function)
- (setq font-lock-fontify-region-function 'mumamo-fontify-region)
-
- ;; Like font-lock-turn-on-thing-lock:
- (make-local-variable 'font-lock-fontify-buffer-function)
- (setq font-lock-fontify-buffer-function 'jit-lock-refontify)
- (setq font-lock-fontify-buffer-function 'mumamo-fontify-buffer)
- ;; Don't fontify eagerly (and don't abort if the buffer is large).
- (set (make-local-variable 'font-lock-fontified) t)
-
- (make-local-variable 'font-lock-unfontify-buffer-function)
- (setq font-lock-unfontify-buffer-function 'mumamo-unfontify-buffer)
-
- (set (make-local-variable 'indent-line-function) 'mumamo-indent-line-function)
-
- ;;(setq mumamo-original-fill-paragraph-function fill-paragraph-function)
- ;;(set (make-local-variable 'fill-paragraph-function) 'mumamo-fill-paragraph-function)
- ;;(set (make-local-variable 'fill-forward-paragraph-function 'forward-paragraph)
-
- (make-local-variable 'indent-region-function)
- (setq indent-region-function 'mumamo-indent-region-function)
-
- ;;(set (make-local-variable 'syntax-begin-function) 'mumamo-beginning-of-syntax)
-
- ;;(put 'font-lock-function 'permanent-local t)
-
- ;; FIX-ME: Not sure about this one, but it looks like it must be
- ;; set:
- (make-local-variable 'jit-lock-contextually)
- (setq jit-lock-contextually t)
- )
-
-(defun mumamo-font-lock-function (mode)
- ;;(mumamo-backtrace "font-lock-function")
- (font-lock-default-function mode))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Turning on/off multi major modes
-
-(defun mumamo-set-fontification-functions ()
- "Let mumamo take over fontification.
-This is run after changing major mode so that jit-lock will get
-the major mode specific values. \(There are currently no such
-values.)"
- ;; Give the jit machinery a starting point:
- (mumamo-jit-lock-register 'font-lock-fontify-region t)
- ;; Set the functions that font-lock should use:
- (mumamo-setup-local-fontification-vars)
- ;; Need some hook modifications to keep things together too:
- (add-hook 'change-major-mode-hook 'mumamo-change-major-function nil t)
- (add-hook 'post-command-hook 'mumamo-post-command nil t)
- (remove-hook 'change-major-mode-hook 'nxml-change-mode t)
- (remove-hook 'change-major-mode-hook 'nxhtml-change-mode t)
- )
-
-(defun mumamo-initialize-state ()
- "Initialize some mumamo state variables."
- (setq mumamo-done-first-set-major nil)
- (setq mumamo-just-changed-major nil))
-
-(defun mumamo-turn-on-actions (old-major-mode)
- "Do what is necessary to turn on mumamo.
-Turn on minor mode function `font-lock-mode'.
-Set up for mumamo style fontification.
-Create a mumamo chunk at point.
-Run `mumamo-turn-on-hook'.
-
-OLD-MAJOR-MODE is used for the main major mode if the main major
-mode in the chunk family is nil."
- ;;(unless font-lock-mode (font-lock-mode 1))
- (mumamo-msgfntfy "mumamo-turn-on-actions")
- (unless mumamo-current-chunk-family (error "Internal error: Chunk family is not set"))
- (if (not mumamo-current-chunk-family)
- (progn
- (lwarn '(mumamo) :warning
- "Could not turn on mumamo because chunk family was not set\n\tin buffer %s."
- (current-buffer))
- (with-current-buffer "*Warnings*"
- (insert "\tFor more information see `")
- (mumamo-insert-describe-button 'define-mumamo-multi-major-mode 'describe-function)
- (insert "'.\n")))
- ;; Load major mode:
- (setq mumamo-org-startup-done nil)
- (let ((main-major-mode (mumamo-major-mode-from-modespec (mumamo-main-major-mode))))
- (unless main-major-mode
- (setcar (cdr mumamo-current-chunk-family) old-major-mode)
- (setq main-major-mode (mumamo-main-major-mode)))
- ;;(with-temp-buffer (funcall main-major-mode))
- (setq mumamo-major-mode main-major-mode)
- (when (boundp 'nxml-syntax-highlight-flag)
- (when (mumamo-derived-from-mode main-major-mode 'nxml-mode)
- (set (make-local-variable 'nxml-syntax-highlight-flag) nil)))
- ;; Init fontification
- (mumamo-initialize-state)
- (mumamo-set-fontification-functions)
- (mumamo-save-buffer-state nil
- (remove-list-of-text-properties (point-min) (point-max)
- (list 'fontified)))
- ;; For validation header etc:
- (when (mumamo-derived-from-mode main-major-mode 'nxhtml-mode)
- (require 'rngalt nil t)
- (when (featurep 'rngalt)
- (setq rngalt-major-mode (mumamo-main-major-mode))
- (rngalt-update-validation-header-overlay))
- (when (featurep 'rng-valid)
- (setq rng-get-major-mode-chunk-function 'mumamo-find-chunks)
- (setq rng-valid-nxml-major-mode-chunk-function 'mumamo-valid-nxml-chunk)
- (setq rng-end-major-mode-chunk-function 'overlay-end))))
- ;;(mumamo-set-major-post-command)
- ;;(add-hook 'change-major-mode-hook 'mumamo-change-major-function nil t)
- (when (boundp 'flyspell-generic-check-word-predicate)
- (setq flyspell-generic-check-word-predicate 'mumamo-flyspell-verify))
- (run-hooks 'mumamo-turn-on-hook)
- ;;(mumamo-get-chunk-save-buffer-state (point))
- (let ((buffer-windows (get-buffer-window-list (current-buffer))))
- (if (not buffer-windows)
- (let* ((ovl (mumamo-find-chunks (point) "mumamo-turn-on-actions"))
- (major (when ovl (mumamo-chunk-major-mode ovl))))
- (when major
- (mumamo-set-major major ovl)))
- (dolist (win (get-buffer-window-list (current-buffer) nil t))
- (let ((wp (or (window-end win)
- (window-point win)
- (window-start win))))
- (mumamo-get-chunk-save-buffer-state wp)
- (when (eq win (selected-window))
- (let* ((ovl (mumamo-find-chunks wp "mumamo-turn-on-actions"))
- (major (when ovl (mumamo-chunk-major-mode ovl))))
- (when major
- (mumamo-set-major major ovl))))))))
- ;;(msgtrc "mumamo-turn-on-action exit: font-lock-keywords-only =%s in buffer %s, def=%s" font-lock-keywords-only (current-buffer) (default-value 'font-lock-keywords-only))
- ;; This did not help for Emacs bug 3467:
- ;;(set-default 'font-lock-keywords-only nil)
- ;;(setq font-lock-keywords-only nil)
- )
- (set (make-local-variable 'font-lock-function) 'mumamo-font-lock-function)
- (mumamo-emacs-start-bug3467-timer-if-needed)
- )
-
-;; (defun mumamo-on-font-lock-off ()
-;; "The reverse of `mumamo-turn-on-actions'."
-;; (let ((mumamo-main-major-mode (mumamo-main-major-mode)))
-;; (mumamo-turn-off-actions)
-;; ;; Turning off `font-lock-mode' also turns off `mumamo-mode'. It is
-;; ;; quite tricky to not turn on `font-lock-mode' again in case we got
-;; ;; here because it was turned off. We must first remove the cmhh
-;; ;; function and then also run the internal font lock turn off.
-;; (let* ((flm font-lock-mode)
-;; (flgm global-font-lock-mode)
-;; (remove-cmhh (and (not flm) flgm)))
-;; ;; If remove-cmhh is non-nil then we got here because
-;; ;; `font-lock-mode' was beeing turned off in the buffer, but
-;; ;; `global-font-lock-mode' is still on.
-;; (when remove-cmhh
-;; (remove-hook 'change-major-mode-hook 'global-font-lock-mode-cmhh))
-
-;; (if mumamo-main-major-mode
-;; (funcall mumamo-main-major-mode)
-;; (fundamental-mode))
-
-;; (unless flm
-;; (setq font-lock-mode nil)
-;; (font-lock-mode-internal nil))
-;; (when remove-cmhh
-;; (add-hook 'change-major-mode-hook 'global-font-lock-mode-cmhh)))))
-
-(defun mumamo-turn-off-actions ()
- "The reverse of `mumamo-turn-on-actions'."
- (mumamo-msgfntfy "mumamo-turn-off-actions")
- (when (fboundp 'nxhtml-validation-header-mode)
- (nxhtml-validation-header-mode -1))
- (when (mumamo-derived-from-mode
- (nth 1 mumamo-current-chunk-family) 'nxml-mode)
- (when (fboundp 'nxml-change-mode)
- (nxml-change-mode)))
- (when (and (boundp 'rng-validate-mode)
- rng-validate-mode)
- (rng-validate-mode 0))
- (when (featurep 'rng-valid)
- (setq rng-get-major-mode-chunk-function nil)
- (setq rng-valid-nxml-major-mode-chunk-function nil)
- (setq rng-end-major-mode-chunk-function nil)
- )
- ;; Remove nxml for Emacs 22
- (remove-hook 'after-change-functions 'rng-after-change-function t)
- (remove-hook 'after-change-functions 'nxml-after-change t)
- (when (boundp 'rngalt-major-mode)
- (setq rngalt-major-mode nil))
- (remove-hook 'change-major-mode-hook 'mumamo-change-major-function t)
- ;;(mumamo-unfontify-chunks)
- ;;(remove-hook 'after-change-functions 'mumamo-jit-lock-after-change t)
- (remove-hook 'after-change-functions 'mumamo-after-change t)
- (remove-hook 'post-command-hook 'mumamo-post-command t)
- ;;(remove-hook 'c-special-indent-hook 'mumamo-c-special-indent t)
- (mumamo-margin-info-mode -1)
- (when (fboundp 'mumamo-clear-all-regions) (mumamo-clear-all-regions))
- (save-restriction
- (widen)
- (mumamo-save-buffer-state nil
- (set-text-properties (point-min) (point-max) nil)))
- (setq mumamo-current-chunk-family nil)
- (setq mumamo-major-mode nil)
- (setq mumamo-multi-major-mode nil) ;; for minor-mode-map-alist
- (setq mumamo-multi-major-mode nil)
- (mumamo-remove-all-chunk-overlays)
- (when (fboundp 'rng-cancel-timers) (rng-cancel-timers))
- )
-
-(defvar mumamo-turn-on-hook nil
- "Normal hook run after turning on `mumamo-mode'.")
-(put 'mumamo-turn-on-hook 'permanent-local t)
-
-(defvar mumamo-change-major-mode-hook nil
- "Normal hook run before internal change of major mode.")
-(put 'mumamo-change-major-mode-hook 'permanent-local t)
-
-(defvar mumamo-after-change-major-mode-hook nil
- "Normal hook run after internal change of major mode.")
-(put 'mumamo-after-change-major-mode-hook 'permanent-local t)
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Defining multi major modes
-
-(defvar mumamo-defined-multi-major-modes nil
- "List of functions defined for turning on mumamo.
-Those functions should be called instead of calling a major mode
-function when you want to use multiple major modes in a buffer.
-They may be added to for example `auto-mode-alist' to
-automatically have the major mode support turned on when opening
-a file.
-
-Each of these functions defines how to mix certain major modes in
-a buffer.
-
-All functions defined by `define-mumamo-multi-major-mode' are
-added to this list. See this function for a general description
-of how the functions work.
-
-If you want to quickly define a new mix of major modes you can
-use `mumamo-quick-static-chunk'.")
-
-;;;###autoload
-(defun mumamo-list-defined-multi-major-modes (show-doc show-chunks match)
- "List currently defined multi major modes.
-If SHOW-DOC is non-nil show the doc strings added when defining
-them. \(This is not the full doc string. To show the full doc
-string you can click on the multi major mode in the list.)
-
-If SHOW-CHUNKS is non-nil show the names of the chunk dividing
-functions each multi major mode uses.
-
-If MATCH then show only multi major modes whos names matches."
- (interactive (list (y-or-n-p "Include short doc string? ")
- (y-or-n-p "Include chunk function names? ")
- (read-string "List only multi major mode matching regexp (emtpy for all): ")))
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'mumamo-list-defined-multi-major-modes) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert "The currently defined multi major modes in your Emacs are:\n\n")
- (let ((mmms (reverse mumamo-defined-multi-major-modes))
- (here (point)))
- (setq mmms (sort mmms (lambda (a b)
- (string< (symbol-name (cdr a))
- (symbol-name (cdr b))))))
- (when (string= match "") (setq match nil))
- (while mmms
- (let* ((mmm (car mmms))
- (sym (cdr mmm))
- (desc (car mmm))
- (auto (get sym 'autoload))
- (auto-desc (when auto (nth 1 auto)))
- (family (get sym 'mumamo-chunk-family))
- (chunks (nth 2 family)))
- (when (or (not match)
- (string-match-p match (symbol-name sym)))
- (insert " `" (symbol-name sym) "'"
- " (" desc ")\n"
- (if (and show-doc auto-desc)
- (concat " " auto-desc "\n")
- "")
- (if show-chunks
- (format " Chunks:%s\n"
- (let ((str "")
- (nn 0))
- (mapc (lambda (c)
- (if (< nn 2)
- (setq str (concat str " "))
- (setq nn 0)
- (setq str (concat str "\n ")))
- (setq nn (1+ nn))
- (setq str (concat str (format "%-30s" (format "`%s'" c))))
- )
- chunks)
- str))
- "")
- (if (or show-doc show-chunks) "\n\n" "")
- ))
- (setq mmms (cdr mmms))))
- ))))
-
-(defun mumamo-describe-chunks (chunks)
- "Return text describing CHUNKS."
- (let* ((desc
- (concat "* Main major mode: `" (symbol-name (nth 1 chunks)) "'\n"
- "\n* Functions for dividing into submodes:\n")))
- (dolist (divider (nth 2 chunks))
- (setq desc
- (concat
- desc
- "\n`" (symbol-name divider)
- "'\n "
- (let ((doc (if (functionp divider)
- (documentation divider t)
- "(Function not compiled when building doc)")))
- (if (not doc)
- "(Not documented)"
- (substring doc 0 (string-match "\n" doc)))))))
- (setq desc
- (concat
- desc
- "\n\n(Note that the functions for dividing into chunks returns\n"
- "a major mode specifier which may be translated into a major mode\n"
- "by `mumamo-main-major-mode'.)\n"))
- desc))
-
-(defun mumamo-add-multi-keymap (toggle keymap)
- "Add TOGGLE and KEYMAP to `minor-mode-map-alist'.
-This is used to add a keymap to multi major modes since the local
-keymap is occupied by the major modes.
-
-It is also used to add the `mumamo-map' keymap to every buffer
-with a multi major mode."
- ;; Copied from add-minor-mode
- ;; Add the map to the minor-mode-map-alist.
- (when keymap
- (let ((existing (assq toggle minor-mode-map-alist))
- (after t))
- (if existing
- (setcdr existing keymap)
- (let ((tail minor-mode-map-alist) found)
- (while (and tail (not found))
- (if (eq after (caar tail))
- (setq found tail)
- (setq tail (cdr tail))))
- (if found
- (let ((rest (cdr found)))
- (setcdr found nil)
- (nconc found (list (cons toggle keymap)) rest))
- (setq minor-mode-map-alist (cons (cons toggle keymap)
- minor-mode-map-alist))))))))
-
-(defvar mumamo-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control meta prior)] 'mumamo-backward-chunk)
- (define-key map [(control meta next)] 'mumamo-forward-chunk)
- ;; Use mumamo-indent-line-function:
- ;;(define-key map [tab] 'indent-for-tab-command)
- (define-key map [(meta ?q)] 'fill-paragraph)
- map)
- "Keymap that is active in all mumamo buffers.
-It has the some priority as minor mode maps.")
-;;(make-variable-buffer-local 'mumamo-map)
-(put 'mumamo-map 'permanent-local t)
-
-(mumamo-add-multi-keymap 'mumamo-multi-major-mode mumamo-map)
-
-;;;###autoload
-(defun mumamo-multi-major-modep (value)
- "Return t if VALUE is a multi major mode function."
- (and (fboundp value)
- (rassq value mumamo-defined-multi-major-modes)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Indenting, filling, moving etc
-
-;; FIX-ME: Indentation in perl here doc indents the ending mark which
-;; corrupts the perl here doc.
-
-(defun mumamo-indent-line-function ()
- "Function to indent the current line.
-This is the buffer local value of `indent-line-function' when
-mumamo is used."
- (let ((here (point-marker))
- fontification-functions
- rng-nxml-auto-validate-flag
- (before-text (<= (current-column) (current-indentation))))
- (mumamo-indent-line-function-1 nil nil nil)
- ;; If the marker was in the indentation part strange things happen
- ;; if we try to go back to the marker, at least in php-mode parts.
- (if before-text
- (back-to-indentation)
- (goto-char here))))
-
-(defun mumamo-indent-current-line-chunks (last-chunk-prev-line)
- "Return a list of chunks to consider when indenting current line.
-This list consists of four chunks at these positions:
-- Beginning of line - 1
-- Beginning of line
-- End of line
-- End of line + 1"
- ;; Fix-me: must take markers into account too when a submode
- ;; includes the markers.
- (setq last-chunk-prev-line nil)
- ;;(msgtrc "indent-current-line-chunks: last-chunk-prev-line=%S" last-chunk-prev-line)
- (save-restriction
- (widen)
- (let* ((lb-pos (line-beginning-position))
- (le-pos (line-end-position))
- (pos0 (if (> lb-pos (point-min))
- (1- lb-pos)
- (point-min)))
- (pos1 lb-pos)
- (pos2 le-pos)
- (pos3 (if (< le-pos (point-max))
- (+ 1 le-pos)
- (point-max)))
- ;; Create all chunks on this line first, then grab them
- (ovl3 (mumamo-find-chunks pos3 "mumamo-indent-current-line-chunks"))
- (ovl2 (if (>= pos2 (overlay-start ovl3))
- ovl3
- (mumamo-get-existing-new-chunk-at pos2)))
- (ovl1 (if (>= pos1 (overlay-start ovl2))
- ovl2
- (mumamo-get-existing-new-chunk-at pos1)))
- (ovl0 (if (> pos0 (overlay-start ovl1))
- ovl1
- (mumamo-get-existing-new-chunk-at pos0 t))))
- (list ovl0 ovl1 ovl2 ovl3))))
-
-;; Fix-me: need to back up past comments in for example <style> /* comment */
-;; fix-me: clean up
-(put 'mumamo-error-ind-0 'error-conditions '(error mumamo-error-ind-0))
-(put 'mumamo-error-ind-0 'error-message "indentation 0 in sub chunk")
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;
-;; Template indentation
-;;; Contact Marc Bowes when I've finished this.
-
-(defvar mumamo-template-indent-buffer nil)
-(make-variable-buffer-local 'mumamo-template-indent-buffer)
-(put 'mumamo-template-indent-buffer 'permanent-local t)
-
-(defvar mumamo-template-indent-change-min nil)
-(make-variable-buffer-local 'mumamo-template-indent-change-min)
-(put 'mumamo-template-indent-hange-min 'permanent-local t)
-
-(defun mumamo-template-indent-after-change (beg end len)
- (setq mumamo-template-indent-change-min
- (if mumamo-template-indent-change-min
- (min mumamo-template-indent-change-min beg)
- beg)))
-
-;; (defun mumamo-get-indentor-create (indentor-chunk prev-indentor)
-;; (let ((indentor (overlay-get indentor-chunk 'mumamo-indentor))
-;; (indentor-buffer (when indentor (overlay-buffer indentor)))
-;; (chunk-str (with-current-buffer (overlay-buffer indentor-chunk)
-;; (buffer-substring-no-properties (overlay-start indentor-chunk)
-;; (overlay-end indentor-chunk))))
-;; )
-;; (unless (and indentor
-;; (eq indentor-buffer mumamo-template-indent-buffer)
-;; (string= chunk-str (overlay-get indentor 'indentor-chunk-string)))
-;; (when indentor
-;; (when (buffer-live-p
-;; indentor
-;; ))
-(defun mumamo-indentor-valid (indentor chunk chunk-string)
- (and indentor
- chunk
- (buffer-live-p (overlay-buffer chunk))
- (string= chunk-string (overlay-get indentor 'indentor-chunk-string))
- ))
-
-(defun mumamo-template-indent-get-chunk-shift (indentor-chunk)
- "Return indentation shift for INDENTOR-CHUNK row and line after.
-;; Fix-me: Handle changes better.
-
-Indentation shift has two parts: shift for current line and for next line.
-This function returns a cons with these two parts.
-"
- (assert (overlayp indentor-chunk) t)
- (assert (buffer-live-p (overlay-buffer indentor-chunk)) t)
- (let ((indentor (overlay-get indentor-chunk 'mumamo-indentor))
- (prev-chunk (overlay-get indentor-chunk 'mumamo-prev-chunk))
- prev-indentor prev-indentor-chunk)
- (when indentor (assert (eq indentor-chunk (overlay-get indentor 'indentor-chunk)) t))
- (unless (and mumamo-template-indent-buffer
- (buffer-live-p mumamo-template-indent-buffer))
- (setq indentor nil)
- (setq mumamo-template-indent-buffer
- (get-buffer-create (concat (buffer-name)
- "-template-indent-buffer")))
- (with-current-buffer mumamo-template-indent-buffer
- (setq buffer-undo-list t)
- (let ((major (car (overlay-get indentor-chunk 'mumamo-major-mode))))
- (funcall major))))
- (when indentor
- (unless (eq (overlay-buffer indentor) mumamo-template-indent-buffer)
- (setq indentor nil)))
- ;; We need the prev indentor to indent relative to.
- (while (and prev-chunk (not prev-indentor-chunk))
- (setq prev-chunk (overlay-get prev-chunk 'mumamo-prev-chunk))
- (when prev-chunk
- (when (eq (overlay-get prev-chunk 'mumamo-next-indent)
- 'mumamo-template-indentor)
- (setq prev-indentor-chunk (overlay-get prev-chunk 'mumamo-next-chunk)))))
- (when prev-indentor-chunk
- (setq prev-indentor (overlay-get prev-indentor-chunk 'mumamo-indentor)))
- (when prev-indentor
- (unless (buffer-live-p (overlay-buffer prev-indentor))
- (setq prev-indentor nil)))
- (when prev-indentor (assert (eq (overlay-buffer prev-indentor) mumamo-template-indent-buffer) t))
- (with-current-buffer mumamo-template-indent-buffer
- (save-restriction
- (widen)
- ;; Insert a blank line to be able to go to start of first
- ;; overlay -1. Do it here in case the user erases the buffer.
- (when (= 0 (buffer-size)) (insert "\n"))
- (let ((i-str (when indentor
- (buffer-substring-no-properties (overlay-start indentor) (overlay-end indentor))))
- (i-beg (when indentor (overlay-start indentor)))
- (c-str (with-current-buffer (overlay-buffer indentor-chunk)
- (buffer-substring-no-properties (overlay-start indentor-chunk)
- (overlay-end indentor-chunk))))
- (p-str (when prev-indentor-chunk
- (with-current-buffer (overlay-buffer prev-indentor-chunk)
- (buffer-substring-no-properties (overlay-start prev-indentor-chunk)
- (overlay-end prev-indentor-chunk)))))
- (c-beg (overlay-start indentor-chunk))
- (p-beg (when prev-indentor-chunk (overlay-start prev-indentor-chunk))))
- ;; Check if `indentor' and `prev-indentor' are valid
- (when indentor
- ;;(unless (string= c-str (overlay-get indentor 'indentor-chunk-string))
- (unless (mumamo-indentor-valid indentor indentor-chunk c-str)
- (mumamo-remove-indentor indentor)))
- (when prev-indentor
- ;;(unless (string= p-str (overlay-get prev-indentor 'indentor-chunk-string))
- (unless (mumamo-indentor-valid prev-indentor prev-indentor-chunk p-str)
- (mumamo-remove-indentor prev-indentor)))
- (unless indentor
- (setq i-beg
- (or i-beg
- (when prev-indentor
- ;; We just put `indentor' after this, but we
- ;; must also remove old stuff.
- (goto-char (overlay-end prev-indentor))
- (forward-char 1)
- (let* ((next-indentor (mumamo-indentor-at (point)))
- (next-indentor-chunk (when next-indentor
- (overlay-get next-indentor 'indentor-chunk)))
- n-beg
- (new-i-beg (unless next-indentor-chunk (point))))
- (while (not new-i-beg)
- (setq n-beg (when (buffer-live-p (overlay-buffer next-indentor-chunk))
- (overlay-start next-indentor-chunk)))
- (if (or (not n-beg) (< n-beg c-beg))
- (progn
- (mumamo-remove-indentor next-indentor)
- (goto-char (overlay-end prev-indentor))
- (forward-char 1)
- (setq next-indentor (mumamo-indentor-at (point)))
- (if next-indentor
- (setq next-indentor-chunk (overlay-get next-indentor 'indentor-chunk))
- (setq new-i-beg (point))))
- (setq new-i-beg (point))))
- new-i-beg))
- ;; Fix-me: Find out where to insert indentor:
- (let* ((ll 1)
- (rr (point-max))
- mm new-i-beg m-ovl m-ovl-old m-chunk m-beg)
- (while (< ll rr)
- (setq mm (+ ll (/ (- rr ll) 2)))
- (setq m-ovl-old m-ovl)
- (setq m-ovl (mumamo-indentor-at mm))
- (if (or (not m-ovl) (eq m-ovl m-ovl-old))
- (setq rr ll)
- (setq m-chunk (overlay-get m-ovl 'indentor-chunk))
- (setq m-beg (when (buffer-live-p (overlay-buffer m-chunk))
- (overlay-start m-chunk)))
- (cond ((not m-beg)
- (mumamo-remove-indentor m-ovl)
- (setq rr (min rr (point-max))))
- ((> m-beg c-beg)
- (setq ll (1+ mm)))
- ((< m-beg c-beg)
- (setq rr (1- mm)))
- (t (error "Found old indentor at %s belonging to %S" mm m-chunk)))))
- ;;(1+ (if m-ovl (overlay-end m-ovl) 0))
- (if m-ovl (1+ (overlay-end m-ovl)) 2)
- )))
- (goto-char i-beg)
- (setq indentor (mumamo-make-indentor indentor-chunk c-str)))
- (unless prev-indentor
- (when prev-indentor-chunk
- (goto-char (overlay-start indentor))
- (goto-char (point-at-bol))
- (setq prev-indentor (mumamo-make-indentor prev-indentor-chunk p-str))))
- (when prev-indentor (mumamo-indent-indentor prev-indentor))
- (mumamo-indent-indentor indentor)
- (let (prev-ind this-ind next-ind shift-in shift-out)
- (when prev-indentor
- (goto-char (overlay-end prev-indentor))
- (setq prev-ind (current-indentation)))
- (goto-char (overlay-start indentor))
- (setq this-ind (current-indentation))
- (goto-char (overlay-end indentor))
- (setq next-ind (current-indentation))
- (when prev-ind (setq shift-in (- this-ind prev-ind)))
- (setq shift-out (- next-ind this-ind))
- (msgtrc "template-indent-get-shunk-shift => (%s . %s)" shift-in shift-out)
- (cons shift-in shift-out)))))))
-
-
-(defun mumamo-ruby-beginning-of-indent ()
- "TODO: document"
- ;; I don't understand this function.
- ;; It seems like it should move to the line where indentation should deepen,
- ;; but ruby-indent-beg-re only accounts for whitespace before class, module and def,
- ;; so this will only match other block beginners at the beginning of the line.
- (and
- (prog1
- (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\b") nil 'move)
- (skip-chars-forward " \t\n\r"))
- (beginning-of-line)))
-
-(defadvice ruby-beginning-of-indent (around
- mumamo-ad-ruby-beginning-of-indent
- activate
- compile
- )
- (if t
- (mumamo-ruby-beginning-of-indent)
- ad-do-it)
- )
-
-(defun mumamo-indentor-at (pos)
- "Return indentor overlay at POS."
- (let ((here (point))
- eol-pos)
- (goto-char pos)
- (setq eol-pos (line-end-position))
- (goto-char here)
- (catch 'ind
- (dolist (ovl (or (overlays-at eol-pos)
- (when (> eol-pos 1)
- (overlays-at (1- eol-pos)))))
- (when (overlay-get ovl 'indentor-chunk)
- (throw 'ind ovl))))))
-
-(defun mumamo-remove-indentor (indentor)
- (let (beg end)
- (goto-char (overlay-start indentor))
- (setq beg (point-at-bol))
- (goto-char (overlay-end indentor))
- (setq end (1+ (point-at-eol)))
- (delete-region beg end)
- (delete-overlay indentor)
- (setq indentor nil)))
-
-(defun mumamo-indent-indentor (indentor)
- (goto-char (overlay-start indentor))
- (if (= 2 (point-at-bol))
- (progn
- (back-to-indentation)
- (delete-region 2 (point))
- (insert " "))
- (indent-according-to-mode))
- (goto-char (overlay-end indentor))
- (indent-according-to-mode))
-
-(defun mumamo-make-indentor (indentor-chunk chunk-string)
- (let* ((beg (point))
- (syntax-min-max (mumamo-chunk-syntax-min-max indentor-chunk t))
- (inner (with-current-buffer (overlay-buffer indentor-chunk)
- (buffer-substring-no-properties (cdr syntax-min-max)
- (car syntax-min-max))))
- indentor)
- (insert inner)
- (insert "\n\n")
- (setq indentor (make-overlay beg (1- (point)) nil t t))
- (overlay-put indentor 'indentor-chunk indentor-chunk)
- (overlay-put indentor 'face 'secondary-selection)
- (overlay-put indentor 'indentor-chunk-string chunk-string)
- (overlay-put indentor-chunk 'mumamo-indentor indentor)
- indentor))
-
-;;(mumamo-fun-eq 'js-mode 'javascript-mode)
-(defun mumamo-fun-eq (fun1 fun2)
- "Return non-nil if same functions or aliases."
- (or (eq fun1 fun2)
- (progn
- (while (and (fboundp fun1)
- (symbolp (symbol-function fun1)))
- (setq fun1 (symbol-function fun1)))
- (while (and (fboundp fun2)
- (symbolp (symbol-function fun2)))
- (setq fun2 (symbol-function fun2)))
- (eq fun1 fun2))))
-
-(defun mumamo-indent-line-function-1 (prev-line-chunks
- last-parent-major-indent
- entering-submode-arg)
- ;; Fix-me: error indenting in xml-as-string at <?\n?>
- ;; Fix-me: clean up, use depth diff. go back to sibling not to main etc.
- ;; Fix-me: Add indentation hints to chunks, for example heredocs and rhtml.
- ;; Fix-me: maybe use special indentation functions for certain multi major modes? rhtml?
- "Indent current line.
-When doing that care must be taken if this line's major modes at
-the start and end are different from previous line major modes.
-The latter may be known through the parameter PREV-LINE-CHUNKS.
-
-Also the indentation of the last previous main major line may be
-necessary to know. This may be known through the parameter
-LAST-PARENT-MAJOR-INDENT.
-
-If the two parameters above are nil then this function will
-search backwards in the buffer to try to determine their values.
-
-The following rules are used when indenting:
-
-- If the major modes are the same in this and the previous line
- then indentation is done using that major mode.
-
-- Exception: If the chunks are not the same AND there is
- precisely one chunk between them which have the property value
- of 'mumamo-next-indent equal to 'mumamo-template-indentor then
- a special indent using the content of the middle chunk is
- done. An example of this is eRuby where a middle chunk could
- look like:
-
- <% 3.times do %>
-
- This example will increase indentation for the next line the
- same way as the chunk content would do in single major mode
- ruby-mode.
-
- FIXE-ME: IMPLEMENT THE ABOVE!
-
-- Otherwise if going into a submode indentation is increased by
- `mumamo-submode-indent-offset' (if this is nil then indentation
- will instead be 0).
-
-- However first non-empty line indentation in a chunk when going
- in is special if prev-prev chunk is on same mumamo-depth and
- have the same major mode. Then indent relative last non-empty
- line in prev-prev chunk.
-
-- When going out of a submode indentation is reset to
- LAST-PARENT-MAJOR-INDENT.
-
-- At the border the 'dividers' should be indented as the parent
- chunk. There are the following typical situations regarding
- inner/outer major modes:
-
- 1) <style type='text/css'>
- Going in next line; first char outer; line end inner;
-
- 2) </style>
- Going out this line; First char inner or outer; line end outer;
-
- 3) <?php
- Going in next line; first char outer or inner; line end inner;
-
- 4) ?>
- Going out this line; first char inner; line end outer;
-
- From this we deduce the following way to compute if we are
- going in or out:
-
- - Odd above (going in): Compare prev line end's mumamo-depth
- with current line end's dito. Set flag for first line in
- chunk.
-
- - Even above (going out): Same test as for going in, but going
- out happens on current line.
-"
- ;;(msgtrc "indent-line-function-1 blp=%s" (line-beginning-position))
- (setq prev-line-chunks nil)
- ;;(setq last-parent-major-indent nil)
- ;;(setq entering-submode-arg nil)
- (unless prev-line-chunks
- (save-excursion
- (goto-char (line-beginning-position 1))
- (unless (= (point) 1)
- (skip-chars-backward "\n\t ")
- (goto-char (line-beginning-position 1))
- (setq prev-line-chunks (mumamo-indent-current-line-chunks nil))
- ;;(msgtrc "%d:prev-line-chunks=%S" (save-restriction (widen) (line-number-at-pos)) prev-line-chunks )
- )))
- (let* ((prev-line-chunk0 (nth 0 prev-line-chunks))
- (prev-line-chunk2 (nth 2 prev-line-chunks))
- (prev-line-chunk3 (nth 3 prev-line-chunks))
- (prev-line-major0 (mumamo-chunk-major-mode (nth 0 prev-line-chunks)))
- (prev-line-major1 (mumamo-chunk-major-mode (nth 1 prev-line-chunks)))
- (prev-line-major2 (mumamo-chunk-major-mode (nth 2 prev-line-chunks)))
- (prev-line-major3 (mumamo-chunk-major-mode (nth 3 prev-line-chunks)))
- (prev-depth2 (if prev-line-chunk2
- (overlay-get prev-line-chunk2 'mumamo-depth)
- 0))
- (prev-depth3 (if prev-line-chunk3
- (overlay-get prev-line-chunk3 'mumamo-depth)
- 0))
-
- (this-line-chunks (mumamo-indent-current-line-chunks (nth 3 prev-line-chunks)))
- ;;(dummy (msgtrc "%d:this-line-chunks=%S" (save-restriction (widen) (line-number-at-pos)) this-line-chunks))
- (this-line-chunk0 (nth 0 this-line-chunks))
- (this-line-chunk2 (nth 2 this-line-chunks))
- (this-line-chunk3 (nth 3 this-line-chunks))
- (this-line-major0 (mumamo-chunk-major-mode (nth 0 this-line-chunks)))
- (this-line-major1 (mumamo-chunk-major-mode (nth 1 this-line-chunks)))
- (this-line-major2 (mumamo-chunk-major-mode (nth 2 this-line-chunks)))
- (this-line-major3 (mumamo-chunk-major-mode (nth 3 this-line-chunks)))
- (this-depth2 (overlay-get this-line-chunk2 'mumamo-depth))
- (this-depth3 (overlay-get this-line-chunk3 'mumamo-depth))
-
- ;;(dummy (msgtrc "a\t this=%S" this-line-chunks))
- this-line-indent-major
- major-indent-line-function
- (main-major (mumamo-main-major-mode))
- (old-indent (current-indentation))
- (next-entering-submode (if (< prev-depth3 this-depth3) 'yes 'no))
- (entering-submode
- ;; Fix-me
- (progn
- (unless nil ;entering-submode-arg
- (let* ((prev-prev-line-chunks
- (save-excursion
- (goto-char (line-beginning-position 0))
- (unless (bobp)
- (skip-chars-backward "\n\t ")
- (goto-char (line-beginning-position 1))
- (let ((chunks (mumamo-indent-current-line-chunks nil)))
- ;;(msgtrc "%d:prev-prev-line-chunks=%S" (save-restriction (widen) (line-number-at-pos)) chunks)
- chunks))))
- (prev-prev-line-chunk2 (nth 2 prev-prev-line-chunks))
- (prev-prev-line-chunk3 (nth 3 prev-prev-line-chunks))
- (prev-prev-depth2 (when prev-prev-line-chunk2
- (overlay-get prev-prev-line-chunk2 'mumamo-depth)))
- (prev-prev-depth3 (when prev-prev-line-chunk3
- (overlay-get prev-prev-line-chunk3 'mumamo-depth))))
- ;;(msgtrc "depths 2=%s/%s/%s 3=%s/%s/%s" prev-prev-depth2 prev-depth2 this-depth2 prev-prev-depth3 prev-depth3 this-depth3)
- (setq entering-submode-arg
- (if prev-prev-depth2
- (if (and (eq prev-prev-line-chunk2
- (overlay-get prev-line-chunk2 'mumamo-prev-chunk))
- (< prev-prev-depth2 prev-depth2))
- 'yes
- 'no)
- (if (> this-depth2 0) 'yes 'no)
- ))
- ))
- (eq 'yes entering-submode-arg)
- )) ;; fix-me
- ;; Fix-me
- (leaving-submode (> prev-depth2 this-depth2))
- want-indent ;; The indentation we desire
- got-indent
- (here-on-line (point-marker))
- this-pending-undo-list
- (while-n1 0)
- (while-n2 0)
- (while-n3 0)
- ;; Is there a possible indentor chunk on this line?:
- (this-line-indentor-chunk (when (> (overlay-start this-line-chunk2)
- (point-at-bol))
- (overlay-get this-line-chunk2 'mumamo-prev-chunk)))
- ;;(dummy (msgtrc "this-line-indentor-chunk=%S" this-line-indentor-chunk))
- ;; Check if this really is an indentor chunk:
- ;; Fix-me: 'mumamo-indentor is not put on the chunk yet since
- ;; it is done in mumamo-template-indent-get-chunk-shift ... -
- ;; and now it is calle too often ...
- (this-line-indentor-prev (when this-line-indentor-chunk
- (overlay-get this-line-indentor-chunk 'mumamo-prev-chunk)))
- (this-line-is-indentor (and this-line-indentor-prev
- (eq (overlay-get this-line-indentor-prev 'mumamo-next-indent)
- 'mumamo-template-indentor)
- (progn
- (goto-char (overlay-start this-line-indentor-chunk))
- (back-to-indentation)
- (= (point) (overlay-start this-line-indentor-chunk)))))
- ;; Fix-me: rewrite and reorder. We do not need both shift-in and shift-out
- (this-template-shift (when this-line-is-indentor
- (mumamo-template-indent-get-chunk-shift this-line-indentor-chunk)))
- ;;(dummy (msgtrc "this-line-indentor=%s, %S" this-template-shift this-line-is-indentor))
- ;; Fix-me: skip over blank lines backward here:
- (prev-template-indentor (when prev-line-chunk0
- (unless (eq this-line-chunk0 prev-line-chunk0)
- (let* ((prev (overlay-get this-line-chunk0 'mumamo-prev-chunk))
- (prev-prev (overlay-get prev 'mumamo-prev-chunk)))
- (when (and (eq prev-prev prev-line-chunk0)
- (eq (overlay-get prev-prev 'mumamo-next-indent)
- 'mumamo-template-indentor))
- prev)))))
- (prev-template-shift-rec (when prev-template-indentor
- (mumamo-template-indent-get-chunk-shift prev-template-indentor)
- ))
- (template-shift (if (and (car this-template-shift) (/= 0 (car this-template-shift)))
- (car this-template-shift)
- (when prev-template-shift-rec
- (cdr prev-template-shift-rec))))
- (template-indent-abs (when (and template-shift
- (/= 0 template-shift))
- (+ template-shift
- (let ((here (point)))
- (if prev-template-indentor
- (goto-char (overlay-start prev-template-indentor))
- (goto-char (overlay-start this-line-indentor-chunk))
- (skip-chars-backward " \t\r\n\f"))
- (prog1
- (current-indentation)
- (goto-char here))))))
- )
- (when (and leaving-submode entering-submode)
- (message "Do not know how to indent here (both leaving and entering sub chunks)")
- )
- ;; Fix-me: indentation
- ;;(error "Leaving=%s, entering=%s this0,1,2,3=%s,%s,%s,%s" leaving-submode entering-submode this-line-major0 this-line-major1 this-line-major2 this-line-major3)
- (when (or leaving-submode entering-submode)
- (unless last-parent-major-indent
- (save-excursion
- ;;(while (and (> 500 (setq while-n1 (1+ while-n1)))
- (while (and (mumamo-while 500 'while-n1 "last-parent-major-indent")
- (not last-parent-major-indent))
- (if (bobp)
- (setq last-parent-major-indent 0)
- (goto-char (line-beginning-position 0))
- (when (mumamo-fun-eq main-major
- (mumamo-chunk-major-mode
- (car
- (mumamo-indent-current-line-chunks nil)))
- )
- (skip-chars-forward " \t")
- (if (eolp)
- (setq last-parent-major-indent 0)
- (setq last-parent-major-indent (current-column)))))))))
- (mumamo-msgindent " leaving-submode=%s, entering-submode=%s" leaving-submode entering-submode)
- ;;(msgtrc " leaving-submode=%s, entering-submode=%s, template-indentor=%s" leaving-submode entering-submode template-indentor)
-
- ;; Fix-me: use this.
- ;; - clean up after chunk deletion
- ;; - next line after a template-indentor, what happens?
- ;;(setq template-indentor nil) ;; fix-me
- (cond
- ( template-indent-abs
- (setq want-indent (max 0 template-indent-abs)))
- ( leaving-submode
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;; First line after submode
- (mumamo-msgindent " leaving last-parent-major-indent=%s" last-parent-major-indent)
- (if (eq (overlay-get (overlay-get this-line-chunk0 'mumamo-prev-chunk)
- 'mumamo-next-indent)
- 'heredoc)
- (setq want-indent 0)
- (setq want-indent last-parent-major-indent)))
-
- ( entering-submode
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;; First line in submode
- ;;(setq this-line-indent-major this-line-major0)
- (setq this-line-indent-major (mumamo-indent-get-major-to-use this-line-major0 this-depth3))
- ;;(when (and prev-line-major0 (not (mumamo-fun-eq this-line-major0 prev-line-major0))) (setq this-line-indent-major prev-line-major0))
- (mumamo-msgindent " this-line-indent-major=%s, major-mode=%s this0=%s" this-line-indent-major major-mode this-line-major0)
- (mumamo-msgindent " mumamo-submode-indent-offset=%s" mumamo-submode-indent-offset)
- (unless (mumamo-fun-eq this-line-indent-major major-mode)
- (mumamo-set-major this-line-indent-major this-line-chunk0))
- (setq want-indent (+ last-parent-major-indent
- (if (= 0 last-parent-major-indent)
- (if mumamo-submode-indent-offset-0
- mumamo-submode-indent-offset-0
- -1000)
- (if mumamo-submode-indent-offset
- mumamo-submode-indent-offset
- -1000))))
- (unless (< 0 want-indent) (setq want-indent nil))
- (when (and want-indent (mumamo-indent-use-widen major-mode))
- ;; In this case only use want-indent if it is bigger than the
- ;; indentation calling indent-line-function would give.
- (condition-case nil
- (atomic-change-group
- (mumamo-call-indent-line (nth 0 this-line-chunks))
- (when (> want-indent (current-indentation))
- (signal 'mumamo-error-ind-0 nil))
- (setq want-indent nil))
- (mumamo-error-ind-0)))
- (unless want-indent
- (mumamo-call-indent-line (nth 0 this-line-chunks)))
- (mumamo-msgindent " enter sub.want-indent=%s, curr=%s, last-main=%s" want-indent (current-indentation)
- last-parent-major-indent)
- ;;(unless (> want-indent (current-indentation)) (setq want-indent nil))
- )
-
- ( t
- ;; We have to change major mode, because we know nothing
- ;; about the requirements of the indent-line-function:
- ;; Fix-me: This may be cured by RMS suggestion to
- ;; temporarily set all variables back to global values?
- (setq this-line-indent-major (mumamo-indent-get-major-to-use this-line-major0 this-depth3))
- (mumamo-msgindent " this-line-indent-major=%s" this-line-indent-major)
- (unless (mumamo-fun-eq this-line-indent-major major-mode) (mumamo-set-major this-line-indent-major this-line-chunk0))
- ;; Use the major mode at the beginning of since a sub chunk may
- ;; start at start of line.
- (if (mumamo-fun-eq this-line-major1 main-major)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;; In main major mode
- ;;
- ;; Take care of the case when all the text is in a
- ;; sub chunk. In that case use the same indentation as if
- ;; the code all belongs to the surrounding major mode.
- (let ((here (point))
- (use-widen (mumamo-indent-use-widen main-major)))
- ;; If we can't indent indent using the main major mode
- ;; because it is only blanks and we should not widen,
- ;; then use the indentation on the line where it starts.
- (mumamo-msgindent " In main major mode")
- (forward-line 0)
- (skip-chars-backward " \t\n\r\f")
- (forward-line 0)
- (if (or use-widen (>= (point) (overlay-start this-line-chunk0)))
- (progn
- (goto-char here)
- (mumamo-call-indent-line this-line-chunk0))
- (setq want-indent (current-indentation))
- (goto-char here))
- (mumamo-msgindent " In main major mode B")
- (setq last-parent-major-indent (current-indentation)))
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;; In sub major mode
- ;;
- ;; Get the indentation the major mode alone would use:
- ;;(setq got-indent (mumamo-get-major-mode-indent-column))
- ;; Since this line has another major mode than the
- ;; previous line we instead want to indent relative to
- ;; that line in a way decided in mumamo:
- (mumamo-msgindent " In sub major mode")
- (let ((chunk (mumamo-get-chunk-save-buffer-state (point)))
- (font-lock-dont-widen t)
- ind-zero
- (here (point))
- ind-on-first-sub-line)
- (save-restriction
- (mumamo-update-obscure chunk here)
- (let ((syn-min-max (mumamo-chunk-syntax-min-max chunk nil)))
- (narrow-to-region (car syn-min-max)
- (cdr syn-min-max)))
- (condition-case nil
- (atomic-change-group
- (mumamo-call-indent-line (nth 0 this-line-chunks))
- (when (= 0 (current-indentation))
- (setq ind-zero t)
- ;; It is maybe ok if indentation on first sub
- ;; line is 0 so check that:
- (goto-char (point-min))
- (widen)
- (setq ind-on-first-sub-line (current-indentation))
- (goto-char here)
- (signal 'mumamo-error-ind-0 nil)))
- (mumamo-error-ind-0))
- ;; Unfortunately the indentation can sometimes get 0
- ;; here even though it is clear it should not be 0. This
- ;; happens when there are only comments or empty lines
- ;; above.
- ;;
- ;; See c:/test/erik-lilja-index.php for an example.
- (when ind-zero ;(and t (= 0 (current-indentation)))
- (save-excursion
- (setq want-indent 0)
- (unless (= 0 ind-on-first-sub-line)
- ;;(while (and (> 500 (setq while-n2 (1+ while-n2)))
- (while (and (mumamo-while 500 'while-n2 "want-indent")
- (= 0 want-indent)
- (/= (point) (point-min)))
- (beginning-of-line 0)
- (setq want-indent (current-indentation)))
- ;; Now if want-indent is still 0 we need to look further above
- (when (= 0 want-indent)
- (widen)
- ;;(while (and (> 500 (setq while-n3 (1+ while-n3)))
- (while (and (mumamo-while 500 'while-n3 "want-indent 2")
- (= 0 want-indent)
- (/= (point) (point-min)))
- (beginning-of-line 0)
- (setq want-indent (current-indentation)))
- ;; If we got to the main major mode we need to add
- ;; the special submode offset:
- (let* ((ovl (mumamo-get-chunk-save-buffer-state (point)))
- (major (mumamo-chunk-major-mode ovl)))
- (when (mumamo-fun-eq major main-major)
- (setq want-indent (+ want-indent
- (if (= 0 want-indent)
- mumamo-submode-indent-offset-0
- mumamo-submode-indent-offset)))))))))
- )))))
- (when want-indent
- ;;(msgtrc "indent-line-to %s at line-beginning=%s" want-indent (line-beginning-position))
- (indent-line-to want-indent))
- ;; (when (and template-shift (/= 0 template-shift))
- ;; (let ((ind (+ (current-indentation) template-shift)))
- ;; (indent-line-to ind)))
- ;; (when template-indent-abs
- ;; (indent-line-to template-indent-abs))
- (goto-char here-on-line)
- ;;(msgtrc "exit: %s" (list this-line-chunks last-parent-major-indent))
- (list this-line-chunks last-parent-major-indent next-entering-submode)))
-
-;; Fix-me: use this for first line in a submode
-;; Fix-me: check more carefully for widen since it may lead to bad results.
-(defun mumamo-indent-use-widen (major-mode)
- "Return non-nil if widen before indentation in MAJOR-MODE."
- (let* ((specials (cadr (assoc major-mode mumamo-indent-widen-per-major)))
- (use-widen (memq 'use-widen specials))
- (use-widen-maybe (assq 'use-widen specials)))
- (or use-widen
- (memq mumamo-multi-major-mode (cadr use-widen-maybe)))))
-;;(mumamo-indent-use-widen 'php-mode)
-;;(mumamo-indent-use-widen 'nxhtml-mode)
-;;(mumamo-indent-use-widen 'html-mode)
-
-;; Fix-me: remove
-;; (defun mumamo-indent-special-or-default (default-indent)
-;; "Indent to DEFAULT-INDENT unless a special indent can be done."
-;; (mumamo-with-major-mode-indentation major-mode
-;; `(progn
-;; (if (mumamo-indent-use-widen major-mode)
-;; (save-restriction
-;; (widen)
-;; (mumamo-msgindent "=> special-or-default did widen, %s" major-mode)
-;; (funcall indent-line-function))
-;; (indent-to-column default-indent)))))
-
-(defun mumamo-call-indent-line (chunk)
- "Call the relevant `indent-line-function'."
- ;;(msgtrc "call-indent-line %s, lbp=%s" chunk (line-beginning-position))
- (if nil
- (mumamo-with-major-mode-indentation major-mode
- `(save-restriction
- (when (mumamo-indent-use-widen major-mode)
- (mumamo-msgindent "=> indent-line did widen")
- (widen))
- (funcall indent-line-function)))
- (let ((maj (car mumamo-major-mode-indent-line-function))
- (fun (cdr mumamo-major-mode-indent-line-function)))
- (assert (mumamo-fun-eq maj major-mode))
- (save-restriction
- ;; (unless (mumamo-indent-use-widen major-mode)
- ;; (let ((syn-min-max (mumamo-chunk-syntax-min-max chunk nil)))
- ;; (narrow-to-region (car syn-min-max) (cdr syn-min-max))))
- (let ((mumamo-stop-widen (not (mumamo-indent-use-widen major-mode))))
- (if (not mumamo-stop-widen)
- (widen)
- (let ((syn-min-max (mumamo-chunk-syntax-min-max chunk nil)))
- (narrow-to-region (car syn-min-max) (cdr syn-min-max))))
- ;;(msgtrc "call-indent-line fun=%s" fun)
- ;;(funcall fun)
- ;; Fix-me: Use mumamo-funcall-evaled to avoid (widen):
- (mumamo-funcall-evaled fun)
- )))))
-
-(defvar mumamo-stop-widen nil)
-(when nil
- (let* ((fun 'describe-variable)
- (lib (symbol-file fun 'defun)))
- (find-function-search-for-symbol fun nil lib)))
-
-(defun mumamo-funcall-evaled (fun &rest args)
- "Make sure FUN is evaled, then call it.
-This make sure (currently) that defadvice for primitives are
-called. They are not called in byte compiled code.
-
-See URL `http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5863' since
-this may change."
- (when mumamo-stop-widen
- (unless (get fun 'mumamo-evaled)
- (let* ((lib (symbol-file fun 'defun))
- (where (find-function-search-for-symbol fun nil lib))
- (buf (car where))
- (pos (cdr where)))
- (with-current-buffer buf
- (let ((close (and (not (buffer-modified-p))
- (= 1 (point)))))
- ;;(goto-char pos) (eval-defun nil)
- (msgtrc "mumamo-funcall-evaled %s" (current-buffer))
- (eval-buffer)
- (when close (kill-buffer))))
- (put fun 'mumamo-evaled t))))
- (apply 'funcall fun args))
-
-;;(require 'advice)
-(defun mumamo-defadvice-widen ()
- (defadvice widen (around
- mumamo-ad-widen
- activate
- compile
- )
- (unless (and mumamo-multi-major-mode
- mumamo-stop-widen)
- ad-do-it)))
-(eval-after-load 'mumamo
- '(mumamo-defadvice-widen))
-
-;; (defadvice font-lock-fontify-buffer (around
-;; mumam-ad-font-lock-fontify-buffer
-;; activate
-;; compile
-;; )
-;; (if mumamo-multi-major-mode
-;; (save-restriction
-;; (let* ((chunk (mumamo-find-chunks (point) "font-lock-fontify-buffer advice"))
-;; (syn-min-max (mumamo-chunk-syntax-min-max chunk nil))
-;; (syn-min (car syn-min-max))
-;; (syn-max (cdr syn-min-max))
-;; (mumamo-stop-widen t))
-;; (narrow-to-region syn-min syn-max)
-;; (font-lock-fontify-region syn-min syn-max)))
-;; ad-do-it))
-
-(defun mumamo-indent-region-function (start end)
- "Indent the region between START and END."
- (save-excursion
- (setq end (copy-marker end))
- (goto-char start)
- (let ((old-point -1)
- prev-line-chunks
- last-parent-major-indent
- entering-submode-arg
- ;; Turn off validation during indentation
- (old-rng-validate-mode (when (boundp 'rng-validate-mode) rng-validate-mode))
- (rng-nxml-auto-validate-flag nil)
- (nxhtml-use-imenu nil)
- fontification-functions
- rng-nxml-auto-validate-flag
- (nxhtml-mode-hook (mumamo-get-hook-value
- 'nxhtml-mode-hook
- '(html-imenu-setup)))
- ;;
- (while-n1 0))
- (when old-rng-validate-mode (rng-validate-mode -1))
- ;;(while (and (> 3000 (setq while-n1 (1+ while-n1)))
- (while (and (mumamo-while 3000 'while-n1 "indent-region")
- (< (point) end)
- (/= old-point (point)))
- ;;(message "mumamo-indent-region-function, point=%s" (point))
- (or (and (bolp) (eolp))
- (let ((ret (mumamo-indent-line-function-1
- prev-line-chunks
- last-parent-major-indent
- entering-submode-arg)))
- (setq prev-line-chunks (nth 0 ret))
- (setq last-parent-major-indent (nth 1 ret))
- (setq entering-submode-arg (nth 2 ret))))
- (setq old-point (point))
- (forward-line 1))
- (when old-rng-validate-mode (rng-validate-mode 1)))
- (message "Ready indenting region")))
-
-
-(defun mumamo-fill-forward-paragraph-function(&optional arg)
- "Function to move over paragraphs used by filling code.
-This is the buffer local value of
-`fill-forward-paragraph-function' when mumamo is used."
- ;; fix-me: Do this chunk by chunk
- ;; Fix-me: use this (but only in v 23)
- (let* ((ovl (mumamo-get-chunk-save-buffer-state (point)))
- (major (mumamo-chunk-major-mode ovl)))
- (mumamo-with-major-mode-fontification major
- fill-forward-paragraph-function)))
-
-(defun mumamo-fill-chunk (&optional justify)
- "Fill each of the paragraphs in the current chunk.
-Narrow to chunk region trimmed white space at the ends. Then
-call `fill-region'.
-
-The argument JUSTIFY is the same as in `fill-region' and a prefix
-behaves the same way as there."
- (interactive (progn
- (barf-if-buffer-read-only)
- (list (if current-prefix-arg 'full))))
- (let* ((ovl (mumamo-get-chunk-save-buffer-state (point)))
- (major (mumamo-chunk-major-mode ovl)))
- ;; Fix-me: There must be some bug that makes it necessary to
- ;; always change mode when fill-paragraph-function is
- ;; c-fill-paragraph.
-
- ;;(unless (mumamo-fun-eq major major-mode) (mumamo-set-major major ovl))
- (mumamo-set-major major ovl)
-
- (save-restriction
- (mumamo-update-obscure ovl (point))
- (let* ((syn-min-max (mumamo-chunk-syntax-min-max ovl nil))
- (syn-min (car syn-min-max))
- (syn-max (cdr syn-min-max))
- use-min
- (here (point-marker)))
- (goto-char syn-min)
- (skip-syntax-forward " ")
- ;; Move back over chars that have whitespace syntax but have the p flag.
- (backward-prefix-chars)
- (setq use-min (point))
- (goto-char syn-max)
- (skip-syntax-backward " ")
- (fill-region use-min (point) justify)))))
-
-;; (defvar mumamo-dont-widen)
-;; (defadvice widen (around
-;; mumamo-ad-widen
-;; activate
-;; disable
-;; compile
-;; )
-;; "Make `widen' do nothing.
-;; This is for `mumamo-fill-paragraph-function' and is necessary
-;; when `c-fill-paragraph' is the real function used."
-;; (unless (and (boundp 'mumamo-dont-widen)
-;; mumamo-dont-widen)
-;; ad-do-it))
-
-(defadvice flymake-display-warning (around
- mumamo-ad-flymake-display-warning
- activate
- compile)
- "Display flymake warnings in the usual Emacs way."
- (let ((msg (ad-get-arg 0)))
- ;; Fix-me: Can't get backtrace here. Report it.
- ;;(setq msg (format (concat msg "\n%S" (with-output-to-string (backtrace)))))
- (lwarn '(flymake) :error msg)))
-;;(lwarn '(flymake) :error "the warning")
-
-(defun mumamo-forward-chunk ()
- "Move forward to next chunk."
- (interactive)
- (let* ((chunk (mumamo-get-chunk-save-buffer-state (point)))
- (end-pos (overlay-end chunk)))
- (goto-char (min end-pos
- (point-max)))))
-
-(defun mumamo-backward-chunk ()
- "Move backward to previous chunk."
- (interactive)
- (let* ((chunk (mumamo-get-chunk-save-buffer-state (point)))
- (start-pos (overlay-start chunk)))
- (goto-char (max (1- start-pos)
- (point-min)))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Spell checking
-
-(defun mumamo-flyspell-verify ()
- "Function used for `flyspell-generic-check-word-predicate'."
- (let* ((chunk (when mumamo-multi-major-mode
- (mumamo-find-chunks (point) "mumamo-lyspell-verify")))
- (chunk-major (when chunk (mumamo-chunk-major-mode chunk)))
- (mode-predicate (when chunk-major
- (let ((predicate (get chunk-major
- 'flyspell-mode-predicate)))
- (if predicate
- predicate
- (if (mumamo-derived-from-mode chunk-major
- 'text-mode)
- nil
- 'flyspell-generic-progmode-verify)))))
- )
- (if mode-predicate
- ;; Fix-me: (run-hooks 'flyspell-prog-mode-hook)
- (funcall mode-predicate)
- t)))
-
-;; (featurep 'cc-engine)
-(eval-after-load 'cc-engine
- (progn
- ;; From Alan's mail 2009-12-03: C Mode: acceleration in brace
- ;; deserts.
- ;; Fix-me: Should they be here, or...?
- (put 'c-state-cache 'permanent-local t)
- (put 'c-state-cache-good-pos 'permanent-local t)
- (put 'c-state-nonlit-pos-cache 'permanent-local t)
- (put 'c-state-nonlit-pos-cache-limit 'permanent-local t)
- (put 'c-state-brace-pair-desert 'permanent-local t)
- (put 'c-state-point-min 'permanent-local t)
- (put 'c-state-point-min-lit-type 'permanent-local t)
- (put 'c-state-point-min-lit-start 'permanent-local t)
- (put 'c-state-min-scan-pos 'permanent-local t)
- (put 'c-state-old-cpp-beg 'permanent-local t)
- (put 'c-state-old-cpp-end 'permanent-local t)
-
- ))
-
-;; Fix-me: Seems perhaps like c-state-point-min-lit-start is reset in
-;; c-state-mark-point-min-literal because c-state-literal-at returns
-;; nil. (Or is (car lit) nil?)
-
-(defvar mumamo-c-state-cache-init nil)
-(make-variable-buffer-local 'mumamo-c-state-cache-init)
-(put 'mumamo-c-state-cache-init 'permanent-local t)
-
-(defun mumamo-c-state-cache-init ()
- (unless mumamo-c-state-cache-init
- ;;(msgtrc "c-state-cache-init running")
- (setq mumamo-c-state-cache-init t)
- (setq c-state-cache (or c-state-cache nil))
- (put 'c-state-cache 'permanent-local t)
- (setq c-state-cache-good-pos (or c-state-cache-good-pos 1))
- (put 'c-state-cache-good-pos 'permanent-local t)
- (setq c-state-nonlit-pos-cache (or c-state-nonlit-pos-cache nil))
- (put 'c-state-nonlit-pos-cache 'permanent-local t)
- (setq c-state-nonlit-pos-cache-limit (or c-state-nonlit-pos-cache-limit 1))
- (put 'c-state-nonlit-pos-cache-limit 'permanent-local t)
- (setq c-state-brace-pair-desert (or c-state-brace-pair-desert nil))
- (put 'c-state-brace-pair-desert 'permanent-local t)
- (setq c-state-point-min (or c-state-point-min 1))
- (put 'c-state-point-min 'permanent-local t)
- (setq c-state-point-min-lit-type (or c-state-point-min-lit-type nil))
- (put 'c-state-point-min-lit-type 'permanent-local t)
- (setq c-state-point-min-lit-start (or c-state-point-min-lit-start nil))
- (put 'c-state-point-min-lit-start 'permanent-local t)
- (setq c-state-min-scan-pos (or c-state-min-scan-pos 1))
- (put 'c-state-min-scan-pos 'permanent-local t)
- (setq c-state-old-cpp-beg (or c-state-old-cpp-beg nil))
- (put 'c-state-old-cpp-beg 'permanent-local t)
- (setq c-state-old-cpp-end (or c-state-old-cpp-end nil))
- (put 'c-state-old-cpp-end 'permanent-local t)
- (c-state-mark-point-min-literal)))
-
-(defadvice c-state-cache-init (around
- mumamo-ad-c-state-cache-init
- activate
- compile
- )
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (mumamo-c-state-cache-init)))
-
-;; Fix-me: Have to add per chunk local majors for this one.
-(defun mumamo-c-state-literal-at (here)
- ;; If position HERE is inside a literal, return (START . END), the
- ;; boundaries of the literal (which may be outside the accessible bit of the
- ;; buffer). Otherwise, return nil.
- ;;
- ;; This function is almost the same as `c-literal-limits'. It differs in
- ;; that it is a lower level function, and that it rigourously follows the
- ;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position.
- (let* ((is-here (point))
- (s (syntax-ppss here))
- (ret (when (or (nth 3 s) (nth 4 s)) ; in a string or comment
- (parse-partial-sexp (point) (point-max)
- nil ; TARGETDEPTH
- nil ; STOPBEFORE
- s ; OLDSTATE
- 'syntax-table) ; stop at end of literal
- (cons (nth 8 s) (point)))))
- (goto-char is-here)
- ret))
-
-;; (save-restriction
-;; (widen)
-;; (let* ((chunk (mumamo-find-chunks (point) "mumamo-c-state-literal-at"))
-;; (syntax-min-max (mumamo-chunk-syntax-min-max chunk t)))
-;; (narrow-to-region (car syntax-min-max) (cdr syntax-min-max)))
-;; (save-excursion
-;; (let ((c c-state-nonlit-pos-cache)
-;; pos npos lit)
-;; ;; Trim the cache to take account of buffer changes.
-;; (while (and c (> (car c) c-state-nonlit-pos-cache-limit))
-;; (setq c (cdr c)))
-;; (setq c-state-nonlit-pos-cache c)
-
-;; (while (and c (> (car c) here))
-;; (setq c (cdr c)))
-;; (setq pos (or (car c) (point-min)))
-
-;; (while (<= (setq npos (+ pos c-state-nonlit-pos-interval))
-;; here)
-;; (setq lit (c-state-pp-to-literal pos npos))
-;; (setq pos (or (cdr lit) npos)) ; end of literal containing npos.
-;; (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache)))
-
-;; (if (> pos c-state-nonlit-pos-cache-limit)
-;; (setq c-state-nonlit-pos-cache-limit pos))
-;; (if (< pos here)
-;; (setq lit (c-state-pp-to-literal pos here)))
-;; lit))))
-
-
-(defadvice c-state-literal-at (around
- mumamo-ad-c-state-state-literal-at
- activate
- compile
- )
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (mumamo-c-state-literal-at (ad-get-arg 0))))
-
-
-(defun mumamo-c-state-get-min-scan-pos ()
- ;; Return the lowest valid scanning pos. This will be the end of the
- ;; literal enclosing point-min, or point-min itself.
- (save-restriction
- (save-excursion
- (widen)
- (mumamo-narrow-to-chunk-inner)
- (or (and c-state-min-scan-pos
- (>= c-state-min-scan-pos (point-min))
- c-state-min-scan-pos)
- (if (not c-state-point-min-lit-start)
- (goto-char (point-min))
- (goto-char c-state-point-min-lit-start)
- (if (eq c-state-point-min-lit-type 'string)
- (forward-sexp)
- (forward-comment 1)))
- (setq c-state-min-scan-pos (point))))))
-
-(defadvice c-state-get-min-scan-pos (around
- mumamo-ad-c-state-get-min-scan-pos-at
- activate
- compile
- )
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (setq ad-return-value (mumamo-c-state-get-min-scan-pos))))
-
-(eval-after-load 'rng-match
-;;; (defun rng-match-init-buffer ()
-;;; (make-local-variable 'rng-compile-table)
-;;; (make-local-variable 'rng-ipattern-table)
-;;; (make-local-variable 'rng-last-ipattern-index))
- (progn
- (put 'rng-compile-table 'permanent-local t)
- (put 'rng-ipattern-table 'permanent-local t)
- (put 'rng-last-ipattern-index 'permanent-local t)
- ))
-
-(eval-after-load 'flyspell
- (progn
- (put 'flyspell-mode 'permanent-local t)
-
- (put 'flyspell-generic-check-word-predicate 'permanent-local t)
-
- (put 'flyspell-casechars-cache 'permanent-local t)
- (put 'flyspell-ispell-casechars-cache 'permanent-local t)
-
- (put 'flyspell-not-casechars-cache 'permanent-local t)
- (put 'flyspell-ispell-not-casechars-cache 'permanent-local t)
-
- (put 'flyspell-auto-correct-pos 'permanent-local t)
- (put 'flyspell-auto-correct-region 'permanent-local t)
- (put 'flyspell-auto-correct-ring 'permanent-local t)
- (put 'flyspell-auto-correct-word 'permanent-local t)
-
- (put 'flyspell-consider-dash-as-word-delimiter-flag 'permanent-local t)
-
- (put 'flyspell-dash-dictionary 'permanent-local t)
-
- (put 'flyspell-dash-local-dictionary 'permanent-local t)
-
- (put 'flyspell-word-cache-start 'permanent-local t)
- (put 'flyspell-word-cache-end 'permanent-local t)
- (put 'flyspell-word-cache-word 'permanent-local t)
- (put 'flyspell-word-cache-result 'permanent-local t)
-
- (put 'flyspell-word-cache-start 'permanent-local t)
-
-
- (put 'flyspell-kill-ispell-hook 'permanent-local-hook t)
- (put 'flyspell-post-command-hook 'permanent-local-hook t)
- (put 'flyspell-pre-command-hook 'permanent-local-hook t)
- (put 'flyspell-after-change-function 'permanent-local-hook t)
- (put 'flyspell-hack-local-variables-hook 'permanent-local-hook t)
- (put 'flyspell-auto-correct-previous-hook 'permanent-local-hook t)
-
- (when mumamo-multi-major-mode
- (when (featurep 'flyspell)
- (setq flyspell-generic-check-word-predicate 'mumamo-flyspell-verify)))
- ))
-
-(defun flyspell-mumamo-mode ()
- "Turn on function `flyspell-mode' for multi major modes."
- (interactive)
- (require 'flyspell)
- (setq flyspell-generic-check-word-predicate 'mumamo-flyspell-verify)
- (flyspell-mode 1)
- ;;(run-hooks 'flyspell-prog-mode-hook)
- )
-
-(eval-after-load 'sgml-mode
- (progn
- (put 'sgml-tag-face-alist 'permanent-local t)
- (put 'sgml-display-text 'permanent-local t)
- (put 'sgml-tag-alist 'permanent-local t)
- (put 'sgml-face-tag-alist 'permanent-local t)
- (put 'sgml-tag-help 'permanent-local t)
- ))
-
-(eval-after-load 'hl-line
- (progn
- (put 'hl-line-overlay 'permanent-local t)
- ))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; New versions of syntax-ppss functions, temporary written as defadvice.
-
-(defadvice syntax-ppss-flush-cache (around
- mumamo-ad-syntax-ppss-flush-cache
- activate
- compile
- )
- "Support for mumamo.
-See the defadvice for `syntax-ppss' for an explanation."
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (let ((pos (ad-get-arg 0)))
- (let* ((chunk-at-pos (when (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode)
- (mumamo-find-chunks-1 pos "syntax-ppss-flush-cache"))))
- (if chunk-at-pos
- (let* ((syntax-ppss-last (overlay-get chunk-at-pos 'syntax-ppss-last))
- (syntax-ppss-cache (overlay-get chunk-at-pos 'syntax-ppss-cache)))
- ;;(setq ad-return-value ad-do-it)
- ad-do-it
- (overlay-put chunk-at-pos 'syntax-ppss-last syntax-ppss-last)
- (overlay-put chunk-at-pos 'syntax-ppss-cache syntax-ppss-cache))
- ;;(setq ad-return-value ad-do-it)
- ad-do-it
- )))))
-
-(defvar mumamo-syntax-chunk-at-pos nil
- "Internal use.")
-(make-variable-buffer-local 'mumamo-syntax-chunk-at-pos)
-
-;; Fix-me: Is this really needed?
-;; See http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg00374.html
-(defadvice syntax-ppss-stats (around
- mumamo-ad-syntax-ppss-stats
- activate
- compile
- )
- "Support for mumamo.
-See the defadvice for `syntax-ppss' for an explanation."
- (if mumamo-syntax-chunk-at-pos
- (let* ((syntax-ppss-stats
- (overlay-get mumamo-syntax-chunk-at-pos 'syntax-ppss-stats)))
- ad-do-it
- (overlay-put mumamo-syntax-chunk-at-pos 'syntax-ppss-stats syntax-ppss-stats))
- ad-do-it))
-
-(defvar mumamo-syntax-ppss-major nil)
-
-;; FIX-ME: There is a problem with " in xhtml files, especially after
-;; syntax="...". Looks like it is the " entry in
-;; `sgml-font-lock-syntactic-keywords' that is jumping in! Dumping
-;; things in `font-lock-apply-syntactic-highlight' seems to show that.
-;;
-;; (I have put in some dump code in my patched version of
-;; Emacs+EmacsW32 there for that. This is commented out by default
-;; and it will only work for the file nxhtml-changes.html which is big
-;; enough for the problem to occur. It happens at point 1109.)
-;;
-;; It is this piece of code where the problem arise:
-;;
-;; (if (prog1
-;; (zerop (car (syntax-ppss (match-beginning 0))))
-;; (goto-char (match-end 0)))
-;; .)
-;;
-;;
-;; It comes from `sgml-font-lock-syntactic-keywords' in sgml-mode.el
-;; and is supposed to protect from " that is not inside a tag.
-;; However in this case for the second " in syntax="..." `syntax-ppss'
-;; returns 0 as the first element in its return value. That happen
-;; even though `major-mode' is correctly `html-mode'. It leads to
-;; that the property 'syntax with the value (1) is added to the "
-;; after the css-mode chunk in syntax="...". The problem persists
-;; even if the chunk has `fundamental-mode' instead of `css-mode'.
-;;
-;; Bypassing the cache for `syntax-pss' by calling
-;; `parse-partial-sexp' directly instead of doing ad-do-it (see
-;; by-pass-chache in the code below) solves the problem for now. It
-;; does not feel like the right solution however.
-;;
-;; One way of temporary solving the problem is perhaps to modify
-;; `mumamo-chunk-attr=' to make "" borders, but I am not sure that it
-;; works and it is the wrong solution.
-(defadvice syntax-ppss (around
- mumamo-ad-syntax-ppss
- activate
- compile
- )
- "Support for mumamo chunks.
-For each chunk store as properties of the chunk the parse state
-that is normally hold in `syntax-ppss-last' and
-`syntax-ppss-cache'.
-
-Compute the beginning parse state for a chunk this way:
-
-- If the chunk major mode is the same as the main major mode for
- the multi major mode then parse from the beginning of the file
- to the beginning of the chunk using the main major mode. While
- doing that jump over chunks that do not belong to the main
- major mode and cache the state at the end and beginning of the
- the main major mode chunks.
-
-FIX-ME: implement above. Solution?:
- (parse-partial-sexp syntax-min (1+ syntax-max) nil nil state-at-syntax-min)
-Put this at next chunk's beginning.
-
-- Otherwise set the state at the beginning of the chunk to nil.
-
-Do here also other necessary adjustments for this."
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (let ((pos (ad-get-arg 0)))
- (unless pos (setq pos (point)))
- (let* ((chunk-at-pos (when (and (boundp 'mumamo-multi-major-mode) mumamo-multi-major-mode)
- (mumamo-find-chunks-1 pos "syntax-ppss")))
- (dump2 (and (boundp 'dump-quote-hunt)
- dump-quote-hunt
- (boundp 'start)
- ;;(= 1109 start)
- )))
- ;;(setq dump2 t)
- (setq mumamo-syntax-chunk-at-pos chunk-at-pos)
- (when dump2 (msgtrc "\npos=%s point-min=%s mumamo-syntax-ppss.chunk-at-pos=%s" pos (point-min) chunk-at-pos))
- (if chunk-at-pos
- (let* ((chunk-syntax-min-max (mumamo-chunk-syntax-min-max chunk-at-pos t))
- (chunk-syntax-min (car chunk-syntax-min-max))
- (chunk-major (mumamo-chunk-major-mode chunk-at-pos))
- (syntax-ppss-last (overlay-get chunk-at-pos 'syntax-ppss-last))
- (syntax-ppss-cache (overlay-get chunk-at-pos 'syntax-ppss-cache))
- (syntax-ppss-last-min (overlay-get chunk-at-pos 'syntax-ppss-last-min))
- (syntax-ppss-cache-min (list syntax-ppss-last-min))
- ;; This must be fetch the same way as in syntax-ppss:
- (syntax-begin-function (overlay-get chunk-at-pos 'syntax-begin-function))
- (syntax-ppss-max-span (if chunk-syntax-min
- (/ (- pos chunk-syntax-min -2) 2)
- syntax-ppss-max-span))
- (syntax-ppss-stats (let ((stats (overlay-get chunk-at-pos 'syntax-ppss-stats)))
- (if stats
- stats
- (default-value 'syntax-ppss-stats))))
- (last-min-pos (or (car syntax-ppss-last-min)
- 1))
- )
- ;; If chunk has moved the cached values are invalid.
- (unless (= chunk-syntax-min last-min-pos)
- (setq syntax-ppss-last nil)
- (setq syntax-ppss-last-min nil)
- (setq syntax-ppss-cache nil)
- (setq syntax-ppss-cache-min nil)
- (setq syntax-ppss-stats (default-value 'syntax-ppss-stats)))
- (when dump2
- (msgtrc " get syntax-ppss-last-min=%s len=%s chunk=%s" syntax-ppss-last-min (length syntax-ppss-last-min) chunk-at-pos)
- (msgtrc " prop syntax-ppss-last-min=%s" (overlay-properties chunk-at-pos))
- (msgtrc " chunk-major=%s, %s, syntax-min=%s\n last-min=%s" chunk-major major-mode chunk-syntax-min syntax-ppss-last-min))
- ;;(setq dump2 nil)
- (when syntax-ppss-last-min
- (unless (car syntax-ppss-last-min)
- ;;(msgtrc "fix-me: emacs bug workaround, setting car of syntax-ppss-last-min")
- ;;(setcar syntax-ppss-last-min (1- chunk-syntax-min))
- ;;(msgtrc "fix-me: emacs bug workaround, need new syntax-ppss-last-min because car is nil")
- (setq syntax-ppss-last-min nil)
- ))
- (unless syntax-ppss-last-min
- (setq syntax-ppss-last nil)
- (save-restriction
- (widen)
- (let* ((min-pos chunk-syntax-min)
- (chunk-sub-major (mumamo-chunk-major-mode chunk-at-pos))
- (main-major (mumamo-main-major-mode))
- (is-main-mode-chunk (mumamo-fun-eq chunk-sub-major main-major)))
- (when dump2 (msgtrc " min-pos=%s, is-main-mode-chunk=%s" min-pos is-main-mode-chunk))
- ;; Looks like assert can not be used here for some reason???
- ;;(assert (and min-pos) t)
- (unless (and min-pos) (error "defadvice syntax-ppss: (and min-pos=%s)" min-pos))
- (setq syntax-ppss-last-min
- (cons min-pos ;;(1- min-pos)
- (if nil ;is-main-mode-chunk
- ;; Fix-me: previous chunks as a
- ;; cache? The problem is updating
- ;; this. Perhaps it is possible to
- ;; prune how far back to go by
- ;; going to the first chunk
- ;; backwards where
- ;; (pars-partial-sexp min max) is
- ;; "nil"?
- (mumamo-with-major-mode-fontification main-major
- `(parse-partial-sexp 1 ,min-pos nil nil nil nil))
- (parse-partial-sexp 1 1))))
- (setq syntax-ppss-cache-min (list syntax-ppss-last-min))
- (when dump2 (msgtrc " put syntax-ppss-last-min=%s len=%s chunk=%s" syntax-ppss-last-min (length syntax-ppss-last-min) chunk-at-pos))
- (when dump2 (msgtrc " prop syntax-ppss-last-min=%s" (overlay-properties chunk-at-pos)))
- (overlay-put chunk-at-pos 'syntax-ppss-last-min syntax-ppss-last-min)
- (let ((test-syntax-ppss-last-min
- (overlay-get chunk-at-pos 'syntax-ppss-last-min)))
- (when dump2 (msgtrc " test syntax-ppss-last-min=%s len=%s" test-syntax-ppss-last-min (length test-syntax-ppss-last-min)))
- (when dump2 (msgtrc " propt syntax-ppss-last-min=%s" (overlay-properties chunk-at-pos)))
- ))))
- (when dump2 (msgtrc " here 0, syntax-ppss-last=%s" syntax-ppss-last))
- (unless syntax-ppss-last
- (setq syntax-ppss-last syntax-ppss-last-min)
- (setq syntax-ppss-cache syntax-ppss-cache-min))
- ;;(syntax-ppss pos)
- (when dump2 (msgtrc " at 1, syntax-ppss-last=%s" syntax-ppss-last))
- (when dump2 (msgtrc " at 1, syntax-ppss-cache=%s" syntax-ppss-cache))
- (let (ret-val
- (by-pass-cache t)
- (dump2 dump2))
- (if (not by-pass-cache)
- (progn
- (when dump2
- (let ((old-ppss (cdr syntax-ppss-last))
- (old-pos (car syntax-ppss-last)))
- ;;(assert (and old-pos pos) t)
- (unless (and old-pos pos) (error "defadvice syntax-ppss: (and old-pos=%s pos=%s)" old-pos pos))
- (msgtrc "parse-partial-sexp=>%s" (parse-partial-sexp old-pos pos nil nil old-ppss))))
- (let (dump2)
- (setq ret-val ad-do-it)))
- (let ((old-ppss (cdr syntax-ppss-last))
- (old-pos (car syntax-ppss-last)))
- (when dump2
- (msgtrc "Xparse-partial-sexp %s %s nil nil %s" old-pos pos old-ppss)
- (let (dump2)
- (msgtrc "ad-do-it=>%s" ad-do-it)))
- (save-restriction
- (widen)
- ;;(assert (and old-pos pos) t)
- (unless (and old-pos pos) (error "defadvice syntax-ppss 2 (and old-pos=%s pos=%s)" old-pos pos))
- (when dump2
- (msgtrc "parse-partial-sexp %s %s nil nil %s" old-pos pos old-ppss))
- (setq ret-val (parse-partial-sexp old-pos pos nil nil old-ppss)))))
- (when dump2 (msgtrc " ==>ret-val=%s" ret-val))
- ;;(mumamo-backtrace "syntax-ppss")
- (setq ad-return-value ret-val))
- (overlay-put chunk-at-pos 'syntax-ppss-last syntax-ppss-last)
- (overlay-put chunk-at-pos 'syntax-ppss-cache syntax-ppss-cache)
- (overlay-put chunk-at-pos 'syntax-ppss-stats syntax-ppss-stats)
- )
- ad-do-it)))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; rng-valid.el support
-
-;; Fix-me: The solution in this defadvice is temporary. The defadvice
-;; for rng-do-some-validation should be fixed instead.
-;; (ad-disable-advice 'rng-mark-error 'around 'mumamo-ad-rng-mark-error)
-;; (ad-ensable-advice 'rng-mark-error 'around 'mumamo-ad-rng-mark-error)
-(defadvice rng-mark-error (around
- mumamo-ad-rng-mark-error
- activate
- compile)
- "Adjust range for error to chunks."
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (let* ((beg (ad-get-arg 1))
- (end (ad-get-arg 2))
- (xml-parts nil)
- (chunk (mumamo-find-chunks beg "rng-mark-error")))
- (if (not chunk)
- ad-do-it
- (when (and (not (overlay-get chunk 'mumamo-region))
- (mumamo-valid-nxml-chunk chunk))
- ;; rng-error
- (let ((part-beg (max (overlay-start chunk)
- beg))
- (part-end (min (overlay-end chunk)
- end)))
- (when (< part-beg part-end)
- (ad-set-arg 1 part-beg)
- (ad-set-arg 2 part-end)
- ad-do-it)))))))
-
-(defadvice rng-do-some-validation-1 (around
- mumamo-ad-rng-do-some-validation-1
- activate
- compile)
- "Adjust validation to chunks."
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (let (major-mode-chunk
- (point-max (1+ (buffer-size))) ;(save-restriction (widen) (point-max)))
- end-major-mode-chunk
- (limit (+ rng-validate-up-to-date-end
- rng-validate-chunk-size))
- (remove-start rng-validate-up-to-date-end)
- (next-cache-point (+ (point) rng-state-cache-distance))
- (continue t)
- (xmltok-dtd rng-dtd)
- have-remaining-chars
- xmltok-type
- xmltok-start
- xmltok-name-colon
- xmltok-name-end
- xmltok-replacement
- xmltok-attributes
- xmltok-namespace-attributes
- xmltok-dependent-regions
- xmltok-errors
- (while-n1 0)
- (while-n2 0)
- (old-point -1)
- )
- ;;(msgtrc "> > > > > enter rng-do-some-validation-1, continue-p-function=%s" continue-p-function)
- (setq have-remaining-chars (< (point) point-max))
- (when (and continue (= (point) 1))
- (let ((regions (xmltok-forward-prolog)))
- (rng-clear-overlays 1 (point))
- (while regions
- (when (eq (aref (car regions) 0) 'encoding-name)
- (rng-process-encoding-name (aref (car regions) 1)
- (aref (car regions) 2)))
- (setq regions (cdr regions))))
- (unless (equal rng-dtd xmltok-dtd)
- (rng-clear-conditional-region))
- (setq rng-dtd xmltok-dtd))
- (setq while-n1 0)
- (while (and (mumamo-while 2000 'while-n1 "continue")
- (/= old-point (point))
- continue)
- (setq old-point (point))
- ;; If mumamo (or something similar) is used then jump over parts
- ;; that can not be parsed by nxml-mode.
- (when (and rng-get-major-mode-chunk-function
- rng-valid-nxml-major-mode-chunk-function
- rng-end-major-mode-chunk-function)
- (let ((here (point))
- next-non-space-pos)
- (skip-chars-forward " \t\r\n")
- (setq next-non-space-pos (point))
- (goto-char here)
- (unless (and end-major-mode-chunk
- ;; Remaining chars in this chunk?
- (< next-non-space-pos end-major-mode-chunk))
- (setq end-major-mode-chunk nil)
- (setq major-mode-chunk (funcall rng-get-major-mode-chunk-function next-non-space-pos "rng-do-some-validation-1 A"))
- (setq while-n2 0)
- (while (and (mumamo-while 500 'while-n2 "major-mode-chunk")
- major-mode-chunk
- (not (funcall rng-valid-nxml-major-mode-chunk-function major-mode-chunk))
- (< next-non-space-pos (point-max)))
- ;;(msgtrc "next-non-space-pos=%s, cb=%s" next-non-space-pos (current-buffer))
- (let ((end-pos (funcall rng-end-major-mode-chunk-function major-mode-chunk)))
- ;; fix-me: The problem here is that
- ;; mumamo-find-chunks can return a 0-length chunk.
- ;;(goto-char (+ end-pos 0))
- (goto-char (+ end-pos (if (= end-pos (point)) 1 0)))
- (setq major-mode-chunk (funcall rng-get-major-mode-chunk-function (point) "rng-do-some-validation-1 B"))
- ;;(message "---> here 3, point=%s, ep=%s, mm-chunk=%s" (point) end-pos major-mode-chunk)
- )
- (setq next-non-space-pos (point))))
- ;; Stop parsing if we do not have a chunk here yet.
- ;;(message "major-mode-chunk=%s" major-mode-chunk)
- ;;(message "rng-valid-nxml-major-mode-chunk-function=%s" rng-valid-nxml-major-mode-chunk-function)
- (setq continue (and major-mode-chunk
- (funcall rng-valid-nxml-major-mode-chunk-function major-mode-chunk)))
- ;;(unless continue (message "continue=nil, no major-mode-chunk"))
- (when continue
- ;;(message " continue=t")
- (setq end-major-mode-chunk (funcall rng-end-major-mode-chunk-function major-mode-chunk)))))
-
- (when continue
- ;; Narrow since rng-forward will continue into next chunk
- ;; even if limit is at chunk end.
- (if t
- (progn
- ;;(message "before rng-forward, point=%s" (point))
- (setq have-remaining-chars (rng-forward end-major-mode-chunk))
- ;;(message "after rng-forward, point=%s" (point))
- )
- ;; Fix-me: Validation does not work when narrowing because
- ;; some state variables values seems to be lost. Probably
- ;; looking at `rng-validate-prepare' will tell what to do.
- (save-restriction
- (when (and end-major-mode-chunk
- (< (point-min) end-major-mode-chunk))
- (narrow-to-region (point-min) end-major-mode-chunk))
- (setq have-remaining-chars (rng-forward end-major-mode-chunk)))
- (unless (> end-major-mode-chunk (point))
- ;;(setq have-remaining-chars t)
- (goto-char end-major-mode-chunk))
- )
- ;;(message "end-major-mode-chunk=%s, rng-validate-up-to-date-end=%s" end-major-mode-chunk rng-validate-up-to-date-end)
- (setq have-remaining-chars (< (point) point-max))
- ;;(unless have-remaining-chars (message "*** here have-remaining-chars=%s, p=%s/%s" have-remaining-chars (point) point-max))
- (let ((pos (point)))
- (when end-major-mode-chunk
- ;; Fix-me: Seems like we need a new initialization (or why
- ;; do we otherwise hang without this?)
- (and (> limit end-major-mode-chunk) (setq limit end-major-mode-chunk)))
- (setq continue
- (and have-remaining-chars
- continue
- (or (< pos limit)
- (and continue-p-function
- (funcall continue-p-function)
- (setq limit (+ limit rng-validate-chunk-size))
- t))))
- ;;(unless continue (message "continue=nil, why?: %s<%s, %s" pos limit (when continue-p-function (funcall continue-p-function))))
- (cond ((and rng-conditional-up-to-date-start
- ;; > because we are getting the state from (1- pos)
- (> pos rng-conditional-up-to-date-start)
- (< pos rng-conditional-up-to-date-end)
- (rng-state-matches-current (get-text-property (1- pos)
- 'rng-state)))
- (when (< remove-start (1- pos))
- (rng-clear-cached-state remove-start (1- pos)))
- ;; sync up with cached validation state
- (setq continue nil)
- ;; do this before settting rng-validate-up-to-date-end
- ;; in case we get a quit
- (rng-mark-xmltok-errors)
- (rng-mark-xmltok-dependent-regions)
- (setq rng-validate-up-to-date-end
- (marker-position rng-conditional-up-to-date-end))
- (rng-clear-conditional-region)
- (setq have-remaining-chars
- (< rng-validate-up-to-date-end point-max))
- ;;(unless have-remaining-chars (message "have-remaining-chars=%s rng-validate-up-to-date-end=%s, point-max=%s" have-remaining-chars rng-validate-up-to-date-end point-max))
- )
- ((or (>= pos next-cache-point)
- (not continue))
- (setq next-cache-point (+ pos rng-state-cache-distance))
- (rng-clear-cached-state remove-start pos)
- (when have-remaining-chars
- ;;(message "rng-cach-state (1- %s)" pos)
- (rng-cache-state (1- pos)))
- (setq remove-start pos)
- (unless continue
- ;; if we have just blank chars skip to the end
- (when have-remaining-chars
- (skip-chars-forward " \t\r\n")
- (when (= (point) point-max)
- (rng-clear-overlays pos (point))
- (rng-clear-cached-state pos (point))
- (setq have-remaining-chars nil)
- ;;(message "have-remaining-chars => nil, cause (point) = point-max")
- (setq pos (point))))
- (when (not have-remaining-chars)
- (rng-process-end-document))
- (rng-mark-xmltok-errors)
- (rng-mark-xmltok-dependent-regions)
- (setq rng-validate-up-to-date-end pos)
- (when rng-conditional-up-to-date-end
- (cond ((<= rng-conditional-up-to-date-end pos)
- (rng-clear-conditional-region))
- ((< rng-conditional-up-to-date-start pos)
- (set-marker rng-conditional-up-to-date-start
- pos))))))))))
- ;;(message "--- exit rng-do-some-validation-1, have-remaining-chars=%s" have-remaining-chars)
- (setq have-remaining-chars (< (point) point-max))
- (setq ad-return-value have-remaining-chars))))
-
-(defadvice rng-after-change-function (around
- mumamo-ad-rng-after-change-function
- activate
- compile)
- (when rng-validate-up-to-date-end
- ad-do-it))
-
-(defadvice rng-validate-while-idle (around
- mumamo-ad-rng-validate-while-idle
- activate
- compile)
- (if (not (buffer-live-p buffer))
- (rng-kill-timers)
- ad-do-it))
-
-(defadvice rng-validate-quick-while-idle (around
- mumamo-ad-rng-validate-quick-while-idle
- activate
- compile)
- (if (not (buffer-live-p buffer))
- (rng-kill-timers)
- ad-do-it))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; xmltok.el
-
-;; (ad-disable-advice 'xmltok-add-error 'around 'mumamo-ad-xmltok-add-error)
-;; (ad-ensable-advice 'xmltok-add-error 'around 'mumamo-ad-xmltok-add-error)
-(defadvice xmltok-add-error (around
- mumamo-ad-xmltok-add-error
- activate
- compile
- )
- "Prevent rng validation errors in non-xml chunks.
-This advice only prevents adding nxml/rng-valid errors in non-xml
-chunks. Doing more seems like a very big job - unless Emacs gets
-a narrow-to-multiple-regions function!"
- (if (not mumamo-multi-major-mode)
- ad-do-it
- ;;(error "xmltok-add-error: %S" (with-output-to-string (backtrace)))
- (when (let* ((start (or start xmltok-start))
- (end (or end (point)))
- (chunk (mumamo-find-chunks (if start start end) "xmltok-add-error"))
- )
- (or (not chunk)
- (and (not (overlay-get chunk 'mumamo-region))
- (mumamo-valid-nxml-chunk chunk))))
- (setq xmltok-errors
- (cons (xmltok-make-error message
- (or start xmltok-start)
- (or end (point)))
- xmltok-errors)))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Maybe activate advices
-
-;; Fix-me: This assumes there are no other advices on these functions.
-(if t
- (progn
- ;; (ad-activate 'syntax-ppss)
- ;; (ad-activate 'syntax-ppss-flush-cache)
- ;; (ad-activate 'syntax-ppss-stats)
- ;; (ad-activate 'rng-do-some-validation-1)
- ;; (ad-activate 'rng-mark-error)
- ;; (ad-activate 'xmltok-add-error)
- (ad-enable-advice 'syntax-ppss 'around 'mumamo-ad-syntax-ppss)
- (ad-enable-advice 'syntax-ppss-flush-cache 'around 'mumamo-ad-syntax-ppss-flush-cache)
- (ad-enable-advice 'syntax-ppss-stats 'around 'mumamo-ad-syntax-ppss-stats)
- (ad-enable-advice 'rng-do-some-validation-1 'around 'mumamo-ad-rng-do-some-validation-1)
- (ad-enable-advice 'rng-mark-error 'around 'mumamo-ad-rng-mark-error)
- (ad-enable-advice 'rng-after-change-function 'around 'mumamo-ad-rng-after-change-function)
- (ad-enable-advice 'rng-validate-while-idle 'around 'mumamo-ad-rng-validate-while-idle)
- (ad-enable-advice 'rng-validate-quick-while-idle 'around 'mumamo-ad-rng-validate-quick-while-idle)
- (ad-enable-advice 'xmltok-add-error 'around 'mumamo-ad-xmltok-add-error)
- )
- ;; (ad-deactivate 'syntax-ppss)
- ;; (ad-deactivate 'syntax-ppss-flush-cache)
- ;; (ad-deactivate 'syntax-ppss-stats)
- ;; (ad-deactivate 'rng-do-some-validation-1)
- ;; (ad-deactivate 'rng-mark-error)
- ;; (ad-deactivate 'xmltok-add-error)
- (ad-disable-advice 'syntax-ppss 'around 'mumamo-ad-syntax-ppss)
- (ad-disable-advice 'syntax-ppss-flush-cache 'around 'mumamo-ad-syntax-ppss-flush-cache)
- (ad-disable-advice 'syntax-ppss-stats 'around 'mumamo-ad-syntax-ppss-stats)
- (ad-disable-advice 'rng-do-some-validation-1 'around 'mumamo-ad-rng-do-some-validation-1)
- (ad-disable-advice 'rng-mark-error 'around 'mumamo-ad-rng-mark-error)
- (ad-disable-advice 'rng-after-change-function 'around 'mumamo-ad-rng-after-change-function)
- (ad-disable-advice 'rng-validate-while-idle 'around 'mumamo-ad-rng-validate-while-idle)
- (ad-disable-advice 'rng-validate-quick-while-idle 'around 'mumamo-ad-rng-validate-quick-while-idle)
- (ad-disable-advice 'xmltok-add-error 'around 'mumamo-ad-xmltok-add-error)
- )
-
-(font-lock-add-keywords
- 'emacs-lisp-mode
- '(("\\<define-mumamo-multi-major-mode\\>" . font-lock-keyword-face)))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Simple defadvice to move into Emacs later
-
-(defun mumamo-ad-desktop-buffer-info (buffer)
- (set-buffer buffer)
- (list
- ;; base name of the buffer; replaces the buffer name if managed by uniquify
- (and (fboundp 'uniquify-buffer-base-name) (uniquify-buffer-base-name))
- ;; basic information
- (desktop-file-name (buffer-file-name) desktop-dirname)
- (buffer-name)
- (if mumamo-multi-major-mode mumamo-multi-major-mode major-mode)
- ;; minor modes
- (let (ret)
- (mapc
- #'(lambda (minor-mode)
- (and (boundp minor-mode)
- (symbol-value minor-mode)
- (let* ((special (assq minor-mode desktop-minor-mode-table))
- (value (cond (special (cadr special))
- ((functionp minor-mode) minor-mode))))
- (when value (add-to-list 'ret value)))))
- (mapcar #'car minor-mode-alist))
- ret)
- ;; point and mark, and read-only status
- (point)
- (list (mark t) mark-active)
- buffer-read-only
- ;; auxiliary information
- (when (functionp desktop-save-buffer)
- (funcall desktop-save-buffer desktop-dirname))
- ;; local variables
- (let ((locals desktop-locals-to-save)
- (loclist (buffer-local-variables))
- (ll))
- (while locals
- (let ((here (assq (car locals) loclist)))
- (if here
- (setq ll (cons here ll))
- (when (member (car locals) loclist)
- (setq ll (cons (car locals) ll)))))
- (setq locals (cdr locals)))
- ll)))
-
-(defadvice desktop-buffer-info (around
- mumamo-ad-desktop-buffer-info
- activate
- compile)
- (setq ad-return-value (mumamo-ad-desktop-buffer-info (ad-get-arg 0))))
-
-(defun mumamo-ad-set-auto-mode-0 (mode &optional keep-mode-if-same)
- "Apply MODE and return it.
-If optional arg KEEP-MODE-IF-SAME is non-nil, MODE is chased of
-any aliases and compared to current major mode. If they are the
-same, do nothing and return nil."
- (unless (and keep-mode-if-same
- (eq (indirect-function mode)
- (if mumamo-multi-major-mode
- (indirect-function mumamo-multi-major-mode)
- (indirect-function major-mode))))
- (when mode
- (funcall mode)
- mode)))
-
-(defadvice set-auto-mode-0 (around
- mumamo-ad-set-auto-mode-0
- activate
- compile)
- (setq ad-return-value (mumamo-ad-set-auto-mode-0 (ad-get-arg 0)
- (ad-get-arg 1)
- )))
-
-
-
-(defvar mumamo-sgml-get-context-last-close nil
- "Last close tag start.
-Only used for outermost level.")
-
-(defun mumamo-sgml-get-context (&optional until)
- "Determine the context of the current position.
-By default, parse until we find a start-tag as the first thing on a line.
-If UNTIL is `empty', return even if the context is empty (i.e.
-we just skipped over some element and got to a beginning of line).
-
-The context is a list of tag-info structures. The last one is the tag
-immediately enclosing the current position.
-
-Point is assumed to be outside of any tag. If we discover that it's
-not the case, the first tag returned is the one inside which we are."
- (let ((here (point))
- (stack nil)
- (ignore nil)
- (context nil)
- tag-info
- last-close)
- ;; CONTEXT keeps track of the tag-stack
- ;; STACK keeps track of the end tags we've seen (and thus the start-tags
- ;; we'll have to ignore) when skipping over matching open..close pairs.
- ;; IGNORE is a list of tags that can be ignored because they have been
- ;; closed implicitly.
- ;; LAST-CLOSE is last close tag that can be useful for indentation
- ;; when on outermost level.
- (skip-chars-backward " \t\n") ; Make sure we're not at indentation.
- (while
- (and (not (eq until 'now))
- (or stack
- (not (if until (eq until 'empty) context))
- (not (sgml-at-indentation-p))
- (and context
- (/= (point) (sgml-tag-start (car context)))
- (sgml-unclosed-tag-p (sgml-tag-name (car context)))))
- (setq tag-info (ignore-errors (sgml-parse-tag-backward))))
-
- ;; This tag may enclose things we thought were tags. If so,
- ;; discard them.
- (while (and context
- (> (sgml-tag-end tag-info)
- (sgml-tag-end (car context))))
- (setq context (cdr context)))
-
- (cond
- ((> (sgml-tag-end tag-info) here)
- ;; Oops!! Looks like we were not outside of any tag, after all.
- (push tag-info context)
- (setq until 'now))
-
- ;; start-tag
- ((eq (sgml-tag-type tag-info) 'open)
- (when (and (null stack)
- last-close)
- (setq last-close 'no-use))
- (cond
- ((null stack)
- (if (assoc-string (sgml-tag-name tag-info) ignore t)
- ;; There was an implicit end-tag.
- nil
- (push tag-info context)
- ;; We're changing context so the tags implicitly closed inside
- ;; the previous context aren't implicitly closed here any more.
- ;; [ Well, actually it depends, but we don't have the info about
- ;; when it doesn't and when it does. --Stef ]
- (setq ignore nil)))
- ((eq t (compare-strings (sgml-tag-name tag-info) nil nil
- (car stack) nil nil t))
- (setq stack (cdr stack)))
- (t
- ;; The open and close tags don't match.
- (if (not sgml-xml-mode)
- (unless (sgml-unclosed-tag-p (sgml-tag-name tag-info))
- (message "Unclosed tag <%s>" (sgml-tag-name tag-info))
- (let ((tmp stack))
- ;; We could just assume that the tag is simply not closed
- ;; but it's a bad assumption when tags *are* closed but
- ;; not properly nested.
- (while (and (cdr tmp)
- (not (eq t (compare-strings
- (sgml-tag-name tag-info) nil nil
- (cadr tmp) nil nil t))))
- (setq tmp (cdr tmp)))
- (if (cdr tmp) (setcdr tmp (cddr tmp)))))
- (message "Unmatched tags <%s> and </%s>"
- (sgml-tag-name tag-info) (pop stack)))))
-
- (if (and (null stack) (sgml-unclosed-tag-p (sgml-tag-name tag-info)))
- ;; This is a top-level open of an implicitly closed tag, so any
- ;; occurrence of such an open tag at the same level can be ignored
- ;; because it's been implicitly closed.
- (push (sgml-tag-name tag-info) ignore)))
-
- ;; end-tag
- ((eq (sgml-tag-type tag-info) 'close)
- (if (sgml-empty-tag-p (sgml-tag-name tag-info))
- (message "Spurious </%s>: empty tag" (sgml-tag-name tag-info))
- ;; Keep track of last close if context will return nil
- (when (and (not last-close)
- (null stack)
- (> here (point-at-eol))
- (let ((here (point)))
- (goto-char (sgml-tag-start tag-info))
- (skip-chars-backward " \t")
- (prog1
- (bolp)
- (goto-char here))))
- (setq last-close tag-info))
-
- (push (sgml-tag-name tag-info) stack)))
- ))
-
- ;; return context
- (setq mumamo-sgml-get-context-last-close
- (when (and last-close
- (not (eq last-close 'no-use)))
- (sgml-tag-start last-close)))
- context))
-
-(defadvice sgml-get-context (around
- mumamo-ad-sgml-get-context
- activate
- compile)
- (setq ad-return-value (mumamo-sgml-get-context (ad-get-arg 0))))
-
-(defun mumamo-sgml-calculate-indent (&optional lcon)
- "Calculate the column to which this line should be indented.
-LCON is the lexical context, if any."
- (unless lcon (setq lcon (sgml-lexical-context)))
-
- ;; Indent comment-start markers inside <!-- just like comment-end markers.
- (if (and (eq (car lcon) 'tag)
- (looking-at "--")
- (save-excursion (goto-char (cdr lcon)) (looking-at "<!--")))
- (setq lcon (cons 'comment (+ (cdr lcon) 2))))
-
- (case (car lcon)
-
- (string
- ;; Go back to previous non-empty line.
- (while (and (> (point) (cdr lcon))
- (zerop (forward-line -1))
- (looking-at "[ \t]*$")))
- (if (> (point) (cdr lcon))
- ;; Previous line is inside the string.
- (current-indentation)
- (goto-char (cdr lcon))
- (1+ (current-column))))
-
- (comment
- (let ((mark (looking-at "--")))
- ;; Go back to previous non-empty line.
- (while (and (> (point) (cdr lcon))
- (zerop (forward-line -1))
- (or (looking-at "[ \t]*$")
- (if mark (not (looking-at "[ \t]*--"))))))
- (if (> (point) (cdr lcon))
- ;; Previous line is inside the comment.
- (skip-chars-forward " \t")
- (goto-char (cdr lcon))
- ;; Skip `<!' to get to the `--' with which we want to align.
- (search-forward "--")
- (goto-char (match-beginning 0)))
- (when (and (not mark) (looking-at "--"))
- (forward-char 2) (skip-chars-forward " \t"))
- (current-column)))
-
- ;; We don't know how to indent it. Let's be honest about it.
- (cdata nil)
- ;; We don't know how to indent it. Let's be honest about it.
- (pi nil)
-
- (tag
- (goto-char (1+ (cdr lcon)))
- (skip-chars-forward "^ \t\n") ;Skip tag name.
- (skip-chars-forward " \t")
- (if (not (eolp))
- (current-column)
- ;; This is the first attribute: indent.
- (goto-char (1+ (cdr lcon)))
- (+ (current-column) sgml-basic-offset)))
-
- (text
- (while (looking-at "</")
- (forward-sexp 1)
- (skip-chars-forward " \t"))
- (let* ((here (point))
- (unclosed (and ;; (not sgml-xml-mode)
- (looking-at sgml-tag-name-re)
- (assoc-string (match-string 1)
- sgml-unclosed-tags 'ignore-case)
- (match-string 1)))
- (context
- ;; If possible, align on the previous non-empty text line.
- ;; Otherwise, do a more serious parsing to find the
- ;; tag(s) relative to which we should be indenting.
- (if (and (not unclosed) (skip-chars-backward " \t")
- (< (skip-chars-backward " \t\n") 0)
- (back-to-indentation)
- (> (point) (cdr lcon)))
- nil
- (goto-char here)
- (nreverse (sgml-get-context (if unclosed nil 'empty)))))
- (there (point)))
- ;; Ignore previous unclosed start-tag in context.
- (while (and context unclosed
- (eq t (compare-strings
- (sgml-tag-name (car context)) nil nil
- unclosed nil nil t)))
- (setq context (cdr context)))
- ;; Indent to reflect nesting.
- (cond
- ;; If we were not in a text context after all, let's try again.
- ((and context (> (sgml-tag-end (car context)) here))
- (goto-char here)
- (sgml-calculate-indent
- (cons (if (memq (sgml-tag-type (car context)) '(comment cdata))
- (sgml-tag-type (car context)) 'tag)
- (sgml-tag-start (car context)))))
- ;; Align on the first element after the nearest open-tag, if any.
- ((and context
- (goto-char (sgml-tag-end (car context)))
- (skip-chars-forward " \t\n")
- (< (point) here) (sgml-at-indentation-p))
- (current-column))
- (t
- (goto-char (or (and (null context)
- mumamo-sgml-get-context-last-close)
- there))
- (+ (current-column)
- (* sgml-basic-offset (length context)))))))
-
- (otherwise
- (error "Unrecognized context %s" (car lcon)))
-
- ))
-
-(defadvice sgml-calculate-indent (around
- mumamo-ad-sgml-calculate-indent
- activate
- compile)
- (setq ad-return-value (mumamo-sgml-calculate-indent (ad-get-arg 0))))
-
-(defadvice python-eldoc-function (around
- mumamo-ad-python-eldoc-function
- activate
- compile)
- (if (not mumamo-multi-major-mode)
- ad-do-it
- (let ((here (point)))
- (unwind-protect
- (save-restriction
- (mumamo-narrow-to-chunk-inner)
- ad-do-it)
- (goto-char here)))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; The END
-;;(when buffer-file-name (message "Finished evaluating %s" buffer-file-name))
-;;(when load-file-name (message "Finished loading %s" load-file-name))
-
-(provide 'mumamo)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; mumamo.el ends bere
diff --git a/emacs.d/nxhtml/util/n-back.el b/emacs.d/nxhtml/util/n-back.el
deleted file mode 100644
index 024b8e6..0000000
--- a/emacs.d/nxhtml/util/n-back.el
+++ /dev/null
@@ -1,1296 +0,0 @@
-;;; n-back.el --- n-back game
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-05-23 Sat
-(defconst n-back:version "0.5");; Version:
-;; Last-Updated: 2009-08-04 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `winsize'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; n-back game for brain training. See `n-back-game' for more
-;; information.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(eval-when-compile (require 'viper))
-
-;; (setq n-back-trials 2)
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'nxhtml-base nil t))
-(eval-when-compile (require 'nxhtml-web-vcs nil t))
-(require 'winsize nil t) ;; Ehum...
-
-(defvar n-back-game-window nil)
-(defvar n-back-game-buffer nil)
-
-(defvar n-back-ctrl-window nil)
-(defvar n-back-ctrl-buffer nil)
-
-(defvar n-back-info-window nil)
-(defvar n-back-info-buffer nil)
-
-(defvar n-back-trials-left nil)
-(defvar n-back-timer nil)
-(defvar n-back-clear-timer nil)
-
-(defvar n-back-result nil)
-(defvar n-back-this-result nil)
-
-(defvar n-back-ring nil)
-
-(defvar n-back-num-active nil)
-
-
-;;;###autoload
-(defgroup n-back nil
- "Customizations for `n-back-game' game."
- :group 'games)
-
-(defgroup n-back-feel nil
- "Customizations for `n-back-game' game keys, faces etc."
- :group 'n-back)
-
-(defface n-back-ok
- '((t (:foreground "black" :background "green")))
- "Face for OK answer."
- :group 'n-back-feel)
-
-(defface n-back-bad
- '((t (:foreground "black" :background "OrangeRed1")))
- "Face for bad answer."
- :group 'n-back-feel)
-
-(defface n-back-hint
- '((t (:foreground "black" :background "gold")))
- "Face for bad answer."
- :group 'n-back-feel)
-
-(defface n-back-do-now
- '((((background dark)) (:foreground "yellow"))
- (t (:foreground "blue")))
- "Face for start and stop hints."
- :group 'n-back-feel)
-
-(defface n-back-game-word
- '((t (:foreground "black")))
- "Face for word displayed in game."
- :group 'n-back-feel)
-
-(defface n-back-header
- '((((background dark)) (:background "OrangeRed4"))
- (t (:background "gold")))
- "Face for headers."
- :group 'n-back-feel)
-
-(defface n-back-keybinding
- '((((background dark)) (:background "purple4"))
- (t (:background "OliveDrab1")))
- "Face for key bindings."
- :group 'n-back-feel)
-
-(defface n-back-last-result
- '((((background dark)) (:background "OliveDrab4"))
- (t (:background "yellow")))
- "Face for last game result header."
- :group 'n-back-feel)
-
-(defface n-back-welcome
- '((((background dark)) (:foreground "OliveDrab3"))
- (t (:foreground "OliveDrab4")))
- "Face for welcome string"
- :group 'n-back-feel)
-
-(defface n-back-welcome-header
- '((t (:height 2.0)))
- "Face for welcome header."
- :group 'n-back-feel)
-
-(defcustom n-back-level 1
- "The n-Back level."
- :type '(radio (const 1)
- (const 2)
- (const 3)
- (const 4))
- :set (lambda (sym val)
- (set-default sym val)
- (when (featurep 'n-back)
- (n-back-update-control-buffer)
- (n-back-update-info)))
- :group 'n-back)
-
-(defcustom n-back-active-match-types '(position color sound)
- "Active match types."
- :type '(set (const position)
- (const color)
- (const sound)
- (const word))
- :set (lambda (sym val)
- (set-default sym val)
- (setq n-back-num-active (length val))
- (when (featurep 'n-back)
- (n-back-init-control-status)
- (n-back-update-control-buffer)
- (n-back-update-info)))
- :group 'n-back)
-
-(defcustom n-back-allowed-match-types '(position color sound word)
- "Match types allowed in auto challenging."
- :type '(set (const position)
- (const color)
- (const sound)
- (const word))
- :set (lambda (sym val)
- (set-default sym val)
- (when (featurep 'n-back)
- (n-back-set-random-match-types (length n-back-active-match-types) nil)
- (n-back-init-control-status)
- (n-back-update-control-buffer)
- (n-back-update-info)))
- :group 'n-back)
-
-(defcustom n-back-auto-challenge t
- "Automatic challenge decrease/increase."
- :type 'boolean
- :group 'n-back)
-
-(defun n-back-toggle-auto-challenge ()
- "Toggle `n-back-auto-challenge'."
- (interactive)
- (let ((val (not n-back-auto-challenge)))
- (customize-set-variable 'n-back-auto-challenge val)
- (customize-set-value 'n-back-auto-challenge val)))
-
-(defcustom n-back-colors
- '("gold" "orange red" "lawn green" "peru" "pink" "gray" "light blue")
- "Random colors to display."
- :type '(repeat color)
- :group 'n-back)
-
-(defcustom n-back-words "you cat going me forest crying brown"
- "Random words to display."
- :type 'string
- :group 'n-back)
-
-(defcustom n-back-sound-volume 0.2
- "Sound volume 0-1."
- :type 'float
- :group 'n-back-feel)
-
-(defcustom n-back-sounds '("c:/program files/brain workshop/res" "piano-")
- "Random sounds location."
- :type '(list (directory :tag "Directory")
- (regexp :tag "File name regexp"))
- :group 'n-back)
-
-(defcustom n-back-keys
- '(
- [?p]
- [?c]
- [?s]
- [?w]
- )
- "Key bindings for answering."
- :type '(list
- (key-sequence :tag "position key")
- (key-sequence :tag "color key")
- (key-sequence :tag "sound key")
- (key-sequence :tag "word key")
- )
- ;; :set (lambda (sym val)
- ;; (set-default sym val)
- ;; (n-back-make-keymap))
- :group 'n-back-feel)
-
-(defvar n-back-control-mode-map nil)
-
-(defun n-back-key-binding (what)
- "Return key binding used for WHAT match answers."
- (nth
- (case what
- (position 0)
- (color 1)
- (sound 2)
- (word 3))
- n-back-keys))
-
-(defun n-back-make-keymap ()
- "Make keymap for the game."
- (let ((map (make-sparse-keymap)))
- (define-key map [?1] 'n-back-change-level)
- (define-key map [?2] 'n-back-change-level)
- (define-key map [?3] 'n-back-change-level)
- (define-key map [?4] 'n-back-change-level)
- (define-key map [?5] 'n-back-change-level)
- (define-key map [?6] 'n-back-change-level)
- (define-key map [??] 'n-back-help)
- (define-key map [?\ ] 'n-back-play)
- (define-key map [(control ?g)] 'n-back-stop)
- (define-key map [?-] 'n-back-decrease-speed)
- (define-key map [?+] 'n-back-increase-speed)
-
- (define-key map [(control ?r)] 'n-back-reset-game-to-saved)
- (define-key map [(control ?s)] 'n-back-save-game-settings)
-
- (define-key map [?t ?p] 'n-back-toggle-position)
- (define-key map [?t ?c] 'n-back-toggle-color)
- (define-key map [?t ?s] 'n-back-toggle-sound)
- (define-key map [?t ?w] 'n-back-toggle-word)
-
- (define-key map [?T ?a] 'n-back-toggle-auto-challenge)
- (define-key map [up] 'n-back-challenge-up)
- (define-key map [down] 'n-back-challenge-down)
-
- (define-key map [?T ?p] 'n-back-toggle-allowed-position)
- (define-key map [?T ?c] 'n-back-toggle-allowed-color)
- (define-key map [?T ?s] 'n-back-toggle-allowed-sound)
- (define-key map [?T ?w] 'n-back-toggle-allowed-word)
-
- (define-key map (n-back-key-binding 'position) 'n-back-position-answer)
- (define-key map (n-back-key-binding 'color) 'n-back-color-answer)
- (define-key map (n-back-key-binding 'sound) 'n-back-sound-answer)
- (define-key map (n-back-key-binding 'word) 'n-back-word-answer)
- ;;(define-key map [t] 'ignore)
- (setq n-back-control-mode-map map)))
-
-(defvar n-back-display-hint nil)
-(defcustom n-back-hint t
- "Display hints - learning mode."
- :type 'boolean
- :group 'n-back)
-
-
-
-(defvar n-back-sound-files nil)
-;;(n-back-get-sound-files)
-(defun n-back-get-sound-files ()
- "Get sound file names."
- (let ((dir (nth 0 n-back-sounds))
- (regexp (nth 1 n-back-sounds)))
- (when (file-directory-p dir)
- (setq n-back-sound-files (directory-files dir nil regexp)))))
-
-(defun n-back-toggle-position ()
- "Toggle use of position in `n-back-active-match-types'."
- (interactive)
- (n-back-toggle 'position))
-
-(defun n-back-toggle-color ()
- "Toggle use of color in `n-back-active-match-types'."
- (interactive)
- (n-back-toggle 'color))
-
-(defun n-back-toggle-sound ()
- "Toggle use of sound in `n-back-active-match-types'."
- (interactive)
- (n-back-toggle 'sound))
-
-(defun n-back-toggle-word ()
- "Toggle use of word in `n-back-active-match-types'."
- (interactive)
- (n-back-toggle 'word))
-
-(defun n-back-toggle (match-type)
- "Toggle use of MATCH-TYPE in `n-back-active-match-types'."
- (n-back-toggle-1 match-type 'n-back-active-match-types))
-
-(defun n-back-toggle-allowed-position ()
- "Toggle use of position in `n-back-allowed-match-types'."
- (interactive)
- (n-back-toggle-allowed 'position))
-
-(defun n-back-toggle-allowed-color ()
- "Toggle use of color in `n-back-allowed-match-types'."
- (interactive)
- (n-back-toggle-allowed 'color))
-
-(defun n-back-toggle-allowed-sound ()
- "Toggle use of sound in `n-back-allowed-match-types'."
- (interactive)
- (n-back-toggle-allowed 'sound))
-
-(defun n-back-toggle-allowed-word ()
- "Toggle use of word in `n-back-allowed-match-types'."
- (interactive)
- (n-back-toggle-allowed 'word))
-
-(defun n-back-toggle-allowed (match-type)
- "Toggle use of MATCH-TYPE in `n-back-allowed-match-types'."
- (n-back-toggle-1 match-type 'n-back-allowed-match-types))
-
-(defun n-back-sort-types (types)
- "Sort TYPES to order used in defcustoms here."
- (sort types
- (lambda (a b)
- (let ((all '(position color sound word)))
- (< (length (memq a all))
- (length (memq b all)))))))
-
-(defun n-back-toggle-1 (match-type active-list-sym)
- "Toggle use of MATCH-TYPE in list ACTIVE-LIST-SYM."
- (let (active-types)
- (if (memq match-type (symbol-value active-list-sym))
- (setq active-types (delq match-type (symbol-value active-list-sym)))
- (setq active-types (cons match-type (symbol-value active-list-sym))))
- (setq active-types (n-back-sort-types active-types))
- (customize-set-variable active-list-sym active-types)
- (customize-set-value active-list-sym active-types)))
-
-(defcustom n-back-sec-per-trial 3.0
- "Seconds per trial."
- :type 'float
- :set (lambda (sym val)
- (set-default sym val)
- (when (featurep 'n-back)
- (n-back-update-info)))
- :group 'n-back)
-
-(defun n-back-decrease-speed ()
- "Decrease speed of trials."
- (interactive)
- (setq n-back-sec-per-trial (+ n-back-sec-per-trial 0.25))
- (when (> n-back-sec-per-trial 5.0)
- (setq n-back-sec-per-trial 5.0))
- (n-back-update-info))
-
-(defun n-back-increase-speed ()
- "Increase speed of trials."
- (interactive)
- (let ((sec (- n-back-sec-per-trial 0.25)))
- (when (< sec 1.0)
- (setq sec 1.0))
- (customize-set-variable 'n-back-sec-per-trial sec)
- (customize-set-value 'n-back-sec-per-trial sec)))
-
-(defun n-back-help ()
- "Show help for `n-back-game' game."
- (interactive)
- (save-selected-window
- (describe-function 'n-back-game)))
-
-(defun n-back-change-level (level)
- "Change n-Back level to LEVEL."
- (interactive (progn
- (if (and (numberp last-input-event)
- (>= last-input-event ?1)
- (<= last-input-event ?9))
- (list (- last-input-event ?0))
- (list (string-to-number (read-string "n Back: "))))))
- (customize-set-variable 'n-back-level level)
- (customize-set-value 'n-back-level level))
-
-(defvar n-back-frame nil)
-
-;;;###autoload
-(defun n-back-game ()
- "Emacs n-Back game.
-This game is supposed to increase your working memory and fluid
-intelligence.
-
-In this game something is shown for half a second on the screen
-and maybe a sound is played. You should then answer if parts of
-it is the same as you have seen or heard before. This is
-repeated for about 20 trials.
-
-You answer with the keys shown in the bottom window.
-
-In the easiest version of the game you should answer if you have
-just seen or heard what is shown now. By default the game gets
-harder as you play it with success. Then first the number of
-items presented in a trial grows. After that it gets harder by
-that you have to somehow remember not the last item, but the item
-before that \(or even earlier). That is what \"n-Back\" stands
-for.
-
-Note that remember does not really mean remember clearly. The
-game is for training your brain getting used to keep those things
-in the working memory, maybe as a cross-modal unit. You are
-supposed to just nearly be able to do what you do in the game.
-And you are supposed to have fun, that is what your brain like.
-
-You should probably not overdue this. Half an hour a day playing
-might be an optimal time according to some people.
-
-The game is shamelessly modeled after Brain Workshop, see URL
-`http://brainworkshop.sourceforge.net/' just for the fun of
-getting it into Emacs. The game resembles but it not the same as
-that used in the report by Jaeggi mentioned at the above URL.
-
-Not all features in Brain Workshop are implemented here, but some
-new are maybe ... - and you have it available here in Emacs."
- ;; -----
- ;; Below is a short excerpt from the report by Jaeggi et al which
- ;; gave the idea to the game:
-
- ;; Training task. For the training task, we used the same material
- ;; as described by Jaeggi et al. (33), which was a dual n-Back task
- ;; where squares at eight different locations were presented
- ;; sequentially on a computer screen at a rate of 3 s (stimulus
- ;; length, 500 ms; interstimulus interval, 2,500 ms).
- ;; Simultaneously with the presentation of the squares, one of eight
- ;; consonants was presented sequentially through headphones. A
- ;; response was required whenever one of the presented stimuli
- ;; matched the one presented n positions back in the sequence. The
- ;; value of n was the same for both streams of stimuli. There were
- ;; six auditory and six visual targets per block (four appearing in
- ;; only one modality, and two appearing in both modalities
- ;; simultaneously), and their positions were determined randomly.
- ;; Participants made responses manually by pressing on the letter
- ;; ‘‘A’’ of a standard keyboard with their left index finger for
- ;; visual targets, and on the letter ‘‘L’’ with their right index
- ;; finger for auditory targets. No responses were required for
- ;; non-targets.
- (interactive)
- (n-back-make-keymap)
- (when window-system
- (unless (frame-live-p n-back-frame)
- (setq n-back-frame (make-frame
- (list '(name . "n-back game")
- '(tool-bar-lines . 0)
- '(menu-bar-lines . 0)
- (case (frame-parameter nil 'background-mode)
- (light '(background-color . "cornsilk"))
- (dark '(background-color . "MidnightBlue"))
- (otherwise nil))
- '(height . 45)
- '(width . 150)))))
- (select-frame n-back-frame)
- (raise-frame n-back-frame))
- (n-back-cancel-timers)
- (n-back-get-sound-files)
- (unless n-back-sound-files
- (when (memq 'sound n-back-allowed-match-types)
- (n-back-toggle-allowed-sound))
- (when (memq 'sound n-back-active-match-types)
- (n-back-toggle-sound)))
- (n-back-init-control-status)
- (n-back-setup-windows)
- )
-
-(defconst n-back-match-types
- '((position ": position match" nil)
- (color ": color match" nil)
- (sound ": sound match" nil)
- (word ": word match" nil)
- ))
-
-(defvar n-back-control-status nil
- "For showing status in control window.")
-(setq n-back-control-status nil)
-
-;;(n-back-set-match-status 'position 'bad)
-(defun n-back-set-match-status (match-type status)
- "Set MATCH-TYPE status to STATUS for control window."
- (unless (memq status '(ok bad miss nil)) (error "n-back: Bad status=%s" status))
- (let ((entry (assoc match-type n-back-control-status)))
- (setcar (cddr entry) status)
- ))
-
-;;(n-back-clear-match-status)
-(defun n-back-clear-match-status ()
- "Clear match status for control window."
- ;;(dolist (entry n-back-control-status)
- (dolist (entry n-back-match-types)
- (setcar (cddr entry) nil)
- ))
-
-;; (n-back-init-control-status)
-(defun n-back-init-control-status ()
- "Init match status for control window."
- (setq n-back-control-status nil)
- (dolist (what n-back-active-match-types)
- (setq n-back-control-status
- (cons (assoc what n-back-match-types)
- n-back-control-status))))
-
-(defsubst n-back-is-playing ()
- "Return non-nil when game is active."
- (timerp n-back-timer))
-
-;;(n-back-update-control-buffer)
-(defun n-back-update-control-buffer ()
- "Update content of control buffer."
- (save-match-data ;; runs in timer
- (when (buffer-live-p n-back-ctrl-buffer)
- (with-current-buffer n-back-ctrl-buffer
- (setq buffer-read-only nil)
- (erase-buffer)
- (insert (propertize (format "%s %s-back"
- (let ((n (length n-back-active-match-types)))
- (cond
- ((= 1 n) "Single")
- ((= 2 n) "Dual")
- ((= 3 n) "Triple")
- ))
- n-back-level
- ) 'face 'n-back-header)
- (propertize
- (if (n-back-is-playing) " Press C-g to stop" " Press SPACE to play")
- 'face 'n-back-do-now)
- (if (n-back-is-playing) (format " Left %s" n-back-trials-left) "")
- "\n")
- ;;(unless n-back-control-status (n-back-init-control-status))
- (dolist (entry n-back-control-status)
- (let* ((what (nth 0 entry))
- (msg (nth 1 entry))
- (sts (nth 2 entry))
- (key (key-description (n-back-key-binding what))))
- ;;(setq msg (concat (key-description (n-back-key-binding what)) msg))
- (cond
- ((eq sts 'bad)
- (setq msg (propertize (concat key msg) 'face 'n-back-bad)))
- ((eq sts 'ok)
- (setq msg (propertize (concat key msg) 'face 'n-back-ok)))
- ((eq sts 'miss)
- (setq msg (concat
- (if n-back-display-hint
- (propertize key 'face 'n-back-header)
- key)
- msg)))
- ((not sts)
- (setq msg (concat key msg)))
- (t
- (error "n-back:Unknown sts=%s" sts)
- ))
- (insert msg " "))
- )
- (when n-back-display-hint
- (setq n-back-display-hint nil)
- (run-with-timer 0.1 nil 'n-back-update-control-buffer))
- (setq buffer-read-only t)
- (if (window-live-p n-back-ctrl-window)
- (with-selected-window n-back-ctrl-window
- (goto-char 1))
- (goto-char 1))))))
-
-(defcustom n-back-trials 20
- "Number of trials per session."
- :type 'integer
- :group 'n-back)
-
-;;(n-back-compute-result-values n-back-result)
-(defvar n-back-result-values nil)
-(defun n-back-compute-single-result-value (entry)
- "Compute result stored in ENTRY."
- (let* ((what (nth 0 entry))
- (good (nth 1 entry))
- (bad (nth 2 entry))
- (miss (nth 3 entry))
- (err (+ bad miss))
- ;;(tot (+ good bad miss 0.0))
- ;;(gnum 6)
- ;;(weighted-err (* err (/ gnum tot)))
- )
- (cons what (if (= 0 good)
- 0
- (/ (- n-back-trials err 0.0)
- n-back-trials)))))
-
-(defun n-back-compute-result-values (result)
- "Compute result values from game result RESULT."
- (let ((results nil))
- (dolist (entry result)
- (let ((res (n-back-compute-single-result-value entry)))
- (setq results (cons res results))))
- (setq n-back-result-values (reverse results))))
-
-;; Thresholds
-(defun n-back-view-threshold-discussion-page ()
- "View some discussion of threshold."
- (interactive)
- (browse-url "http://groups.google.com/group/brain-training/browse_thread/thread/f4bfa452943c2a2d/ba31adfd0b97771c?lnk=gst&q=threshold#ba31adfd0b97771c"))
-
-;;(n-back-set-next-challenge)
-(defvar n-back-worst nil)
-
-(defvar n-back-challenge-change nil)
-
-(defun n-back-set-next-challenge ()
- "Set next game difficulty level from last game result."
- (let ((r 2.8)) ;; stay as default
- (setq n-back-worst nil)
- (dolist (res n-back-result-values)
- (when (< (cdr res) r)
- (setq r (cdr res))
- (setq n-back-worst res)))
- (setq n-back-challenge-change (if (< r 0.74)
- 'down
- (if (> r 0.91)
- 'up
- 'stay)))
- (n-back-change-challenge n-back-challenge-change)))
-
-(defun n-back-challenge-up ()
- "Make the game harder."
- (interactive)
- (n-back-change-challenge 'up))
-
-(defun n-back-challenge-down ()
- "Make the game easier."
- (interactive)
- (n-back-change-challenge 'down))
-
-(defun n-back-change-challenge (challenge-change)
- "Change game difficulty level by CHALLENGE-CHANGE."
- (let ((new-level n-back-level)
- (new-num-active n-back-num-active)
- (num-allowed (length n-back-allowed-match-types)))
- (case challenge-change
- (down
- (if (= 1 n-back-num-active)
- (unless (= 1 n-back-level)
- (setq new-num-active (min 3 num-allowed))
- (setq new-level (1- n-back-level)))
- (setq new-num-active (1- n-back-num-active))))
- (up
- (if (or (<= 3 n-back-num-active)
- (<= num-allowed n-back-num-active))
- (progn
- (setq new-level (1+ n-back-level))
- (setq new-num-active 1))
- (setq new-num-active (min 3 (1+ n-back-num-active))))))
- ;;(when (= new-level 0) (setq new-level 1))
- ;;(when (= new-num-active 0) (setq new-num-active 1))
- (when (and (= new-level n-back-level)
- (= new-num-active n-back-num-active))
- (setq n-back-challenge-change 'stay))
- (unless (= new-level n-back-level)
- (customize-set-variable 'n-back-level new-level)
- (customize-set-value 'n-back-level new-level))
- (n-back-set-random-match-types new-num-active (car n-back-worst))))
-
-(defun n-back-set-random-match-types (num worst)
- "Select NUM random match types.
-If type WORST is non-nil try to include that."
- (let ((alen (length n-back-allowed-match-types))
- (old-types n-back-active-match-types)
- types)
- (unless (<= num alen)
- (error "n-back: Too many match types required = %s" num))
- (when (and worst
- (< 1 num)
- (memq worst n-back-allowed-match-types))
- (add-to-list 'types worst))
- (while (< (length types) num)
- (add-to-list 'types (nth (random alen) n-back-allowed-match-types)))
- (setq types (n-back-sort-types types))
- (unless (equal old-types types)
- (customize-set-variable 'n-back-active-match-types types)
- (customize-set-value 'n-back-active-match-types types))))
-
-;; (defcustom n-back-keybinding-color "OliveDrab1"
-;; "Background color for key binding hints."
-;; :type 'color
-;; :group 'n-back)
-
-(defun n-back-update-info ()
- "Update info buffer."
- (when (buffer-live-p n-back-info-buffer)
- (when (window-live-p n-back-info-window)
- (set-window-buffer n-back-info-window n-back-info-buffer))
- (with-current-buffer n-back-info-buffer
- (setq buffer-read-only nil)
- (erase-buffer)
-
- (insert (propertize "n-back" 'face 'n-back-header)
- " "
- (propertize "Help: ?" 'face 'n-back-keybinding))
-
- ;; Auto challenging
- (insert "\n\nAuto challenging: "
- (if n-back-auto-challenge "on " "off ")
- (propertize "toggle: Ta" 'face 'n-back-keybinding))
-
- (insert "\n Manually change challenging: "
- (propertize "up-arrow/down-arrow" 'face 'n-back-keybinding))
-
- (insert "\n Allowed match types: ")
- (dolist (type n-back-allowed-match-types)
- (insert (format "%s " type)))
- (insert (propertize "toggle: T" 'face 'n-back-keybinding))
-
- ;; Current game
- (insert "\n\nCurrent game:")
-
- (insert (format "\n n Back: %s " n-back-level)
- (propertize "change: number 1-9" 'face 'n-back-keybinding))
- (insert "\n Match types: ")
- (dolist (type n-back-active-match-types)
- (insert (format "%s " type)))
- (insert (propertize "toggle: t" 'face 'n-back-keybinding))
-
- (insert (format "\n %.2f seconds per trial " n-back-sec-per-trial)
- (propertize "change: +/-" 'face 'n-back-keybinding))
-
- ;; Save and restore
- (insert "\n\n")
- (insert "Game settings: "
- (propertize "reset: C-r" 'face 'n-back-keybinding)
- " "
- (propertize "save: C-s" 'face 'n-back-keybinding))
-
- (insert "\n\n")
- (unless (or (n-back-is-playing)
- (not n-back-result))
- (insert (propertize (format "Last result, %s" n-back-challenge-change)
- 'face 'n-back-last-result)
- "\n Good-Bad-Miss:")
- (dolist (entry n-back-result)
- (let* ((what (nth 0 entry))
- (good (nth 1 entry))
- (bad (nth 2 entry))
- (miss (nth 3 entry))
- (tot (+ good bad miss 0.0))
- (res (n-back-compute-single-result-value entry)))
- (insert (format " %s: %s-%s-%s (%d%%)"
- (key-description (n-back-key-binding what))
- good
- bad
- miss
- (floor (* 100 (cdr res))))))))
-
- (setq buffer-read-only t))))
-
-(defun n-back-show-welcome (msg)
- "Show welcome startup info and message MSG."
- (when (and n-back-game-buffer
- (buffer-live-p n-back-game-buffer))
- (with-current-buffer n-back-game-buffer
- (let ((src (or (when (boundp 'nxhtml-install-dir)
- (expand-file-name "nxhtml/doc/img/fun-brain-2.png" nxhtml-install-dir))
- "c:/program files/brain workshop/res/brain_graphic.png"))
- img
- buffer-read-only)
- (erase-buffer)
- ;;(insert (propertize "\nEmacs n-back game (after Brain Workshop)\n\n" 'face '(:height 2.0)))
- (insert (propertize "\nEmacs n-back game (after Brain Workshop)\n\n" 'face 'n-back-welcome-header))
- (unless (file-exists-p src)
- (n-back-maybe-download-files (file-name-directory src) (list (file-name-nondirectory src))))
- (if (file-exists-p src)
- (condition-case err
- (setq img (create-image src nil nil
- :relief 0
- ;;:margin inlimg-margins
- ))
- (error (setq img (error-message-string err))))
- (setq img (concat "Image not found: " src)))
- (if (stringp img)
- (insert img)
- (insert-image img))
- (insert (propertize "\n\nPlay for fun and maybe a somewhat happier brain"
- 'face 'n-back-welcome))
- (when msg (insert "\n\n" msg))
- ))))
-
-(defun n-back-setup-windows ()
- "Setup game frame and windows."
- (delete-other-windows)
- ;; Info
- (split-window-horizontally)
- (setq n-back-info-window (next-window (frame-first-window)))
- (setq n-back-info-buffer (get-buffer-create "* n-back info *"))
- (when (< 75 (window-width n-back-info-window))
- (with-selected-window n-back-info-window
- (enlarge-window (- 75 (window-width n-back-info-window)) t)))
- (with-current-buffer n-back-info-buffer
- (n-back-control-mode)
- (setq wrap-prefix " "))
- (n-back-update-info)
- ;; Control
- (split-window-vertically)
- (setq n-back-ctrl-window (next-window (frame-first-window)))
- (setq n-back-ctrl-buffer (get-buffer-create "* n-back control *"))
- (set-window-buffer n-back-ctrl-window n-back-ctrl-buffer)
- (with-current-buffer n-back-ctrl-buffer (n-back-control-mode))
- (n-back-update-control-buffer)
- (fit-window-to-buffer n-back-ctrl-window)
- (set-window-dedicated-p n-back-ctrl-window t)
- ;; Game
- (setq n-back-game-window (frame-first-window))
- (setq n-back-game-buffer (get-buffer-create "*n-back game*"))
- (set-window-buffer n-back-game-window n-back-game-buffer)
- (set-window-dedicated-p n-back-game-window t)
- (with-current-buffer n-back-game-buffer (n-back-control-mode))
- (n-back-show-welcome nil)
- ;; Position in control window
- (select-window n-back-ctrl-window)
- )
-
-;;(n-back-display "str" 1 0 3 3 6)
-(defun n-back-display (str x y cols rows max-strlen color)
- "Display a trial.
-Display item with text STR at column X in row Y using COLS
-columns and ROWS rows. Strings to display have max length
-MAX-STRLEN. Display item with background color COLOR."
- (unless (< x cols) (error "n-back: Not x=%s < cols=%s" x cols))
- (unless (< y rows) (error "Not y=%s < rows=%s" y rows))
- (unless str (setq str ""))
- (with-current-buffer n-back-game-buffer
- (let* (buffer-read-only
- (tot-str "")
- ;; Pad spaces left, two right, four between
- (game-w (window-width n-back-game-window))
- (pad-x 0)
- (scale (if (not window-system)
- 1.0
- (/ (* 1.0 game-w)
- (+ (* 2 pad-x)
- (* (1- cols) 4)
- (* cols max-strlen)))))
- (str-diff (- max-strlen (length str)))
- (str-l-len (/ str-diff 2))
- (str-r-len (- max-strlen (length str) str-l-len))
- (face-spec (if window-system
- (list :inherit 'n-back-game-word :background color :height scale)
- (list :inherit 'n-back-game-word :background color)))
- (str-disp (propertize
- (concat (make-string str-l-len 32) str (make-string str-r-len 32))
- 'face face-spec))
- (col-str (concat
- (make-string pad-x ?p)
- (make-string
- (+ (* x (+ 4 max-strlen)))
- 32
- ;;?x
- )))
- ;; Pad lines above and below, two between
- (pad-y 0)
- (game-h (window-body-height n-back-game-window))
- (game-h-scaled (/ game-h scale))
- (lines-between (/ (- game-h-scaled rows (* 2 pad-y))
- (1- rows)))
- (row-scaled (+ pad-y (* y (1+ lines-between)) (1- y)))
- (row-num (if (= y 0)
- pad-y
- (round row-scaled)))
- (row-str (make-string row-num ?\n)))
- (setq show-trailing-whitespace nil)
- ;;(setq cursor-type nil)
- (erase-buffer)
- (setq tot-str row-str)
- (setq tot-str (concat tot-str col-str))
- (insert (propertize tot-str 'face (list :height scale)))
- (insert str-disp)
- )))
-
-;; (setq timer-list nil)
-;;(n-back-display-in-timer)
-;; (setq n-back-trials-left 3)
-
-(defun n-back-clear-game-window ()
- "Erase game buffer."
- (save-match-data ;; runs in timer
- (with-current-buffer n-back-game-buffer
- (let (buffer-read-only)
- (erase-buffer)))))
-
-(defun n-back-play ()
- "Start playing."
- (interactive)
- (message " ") ;; For easier reading *Messages*
- (n-back-update-info)
- (if (not n-back-active-match-types)
- (message (propertize "No active match types"
- 'face 'secondary-selection))
- ;;(setq n-back-result nil)
- (n-back-init-control-status)
- (n-back-init-this-result)
- (n-back-cancel-timers)
- (winsize-set-mode-line-colors t)
- (setq n-back-ring (make-ring (1+ n-back-level)))
- (n-back-clear-game-window)
- (setq n-back-trials-left (+ n-back-trials n-back-level))
- (random t)
- (n-back-start-main-timer)
- (n-back-update-control-buffer)))
-
-(defun n-back-start-main-timer ()
- "Start main game timer."
- (setq n-back-timer
- (run-with-timer
- n-back-sec-per-trial
- nil ;;n-back-sec-per-trial
- 'n-back-display-in-timer)))
-
-(defun n-back-maybe-download-files (dir file-name-list)
- (nxhtml-get-missing-files (file-relative-name dir nxhtml-install-dir) file-name-list))
-
-(defun n-back-finish-game ()
- "Finish the game."
- (n-back-cancel-timers)
- (fit-window-to-buffer n-back-ctrl-window)
- (setq n-back-result n-back-this-result)
- (n-back-compute-result-values n-back-result)
- (when n-back-auto-challenge (n-back-set-next-challenge))
- (n-back-update-info)
- (n-back-init-control-status)
- (n-back-clear-match-status)
- (n-back-update-control-buffer)
- (n-back-show-welcome "Game over")
- (with-current-buffer n-back-game-buffer
- ;;(setq n-back-challenge-change 'up)
- (let (buffer-read-only)
- (insert
- "\n\n"
- (case n-back-challenge-change
- (up "Congratulations! I see you need more challenge, raising difficulty!")
- (down "Making it a bit easier for now to make your playing more fun.")
- (otherwise "This game challenges seems the right way for you now.")))
- (let* ((dir (when (boundp 'nxhtml-install-dir)
- (expand-file-name "nxhtml/doc/img/" nxhtml-install-dir)))
- (up-imgs '("rembrandt-self-portrait.jpg"
- "bacchante2.jpg"
- "giraffe.jpg"
- "Las_Medulas.jpg"
- ))
- (t-imgs '("continue-play.jpg"
- "Toco_toucan.jpg"
- "raindrops2.jpg"
- "divine2.jpg"
- ;;"butterflies.png"
- "volga.jpg"
- "healthy_feet2.jpg"
- ))
- ;; (setq n-back-trials 1)
- (pic (when dir (case n-back-challenge-change
- (up (nth (random (length up-imgs)) up-imgs))
- (otherwise (nth (random (length t-imgs)) t-imgs)))))
- (src (when dir (expand-file-name pic dir)))
- img)
- (when (and src (not (file-exists-p src)))
- ;; Time to download?
- (n-back-maybe-download-files (file-name-directory src) (append up-imgs t-imgs nil)))
- (when (and src (file-exists-p src))
- (condition-case err
- (setq img (create-image src nil nil
- :relief 0
- ))
- (error (setq img (error-message-string err)))))
- (if (stringp img)
- img
- (insert "\n\n")
- (insert-image img)))))
- (message "Game over"))
-
-(defun n-back-display-random ()
- "Display a random item."
- (when (current-message) (message ""))
- ;;(message "here start display")
- (let* ((use-position (memq 'position n-back-active-match-types))
- (use-color (memq 'color n-back-active-match-types))
- (use-sound (memq 'sound n-back-active-match-types))
- (use-word (memq 'word n-back-active-match-types))
- (old-rec (when (n-back-match-possible)
- (ring-ref n-back-ring (1- n-back-level))))
- (cols 3)
- (rows 3)
- (x (if use-position (random 3) 1))
- (y (if use-position (random 3) 1))
- (old-x (if use-position (nth 1 old-rec)))
- (old-y (if use-position (nth 2 old-rec)))
- (color (nth (if use-color (random (length n-back-colors)) 0) n-back-colors))
- (old-color (if use-color (nth 3 old-rec)))
- (sound (when use-sound (expand-file-name (nth (random (length n-back-sound-files))
- n-back-sound-files)
- (nth 0 n-back-sounds))))
- (old-sound (if use-sound (nth 4 old-rec)))
- (words (when use-word (split-string n-back-words)))
- (word (when use-word (nth (random (length words)) words)))
- (old-word (when use-word (nth 5 old-rec)))
- (str (if word word "")) ;(format "%s" n-back-trials-left))
- (max-strlen (if words
- (+ 2 (apply 'max (mapcar (lambda (w) (length w)) words)))
- 5))
- (compensate 24)
- )
- ;; To get more targets make it more plausible that it is the same here.
- ;; (/ (- 6 (/ 20.0 8)) 20)
- (when old-rec
- (when (and use-position
- (not (and (= x old-x)
- (= y old-y)))
- (< (random 100) compensate))
- (setq x (nth 1 old-rec))
- (setq y (nth 2 old-rec)))
- (when (and use-color
- (not (equal color old-color))
- (< (random 100) compensate))
- (setq color (nth 3 old-rec)))
- (when (and use-sound
- (not (equal sound old-sound))
- (< (random 100) compensate))
- (setq sound (nth 4 old-rec)))
- (when (and use-word
- (not (equal word old-word))
- (< (random 100) compensate))
- (setq word (nth 5 old-rec))))
- (setq str word) ;; fix-me
- (ring-insert n-back-ring (list str x y color sound word))
- ;;(message "here before display")
- (n-back-display str x y cols rows max-strlen color)
- ;;(when sound (play-sound (list 'sound :file sound)))
- ;;(message "here before clear-m")
- (n-back-clear-match-status)
- ;;(message "here before position")
- (when (and use-position (n-back-matches 'position)) (n-back-set-match-status 'position 'miss))
- ;;(message "here before color")
- (when (and use-color (n-back-matches 'color)) (n-back-set-match-status 'color 'miss))
- ;;(message "here before sound")
- (when (and use-sound (n-back-matches 'sound)) (n-back-set-match-status 'sound 'miss))
- ;;(message "here before word")
- (when (and use-word (n-back-matches 'word)) (n-back-set-match-status 'word 'miss))
- (setq n-back-display-hint n-back-hint)
- ;;(message "here before control")
- (n-back-update-control-buffer)
- ;;(message "here before clear timer")
- (setq n-back-clear-timer (run-with-timer 0.5 nil 'n-back-clear-game-window))
- ;;(message "here before sound timer")
- (when sound (run-with-timer 0.01 nil 'n-back-play-sound-in-timer sound))
- ;;(message "here exit display")
- ))
-
-(defun n-back-display-in-timer ()
- "Display a trial in a timer."
- (condition-case err
- (save-match-data ;; runs in timer
- (n-back-add-result)
- (if (>= 0 (setq n-back-trials-left (1- n-back-trials-left)))
- (n-back-finish-game)
- (n-back-display-random)
- (n-back-start-main-timer)
- ;;(message "after start-main-timer")
- ))
- (error (message "n-back-display: %s" (error-message-string err))
- (n-back-cancel-timers))))
-
-(defun n-back-play-sound-in-timer (sound-file)
- "Play sound SOUND-FILE in a timer."
- (condition-case err
- (save-match-data ;; runs in timer
- (play-sound (list 'sound :file sound-file :volume n-back-sound-volume)))
- (error (message "n-back-sound: %s" (error-message-string err))
- (n-back-cancel-timers))))
-
-
-;;; Answers
-
-;;(defvar n-back-answers nil)
-
-(defun n-back-init-this-result ()
- "Init `n-back-this-result'."
- (setq n-back-this-result nil)
- (dolist (sts-entry n-back-control-status)
- (let* ((what (nth 0 sts-entry))
- (res-entry (list what 0 0 0)))
- (setq n-back-this-result (cons res-entry n-back-this-result)))))
-
-(defun n-back-match-possible ()
- "Return t if enouch entries have been shown to match."
- (= (ring-length n-back-ring) (1+ n-back-level)))
-
-(defun n-back-add-result ()
- "Add result of last trial."
- (when (n-back-match-possible)
- (dolist (sts-entry n-back-control-status)
- (let* ((what (nth 0 sts-entry))
- (sts (nth 2 sts-entry))
- (matches (n-back-matches what))
- (num (cond
- ((eq sts 'ok) 1)
- ((eq sts 'bad) 2)
- ;;((eq sts nil) (when matches 3))
- ((eq sts 'miss) 3)
- ((not sts) nil)
- (t (error "n-back: Bad status=%s" sts))))
- (res-entry (when num (assoc what n-back-this-result)))
- (lst (when num (nthcdr num res-entry))))
- (when num
- (if res-entry
- (setcar lst (1+ (car lst)))
- (setq res-entry (list what 0 0 0))
- ;;(setq lst (nthcdr num res-entry))
- (setq n-back-this-result (cons res-entry n-back-this-result))))))))
-
-(defun n-back-matches-position ()
- "Return non-nil iff last trial position match."
- (when (n-back-match-possible)
- (let* ((comp-item (ring-ref n-back-ring n-back-level))
- (curr-item (ring-ref n-back-ring 0))
- (comp-x (nth 1 comp-item))
- (curr-x (nth 1 curr-item))
- (comp-y (nth 2 comp-item))
- (curr-y (nth 2 curr-item)))
- (and (= comp-y curr-y)
- (= comp-x curr-x)))))
-
-(defun n-back-matches-color ()
- "Return non-nil iff last trial color match."
- (when (n-back-match-possible)
- (let* ((comp-item (ring-ref n-back-ring n-back-level))
- (curr-item (ring-ref n-back-ring 0))
- (comp-color (nth 3 comp-item))
- (curr-color (nth 3 curr-item)))
- (equal comp-color curr-color))))
-
-(defun n-back-matches-sound ()
- "Return non-nil iff last trial sound match."
- (when (n-back-match-possible)
- (let* ((comp-item (ring-ref n-back-ring n-back-level))
- (curr-item (ring-ref n-back-ring 0))
- (comp-sound (nth 4 comp-item))
- (curr-sound (nth 4 curr-item)))
- (equal comp-sound curr-sound))))
-
-(defun n-back-matches-word ()
- "Return non-nil iff last trial word match."
- (when (n-back-match-possible)
- (let* ((comp-item (ring-ref n-back-ring n-back-level))
- (curr-item (ring-ref n-back-ring 0))
- (comp-word (nth 5 comp-item))
- (curr-word (nth 5 curr-item)))
- (equal comp-word curr-word))))
-
-(defun n-back-matches (what)
- "Return non-nil iff last trial part WHAT match."
- (cond
- ((eq what 'position) (n-back-matches-position))
- ((eq what 'color) (n-back-matches-color))
- ((eq what 'sound) (n-back-matches-sound))
- ((eq what 'word) (n-back-matches-word))
- (t (error "n-back: Unknown match type: %s" what))))
-
-(defun n-back-answer (what)
- "Tell that you think WHAT matched."
- (when (n-back-is-playing)
- (if (memq what n-back-active-match-types)
- (if (n-back-match-possible)
- (let ((sts (if (n-back-matches what) 'ok 'bad)))
- (n-back-set-match-status what sts)
- (n-back-update-control-buffer))
- (message "%s n-back items must be displayed before anything can match"
- n-back-level))
- (message "%s match is not active" what)
- (ding t))))
-
-(defun n-back-position-answer ()
- "Tell that you think position matched."
- (interactive)
- (n-back-answer 'position))
-
-(defun n-back-color-answer ()
- "Tell that you think color matched."
- (interactive)
- (n-back-answer 'color))
-
-(defun n-back-sound-answer ()
- "Tell that you think sound matched."
- (interactive)
- (n-back-answer 'sound))
-
-(defun n-back-word-answer ()
- "Tell that you think word matched."
- (interactive)
- (n-back-answer 'word))
-
-(defun n-back-stop ()
- "Stop playing."
- (interactive)
- (n-back-cancel-timers)
- (n-back-update-control-buffer)
- (message "Stopped n-back game")
- (n-back-show-welcome "Stopped"))
-
-(defvar viper-emacs-state-mode-list) ;; silence compiler
-(defvar viper-emacs-state-hook) ;; silence compiler
-
-(define-derived-mode n-back-control-mode nil "N-back"
- "Mode for controlling n-back game."
- (setq cursor-type nil)
- (setq buffer-read-only t)
- (set (make-local-variable 'viper-emacs-state-mode-list) '(n-back-control-mode))
- (set (make-local-variable 'viper-emacs-state-hook) nil) ;; in vis cursor
- (abbrev-mode -1)
- (setq show-trailing-whitespace nil)
- (when (fboundp 'visual-line-mode) (visual-line-mode 1))
- (n-back-make-keymap))
-
-(defun n-back-cancel-timers ()
- "Cancel game timers."
- (when (timerp n-back-timer)
- (cancel-timer n-back-timer))
- (setq n-back-timer nil)
- (when (timerp n-back-clear-timer)
- (cancel-timer n-back-clear-timer))
- (setq n-back-clear-timer nil)
- (winsize-set-mode-line-colors nil))
-
-(defvar n-back-game-settings-symbols
- '(
- ;;n-back-keys
- n-back-level
- n-back-active-match-types
- n-back-allowed-match-types
- n-back-auto-challenge
- ;;n-back-colors
- ;;n-back-words
- ;;n-back-sound-volume
- ;;n-back-sounds
- n-back-sec-per-trial
- ;;n-back-keybinding-color
- ;;n-back-trials
- ))
-
-(defun n-back-save-game-settings ()
- "Save game settings."
- (interactive)
- (dolist (var n-back-game-settings-symbols)
- )
- (custom-save-all))
-
-(defun n-back-reset-game-to-saved ()
- "Reset game playing options to saved values."
- (interactive)
- (dolist (pass '(1 2))
- (dolist (var n-back-game-settings-symbols)
- (if (= pass 1)
- ;; pass 1 is for my lousy programming:
- (condition-case err
- (custom-reevaluate-setting var)
- (error nil))
- (custom-reevaluate-setting var)))))
-
-(provide 'n-back)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; n-back.el ends here
diff --git a/emacs.d/nxhtml/util/new-key-seq-widget.el b/emacs.d/nxhtml/util/new-key-seq-widget.el
deleted file mode 100644
index 7ace679..0000000
--- a/emacs.d/nxhtml/util/new-key-seq-widget.el
+++ /dev/null
@@ -1,312 +0,0 @@
-;;; new-key-seq-widget.el --- New key-sequence widget for Emacs
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Tue Dec 25 23:00:43 2007
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; New version of Kim's Emacs key-sequence widget. For inclusion in
-;; Emacs I hope.
-;;
-;; Fix-me: check what was included.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; I do not know how much I have changed, but I keep it together here
-;; for simplicity.
-;;
-;; Note: I have named made `widget-key-sequence-map' a constant for
-;; the moment.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'wid-edit)
-(require 'edmacro)
-
-;;; I'm not sure about what this is good for? KFS.
-;;
-;;; This should probably be for customize-set-value etc, but it is not
-;;; used. Or for the widget editing, but it is not used there
-;;; either. /Lennart
-(defvar widget-key-sequence-prompt-value-history nil
- "History of input to `widget-key-sequence-prompt-value'.")
-
-(defvar widget-key-sequence-default-value [ignore]
- "Default value for an empty key sequence.")
-
-(defconst widget-key-sequence-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map widget-field-keymap)
- (define-key map [(control ?q)] 'widget-key-sequence-read-event)
- (define-key map [(control ?t)] 'widget-key-sequence-toggle-input-format)
- map))
-
-(defvar widget-key-sequence-input-formats '(key-description vector))
-
-(defcustom widget-key-sequence-default-input-format 'key-description
- "Format used to edit key sequences.
-This is the format shown and edited in a key-sequence widget."
- :type '(choice (const :tag "Key description" 'key-description)
- (const :tag "Vector" 'vector))
- :group 'widgets)
-
-(define-widget 'key-sequence 'restricted-sexp
- "A key sequence."
- :prompt-value 'widget-field-prompt-value
- :prompt-internal 'widget-symbol-prompt-internal
-; :prompt-match 'fboundp ;; What was this good for? KFS
- :prompt-history 'widget-key-sequence-prompt-value-history
- :action 'widget-field-action
- :match-alternatives '(stringp vectorp)
- :format "%{%t%}: %v"
- :validate 'widget-key-sequence-validate
- :value-to-internal 'widget-key-sequence-value-to-internal
- :value-to-external 'widget-key-sequence-value-to-external
- :value widget-key-sequence-default-value
- :keymap widget-key-sequence-map
- :help-echo "C-q: insert KEY, EVENT, or CODE; C-t: toggle format"
- :tag "Key sequence")
-
-
-;;; Leave these here for testing:
-;; (edmacro-parse-keys "C-x h" t) => [24 104]
-;; (key-description-to-vector "C-x h" ) => [(control 120) 104]
-;; (key-description (key-description-to-vector "C-x h")) => "C-x h"
-;; (key-description (edmacro-parse-keys "C-x h")) => "C-x h"
-;; (key-description [M-mouse-1]) => <M-mouse-1>
-;; (edmacro-parse-keys "<M-mouse-1>") => [M-mouse-1]
-
-;; (event-modifiers 'mouse-1) => (click mouse-1 mouse-1 mouse-1 mouse-1 mouse-1)
-;; (event-modifiers 'M-mouse-1) =>
-;; (event-modifiers '(mouse-1)) => (click mouse-1 mouse-1 mouse-1 mouse-1 mouse-1)
-;; (event-modifiers '(down-mouse-1)) => (click mouse-1 mouse-1 mouse-1 mouse-1 mouse-1)
-;; (event-modifiers '(S-down-mouse-1)) => (shift down)
-;; (event-modifiers 'S-down-mouse-1) => (shift down)
-;; (event-modifiers 'down-mouse-1) => (click mouse-1 mouse-1 mouse-1 mouse-1 mouse-1)
-;; (event-modifiers '(down-mouse-1)) => (click mouse-1 mouse-1 mouse-1 mouse-1 mouse-1)
-;; (let ((m (make-sparse-keymap))) (define-key m [(down mouse-1)] 'hej))
-(defun key-description-to-vector (kd)
- "Convert human readable key description KD to vector format.
-KD should be in the format returned by `key-description'."
- (let ((v
- (vconcat
- (mapcar (lambda (k)
- ;; Fix-me: temporarily clean the event here:
- (when (symbolp k)
- (let ((esem (get k 'event-symbol-element-mask))) (when esem (lwarn t :warning "kd=%s, k=%s, esem=%s" kd k esem)))
- (put k 'event-symbol-element-mask nil))
- (let ((m (event-modifiers k))
- (b (event-basic-type k)))
- (setq m (delq 'click m))
- (if m
- (nconc m (list b))
- b)))
- ;; fix-me: does not always work for menu and tool
- ;; bar event because they may contains spaces.
- (edmacro-parse-keys kd t))))
- (m (make-sparse-keymap))
- )
- ;; Test before returning it:
- (define-key m v 'test)
- v))
-
-(defun widget-key-sequence-current-input-format ()
- (let ((fmt (or (widget-get (widget-at (point)) :key-sequence-format)
- widget-key-sequence-default-input-format)))
- fmt))
-
-(defun widget-key-sequence-toggle-input-format ()
- "Toggle key sequence input format."
- (interactive)
- (let* ((widget (widget-at (point)))
- (value (widget-apply widget :value-get))
- (first (string-to-char value))
- (old-fmt
- (let ((fmt (or (widget-get widget :key-sequence-format)
- widget-key-sequence-default-input-format)))
- fmt))
- (new-fmt
- (let ((m (cdr (memq old-fmt widget-key-sequence-input-formats))))
- (if m (car m) (car widget-key-sequence-input-formats))))
- (new-value
- (cond
- ((eq new-fmt 'key-description)
- (setq value (replace-regexp-in-string "\\` *\\(.*?\\) *\\'" "\\1" value))
- (if (string= value "")
- ""
- (key-description (read value))))
- ((eq new-fmt 'vector)
- (format "%S" (key-description-to-vector value)))
- (t
- (error "Bad key seq format spec: %s" new-fmt))))
- (state (widget-get (widget-get widget :parent) :custom-state))
- )
- (widget-put widget :key-sequence-format new-fmt)
- (setq new-value (propertize new-value 'face 'highlight))
- (widget-apply widget :value-set new-value)
- (widget-setup)
- (widget-put (widget-get widget :parent) :custom-state state)
- (cond
- ((eq new-fmt 'key-description)
- (message "Switched to human readable format"))
- ((eq new-fmt 'vector)
- (message "Switched to vector format"))
- (t
- (error "Uh? format=%s" new-fmt)))))
-
-
-(defun widget-key-sequence-read-event (ev)
- "Read event or char code and put description in widget.
-The events may come from keyboard, mouse, menu or tool bar.
-
-If the event is a mouse event then multiple entries will be
-entered. It is not possible to know which one is wanted. Please
-remove those not wanted!
-
-If 0-7 is pressed then code for an event is prompted for."
- (interactive (list
- (let ((inhibit-quit t) quit-flag)
- (unless (eq 'key-description
- (widget-key-sequence-current-input-format))
- (error "Wrong input format, please do C-t first"))
- (read-event "Insert KEY, EVENT, or CODE: "))))
- (lwarn t :warning "=====> ev=%s" ev)
- (let ((tr (and (keymapp function-key-map)
- (lookup-key function-key-map (vector ev)))))
- (insert (if (= (char-before) ?\s) "" " "))
- ;; Fix-me: change to check for ? instead of 0-7 to allow char
- ;; literal input format
- (when (and (integerp ev)
- (or (and (<= ?0 ev) (< ev (+ ?0 (min 10 read-quoted-char-radix))))
- (and (<= ?a (downcase ev))
- (< (downcase ev) (+ ?a -10 (min 36 read-quoted-char-radix))))))
- (setq unread-command-events (cons ev unread-command-events)
- ev (read-quoted-char (format "Enter code (radix %d)" read-quoted-char-radix))
- tr nil)
- (if (and (integerp ev) (not (characterp ev)))
- (insert (char-to-string ev)))) ;; throw invalid char error
- (setq ev (key-description (list ev)))
- (when (arrayp tr)
- (setq tr (key-description (list (aref tr 0))))
- (when (y-or-n-p (format "Key %s is translated to %s -- use %s? " ev tr tr))
- (setq ev tr)
- ;;(setq ev2 nil)
- ))
- (insert ev " ")
- (when (or (string-match "mouse-" ev)
- (string-match "menu-bar" ev)
- (string-match "tool-bar" ev))
- (let ((ev2 (read-event nil nil (* 0.001 double-click-time))))
- (while ev2
- (lwarn t :warning "(stringp ev2)=%s, (sequencp ev2)=%s, (symbolp ev2)=%s, ev2=%S" (stringp ev2) (sequencep ev2) (symbolp ev2) ev2)
- (if nil ;(memq 32 (append (symbol-name ev2) nil)) ;; Fix-me: contains space
- (insert ?\" (symbol-name ev2) ?\")
- (insert (key-description (list ev2))))
- (insert " ")
- (setq ev2 (read-event nil nil (* 0.001 double-click-time))))))))
-
-(defun widget-key-sequence-validate (widget)
- "Validate the internal value of the widget.
-Actually there is nothing to validate here. The internal value
-is always valid, but it is however maybe not what the user
-expects. Because of this the internal format is rewritten when
-the user gives the value in a way that is not the normal
-representation of it. A warning is also shown then."
- (condition-case err
- (let* ((int-val (widget-apply widget :value-get))
- (def-desc (key-description (edmacro-parse-keys int-val)))
- (fmt (or (widget-get widget :key-sequence-format)
- widget-key-sequence-default-input-format)))
- ;; Normalize and compare with default description
- (setq int-val
- (replace-regexp-in-string " *" " " int-val t))
- (setq int-val
- (replace-regexp-in-string "\\` *\\(.*?\\) *\\'" "\\1" int-val t))
- (unless (or
- (eq fmt 'vector)
- (string= int-val def-desc))
- ;; Replace with the default description if it is different
- ;; so the user sees what the value actually means:
- (widget-apply widget :value-set def-desc)
- (lwarn t :warning
- (concat "Key description %s means the same as %s\n"
- "\tTip: You can type C-q to insert a key or event")
- int-val def-desc)
- )
- ;; Return nil if there a no problem validating
- nil)
- (error (widget-put widget :error (error-message-string err))
- (lwarn t :warning "invalid %S: %s" widget (error-message-string err))
- ;; Return widget if there was an error
- widget)))
-
-(defun widget-key-sequence-value-to-internal (widget value)
- (if (widget-apply widget :match value)
- (if (equal value widget-key-sequence-default-value)
- ""
- (let ((fmt (or (widget-get widget :key-sequence-format)
- widget-key-sequence-default-input-format)))
- (if (eq fmt 'vector)
- (format "%S" value)
- (key-description value))))
- value))
-
-(defun widget-key-sequence-value-to-external (widget value)
- (if (stringp value)
- (if (string-match "\\`[[:space:]]*\\'" value)
- widget-key-sequence-default-value
- ;; Give a better error message and a trace back on debug:
- (condition-case err
- (let* ((fmt (or (widget-get widget :key-sequence-format)
- widget-key-sequence-default-input-format))
- (first (string-to-char value)))
- (cond
- ((eq fmt 'vector)
- (read value)
- )
- (t
- (key-description-to-vector value))))
- (error (error "Bad value: %s" (error-message-string err)))))
- value))
-
-;; (customize-option 'new-key-seq-widget-test)
-(defcustom new-key-seq-widget-test []
- "Testing only!"
- :type 'key-sequence
- :group 'widgets)
-
- (provide 'new-key-seq-widget)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; new-key-seq-widget.el ends here
diff --git a/emacs.d/nxhtml/util/nxml-mode-os-additions.el b/emacs.d/nxhtml/util/nxml-mode-os-additions.el
deleted file mode 100644
index 0765acf..0000000
--- a/emacs.d/nxhtml/util/nxml-mode-os-additions.el
+++ /dev/null
@@ -1,99 +0,0 @@
-;;; nxml-mode-os-additions.el --- additional functions for nxml-mode
-
-;; Copyright (C) 2004 by Oliver Steele
-
-;; Author: Oliver Steele <steele@osteele.com>
-;; Version: 1.0 (2004-08-08)
-;; Homepage: http://osteele.com/sources/nxml-mode-os-additions.el
-;; Keywords: XML
-
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of
-;; the License, or (at your option) any later version.
-
-;; This program is distributed in the hope that it will be
-;; useful, but WITHOUT ANY WARRANTY; without even the implied
-;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE. See the GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public
-;; License along with this program; if not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-;; MA 02111-1307 USA
-
-;;; Description:
-
-;; nxml-mode-os-additions defines additional functions for using
-;; James Clark's nxml-mode:
-;; - reload the current buffer's schema
-;; - edit the current buffer's schema
-
-;;; Installation:
-;;
-;; To use nxml-mode-os-additions.el, put it in your load-path and add
-;; the following to your .emacs:
-;;
-;; (load-library "nxml-mode-os-additions")
-
-;; Configuration:
-;;
-;; To make it easier to use, assign the commands to some keys.
-;; Once nxml-mode has been loaded, you can define keys on nxml-mode-map.
-;; The function rng-mode-os-additions-set-key-bindings illustrates
-;; this.
-;;
-;; Alternatively, you can place the following in your .emacs:
-;; (add-hook 'nxml-mode-hook 'rng-mode-os-additions-set-key-bindings)
-
-;;; ChangeLog:
-;;
-;; 2004-08-08 (version 1.0):
-;; * Initial public release
-
-;; Added require rng-valid (Lennart Borgman)
-
-;;; Code:
-
-(require 'nxml-mode)
-(eval-and-compile (require 'rng-valid))
-
-(defun rng-mode-os-additions-set-key-bindings ()
- (define-key nxml-mode-map "\C-c\C-s\C-r" 'rng-reload-schema-file)
- ; move the rng-set-schema-file-and-validate to another key binding
- ;(define-key nxml-mode-map "\C-c\C-s\C-s" 'rng-set-schema-file-and-validate)
- (define-key nxml-mode-map "\C-c\C-sf" 'rng-find-schema-file)
- )
-
-(defun rng-reload-schema-file ()
- "Reloads the current schema file."
- (interactive)
- (let ((schema-filename rng-current-schema-file-name))
- (when schema-filename
- (setq rng-current-schema (rng-load-schema schema-filename))
- (run-hooks 'rng-schema-change-hook)
- (message "Reloaded schema %s" schema-filename))
- (unless schema-filename
- (rng-set-schema-and-validate))))
-
-;; Helper function for rng-find-schema-file*
-(defun rng-apply-find-schema-file (fn)
- (let ((schema-filename rng-current-schema-file-name))
- (unless schema-filename
- (error "This file is not associated with a schema file."))
- (funcall fn schema-filename)))
-
-(defun rng-find-schema-file ()
- "Edit the current schema file."
- (interactive)
- (rng-apply-find-schema-file 'find-file))
-
-(defun rng-find-schema-file-other-frame ()
- "Edit the current schema in another frame."
- (interactive)
- (rng-apply-find-schema-file 'find-file-other-frame))
-
-(defun rng-find-schema-file-other-window ()
- "Edit the current schema in another window."
- (interactive)
- (rng-apply-find-schema-file 'find-file-other-window))
diff --git a/emacs.d/nxhtml/util/ocr-user.el b/emacs.d/nxhtml/util/ocr-user.el
deleted file mode 100644
index 0bcd1d9..0000000
--- a/emacs.d/nxhtml/util/ocr-user.el
+++ /dev/null
@@ -1,86 +0,0 @@
-;;; ocr-user.el --- Input looong OCR number more safely
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-06-18T23:00:25+0200 Wed
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; I just get mad at entering OCR numbers more than twenty digits long
-;; so I wrote this litte minor mode that colors up the digits three by
-;; tree.
-;;
-;; To use it do
-;;
-;; M-x ocr-user-mode
-;;
-;; Crazy? Yeah, I get crazy by entering these digits. You would not
-;; like to meet me when I have done that!
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defconst ocr-keywords
- `((
- ,(concat
- ;;"\\<\\(?:"
- "\\(?1:[0-9]\\{3\\}\\)"
- "\\(?2:[0-9]\\{3\\}\\)?"
- ;;"\\)+"
- )
- (0 (progn
- (put-text-property (match-beginning 1) (match-end 1)
- 'face '(:background "LightBlue1"))
- (when (match-beginning 2)
- (put-text-property (match-beginning 2) (match-end 2)
- 'face '(:background "PaleGreen1"))))))))
-
-;; 23456
-;; 1234567890
-;; 346789238
-;;;###autoload
-(define-minor-mode ocr-user-mode
- "Color up digits three by three."
- :group 'convenience
- (if ocr-user-mode
- (font-lock-add-keywords nil ocr-keywords)
- (font-lock-remove-keywords nil ocr-keywords))
- (font-lock-fontify-buffer))
-
-
-(provide 'ocr-user)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ocr-user.el ends here
diff --git a/emacs.d/nxhtml/util/org-panel.el b/emacs.d/nxhtml/util/org-panel.el
deleted file mode 100644
index a8dfec0..0000000
--- a/emacs.d/nxhtml/util/org-panel.el
+++ /dev/null
@@ -1,745 +0,0 @@
-;;; org-panel.el --- Simple routines for us with bad memory
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: Thu Nov 15 15:35:03 2007
-;; Version: 0.21
-;; Lxast-Updated: Wed Nov 21 03:06:03 2007 (3600 +0100)
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Fxeatures that might be required by this library:
-;;
-;; `easymenu', `font-lock', `noutline', `org', `outline', `syntax',
-;; `time-date'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This defines a kind of control panel for `org-mode'. This control
-;; panel should make it fast to move around and edit structure etc.
-;;
-;; To bring up the control panel type
-;;
-;; M-x orgpan-panel
-;;
-;; Type ? there for help.
-;;
-;; I suggest you add the following to your .emacs for quick access of
-;; the panel:
-;;
-;; (eval-after-load 'org-mode
-;; (define-key org-mode-map [(control ?c) ?p] 'orgpan-panel))
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(require 'org)
-(require 'outline)
-
-;; Fix-me: this is for testing. A minor mode version interferes badly
-;; with emulation minor modes.
-(defconst orgpan-minor-mode-version nil)
-
-(defface orgpan-field
- '((t (:inherit widget-field)))
- "Face for fields."
- :group 'orgpan)
-(defvar orgpan-field-face 'orgpan-field)
-
-(defface orgpan-active-field
- '((t (:inherit highlight)))
- "Face for fields."
- :group 'orgpan)
-(defvar orgpan-active-field-face 'orgpan-active-field)
-
-(defface orgpan-spaceline
- '((t (:height 0.2)))
- "Face for spacing lines."
- :group 'orgpan)
-
-(defcustom orgpan-panel-at-top nil
- "Put org panel at top if non-nil."
- :type 'boolean
- :group 'orgpan)
-
-(defcustom orgpan-panel-buttons nil
- "Panel style, if non-nil use buttons.
-If there are buttons in the panel they are used to change the way
-the arrow keys work. The panel looks something like this, with
-the first button chosen:
-
- [Navigate] [Restructure] [TODO/Priority]
- ----------
- up/down, left: Go to, right: Visibility
-
-The line below the buttons try to give a short hint about what
-the arrow keys does. \(Personally I prefer the version without
-buttons since I then do not have to remember which button is
-active.)"
- :type 'boolean
- :group 'orgpan)
-
-;; Fix-me: add org-mode-map
-;; (memq 'org-self-insert-command orgpan-org-mode-commands)
-;; (memq 'org-self-insert-command orgpan-org-commands)
-(defvar orgpan-org-mode-commands nil)
-(setq orgpan-org-mode-commands nil)
-
-(defconst orgpan-org-commands
- '(
- orgpan-copy-subtree
- orgpan-cut-subtree
- orgpan-paste-subtree
- undo
- save-buffer
- ;;
- ;orgpan-occur
- orgpan-find-org-file
- ;;
- org-cycle
- org-global-cycle
- outline-up-heading
- outline-next-visible-heading
- outline-previous-visible-heading
- outline-forward-same-level
- outline-backward-same-level
- org-todo
- org-show-todo-tree
- org-priority-up
- org-priority-down
- org-move-subtree-up
- org-move-subtree-down
- org-do-promote
- org-do-demote
- org-promote-subtree
- org-demote-subtree))
-
-
-(defvar orgpan-panel-window nil
- "The window showing `orgpan-panel-buffer'.")
-
-(defvar orgpan-panel-buffer nil
- "The panel buffer.
-There can be only one such buffer at any time.")
-
-(defvar orgpan-org-window nil)
-;;(make-variable-buffer-local 'orgpan-org-window)
-
-;; Fix-me: used?
-(defvar orgpan-org-buffer nil)
-;;(make-variable-buffer-local 'orgpan-org-buffer)
-
-(defvar orgpan-last-org-buffer nil)
-;;(make-variable-buffer-local 'orgpan-last-org-buffer)
-
-(defvar orgpan-point nil)
-;;(make-variable-buffer-local 'orgpan-point)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Hook functions etc
-
-(defun orgpan-delete-panel ()
- "Remove the panel."
- (interactive)
- (let ((was-in-panel (and (window-live-p orgpan-panel-window)
- (eq (selected-window) orgpan-panel-window))))
- (when (buffer-live-p orgpan-panel-buffer)
- (delete-windows-on orgpan-panel-buffer)
- (kill-buffer orgpan-panel-buffer))
- (when was-in-panel
- (select-window orgpan-org-window)))
- (setq orgpan-panel-buffer nil)
- (setq orgpan-panel-window nil)
- (orgpan-panel-minor-mode 0)
- (remove-hook 'post-command-hook 'orgpan-minor-post-command)
- (remove-hook 'post-command-hook 'orgpan-mode-post-command)
- ;;(remove-hook 'window-configuration-change-hook 'orgpan-window-config-change)
- )
-
-(defvar orgpan-from-panel 0)
-(defun orgpan-mode-pre-command ()
- ;;(setq orgpan-from-panel nil)
- (condition-case err
- (if (not (and (windowp orgpan-org-window)
- (window-live-p orgpan-org-window)))
- (progn
- (setq this-command 'ignore)
- (orgpan-delete-panel)
- (message "The window belonging to the panel had disappeared, removed panel."))
- (let ((buf (window-buffer orgpan-org-window)))
- (when (with-current-buffer buf
- (derived-mode-p 'org-mode))
- (setq orgpan-last-org-buffer buf))
- ;; Fix me: add a list of those commands that are not
- ;; meaningful from the panel (for example org-time-stamp)
- (when (or (memq this-command orgpan-org-commands)
- (memq this-command orgpan-org-mode-commands)
- ;; For some reason not all org commands are found above:
- (unless (eq this-command 'org-self-insert-command)
- (let ((this-name (format "%s" this-command)))
- (when (< 4 (length this-name))
- (string= "org-" (substring this-name 0 4))))))
- (if (not (with-current-buffer buf
- (derived-mode-p 'org-mode)))
- (progn
- (if (buffer-live-p orgpan-org-buffer)
- (set-window-buffer orgpan-org-window orgpan-org-buffer)
- (message "Please use `l' or `b' to choose an org-mode buffer"))
- (setq this-command 'ignore))
- (setq orgpan-org-buffer (window-buffer orgpan-org-window))
- (setq orgpan-from-panel 1)
- (select-window orgpan-org-window)
- ))))
- (error (lwarn 't :warning "orgpan-pre: %S" err))))
-
-(defun orgpan-mode-post-command ()
- (condition-case err
- (progn
- ;;(message "post %s" (current-time-string))(sit-for 1)
- (unless (and (windowp orgpan-panel-window)
- (window-live-p orgpan-panel-window)
- (bufferp orgpan-panel-buffer)
- (buffer-live-p orgpan-panel-buffer))
- (orgpan-delete-panel))
- (unless (active-minibuffer-window)
- (when (and (= 1 orgpan-from-panel)
- (windowp orgpan-panel-window)
- (window-live-p orgpan-panel-window))
- (select-window orgpan-panel-window)
- (when (derived-mode-p 'orgpan-mode)
- (setq deactivate-mark t)
- (when orgpan-panel-buttons
- (unless (and orgpan-point
- (= (point) orgpan-point))
- ;; Go backward so it is possible to click on a "button":
- (orgpan-backward-field)))))
- (when (< 0 orgpan-from-panel)
- (setq orgpan-from-panel (1- orgpan-from-panel)))
- (unless (eq (selected-window) orgpan-panel-window)
- (orgpan-delete-panel))))
- (error (lwarn 't :warning "orgpan-post: %S" err))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Commands
-
-(defun orgpan-last-buffer ()
- "Open last org-mode buffer in panels org window."
- (interactive)
- (let ((buf (window-buffer orgpan-org-window))
- (last-buf orgpan-last-org-buffer))
-;; (when (with-current-buffer buf
-;; (derived-mode-p 'org-mode))
-;; (setq orgpan-last-org-buffer buf))
- (when (eq last-buf buf)
- (setq last-buf nil))
- (if (not last-buf)
- (orgpan-switch-buffer)
- (set-window-buffer orgpan-org-window last-buf))))
-
-(defun orgpan-switch-buffer ()
- "Switch to next org-mode buffer in panels org window."
- (interactive)
- (let ((buf (window-buffer orgpan-org-window))
- (org-buffers nil))
- (with-current-buffer buf
- (when (derived-mode-p 'org-mode)
- (bury-buffer buf)
- ;;(setq orgpan-last-org-buffer buf)
- ))
- (setq org-buffers (delq nil (mapcar (lambda (buf)
- (when (with-current-buffer buf
- (derived-mode-p 'org-mode))
- buf))
- (buffer-list))))
- (setq org-buffers (delq buf org-buffers))
- (if (not org-buffers)
- (message "No other org-mode buffers")
- (set-window-buffer orgpan-org-window (car org-buffers))
- (setq orgpan-org-buffer (car org-buffers)))))
-
-(defcustom orgpan-cautious-cut-copy-paste nil
- "Ask the user about panel cut, paste and copy before doing them.
-This refers to the functions `orgpan-paste-subtree',
-`orgpan-cut-subtree' and `orgpan-copy-subtree'."
- :type 'boolean
- :group 'orgpan)
-
-(defun orgpan-paste-subtree ()
- (interactive)
- (if orgpan-cautious-cut-copy-paste
- (if (y-or-n-p "Paste subtree here? ")
- (org-paste-subtree)
- (message "Nothing was pasted"))
- (org-paste-subtree)))
-
-(defun orgpan-cut-subtree ()
- (interactive)
- (let ((heading (progn
- (org-back-to-heading)
- (buffer-substring (point) (line-end-position))
- )))
- (if orgpan-cautious-cut-copy-paste
- (if (y-or-n-p (format "Do you want to cut the subtree\n%s\n? " heading))
- (org-cut-subtree)
- (message "Nothing was cut"))
- (org-cut-subtree))))
-
-(defun orgpan-copy-subtree ()
- (interactive)
- (let ((heading (progn
- (org-back-to-heading)
- (buffer-substring (point) (line-end-position))
- )))
- (if orgpan-cautious-cut-copy-paste
- (if (y-or-n-p (format "Do you want to copy the subtree\n%s\n? " heading))
- (org-copy-subtree)
- (message "Nothing was copied"))
- (org-copy-subtree))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Buttons
-
-(defvar orgpan-ovl-help nil)
-
-(defun orgpan-check-panel-mode ()
- (unless (derived-mode-p 'orgpan-mode)
- (error "Not orgpan-mode in buffer: %s" major-mode)))
-
-(defun orgpan-display-bindings-help ()
- ;;(orgpan-check-panel-mode)
- (setq orgpan-point (point-marker))
- (let* ((ovls (overlays-at orgpan-point))
- (ovl (car ovls))
- (help (when ovl (overlay-get ovl 'orgpan-explain))))
- (dolist (o (overlays-in (point-min) (point-max)))
- (unless ovl (setq ovl o))
- (overlay-put o 'face orgpan-field-face))
- (overlay-put ovl 'face orgpan-active-field-face)
- (unless orgpan-ovl-help
- (setq orgpan-ovl-help (make-overlay orgpan-point orgpan-point)))
- (overlay-put orgpan-ovl-help 'before-string help)))
-
-(defun orgpan-forward-field ()
- (interactive)
- (orgpan-check-panel-mode)
- (let ((pos (next-overlay-change (point))))
- (unless (overlays-at pos)
- (setq pos (next-overlay-change pos)))
- (when (= pos (point-max))
- (setq pos (point-min))
- (unless (overlays-at pos)
- (setq pos (next-overlay-change pos))))
- (goto-char pos))
- (orgpan-display-bindings-help))
-
-(defun orgpan-backward-field ()
- (interactive)
- (orgpan-check-panel-mode)
- (when (= (point) (point-min))
- (goto-char (point-max)))
- (let ((pos (previous-overlay-change (point))))
- (unless (overlays-at pos)
- (setq pos (previous-overlay-change pos)))
- (goto-char pos))
- (orgpan-display-bindings-help))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Mode
-(defun orgpan-agenda ()
- "Start agenda"
- (interactive)
- (orgpan-delete-panel)
- (call-interactively 'org-agenda))
-
-(defun orgpan-outline-up-heading (arg &optional invisible-ok)
- (interactive "p")
- (outline-back-to-heading invisible-ok)
- (let ((start-level (funcall outline-level)))
- (if (<= start-level 1)
- (message "Already at top level of the outline")
- (outline-up-heading arg invisible-ok))))
-
-(defvar orgpan-mode-map
- ;; Fix-me: clean up here!
- ;; Fix-me: viper support
- (let ((map (make-sparse-keymap)))
- (define-key map [?q] 'orgpan-delete-panel)
- (define-key map [??] 'orgpan-help)
- (define-key map [?a] 'orgpan-agenda)
- ;; Copying etc
- (define-key map [?c] 'orgpan-copy-subtree)
- (define-key map [?x] 'orgpan-cut-subtree)
- (define-key map [?v] 'orgpan-paste-subtree)
- (define-key map [?z] 'undo)
- (define-key map [(control ?c)] 'orgpan-copy-subtree)
- (define-key map [(control ?x)] 'orgpan-cut-subtree)
- (define-key map [(control ?v)] 'orgpan-paste-subtree)
- (define-key map [(control ?z)] 'undo)
- ;; Buffers:
- (define-key map [?b] 'orgpan-switch-buffer)
- (define-key map [?l] 'orgpan-last-buffer)
- (define-key map [?o] 'orgpan-find-org-file)
- (define-key map [?w] 'save-buffer)
- ;; Some keys for moving between headings. Emacs keys for next/prev
- ;; line seems ok:
- (define-key map [(control ?p)] 'outline-previous-visible-heading)
- (define-key map [(control ?n)] 'outline-next-visible-heading)
- (define-key map [(shift control ?p)] 'outline-backward-same-level)
- (define-key map [(shift control ?n)] 'outline-forward-same-level)
- ;; A mnemunic for up:
- (define-key map [(control ?u)] 'orgpan-outline-up-heading)
- ;; Search sparse tree:
- (define-key map [?s] 'org-sparse-tree)
- ;;(define-key map [?s] 'orgpan-occur)
- ;;(define-key map [?s] 'org-occur)
- ;; Same as in org-mode:
- ;;(define-key map [(control ?c)(control ?v)] 'org-show-todo-tree)
- ;; Fix-me: This leads to strange problems:
- ;;(define-key map [t] 'ignore)
- map))
-
-(defun orgpan-find-org-file ()
- "Prompt for an .org file and open it."
- (interactive)
- (let ((file-name
- (read-file-name
- "Find .org file: " nil nil t nil
- (lambda (fn)
- (unless (backup-file-name-p fn)
- (let ((ext (file-name-extension fn)))
- (when ext
- (string= "org" ext))))))))
- (find-file file-name)))
-
-(defun orgpan-occur ()
- "Replacement for `org-occur'.
-Technical reasons."
- (interactive)
- (let ((rgx (read-from-minibuffer "(panel) Regexp: ")))
- (setq orgpan-from-panel 1)
- (select-window orgpan-org-window)
- (org-occur rgx)))
-
-(defun orgpan-sparse-tree (&optional arg)
- "Create a sparse tree, prompt for the details.
-This command can create sparse trees. You first need to select the type
-of match used to create the tree:
-
-t Show entries with a specific TODO keyword.
-T Show entries selected by a tags match.
-p Enter a property name and its value (both with completion on existing
- names/values) and show entries with that property.
-r Show entries matching a regular expression"
- (interactive "P")
- (let (ans kwd value)
- (message "Sparse tree: [r]egexp [t]odo-kwd [T]ag [p]roperty")
- (setq ans (read-char-exclusive))
- (cond
- ((equal ans ?t)
- (org-show-todo-tree '(4)))
- ((equal ans ?T)
- (call-interactively 'org-tags-sparse-tree))
- ((member ans '(?p ?P))
- (setq kwd (completing-read "Property: "
- (mapcar 'list (org-buffer-property-keys))))
- (setq value (completing-read "Value: "
- (mapcar 'list (org-property-values kwd))))
- (unless (string-match "\\`{.*}\\'" value)
- (setq value (concat "\"" value "\"")))
- (org-tags-sparse-tree arg (concat kwd "=" value)))
- ((member ans '(?r ?R))
- (call-interactively 'org-occur))
- (t (error "No such sparse tree command \"%c\"" ans)))))
-
-;; (defun orgpan-avoid-viper-in-buffer ()
-;; ;; Fix-me: This is ugly. However see `this-major-mode-requires-vi-state':
-;; (set (make-local-variable 'viper-emacs-state-mode-list) '(orgpan-mode))
-;; (set (make-local-variable 'viper-new-major-mode-buffer-list) nil)
-;; (local-set-key [?\ ] 'ignore))
-
-(define-derived-mode orgpan-mode nil "Org-Panel"
- "Mode for org-simple.el control panel."
- (set (make-local-variable 'buffer-read-only) t)
- (unless orgpan-minor-mode-version
- (add-hook 'pre-command-hook 'orgpan-mode-pre-command nil t)
- (add-hook 'post-command-hook 'orgpan-mode-post-command t))
- (set (make-local-variable 'cursor-type) nil)
- (when (boundp 'yas/dont-activate) (setq yas/dont-activate t))
- ;; Avoid emulation modes here (cua, viper):
- (set (make-local-variable 'emulation-mode-map-alists) nil))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Panel layout
-
-(defun orgpan-insert-field (text keymap explain)
- (insert text)
- (let* ((end (point))
- (len (length text))
- (beg (- end len))
- (ovl (make-overlay beg end)))
- (overlay-put ovl 'face orgpan-field-face)
- (overlay-put ovl 'keymap keymap)
- (overlay-put ovl 'orgpan-explain explain)))
-
-(defconst orgpan-with-keymap
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map org-mode-map)
- ;; Users are used to tabbing between fields:
- (define-key map [(tab)] 'orgpan-forward-field)
- (define-key map [(shift tab)] 'orgpan-backward-field)
- (define-key map [backtab] 'orgpan-backward-field)
- ;; Now we must use something else for visibility (first does not
- ;; work if Viper):
- (define-key map [(meta tab)] 'org-cycle)
- (define-key map [(control meta tab)] 'org-global-cycle)
- map))
-
-(defconst orgpan-without-keymap
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map org-mode-map)
- ;; Visibility (those are in org-mode-map):
- ;;(define-key map [tab] 'org-cycle)
- ;;(define-key map [(shift tab)] 'org-global-cycle)
- ;; Navigate:
- (define-key map [left] 'orgpan-outline-up-heading)
- (define-key map [right] 'org-cycle)
- (define-key map [up] 'outline-previous-visible-heading)
- (define-key map [down] 'outline-next-visible-heading)
- (define-key map [(shift down)] 'outline-forward-same-level)
- (define-key map [(shift up)] 'outline-backward-same-level)
- ;; Restructure:
- (define-key map [(control up)] 'org-move-subtree-up)
- (define-key map [(control down)] 'org-move-subtree-down)
- (define-key map [(control left)] 'org-do-promote)
- (define-key map [(control right)] 'org-do-demote)
- (define-key map [(control shift left)] 'org-promote-subtree)
- (define-key map [(control shift right)] 'org-demote-subtree)
- ;; Todo etc
- (define-key map [?+] 'org-priority-up)
- (define-key map [?-] 'org-priority-down)
- (define-key map [?t] 'org-todo)
- map))
-
-(defun orgpan-make-panel-without-buttons (buf)
- (with-current-buffer buf
- (insert (propertize "*Org Panel*" 'face 'orgpan-active-field))
- (let ((ovl (make-overlay (point-min) (point-max))))
- (overlay-put ovl 'priority 10)
- (overlay-put ovl 'face 'orgpan-active-field))
- (insert " ? for help, q quit\n")
- (insert (propertize "arrows" 'face 'font-lock-keyword-face)
- ": Go to, "
- (propertize "C-arrows" 'face 'font-lock-keyword-face)
- ": Edit tree\n"
- (propertize "C-cxvz" 'face 'font-lock-keyword-face)
- ": copy cut paste undo, "
- (propertize "tT+-" 'face 'font-lock-keyword-face)
- ": todo priority, "
- (propertize "s" 'face 'font-lock-keyword-face)
- ": search, "
- (propertize "o" 'face 'font-lock-keyword-face)
- ": open file\n"
- (propertize "w" 'face 'font-lock-keyword-face)
- ": write, "
- (propertize "a" 'face 'font-lock-keyword-face)
- ": agenda"
- "\n"
- )
- (set-keymap-parent orgpan-mode-map orgpan-without-keymap)
- (let ((ovl (make-overlay (point-min) (point-max))))
- (overlay-put ovl 'face 'secondary-selection))
- ))
-
-(defun orgpan-make-panel-with-buttons (buf)
- (with-current-buffer buf
- (let* ((base-map (make-sparse-keymap))
- (space-line (propertize "\n\n" 'face 'orgpan-spaceline))
- (arrow-face 'font-lock-keyword-face)
- (L (propertize "left" 'face arrow-face))
- (R (propertize "right" 'face arrow-face))
- (U (propertize "up" 'face arrow-face))
- (D (propertize "down" 'face arrow-face)))
- ;;(message D)(sit-for 2)
- (define-key base-map [left] 'ignore)
- (define-key base-map [right] 'ignore)
- (define-key base-map [up] 'ignore)
- (define-key base-map [down] 'ignore)
- (define-key base-map [?q] 'delete-window)
- (define-key base-map [??] 'orgpan-help)
- ;; Navigating
- (let ((map (copy-keymap base-map)))
- (define-key map [left] 'outline-up-heading)
- (define-key map [right] 'org-cycle)
- (define-key map [up] 'outline-previous-visible-heading)
- (define-key map [down] 'outline-next-visible-heading)
- (define-key map [(shift down)] 'outline-forward-same-level)
- (define-key map [(shift up)] 'outline-backward-same-level)
- (orgpan-insert-field "Navigate" map (concat U "/" D ", " L ": Go to, " R ": Visibility")))
- (insert " ")
- (let ((map (copy-keymap base-map)))
- (define-key map [up] 'org-move-subtree-up)
- (define-key map [down] 'org-move-subtree-down)
- (define-key map [left] 'org-do-promote)
- (define-key map [right] 'org-do-demote)
- (define-key map [(shift left)] 'org-promote-subtree)
- (define-key map [(shift right)] 'org-demote-subtree)
- (orgpan-insert-field
- "Restructure" map
- (concat U "/" D ": "
- (propertize "Move" 'face 'font-lock-warning-face)
- ", " L "/" R ": "
- (propertize "Level (w S: Subtree Level)" 'face 'font-lock-warning-face))))
- (insert " ")
- (let ((map (copy-keymap base-map)))
- (define-key map [up] 'org-priority-up)
- (define-key map [down] 'org-priority-down)
- (define-key map [right] 'org-todo)
- (orgpan-insert-field "TODO/priority" map
- (concat R ": TODO, " U "/" D ": Priority")))
- )
- (insert " ? for help, q quit\n")
- (orgpan-display-bindings-help)
- (set-keymap-parent orgpan-mode-map orgpan-with-keymap)
- ))
-
-(defun orgpan-make-panel-buffer ()
- "Make the panel buffer."
- (let* ((buf-name "*Org Panel*"))
- (when orgpan-panel-buffer (kill-buffer orgpan-panel-buffer))
- ;;(with-current-buffer orgpan-panel-buffer (orgpan-mode))
- (setq orgpan-panel-buffer (get-buffer-create buf-name))
- (if orgpan-panel-buttons
- (orgpan-make-panel-with-buttons orgpan-panel-buffer)
- (orgpan-make-panel-without-buttons orgpan-panel-buffer))
- (with-current-buffer orgpan-panel-buffer
- (orgpan-mode)
- (goto-char (point-min)))
- orgpan-panel-buffer))
-
-(defun orgpan-help ()
- (interactive)
- (set-keymap-parent orgpan-with-keymap nil)
- (set-keymap-parent orgpan-without-keymap nil)
- (describe-function 'orgpan-panel)
- (set-keymap-parent orgpan-with-keymap org-mode-map)
- (set-keymap-parent orgpan-without-keymap org-mode-map)
- (message "Use 'l' to get back to last viewed org file"))
-
-(defcustom orgpan-panel-height 5
- "Panel height"
- :type '(choice (integer :tag "One line" 2)
- (integer :tag "All lines" 5))
- :group 'orgpan)
-
-(defun orgpan-panel ()
- "Create a control panel for current `org-mode' buffer.
-The control panel may be used to quickly move around and change
-the headings. The idea is that when you want to to a lot of this
-kind of editing you should be able to do that with few
-keystrokes (and without having to remember the complicated
-keystrokes). A typical situation when this perhaps can be useful
-is when you are looking at your notes file \(usually ~/.notes,
-see `remember-data-file') where you have saved quick notes with
-`remember'.
-
-The keys below are defined in the panel. Note that the commands
-are carried out in the `org-mode' buffer that belongs to the
-panel.
-
-\\{orgpan-mode-map}
-
-In addition to the keys above most of the keys in `org-mode' can
-also be used from the panel.
-
-Note: There are two forms of the control panel, one with buttons
-and one without. The default is without, see
-`orgpan-panel-buttons'. If buttons are used choosing a different
-button changes the binding of the arrow keys."
- (interactive)
- (unless (derived-mode-p 'org-mode)
- (error "Buffer is not in org-mode"))
- (orgpan-delete-panel)
- (unless orgpan-org-mode-commands
- (map-keymap (lambda (ev def)
- (when (and def
- (symbolp def)
- (fboundp def))
- (setq orgpan-org-mode-commands
- (cons def orgpan-org-mode-commands))))
- org-mode-map))
- (remq 'org-self-insert-command orgpan-org-mode-commands)
- ;;(org-back-to-heading)
- ;;(remove-hook 'window-configuration-change-hook 'orgpan-window-config-change)
- (split-window)
- (if orgpan-panel-at-top
- (setq orgpan-org-window (next-window))
- (setq orgpan-org-window (selected-window))
- (select-window (next-window)))
- (set-window-buffer (selected-window) (orgpan-make-panel-buffer))
- (setq orgpan-panel-window (selected-window))
- (set-window-dedicated-p orgpan-panel-window t)
- (adjust-window-trailing-edge orgpan-org-window
- (- (window-height) orgpan-panel-height) nil)
- ;; The minor mode version starts here:
- (when orgpan-minor-mode-version
- (select-window orgpan-org-window)
- (orgpan-panel-minor-mode 1)
- (add-hook 'post-command-hook 'orgpan-minor-post-command t)))
-
-(define-minor-mode orgpan-panel-minor-mode
- "Minor mode used in `org-mode' buffer when showing panel."
- :keymap orgpan-mode-map
- :lighter " PANEL"
- :group 'orgpan
- )
-
-(defun orgpan-minor-post-command ()
- ;; Check org window and buffer
- (if (and (windowp orgpan-org-window)
- (window-live-p orgpan-org-window)
- (eq orgpan-org-window (selected-window))
- (derived-mode-p 'org-mode)
- ;; Check panel window and buffer
- (windowp orgpan-panel-window)
- (window-live-p orgpan-panel-window)
- (bufferp orgpan-panel-buffer)
- (buffer-live-p orgpan-panel-buffer)
- (eq (window-buffer orgpan-panel-window) orgpan-panel-buffer)
- ;; Check minor mode
- orgpan-panel-minor-mode)
- (setq cursor-type nil)
- (orgpan-delete-panel)))
-
-
-(provide 'org-panel)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; org-panel.el ends here
diff --git a/emacs.d/nxhtml/util/ourcomments-util.el b/emacs.d/nxhtml/util/ourcomments-util.el
deleted file mode 100644
index 5e9c2e6..0000000
--- a/emacs.d/nxhtml/util/ourcomments-util.el
+++ /dev/null
@@ -1,2427 +0,0 @@
-;;; ourcomments-util.el --- Utility routines
-;;
-;; Author: Lennart Borgman <lennart dot borgman at gmail dot com>
-;; Created: Wed Feb 21 2007
-(defconst ourcomments-util:version "0.25") ;;Version:
-;; Last-Updated: 2009-08-04 Tue
-;; Keywords:
-;; Compatibility: Emacs 22
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; The functionality given by these small routines should in my
-;; opinion be part of Emacs (but they are not that currently).
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'apropos))
-(eval-when-compile (require 'bookmark))
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'grep))
-(eval-when-compile (require 'ido))
-(eval-when-compile (require 'org))
-(eval-when-compile (require 'recentf))
-(eval-when-compile (require 'uniquify))
-
-(require 'cus-edit)
-
-;; (ourcomments-indirect-fun 'html-mumamo)
-;; (ourcomments-indirect-fun 'html-mumamo-mode)
-;;;###autoload
-(defun ourcomments-indirect-fun (fun)
- "Get the alias symbol for function FUN if any."
- ;; This code is from `describe-function-1'.
- (when (and (symbolp fun)
- (functionp fun))
- (let ((def (symbol-function fun)))
- (when (symbolp def)
- (while (and (fboundp def)
- (symbolp (symbol-function def)))
- (setq def (symbol-function def)))
- def))))
-
-(defun ourcomments-goto-line (line)
- "A version of `goto-line' for use in elisp code."
- (save-restriction
- (widen)
- (goto-char (point-min))
- (forward-line (1- line))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Popups etc.
-
-(defun point-to-coord (point)
- "Return coordinates of POINT in selected window.
-The coordinates are in the form \(\(XOFFSET YOFFSET) WINDOW).
-This form is suitable for `popup-menu'."
- ;; Fix-me: showtip.el adds (window-inside-pixel-edges
- ;; (selected-window)). Why?
- (let* ((pn (posn-at-point point))
- (x-y (posn-x-y pn))
- (x (car x-y))
- (y (cdr x-y))
- (pos (list (list x (+ y 20)) (selected-window))))
- pos))
-
-;;;###autoload
-(defun popup-menu-at-point (menu &optional prefix)
- "Popup the given menu at point.
-This is similar to `popup-menu' and MENU and PREFIX has the same
-meaning as there. The position for the popup is however where
-the window point is."
- (let ((where (point-to-coord (point))))
- (popup-menu menu where prefix)))
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Toggles in menus
-
-;;;###autoload
-(defmacro define-toggle (symbol value doc &rest args)
- "Declare SYMBOL as a customizable variable with a toggle function.
-The purpose of this macro is to define a defcustom and a toggle
-function suitable for use in a menu.
-
-The arguments have the same meaning as for `defcustom' with these
-restrictions:
-
-- The :type keyword cannot be used. Type is always 'boolean.
-- VALUE must be t or nil.
-
-DOC and ARGS are just passed to `defcustom'.
-
-A `defcustom' named SYMBOL with doc-string DOC and a function
-named SYMBOL-toggle is defined. The function toggles the value
-of SYMBOL. It takes no parameters.
-
-To create a menu item something similar to this can be used:
-
- \(define-key map [SYMBOL]
- \(list 'menu-item \"Toggle nice SYMBOL\"
- 'SYMBOL-toggle
- :button '(:toggle . SYMBOL)))"
- (declare
- (doc-string 3)
- (debug t))
- (let* ((SYMBOL-toggle (intern (concat (symbol-name symbol) "-toggle")))
- (SYMBOL-name (symbol-name symbol))
- (var-doc doc)
- (fun-doc (concat "Toggles the \(boolean) value of `"
- SYMBOL-name
- "'.\n"
- "For how to set it permanently see this variable.\n"
- )))
- (let ((var (append `(defcustom ,symbol ,value ,var-doc)
- args
- nil))
- (fun `(defun ,SYMBOL-toggle ()
- ,fun-doc
- (interactive)
- (customize-set-variable (quote ,symbol) (not ,symbol)))))
- ;;(message "\nvar=%S\nfun=%S\n" var fun)
- ;; Fix-me: I am having problems with this one, see
- ;; http://lists.gnu.org/archive/html/help-gnu-emacs/2009-12/msg00608.html
- `(progn ,var ,fun)
- )))
-
-;;(macroexpand '(define-toggle my-toggle t "doc" :tag "Short help" :group 'popcmp))
-;;(macroexpand-all (define-toggle my-toggle t "doc" :tag "Short help" :group 'popcmp))
-
-;;;###autoload
-(defmacro define-toggle-old (symbol value doc &rest args)
- (declare (doc-string 3))
- (list
- 'progn
- (let ((var-decl (list 'custom-declare-variable
- (list 'quote symbol)
- (list 'quote value)
- doc)))
- (while args
- (let ((arg (car args)))
- (setq args (cdr args))
- (unless (symbolp arg)
- (error "Junk in args %S" args))
- (let ((keyword arg)
- (value (car args)))
- (unless args
- (error "Keyword %s is missing an argument" keyword))
- (setq args (cdr args))
- (cond
- ((not (memq keyword '(:type)))
- (setq var-decl (append var-decl (list keyword value))))
- (t
- (lwarn '(define-toggle) :error "Keyword %s can't be used here"
- keyword))))))
- (when (assoc :type var-decl) (error ":type is set. Should not happen!"))
- (setq var-decl (append var-decl (list :type '(quote boolean))))
- var-decl)
- (let* ((SYMBOL-toggle (intern (concat (symbol-name symbol) "-toggle")))
- (SYMBOL-name (symbol-name symbol))
- (fun-doc (concat "Toggles the \(boolean) value of `"
- SYMBOL-name
- "'.\n"
- "For how to set it permanently see this variable.\n"
- ;;"\nDescription of `" SYMBOL-name "':\n" doc
- )))
- `(defun ,SYMBOL-toggle ()
- ,fun-doc
- (interactive)
- (customize-set-variable (quote ,symbol) (not ,symbol)))
- )))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Indentation of regions
-
-;; From an idea by weber <hugows@gmail.com>
-;; (defun indent-line-or-region ()
-;; "Indent line or region.
-;; Only do this if indentation seems bound to \\t.
-
-;; Call `indent-region' if region is active, otherwise
-;; `indent-according-to-mode'."
-;; (interactive)
-;; ;; Do a wild guess if we should indent or not ...
-;; (let* ((indent-region-mode)
-;; ;; The above hides the `indent-line-or-region' binding
-;; (t-bound (key-binding [?\t])))
-;; (if (not
-;; (save-match-data
-;; (string-match "indent" (symbol-name t-bound))))
-;; (call-interactively t-bound t)
-;; (if (and mark-active ;; there is a visible region selected
-;; transient-mark-mode)
-;; (indent-region (region-beginning) (region-end))
-;; (indent-according-to-mode))))) ;; indent line
-
-;; (define-minor-mode indent-region-mode
-;; "Use \\t to indent line or region.
-;; The key \\t is bound to `indent-line-or-region' if this mode is
-;; on."
-;; :global t
-;; :keymap '(([?\t] . indent-line-or-region)))
-;; (when indent-region-mode (indent-region-mode 1))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Minor modes
-
-;; (defmacro define-globalized-minor-mode-with-on-off (global-mode mode
-;; turn-on turn-off
-;; &rest keys)
-;; "Make a global mode GLOBAL-MODE corresponding to buffer-local minor MODE.
-;; This is a special variant of `define-globalized-minor-mode' for
-;; mumamo. It let bounds the variable GLOBAL-MODE-checking before
-;; calling TURN-ON or TURN-OFF.
-
-;; TURN-ON is a function that will be called with no args in every buffer
-;; and that should try to turn MODE on if applicable for that buffer.
-;; TURN-OFF is a function that turns off MODE in a buffer.
-;; KEYS is a list of CL-style keyword arguments. As the minor mode
-;; defined by this function is always global, any :global keyword is
-;; ignored. Other keywords have the same meaning as in `define-minor-mode',
-;; which see. In particular, :group specifies the custom group.
-;; The most useful keywords are those that are passed on to the
-;; `defcustom'. It normally makes no sense to pass the :lighter
-;; or :keymap keywords to `define-globalized-minor-mode', since these
-;; are usually passed to the buffer-local version of the minor mode.
-
-;; If MODE's set-up depends on the major mode in effect when it was
-;; enabled, then disabling and reenabling MODE should make MODE work
-;; correctly with the current major mode. This is important to
-;; prevent problems with derived modes, that is, major modes that
-;; call another major mode in their body."
-
-;; (let* ((global-mode-name (symbol-name global-mode))
-;; (pretty-name (easy-mmode-pretty-mode-name mode))
-;; (pretty-global-name (easy-mmode-pretty-mode-name global-mode))
-;; (group nil)
-;; (extra-keywords nil)
-;; (MODE-buffers (intern (concat global-mode-name "-buffers")))
-;; (MODE-enable-in-buffers
-;; (intern (concat global-mode-name "-enable-in-buffers")))
-;; (MODE-check-buffers
-;; (intern (concat global-mode-name "-check-buffers")))
-;; (MODE-cmhh (intern (concat global-mode-name "-cmhh")))
-;; (MODE-major-mode (intern (concat (symbol-name mode)
-;; "-major-mode")))
-;; (MODE-checking (intern (concat global-mode-name "-checking")))
-;; keyw)
-
-;; ;; Check keys.
-;; (while (keywordp (setq keyw (car keys)))
-;; (setq keys (cdr keys))
-;; (case keyw
-;; (:group (setq group (nconc group (list :group (pop keys)))))
-;; (:global (setq keys (cdr keys)))
-;; (t (push keyw extra-keywords) (push (pop keys) extra-keywords))))
-
-;; (unless group
-;; ;; We might as well provide a best-guess default group.
-;; (setq group
-;; `(:group ',(intern (replace-regexp-in-string
-;; "-mode\\'" "" (symbol-name mode))))))
-
-;; `(progn
-
-;; ;; Define functions for the global mode first so that it can be
-;; ;; turned on during load:
-
-;; ;; List of buffers left to process.
-;; (defvar ,MODE-buffers nil)
-
-;; ;; The function that calls TURN-ON in each buffer.
-;; (defun ,MODE-enable-in-buffers ()
-;; (let ((,MODE-checking nil))
-;; (dolist (buf ,MODE-buffers)
-;; (when (buffer-live-p buf)
-;; (with-current-buffer buf
-;; (if ,mode
-;; (unless (eq ,MODE-major-mode major-mode)
-;; (setq ,MODE-checking t)
-;; (,mode -1)
-;; (,turn-on)
-;; (setq ,MODE-checking nil)
-;; (setq ,MODE-major-mode major-mode))
-;; (setq ,MODE-checking t)
-;; (,turn-on)
-;; (setq ,MODE-checking nil)
-;; (setq ,MODE-major-mode major-mode)))))))
-;; (put ',MODE-enable-in-buffers 'definition-name ',global-mode)
-
-;; (defun ,MODE-check-buffers ()
-;; (,MODE-enable-in-buffers)
-;; (setq ,MODE-buffers nil)
-;; (remove-hook 'post-command-hook ',MODE-check-buffers))
-;; (put ',MODE-check-buffers 'definition-name ',global-mode)
-
-;; ;; The function that catches kill-all-local-variables.
-;; (defun ,MODE-cmhh ()
-;; (add-to-list ',MODE-buffers (current-buffer))
-;; (add-hook 'post-command-hook ',MODE-check-buffers))
-;; (put ',MODE-cmhh 'definition-name ',global-mode)
-
-
-;; (defvar ,MODE-major-mode nil)
-;; (make-variable-buffer-local ',MODE-major-mode)
-
-;; ;; The actual global minor-mode
-;; (define-minor-mode ,global-mode
-;; ,(format "Toggle %s in every possible buffer.
-;; With prefix ARG, turn %s on if and only if ARG is positive.
-;; %s is enabled in all buffers where `%s' would do it.
-;; See `%s' for more information on %s."
-;; pretty-name pretty-global-name pretty-name turn-on
-;; mode pretty-name)
-;; :global t ,@group ,@(nreverse extra-keywords)
-
-;; ;; Setup hook to handle future mode changes and new buffers.
-;; (if ,global-mode
-;; (progn
-;; (add-hook 'after-change-major-mode-hook
-;; ',MODE-enable-in-buffers)
-;; ;;(add-hook 'find-file-hook ',MODE-check-buffers)
-;; (add-hook 'find-file-hook ',MODE-cmhh)
-;; (add-hook 'change-major-mode-hook ',MODE-cmhh))
-;; (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
-;; ;;(remove-hook 'find-file-hook ',MODE-check-buffers)
-;; (remove-hook 'find-file-hook ',MODE-cmhh)
-;; (remove-hook 'change-major-mode-hook ',MODE-cmhh))
-
-;; ;; Go through existing buffers.
-;; (let ((,MODE-checking t))
-;; (dolist (buf (buffer-list))
-;; (with-current-buffer buf
-;; ;;(if ,global-mode (,turn-on) (when ,mode (,mode -1)))
-;; (if ,global-mode (,turn-on) (,turn-off))
-;; ))))
-
-;; )))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Unfilling
-;;
-;; The idea is from
-;; http://interglacial.com/~sburke/pub/emacs/sburke_dot_emacs.config
-
-;;;###autoload
-(defun unfill-paragraph ()
- "Unfill the current paragraph."
- (interactive) (with-unfilling 'fill-paragraph))
-;;(defalias 'unwrap-paragraph 'unfill-paragraph)
-
-;;;###autoload
-(defun unfill-region ()
- "Unfill the current region."
- (interactive) (with-unfilling 'fill-region))
-;;(defalias 'unwrap-region 'unfill-region)
-
-;;;###autoload
-(defun unfill-individual-paragraphs ()
- "Unfill individual paragraphs in the current region."
- (interactive) (with-unfilling 'fill-individual-paragraphs))
-;;(defalias 'unwrap-individual-paragraphs 'unfill-individual-paragraphs)
-
-(defun with-unfilling (fn)
- "Unfill using the fill function FN."
- (let ((fill-column (1+ (point-max)))) (call-interactively fn)))
-
-(defvar fill-dwim-state nil)
-(defvar fill-dwim-mark nil)
-
-;;;###autoload
-(defun fill-dwim (arg)
- "Fill or unfill paragraph or region.
-With prefix ARG fill only current line."
- (interactive "P")
- (or arg
- (not fill-dwim-mark)
- (equal (point-marker) fill-dwim-mark)
- (setq fill-dwim-state nil))
- (if mark-active
- ;; This avoids deactivating the mark
- (progn
- (if fill-dwim-state
- (call-interactively 'unfill-region)
- (call-interactively 'fill-region))
- (setq deactivate-mark nil))
- (if arg
- (fill-region (line-beginning-position) (line-end-position))
- (if fill-dwim-state
- (call-interactively 'unfill-paragraph)
- (call-interactively 'fill-paragraph))))
- (setq fill-dwim-mark (copy-marker (point)))
- (unless arg
- (setq fill-dwim-state (not fill-dwim-state))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Widgets
-
-;;;###autoload
-(defun ourcomments-mark-whole-buffer-or-field ()
- "Mark whole buffer or editable field at point."
- (interactive)
- (let* ((field (widget-field-at (point)))
- (from (when field (widget-field-start field)))
- (to (when field (widget-field-end field)))
- (size (when field (widget-get field :size))))
- (if (not field)
- (mark-whole-buffer)
- (while (and size
- (not (zerop size))
- (> to from)
- (eq (char-after (1- to)) ?\s))
- (setq to (1- to)))
- (push-mark (point))
- (push-mark from nil t)
- (goto-char to))))
-
-;; (rassq 'genshi-nxhtml-mumamo-mode mumamo-defined-turn-on-functions)
-;; (major-modep 'nxhtml-mode)
-;; (major-modep 'nxhtml-mumamo-mode)
-;; (major-modep 'jsp-nxhtml-mumamo-mode)
-;; (major-modep 'gsp-nxhtml-mumamo-mode)
-;; (major-modep 'asp-nxhtml-mumamo-mode)
-;; (major-modep 'django-nxhtml-mumamo-mode)
-;; (major-modep 'eruby-nxhtml-mumamo-mode)
-;; (major-modep 'eruby-nxhtml-mumamo-mode)
-;; (major-modep 'smarty-nxhtml-mumamo-mode)
-;; (major-modep 'embperl-nxhtml-mumamo-mode)
-;; (major-modep 'laszlo-nxml-mumamo-mode)
-;; (major-modep 'genshi-nxhtml-mumamo-mode)
-;; (major-modep 'javascript-mode)
-;; (major-modep 'espresso-mode)
-;; (major-modep 'css-mode)
-;; (major-modep 'js-mode)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Lines
-
-;; Changed from move-beginning-of-line to beginning-of-line to support
-;; physical-line-mode.
-;; Fix-me: use end-of-visual-line etc.
-;;;###autoload
-(defun ourcomments-move-beginning-of-line(arg)
- "Move point to beginning of line or indentation.
-See `beginning-of-line' for ARG.
-
-If `line-move-visual' is non-nil then the visual line beginning
-is first tried.
-
-If in a widget field stay in that."
- (interactive "p")
- (let ((pos (point))
- vis-pos
- (field (widget-field-at (point))))
- (when line-move-visual
- (line-move-visual -1 t)
- (beginning-of-line)
- (setq vis-pos (point))
- (goto-char pos))
- (call-interactively 'beginning-of-line arg)
- (when (and vis-pos
- (= vis-pos (point)))
- (while (and (> pos (point))
- (not (eobp)))
- (let (last-command)
- (line-move-visual 1 t)))
- (line-move-visual -1 t))
- (when (= pos (point))
- (if (= 0 (current-column))
- (skip-chars-forward " \t")
- (backward-char)
- (beginning-of-line)))
- (when (and field
- (< (point) (widget-field-start field)))
- (goto-char (widget-field-start field)))))
-(put 'ourcomments-move-beginning-of-line 'CUA 'move)
-
-;;;###autoload
-(defun ourcomments-move-end-of-line(arg)
- "Move point to end of line or after last non blank char.
-See `end-of-line' for ARG.
-
-Similar to `ourcomments-move-beginning-of-line' but for end of
-line."
- (interactive "p")
- (or arg (setq arg 1))
- (let ((pos (point))
- vis-pos
- eol-pos)
- (when line-move-visual
- (let (last-command) (line-move-visual 1 t))
- (end-of-line)
- (setq vis-pos (point))
- (goto-char pos))
- (call-interactively 'end-of-line arg)
- (when (and vis-pos
- (= vis-pos (point)))
- (setq eol-pos (point))
- (beginning-of-line)
- (let (last-command) (line-move-visual 1 t))
- ;; move backwards if we moved to a new line
- (unless (= (point) eol-pos)
- (backward-char)))
- (when (= pos (point))
- (if (= (line-end-position) (point))
- (skip-chars-backward " \t")
- (forward-char)
- (end-of-line)))))
-(put 'ourcomments-move-end-of-line 'CUA 'move)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Keymaps
-
-(defun ourcomments-find-keymap-variables (key--- binding--- keymap---)
- "Return a list of matching keymap variables.
-They should have key KEY--- bound to BINDING--- and have value
-KEYMAP---.
-
-Ignore `special-event-map', `global-map', `overriding-local-map'
-and `overriding-terminal-local-map'."
- (let ((vars--- nil)
- (ancestors--- nil))
- (let ((parent (keymap-parent keymap---)))
- (while parent
- (setq ancestors--- (cons parent ancestors---))
- (setq parent (keymap-parent parent))))
- (mapatoms (lambda (symbol)
- (unless (memq symbol '(keymap---
- ancestors---
- vars---
- special-event-map
- global-map
- overriding-local-map
- overriding-terminal-local-map
- ))
- (let (val)
- (if (boundp symbol)
- (setq val (symbol-value symbol))
- (when (keymapp symbol)
- (setq val (symbol-function symbol))))
- (when (and val
- (keymapp val)
- (eq binding--- (lookup-key val key--- t)))
- (if (equal val keymap---)
- (push symbol vars---)
- (when ancestors---
- (catch 'found
- (dolist (ancestor ancestors---)
- (when (equal val ancestor)
- (push symbol vars---)
- (throw 'found nil)))))))))))
-;;; (let ((childs nil))
-;;; (dolist (var vars---)
-;;; (dolist (ancestor ancestors---)
-;;; (when (equal (keymap-parent var)
-;;; (
- vars---))
-
-;; This is modelled after `current-active-maps'.
-(defun key-bindings (key &optional olp position)
- "Return list of bindings for key sequence KEY in current keymaps.
-The first binding is the active binding and the others are
-bindings shadowed by this in the order of their priority level
-\(see Info node `(elisp) Searching Keymaps').
-
-The entries in the list have the form
-
- \(BINDING (MAPS) MORE-INFO)
-
-where BINDING is the command bound to and MAPS are matching maps
-\(according to `ourcomments-find-keymap-variables').
-
-MORE-INFO is a list with more information
-
- \(PRIORITY-LEVEL \[ACTIVE-WHEN])
-
-where PRIORITY-LEVEL is a symbol matching the level where the
-keymap is found and ACTIVE-WHEN is a symbol which must be non-nil
-for the keymap to be active \(minor mode levels only)."
- ;;(message "\nkey-bindings %s %s %s" key olp position)
- (let* ((bindings nil)
- (maps (current-active-maps))
- map
- map-sym
- map-rec
- binding
- keymaps
- minor-maps
- where
- map-where
- where-map
- (local-map (current-local-map))
- (pt (or position (point)))
- (point-keymap (get-char-property pt 'keymap))
- (point-local-map (get-char-property pt 'local-map))
- )
- (setq keymaps
- (cons (list global-map 'global-map)
- keymaps))
- (when overriding-terminal-local-map
- (setq keymaps
- (cons (list overriding-terminal-local-map 'overriding-terminal-local-map)
- keymaps)))
- (when overriding-local-map
- (setq keymaps
- (cons (list overriding-local-map 'overriding-local-map)
- keymaps)))
- (unless (cdr keymaps)
- (when point-local-map
- (setq keymaps
- (cons (list point-local-map 'point-local-map)
- keymaps)))
- ;; Fix-me:
- ;;/* If on a mode line string with a local keymap,
-
- (when local-map
- (setq keymaps
- (cons (list local-map 'local-map)
- keymaps)))
-
- ;; Minor-modes
- ;;(message "================ Minor-modes")
- (dolist (list '(emulation-mode-map-alists
- minor-mode-overriding-map-alist
- minor-mode-map-alist))
- ;;(message "------- %s" list)
- (let ((alists (if (eq list 'emulation-mode-map-alists)
- (symbol-value list)
- (list (symbol-value list)))))
- (dolist (alist alists)
- ;;(message "\n(symbolp alist)=%s alist= %s (symbol-value alist)=%s" (symbolp alist) "dum" "dum2") ;alist "dummy");(when (symbolp alist) (symbol-value alist)))
- (when (symbolp alist)
- (setq alist (symbol-value alist)))
- (dolist (assoc alist)
- (let* (;(assoc (car alist-rec))
- (var (when (consp assoc) (car assoc)))
- (val (when (and (symbolp var)
- (boundp var))
- (symbol-value var))))
- ;;(message "var= %s, val= %s" var val)
- (when (and
- val
- (or (not (eq list 'minor-mode-map-alist))
- (not (assq var minor-mode-overriding-map-alist))))
- ;;(message "** Adding this")
- (setq minor-maps
- (cons (list (cdr assoc) list var)
- minor-maps)))
- )))))
- (dolist (map minor-maps)
- ;;(message "cdr map= %s" (cdr map))
- (setq keymaps
- (cons map
- keymaps)))
- (when point-keymap
- (setq keymaps
- (cons (list point-keymap 'point-keymap)
- keymaps))))
-
- ;; Fix-me: compare with current-active-maps
- (let ((ca-maps (current-active-maps))
- (wh-maps keymaps)
- ca
- wh)
- (while (or ca-maps wh-maps)
- (setq ca (car ca-maps))
- (setq wh (car wh-maps))
- (setq ca-maps (cdr ca-maps))
- (setq wh-maps (cdr wh-maps))
- ;;(message "\nca= %s" ca)
- ;;(message "cdr wh= %s" (cdr wh))
- (unless (equal ca (car wh))
- (error "Did not match: %s" (cdr wh)))))
-
- (while keymaps
- (setq map-rec (car keymaps))
- (setq map (car map-rec))
- (when (setq binding (lookup-key map key t))
- (setq map-sym (ourcomments-find-keymap-variables key binding map))
- (setq map-sym (delq 'map map-sym))
- (setq map-sym (delq 'local-map map-sym))
- (setq map-sym (delq 'point-keymap map-sym))
- (setq map-sym (delq 'point-local-map map-sym))
- (setq bindings (cons (list binding map-sym (cdr map-rec)) bindings)))
- (setq keymaps (cdr keymaps)))
-
- (nreverse bindings)))
-
-(defun describe-keymap-placement (keymap-sym)
- "Find minor mode keymap KEYMAP-SYM in the keymaps searched for key lookup.
-See Info node `Searching Keymaps'."
- ;;(info "(elisp) Searching Keymaps")
- (interactive (list (ourcomments-read-symbol "Describe minor mode keymap symbol"
- (lambda (sym)
- (and (boundp sym)
- (keymapp (symbol-value sym)))))))
- (unless (symbolp keymap-sym)
- (error "Argument KEYMAP-SYM must be a symbol"))
- (unless (keymapp (symbol-value keymap-sym))
- (error "The value of argument KEYMAP-SYM must be a keymap"))
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'describe-keymap-placement keymap-sym) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert "Placement of keymap `")
- (insert-text-button (symbol-name keymap-sym)
- 'action
- (lambda (btn)
- (describe-variable keymap-sym)))
- (insert "'\nin minor modes activation maps:\n")
- (let (found)
- (dolist (map-root '(emulation-mode-map-alists
- minor-mode-overriding-map-alist
- minor-mode-map-alist
- ))
- (dolist (emul-alist (symbol-value map-root))
- ;;(message "emul-alist=%s" emul-alist)
- (dolist (keymap-alist
- (if (memq map-root '(emulation-mode-map-alists))
- (symbol-value emul-alist)
- (list emul-alist)))
- (let* ((map (cdr keymap-alist))
- (first (catch 'first
- (map-keymap (lambda (key def)
- (throw 'first (cons key def)))
- map)))
- (key (car first))
- (def (cdr first))
- (keymap-variables (when (and key def)
- (ourcomments-find-keymap-variables
- (vector key) def map)))
- (active-var (car keymap-alist))
- )
- (assert (keymapp map))
- ;;(message "keymap-alist=%s, %s" keymap-alist first)
- ;;(message "active-var=%s, %s" active-var keymap-variables)
- (when (memq keymap-sym keymap-variables)
- (setq found t)
- (insert (format "\n`%s' " map-root))
- (insert (propertize "<= Minor mode keymap list holding this map"
- 'face 'font-lock-doc-face))
- (insert "\n")
- (when (symbolp emul-alist)
- (insert (format " `%s' " emul-alist))
- (insert (propertize "<= Keymap alist variable" 'face 'font-lock-doc-face))
- (insert "\n"))
- ;;(insert (format " `%s'\n" keymap-alist))
- (insert (format " `%s' " active-var))
- (insert (propertize "<= Activation variable" 'face 'font-lock-doc-face))
- (insert "\n")
- )))))
- (unless found
- (insert (propertize "Not found." 'face 'font-lock-warning-face)))
- ))))
-
-;; This is a replacement for describe-key-briefly.
-;;(global-set-key [f1 ?c] 'describe-key-and-map-briefly)
-;;;###autoload
-(defun describe-key-and-map-briefly (&optional key insert untranslated)
- "Try to print names of keymap from which KEY fetch its definition.
-Look in current active keymaps and find keymap variables with the
-same value as the keymap where KEY is bound. Print a message
-with those keymap variable names. Return a list with the keymap
-variable symbols.
-
-When called interactively prompt for KEY.
-
-INSERT and UNTRANSLATED should normall be nil (and I am not sure
-what they will do ;-)."
- ;; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- ;; From describe-key-briefly. Keep this as it is for easier update.
- (interactive
- (let ((enable-disabled-menus-and-buttons t)
- (cursor-in-echo-area t)
- saved-yank-menu)
- (unwind-protect
- (let (key)
- ;; If yank-menu is empty, populate it temporarily, so that
- ;; "Select and Paste" menu can generate a complete event.
- (when (null (cdr yank-menu))
- (setq saved-yank-menu (copy-sequence yank-menu))
- (menu-bar-update-yank-menu "(any string)" nil))
- (setq key (read-key-sequence "Describe key (or click or menu item): "))
- ;; If KEY is a down-event, read and discard the
- ;; corresponding up-event. Note that there are also
- ;; down-events on scroll bars and mode lines: the actual
- ;; event then is in the second element of the vector.
- (and (vectorp key)
- (let ((last-idx (1- (length key))))
- (and (eventp (aref key last-idx))
- (memq 'down (event-modifiers (aref key last-idx)))))
- (read-event))
- (list
- key
- (if current-prefix-arg (prefix-numeric-value current-prefix-arg))
- 1
- ))
- ;; Put yank-menu back as it was, if we changed it.
- (when saved-yank-menu
- (setq yank-menu (copy-sequence saved-yank-menu))
- (fset 'yank-menu (cons 'keymap yank-menu))))))
- (if (numberp untranslated)
- (setq untranslated (this-single-command-raw-keys)))
- (let* ((event (if (and (symbolp (aref key 0))
- (> (length key) 1)
- (consp (aref key 1)))
- (aref key 1)
- (aref key 0)))
- (modifiers (event-modifiers event))
- (standard-output (if insert (current-buffer) t))
- (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
- (memq 'drag modifiers)) " at that spot" ""))
- (defn (key-binding key t))
- key-desc)
- ;; Handle the case where we faked an entry in "Select and Paste" menu.
- (if (and (eq defn nil)
- (stringp (aref key (1- (length key))))
- (eq (key-binding (substring key 0 -1)) 'yank-menu))
- (setq defn 'menu-bar-select-yank))
- ;; Don't bother user with strings from (e.g.) the select-paste menu.
- (if (stringp (aref key (1- (length key))))
- (aset key (1- (length key)) "(any string)"))
- (if (and (> (length untranslated) 0)
- (stringp (aref untranslated (1- (length untranslated)))))
- (aset untranslated (1- (length untranslated)) "(any string)"))
- ;; Now describe the key, perhaps as changed.
- (setq key-desc (help-key-description key untranslated))
- ;;
- ;; End of part from describe-key-briefly.
- ;; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
- ;;(message "bindings=%s" (key-bindings key)) (sit-for 2)
- ;; Find the keymap:
- (let* ((maps (current-active-maps))
- ret
- lk)
- (if (or (null defn) (integerp defn) (equal defn 'undefined))
- (setq ret 'not-defined)
- (catch 'mapped
- (while (< 1 (length maps))
- (setq lk (lookup-key (car maps) key t))
- (when (and lk (not (numberp lk)))
- (setq ret (ourcomments-find-keymap-variables key lk (car maps)))
- (when ret
- (throw 'mapped (car maps))))
- (setq maps (cdr maps))))
- (unless ret
- (setq lk (lookup-key global-map key t))
- (when (and lk (not (numberp lk)))
- (setq ret '(global-map)))))
- (cond
- ((eq ret 'not-defined)
- (message "%s%s not defined in any keymap" key-desc mouse-msg))
- ((listp ret)
- (if (not ret)
- (message "%s%s is bound to `%s', but don't know where"
- key-desc mouse-msg defn)
- (if (= 1 (length ret))
- (message "%s%s is bound to `%s' in `%s'"
- key-desc mouse-msg defn (car ret))
- (message "%s%s is bound to `%s' in keymap variables `%s'"
- key-desc mouse-msg defn ret))))
- (t
- (error "ret=%s" ret)))
- ret)))
-
-;; (ourcomments-find-keymap-variables (current-local-map))
-;; (keymapp 'ctl-x-4-prefix)
-;; (equal 'ctl-x-4-prefix (current-local-map))
-;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Fringes.
-
-(defvar better-bottom-angles-defaults nil)
-(defun better-fringes-bottom-angles (on)
- ;;(bottom bottom-left-angle bottom-right-angle top-right-angle top-left-angle)
- (if (not on)
- (when better-bottom-angles-defaults
- (set-default 'fringe-indicator-alist better-bottom-angles-defaults))
- (unless better-bottom-angles-defaults
- (setq better-bottom-angles-defaults fringe-indicator-alist))
- (let ((better
- '(bottom
- bottom-right-angle bottom-right-angle
- bottom-left-angle bottom-left-angle
- ))
- ;;(indicators (copy-list fringe-indicator-alist)))
- (indicators (copy-sequence fringe-indicator-alist)))
- (setq indicators (assq-delete-all 'bottom indicators))
- (set-default 'fringe-indicator-alist (cons better indicators)))))
-
-(defun better-fringes-faces (face face-important)
- (dolist (bitmap '(bottom-left-angle
- bottom-right-angle
- top-left-angle
- top-right-angle
-
- right-curly-arrow
- left-arrow right-arrow
- left-curly-arrow right-curly-arrow
- up-arrow
- down-arrow
- left-bracket right-bracket
- empty-line))
- (set-fringe-bitmap-face bitmap face))
- (dolist (bitmap '(right-triangle
- question-mark))
- (set-fringe-bitmap-face bitmap face-important)))
-
-(defface better-fringes-bitmap
- '((t (:foreground "dark khaki")))
- "Face for bitmap fringes."
- :group 'better-fringes
- :group 'nxhtml)
-
-(defface better-fringes-important-bitmap
- '((t (:foreground "red")))
- "Face for bitmap fringes."
- :group 'better-fringes
- :group 'nxhtml)
-
-;;;###autoload
-(define-minor-mode better-fringes-mode
- "Choose another fringe bitmap color and bottom angle."
- :global t
- :group 'better-fringes
- (if better-fringes-mode
- (progn
- (better-fringes-faces 'better-fringes-bitmap
- 'better-fringes-important-bitmap)
- (better-fringes-bottom-angles t))
- (better-fringes-faces nil nil)
- (better-fringes-bottom-angles nil)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Copy+paste
-
-;; After an idea from andrea on help-gnu-emacs
-
-(defvar ourcomments-copy+paste-point nil)
-
-;;(global-set-key [(control ?c) ?y] 'ourcomments-copy+paste-set-point)
-;;;###autoload
-(defun ourcomments-copy+paste-set-point ()
- "Set point for copy+paste here.
-Enable temporary minor mode `ourcomments-copy+paste-mode'.
-However if point for copy+paste already is set then cancel it and
-disable the minor mode.
-
-The purpose of this command is to make it easy to grab a piece of
-text and paste it at current position. After this command you
-should select a piece of text to copy and then call the command
-`ourcomments-copy+paste'."
- (interactive)
- (if ourcomments-copy+paste-point
- (ourcomments-copy+paste-mode -1)
- (setq ourcomments-copy+paste-point (list (copy-marker (point))
- (selected-window)
- (current-frame-configuration)
- ))
- (ourcomments-copy+paste-mode 1)
- (let ((key (where-is-internal 'ourcomments-copy+paste))
- (ckeys (key-description (this-command-keys))))
- (setq key (if key (key-description (car key))
- "M-x ourcomments-copy+paste"))
- (when (> (length ckeys) 12)
- (setq ckeys "this command"))
- (message "Paste point set; select region and do %s to copy+paste (or cancel with %s)" key ckeys))))
-
-(defvar ourcomments-copy+paste-mode-map
- (let ((map (make-sparse-keymap)))
- ;; Bind the copy+paste command to C-S-v which reminds of cua-paste
- ;; binding and is hopefully not bound.
- (define-key map [(control shift ?v)] 'ourcomments-copy+paste)
- map))
-
-(define-minor-mode ourcomments-copy+paste-mode
- "Temporary mode for copy+paste.
-This minor mode is enabled by `ourcomments-copy+paste-set-point'.
-
-When this mode is active there is a key binding for
-`ourcomments-copy+paste':
-\\<ourcomments-copy+paste-mode-map>
-\\[ourcomments-copy+paste]
-
-You should not turn on this minor mode yourself. It is turned on
-by `ourcomments-copy+paste-set-point'. For more information see
-that command."
- :lighter " COPY+PASTE"
- :global t
- :group 'ourcomments-util
- (if ourcomments-copy+paste-mode
- (unless ourcomments-copy+paste-point
- (message "Do not call this minor mode, use `ourcomments-copy+paste-set-point'.")
- (setq ourcomments-copy+paste-mode nil))
- (when ourcomments-copy+paste-point
- (setq ourcomments-copy+paste-point nil)
- (message "Canceled copy+paste mode"))))
-
-(defvar ourcomments-copy+paste-ovl nil)
-
-(defun ourcomments-copy+paste-cancel-highlight ()
- (when (overlayp ourcomments-copy+paste-ovl)
- (delete-overlay ourcomments-copy+paste-ovl))
- (setq ourcomments-copy+paste-ovl nil))
-
-(defun ourcomments-copy+paste (restore-frames)
- "Copy region to copy+paste point set by `ourcomments-copy+paste-set-point'.
-Also if prefix argument is given then restore frame configuration
-at the time that command was called. Otherwise look for the
-buffer for copy+paste point in current frame. If found select
-that window. If not then use `switch-to-buffer-other-window' to
-display it."
- (interactive "P")
- (cond
- ((not ourcomments-copy+paste-point)
- (let ((key (where-is-internal 'ourcomments-copy+paste-set-point)))
- (setq key (if key (key-description (car key))
- "M-x ourcomments-copy+paste-set-point"))
- (message "Please select destination of copy+paste first with %s" key)))
- ((not mark-active)
- (message "Please select a region to copy+paste first"))
- (t
- ;;(copy-region-as-kill (region-beginning) (region-end))
- (clipboard-kill-ring-save (region-beginning) (region-end))
- (let* ((marker (nth 0 ourcomments-copy+paste-point))
- (orig-win (nth 1 ourcomments-copy+paste-point))
- (orig-fcfg (nth 2 ourcomments-copy+paste-point))
- (buf (marker-buffer marker))
- (win (or (when (window-live-p orig-win) orig-win)
- (get-buffer-window buf))))
- (message "win=%s, buf=%s" win buf)
- (cond (restore-frames
- (set-frame-configuration orig-fcfg))
- ((and win (eq (window-buffer win) buf))
- (select-window win))
- (t
- (switch-to-buffer-other-window buf)))
- (goto-char marker))
- (let ((here (point))
- ovl)
- (yank)
- (setq ovl (make-overlay here (point)))
- (overlay-put ovl 'face 'highlight)
- (run-with-idle-timer 2 nil 'ourcomments-copy+paste-cancel-highlight)
- (setq ourcomments-copy+paste-ovl ovl))
- (setq ourcomments-copy+paste-point nil)
- (ourcomments-copy+paste-mode -1))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Misc.
-
-;;(describe-timers)
-;;;###autoload
-(defun describe-timers ()
- "Show timers with readable time format."
- (interactive)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'ourcommenst-show-timers) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert (format-time-string "Timers at %Y-%m-%d %H:%M:%S\n\n" (current-time)))
- (if (not timer-list)
- (insert " None\n")
- (insert (propertize
- " When Rpt What\n"
- 'face 'font-lock-doc-face))
- (dolist (tmr timer-list)
- (let* ((hi-sec (timer--high-seconds tmr))
- (lo-sec (timer--low-seconds tmr))
- (mi-sec (timer--usecs tmr))
- (fun (timer--function tmr))
- (args (timer--args tmr))
- (idle-d (timer--idle-delay tmr))
- (rpt-d (timer--repeat-delay tmr))
- (time (concat (format-time-string " %Y-%m-%d %H:%M:%S" (list hi-sec lo-sec 0))
- (substring
- (format "%.1f" (/ mi-sec 1000000.0))
- 1))))
- (assert (not idle-d) t)
- (insert (format "%s %4s (`%-3s' %S)\n" time rpt-d fun args)))))
- (insert "\nIdle timers:\n\n")
- (if (not timer-idle-list)
- (insert " None\n")
- (insert (propertize
- " After Rpt What\n"
- 'face 'font-lock-doc-face))
- (dolist (tmr timer-idle-list)
- (let* ((hi-sec (timer--high-seconds tmr))
- (lo-sec (timer--low-seconds tmr))
- (mi-sec (timer--usecs tmr))
- (fun (timer--function tmr))
- (args (timer--args tmr))
- (idle-d (timer--idle-delay tmr))
- (rpt-d (timer--repeat-delay tmr))
- (time (+ (* hi-sec 256 256) lo-sec (/ mi-sec 1000000.0)))
- )
- (assert (not (not idle-d)) t)
- (insert (format " %.2f sec %3s (`%s' %S)\n" time rpt-d fun args))))))))
-
-(defcustom ourcomments-insert-date-and-time "%Y-%m-%d %R"
- "Time format for command `ourcomments-insert-date-and-time'.
-See `format-time-string'."
- :type 'string
- :group 'ourcomments-util)
-
-;;;###autoload
-(defun ourcomments-insert-date-and-time ()
- "Insert date and time.
-See option `ourcomments-insert-date-and-time' for how to
-customize it."
- (interactive)
- (insert (format-time-string ourcomments-insert-date-and-time)))
-
-;;;###autoload
-(defun find-emacs-other-file (display-file)
- "Find corresponding file to source or installed elisp file.
-If you have checked out and compiled Emacs yourself you may have
-Emacs lisp files in two places, the checked out source tree and
-the installed Emacs tree. If buffer contains an Emacs elisp file
-in one of these places then find the corresponding elisp file in
-the other place. Return the file name of this file.
-
-Rename current buffer using your `uniquify-buffer-name-style' if
-it is set.
-
-When DISPLAY-FILE is non-nil display this file in other window
-and go to the same line number as in the current buffer."
- (interactive (list t))
- (unless (buffer-file-name)
- (error "This buffer is not visiting a file"))
- (unless source-directory
- (error "Can't find the checked out Emacs sources"))
- (let* ((installed-directory (file-name-as-directory
- (expand-file-name ".." exec-directory)))
- (relative-installed (file-relative-name
- (buffer-file-name) installed-directory))
- (relative-source (file-relative-name
- (buffer-file-name) source-directory))
- (name-nondir (file-name-nondirectory (buffer-file-name)))
- source-file
- installed-file
- other-file
- (line-num (save-restriction
- (widen)
- (line-number-at-pos))))
- (cond
- ((and relative-installed
- (not (string= name-nondir relative-installed))
- (not (file-name-absolute-p relative-installed))
- (not (string= ".." (substring relative-installed 0 2))))
- (setq source-file (expand-file-name relative-installed source-directory)))
- ((and relative-source
- (not (string= name-nondir relative-source))
- (not (file-name-absolute-p relative-source))
- (not (string= ".." (substring relative-source 0 2))))
- (setq installed-file (expand-file-name relative-source installed-directory))))
- (setq other-file (or source-file installed-file))
- (unless other-file
- (error "This file is not in Emacs source or installed lisp tree"))
- (unless (file-exists-p other-file)
- (error "Can't find the corresponding file %s" other-file))
- (when display-file
- (when uniquify-buffer-name-style
- (rename-buffer (file-name-nondirectory buffer-file-name) t))
- (find-file-other-window other-file)
- (ourcomments-goto-line line-num))
- other-file))
-
-;;;###autoload
-(defun ourcomments-ediff-files (def-dir file-a file-b)
- "In directory DEF-DIR run `ediff-files' on files FILE-A and FILE-B.
-The purpose of this function is to make it eaiser to start
-`ediff-files' from a shell through Emacs Client.
-
-This is used in EmacsW32 in the file ediff.cmd where Emacs Client
-is called like this:
-
- @%emacs_client% -e \"(setq default-directory \\\"%emacs_cd%\\\")\"
- @%emacs_client% -n -e \"(ediff-files \\\"%f1%\\\" \\\"%f2%\\\")\"
-
-It can of course be done in a similar way with other shells."
- (let ((default-directory def-dir))
- (ediff-files file-a file-b)))
-
-
-(defun ourcomments-latest-changelog ()
- "not ready"
- (let ((changelogs
- '("ChangeLog"
- "admin/ChangeLog"
- "doc/emacs/ChangeLog"
- "doc/lispintro/ChangeLog"
- "doc/lispref/ChangeLog"
- "doc/man/ChangeLog"
- "doc/misc/ChangeLog"
- "etc/ChangeLog"
- "leim/ChangeLog"
- "lib-src/ChangeLog"
- "lisp/ChangeLog"
- "lisp/erc/ChangeLog"
- "lisp/gnus/ChangeLog"
- "lisp/mh-e/ChangeLog"
- "lisp/org/ChangeLog"
- "lisp/url/ChangeLog"
- "lwlib/ChangeLog"
- "msdos/ChangeLog"
- "nextstep/ChangeLog"
- "nt/ChangeLog"
- "oldXMenu/ChangeLog"
- "src/ChangeLog"
- "test/ChangeLog"))
- (emacs-root (expand-file-name ".." exec-directory)
- ))))
-
-(defun ourcomments-read-symbol (prompt predicate)
- "Basic function for reading a symbol for describe-* functions.
-Prompt with PROMPT and show only symbols satisfying function
-PREDICATE. PREDICATE takes one argument, the symbol."
- (let* ((symbol (symbol-at-point))
- (enable-recursive-minibuffers t)
- val)
- (when predicate
- (unless (and symbol
- (symbolp symbol)
- (funcall predicate symbol))
- (setq symbol nil)))
- (setq val (completing-read (if symbol
- (format
- "%s (default %s): " prompt symbol)
- (format "%s: " prompt))
- obarray
- predicate
- t nil nil
- (if symbol (symbol-name symbol))))
- (if (equal val "") symbol (intern val))))
-
-(defun ourcomments-command-at-point ()
- (let ((fun (function-called-at-point)))
- (when (commandp fun)
- fun)))
-
-;;;###autoload
-(defun describe-command (command)
- "Like `describe-function', but prompts only for interactive commands."
- (interactive
- (let* ((fn (ourcomments-command-at-point))
- (prompt (if fn
- (format "Describe command (default %s): " fn)
- "Describe command: "))
- (enable-recursive-minibuffers t)
- val)
- (setq val (completing-read prompt
- obarray 'commandp t nil nil
- (and fn (symbol-name fn))))
- (list (if (equal val "") fn (intern val)))))
- (describe-function command))
-
-
-;;;###autoload
-(defun buffer-narrowed-p ()
- "Return non-nil if the current buffer is narrowed."
- (/= (buffer-size)
- (- (point-max)
- (point-min))))
-
-;;;###autoload
-(defun narrow-to-comment ()
- (interactive)
- (let* ((here (point-marker))
- (size 1000)
- (beg (progn (forward-comment (- size))
- ;; It looks like the wrong syntax-table is used here:
- ;;(message "skipped %s " (skip-chars-forward "[:space:]"))
- ;; See Emacs bug 3823, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3823
- (message "skipped %s " (skip-chars-forward " \t\r\n"))
- (point)))
- (end (progn (forward-comment size)
- ;;(message "skipped %s " (skip-chars-backward "[:space:]"))
- (message "skipped %s " (skip-chars-backward " \t\r\n"))
- (point))))
- (goto-char here)
- (if (not (and (>= here beg)
- (<= here end)))
- (error "Not in a comment")
- (narrow-to-region beg end))))
-
-(defvar describe-symbol-alist nil)
-
-(defun describe-symbol-add-known(property description)
- (when (assq property describe-symbol-alist)
- (error "Already known property"))
- (setq describe-symbol-alist
- (cons (list property description)
- describe-symbol-alist)))
-
-;;(describe-symbol-add-known 'variable-documentation "Doc for variable")
-;;(describe-symbol-add-known 'cl-struct-slots "defstruct slots")
-
-(defun property-list-keys (plist)
- "Return list of key names in property list PLIST."
- (let ((keys))
- (while plist
- (setq keys (cons (car plist) keys))
- (setq plist (cddr plist)))
- keys))
-
-(defun ourcomments-symbol-type (symbol)
- "Return a list of types where symbol SYMBOL is used.
-The can include 'variable, 'function and variaus 'cl-*."
- (symbol-file symbol)
- )
-
-(defun ourcomments-defstruct-p (symbol)
- "Return non-nil if symbol SYMBOL is a CL defstruct."
- (let ((plist (symbol-plist symbol)))
- (and (plist-member plist 'cl-struct-slots)
- (plist-member plist 'cl-struct-type)
- (plist-member plist 'cl-struct-include)
- (plist-member plist 'cl-struct-print))))
-
-(defun ourcomments-defstruct-slots (symbol)
- (unless (ourcomments-defstruct-p symbol)
- (error "Not a CL defstruct symbol: %s" symbol))
- (let ((cl-struct-slots (get symbol 'cl-struct-slots)))
- (delq 'cl-tag-slot
- (loop for rec in cl-struct-slots
- collect (nth 0 rec)))))
-
-;; (ourcomments-defstruct-slots 'ert-test)
-
-(defun ourcomments-defstruct-file (symbol)
- (unless (ourcomments-defstruct-p symbol)
- (error "Not a CL defstruct symbol: %s" symbol))
- )
-
-(defun ourcomments-member-defstruct (symbol)
- "Return defstruct name if member."
- (when (and (functionp symbol)
- (plist-member (symbol-plist symbol) 'cl-compiler-macro))
- (let* (in-defstruct
- (symbol-file (symbol-file symbol))
- buf
- was-here)
- (unless symbol-file
- (error "Can't check if defstruct member since don't know symbol file"))
- (setq buf (find-buffer-visiting symbol-file))
- (setq was-here (with-current-buffer buf (point)))
- (unless buf
- (setq buf (find-file-noselect symbol-file)))
- (with-current-buffer buf
- (save-restriction
- (widen)
- (let* ((buf-point (find-definition-noselect symbol nil)))
- (goto-char (cdr buf-point))
- (save-match-data
- (when (looking-at "(defstruct (?\\(\\(?:\\sw\\|\\s_\\)+\\)")
- (setq in-defstruct (match-string-no-properties 1))))))
- (if was-here
- (goto-char was-here)
- (kill-buffer (current-buffer))))
- in-defstruct)))
-;; (ourcomments-member-defstruct 'ert-test-name)
-;; (ourcomments-member-defstruct 'ert-test-error-condition)
-
-(defun ourcomments-custom-group-p (symbol)
- (and (intern-soft symbol)
- (or (and (get symbol 'custom-loads)
- (not (get symbol 'custom-autoload)))
- (get symbol 'custom-group))))
-
-;;;###autoload
-(defun describe-custom-group (symbol)
- "Describe customization group SYMBOL."
- (interactive
- (list
- (ourcomments-read-symbol "Customization group"
- 'ourcomments-custom-group-p)))
- ;; Fix-me:
- (message "g=%s" symbol))
-;; nxhtml
-
-;; Added this to current-load-list in cl-macs.el
-;; (describe-defstruct 'ert-stats)
-;;;###autoload
-(defun describe-defstruct (symbol)
- (interactive (list (ourcomments-read-symbol "Describe defstruct"
- 'ourcomments-defstruct-p)))
- (if (not (ourcomments-defstruct-p symbol))
- (message "%s is not a CL defstruct." symbol)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'describe-defstruct symbol) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert "This is a description of a CL thing.")
- (insert "\n\n")
- (insert (format "%s is a CL `defstruct'" symbol))
- (let ((file (symbol-file symbol)))
- (if file
- ;; Fix-me: .elc => .el
- (let ((name (file-name-nondirectory file)))
- (insert "defined in file %s.\n" (file-name-nondirectory file)))
- (insert ".\n")))
- (insert "\n\nIt has the following slot functions:\n")
- (let ((num-slot-funs 0)
- (slots (ourcomments-defstruct-slots symbol)))
- (dolist (slot slots)
- (if (not (fboundp (intern-soft (format "%s-%s" symbol slot))))
- (insert (format " Do not know function for slot %s\n" slot))
- (setq num-slot-funs (1+ num-slot-funs))
- (insert (format " `%s-%s'\n" symbol slot))))
- (unless (= num-slot-funs (length slots))
- (insert " No information about some slots, maybe :conc-name was used\n")))))))
-
-;;(defun describe-deftype (type)
-;;;###autoload
-(defun describe-symbol(symbol)
- "Show information about SYMBOL.
-Show SYMBOL plist and whether is is a variable or/and a
-function."
- (interactive (list (ourcomments-read-symbol "Describe symbol" nil)))
-;;; (let* ((s (symbol-at-point))
-;;; (val (completing-read (if (and (symbolp s)
-;;; (not (eq s nil)))
-;;; (format
-;;; "Describe symbol (default %s): " s)
-;;; "Describe symbol: ")
-;;; obarray
-;;; nil
-;;; t nil nil
-;;; (if (symbolp s) (symbol-name s)))))
-;;; (list (if (equal val "") s (intern val)))))
- (require 'apropos)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'describe-symbol symbol) (interactive-p))
- (with-current-buffer (help-buffer)
- (insert (format "Description of symbol %s\n\n" symbol))
- (when (plist-get (symbol-plist symbol) 'cl-compiler-macro)
- (insert "(Looks like a CL thing.)\n"))
- (if (boundp symbol)
- (insert (format "- There is a variable `%s'.\n" symbol))
- (insert "- This symbol is not a variable.\n"))
- (if (fboundp symbol)
- (progn
- (insert (format "- There is a function `%s'" symbol))
- (when (ourcomments-member-defstruct symbol)
- (let ((ds-name (ourcomments-member-defstruct symbol)))
- (insert "\n which is a member of defstruct ")
- (insert-text-button (format "%s" ds-name)
- 'symbol (intern-soft ds-name)
- 'action (lambda (button)
- (describe-symbol
- (button-get button 'symbol))))))
- (insert ".\n"))
- (insert "- This symbol is not a function.\n"))
- (if (facep symbol)
- (insert (format "- There is a face `%s'.\n" symbol))
- (insert "- This symbol is not a face.\n"))
- (if (ourcomments-custom-group-p symbol)
- (progn
- (insert "- There is a customization group ")
- (insert-text-button (format "%s" symbol)
- 'symbol symbol
- 'action (lambda (button)
- (describe-custom-group
- (button-get button 'symbol))))
- (insert ".\n"))
- (insert "- This symbol is not a customization group.\n"))
- (if (ourcomments-defstruct-p symbol)
- (progn
- (insert (format "- There is a CL defstruct %s with setf-able slots:\n" symbol))
- (let ((num-slot-funs 0)
- (slots (ourcomments-defstruct-slots symbol)))
- (dolist (slot slots)
- (if (not (fboundp (intern-soft (format "%s-%s" symbol slot))))
- (insert (format " Do not know function for slot %s\n" slot))
- (setq num-slot-funs (1+ num-slot-funs))
- (insert (format " `%s-%s'\n" symbol slot))))
- (unless (= num-slot-funs (length slots))
- (insert " No information about some slots, maybe :conc-name was used\n"))))
- (insert "- This symbol is not a CL defstruct.\n"))
- (insert "\n")
- (let* ((pl (symbol-plist symbol))
- (pl-not-known (property-list-keys pl))
- any-known)
- (if (not pl)
- (insert (format "Symbol %s has no property list\n\n" symbol))
- ;; Known properties
- (dolist (rec describe-symbol-alist)
- (let ((prop (nth 0 rec))
- (desc (nth 1 rec)))
- (when (plist-member pl prop)
- (setq any-known (cons prop any-known))
- (setq pl-not-known (delq prop pl-not-known))
- (insert
- "The following keys in the property list are known:\n\n")
- (insert (format "* %s: %s\n" prop desc))
- )))
- (unless any-known
- (insert "The are no known keys in the property list.\n"))
- (let ((pl (ourcomments-format-plist pl "\n ")))
- ;;(insert (format "plist=%s\n" (symbol-plist symbol)))
- ;;(insert (format "pl-not-known=%s\n" pl-not-known))
- (insert "\nFull property list:\n\n (")
- (insert (propertize pl 'face 'default))
- (insert ")\n\n")))))))
-
-(defun ourcomments-format-plist (pl sep &optional compare)
- (when (symbolp pl)
- (setq pl (symbol-plist pl)))
- (let (p desc p-out)
- (while pl
- (setq p (format "%s" (car pl)))
- (if (or (not compare) (string-match apropos-regexp p))
- (if apropos-property-face
- (put-text-property 0 (length (symbol-name (car pl)))
- 'face apropos-property-face p))
- (setq p nil))
- (if p
- (progn
- (and compare apropos-match-face
- (put-text-property (match-beginning 0) (match-end 0)
- 'face apropos-match-face
- p))
- (setq desc (pp-to-string (nth 1 pl)))
- (setq desc (split-string desc "\n"))
- (if (= 1 (length desc))
- (setq desc (concat " " (car desc)))
- (let* ((indent " ")
- (ind-nl (concat "\n" indent)))
- (setq desc
- (concat
- ind-nl
- (mapconcat 'identity desc ind-nl)))))
- (setq p-out (concat p-out (if p-out sep) p desc))))
- (setq pl (nthcdr 2 pl)))
- p-out))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; ido
-
-(defvar ourcomments-ido-visit-method nil)
-
-;;;###autoload
-(defun ourcomments-ido-buffer-other-window ()
- "Show buffer in other window."
- (interactive)
- (setq ourcomments-ido-visit-method 'other-window)
- (call-interactively 'ido-exit-minibuffer))
-
-;;;###autoload
-(defun ourcomments-ido-buffer-other-frame ()
- "Show buffer in other frame."
- (interactive)
- (setq ourcomments-ido-visit-method 'other-frame)
- (call-interactively 'ido-exit-minibuffer))
-
-;;;###autoload
-(defun ourcomments-ido-buffer-raise-frame ()
- "Raise frame showing buffer."
- (interactive)
- (setq ourcomments-ido-visit-method 'raise-frame)
- (call-interactively 'ido-exit-minibuffer))
-
-(defun ourcomments-ido-switch-buffer-or-next-entry ()
- (interactive)
- (if (active-minibuffer-window)
- (ido-next-match)
- (ido-switch-buffer)))
-
-(defun ourcomments-ido-mode-advice()
- (when (memq ido-mode '(both buffer))
- (let ((the-ido-minor-map (cdr ido-minor-mode-map-entry)))
- ;;(define-key the-ido-minor-map [(control tab)] 'ido-switch-buffer))
- (define-key the-ido-minor-map [(control tab)] 'ourcomments-ido-switch-buffer-or-next-entry))
- (dolist (the-map (list ido-buffer-completion-map ido-completion-map ido-common-completion-map))
- (when the-map
- (let ((map the-map))
- (define-key map [(control tab)] 'ido-next-match)
- (define-key map [(control shift tab)] 'ido-prev-match)
- (define-key map [(control backtab)] 'ido-prev-match)
- (define-key map [(shift return)] 'ourcomments-ido-buffer-other-window)
- (define-key map [(control return)] 'ourcomments-ido-buffer-other-frame)
- (define-key map [(meta return)] 'ourcomments-ido-buffer-raise-frame))))))
-
-;; (defun ourcomments-ido-setup-completion-map ()
-;; "Set up the keymap for `ido'."
-
-;; (ourcomments-ido-mode-advice)
-
-;; ;; generated every time so that it can inherit new functions.
-;; (let ((map (make-sparse-keymap))
-;; (viper-p (if (boundp 'viper-mode) viper-mode)))
-
-;; (when viper-p
-;; (define-key map [remap viper-intercept-ESC-key] 'ignore))
-
-;; (cond
-;; ((memq ido-cur-item '(file dir))
-;; (when ido-context-switch-command
-;; (define-key map "\C-x\C-b" ido-context-switch-command)
-;; (define-key map "\C-x\C-d" 'ignore))
-;; (when viper-p
-;; (define-key map [remap viper-backward-char] 'ido-delete-backward-updir)
-;; (define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir)
-;; (define-key map [remap viper-delete-backward-word] 'ido-delete-backward-word-updir))
-;; (set-keymap-parent map
-;; (if (eq ido-cur-item 'file)
-;; ido-file-completion-map
-;; ido-file-dir-completion-map)))
-
-;; ((eq ido-cur-item 'buffer)
-;; (when ido-context-switch-command
-;; (define-key map "\C-x\C-f" ido-context-switch-command))
-;; (set-keymap-parent map ido-buffer-completion-map))
-
-;; (t
-;; (set-keymap-parent map ido-common-completion-map)))
-
-;; ;; ctrl-tab etc
-;; (define-key map [(control tab)] 'ido-next-match)
-;; (define-key map [(control shift tab)] 'ido-prev-match)
-;; (define-key map [(control backtab)] 'ido-prev-match)
-;; (define-key map [(shift return)] 'ourcomments-ido-buffer-other-window)
-;; (define-key map [(control return)] 'ourcomments-ido-buffer-other-frame)
-;; (define-key map [(meta return)] 'ourcomments-ido-buffer-raise-frame)
-
-;; (setq ido-completion-map map)))
-
-;; (defadvice ido-setup-completion-map (around
-;; ourcomments-advice-ido-setup-completion-map
-;; disable)
-;; (setq ad-return-value (ourcomments-ido-setup-completion-map))
-;; )
-
-;;(add-hook 'ido-setup-hook 'ourcomments-ido-mode-advice)
-;;(remove-hook 'ido-setup-hook 'ourcomments-ido-mode-advice)
-(defvar ourcomments-ido-adviced nil)
-(unless ourcomments-ido-adviced
-(defadvice ido-mode (after
- ourcomments-advice-ido-mode
- ;;activate
- ;;compile
- disable)
- "Add C-tab to ido buffer completion."
- (ourcomments-ido-mode-advice)
- ;;ad-return-value
- )
-;; (ad-activate 'ido-mode)
-;; (ad-deactivate 'ido-mode)
-
-(defadvice ido-visit-buffer (before
- ourcomments-advice-ido-visit-buffer
- ;;activate
- ;;compile
- disable)
- "Advice to show buffers in other window, frame etc."
- (when ourcomments-ido-visit-method
- (ad-set-arg 1 ourcomments-ido-visit-method)
- (setq ourcomments-ido-visit-method nil)
- ))
-(setq ourcomments-ido-adviced t)
-)
-
-;;(message "after advising ido")
-;;(ad-deactivate 'ido-visit-buffer)
-;;(ad-activate 'ido-visit-buffer)
-
-(defvar ourcomments-ido-old-state ido-mode)
-
-(defun ourcomments-ido-ctrl-tab-activate ()
- ;;(message "ourcomments-ido-ctrl-tab-activate running")
- ;;(ad-update 'ido-visit-buffer)
- ;;(unless (ad-get-advice-info 'ido-visit-buffer)
- ;; Fix-me: The advice must be enabled before activation. Send bug report.
- (ad-enable-advice 'ido-visit-buffer 'before 'ourcomments-advice-ido-visit-buffer)
- (unless (cdr (assoc 'active (ad-get-advice-info 'ido-visit-buffer)))
- (ad-activate 'ido-visit-buffer))
- ;; (ad-enable-advice 'ido-setup-completion-map 'around 'ourcomments-advice-ido-setup-completion-map)
- ;; (unless (cdr (assoc 'active (ad-get-advice-info 'ido-setup-completion-map)))
- ;; (ad-activate 'ido-setup-completion-map))
- ;;(ad-update 'ido-mode)
- (ad-enable-advice 'ido-mode 'after 'ourcomments-advice-ido-mode)
- (unless (cdr (assoc 'active (ad-get-advice-info 'ido-mode)))
- (ad-activate 'ido-mode))
- (setq ourcomments-ido-old-state ido-mode)
- (ido-mode (or ido-mode 'buffer)))
-
-;;;###autoload
-(define-minor-mode ourcomments-ido-ctrl-tab
- "Enable buffer switching using C-Tab with function `ido-mode'.
-This changes buffer switching with function `ido-mode' the
-following way:
-
-- You can use C-Tab.
-
-- You can show the selected buffer in three ways independent of
- how you entered function `ido-mode' buffer switching:
-
- * S-return: other window
- * C-return: other frame
- * M-return: raise frame
-
-Those keys are selected to at least be a little bit reminiscent
-of those in for example common web browsers."
- :global t
- :group 'emacsw32
- :group 'convenience
- (if ourcomments-ido-ctrl-tab
- (ourcomments-ido-ctrl-tab-activate)
- (ad-disable-advice 'ido-visit-buffer 'before
- 'ourcomments-advice-ido-visit-buffer)
- (ad-disable-advice 'ido-mode 'after
- 'ourcomments-advice-ido-mode)
- ;; For some reason this little complicated construct is
- ;; needed. If they are not there the defadvice
- ;; disappears. Huh.
- ;;(if ourcomments-ido-old-state
- ;; (ido-mode ourcomments-ido-old-state)
- ;; (when ido-mode (ido-mode -1)))
- ))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; New Emacs instance
-
-(defun ourcomments-find-emacs ()
- (locate-file invocation-name
- (list invocation-directory)
- exec-suffixes
- ;; 1 ;; Fix-me: This parameter is depreceated, but used
- ;; in executable-find, why?
- ))
-
-(defvar ourcomments-restart-server-mode nil)
-
-(defun emacs-restart-in-kill ()
- "Last step in restart Emacs and start `server-mode' if on before."
- (let* ((restart-args (when ourcomments-restart-server-mode
- ;; Delay 3+2 sec to be sure the old server has stopped.
- (list "--eval=(run-with-idle-timer 5 nil 'server-mode 1)")))
- ;; Fix-me: There is an Emacs bug here, default-directory shows
- ;; up in load-path in the new Eamcs if restart-args is like
- ;; this, but not otherwise. And it has w32 file syntax. The
- ;; work around below is the best I can find at the moment.
- (first-path (catch 'first
- (dolist (p load-path)
- (when (file-directory-p p)
- (throw 'first p)))))
- (default-directory (file-name-as-directory (expand-file-name first-path))))
- ;; Fix-me: Adding -nw to restart in console does not work. Any way to fix it?
- (unless window-system (setq restart-args (cons "-nw" restart-args)))
- ;;(apply 'call-process (ourcomments-find-emacs) nil 0 nil restart-args)
- (apply 'emacs restart-args)
- ;; Wait to give focus to new Emacs instance:
- (sleep-for 3)))
-
-;;;###autoload
-(defun emacs-restart ()
- "Restart Emacs and start `server-mode' if on before."
- (interactive)
- (if (not window-system)
- (message "Can't restart emacs if window-system is nil")
- (let ((wait 4))
- (while (> (setq wait (1- wait)) 0)
- (message (propertize (format "Will restart Emacs in %d seconds..." wait)
- 'face 'secondary-selection))
- (sit-for 1)))
- (setq ourcomments-restart-server-mode server-mode)
- (add-hook 'kill-emacs-hook 'emacs-restart-in-kill t)
- (save-buffers-kill-emacs)))
-
-(defvar ourcomments-started-emacs-use-output-buffer nil
- "If non-nil then save output form `emacs'.
-Set this to `t' to debug problems with starting a new Emacs.
-
-If non-nil save output to buffer 'call-process emacs output'.
-Note that this will lock the Emacs calling `emacs' until the new
-Emacs has finished.")
-;;(setq ourcomments-started-emacs-use-output-buffer t)
-;;(defun my-test () (interactive) (emacs-Q "-bad-arg"))
-
-;;;###autoload
-(defun emacs (&rest args)
- "Start a new Emacs with default parameters.
-Additional ARGS are passed to the new Emacs.
-
-See also `ourcomments-started-emacs-use-output-buffer'."
- (interactive)
- (recentf-save-list)
- (let* ((out-buf (when ourcomments-started-emacs-use-output-buffer
- (get-buffer-create "call-process emacs output")))
- (buf-arg (or out-buf 0))
- (args-text (mapconcat 'identity (cons "" args) " "))
- ret
- (fin-msg ""))
- (when out-buf
- (display-buffer out-buf)
- (setq fin-msg ". Finished.")
- (message "Started 'emacs%s' => %s. Locked until this is finished." args-text ret fin-msg)
- (redisplay))
- (setq ret (apply 'call-process (ourcomments-find-emacs) nil buf-arg nil args))
- (message "Started 'emacs%s' => %s%s" args-text ret fin-msg)
- ret))
-
-;;;###autoload
-(defun emacs-buffer-file()
- "Start a new Emacs showing current buffer file.
-Go to the current line and column in that file.
-If there is no buffer file then instead start with `dired'.
-
-This calls the function `emacs' with argument --no-desktop and
-the file or a call to dired."
- (interactive)
- (recentf-save-list)
- (let ((file (buffer-file-name))
- (lin (line-number-at-pos))
- (col (current-column)))
- (if file
- (apply 'emacs "--no-desktop" (format "+%d:%d" lin col) file nil)
- (applay 'emacs "--no-desktop" "--eval" (format "(dired \"%s\")" default-directory nil)))))
-
-;;;###autoload
-(defun emacs--debug-init(&rest args)
- "Start a new Emacs with --debug-init parameter.
-This calls the function `emacs' with added arguments ARGS."
- (interactive)
- (apply 'emacs "--debug-init" args))
-
-;;;###autoload
-(defun emacs--no-desktop (&rest args)
- "Start a new Emacs with --no-desktop parameter.
-This calls the function `emacs' with added arguments ARGS."
- (interactive)
- (apply 'emacs "--no-desktop" args))
-
-;;;###autoload
-(defun emacs-Q (&rest args)
- "Start a new Emacs with -Q parameter.
-Start new Emacs without any customization whatsoever.
-This calls the function `emacs' with added arguments ARGS."
- (interactive)
- (apply 'emacs "-Q" args))
-
-;;;###autoload
-(defun emacs-Q-nxhtml(&rest args)
- "Start new Emacs with -Q and load nXhtml.
-This calls the function `emacs' with added arguments ARGS."
- (interactive)
- (let ((autostart (if (boundp 'nxhtml-install-dir)
- (expand-file-name "autostart.el" nxhtml-install-dir)
- (expand-file-name "../../EmacsW32/nxhtml/autostart.el"
- exec-directory))))
- (apply 'emacs-Q "--debug-init" "--load" autostart args)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Searching
-
-(defun grep-get-buffer-files ()
- "Return list of files in a `grep-mode' buffer."
- (or (and (compilation-buffer-p (current-buffer))
- (derived-mode-p 'grep-mode))
- (error "Not in a grep buffer"))
- (let ((here (point))
- files
- loc)
- (font-lock-fontify-buffer)
- (goto-char (point-min))
- (while (setq loc
- (condition-case err
- (compilation-next-error 1)
- (error
- ;; This should be the end, but give a message for
- ;; easier debugging.
- (message "%s" err)
- nil)))
- ;;(message "here =%s, loc=%s" (point) loc)
- (let ((file (caar (nth 2 (car loc)))))
- (setq file (expand-file-name file))
- (add-to-list 'files file)))
- (goto-char here)
- ;;(message "files=%s" files)
- files))
-
-(defvar grep-query-replace-defaults nil
- "Default values of FROM-STRING and TO-STRING for `grep-query-replace'.
-This is a cons cell (FROM-STRING . TO-STRING), or nil if there is
-no default value.")
-
-;; Mostly copied from `dired-do-query-replace-regexp'. Fix-me: finish, test
-;;;###autoload
-(defun grep-query-replace(from to &optional delimited)
- "Do `query-replace-regexp' of FROM with TO, on all files in *grep*.
-Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue]."
- (interactive
- (let ((common
- ;; Use the regexps that have been used in grep
- (let ((query-replace-from-history-variable 'grep-regexp-history)
- (query-replace-defaults (or grep-query-replace-defaults
- query-replace-defaults)))
- (query-replace-read-args
- "Query replace regexp in files in *grep*" t t))))
- (setq grep-query-replace-defaults (cons (nth 0 common)
- (nth 1 common)))
- (list (nth 0 common) (nth 1 common) (nth 2 common))))
- (dolist (file (grep-get-buffer-files))
- (let ((buffer (get-file-buffer file)))
- (if (and buffer (with-current-buffer buffer
- buffer-read-only))
- (error "File `%s' is visited read-only" file))))
- (tags-query-replace from to delimited
- '(grep-get-buffer-files)))
-
-;;;###autoload
-(defun ldir-query-replace (from to files dir &optional delimited)
- "Replace FROM with TO in FILES in directory DIR.
-This runs `query-replace-regexp' in files matching FILES in
-directory DIR.
-
-See `tags-query-replace' for DELIMETED and more information."
- (interactive (dir-replace-read-parameters nil nil))
- (message "%s" (list from to files dir delimited))
- ;;(let ((files (directory-files root nil file-regexp))) (message "files=%s" files))
- (tags-query-replace from to delimited
- `(directory-files ,dir t ,files)))
-
-;;;###autoload
-(defun rdir-query-replace (from to file-regexp root &optional delimited)
- "Replace FROM with TO in FILES in directory tree ROOT.
-This runs `query-replace-regexp' in files matching FILES in
-directory tree ROOT.
-
-See `tags-query-replace' for DELIMETED and more information."
- (interactive (dir-replace-read-parameters nil t))
- (message "%s" (list from to file-regexp root delimited))
- ;;(let ((files (directory-files root nil file-regexp))) (message "files=%s" files))
- (tags-query-replace from to delimited
- `(rdir-get-files ,root ,file-regexp)))
-
-;; (rdir-get-files ".." "^a.*\.el$")
-(defun rdir-get-files (root file-regexp)
- (let ((files (directory-files root t file-regexp))
- (subdirs (directory-files root t)))
- (dolist (subdir subdirs)
- (when (and (file-directory-p subdir)
- (not (or (string= "/." (substring subdir -2))
- (string= "/.." (substring subdir -3)))))
- (setq files (append files (rdir-get-files subdir file-regexp) nil))))
- files))
-
-(defun dir-replace-read-parameters (has-dir recursive)
- (let* ((common
- (let (;;(query-replace-from-history-variable 'grep-regexp-history)
- ;;(query-replace-defaults (or grep-query-replace-defaults
- ;; query-replace-defaults))
- )
- (query-replace-read-args
- "Query replace regexp in files" t t)))
- (from (nth 0 common))
- (to (nth 1 common))
- (delimited (nth 2 common))
- (files (replace-read-files from to))
- (root (unless has-dir (read-directory-name (if recursive "Root directory: "
- "In single directory: ")))))
- (list from to files root delimited)))
-
-;; Mostly copied from `grep-read-files'. Could possible be merged with
-;; that.
-(defvar replace-read-files-history nil)
-;;;###autoload
-(defun replace-read-files (regexp &optional replace)
- "Read files arg for replace."
- (let* ((bn (or (buffer-file-name) (buffer-name)))
- (fn (and bn
- (stringp bn)
- (file-name-nondirectory bn)))
- (default
- (let ((pre-default
- (or (and fn
- (let ((aliases grep-files-aliases)
- alias)
- (while aliases
- (setq alias (car aliases)
- aliases (cdr aliases))
- (if (string-match (wildcard-to-regexp
- (cdr alias)) fn)
- (setq aliases nil)
- (setq alias nil)))
- (cdr alias)))
- (and fn
- (let ((ext (file-name-extension fn)))
- (and ext (concat "^.*\." ext))))
- (car replace-read-files-history)
- (car (car grep-files-aliases)))))
- (if (string-match-p "^\\*\\.[a-zA-Z0-9]*$" pre-default)
- (concat "\\." (substring pre-default 2) "$")
- pre-default)))
- (files (read-string
- (if replace
- (concat "Replace \"" regexp
- "\" with \"" replace "\" in files"
- (if default (concat " (default " default
- ", regexp or *.EXT)"))
- ": ")
- (concat "Search for \"" regexp
- "\" in files"
- (if default (concat " (default " default ")"))
- ": "))
- nil 'replace-read-files-history default)))
- (let ((pattern (and files
- (or (cdr (assoc files grep-files-aliases))
- files))))
- (if (and pattern
- (string-match-p "^\\*\\.[a-zA-Z0-9]*$" pattern))
- (concat "\\." (substring pattern 2) "$")
- pattern))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Info
-
-;;;###autoload
-(defun info-open-file (info-file)
- "Open an info file in `Info-mode'."
- (interactive
- (let ((name (read-file-name "Info file: "
- nil ;; dir
- nil ;; default-filename
- t ;; mustmatch
- nil ;; initial
- ;; predicate:
- (lambda (file)
- (or (file-directory-p file)
- (string-match ".*\\.info\\'" file))))))
- (list name)))
- (info info-file))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Exec path etc
-
-(defun ourcomments-which (prog)
- "Look for first program PROG in `exec-path' using `exec-suffixes'.
-Return full path if found."
- (interactive "sProgram: ")
- (let ((path (executable-find prog)))
- (when (with-no-warnings (called-interactively-p))
- (message "%s found in %s" prog path))
- path))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Custom faces and keys
-
-;;;###autoload
-(defun use-custom-style ()
- "Setup like in `Custom-mode', but without things specific to Custom."
- (make-local-variable 'widget-documentation-face)
- (setq widget-documentation-face 'custom-documentation)
- (make-local-variable 'widget-button-face)
- (setq widget-button-face custom-button)
- (setq show-trailing-whitespace nil)
-
- ;; We need this because of the "More" button on docstrings.
- ;; Otherwise clicking on "More" can push point offscreen, which
- ;; causes the window to recenter on point, which pushes the
- ;; newly-revealed docstring offscreen; which is annoying. -- cyd.
- (set (make-local-variable 'widget-button-click-moves-point) t)
-
- (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed)
- (set (make-local-variable 'widget-mouse-face) custom-button-mouse)
-
- ;; When possible, use relief for buttons, not bracketing. This test
- ;; may not be optimal.
- (when custom-raised-buttons
- (set (make-local-variable 'widget-push-button-prefix) "")
- (set (make-local-variable 'widget-push-button-suffix) "")
- (set (make-local-variable 'widget-link-prefix) "")
- (set (make-local-variable 'widget-link-suffix) ""))
-
- ;; From widget-keymap
- (local-set-key "\t" 'widget-forward)
- (local-set-key "\e\t" 'widget-backward)
- (local-set-key [(shift tab)] 'advertised-widget-backward)
- (local-set-key [backtab] 'widget-backward)
- (local-set-key [down-mouse-2] 'widget-button-click)
- (local-set-key [down-mouse-1] 'widget-button-click)
- (local-set-key [(control ?m)] 'widget-button-press)
- ;; From custom-mode-map
- (local-set-key " " 'scroll-up)
- (local-set-key "\177" 'scroll-down)
- (local-set-key "n" 'widget-forward)
- (local-set-key "p" 'widget-backward))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Bookmarks
-
-(defun bookmark-next-marked ()
- (interactive)
- (let ((bb (get-buffer "*Bookmark List*"))
- pos)
- (when bb
- (with-current-buffer bb
- (setq pos (re-search-forward "^>" nil t))
- (unless pos
- (goto-char (point-min))
- (setq pos (re-search-forward "^>" nil t)))))
- (if pos
- (with-current-buffer bb
- ;; Defined in bookmark.el, should be loaded now.
- (bookmark-bmenu-this-window))
- (call-interactively 'bookmark-bmenu-list)
- (message "Please select bookmark for bookmark next command, then press n"))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Org Mode
-
-(defun ourcomments-org-complete-and-replace-file-link ()
- "If on a org file link complete file name and replace it."
- (interactive)
- (require 'org)
- (let* ((here (point-marker))
- (on-link (eq 'org-link (get-text-property (point) 'face)))
- (link-beg (when on-link
- (previous-single-property-change (1+ here) 'face)))
- (link-end (when on-link
- (next-single-property-change here 'face)))
- (link (when on-link (buffer-substring-no-properties link-beg link-end)))
- type+link
- link-link
- link-link-beg
- link-link-end
- new-link
- dir
- ovl)
- (when (and on-link
- (string-match (rx string-start "[["
- (group (0+ (not (any "]"))))) link))
- (setq type+link (match-string 1 link))
- (when (string-match "^file:\\(.*\\)" type+link)
- (setq link-link (match-string 1 type+link))
- (setq link-link-beg (+ 2 link-beg (match-beginning 1)))
- (setq link-link-end (+ 2 link-beg (match-end 1)))
- (unwind-protect
- (progn
- (setq ovl (make-overlay link-link-beg link-link-end))
- (overlay-put ovl 'face 'highlight)
- (when link-link
- (setq link-link (org-link-unescape link-link))
- (setq dir (when (and link-link (> (length link-link) 0))
- (file-name-directory link-link)))
- (setq new-link (read-file-name "Org file:" dir nil nil (file-name-nondirectory link-link)))
- (delete-overlay ovl)
- (setq new-link (expand-file-name new-link))
- (setq new-link (file-relative-name new-link))
- (delete-region link-link-beg link-link-end)
- (goto-char link-link-beg)
- (insert (org-link-escape new-link))
- t))
- (delete-overlay ovl)
- (goto-char here))))))
-
-;; (defun ourcomments-org-paste-html-link (html-link)
-;; "If there is an html link on clipboard paste it as an org link.
-;; If you have this on the clipboard
-;; <a href=\"http://my.site.org/\">My Site</a>
-;; It will paste this
-;; [[http://my.site.org/][My Site]]
-;; If the URL is to a local file it will create an org link to the
-;; file.
-;; Tip: You can use the Firefox plugin Copy as HTML Link, see URL
-;; `https://addons.mozilla.org/en-US/firefox/addon/2617'.
-;; "
-;; (interactive (list (current-kill 0)))
-;; (let ((conv-link (ourcomments-org-convert-html-link html-link)))
-;; (if (not conv-link)
-;; (message (propertize "No html link on clipboard" 'face 'font-lock-warning-face))
-;; (insert conv-link))))
-
-;; (defun ourcomments-org-convert-html-link (html-link)
-;; (let (converted url str)
-;; (save-match-data
-;; (while (string-match ourcomments-org-paste-html-link-regexp html-link)
-;; (setq converted t)
-;; (setq url (match-string 1 html-link))
-;; (setq str (match-string 2 html-link))
-;; ;;(setq str (concat str (format "%s" (setq temp-n (1+ temp-n)))))
-;; (setq html-link (replace-match (concat "[[" url "][" str "]]") nil nil html-link 0))))
-;; (when converted
-;; html-link)))
-
-(defconst ourcomments-org-paste-html-link-regexp
- "\\`\\(?:<a [^>]*?href=\"\\(.*?\\)\"[^>]*?>\\([^<]*\\)</a>\\)\\'")
-
-;;(string-match-p ourcomments-org-paste-html-link-regexp "<a href=\"link\">text</a>")
-
-;;(defvar temp-n 0)
-(defun ourcomments-org-convert-html-links-in-buffer (beg end)
- "Convert html link between BEG and END to org mode links.
-If there is an html link in the buffer
-
- <a href=\"http://my.site.org/\">My Site</a>
-
-that starts at BEG and ends at END then convert it to this
-
- [[http://my.site.org/][My Site]]
-
-If the URL is to a local file and the buffer is visiting a file
-make the link relative.
-
-However, if the html link is inside an #+BEGIN - #+END block or a
-variant of such blocks then leave the link as it is."
- (when (derived-mode-p 'org-mode)
- (save-match-data
- (let ((here (copy-marker (point)))
- url str converted
- lit-beg lit-end)
- (goto-char beg)
- (save-restriction
- (widen)
- (setq lit-beg (search-backward "#+BEGIN" nil t))
- (when lit-beg
- (goto-char lit-beg)
- (setq lit-end (or (search-forward "#+END" nil t)
- (point-max)))))
- (when (or (not lit-beg)
- (> beg lit-end))
- (goto-char beg)
- (when (save-restriction
- (narrow-to-region beg end)
- (looking-at ourcomments-org-paste-html-link-regexp))
- (setq converted t)
- (setq url (match-string-no-properties 1))
- (setq str (match-string-no-properties 2))
- ;; Check if the URL is to a local file and absolute. And we
- ;; have a buffer.
- (when (and (buffer-file-name)
- (> (length url) 5)
- (string= (substring url 0 6) "file:/"))
- (let ((abs-file-url
- (if (not (memq system-type '(windows-nt ms-dos)))
- (substring url 8)
- (if (string= (substring url 0 8) "file:///")
- (substring url 8)
- ;; file://c:/some/where.txt
- (substring url 7)))))
- (setq url (concat "file:"
- (file-relative-name abs-file-url
- (file-name-directory
- (buffer-file-name)))))))
- (replace-match (concat "[[" url "][" str "]]") nil nil nil 0)))
- (goto-char here)
- nil))))
-
-(defvar ourcomments-paste-with-convert-hook nil
- "Normal hook run after certain paste commands.
-These paste commands are in the list
-`ourcomments-paste-with-convert-commands'.
-
-Each function in this hook is called with two parameters, the
-start and end of the pasted text, until a function returns
-non-nil.")
-(add-hook 'ourcomments-paste-with-convert-hook 'ourcomments-org-convert-html-links-in-buffer)
-
-(defvar ourcomments-paste-beg) ;; dyn var
-(defvar ourcomments-paste-end) ;; dyn var
-(defun ourcomments-grab-paste-bounds (beg end len)
- (setq ourcomments-paste-beg (min beg ourcomments-paste-beg))
- (setq ourcomments-paste-end (max end ourcomments-paste-end)))
-
-(defmacro ourcomments-advice-paste-command (paste-command)
- (let ((adv-name (make-symbol (concat "ourcomments-org-ad-"
- (symbol-name paste-command)))))
- `(defadvice ,paste-command (around
- ,adv-name)
- (let ((ourcomments-paste-beg (point-max)) ;; dyn var
- (ourcomments-paste-end (point-min))) ;; dyn var
- (add-hook 'after-change-functions `ourcomments-grab-paste-bounds nil t)
- ad-do-it ;;;;;;;;;;;;;;;;;;;;;;;;;;
- (remove-hook 'after-change-functions `ourcomments-grab-paste-bounds t)
- (run-hook-with-args-until-success 'ourcomments-paste-with-convert-hook
- ourcomments-paste-beg
- ourcomments-paste-end)))))
-
-(defcustom ourcomments-paste-with-convert-commands '(yank cua-paste viper-put-back viper-Put-back)
- "Commands for which past converting is done.
-See `ourcomments-paste-with-convert-mode' for more information."
- :type '(repeat function)
- :group 'ourcomments-util)
-
-;;;###autoload
-(define-minor-mode ourcomments-paste-with-convert-mode
- "Pasted text may be automatically converted in this mode.
-The functions in `ourcomments-paste-with-convert-hook' are run
-after commands in `ourcomments-paste-with-convert-commands' if any
-of the functions returns non-nil that text is inserted instead of
-the original text.
-
-For exampel when this mode is on and you paste an html link in an
-`org-mode' buffer it will be directly converted to an org style
-link. \(This is the default behaviour.)
-
-Tip: The Firefox plugin Copy as HTML Link is handy, see URL
- `https://addons.mozilla.org/en-US/firefox/addon/2617'.
-
-Note: This minor mode will defadvice the paste commands."
- :global t
- :group 'cua
- :group 'viper
- :group 'ourcomments-util
- (if ourcomments-paste-with-convert-mode
- (progn
- (dolist (command ourcomments-paste-with-convert-commands)
- (eval `(ourcomments-advice-paste-command ,command))
- (ad-activate command)))
- (dolist (command ourcomments-paste-with-convert-commands)
- (ad-unadvise command))))
-
-;; (ourcomments-advice-paste-command cua-paste)
-;; (ad-activate 'cua-paste)
-;; (ad-deactivate 'cua-paste)
-;; (ad-update 'cua-paste)
-;; (ad-unadvise 'cua-paste)
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Menu commands to M-x history
-
-;; (where-is-internal 'mumamo-mark-chunk nil nil)
-;; (where-is-internal 'mark-whole-buffer nil nil)
-;; (where-is-internal 'save-buffer nil nil)
-;; (where-is-internal 'revert-buffer nil nil)
-;; (setq extended-command-history nil)
-(defun ourcomments-M-x-menu-pre ()
- "Add menu command to M-x history."
- (let ((is-menu-command (equal '(menu-bar)
- (when (< 0 (length (this-command-keys-vector)))
- (elt (this-command-keys-vector) 0))))
- (pre-len (length extended-command-history)))
- (when (and is-menu-command
- (not (memq this-command '(ourcomments-M-x-menu-mode))))
- (pushnew (symbol-name this-command) extended-command-history)
- (when (< pre-len (length extended-command-history))
- ;; This message is given pre-command and is therefore likely
- ;; to be overwritten, but that is ok in this case. If the user
- ;; has seen one of these messages s?he knows.
- (message (propertize "(Added %s to M-x history so you can run it from there)"
- 'face 'file-name-shadow)
- this-command)))))
-
-;;;###autoload
-(define-minor-mode ourcomments-M-x-menu-mode
- "Add commands started from Emacs menus to M-x history.
-The purpose of this is to make it easier to redo them and easier
-to learn how to do them from the command line \(which is often
-faster if you know how to do it).
-
-Only commands that are not already in M-x history are added."
- :global t
- (if ourcomments-M-x-menu-mode
- (add-hook 'pre-command-hook 'ourcomments-M-x-menu-pre)
- (remove-hook 'pre-command-hook 'ourcomments-M-x-menu-pre)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Warnings etc
-
-(defvar ourcomments-warnings nil)
-
-(defun ourcomments-display-warnings ()
- (condition-case err
- (let ((msg (mapconcat 'identity (reverse ourcomments-warnings) "\n")))
- (setq ourcomments-warnings nil)
- (message "%s" (propertize msg 'face 'secondary-selection)))
- (error (message "ourcomments-display-warnings: %s" err))))
-
-(defun ourcomments-warning-post ()
- (condition-case err
- (run-with-idle-timer 0.5 nil 'ourcomments-display-warnings)
- (error (message "ourcomments-warning-post: %s" err))))
-
-;;;###autoload
-(defun ourcomments-warning (format-string &rest args)
- (setq ourcomments-warnings (cons (apply 'format format-string args)
- ourcomments-warnings))
- (add-hook 'post-command-hook 'ourcomments-warning-post))
-
-
-
-(provide 'ourcomments-util)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ourcomments-util.el ends here
diff --git a/emacs.d/nxhtml/util/ourcomments-widgets.el b/emacs.d/nxhtml/util/ourcomments-widgets.el
deleted file mode 100644
index 359a0b1..0000000
--- a/emacs.d/nxhtml/util/ourcomments-widgets.el
+++ /dev/null
@@ -1,141 +0,0 @@
-;;; ourcomments-widgets.el --- widgets for custom etc
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-10-13 Tue
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'mumamo nil t))
-
-;;;###autoload (autoload 'command "ourcomments-widgets")
-(define-widget 'command 'restricted-sexp
- "A command function."
- :complete-function (lambda ()
- (interactive)
- (lisp-complete-symbol 'commandp))
- :prompt-value 'widget-field-prompt-value
- :prompt-internal 'widget-symbol-prompt-internal
- :prompt-match 'commandp
- :prompt-history 'widget-command-prompt-value-history
- :action 'widget-field-action
- :match-alternatives '(commandp)
- :validate (lambda (widget)
- (unless (commandp (widget-value widget))
- (widget-put widget :error (format "Invalid command: %S"
- (widget-value widget)))
- widget))
- :value 'ignore
- :tag "Command")
-
-
-;;;###autoload
-(defun major-or-multi-majorp (value)
- "Return t if VALUE is a major or multi major mode function."
- (or (and (fboundp 'mumamo-multi-major-modep)
- (fboundp (mumamo-multi-major-modep value)))
- (major-modep value)))
-
-;; Fix-me: This might in the future be defined in Emacs.
-;;;###autoload
-(defun major-modep (value)
- "Return t if VALUE is a major mode function."
- (let ((sym-name (symbol-name value)))
- ;; Do some reasonable test to find out if it is a major mode.
- ;; Load autoloaded mode functions.
- ;;
- ;; Fix-me: Maybe test for minor modes? How was that done?
- (when (and (fboundp value)
- (commandp value)
- (not (memq value '(flyspell-mode
- isearch-mode
- savehist-mode
- )))
- (< 5 (length sym-name))
- (string= "-mode" (substring sym-name (- (length sym-name) 5)))
- (if (and (listp (symbol-function value))
- (eq 'autoload (car (symbol-function value))))
- (progn
- (message "loading ")
- (load (cadr (symbol-function value)) t t))
- t)
- (or (memq value
- ;; Fix-me: Complement this table of known major modes:
- '(fundamental-mode
- xml-mode
- nxml-mode
- nxhtml-mode
- css-mode
- javascript-mode
- espresso-mode
- php-mode
- ))
- (and (intern-soft (concat sym-name "-hook"))
- ;; This fits `define-derived-mode'
- (get (intern-soft (concat sym-name "-hook")) 'variable-documentation))
- (progn (message "Not a major mode: %s" value)
- ;;(sit-for 4)
- nil)
- ))
- t)))
-
-;;;###autoload (autoload 'major-mode-function "ourcomments-widgets")
-(define-widget 'major-mode-function 'function
- "A major mode lisp function."
- :complete-function (lambda ()
- (interactive)
- (lisp-complete-symbol 'major-or-multi-majorp))
- :prompt-match 'major-or-multi-majorp
- :prompt-history 'widget-function-prompt-value-history
- :match-alternatives '(major-or-multi-majorp)
- :validate (lambda (widget)
- (unless (major-or-multi-majorp (widget-value widget))
- (widget-put widget :error (format "Invalid function: %S"
- (widget-value widget)))
- widget))
- :value 'fundamental-mode
- :tag "Major mode function")
-
-
-
-(provide 'ourcomments-widgets)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ourcomments-widgets.el ends here
diff --git a/emacs.d/nxhtml/util/pause.el b/emacs.d/nxhtml/util/pause.el
deleted file mode 100644
index 2e98d36..0000000
--- a/emacs.d/nxhtml/util/pause.el
+++ /dev/null
@@ -1,794 +0,0 @@
-;;; pause.el --- Take a break!
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-01-19 Sat
-(defconst pause:version "0.70");; Version:
-;; Last-Updated: 2010-01-18 Mon
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; If you are using Emacs then don't you need a little reminder to
-;; take a pause? This library makes Emacs remind you of that. And
-;; gives you a link to a yoga exercise to try in the pause.
-;;
-;; There are essentially two different ways to use this library.
-;; Either you run a separate Emacs process that just reminds you of
-;; pauses. To use it that way see `pause-start-in-new-emacs'.
-;;
-;; Or run it in the current Emacs. To do that add to your .emacs
-;;
-;; (require 'pause)
-;;
-;; and do
-;;
-;; M-x customize-group RET pause RET
-;;
-;; and set `pause-mode' to t.
-;;
-;;
-;; Note: I am unsure if it works on all systems to use a separate
-;; Emacs process. It does work on w32 though. Please tell me
-;; about other systems.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;;###autoload
-(defgroup pause nil
- "Customize your health personal Emacs health saver!"
- :group 'convenience)
-
-(defcustom pause-after-minutes 15
- "Pause after this number of minutes."
- :type 'number
- :group 'pause)
-
-(defcustom pause-1-minute-delay 60
- "Number of seconds to wait in 1 minutes delay."
- :type 'number
- :group 'pause)
-
-(defcustom pause-idle-delay 5
- "Seconds to wait for user to be idle before pause."
- :type 'number
- :group 'pause)
-
-(defcustom pause-even-if-not-in-emacs t
- "Jump up pause even if not in Emacs."
- :type 'boolean
- :group 'pause)
-
-(defcustom pause-restart-anyway-after 2
- "If user does not use Emacs restart timer after this minutes.
-This is used when a user has clicked a link."
- :type 'number
- :group 'pause)
-
-(defcustom pause-tell-again-after 2
- "If user does not exit pause tell again after this minutes."
- :type 'number
- :group 'pause)
-
-(defcustom pause-extra-fun 'pause-start-get-yoga-poses
- "Function to call for extra fun when pausing.
-Default is to show a link to a yoga exercise (recommended!).
-
-Set this variable to nil if you do not want any extra fun.
-
-If this variable's value is a function it will be called when the
-pause frame has just been shown."
- :type '(choice (function :tag "Extra function")
- (const :tag "No extra function" nil))
- :group 'pause)
-
-(defvar pause-exited-from-button nil)
-
-(defcustom pause-background-color "orange"
- "Background color during pause."
- :type 'color
- :group 'pause)
-
-(defcustom pause-mode-line-color "sienna"
- "Mode line color during pause."
- :type 'color
- :group 'pause)
-
-(defcustom pause-1-minute-mode-line-color "yellow"
- "Mode line color during 1 minute phase of pause."
- :type 'color
- :group 'pause)
-
-(defface pause-text-face
- '((t (:foreground "sienna" :height 1.5 :bold t)))
- "Face main text in pause buffer."
- :group 'pause)
-
-(defface pause-info-text-face
- '((t (:foreground "yellow")))
- "Face info text in pause buffer."
- :group 'pause)
-
-(defface pause-message-face
- '((t (:inherit secondary-selection)))
- "Face for pause messages."
- :group 'pause)
-
-(defface pause-1-minute-message-face
- '((t (:inherit mode-line-inactive)))
- "Face for pause messages."
- :group 'pause)
-
-(defcustom pause-break-text
- (concat "\n\tHi there,"
- "\n\tYou are worth a PAUSE!"
- "\n\nTry some mindfulness:"
- "\n\t- Look around and observe."
- "\n\t- Listen."
- "\n\t- Feel your body.")
- "Text to show during pause."
- :type 'integer
- :group 'pause)
-
-(defvar pause-el-file (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
-
-(defvar pause-default-img-dir
- (let ((this-dir (file-name-directory pause-el-file)))
- (expand-file-name "../etc/img/pause/" this-dir)))
-
-(defcustom pause-img-dir pause-default-img-dir
- "Image directory for pause.
-A random image is choosen from this directory for pauses."
- :type 'directory
- :group 'pause)
-
-
-
-(defvar pause-timer nil)
-
-;;(defvar pause-break-exit-calls nil)
-
-(defun pause-start-timer ()
- (pause-start-timer-1 (* 60 pause-after-minutes)))
-
-(defun pause-start-timer-1 (sec)
- (pause-cancel-timer)
- (setq pause-timer (run-with-timer sec nil 'pause-pre-break)))
-
-(defun pause-one-minute ()
- "Give you another minute ..."
- (pause-start-timer-1 pause-1-minute-delay)
- (message (propertize " OK, I will come back in a minute! -- greatings from pause"
- 'face 'pause-message-face)))
-
-(defun pause-save-me ()
- (pause-start-timer)
- (message (propertize " OK, I will save you again in %d minutes! -- greatings from pause "
- 'face 'pause-message-face)
- pause-after-minutes))
-
-(defun pause-pre-break ()
- (condition-case err
- (save-match-data ;; runs in timer
- (pause-cancel-timer)
- (setq pause-timer (run-with-idle-timer pause-idle-delay nil 'pause-break-in-timer)))
- (error
- (lwarn 'pause-pre-break
- :error "%s" (error-message-string err)))))
-
-(defvar pause-break-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control meta shift ?p)] 'pause-break-exit)
- (define-key map [tab] 'forward-button)
- (define-key map [(meta tab)] 'backward-button)
- (define-key map [(shift tab)] 'backward-button)
- (define-key map [backtab] 'backward-button)
- map))
-
-(defvar pause-buffer nil)
-(defvar pause-frame nil)
-
-(define-derived-mode pause-break-mode nil "Pause"
- "Mode used during pause in pause buffer.
-
-It defines the following key bindings:
-
-\\{pause-break-mode-map}"
- (set (make-local-variable 'buffer-read-only) t)
- (setq show-trailing-whitespace nil)
- ;;(set (make-local-variable 'cursor-type) nil)
- ;; Fix-me: workaround for emacs bug
- ;;(run-with-idle-timer 0 nil 'pause-hide-cursor)
- )
-
-;; Fix-me: make one state var
-(defvar pause-break-exit-active nil)
-(defvar pause-break-1-minute-state nil)
-
-
-(defun pause-break ()
- (pause-cancel-timer)
- (let ((wcfg (current-frame-configuration))
- (old-mode-line-bg (face-attribute 'mode-line :background))
- old-frame-bg-color
- old-frame-left-fringe
- old-frame-right-fringe
- old-frame-tool-bar-lines
- old-frame-menu-bar-lines
- old-frame-vertical-scroll-bars)
- (dolist (f (frame-list))
- (add-to-list 'old-frame-bg-color (cons f (frame-parameter f 'background-color)))
- (add-to-list 'old-frame-left-fringe (cons f (frame-parameter f 'left-fringe)))
- (add-to-list 'old-frame-right-fringe (cons f (frame-parameter f 'right-fringe)))
- (add-to-list 'old-frame-tool-bar-lines (cons f (frame-parameter f 'tool-bar-lines)))
- (add-to-list 'old-frame-menu-bar-lines (cons f (frame-parameter f 'menu-bar-lines)))
- (add-to-list 'old-frame-vertical-scroll-bars (cons f (frame-parameter f 'vertical-scroll-bars))))
-
- ;; Fix-me: Something goes wrong with the window configuration, try a short pause
- (remove-hook 'window-configuration-change-hook 'pause-break-exit)
- (run-with-idle-timer 0.2 nil 'pause-break-show)
- (setq pause-break-exit-active nil)
- (setq pause-break-1-minute-state nil) ;; set in `pause-break-show'
- (setq pause-exited-from-button nil)
- (unwind-protect
- (let ((n 0)
- (debug-on-error nil))
- (while (and (> 3 (setq n (1+ n)))
- (not pause-break-exit-active)
- (not pause-break-1-minute-state))
- (condition-case err
- (recursive-edit)
- (error (message "%s" (error-message-string err))))
- (unless (or pause-break-exit-active
- pause-break-1-minute-state)
- (when (> 2 n) (message "Too early to pause (%s < 2)" n))
- (add-hook 'window-configuration-change-hook 'pause-break-exit))))
-
- (remove-hook 'window-configuration-change-hook 'pause-break-exit)
- (pause-tell-again-cancel-timer)
- ;;(set-frame-parameter nil 'background-color "white")
- (dolist (f (frame-list))
- (set-frame-parameter f 'background-color (cdr (assq f old-frame-bg-color)))
- (set-frame-parameter f 'left-fringe (cdr (assq f old-frame-left-fringe)))
- (set-frame-parameter f 'right-fringe (cdr (assq f old-frame-right-fringe)))
- (set-frame-parameter f 'tool-bar-lines (cdr (assq f old-frame-tool-bar-lines)))
- (set-frame-parameter f 'menu-bar-lines (cdr (assq f old-frame-menu-bar-lines)))
- (set-frame-parameter f 'vertical-scroll-bars (cdr (assq f old-frame-vertical-scroll-bars))))
- ;; Fix-me: The frame grows unless we do redisplay here:
- (redisplay t)
- (set-frame-configuration wcfg t)
- (when pause-frame(lower-frame pause-frame))
- (set-face-attribute 'mode-line nil :background old-mode-line-bg)
- (run-with-idle-timer 2.0 nil 'run-hooks 'pause-break-exit-hook)
- (kill-buffer pause-buffer)
- (cond (pause-exited-from-button
- ;; Do not start timer until we start working again.
- (run-with-idle-timer 1 nil 'add-hook 'post-command-hook 'pause-save-me-post-command)
- ;; But if we do not do that within some minutes then start timer anyway.
- (run-with-idle-timer (* 60 pause-restart-anyway-after) nil 'pause-save-me))
- (pause-break-1-minute-state
- (run-with-idle-timer 0 nil 'pause-one-minute))
- (t
- (run-with-idle-timer 0 nil 'pause-save-me))))))
-
-(defun pause-save-me-post-command ()
- (pause-start-timer))
-
-(defvar pause-break-exit-hook nil
- "Hook run after break exit.
-Frame configuration has been restored when this is run.
-Please note that it is run in a timer.")
-
-(defun pause-break-show ()
- ;; In timer
- (save-match-data
- (condition-case err
- (pause-break-show-1)
- (error
- ;;(remove-hook 'window-configuration-change-hook 'pause-break-exit)
- (pause-break-exit)
- (message "pause-break-show error: %s" (error-message-string err))))))
-
-(defvar pause-break-last-wcfg-change (float-time))
-
-(defun pause-break-show-1 ()
- ;; Do these first if something goes wrong.
- (setq pause-break-last-wcfg-change (float-time))
- ;;(run-with-idle-timer (* 1.5 (length (frame-list))) nil 'add-hook 'window-configuration-change-hook 'pause-break-exit)
-
- ;; fix-me: temporary:
- ;;(add-hook 'window-configuration-change-hook 'pause-break-exit)
- (unless pause-extra-fun (run-with-idle-timer 1 nil 'pause-break-message))
- (run-with-idle-timer 10 nil 'pause-break-exit-activate)
- (setq pause-break-1-minute-state t)
- (set-face-attribute 'mode-line nil :background pause-1-minute-mode-line-color)
- (with-current-buffer (setq pause-buffer
- (get-buffer-create "* P A U S E *"))
- (let ((inhibit-read-only t))
- (erase-buffer)
- (pause-break-mode)
- (setq left-margin-width 25)
- (pause-insert-img)
- (insert (propertize pause-break-text 'face 'pause-text-face))
- (goto-char (point-min))
- (when (search-forward "mindfulness" nil t)
- (make-text-button (- (point) 11) (point)
- 'face '(:inherit pause-text-face :underline t)
- 'action (lambda (btn)
- (browse-url "http://www.jimhopper.com/mindfulness/"))))
- (goto-char (point-max))
- (insert (propertize "\n\nClick on a link below to exit pause\n" 'face 'pause-info-text-face))
- ;;(add-text-properties (point-min) (point-max) (list 'keymap (make-sparse-keymap)))
- (insert-text-button "Exit pause"
- 'action `(lambda (button)
- (condition-case err
- (pause-break-exit-from-button)
- (error (message "%s" (error-message-string err))))))
- (insert "\n")
- (dolist (m '(hl-needed-mode))
- (when (and (boundp m) (symbol-value m))
- (funcall m -1)))))
- (dolist (f (frame-list))
- (pause-max-frame f))
- (pause-tell-again)
- (when pause-extra-fun (funcall pause-extra-fun))
- ;;(setq pause-break-exit-calls 0)
- (setq pause-break-last-wcfg-change (float-time))
- (pause-tell-again-start-timer))
-
-(defun pause-max-frame (f)
- (let* ((avail-width (- (display-pixel-width)
- (* 2 (frame-parameter f 'border-width))
- (* 2 (frame-parameter f 'internal-border-width))))
- (avail-height (- (display-pixel-height)
- (* 2 (frame-parameter f 'border-width))
- (* 2 (frame-parameter f 'internal-border-width))))
- (cols (/ avail-width (frame-char-width)))
- (rows (- (/ avail-height (frame-char-height)) 2)))
- ;;(set-frame-parameter (selected-frame) 'fullscreen 'fullboth)
- ;;(set-frame-parameter (selected-frame) 'fullscreen 'maximized)
- (setq pause-break-last-wcfg-change (float-time))
- (with-selected-frame f
- (delete-other-windows (frame-first-window f))
- (with-selected-window (frame-first-window)
- (switch-to-buffer pause-buffer)
- (goto-char (point-max))))
- (modify-frame-parameters f
- `((background-color . ,pause-background-color)
- (left-fringe . 0)
- (right-fringe . 0)
- (tool-bar-lines . 0)
- (menu-bar-lines . 0)
- (vertical-scroll-bars . nil)
- (left . 0)
- (top . 0)
- (width . ,cols)
- (height . ,rows)
- ))))
-
-(defvar pause-tell-again-timer nil)
-
-(defun pause-tell-again-start-timer ()
- (pause-tell-again-cancel-timer)
- (setq pause-tell-again-timer
- (run-with-idle-timer (* 60 pause-tell-again-after) t 'pause-tell-again)))
-
-(defun pause-tell-again-cancel-timer ()
- (when (timerp pause-tell-again-timer)
- (cancel-timer pause-tell-again-timer))
- (setq pause-tell-again-timer nil))
-
-(defun pause-tell-again ()
- (when (and window-system pause-even-if-not-in-emacs)
- (pause-max-frame pause-frame)
- (raise-frame pause-frame)))
-
-
-(defun pause-break-message ()
- (when (/= 0 (recursion-depth))
- (message "%s" (propertize "Please take a pause! (Or exit now to take it in 1 minute.)"
- 'face 'pause-1-minute-message-face))))
-
-(defun pause-break-exit-activate ()
- (when (/= 0 (recursion-depth))
- (setq pause-break-exit-active t)
- (setq pause-break-1-minute-state nil)
- (set-face-attribute 'mode-line nil :background pause-mode-line-color)
- (message nil)
- (with-current-buffer pause-buffer
- (let ((inhibit-read-only t))
- ;; Fix-me: This interfere with text buttons.
- ;;(add-text-properties (point-min) (point-max) (list 'keymap nil))
- ))))
-
-(defun pause-break-exit ()
- (interactive)
- (let ((elapsed (- (float-time) pause-break-last-wcfg-change)))
- ;;(message "elapsed=%s pause-break-last-wcfg-change=%s" elapsed pause-break-last-wcfg-change)
- (setq pause-break-last-wcfg-change (float-time))
- (when (> elapsed 1.0)
- (setq pause-break-exit-active t)
- (remove-hook 'window-configuration-change-hook 'pause-break-exit)
- ;;(pause-tell-again-cancel-timer)
- (when (/= 0 (recursion-depth))
- (exit-recursive-edit)))))
-
-(defun pause-break-exit-from-button ()
- (setq pause-break-1-minute-state nil)
- (setq pause-exited-from-button t)
- (pause-break-exit))
-
-(defun pause-insert-img ()
- (let* ((inhibit-read-only t)
- img
- src
- (slice '(0 0 200 300))
- (imgs (directory-files pause-img-dir nil nil t))
- skip
- )
- (setq imgs (delete nil
- (mapcar (lambda (d)
- (unless (file-directory-p d) d))
- imgs)))
- (if (not imgs)
- (setq img "No images found")
- (setq skip (random (length imgs)))
- (while (> skip 0)
- (setq skip (1- skip))
- (setq imgs (cdr imgs)))
- (setq src (expand-file-name (car imgs) pause-img-dir))
- (if (file-exists-p src)
- (condition-case err
- (setq img (create-image src nil nil
- :relief 1
- ;;:margin inlimg-margins
- ))
- (error (setq img (error-message-string err))))
- (setq img (concat "Image not found: " src))))
- (if (stringp img)
- (insert img)
- (insert-image img nil 'left-margin slice)
- )
- ))
-
-(defun pause-hide-cursor ()
- ;; runs in timer, save-match-data
- (with-current-buffer pause-buffer
- (set (make-local-variable 'cursor-type) nil)))
-
-(defun pause-cancel-timer ()
- (remove-hook 'post-command-hook 'pause-save-me-post-command)
- (when (timerp pause-timer) (cancel-timer pause-timer))
- (setq pause-timer nil))
-
-(defun pause-break-in-timer ()
- (save-match-data ;; runs in timer
- (pause-cancel-timer)
- (if (or (active-minibuffer-window)
- (and (boundp 'edebug-active)
- edebug-active))
- (let ((pause-idle-delay 5))
- (pause-pre-break))
- (let ((there-was-an-error nil))
- (condition-case err
- (pause-break)
- (error
- (setq there-was-an-error t)))
- (when there-was-an-error
- (condition-case err
- (progn
- (select-frame last-event-frame)
- (let ((pause-idle-delay nil))
- (pause-pre-break)))
- (error
- (lwarn 'pause-break-in-timer2 :error "%s" (error-message-string err))
- )))))))
-
-(defcustom pause-only-when-server-mode t
- "Allow `pause-mode' inly in the Emacs that has server-mode enabled.
-This is to prevent multiple Emacs with `pause-mode'."
- :type 'boolean
- :group 'pause)
-
-;;;###autoload
-(define-minor-mode pause-mode
- "This minor mode tries to make you take a break.
-It will jump up and temporary stop your work - even if you are
-not in Emacs. If you are in Emacs it will however try to be
-gentle and wait until you have been idle with the keyboard for a
-short while. \(If you are not in Emacs it can't be gentle. How
-could it?)
-
-Then it will show you a special screen with a link to a yoga
-exercise you can do when you pause.
-
-After the pause you continue your work where you were
-interrupted."
- :global t
- :group 'pause
- :set-after '(server-mode)
- (if pause-mode
- (if (and pause-only-when-server-mode
- (not server-mode)
- (not (with-no-warnings (called-interactively-p))))
- (progn
- (setq pause-mode nil)
- (message "Pause mode canceled because not server-mode"))
- (pause-start-timer))
- (pause-cancel-timer)))
-
-;; (emacs-Q "-l" buffer-file-name "--eval" "(pause-temp-err)")
-;; (emacs-Q "-l" buffer-file-name "--eval" "(run-with-timer 1 nil 'pause-temp-err)")
-;; (pause-temp-err)
-(defun pause-temp-err ()
- (switch-to-buffer (get-buffer-create "pause-temp-err buffer"))
- (setq buffer-read-only t)
- (let ((inhibit-read-only t))
- (add-text-properties (point-min) (point-max) (list 'keymap nil))
- (insert-text-button "click to test"
- 'action (lambda (btn)
- (message "Click worked")))
- ;;(add-text-properties (point-min) (point-max) (list 'keymap nil))
- ))
-
-;; (customize-group-other-window 'pause)
-;; (apply 'custom-set-variables (pause-get-group-saved-customizations 'pause custom-file))
-;; (pause-get-group-saved-customizations 'w32shell custom-file)
-(defun pause-get-group-saved-customizations (group cus-file)
- "Return customizations saved for GROUP in CUS-FILE."
- (let* ((cus-buf (find-buffer-visiting cus-file))
- (cus-old cus-buf)
- (cus-point (when cus-old (with-current-buffer cus-old (point))))
- (cusg-all (get group 'custom-group))
- (cusg-vars (delq nil (mapcar (lambda (elt)
- (when (eq (nth 1 elt) 'custom-variable)
- (car elt)))
- cusg-all)))
- cus-vars-form
- cus-face-form
- cus-saved-vars
- cus-saved-face)
- (unless cus-buf (setq cus-buf (find-file-noselect cus-file)))
- (with-current-buffer cus-buf
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (progn
- (while (progn (skip-chars-forward " \t\n\^l")
- (looking-at ";"))
- (forward-line 1))
- (not (eobp)))
- (let ((form (read (current-buffer))))
- (cond
- ((eq (car form) 'custom-set-variables)
- (setq cus-vars-form form))
- ((eq (car form) 'custom-set-faces)
- (setq cus-face-form form))
- )))))
- (dolist (vl (cdr cus-vars-form))
- (when (memq (car (cadr vl)) cusg-vars)
- (setq cus-saved-vars (cons (cadr vl) cus-saved-vars))))
- cus-saved-vars))
-
-;; (emacs-Q "-l" buffer-file-name "--eval" "(pause-start 0.1 nil)")
-(defun pause-start (after-minutes cus-file)
- "Start `pause-mode' with interval AFTER-MINUTES.
-This bypasses `pause-only-when-server-mode'.
-
-You can use this funciton to start a separate Emacs process that
-handles pause, for example like this if you want a pause every 15
-minutes:
-
- emacs -Q -l pause --eval \"(pause-start 15 nil)\"
-
-Note: Another easier alternative might be to use
- `pause-start-in-new-emacs'."
- (interactive "nPause after how many minutes: ")
- (pause-start-1 after-minutes cus-file))
-
-(defun pause-start-1 (after-minutes cus-file)
- (setq debug-on-error t)
- (pause-cancel-timer)
- (when (and cus-file (file-exists-p cus-file))
- (let ((args (pause-get-group-saved-customizations 'pause cus-file)))
- ;;(message "cus-file=%S" cus-file)
- ;;(message "args=%S" args)
- (apply 'custom-set-variables args)))
- (setq pause-after-minutes after-minutes)
- (let ((pause-only-when-server-mode nil))
- (pause-mode 1))
- (switch-to-buffer (get-buffer-create "Pause information"))
- (insert (propertize "Emacs pause\n"
- 'face '(:inherit variable-pitch :height 1.5)))
- (insert (format "Pausing every %d minute.\n" after-minutes))
- (insert "Or, ")
- (insert-text-button "pause now"
- 'action `(lambda (button)
- (condition-case err
- (pause-break)
- (error (message "%s" (error-message-string err))))))
- (insert "!\n")
- ;;(setq buffer-read-only t)
- (pause-break-mode)
- (delete-other-windows)
- (setq mode-line-format nil)
- (setq pause-frame (selected-frame))
- (message nil)
- (set-frame-parameter nil 'background-color pause-background-color))
-
-;; (pause-start-in-new-emacs 0.3)
-;; (pause-start-in-new-emacs 15)
-;;;###autoload
-(defun pause-start-in-new-emacs (after-minutes)
- "Start pause with interval AFTER-MINUTES in a new Emacs instance.
-The new Emacs instance will be started with -Q. However if
-`custom-file' is non-nil it will be loaded so you can still
-customize pause.
-
-One way of using this function may be to put in your .emacs
-something like
-
- ;; for just one Emacs running pause
- (when server-mode (pause-start-in-new-emacs 15))
-
-See `pause-start' for more info.
-
-"
- (interactive (list pause-after-minutes))
- (let* ((this-emacs (locate-file invocation-name
- (list invocation-directory)
- exec-suffixes))
- (cus-file (if custom-file custom-file "~/.emacs"))
- (args `("-l" ,pause-el-file
- "--geometry=40x3"
- "-D"
- "--eval" ,(format "(pause-start %s %S)" after-minutes cus-file))))
- (setq args (cons "-Q" args))
- (apply 'call-process this-emacs nil 0 nil args)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Link to yoga poses
-
-;; (defun w3-download-callback (fname)
-;; (let ((coding-system-for-write 'binary))
-;; (goto-char (point-min))
-;; (search-forward "\n\n" nil t)
-;; (write-region (point) (point-max) fname))
-;; (url-mark-buffer-as-dead (current-buffer))
-;; (message "Download of %s complete." (url-view-url t))
-;; (sit-for 3))
-
-;;(run-with-idle-timer 0 nil 'pause-get-yoga-poses)
-(defvar pause-yoga-poses-host-url "http://www.abc-of-yoga.com/")
-
-;;(pause-start-get-yoga-poses)
-(defun pause-start-get-yoga-poses ()
- (require 'url-vars)
- (let ((url-show-status nil)) ;; do not show download messages
- (url-retrieve (concat pause-yoga-poses-host-url "yogapractice/mountain.asp")
- 'pause-callback-get-yoga-poses)))
-
-(defun pause-callback-get-yoga-poses (status)
- (let ((pose (pause-random-yoga-pose (pause-get-yoga-poses-1 (current-buffer)))))
- (message nil)
- (when (and pose (buffer-live-p pause-buffer))
- (pause-insert-yoga-link pose))))
-
-(defun pause-insert-yoga-link (pose)
- (with-current-buffer pause-buffer
- (let ((here (point))
- (inhibit-read-only t)
- (pose-url (concat pause-yoga-poses-host-url (car pose))))
- (goto-char (point-max))
- (insert "Link to yoga posture for you: ")
- (insert-text-button (cdr pose)
- 'action `(lambda (button)
- (condition-case err
- (progn
- (browse-url ,pose-url)
- (run-with-idle-timer 1 nil 'pause-break-exit-from-button))
- (error (message "%s" (error-message-string err))))))
- (insert "\n")
- (pause-break-message))))
-
-(defun pause-get-yoga-poses ()
- (let* ((url-show-status nil) ;; do not show download messages
- (buf (url-retrieve-synchronously "http://www.abc-of-yoga.com/yogapractice/mountain.asp")))
- (pause-get-yoga-poses-1 buf)))
-
-;; (setq x (url-retrieve-synchronously "http://www.abc-of-yoga.com/yogapractice/mountain.asp"))
-;; (setq x (url-retrieve-synchronously "http://www.emacswiki.org/emacs/EmacsFromBazaar"))
-
-;; (defun temp-y ()
-;; (message "before y")
-;; ;;(setq y (url-retrieve-synchronously "http://www.emacswiki.org/emacs/EmacsFromBazaar"))
-;; (setq x (url-retrieve-synchronously "http://www.abc-of-yoga.com/yogapractice/mountain.asp"))
-;; (message "after x")
-;; )
-;; (run-with-idle-timer 0 nil 'temp-y)
-
-(defun pause-get-yoga-poses-1 (buf)
- (require 'url)
- (setq url-debug t)
- ;; url-insert-file-contents
- (let* ((first-marker "<p>These are all the Yoga Poses covered in this section:</p>")
- (table-patt "<table\\(?:.\\|\n\\)*?</table>")
- table-beg
- table-end
- (pose-patt "<A HREF=\"\\([^\"]*?\\)\" class=\"LinkBold\">\\([^<]*?\\)</A>")
- poses
- (trouble-msg
- (catch 'trouble
- ;;(switch-to-buffer-other-window buf)
- (with-current-buffer buf
- (goto-char 1)
- (rename-buffer "YOGA" t)
- (unless (search-forward first-marker nil t)
- (throw 'trouble "Can't find marker for the poses on the page"))
- (backward-char 10)
- (unless (re-search-forward table-patt nil t)
- (throw 'trouble "Can't find table with poses on the page"))
- (setq table-beg (match-beginning 0))
- (setq table-end (match-end 0))
- (goto-char table-beg)
- (while (re-search-forward pose-patt table-end t)
- (setq poses (cons (cons (match-string 1) (match-string 2))
- poses)))
- (unless poses
- (throw 'trouble "Can't find poses in table on the page"))
- (kill-buffer)
- nil))))
- (if trouble-msg
- (progn
- (message "%s" trouble-msg)
- nil)
- (message "Number of yoga poses found=%s" (length poses))
- poses)))
-
-(defun pause-random-yoga-pose (poses)
- (when poses
- (random t)
- (let* ((n-poses (length poses))
- (pose-num (random (1- n-poses)))
- (the-pose (nth pose-num poses)))
- the-pose)))
-
-;;(pause-random-yoga-pose (pause-get-yoga-poses))
-
-(provide 'pause)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; pause.el ends here
diff --git a/emacs.d/nxhtml/util/pointback.el b/emacs.d/nxhtml/util/pointback.el
deleted file mode 100644
index 7a17943..0000000
--- a/emacs.d/nxhtml/util/pointback.el
+++ /dev/null
@@ -1,93 +0,0 @@
-;;; pointback.el --- Restore window points when returning to buffers
-
-;; Copyright (C) 2009 Markus Triska
-
-;; Author: Markus Triska <markus.triska@gmx.at>
-;; Keywords: convenience
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; When you have two windows X and Y showing different sections of the
-;; same buffer B, then switch to a different buffer in X, and then
-;; show B in X again, the new point in X will be the same as in Y.
-;; With pointback-mode, window points are preserved instead, and point
-;; will be where it originally was in X for B when you return to B.
-
-;; Use M-x pointback-mode RET to enable pointback-mode for a buffer.
-;; Use M-x global-pointback-mode RET to enable it for all buffers.
-
-;;; Code:
-
-(require 'assoc)
-
-(defconst pointback-version "0.2")
-
-(defvar pointback-windows nil
- "Association list of windows to buffers and window points.")
-
-(defun pointback-store-point ()
- "Save window point and start for the current buffer of the
-selected window."
- (sit-for 0) ; redisplay to update window-start
- (let* ((buffers (cdr (assq (selected-window) pointback-windows)))
- (b (assq (current-buffer) buffers))
- (p (cons (point) (window-start))))
- (if b
- (setcdr b p)
- (let ((current (cons (current-buffer) p)))
- (aput 'pointback-windows (selected-window) (cons current buffers))))))
-
-(defun pointback-restore ()
- "Restore previously stored window point for the selected window."
- (let* ((buffers (cdr (assq (selected-window) pointback-windows)))
- (b (assq (current-buffer) buffers))
- (p (cdr b)))
- (when b
- (goto-char (car p))
- (set-window-start (selected-window) (cdr p) t)))
- ;; delete dead windows from pointback-windows
- (dolist (w pointback-windows)
- (unless (window-live-p (car w))
- (adelete 'pointback-windows (car w))))
- ;; delete window points of dead buffers
- (dolist (w pointback-windows)
- (let (buffers)
- (dolist (b (cdr w))
- (when (buffer-live-p (car b))
- (push b buffers)))
- (aput 'pointback-windows (car w) buffers))))
-
-;;;###autoload
-(define-minor-mode pointback-mode
- "Restore previous window point when switching back to a buffer."
- :lighter ""
- (if pointback-mode
- (progn
- (add-hook 'post-command-hook 'pointback-store-point nil t)
- (add-hook 'window-configuration-change-hook
- 'pointback-restore nil t))
- (remove-hook 'post-command-hook 'pointback-store-point t)
- (remove-hook 'window-configuration-change-hook 'pointback-restore t)
- (setq pointback-windows nil)))
-
-;;;###autoload
-(define-globalized-minor-mode global-pointback-mode pointback-mode pointback-on)
-
-(defun pointback-on ()
- (pointback-mode 1))
-
-(provide 'pointback)
-;;; pointback.el ends here
diff --git a/emacs.d/nxhtml/util/popcmp.el b/emacs.d/nxhtml/util/popcmp.el
deleted file mode 100644
index 319145d..0000000
--- a/emacs.d/nxhtml/util/popcmp.el
+++ /dev/null
@@ -1,472 +0,0 @@
-;;; popcmp.el --- Completion enhancements, popup etc
-;;
-;; Author: Lennart Borgman
-;; Created: Tue Jan 09 12:00:29 2007
-;; Version: 1.00
-;; Last-Updated: 2008-03-08T03:30:15+0100 Sat
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `ourcomments-util'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'ourcomments-util nil t))
-
-;;;###autoload
-(defgroup popcmp nil
- "Customization group for popup completion."
- :tag "Completion Style \(popup etc)"
- :group 'nxhtml
- :group 'convenience)
-
-;; (define-toggle popcmp-popup-completion t
-;; "Use a popup menu for some completions if non-nil.
-
-;; ***** Obsolete: Use `popcmp-completion-style' instead.
-
-;; When completion is used for alternatives tighed to text at the
-;; point in buffer it may make sense to use a popup menu for
-;; completion. This variable let you decide whether normal style
-;; completion or popup style completion should be used then.
-
-;; This style of completion is not implemented for all completions.
-;; It is implemented for specific cases but the choice of completion
-;; style is managed generally by this variable for all these cases.
-
-;; See also the options `popcmp-short-help-beside-alts' and
-;; `popcmp-group-alternatives' which are also availabe when popup
-;; completion is available."
-;; :tag "Popup style completion"
-;; :group 'popcmp)
-
-(defun popcmp-cant-use-style (style)
- (save-match-data ;; runs in timer
- (describe-variable 'popcmp-completion-style)
- (message (propertize "popcmp-completion-style: style `%s' is not available"
- 'face 'secondary-selection)
- style)))
-
-
-
-(defun popcmp-set-completion-style (val)
- "Internal use, set `popcmp-completion-style' to VAL."
- (assert (memq val '(popcmp-popup emacs-default company-mode anything)) t)
- (case val
- ('company-mode (unless (fboundp 'company-mode)
- (require 'company-mode nil t))
- (unless (fboundp 'company-mode)
- (run-with-idle-timer 1 nil 'popcmp-cant-use-style val)
- (setq val 'popcmp-popup)))
- ('anything (unless (fboundp 'anything)
- (require 'anything nil t))
- (unless (fboundp 'anything)
- (run-with-idle-timer 1 nil 'popcmp-cant-use-style val)
- (setq val 'popcmp-popup))))
- (set-default 'popcmp-completion-style val)
- (unless (eq val 'company-mode)
- (when (and (boundp 'global-company-mode)
- global-company-mode)
- (global-company-mode -1))
- (remove-hook 'after-change-major-mode-hook 'company-set-major-mode-backend)
- (remove-hook 'mumamo-after-change-major-mode-hook 'mumamo-turn-on-company-mode))
- (when (eq val 'company-mode)
- (unless (and (boundp 'global-company-mode)
- global-company-mode)
- (global-company-mode 1))
- (add-hook 'after-change-major-mode-hook 'company-set-major-mode-backend)
- (add-hook 'mumamo-after-change-major-mode-hook 'mumamo-turn-on-company-mode)))
-
-;; fix-me: move to mumamo.el
-(defun mumamo-turn-on-company-mode ()
- (when (and (boundp 'company-mode)
- company-mode)
- (company-mode 1)
- (company-set-major-mode-backend)))
-
-;;;###autoload
-(defcustom popcmp-completion-style (cond
- ;;((and (fboundp 'global-company-mode) 'company-mode) 'company-mode)
- (t 'popcmp-popup))
- "Completion style.
-The currently available completion styles are:
-
-- popcmp-popup: Use OS popup menus (default).
-- emacs-default: Emacs default completion.
-- Company Mode completion.
-- anything: The Anything elisp lib completion style.
-
-The style of completion set here is not implemented for all
-completions. The scope varies however with which completion
-style you have choosen.
-
-For information about Company Mode and how to use it see URL
-`http://www.emacswiki.org/emacs/CompanyMode'.
-
-For information about Anything and how to use it see URL
-`http://www.emacswiki.org/emacs/Anything'.
-
-See also the options `popcmp-short-help-beside-alts' and
-`popcmp-group-alternatives' which are also availabe when popup
-completion is available."
- :type '(choice (const company-mode)
- (const popcmp-popup)
- (const emacs-default)
- (const anything))
- :set (lambda (sym val)
- (popcmp-set-completion-style val))
- :group 'popcmp)
-
-;;(define-toggle popcmp-short-help-beside-alts t
-(define-minor-mode popcmp-short-help-beside-alts
- "Show a short help text beside each alternative.
-If this is non-nil a short help text is shown beside each
-alternative for which such a help text is available.
-
-This works in the same circumstances as
-`popcmp-completion-style'."
- :tag "Short help beside alternatives"
- :global t
- :init-value t
- :group 'popcmp)
-
-(defun popcmp-short-help-beside-alts-toggle ()
- "Toggle `popcmp-short-help-beside-alts'."
- (popcmp-short-help-beside-alts (if popcmp-short-help-beside-alts -1 1)))
-
-;;(define-toggle popcmp-group-alternatives t
-(define-minor-mode popcmp-group-alternatives
- "Do completion in two steps.
-For some completions the alternatives may have been grouped in
-sets. If this option is non-nil then you will first choose a set
-and then an alternative within this set.
-
-This works in the same circumstances as
-`popcmp-completion-style'."
- :tag "Group alternatives"
- :global t
- :init-value t
- :group 'popcmp)
-
-(defun popcmp-group-alternatives-toggle ()
- "Toggle `popcmp-group-alternatives-toggle'."
- (interactive)
- (popcmp-group-alternatives (if popcmp-group-alternatives -1 1)))
-
-(defun popcmp-getsets (alts available-sets)
- (let ((sets nil))
- (dolist (tg alts)
- (let (found)
- (dolist (s available-sets)
- (when (member tg (cdr s))
- (setq found t)
- (let ((sets-entry (assq (car s) sets)))
- (unless sets-entry
- (setq sets (cons (list (car s)) sets))
- (setq sets-entry (assq (car s) sets)))
- (setcdr sets-entry (cons tg (cdr sets-entry))))))
- (unless found
- (let ((sets-entry (assq 'unsorted sets)))
- (unless sets-entry
- (setq sets (cons (list 'unsorted) sets))
- (setq sets-entry (assq 'unsorted sets)))
- (setcdr sets-entry (cons tg (cdr sets-entry)))))))
- (setq sets (sort sets (lambda (a b)
- (string< (format "%s" b)
- (format "%s" a)))))
- ;;(dolist (s sets) (setcdr s (reverse (cdr s))))
- sets))
-
-(defun popcmp-getset-alts (set-name sets)
- ;; Allow both strings and symbols as keys:
- (let ((set (or (assoc (downcase set-name) sets)
- (assoc (read (downcase set-name)) sets))))
- (cdr set)))
-
-(defvar popcmp-completing-with-help nil)
-
-(defun popcmp-add-help (alt alt-help-hash)
- (if alt-help-hash
- (let ((h (if (hash-table-p alt-help-hash)
- (gethash alt alt-help-hash)
- (let ((hh (assoc alt alt-help-hash)))
- (cadr hh)))
- ))
- (if h
- (concat alt " -- " h)
- alt))
- alt))
-
-(defun popcmp-remove-help (alt-with-help)
- (when alt-with-help
- (replace-regexp-in-string " -- .*" "" alt-with-help)))
-
-(defun popcmp-anything (prompt collection
- predicate require-match
- initial-input hist def inherit-input-method
- alt-help alt-sets)
- (let* ((table collection)
- (alt-sets2 (apply 'append (mapcar 'cdr alt-sets)))
- (cands (cond ((not (listp table)) alt-sets2)
- (t table)))
- ret-val
- (source `((name . "Completion candidates")
- (candidates . ,cands)
- (action . (("Select current alternative (press TAB to see it again)" . (lambda (candidate)
- (setq ret-val candidate))))))))
- (anything (list source) initial-input prompt)
- ret-val))
-
-(defun popcmp-completing-read-1 (prompt collection
- predicate require-match
- initial-input hist2 def inherit-input-method alt-help alt-sets)
- ;; Fix-me: must rename hist to hist2 in par list. Emacs bug?
- (cond
- ((eq popcmp-completion-style 'emacs-default)
- (completing-read prompt collection predicate require-match initial-input hist2 def inherit-input-method))
- ((eq popcmp-completion-style 'anything)
- (popcmp-anything prompt collection predicate require-match initial-input hist2 def inherit-input-method
- alt-help alt-sets))
- ((eq popcmp-completion-style 'company-mode)
- ;; No way to read this from company-mode, use emacs-default
- (completing-read prompt collection predicate require-match initial-input hist2 def inherit-input-method))
- (t (error "Do not know popcmp-completion-style %S" popcmp-completion-style))))
-
-(defun popcmp-completing-read-other (prompt
- table
- &optional predicate require-match
- initial-input pop-hist def inherit-input-method
- alt-help
- alt-sets)
- (let ((alts
- (if (and popcmp-group-alternatives alt-sets)
- (all-completions initial-input table predicate)
- (if popcmp-short-help-beside-alts
- (all-completions "" table predicate)
- table))))
- (when (and popcmp-group-alternatives alt-sets)
- (let* ((sets (popcmp-getsets alts alt-sets))
- (set-names (mapcar (lambda (elt)
- (capitalize (format "%s" (car elt))))
- sets))
- set)
- (setq set
- (popcmp-completing-read-1 (concat
- (substring prompt 0 (- (length prompt) 2))
- ", select group: ")
- set-names
- nil t
- nil nil nil inherit-input-method nil nil))
- (if (or (not set) (= 0 (length set)))
- (setq alts nil)
- (setq set (downcase set))
- (setq alts (popcmp-getset-alts set sets)))))
- (if (not alts)
- ""
- (if (= 1 (length alts))
- (car alts)
- (when popcmp-short-help-beside-alts
- (setq alts (mapcar (lambda (a)
- (popcmp-add-help a alt-help))
- alts)))
- (popcmp-remove-help
- ;;(completing-read prompt
- (popcmp-completing-read-1 prompt
- alts ;table
- predicate require-match
- initial-input pop-hist def inherit-input-method
- ;;alt-help alt-sets
- nil nil
- ))))))
-
-(defun popcmp-completing-read-pop (prompt
- table
- &optional predicate require-match
- initial-input hist def inherit-input-method
- alt-help
- alt-sets)
- (unless initial-input
- (setq initial-input ""))
- (let ((matching-alts (all-completions initial-input table predicate))
- completion)
- (if (not matching-alts)
- (progn
- (message "No alternative found")
- nil)
- (let ((pop-map (make-sparse-keymap prompt))
- (sets (when (and popcmp-group-alternatives alt-sets)
- (popcmp-getsets matching-alts alt-sets)))
- (add-alt (lambda (k tg)
- (define-key k
- (read (format "[popcmp-%s]" (replace-regexp-in-string " " "-" tg)))
- (list 'menu-item
- (popcmp-add-help tg alt-help)
- `(lambda ()
- (interactive)
- (setq completion ,tg)))))))
- (if sets
- (dolist (s sets)
- (let ((k (make-sparse-keymap)))
- (dolist (tg (cdr s))
- (funcall add-alt k tg))
- (define-key pop-map
- (read (format "[popcmps-%s]" (car s)))
- (list 'menu-item
- (capitalize (format "%s" (car s)))
- k))))
- (dolist (tg matching-alts)
- (funcall add-alt pop-map tg)))
- (popup-menu-at-point pop-map)
- completion))))
-
-(defvar popcmp-in-buffer-allowed nil)
-
-;;;###autoload
-(defun popcmp-completing-read (prompt
- table
- &optional predicate require-match
- initial-input pop-hist def inherit-input-method
- alt-help
- alt-sets)
- "Read a string in the minubuffer with completion, or popup a menu.
-This function can be used instead `completing-read'. The main
-purpose is to provide a popup style menu for completion when
-completion is tighed to text at point in a buffer. If a popup
-menu is used it will be shown at window point. Whether a popup
-menu or minibuffer completion is used is governed by
-`popcmp-completion-style'.
-
-The variables PROMPT, TABLE, PREDICATE, REQUIRE-MATCH,
-INITIAL-INPUT, POP-HIST, DEF and INHERIT-INPUT-METHOD all have the
-same meaning is for `completing-read'.
-
-ALT-HELP should be nil or a hash variable or an association list
-with the completion alternative as key and a short help text as
-value. You do not need to supply help text for all alternatives.
-The use of ALT-HELP is set by `popcmp-short-help-beside-alts'.
-
-ALT-SETS should be nil or an association list that has as keys
-groups and as second element an alternative that should go into
-this group.
-"
- (if (and popcmp-in-buffer-allowed
- (eq popcmp-completion-style 'company-mode)
- (boundp 'company-mode)
- company-mode)
- (progn
- (add-hook 'company-completion-finished-hook 'nxhtml-complete-tag-do-also-for-state-completion t)
- ;;(remove-hook 'company-completion-finished-hook 'nxhtml-complete-tag-do-also-for-state-completion)
- (call-interactively 'company-nxml)
- initial-input)
-
- (popcmp-mark-completing initial-input)
- (let ((err-sym 'quit)
- (err-val nil)
- ret)
- (unwind-protect
- (if (eq popcmp-completion-style 'popcmp-popup)
- (progn
- (setq err-sym nil)
- (popcmp-completing-read-pop
- prompt
- table
- predicate require-match
- initial-input pop-hist def inherit-input-method
- alt-help
- alt-sets))
- ;;(condition-case err
- (prog1
- (setq ret (popcmp-completing-read-other
- prompt
- table
- predicate require-match
- initial-input pop-hist def inherit-input-method
- alt-help
- alt-sets))
- ;; Unless quit or error in Anything we come here:
- ;;(message "ret=(%S)" ret)
- (when (and ret (not (string= ret "")))
- (setq err-sym nil)))
- ;; (error
- ;; ;;(message "err=%S" err)
- ;; (setq err-sym (car err))
- ;; (setq err-val (cdr err))))
- )
- (popcmp-unmark-completing)
- (when err-sym (signal err-sym err-val))))))
-
-(defvar popcmp-mark-completing-ovl nil)
-
-(defun popcmp-mark-completing (initial-input)
- (let ((start (- (point) (length initial-input)))
- (end (point)))
- (if (overlayp popcmp-mark-completing-ovl)
- (move-overlay popcmp-mark-completing-ovl start end)
- (setq popcmp-mark-completing-ovl (make-overlay start end))
- (overlay-put popcmp-mark-completing-ovl 'face 'match)))
- (sit-for 0))
-
-(defun popcmp-unmark-completing ()
- (when popcmp-mark-completing-ovl
- (delete-overlay popcmp-mark-completing-ovl)))
-
-
-;; (defun popcmp-temp ()
-;; (interactive)
-;; (let* ((coord (point-to-coord (point)))
-;; (x (nth 0 (car coord)))
-;; (y (nth 1 (car coord)))
-;; (emacsw32-max-frames nil)
-;; (f (make-frame
-;; (list '(minibuffer . only)
-;; '(title . "Input")
-;; '(name . "Input frame")
-;; (cons 'left x)
-;; (cons 'top y)
-;; '(height . 1)
-;; '(width . 40)
-;; '(border-width . 1)
-;; '(internal-border-width . 2)
-;; '(tool-bar-lines . nil)
-;; '(menu-bar-lines . nil)
-;; ))))
-;; f))
-
-
-(provide 'popcmp)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; popcmp.el ends here
diff --git a/emacs.d/nxhtml/util/readme.txt b/emacs.d/nxhtml/util/readme.txt
deleted file mode 100644
index b9db030..0000000
--- a/emacs.d/nxhtml/util/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-This subdirectory contains files used by nXhtml that I have
-written. The files are placed here because they may be of use also
-outside of nXhtml.
diff --git a/emacs.d/nxhtml/util/rebind.el b/emacs.d/nxhtml/util/rebind.el
deleted file mode 100644
index cf4700c..0000000
--- a/emacs.d/nxhtml/util/rebind.el
+++ /dev/null
@@ -1,240 +0,0 @@
-;;; rebind.el --- Rebind keys
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-01-20T12:04:37+0100 Sun
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; See `rebind-keys-mode' for information.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'new-key-seq-widget nil t))
-(eval-when-compile (require 'ourcomments-widgets nil t))
-
-
-(defun rebind-toggle-first-modifier (orig-key-seq mod)
- (let* ((first (elt orig-key-seq 0))
- (new-key-seq (copy-sequence orig-key-seq)))
- (setq first (if (memq mod first)
- (delq mod first)
- (cons mod first)))
- (aset new-key-seq 0 first)
- new-key-seq))
-;; (rebind-toggle-first-modifier (key-description-to-vector "C-c a") 'shift)
-;; (rebind-toggle-first-modifier (key-description-to-vector "C-S-c a") 'shift)
-
-(defvar widget-commandp-prompt-value-history nil)
-
-;;;###autoload
-(defgroup rebind nil
- "Customizaton group for `rebind-keys-mode'."
- :group 'convenience
- :group 'emulations
- :group 'editing-basics
- :group 'emacsw32)
-
-;; (customize-option-other-window 'rebind-keys)
-;; (Fetched key bindings from http://www.davidco.com/tips_tools/tip45.html)
-(defcustom rebind-keys
- '(
- ("MS Windows - often used key bindings" t
- (
- (
- [(control ?a)]
- "C-a on w32 normally means 'select all'. In Emacs it is `beginning-of-line'."
- t
- shift
- ourcomments-mark-whole-buffer-or-field)
- (
- [(control ?o)]
- "C-o on w32 normally means 'open file'. In Emacs it is `open-line'."
- nil
- shift
- find-file)
- (
- [(control ?f)]
- "C-f is commonly search on w32. In Emacs it is `forward-char'."
- nil
- shift
- isearch-forward)
- (
- [(control ?s)]
- "C-s is normally 'save file' on w32. In Emacs it is `isearch-forward'."
- nil
- nil
- save-buffer)
- (
- [(control ?w)]
- "C-w is often something like kill-buffer on w32. In Emacs it is `kill-region'."
- t
- shift
- kill-buffer)
- (
- [(control ?p)]
- "C-p is nearly always print on w32. In Emacs it is `previous-line'."
- t
- shift
- hfyview-buffer)
- (
- [(home)]
- "HOME normally stays in a field. By default it does not do that in Emacs."
- t
- nil
- ourcomments-move-beginning-of-line)
- (
- [(control ?+)]
- "C-+ often increases font size (in web browsers for example)."
- t
- shift
- text-scale-adjust)
- (
- [(control ?-)]
- "C-- often decreases font size (in web browsers for example)."
- t
- shift
- text-scale-adjust)
- (
- [(control ?0)]
- "C-0 often resets font size (in web browsers for example)."
- t
- shift
- text-scale-adjust)
- )))
- "Normal Emacs keys that are remapped to follow some other standard.
-The purpose of this variable is to make it easy to switch between
-Emacs key bindings and other standards.
-
-The new bindings are made in the global minor mode
-`rebind-keys-mode' and will only have effect when this mode is
-on.
-
-*Note:* You can only move functions bound in the global key map
- this way.
-*Note:* To get CUA keys you should turn on option `cua-mode'.
-*Note:* To get vi key bindings call function `viper-mode'.
-*Note:* `text-scale-adjust' already have default key bindings."
- :type '(repeat
- (list
- (string :tag "For what")
- (boolean :tag "Group on/off")
- (repeat
- (list
- (key-sequence :tag "Emacs key binding")
- (string :tag "Why rebind")
- (boolean :tag "Rebinding on/off")
- (choice :tag "Move original by"
- (const :tag "Don't put it on any new binding" nil)
- (choice :tag "Add key binding modifier"
- (const meta)
- (const control)
- (const shift))
- (key-sequence :tag "New binding for original function"))
- (command :tag "New command on above key"))
- )))
- :set (lambda (sym val)
- (set-default sym val)
- (when (featurep 'rebind)
- (rebind-update-keymap)))
- :group 'rebind)
-
-(defvar rebind-keys-mode-map nil)
-
-(defvar rebind--emul-keymap-alist nil)
-
-;;(rebind-update-keymap)
-(defun rebind-update-keymap ()
- (let ((m (make-sparse-keymap)))
- (dolist (group rebind-keys)
- (when (nth 1 group)
- (dolist (v (nth 2 group))
- (let* ((orig-key (nth 0 v))
- (comment (nth 1 v))
- (enabled (nth 2 v))
- (new-choice (nth 3 v))
- (new-fun (nth 4 v))
- (orig-fun (lookup-key global-map orig-key))
- new-key)
- (when enabled
- (when new-choice
- (if (memq new-choice '(meta control shift))
- (setq new-key (rebind-toggle-first-modifier orig-key new-choice))
- (setq new-key new-choice))
- (define-key m new-key orig-fun))
- (define-key m orig-key new-fun))))
- (setq rebind-keys-mode-map m))))
- (setq rebind--emul-keymap-alist (list (cons 'rebind-keys-mode rebind-keys-mode-map))))
-
-;;;###autoload
-(define-minor-mode rebind-keys-mode
- "Rebind keys as defined in `rebind-keys'.
-The key bindings will override almost all other key bindings
-since it is put on emulation level, like for example ``cua-mode'
-and `viper-mode'.
-
-This is for using for example C-a to mark the whole buffer \(or a
-field). There are some predifined keybindings for this."
- :keymap rebind-keys-mode-map
- :global t
- :group 'rebind
- (if rebind-keys-mode
- (progn
- (rebind-update-keymap)
- ;;(rebind-keys-post-command)
- (add-hook 'post-command-hook 'rebind-keys-post-command t))
- (remove-hook 'post-command-hook 'rebind-keys-post-command)
- (setq emulation-mode-map-alists (delq 'rebind--emul-keymap-alist emulation-mode-map-alists))))
-
-(defun rebind-keys-post-command ()
- "Make sure we are first in the list when turned on.
-This is reasonable since we are using this mode to really get the
-key bindings we want!"
- (unless (eq 'rebind--emul-keymap-alist (car emulation-mode-map-alists))
- (setq emulation-mode-map-alists (delq 'rebind--emul-keymap-alist emulation-mode-map-alists))
- (when rebind-keys-mode
- (add-to-list 'emulation-mode-map-alists 'rebind--emul-keymap-alist))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Interactive functions for the keymap
-
-
-
-(provide 'rebind)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; rebind.el ends here
diff --git a/emacs.d/nxhtml/util/rnc-mode.el b/emacs.d/nxhtml/util/rnc-mode.el
deleted file mode 100644
index 5829a50..0000000
--- a/emacs.d/nxhtml/util/rnc-mode.el
+++ /dev/null
@@ -1,265 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; A major mode for editing RELAX NG Compact syntax.
-;; Version: 1.0b3
-;; Date: 2002-12-05
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Copyright (c) 2002, Pantor Engineering AB
-;; All rights reserved.
-;;
-;; Redistribution and use in source and binary forms, with or
-;; without modification, are permitted provided that the following
-;; conditions are met:
-;;
-;; * Redistributions of source code must retain the above copyright
-;; notice, this list of conditions and the following disclaimer.
-;;
-;; * Redistributions in binary form must reproduce the above
-;; copyright notice, this list of conditions and the following
-;; disclaimer in the documentation and/or other materials provided
-;; with the distribution.
-;;
-;; * Neither the name of Pantor Engineering AB nor the names of its
-;; contributors may be used to endorse or promote products derived
-;; from this software without specific prior written permission.
-;;
-;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-;; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-;; ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-;; POSSIBILITY OF SUCH DAMAGE.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Created by David.Rosenborg@pantor.com
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Example setup for your ~/.emacs file:
-;;
-;; (autoload 'rnc-mode "rnc-mode")
-;; (setq auto-mode-alist
-;; (cons '("\\.rnc\\'" . rnc-mode) auto-mode-alist))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Changes since 1.0b:
-;; Added a couple of defvars for faces to handle differences
-;; between GNU Emacs and XEmacs.
-;;
-;; 2008-12-28: Changed forward-char-command => forward-char
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(require 'font-lock)
-
-(defvar rnc-indent-level 3 "The RNC indentation level.")
-
-(defvar rnc-keywords
- (mapcar (lambda (kw) (concat "\\b" kw "\\b"))
- '("attribute" "div" "element"
- "empty" "external" "grammar" "include" "inherit" "list"
- "mixed" "notAllowed" "parent" "start" "string"
- "text" "token"))
- "RNC keywords")
-
-(defvar rnc-atoms
- (mapcar (lambda (kw) (concat "\\b" kw "\\b"))
- '("empty" "notAllowed" "string" "text" "token"))
- "RNC atomic pattern keywords")
-
-(defun rnc-make-regexp-choice (operands)
- "(op1 op2 ...) -> \"\\(op1\\|op2\\|...\\)\""
- (let ((result "\\("))
- (mapc (lambda (op) (setq result (concat result op "\\|"))) operands)
- (concat (substring result 0 -2) "\\)")))
-
-;; Font lock treats face names differently in GNU Emacs and XEmacs
-;; The following defvars is a workaround
-
-(defvar italic 'italic)
-(defvar default 'default)
-(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face)
-
-(defvar rnc-font-lock-keywords
- (list
- '("\\b\\(attribute\\|element\\)\\b\\([^{]+\\){" 2
- font-lock-variable-name-face)
- '("[a-zA-Z][-a-zA-Z0-9._]*:[a-zA-Z][-a-zA-Z0-9._]*" . italic)
- '("\\b\\(default\\(\\s +namespace\\)?\\|namespace\\|datatypes\\)\\(\\s +[a-zA-Z][-a-zA-Z0-9._]*\\)?\\s *=" 1 font-lock-preprocessor-face)
- '("\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\(\\s \\|\n\\)*[|&]?=" 1
- font-lock-function-name-face)
- '("[a-zA-Z][a-zA-Z0-9._]*\\(-[a-zA-Z][a-zA-Z0-9._]*\\)+" . default)
- (cons (rnc-make-regexp-choice rnc-atoms) 'italic)
- (cons (rnc-make-regexp-choice rnc-keywords) font-lock-keyword-face)
- )
- "RNC Highlighting")
-
-
-(defun rnc-find-column (first start)
- "Find which column to indent to."
-
- ;; FIXME: backward-sexp doesn't work with unbalanced braces in comments
-
- (let* (column
- pos
- ;; Find start of enclosing block or assignment
- (token
- (if (member first '("]" "}" ")"))
- (progn
- (goto-char (+ start 1))
- (backward-sexp)
- (beginning-of-line)
- (re-search-forward "\\S ")
- (setq pos (point))
- (setq column (- (current-column) 1))
- 'lpar)
- (catch 'done
- (while (setq pos (re-search-backward "[{}()=]\\|\\[\\|\\]"
- (point-min) t))
- (let ((c (match-string 0)))
- (beginning-of-line)
- (re-search-forward "\\S ")
- (setq column (- (current-column) 1))
- (beginning-of-line)
- (cond
- ;; Don't match inside comments
- ;; FIXME: Should exclude matches inside string literals too
- ((re-search-forward "#" pos t) (beginning-of-line))
- ;; Skip block
- ((member c '("]" "}" ")"))
- (goto-char (+ pos 1))
- (backward-sexp))
-
- ((string= c "=") (throw 'done 'eq))
- (t (throw 'done 'lpar)))))))))
-
- (cond
- ((not pos) 0)
- ((member first '("]" "}" ")")) column)
- ((member first '("{" "(")) (+ column rnc-indent-level))
-
- ;; Give lines starting with an operator a small negative indent.
- ;; This allows for the following indentation style:
- ;; foo =
- ;; bar
- ;; | baz
- ;; | oof
- ((member first '("," "&" "|")) (+ column (- rnc-indent-level 2)))
-
- ;; Check if first preceding non-whitespace character was an operator
- ;; If not, this is most likely a new assignment.
- ;; FIXME: This doesn't play well with name classes starting on a new
- ;; line
- ((eq token 'eq)
- (goto-char start)
- (if (and (re-search-backward "[^ \t\n]" (point-min) t)
- (member (match-string 0) '("&" "|" "," "=" "~")))
- (+ column rnc-indent-level)
- column))
-
- (t (+ column rnc-indent-level)))))
-
-(defun rnc-indent-line ()
- "Indents the current line."
- (interactive)
- (let ((orig-point (point)))
- (beginning-of-line)
- (let* ((beg-of-line (point))
- (pos (re-search-forward "\\(\\S \\|\n\\)" (point-max) t))
- (first (match-string 0))
- (start (match-beginning 0))
- (col (- (current-column) 1)))
-
- (goto-char beg-of-line)
-
- (let ((indent-column (rnc-find-column first start)))
- (goto-char beg-of-line)
-
- (cond
- ;; Only modify buffer if the line must be reindented
- ((not (= col indent-column))
- (if (not (or (null pos)
- (= beg-of-line start)))
- (kill-region beg-of-line start))
-
- (goto-char beg-of-line)
-
- (while (< 0 indent-column)
- (insert " ")
- (setq indent-column (- indent-column 1))))
-
- ((< orig-point start) (goto-char start))
- (t (goto-char orig-point)))))))
-
-
-(defun rnc-electric-brace (arg)
- (interactive "*P")
- (self-insert-command (prefix-numeric-value arg))
- (rnc-indent-line)
- (let ((p (point)))
- (when (save-excursion
- (beginning-of-line)
- (let ((pos (re-search-forward "\\S " (point-max) t)))
- (and pos (= (- pos 1) p))))
- (forward-char))))
-
-(defvar rnc-mode-map () "Keymap used in RNC mode.")
-(when (not rnc-mode-map)
- (setq rnc-mode-map (make-sparse-keymap))
- (define-key rnc-mode-map "\C-c\C-c" 'comment-region)
- (define-key rnc-mode-map "}" 'rnc-electric-brace)
- (define-key rnc-mode-map "{" 'rnc-electric-brace)
- (define-key rnc-mode-map "]" 'rnc-electric-brace)
- (define-key rnc-mode-map "[" 'rnc-electric-brace))
-
-;;;###autoload
-(defun rnc-mode ()
- "Major mode for editing RELAX NG Compact Syntax schemas.
-\\{rnc-mode-map}"
- (interactive)
-
- (kill-all-local-variables)
-
- (make-local-variable 'indent-line-function)
- (setq indent-line-function 'rnc-indent-line)
-
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults '(rnc-font-lock-keywords nil t nil nil))
-
- (use-local-map rnc-mode-map)
-
- (make-local-variable 'comment-start)
- (make-local-variable 'comment-end)
- (make-local-variable 'comment-start-skip)
-
- (setq comment-start "#"
- comment-end ""
- comment-start-skip "\\([ \n\t]+\\)##?[ \n\t]+")
-
- (let ((rnc-syntax-table (copy-syntax-table)))
- (modify-syntax-entry ?# "< " rnc-syntax-table)
- (modify-syntax-entry ?\n "> " rnc-syntax-table)
- (modify-syntax-entry ?\^m "> " rnc-syntax-table)
- (modify-syntax-entry ?\\ "w " rnc-syntax-table)
- (modify-syntax-entry ?' "\" " rnc-syntax-table)
- (modify-syntax-entry ?. "w " rnc-syntax-table)
- (modify-syntax-entry ?- "w " rnc-syntax-table)
- (modify-syntax-entry ?_ "w " rnc-syntax-table)
- (set-syntax-table rnc-syntax-table))
-
- (setq mode-name "RNC"
- major-mode 'rnc-mode)
- (run-hooks 'rnc-mode-hook))
-
-(provide 'rnc-mode)
diff --git a/emacs.d/nxhtml/util/rxi.el b/emacs.d/nxhtml/util/rxi.el
deleted file mode 100644
index 505d0b4..0000000
--- a/emacs.d/nxhtml/util/rxi.el
+++ /dev/null
@@ -1,148 +0,0 @@
-;;; rxi.el --- Interactive regexp reading using rx format
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-04-07T18:18:39+0200 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Read regexp as `rx' forms from minibuffer.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defvar rxi-read-hist nil)
-
-(defun rxi-find-definition (rx-sym)
- (let* ((rec (assoc rx-sym rx-constituents))
- )
- (while (symbolp (cdr rec))
- (setq rec (assoc (cdr rec) rx-constituents)))
- (cdr rec)))
-
-(defun rxi-list-type-p (rx-sym)
- (listp (rxi-find-definition rx-sym)))
-
-(defun rxi-complete ()
- "Complete `rx' constituents."
- (interactive)
- ;; Don't care about state for now, there will be an error instead
- (let* ((partial (when (looking-back (rx (1+ (any "a-z01:|=>*?+\\-"))) nil t)
- (match-string-no-properties 0)))
- (candidates (let ((want-list
- (= ?\( (char-before (match-beginning 0)))))
- (delq nil
- (mapcar (lambda (rec)
- (let* ((sym (car rec))
- (lst (rxi-list-type-p sym)))
- (when (or (and want-list lst)
- (and (not want-list)
- (not lst)))
- (symbol-name sym))))
- rx-constituents))))
- (match-set (when partial
- (all-completions
- partial
- candidates))))
- (cond
- ((not match-set)
- (message "No completions"))
- ((= 1 (length match-set))
- (insert (substring (car match-set) (length partial))))
- (t
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list match-set partial))))))
-
-(defvar rxi-read-keymap
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map minibuffer-local-completion-map)
- (define-key map [tab] 'rxi-complete)
- (define-key map [(meta tab)] 'rxi-complete)
- (define-key map [?\ ] 'self-insert-command)
- map))
-
-(defvar rxi-trailing-overlay nil)
-
-(defun rxi-minibuf-setup ()
- (when rxi-trailing-overlay (delete-overlay rxi-trailing-overlay))
- (setq rxi-trailing-overlay
- (make-overlay (point-max) (point-max)
- (current-buffer)
- t t))
- (overlay-put rxi-trailing-overlay 'after-string
- (propertize ")"
- 'face
- (if (and
- (fboundp 'noticeable-minibuffer-prompts-mode)
- noticeable-minibuffer-prompts-mode)
- 'minibuffer-noticeable-prompt
- 'minibuffer-prompt)))
- (remove-hook 'minibuffer-setup-hook 'rxi-minibuf-setup))
-
-(defun rxi-minibuf-exit ()
- (when rxi-trailing-overlay
- (delete-overlay rxi-trailing-overlay)
- (setq rxi-trailing-overlay nil))
- (remove-hook 'minibuffer-exit-hook 'rxi-minibuf-exit))
-
-(defun rxi-read (prompt)
- "Read a `rx' regexp form from minibuffer.
-Return cons of rx and regexp, both as strings."
- (interactive (list "Test (rx "))
- (let (rx-str rx-full-str res-regexp)
- (while (not res-regexp)
- (condition-case err
- (progn
- (add-hook 'minibuffer-setup-hook 'rxi-minibuf-setup)
- (add-hook 'minibuffer-exit-hook 'rxi-minibuf-exit)
- (setq rx-str (read-from-minibuffer prompt
- rx-str ;; initial-contents
- rxi-read-keymap
- nil ;; read
- 'rxi-read-hist
- nil ;; inherit-input-method - no idea...
- ))
- (setq rx-full-str (concat "(rx " rx-str ")"))
- (setq res-regexp (eval (read rx-full-str))))
- (error (message "%s" (error-message-string err))
- (sit-for 2))))
- (when (with-no-warnings (called-interactively-p)) (message "%s => \"%s\"" rx-full-str res-regexp))
- (cons rx-full-str res-regexp)))
-
-
-(provide 'rxi)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; rxi.el ends here
diff --git a/emacs.d/nxhtml/util/search-form.el b/emacs.d/nxhtml/util/search-form.el
deleted file mode 100644
index b7b6dd2..0000000
--- a/emacs.d/nxhtml/util/search-form.el
+++ /dev/null
@@ -1,473 +0,0 @@
-;;; search-form.el --- Search form
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-05-05T01:50:20+0200 Sun
-;; Version: 0.11
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; `cus-edit', `cus-face', `cus-load', `cus-start', `wid-edit'.
-;;
-;;;;;;;;;;seasfireplstring ;;
-;;
-;;; Commentary:
-;;
-;; After an idea by Eric Ludlam on Emacs Devel:
-;;
-;; http://lists.gnu.org/archive/html/emacs-devel/2008-05/msg00152.html
-;;
-;; NOT QUITE READY! Tagged files have not been tested.
-;;
-;; Fix-me: work on other windows buffer by default, not buffer from
-;; where search form was created.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'ourcomments-util))
-(require 'cus-edit)
-(require 'grep)
-
-(defvar search-form-sfield nil)
-(make-variable-buffer-local 'search-form-sfield)
-(defvar search-form-rfield nil)
-(make-variable-buffer-local 'search-form-rfield)
-
-(defvar search-form-win-config nil)
-(make-variable-buffer-local 'search-form-win-config)
-(put 'search-form-win-config 'permanent-local t)
-
-(defvar search-form-current-buffer nil)
-
-(defun search-form-multi-occur-get-buffers ()
- (let* ((bufs (list (read-buffer "First buffer to search: "
- (current-buffer) t)))
- (buf nil)
- (ido-ignore-item-temp-list bufs))
- (while (not (string-equal
- (setq buf (read-buffer
- (if (eq read-buffer-function 'ido-read-buffer)
- "Next buffer to search (C-j to end): "
- "Next buffer to search (RET to end): ")
- nil t))
- ""))
- (add-to-list 'bufs buf)
- (setq ido-ignore-item-temp-list bufs))
- (nreverse (mapcar #'get-buffer bufs))))
-
-(defvar search-form-buffer) ;; dyn var, silence compiler
-(defvar search-form-search-string) ;; dyn var, silence compiler
-(defvar search-form-replace-string) ;; dyn var, silence compiler
-
-(defun search-form-notify-1 (use-search-field
- use-replace-field
- w
- hide-form
- display-orig-buf)
- (let ((search-form-search-string (when use-search-field (widget-value search-form-sfield)))
- (search-form-replace-string (when use-replace-field (widget-value search-form-rfield)))
- (search-form-buffer (current-buffer))
- (this-search (widget-get w :do-search))
- (do-it t))
- (if (and use-search-field
- (= 0 (length search-form-search-string)))
- (progn
- (setq do-it nil)
- (message "Please specify a search string"))
- (when (and use-replace-field
- (= 0 (length search-form-replace-string)))
- (setq do-it nil)
- (message "Please specify a replace string")))
- (when do-it
- (if hide-form
- (progn
- (set-window-configuration search-form-win-config)
- (funcall this-search search-form-search-string)
- ;;(kill-buffer search-form-buffer)
- )
- (when display-orig-buf
- (let ((win (display-buffer search-form-current-buffer t)))
- (select-window win t)))
- ;;(funcall this-search search-form-search-string))
- (funcall this-search w)
- ))))
-
-(defun search-form-notify-no-field (w &rest ignore)
- (search-form-notify-1 nil nil w nil t))
-
-(defun search-form-notify-sfield (w &rest ignore)
- (search-form-notify-1 t nil w nil t))
-
-(defun search-form-notify-sfield-nobuf (w &rest ignore)
- (search-form-notify-1 t nil w nil nil))
-
-(defun search-form-notify-both-fields (w &rest ignore)
- (search-form-notify-1 t t w nil t))
-
-(defun search-form-insert-button (title function descr do-search-fun)
- (widget-insert " ")
- (let ((button-title (format " %-15s " title)))
- (widget-create 'push-button
- :do-search do-search-fun
- :notify 'search-form-notify-no-field
- :current-buffer search-form-current-buffer
- button-title))
- (widget-insert " " descr)
- (widget-insert "\n"))
-
-(defun search-form-insert-search (title search-fun descr do-search-fun no-buf)
- (widget-insert " ")
- (let ((button-title (format " %-15s " title)))
- (if no-buf
- (widget-create 'push-button
- :do-search do-search-fun
- :notify 'search-form-notify-sfield-nobuf
- :current-buffer search-form-current-buffer
- button-title)
- (widget-create 'push-button
- :do-search do-search-fun
- :notify 'search-form-notify-sfield
- :current-buffer search-form-current-buffer
- button-title)
- ))
- (widget-insert " " descr " ")
- (search-form-insert-help search-fun)
- (widget-insert "\n"))
-
-(defun search-form-insert-fb (descr
- use-sfield
- forward-fun
- do-forward-fun
- backward-fun
- do-backward-fun)
- (widget-insert (format " %s: " descr))
- (widget-create 'push-button
- :do-search do-forward-fun
- :use-sfield use-sfield
- :notify '(lambda (widget &rest event)
- (if (widget-get widget :use-sfield)
- (search-form-notify-sfield widget)
- (search-form-notify-no-field widget)))
- :current-buffer search-form-current-buffer
- " Forward ")
- (widget-insert " ")
- (search-form-insert-help forward-fun)
- (widget-insert " ")
- (widget-create 'push-button
- :do-search do-backward-fun
- :use-sfield use-sfield
- :notify '(lambda (widget &rest event)
- (if (widget-get widget :use-sfield)
- (search-form-notify-sfield widget)
- (search-form-notify-no-field widget)))
- :current-buffer search-form-current-buffer
- " Backward ")
- (widget-insert " ")
- (search-form-insert-help backward-fun)
- (widget-insert "\n"))
-
-(defun search-form-insert-replace (title replace-fun descr do-replace-fun)
- (widget-insert " ")
- (let ((button-title (format " %-15s " title)))
- (widget-create 'push-button
- :do-search do-replace-fun
- :notify 'search-form-notify-both-fields
- :current-buffer search-form-current-buffer
- button-title))
- (widget-insert " " descr " ")
- (search-form-insert-help replace-fun)
- (widget-insert "\n"))
-
-(defun search-form-insert-help (fun)
- (widget-insert "(")
- (widget-create 'function-link
- :value fun
- :tag "help"
- :button-face 'link)
- (widget-insert ")"))
-
-(defun sf-widget-field-value-set (widget value)
- "Set current text in editing field."
- (let ((from (widget-field-start widget))
- (to (widget-field-end widget))
- (buffer (widget-field-buffer widget))
- (size (widget-get widget :size))
- (secret (widget-get widget :secret))
- (old (current-buffer)))
- (if (and from to)
- (progn
- (set-buffer buffer)
- (while (and size
- (not (zerop size))
- (> to from)
- (eq (char-after (1- to)) ?\s))
- (setq to (1- to)))
- (goto-char to)
- (delete-region from to)
- (insert value)
- (let ((result (buffer-substring-no-properties from to)))
- (when secret
- (let ((index 0))
- (while (< (+ from index) to)
- (aset result index
- (get-char-property (+ from index) 'secret))
- (setq index (1+ index)))))
- (set-buffer old)
- result))
- (widget-get widget :value))))
-
-(defvar search-form-form nil)
-
-(defun search-form-isearch-end ()
- (condition-case err
- (progn
- (message "sfie: search-form-form=%s" (widget-value (cdr search-form-form)))
- (remove-hook 'isearch-mode-end-hook 'search-form-isearch-end)
- ;; enter isearch-string in field
- (with-current-buffer (car search-form-form)
- ;; Fix-me: trashes the widget, it disappears... - there seem
- ;; to be know default set function.
- ;;(widget-value-set (cdr search-form-form) isearch-string)
- ))
- (error (message "search-form-isearch-end: %S" err))))
-
-(defun search-form-isearch-forward (w)
- (interactive)
- (add-hook 'isearch-mode-end-hook 'search-form-isearch-end)
- (with-current-buffer search-form-buffer
- (setq search-form-form (cons search-form-buffer search-form-sfield))
- (message "sfif: cb=%s field=%S" (current-buffer) (widget-value (cdr search-form-form)))
- )
- (call-interactively 'isearch-forward))
-
-(defun search-form-isearch-backward (w)
- (interactive)
- (add-hook 'isearch-mode-end-hook 'search-form-isearch-end)
- (setq search-form-form search-form-sfield)
- (call-interactively 'isearch-backward))
-
-;;;###autoload
-(defun search-form ()
- "Display a form for search and replace."
- (interactive)
- (let* ((buf-name "*Search Form*")
- (cur-buf (current-buffer))
- (buffer (get-buffer-create buf-name))
- (win-config (current-window-configuration)))
- (setq search-form-current-buffer (current-buffer))
- (with-current-buffer buffer
- (set (make-local-variable 'search-form-win-config) win-config))
- (switch-to-buffer-other-window buffer)
-
- (kill-all-local-variables) ;; why???
- (let ((inhibit-read-only t))
- (erase-buffer))
- ;;(Custom-mode)
- (remove-overlays)
-
- (make-local-variable 'widget-button-face)
- (setq widget-button-face custom-button)
- (setq show-trailing-whitespace nil)
- (when custom-raised-buttons
- (set (make-local-variable 'widget-push-button-prefix) "")
- (set (make-local-variable 'widget-push-button-suffix) "")
- (set (make-local-variable 'widget-link-prefix) "")
- (set (make-local-variable 'widget-link-suffix) ""))
-
- (widget-insert (propertize "Search/Replace, buffer: " 'face 'font-lock-comment-face))
- (widget-insert (format "%s" (buffer-name search-form-current-buffer)))
- (let ((file (buffer-file-name search-form-current-buffer)))
- (when file
- (insert " (" file ")")))
- (widget-insert "\n\n")
- (search-form-insert-fb
- "Incremental String Search" nil
- 'isearch-forward
- 'search-form-isearch-forward
- 'isearch-backward
- 'search-form-isearch-backward)
-
- (search-form-insert-fb
- "Incremental Regexp Search" nil
- 'isearch-forward-regexp
- (lambda (w) (call-interactively 'isearch-forward-regexp))
- 'isearch-backward-regexp
- (lambda (w) (call-interactively 'isearch-backward-regexp)))
-
- ;; Fix-me: in multiple buffers, from buffer-list
-
- (widget-insert (make-string (window-width) ?-) "\n")
-
- (widget-insert "Search: ")
- (setq search-form-sfield
- (widget-create 'editable-field
- :size 58))
- (widget-insert "\n\n")
- (widget-insert (propertize "* Buffers:" 'face 'font-lock-comment-face) "\n")
- (search-form-insert-fb "String Search" t
- 'search-forward
- (lambda (w) (search-forward search-form-search-string))
- 'search-backward
- (lambda (w) (search-backward search-form-search-string)))
-
- (search-form-insert-fb "Regexp Search" t
- 're-search-forward
- (lambda (w) (re-search-forward search-form-search-string))
- 're-search-backward
- (lambda (w) (re-search-backward search-form-search-string)))
-
- ;; occur
- (search-form-insert-search "Occur" 'occur
- "Lines in buffer"
- (lambda (w)
- (with-current-buffer (widget-get w :current-buffer)
- (occur search-form-search-string)))
- t)
-
- ;; multi-occur
- ;; Fix-me: This should be done from buffer-list. Have juri finished that?
- (search-form-insert-search "Multi-Occur" 'multi-occur
- "Lines in specified buffers"
- (lambda (w)
- (let ((bufs (search-form-multi-occur-get-buffers)))
- (multi-occur bufs search-form-search-string)))
- t)
- ;;
- (widget-insert "\n")
- (widget-insert (propertize "* Files:" 'face 'font-lock-comment-face)
- "\n")
-
- (search-form-insert-search "Search in Dir" 'lgrep
- "Grep in directory"
- 'search-form-lgrep
- t)
- (search-form-insert-search "Search in Tree" 'rgrep
- "Grep in directory tree"
- 'search-form-rgrep
- t)
-
- (widget-insert "\n")
-
- (search-form-insert-search "Tagged Files" 'tags-search
- "Search files in tags table"
- (lambda (w)
- (with-current-buffer (widget-get w :current-buffer)
- (tags-search search-form-search-string)))
- t)
-
- (widget-insert (make-string (window-width) ?-) "\n")
-
- (widget-insert "Replace: ")
- (setq search-form-rfield
- (widget-create 'editable-field
- :size 58))
- (widget-insert "\n\n")
-
- (widget-insert (propertize "* Buffers:" 'face 'font-lock-comment-face) "\n")
- (search-form-insert-replace "Replace String"
- 'query-replace
- "In buffer from point"
- (lambda (w)
- (query-replace search-form-search-string search-form-replace-string)))
-
- (search-form-insert-replace "Replace Regexp"
- 'query-replace-regexp
- "In buffer from point"
- (lambda (w)
- (query-replace-regexp search-form-search-string search-form-replace-string)))
-
- (widget-insert "\n" (propertize "* Files:" 'face 'font-lock-comment-face) "\n")
-
- ;; fix-me: rdir-query-replace (from to file-regexp root &optional delimited)
- (search-form-insert-replace "Replace in Dir"
- 'ldir-query-replace
- "Replace in files in directory"
- 'search-form-ldir-replace)
- (search-form-insert-replace "Replace in Tree"
- 'rdir-query-replace
- "Replace in files in directory tree"
- 'search-form-rdir-replace)
-
- (widget-insert "\n")
-
- (search-form-insert-replace "Tagged Files"
- 'tags-query-replace
- "Replace in files in tags tables"
- (lambda (w)
- (tags-query-replace search-form-search-string search-form-replace-string)))
-
- (buffer-disable-undo)
- (widget-setup)
- (buffer-enable-undo)
- (use-local-map widget-keymap)
- (fit-window-to-buffer)
- (widget-forward 1)
- ))
-
-(defun search-form-lgrep (w)
- (search-form-r-or-lgrep w t))
-
-(defun search-form-rgrep (w)
- (search-form-r-or-lgrep w nil))
-
-(defun search-form-r-or-lgrep (w l)
- (with-current-buffer (widget-get w :current-buffer)
- (let* ((regexp search-form-search-string)
- (files (grep-read-files regexp))
- (dir (read-directory-name (if l "In directory: "
- "Base directory: ")
- nil default-directory t)))
- (if l
- (lgrep regexp files dir)
- (rgrep regexp files dir)
- ))))
-
-(defun search-form-ldir-replace (w)
- (search-form-l-or-r-dir-replace w t))
-
-(defun search-form-rdir-replace (w)
- (search-form-l-or-r-dir-replace w nil))
-
-(defun search-form-l-or-r-dir-replace (w l)
- (let ((files (replace-read-files search-form-search-string search-form-replace-string))
- (dir (read-directory-name (if l
- "In directory: "
- "In directory tree: ")
- nil
- (file-name-directory
- (buffer-file-name search-form-current-buffer))
- t)))
- (if l
- (ldir-query-replace search-form-search-string search-form-replace-string files dir)
- (rdir-query-replace search-form-search-string search-form-replace-string files dir))))
-
-(provide 'search-form)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; search-form.el ends here
diff --git a/emacs.d/nxhtml/util/sex-mode.el b/emacs.d/nxhtml/util/sex-mode.el
deleted file mode 100644
index 290a1a0..0000000
--- a/emacs.d/nxhtml/util/sex-mode.el
+++ /dev/null
@@ -1,463 +0,0 @@
-;;; sex-mode.el --- Shell EXecute mode / Send to EXternal program
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-06-01T18:41:50+0200 Sun
-(defconst sex-mode:version "0.71")
-;; Last-Updated: 2009-01-06 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Open urls belonging to other programs with those programs. To
-;; enable this turn on the global minor mode `sex-mode'.
-;;
-;; If you for example open a .pdf file with C-x C-f it can be opened
-;; by the .pdf application you have set your computer to use. (Or, if
-;; that such settings are not possible on your OS, with the
-;; application you have choosen here.)
-;;
-;; There is also a defmacro `sex-with-temporary-apps' that you can use
-;; for example with `find-file' to open files in external
-;; applications.
-;;
-;; The functions used to open files in external applications are
-;; borrowed from `org-mode'. There is some small differences:
-;;
-;; - There is an extra variable here `sex-file-apps' that is checked
-;; before the corresponding lists in `org-mode'.
-;;
-;; - In `org-mode' any file that is not found in the lists (and is not
-;; remote or a directory) is sent to an external application. This
-;; would create trouble when used here in a file handler so the
-;; logic is the reverse here: Any file that is not found in the
-;; lists is opened inside Emacs. (Actually I think that might be a
-;; good default in `org-mode' too, but I am not sure.)
-;;
-;; - Because of the above I have to guess which function is the one
-;; that sends a file to an external application.
-;;
-;; (Currently the integration with org.el is not the best code wise.
-;; We hope to improve that soon.)
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(org-open-file "c:/EmacsW32/nxhtml/nxhtml/doc/nxhtml-changes.html")
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'org))
-(eval-when-compile (require 'mailcap))
-
-(defcustom sex-file-apps
- '(
- ("html" . emacs)
- ("pdf" . default)
- ("wnk" . default)
- )
- "Application for opening a file.
-See `sex-get-file-open-cmd'."
- :group 'sex
- :type '(repeat
- (cons (choice :value ""
- (string :tag "Extension")
- (const :tag "Default for unrecognized files" t)
- (const :tag "Remote file" remote)
- (const :tag "Links to a directory" directory))
- (choice :value ""
- (const :tag "Visit with Emacs" emacs)
- (const :tag "Use system default" default)
- (string :tag "Command")
- (sexp :tag "Lisp form")))))
-
-;;(sex-get-apps)
-
-(defvar sex-with-temporary-file-apps nil)
-
-(defun sex-get-apps ()
- (or sex-with-temporary-file-apps
- (append sex-file-apps org-file-apps (org-default-apps))))
-
-;; (sex-get-file-open-cmd "temp.el")
-;; (sex-get-file-open-cmd "http://some.where/temp.el")
-;; (sex-get-file-open-cmd "temp.c")
-;; (sex-get-file-open-cmd "temp.pdf")
-;; (sex-get-file-open-cmd "temp.doc")
-;; (sex-get-file-open-cmd "/ftp:temp.doc")
-;; (sex-get-file-open-cmd "http://some.host/temp.doc")
-;; (sex-get-file-open-cmd "http://some.host/temp.html")
-
-(defun sex-get-file-open-cmd (path)
- "Get action for opening file.
-Construct a key from PATH:
-- If PATH specifies a location on a remote system then set key to
- 'remote.
-- If PATH is a directory set key to 'directory.
-- Otherwise use the file extension of PATH as key.
-
-Search with this key against the combined association list of
-`sex-file-apps', `org-file-apps' and `org-default-apps'. The
-first matching entry is used.
-
-If cdr of this entry is 'default then search again with key equal
-to t for the default action for the operating system you are on
-\(or your own default action if you have defined one in the
-variables above).
-
-Return the cdr of the found entry.
-
-If no entry was found return `emacs' for opening inside Emacs."
- (let* ((apps (sex-get-apps))
- (key (if (org-file-remote-p path)
- 'remote
- (if (file-directory-p path)
- 'directory
- (let ((ext (file-name-extension path)))
- (if (and t ext)
- ;; t should be a check for case insensitive
- ;; file names ... - how do you do that?
- (downcase ext)
- ext)))))
- (cmd (or (cdr (assoc key apps))
- 'emacs)))
- (when (eq cmd 'default)
- (setq cmd (or (cdr (assoc t apps))
- 'emacs)))
- (when (eq cmd 'mailcap)
- (require 'mailcap)
- (mailcap-parse-mailcaps)
- (let* ((mime-type (mailcap-extension-to-mime (or key "")))
- (command (mailcap-mime-info mime-type)))
- (if (stringp command)
- (setq cmd command)
- (setq cmd 'emacs))))
- ;;(message "cmd=%s" cmd)
- cmd))
-
-;;;###autoload
-(defgroup sex nil
- "Customization group for `sex-mode'."
- :group 'external)
-
-;;(setq sex-handle-urls t)
-(defcustom sex-handle-urls nil
- "When non-nil `sex-mode' also handles urls.
-Turn on `url-handler-mode' when turning on `sex-mode' if this is
-non-nil. Open urls in a web browser."
- :type 'boolean
- :group 'sex)
-
-;; (setq sex-keep-dummy-buffer nil)
-;; (setq sex-keep-dummy-buffer 'visible)
-;; (setq sex-keep-dummy-buffer 'burried)
-(defcustom sex-keep-dummy-buffer 'visible
- "Keep dummy buffer after opening file.
-When opening a file with the shell a dummy buffer is created in
-Emacs in `sex-file-mode' and an external program is called to
-handle the file. How this dummy buffer is handled is governed by
-this variable."
- :type '(choice (const :tag "Visible" visible)
- (const :tag "Burried" burried)
- (const :tag "Do not keep it" nil))
- :group 'sex)
-
-(defcustom sex-reopen-on-buffer-entry nil
- "If non-nil send file to shell again on buffer entry."
- :type 'boolean
- :group 'sex)
-
-(defun sex-post-command ()
- "Run post command in `sex-file-mode' buffers.
-If `sex-reopen-on-buffer-entry' is non-nil then send the buffer
-file to system again."
- (when sex-reopen-on-buffer-entry
- (if (and (boundp 'url-handler-regexp)
- (string-match url-handler-regexp buffer-file-name))
- (sex-browse-url buffer-file-name)
- (sex-handle-by-external buffer-file-name))
- (bury-buffer)))
-
-(defun sex-browse-url (url)
- "Ask a web browser to open URL."
- (condition-case err
- (list (browse-url url) "Opened URL in web browser")
- (error (list nil (error-message-string err)))))
-
-(defun sex-url-insert-file-contents (url &optional visit beg end replace)
- (sex-generic-insert-file-contents
- 'sex-browse-url
- (concat "This dummy buffer is used just for opening a URL.\n"
- "To open the URL again click here:\n\n ")
- (concat "Tried to open URL in web browser, "
- "but it failed with message\n\n ")
- url visit beg end replace))
-
-(defun sex-file-insert-file-contents (url &optional visit beg end replace)
- ;;(message "sex-file-insert-file-contents %s %s %s %s %s" url visit beg end replace)
- (sex-generic-insert-file-contents
- 'sex-handle-by-external
- (concat "This dummy buffer is used just for opening a file.\n"
- "The file itself was sent to system for opening.\n\n"
- "To open the file again click here:\n\n ")
- (concat "Tried to send file"
- " to system but it failed with message\n\n ")
- url visit beg end replace))
-
-(defun sex-write-file-function ()
- (set-buffer-modified-p nil)
- (error "Can't write this to file, it is just a dummy buffer"))
-
-(defun sex-generic-insert-file-contents (insert-fun
- success-header
- fail-header
- url &optional visit beg end replace)
- (let ((window-config (current-window-configuration)))
- (unless (= 0 (buffer-size))
- (error "Buffer must be empty"))
- (set (make-local-variable 'write-file-functions)
- '(sex-write-file-function))
- (let* ((name url)
- ;;(result (sex-browse-url name))
- (result (funcall insert-fun name))
- (success (nth 0 result))
- (msg (nth 1 result)))
- (setq buffer-file-name name)
- (if success
- (progn
- (insert success-header)
- (sex-setup-restore-window-config window-config)
- (message "%s" msg))
- (insert (propertize "Error: " 'face 'font-lock-warning-face)
- fail-header msg
- "\n\nTo try again click here:\n\n "))
- (save-excursion
- (insert-text-button
- buffer-file-name
- 'insert-fun insert-fun
- 'action (lambda (button)
- ;;(sex-browse-url buffer-file-name)
- (funcall (button-get button 'insert-fun) buffer-file-name)
- ))))))
-
-(defun sex-file-handler (operation &rest args)
- "Handler for `insert-file-contents'."
- ;;(message "\noperation=%s, args=%s" operation args)
- (let ((done nil)
- (ftype 'emacs))
- ;; Always open files inside Emacs if the file opening request came
- ;; through Emacs client. Here is a primitive test if we are called
- ;; from outside, client-record is bound in `server-visit-files'
- ;; ...
- (when (not (boundp 'client-record))
- (let* ((filename (car args))
- (insert-handling (sex-get-file-open-cmd filename)))
- ;;(message "insert-handling=%s" insert-handling)
- (when insert-handling
- (setq ftype insert-handling))
- ;;(message "ftype=%s, filename=%s" ftype filename)
- ))
- (unless (eq ftype 'emacs)
- ;;(message "using sex-file-insert-file-contents for %s" args)
- (apply 'sex-file-insert-file-contents args)
- (setq done t))
- ;; Handle any operation we don't know about.
- (unless done
- ;;(message "fallback for operation=%s, args=%s" operation args)
- (let ((inhibit-file-name-handlers
- (cons 'sex-file-handler
- (and (eq inhibit-file-name-operation operation)
- inhibit-file-name-handlers)))
- (inhibit-file-name-operation operation))
- (apply operation args)))))
-;; Note: Because of a bug in Emacs we must restrict the use of this
-;; file handler to only 'insert-file-contents. (We should of course
-;; anyway do that.)
-(put 'sex-file-handler 'operations '(insert-file-contents))
-
-(defun sex-setup-restore-window-config (window-config)
- (when (not (eq sex-keep-dummy-buffer 'visible))
- (run-with-idle-timer 0 nil
- 'sex-restore-window-config
- (selected-frame)
- window-config
- (unless sex-keep-dummy-buffer
- (current-buffer)))))
-
-(defun sex-restore-window-config (frame win-config buffer)
- (save-match-data ;; runs in timer
- (with-selected-frame frame
- (set-window-configuration win-config))
- (when buffer (kill-buffer buffer))))
-
-(defun sex-handle-by-external (&optional file)
- "Give file FILE to external program.
-Return a list:
-
- (SUCCESS MESSAGE)
-
-where SUCCESS is non-nil if operation succeeded and MESSAGE is an
-informational message."
- (unless file (setq file buffer-file-name))
- (let ((cmd (sex-get-file-open-cmd file)))
- (assert (not (eq cmd 'emacs)))
- (cond
- ((and (stringp cmd) (not (string-match "^\\s-*$" cmd)))
- ;; Remove quotes around the file name - we'll use shell-quote-argument.
- (while (string-match "['\"]%s['\"]" cmd)
- (setq cmd (replace-match "%s" t t cmd)))
- (while (string-match "%s" cmd)
- (setq cmd (replace-match
- (save-match-data
- (shell-quote-argument
- (convert-standard-filename file)))
- t t cmd)))
- (save-window-excursion
- (start-process-shell-command cmd nil cmd)
- ;;(and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))
- )
- (list t (format "Opened %s in external application" file)))
- ((consp cmd)
- (let ((file (convert-standard-filename file)))
- (eval cmd))
- (list t (format "Opened %s in external application" file)))
- (t (list nil (format "Don't know how to handle %s" file))))
- ))
-
-
-(define-derived-mode sex-file-mode nil
- "External"
- "Mode for files opened in external programs."
- (add-hook 'post-command-hook 'sex-post-command nil t)
- (set-keymap-parent (current-local-map) button-buffer-map)
- (set-buffer-modified-p nil)
- (setq buffer-read-only t))
-
-
-(defvar sex-old-url-insert-file-contents nil)
-(defvar sex-old-url-handler-mode nil)
-
-;;;###autoload
-(define-minor-mode sex-mode
- "Open certain files in external programs.
-See `sex-get-file-open-cmd' for how to determine which files to
-open by external applications. Note that this selection is
-nearly the same as in `org-mode'. The main difference is that
-the fallback always is to open a file in Emacs. \(This is
-necessary to avoid to disturb many of Emacs operations.)
-
-This affects all functions that opens files, like `find-file',
-`find-file-noselect' etc.
-
-However it does not affect files opened through Emacs client.
-
-Urls can also be handled, see `sex-handle-urls'.
-
-When opening a file with the shell a \(temporary) dummy buffer is
-created in Emacs with major mode `sex-file-mode' and an external
-program is called to handle the file. How this dummy buffer is
-handled is governed by `sex-keep-dummy-buffer'."
-
- ;; On MS Windows `w32-shell-execute' is called to open files in an
- ;; external application. Be aware that this may run scripts if the
- ;; script file extension is not blocked in `sex-open-alist'.
- nil
- :group 'sex
- :global t
- ;; fix-me: better list handling
- (if sex-mode
- (progn
- (require 'org)
- (dolist (rec (sex-get-apps))
- (let* ((ext (car rec))
- (app (cdr rec))
- (patt (when (and (stringp ext)
- (not (eq app 'emacs)))
- (concat "\\." ext "\\'"))))
- (unless patt
- (when (eq ext t)
- (setq patt (concat ".*\\'"))))
- (when patt
- (unless (eq ext t)
- (add-to-list 'auto-mode-alist (cons patt 'sex-file-mode)))
- (add-to-list 'file-name-handler-alist
- (cons patt 'sex-file-handler) t))))
- (setq sex-old-url-insert-file-contents
- (get 'insert-file-contents 'url-file-handlers))
- (setq sex-old-url-handler-mode url-handler-mode)
- (when sex-handle-urls
- ;;(message "req url, before")
- (require 'url-handlers)
- ;;(message "req url, after")
- (put 'insert-file-contents 'url-file-handlers
- 'sex-url-insert-file-contents)
- (unless url-handler-mode
- (url-handler-mode 1)
- ;;(message "after url-handler-mode 1")
- )))
- ;; Remove from the lists:
- ;;(let ((handler-list (copy-list file-name-handler-alist)))
- (let ((handler-list (copy-sequence file-name-handler-alist)))
- (dolist (handler handler-list)
- (when (eq 'sex-file-handler (cdr handler))
- (setq file-name-handler-alist
- (delete handler file-name-handler-alist)))))
- ;;(let ((mode-alist (copy-list auto-mode-alist)))
- (let ((mode-alist (copy-sequence auto-mode-alist)))
- (dolist (auto-mode mode-alist)
- (when (eq 'sex-file-mode (cdr auto-mode))
- (setq auto-mode-alist
- (delete auto-mode auto-mode-alist)))))
- (put 'insert-file-contents 'url-file-handlers
- sex-old-url-insert-file-contents)
- (unless sex-old-url-handler-mode (url-handler-mode 0))))
-
-(defmacro sex-with-temporary-apps (open-alist &rest body)
- "Run BODY with `sex-mode' on.
-If OPEN-ALIST is not t it replaces the list normally used by
-`sex-get-file-open-cmd'."
- (declare (indent 1) (debug t))
- `(let ((old-sex-mode sex-mode)
- (sex-with-temporary-file-apps
- (if (eq ,open-alist t)
- nil
- ,open-alist)))
- (when sex-mode (sex-mode -1))
- (sex-mode 1)
- ,@body
- (setq sex-with-temporary-file-apps nil)
- (unless old-sex-mode (sex-mode -1))))
-
-;; (with-sex t (find-file "c:/emacs-lisp/gimp-mode-v1.40/gimpmode.pdf"))
-;; (with-sex nil (find-file "c:/emacs-lisp/gimp-mode-v1.40/gimpmode.pdf"))
-
-(provide 'sex-mode)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; sex-mode.el ends here
diff --git a/emacs.d/nxhtml/util/sml-modeline.el b/emacs.d/nxhtml/util/sml-modeline.el
deleted file mode 100644
index 882d184..0000000
--- a/emacs.d/nxhtml/util/sml-modeline.el
+++ /dev/null
@@ -1,192 +0,0 @@
-;;; sml-modeline.el --- Show position in a scrollbar like way in mode-line
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2010-03-16 Tue
-;; Version: 0.5
-;; Last-Updated: 2010-03-18 Thu
-;; URL: http://bazaar.launchpad.net/~nxhtml/nxhtml/main/annotate/head%3A/util/sml-modeline.el
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Show scrollbar like position indicator in mode line.
-;; See the global minor mode `sml-modeline-mode' for more information.
-;;
-;; Idea and part of this code is adapted from David Engster's and Drew
-;; Adam's code in these mail messages:
-;;
-;; http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00523.html
-;; http://permalink.gmane.org/gmane.emacs.devel/122038
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;;###autoload
-(defgroup sml-modeline nil
- "Customization group for `sml-modeline-mode'."
- :group 'frames)
-
-(defun sml-modeline-refresh ()
- "Refresh after option changes if loaded."
- (when (featurep 'sml-modeline)
- (when (and (boundp 'sml-modeline-mode)
- sml-modeline-mode)
- (sml-modeline-mode -1)
- (sml-modeline-mode 1))))
-
-(defcustom sml-modeline-len 12
- "Mode line indicator total length."
- :type 'integer
- :set (lambda (sym val)
- (set-default sym val)
- (sml-modeline-refresh))
- :group 'sml-modeline)
-
-(defcustom sml-modeline-borders nil
- "Indicator borders.
-This is a pair of indicators, like [] or nil."
- :type '(choice (const :tag "None" nil)
- (cons (string :tag "Left border")
- (string :tag "Right border")))
- :set (lambda (sym val)
- (set-default sym val)
- (sml-modeline-refresh))
- :group 'sml-modeline)
-
-(defcustom sml-modeline-numbers 'percentage
- "Position number style.
-This can be 'percentage or 'line-number."
- :type '(choice (const :tag "Line numbers" line-numbers)
- (const :tag "Percentage" percentage))
- :set (lambda (sym val)
- (set-default sym val)
- (sml-modeline-refresh))
- :group 'sml-modeline)
-
-(defface sml-modeline-end-face
- '((t (:inherit match)))
- "Face for invisible buffer parts."
- :group 'sml-modeline)
-;; 'face `(:background ,(face-foreground 'mode-line-inactive)
-;; :foreground ,(face-background 'mode-line))
-
-(defface sml-modeline-vis-face
- '((t (:inherit region)))
- "Face for invisible buffer parts."
- :group 'sml-modeline)
-;; 'face `(:background ,(face-foreground 'mode-line)
-;; :foreground ,(face-background 'mode-line))
-
-;;(sml-modeline-create)
-(defun sml-modeline-create ()
- (let* ((wstart (window-start))
- (wend (window-end))
- number-max number-beg number-end
- (sml-begin (or (car sml-modeline-borders) ""))
- (sml-end (or (cdr sml-modeline-borders) ""))
- (inner-len (- sml-modeline-len (length sml-begin) (length sml-end)))
- bpad-len epad-len
- pos-%
- start end
- string)
- (if (not (or (< wend (save-restriction (widen) (point-max)))
- (> wstart 1)))
- ""
- (cond
- ((eq sml-modeline-numbers 'percentage)
- (setq number-max (save-restriction (widen) (point-max)))
- (setq number-beg (/ (float wstart) (float number-max)))
- (setq number-end (/ (float wend) (float number-max)))
- (setq start (floor (* number-beg inner-len)))
- (setq end (floor (* number-end inner-len)))
- (setq string
- (concat (format "%02d" (round (* number-beg 100)))
- "-"
- (format "%02d" (round (* number-end 100))) "%%")))
- ((eq sml-modeline-numbers 'line-numbers)
- (save-restriction
- (widen)
- (setq number-max (line-number-at-pos (point-max)))
- (setq number-beg (line-number-at-pos wstart))
- (setq number-end (line-number-at-pos wend)))
- (setq start (floor (* (/ number-beg (float number-max)) inner-len)))
- (setq end (floor (* (/ number-end (float number-max)) inner-len)))
- (setq string
- (concat "L"
- (format "%02d" number-beg)
- "-"
- (format "%02d" number-end))))
- (t (error "Unknown sml-modeline-numbers=%S" sml-modeline-numbers)))
- (setq inner-len (max inner-len (length string)))
- (setq bpad-len (floor (/ (- inner-len (length string)) 2.0)))
- (setq epad-len (- inner-len (length string) bpad-len))
- (setq pos-% (+ bpad-len (length string) -1))
- (setq string (concat sml-begin
- (make-string bpad-len 32)
- string
- (make-string epad-len 32)
- sml-end))
- ;;(assert (= (length string) sml-modeline-len) t)
- (when (= start sml-modeline-len) (setq start (1- start)))
- (setq start (+ start (length sml-begin)))
- (when (= start end) (setq end (1+ end)))
- (when (= end pos-%) (setq end (1+ end))) ;; If on % add 1
- (put-text-property start end 'face 'sml-modeline-vis-face string)
- (when (and (= 0 (length sml-begin))
- (= 0 (length sml-end)))
- (put-text-property 0 start 'face 'sml-modeline-end-face string)
- (put-text-property end sml-modeline-len 'face 'sml-modeline-end-face string))
- string)))
-
-(defvar sml-modeline-old-car-mode-line-position nil)
-
-;;;###autoload
-(define-minor-mode sml-modeline-mode
- "Show buffer size and position like scrollbar in mode line.
-You can customize this minor mode, see option `sml-modeline-mode'.
-
-Note: If you turn this mode on then you probably want to turn off
-option `scroll-bar-mode'."
- :global t
- :group 'sml-modeline
- (if sml-modeline-mode
- (progn
- (unless sml-modeline-old-car-mode-line-position
- (setq sml-modeline-old-car-mode-line-position (car mode-line-position)))
- (setcar mode-line-position '(:eval (list (sml-modeline-create)))))
- (setcar mode-line-position sml-modeline-old-car-mode-line-position)))
-
-
-(provide 'sml-modeline)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; sml-modeline.el ends here
diff --git a/emacs.d/nxhtml/util/tabkey2.el b/emacs.d/nxhtml/util/tabkey2.el
deleted file mode 100644
index d35e651..0000000
--- a/emacs.d/nxhtml/util/tabkey2.el
+++ /dev/null
@@ -1,1701 +0,0 @@
-;;; tabkey2.el --- Use second tab key pressed for what you want
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-03-15
-(defconst tabkey2:version "1.40")
-;; Last-Updated: 2009-07-15 Wed
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/tabkey2.el
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `appmenu', `cl'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; The tab key is in Emacs often used for indentation. However if you
-;; press the tab key a second time and Emacs tries to do indentation
-;; again, then usually nothing exciting will happen. Then why not use
-;; second tab key in a row for something else?
-;;
-;; Commonly used completion functions in Emacs is often bound to
-;; something corresponding to Alt-Tab. Unfortunately this is unusable
-;; if you have a window manager that have an apetite for it (like that
-;; on MS Windows for example, and several on GNU/Linux).
-;;
-;; Then using the second tab key press for completion might be a good
-;; choice and perhaps also easy to remember.
-;;
-;; This little library tries to make it easy to do use the second tab
-;; press for completion. Or you can see this library as a swizz army
-;; knife for the tab key ;-)
-;;
-;; See `tabkey2-mode' for more information.
-;;
-;;
-;; This is a generalized of an idea Sebastien Rocca Serra once
-;; presented on Emacs Wiki and called "Smart Tab". (It seems like
-;; many others have also been using Tab for completion in one way or
-;; another for years.)
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; Version 1.04:
-;; - Add overlay to display state after first tab.
-;;
-;; Version 1.05:
-;; - Fix remove overlay problem.
-;;
-;; Version 1.06:
-;; - Add completion function choice.
-;; - Add support for popcmp popup completion.
-;;
-;; Version 1.07:
-;; - Add informational message after first tab.
-;;
-;; Version 1.08:
-;; - Give better informational message after first tab.
-;;
-;; Version 1.09:
-;; - Put flyspell first.
-;;
-;; Version 1.09:
-;; - Give the overlay higher priority.
-;;
-;; Version 1.10:
-;; - Correct tabkey2-completion-functions.
-;; - Add double-tab for modes where tab can not be typed again.
-;; - Use better condition for when completion can be done, so that it
-;; can be done later while still on the same line.
-;; - Add a better message handling for the "Tab completion state".
-;; - Add C-g break out of the "Tab completion state".
-;; - Add faces for highlight.
-;; - Make it work in custom mode buffers.
-;; - Fix documentation for `tabkey2-first'
-;;
-;; Version 1.11:
-;; - Don't call chosen completion function directly. Instead make it
-;; default for current buffer.
-;;
-;; Version 1.12:
-;; - Simplify code.
-;; - Add help to C-f1 during "Tab completion state".
-;; - Fix documentation basics.
-;; - Add customization of state message and line marking.
-;; - Fix handling of double-Tab modes.
-;; - Make user interaction better.
-;; - Handle read-only in custom buffers better.
-;; - Add more flexible check for if completion function is active.
-;; - Support predictive mode.
-;; - Reorder and simplify.
-;;
-;; Version 1.13:
-;; - Add org-mode to the double-tab gang.
-;; - Make it possible to use double-tab in normal buffers.
-;; - Add cycling through completion functions to S-tab.
-;;
-;; Version 1.14:
-;; - Fix bug in handling of read-only.
-;; - Show completion binding in help message.
-;; - Add binding to make current choice buffer local when cycling.
-;;
-;; Version 1.15:
-;; - Fix problem at buffer end.
-;; - Add S-tab to enter completion state without indentation.
-;; - Add backtab bindings too for this.
-;; - Remove double-tab, S-tab is better.
-;; - Add list of modes that uses more tabs.
-;; - Add list of modes that uses tab only for completion.
-;; - Move first overlay when indentation changes.
-;; - Make mark at line beginning 1 char long.
-;;
-;; Version 1.16:
-;; - Don't call tab function when alternate key is pressed.
-;;
-;; Version 1.17:
-;; - Let alternate key cycle completion functions instead of complete.
-;; - Bind backtab.
-;; - Fix bug when only one completion funciton was available.
-;; - Fix bug when alt key and major without fix indent.
-;;
-;; Version 1.18:
-;; - Add popup style messages.
-;; - Add delay to first message.
-;; - Use different face for indicator on line and message.
-;; - Use different face for echo area and popup messages.
-;; - Add anything to completion functions.
-;; - Put help funciton on f1.
-;; - Always bind alternate key to cycle.
-;; - Change defcustoms to simplify (excuse me).
-;; - Work around end of buffer problems.
-;; - Work around start of buffer problems.
-;; - Assure popup messages are visible.
-;; - Reorder code in more logical order.
-;;
-;; Version 1.19:
-;; - Make overlay keymap end advance.
-;; - Remove overlay keymap parent.
-;;
-;; Version 1.20:
-;; - Fix bug on emtpy line.
-;; - Fix some text problems.
-;; - Make f1 c/k work in tab completion state.
-;;
-;; Version 1.20:
-;; - Fixed bug in overlay removal.
-;;
-;; Version 1.21:
-;; - Fixed bug in minibuffer setup.
-;;
-;; Version 1.22:
-;; - Honour widget-forward, button-forward.
-;;
-;; Version 1.23:
-;; - Remove binding of shift tab.
-;; - Check if use-region-p is defined.
-;;
-;; Version 1.24:
-;; - Add option for completion state mode line marker.
-;; - Fix bug in tabkey2-show-completion-functions.
-;; - Move off completion point cancels completion state.
-;; - Fix bugs in help.
-;; - Try to fix some problems with invisible text, at least in
-;; org-mode.
-;; - Restore window config, completions often leaves without.
-;;
-;; Version 1.25:
-;; - Fix bug in tabkey2-completion-state-p.
-;;
-;; Version 1.26:
-;; - Make tabkey2-mode a buffer local mode.
-;; - Add tabkey2-global-mode.
-;; - Fix some bugs.
-;;
-;; Version 1.27:
-;; - Fix some bugs in customization.
-;;
-;; Version 1.28:
-;; - Use invisible-p.
-;;
-;; Version 1.29:
-;; - Remove tabkey2-global-mode because of problem with minibuffers.
-;;
-;; Version 1.30:
-;; - Add Semantic's smart completion to completion functions.
-;; (Thanks Eric.)
-;;
-;; Version 1.31:
-;; - Add yasnippet and pabbrev completion functions. (Thanks Eric.)
-;; - Reorder completion functions.
-;;
-;; Version 1.32:
-;; - Add support for pcomplete.
-;; - Inform about other key bindings in completion functions list.
-;; - Remove no longer used "preferred" from completion functions list.
-;;
-;; Version 1.33:
-;; -- Automatically select next function on completion failure.
-;; -- Add completion functions reset functions.
-;;
-;; Version 1.34:
-;; - Set this-command on call-interactively.
-;; - Avoid setting last-command.
-;;
-;; Version 1.35:
-;; - Do not complete in or nearby mumamo chunk borders.
-;; - Finish completion mode unless last command was a tabkey2 command.
-;; - Finish when there are no more active completion functions.
-;;
-;; Version 1.36:
-;; - Actually check if completion function is a defined command.
-;; - Integrate better with YASnippet.
-;; - Give YASnippet higher priority since that seems what is wanted.
-;;
-;; Version 1.37:
-;; - Fix bug revealed by 1.36 changes.
-;;
-;; Version 1.38:
-;; - Fix typo in completion function list.
-;; - Fix corresponding part of check if function is active.
-;;
-;; Version 1.39:
-;; - Try first [tab] and then [?\t] when looking for command.
-;;
-;; Version 1.40:
-;; - Added Company Mode completion.
-;;
-;; Fix-me: maybe add \\_>> option to behave like smart-tab. But this
-;; will only works for modes that does not do completion of empty
-;; words (like in smart-tab).
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Known bugs
-;;
-;; - Maybe problems with comint shell.
-;; - Does not check visibility very carefully.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'appmenu nil t))
-(eval-when-compile (require 'mumamo nil t))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Custom
-
-;;;###autoload
-(defgroup tabkey2 nil
- "Customization of second tab key press."
- :group 'nxhtml
- :group 'convenience)
-
-(defface tabkey2-highlight-line
- '((t :inherit highlight))
- "Face for marker on line when default function is active."
- :group 'tabkey2)
-
-(defface tabkey2-highlight-line2
- '((t :inherit isearch-fail))
- "Face for marker on line when non-default function is active."
- :group 'tabkey2)
-
-(defface tabkey2-highlight-message
- '((t :inherit tabkey2-highlight-line))
- "Face for messages in echo area."
- :group 'tabkey2)
-
-(defface tabkey2-highlight-popup
- '((default :box t :inherit tabkey2-highlight-message)
- (((class color) (background light)) :foreground "black")
- (((class color) (background dark)) :foreground "yellow"))
- "Face for popup messages."
- :group 'tabkey2)
-
-(defcustom tabkey2-show-mark-on-active-line t
- "Show mark on active line if non-nil.
-This mark is shown during 'Tab completion state'."
- :type 'boolean
- :group 'tabkey2)
-
-(defvar tabkey2-completion-lighter nil)
-(defcustom tabkey2-completion-lighter-on nil
- "Mode line lighter for function `tabkey2-completion-state-mode'."
- :type 'boolean
- :set (lambda (symbol value)
- (set-default symbol value)
- (setq tabkey2-completion-lighter (if value " Tab2" nil))
- (setq minor-mode-alist
- (assq-delete-all 'tabkey2-completion-state-mode
- minor-mode-alist)))
- :group 'tabkey2)
-
-(defcustom tabkey2-show-message-on-enter 2.0
- "If non-nil show message when entering 'Tab completion state'.
-If value is a number then delay message that number of seconds."
- :type '(choice (const :tag "Don't show" nil)
- (const :tag "Show at once" t)
- (float :tag "Show, but delayed (seconds)"))
- :group 'tabkey2)
-
-
-;; (setq tabkey2-message-style 'popup)
-;; (setq tabkey2-message-style 'echo-area)
-(defcustom tabkey2-message-style 'popup
- "How to show messages."
- :type '(choice (const :tag "Popup" popup)
- (const :tag "Echo area" echo-area))
- :group 'tabkey2)
-
-(defcustom tabkey2-in-minibuffer nil
- "If non-nil use command `tabkey2-mode' also in minibuffer."
- :type 'boolean
- :group 'tabkey2)
-
-(defcustom tabkey2-in-appmenu t
- "Show a completion menu in command `appmenu-mode' if t."
- :type 'boolean
- :set (lambda (sym val)
- (set-default sym val)
- (when (fboundp 'appmenu-add)
- (if val
- (appmenu-add 'tabkey2 nil t "Completion" 'tabkey2-appmenu)
- (appmenu-remove 'tabkey2))))
- :group 'tabkey2)
-
-(defun yas/expandable-at-point ()
- "Return non-nil if a snippet can be expanded here."
- (when (and (fboundp 'yas/template-condition-predicate)
- (boundp 'yas/buffer-local-condition))
- (yas/template-condition-predicate
- yas/buffer-local-condition)))
-
-(defvar tabkey2-company-backends
- "List of frontends and their backends."
- '((company-mode (NONE company-abbrev . "Abbrev")
- (NONE company-css . "CSS")
- (dabbrev-expan company-dabbrev . "dabbrev for plain text")
- (NONE company-dabbrev-code . "dabbrev for code")
- (NONE company-eclim . "eclim (an Eclipse interace)")
- (lisp-symbol-complete company-elisp . "Emacs Lisp")
- (complete-tag company-etags . "etags")
- (NONE company-files . "Files")
- (NONE company-gtags . "GNU Global")
- (ispell-complete-word company-ispell . "ispell")
- (flyspell-correct-word-before-point company-ispell . "ispell")
- (NONE company-keywords . "Programming language keywords")
- (nxml-complete company-nxml . "nxml")
- (NONE company-oddmuse . "Oddmuse")
- (NONE company-pysmell . "PySmell")
- (NONE company-ropemacs . "ropemacs")
- (senator-complete-symbol company-semantic . "CEDET Semantic")
- (NONE company-tempo . "Tempo templates")
- (NONE company-xcode . "Xcode"))))
-
-(defun tabkey2-find-front-end (fun)
- (let ((
- ))))
-
-(defcustom tabkey2-completion-functions
- '(
- ;; Front ends (should take care of the rest, ie temporary things,
- ;; snippets etc...)
- ("Company Mode completion" company-complete company-mode)
- ;; Temporary things
- ("Spell check word" flyspell-correct-word-before-point)
- ;; Snippets
- ("Yasnippet" yas/expand (yas/expandable-at-point))
- ;; Main mode related, often used
- ("Semantic Smart Completion" senator-complete-symbol senator-minor-mode)
- ("Programmable completion" pcomplete)
- ("nXML completion" nxml-complete)
- ("Complete Emacs symbol" lisp-complete-symbol)
- ("Widget complete" widget-complete)
- ("Comint Dynamic Complete" comint-dynamic-complete)
- ("PHP completion" php-complete-function)
- ("Tags completion" complete-tag)
- ;; General word completion
- ("Predictive word" complete-word-at-point predictive-mode)
- ("Predictive abbreviations" pabbrev-expand-maybe)
- ("Dynamic word expansion" dabbrev-expand nil (setq dabbrev--last-abbrev-location nil))
- ("Ispell complete word" ispell-complete-word)
- ;; The catch all
- ("Anything" anything (commandp 'anything))
- )
- "List of completion functions.
-The first 'active' entry in this list is normally used during the
-'Tab completion state' by `tabkey2-complete'. An entry in the
-list should have either of this forms
-
- \(TITLE COMPLETION-FUNCTION ACTIVE-FORM RESET-FORM)
-
-TITLE to show in menus etc.
-
-COMPLETION-FUNCTION is the completion function symbol.
-
-The entry is considered active if the symbol COMPLETION-FUNCTION
-is bound to a command and
-
- - This function has a key binding at point.
-
-or
-
- - The elisp expression ACTIVE-FORM evaluates to non-nil. If it
- is a single symbol then its variable value is used, otherwise
- the elisp form is evaled.
-
-RESET-FORM is used to reset the completion function before
-calling it.
-
-When choosing with `tabkey2-cycle-completion-functions'
-only the currently active entry in this list are shown."
- :type '(repeat (list string (choice (command :tag "Currently known command")
- (symbol :tag "Command not known yet"))
- (choice (const :tag "Active only if it has a key binding at point" nil)
- (sexp :tag "Elisp, if evals to non-nil then active"))
- (sexp :tag "Elisp, reset completion function")))
- :group 'tabkey2)
-
-;; Use emulation mode map for first Tab key
-(defconst tabkey2-mode-emul-map (make-sparse-keymap)
- "This keymap just binds tab and alternate key all the time.
-By default this binds Tab to `tabkey2-first'. The actual keys
-bound are in `tabkey2-first-key' and `tabkey2-alternate-key'.")
-
-(defvar tabkey2--emul-keymap-alist nil)
-
-;; (setq tabkey2-keymap-overlay nil)
-(defconst tabkey2-completion-state-emul-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) tab] 'tabkey2-make-current-default)
-
- ;;(define-key map tabkey2-alternate-key 'tabkey2-cycle-completion-functions)
- (define-key map [backtab] 'tabkey2-cycle-completion-functions)
-
- (define-key map [(control f1)] 'tabkey2-completion-function-help)
- (define-key map [(meta f1)] 'tabkey2-show-completion-functions)
- (define-key map [f1] 'tabkey2-completion-state-help)
-
- (define-key map [(control ?g)] 'tabkey2-completion-state-off)
- (define-key map [tab] 'tabkey2-complete)
- map)
- "This keymap is for `tabkey2-keymap-overlay'.")
-
-(defun tabkey2-bind-keys (first-key alternate-key)
- (let ((mode-map tabkey2-mode-emul-map)
- (comp-map tabkey2-completion-state-emul-map))
- ;; First key
- (when (and (boundp 'tabkey2-first-key)
- tabkey2-first-key)
- (define-key mode-map tabkey2-first-key nil))
- (when first-key
- (define-key mode-map first-key 'tabkey2-first))
- ;; Alternate key
- (when (and (boundp 'tabkey2-alternate-key)
- tabkey2-alternate-key)
- (define-key mode-map tabkey2-alternate-key nil)
- (define-key comp-map tabkey2-alternate-key nil))
- (when alternate-key
- (define-key mode-map alternate-key 'tabkey2-cycle-completion-functions)
- (define-key comp-map alternate-key 'tabkey2-cycle-completion-functions))
- (when (and (boundp 'tabkey2-completion-state-mode)
- tabkey2-completion-state-mode)
- (tabkey2-completion-state-mode -1)
- (tabkey2-completion-state-mode 1))))
-
-(defcustom tabkey2-first-key [tab]
- "First key, first time indents, more invocations completes.
-This key is always bound to `tabkey2-first'."
- :set (lambda (sym val)
- (set-default sym val)
- (tabkey2-bind-keys
- val
- (when (boundp 'tabkey2-alternate-key)
- tabkey2-alternate-key)))
- :type 'key-sequence
- :group 'tabkey2)
-
-(defcustom tabkey2-alternate-key [f8]
- "Alternate key, bound to cycle and show completion functions.
-This key is always bound to `tabkey2-cycle-completion-functions'."
- :set (lambda (sym val)
- (set-default sym val)
- (tabkey2-bind-keys (when (boundp 'tabkey2-first-key) tabkey2-first-key) val))
- :type 'key-sequence
- :group 'tabkey2)
-
-(tabkey2-bind-keys tabkey2-first-key tabkey2-alternate-key)
-
-;;;###autoload
-(define-minor-mode tabkey2-mode
- "More fun with Tab key number two (completion etc).
-This global minor mode by default binds Tab in a way that let you
-do completion with Tab in all buffers \(where it is possible).
-
-The Tab key is easy to type on your keyboard. Then why not use
-it for completion, something that is very useful? Shells usually
-use Tab for completion so many are used to it. This was the idea
-of Smart Tabs and this is a generalization of that idea.
-
-However in Emacs the Tab key is usually used for indentation.
-The idea here is that if Tab has been pressed once for
-indentation, then as long as point stays further Tab keys might
-as well do completion.
-
-So you kind of do Tab-Tab for first completion \(and then just
-Tab for further completions as long as point is not moved).
-
-And there is even kind of Tab-Tab-Tab completion: If completion
-fails the next completion function will be the one you try with
-next Tab. \(You get some notification of this, of course.)
-
-See `tabkey2-first' for more information about usage.
-
-Note: If you do not want the Tab-Tab behaviour above, but still
-want an easy way to reach the available completion functions,
-then you can instead of turning on tabkey2-mode enter this in
-your .emacs:
-
- \(global-set-key [f8] 'tabkey2-cycle-completion-functions)
-
-After hitting f8 you will then be in the same state as after the
-first in tabkey2-mode."
- :keymap nil
- :global t
- :group 'tabkey2
- (if tabkey2-mode
- (progn
- (add-hook 'minibuffer-setup-hook 'tabkey2-minibuffer-setup)
- (add-hook 'post-command-hook 'tabkey2-post-command)
- ;; Update emul here if keymap have changed
- (setq tabkey2--emul-keymap-alist
- (list (cons 'tabkey2-mode
- tabkey2-mode-emul-map)))
- (add-to-list 'emulation-mode-map-alists 'tabkey2--emul-keymap-alist))
- (tabkey2-completion-state-mode -1)
- (remove-hook 'post-command-hook 'tabkey2-post-command)
- (remove-hook 'minibuffer-setup-hook 'tabkey2-minibuffer-setup)
- (setq emulation-mode-map-alists (delq 'tabkey2--emul-keymap-alist
- emulation-mode-map-alists))))
-
-(defcustom tabkey2-modes-that-use-more-tabs
- '(python-mode
- haskell-mode
- makefile-mode
- org-mode
- Custom-mode
- custom-mode ;; For Emacs 22
- ;; other
- cmd-mode
- )
- "In those modes use must use S-Tab to start completion state.
-In those modes pressing Tab several types may make sense so you
-can not go into 'Tab completion state' just because one Tab has
-been pressed. Instead you use S-Tab to go into that state.
-After that Tab does completion.
-
-You can do use S-Tab in other modes too if you want too."
- :type '(repeat (choice (command :tag "Currently known command")
- (symbol :tag "Command not known yet")))
- :group 'tabkey2)
-
-(defcustom tabkey2-modes-that-just-complete
- '(shell-mode
- fundamental-mode
- text-mode)
- "Tab is only used for completion in these modes.
-Therefore `tabkey2-first' just calls the function on Tab."
- :type '(repeat (choice (command :tag "Currently known command")
- (symbol :tag "Command not known yet")))
- :group 'tabkey2)
-
-;;(setq tabkey2-use-popup-menus nil)
-;; (defcustom tabkey2-use-popup-menus (when (featurep 'popcmp) t)
-;; "Use pop menus if available."
-;; :type 'boolean
-;; :group 'tabkey2)
-
-;; (defvar tabkey2-preferred nil
-;; "Preferred function for second tab key press.")
-;; (make-variable-buffer-local 'tabkey2-preferred)
-;; (put 'tabkey2-preferred 'permanent-local t)
-
-(defvar tabkey2-fallback nil
- "Fallback function for second tab key press.")
-(make-variable-buffer-local 'tabkey2-fallback)
-(put 'tabkey2-fallback 'permanent-local t)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; State
-
-(defvar tabkey2-overlay nil
- "Show when tab key 2 action is to be done.")
-(defvar tabkey2-keymap-overlay nil
- "Hold the keymap for tab key 2.")
-
-(defvar tabkey2-current-tab-info nil
- "Saved information message for Tab completion state.")
-(defvar tabkey2-current-tab-function nil
- "Tab completion state current completion function.")
-(make-variable-buffer-local 'tabkey2-current-tab-function)
-
-(defun tabkey2-completion-state-p ()
- "Return t if Tab completion state should continue.
-Otherwise return nil."
- (when (and (eq (current-buffer) (overlay-buffer tabkey2-keymap-overlay))
- (eq (overlay-get tabkey2-keymap-overlay 'window) (selected-window)))
- (let* ((start (overlay-start tabkey2-keymap-overlay))
- (end (overlay-end tabkey2-keymap-overlay))
- (chars (append (buffer-substring-no-properties start end) nil)))
- (and (not (memq ?\n chars))
- (not (eq ?\ (car (last chars))))
- (not (eq ?\ last-input-event))
- (<= start (point))
- (<= (point) end)
- tabkey2-current-tab-function
- (or (memq this-original-command '(tabkey2-first tabkey2-complete))
- (let* ((last-name (symbol-name this-original-command))
- (name-prefix "tabkey2-")
- (prefix-len (length name-prefix)))
- (and (> (length last-name) prefix-len)
- (string= name-prefix (substring last-name 0 prefix-len)))))
- ))))
-
-(defun tabkey2-read-only-p ()
- "Return non-nil if buffer seems to be read-only at point."
- (or buffer-read-only
- (get-char-property (min (+ 0 (point)) (point-max)) 'read-only)
- (let ((remap (command-remapping 'self-insert-command (point))))
- (memq remap '(Custom-no-edit)))))
-
-;;;; Minor mode active after first tab
-
-(defun tabkey2-get-highlight-face ()
- (if (eq tabkey2-current-tab-function
- (tabkey2-first-active-from-completion-functions))
- 'tabkey2-highlight-line
- 'tabkey2-highlight-line2))
-
-(defun tabkey2-move-overlays ()
- "Move overlays that mark the state and carries the state keymap."
- (let* ((beg (let ((inhibit-field-text-motion t))
- (line-beginning-position)))
- (ind (current-indentation))
- (end (+ beg 1)) ;(if (> ind 0) ind 1)))
- (inhibit-read-only t))
- (unless tabkey2-overlay
- (setq tabkey2-overlay (make-overlay beg end)))
- ;; Fix-me: gets some strange errors, try avoid moving:
- (unless (and (eq (current-buffer) (overlay-buffer tabkey2-overlay))
- (= beg (overlay-start tabkey2-overlay))
- (= end (overlay-end tabkey2-overlay)))
- (move-overlay tabkey2-overlay beg end (current-buffer)))
- ;; Give it a high priority, it is very temporary
- (overlay-put tabkey2-overlay 'priority 1000)
- (if tabkey2-show-mark-on-active-line
- (progn
- (overlay-put tabkey2-overlay 'face
- ;;'tabkey2-highlight-line
- (tabkey2-get-highlight-face)
- )
- (overlay-put tabkey2-overlay 'help-echo
- "This highlight shows that Tab completion state is on"))
- (overlay-put tabkey2-overlay 'face nil)
- (overlay-put tabkey2-overlay 'help-echo nil)))
- ;; The keymap overlay
- (let ((beg (line-beginning-position))
- (end (line-end-position)))
- ;;(when (= end (point-max)) (setq end (1+ end)))
- (setq beg (point))
- (setq end (point))
-
- (unless tabkey2-keymap-overlay
- ;; Make the rear of the overlay advance so that the keymap works
- ;; at the end of a line and the end of the buffer.
- (setq tabkey2-keymap-overlay (make-overlay 0 0 nil nil t)))
- (overlay-put tabkey2-keymap-overlay 'priority 1000)
- ;;(overlay-put tabkey2-keymap-overlay 'face 'secondary-selection)
- (overlay-put tabkey2-keymap-overlay 'keymap
- tabkey2-completion-state-emul-map)
- (overlay-put tabkey2-keymap-overlay 'window (selected-window))
- (move-overlay tabkey2-keymap-overlay beg end (current-buffer))))
-
-(defun tabkey2-is-active (fun chk)
- "Return t FUN is active.
-Return t if CHK is a symbol with non-nil value or a form that
-evals to non-nil.
-
-Otherwise return t if FUN has a key binding at point."
- (when (and (fboundp fun)
- (commandp fun))
- (or (if (symbolp chk)
- (when (boundp chk) (symbol-value chk))
- (eval chk))
- (let* ((emulation-mode-map-alists
- ;; Remove keymaps from tabkey2 in this copy:
- (delq 'tabkey2--emul-keymap-alist
- (copy-sequence emulation-mode-map-alists)))
- (keys (tabkey2-symbol-keys fun))
- kb-bound)
- (dolist (key keys)
- (unless (memq (car (append key nil))
- '(menu-bar))
- (setq kb-bound t)))
- kb-bound))))
-
-(defun tabkey2-is-active-p (fun)
- "Return FUN is active.
-Look it up in `tabkey2-completion-functions' to find out what to
-check and return the value from `tabkey2-is-active'."
- (let ((chk (catch 'chk
- (dolist (rec tabkey2-completion-functions)
- (when (eq fun (nth 1 rec))
- (throw 'chk (nth 2 rec)))))))
- (tabkey2-is-active fun chk)))
-
-(defvar tabkey2-chosen-completion-function nil)
-(make-variable-buffer-local 'tabkey2-chosen-completion-function)
-(put 'tabkey2-chosen-completion-function 'permanent-local t)
-
-(defun tabkey2-first-active-from-completion-functions ()
- "Return first active completion function.
-Look in `tabkey2-completion-functions' for the first function
-that has an active key binding."
- (catch 'active-fun
- (dolist (rec tabkey2-completion-functions)
- (let ((fun (nth 1 rec))
- (chk (nth 2 rec)))
- (when (tabkey2-is-active fun chk)
- (throw 'active-fun fun))))))
-
-(defun tabkey2-get-default-completion-fun ()
- "Return the default completion function.
-See `tabkey2-first' for the list considered."
- (or (when (and tabkey2-chosen-completion-function
- (tabkey2-is-active-p
- tabkey2-chosen-completion-function))
- tabkey2-chosen-completion-function)
- ;;tabkey2-preferred
- (tabkey2-first-active-from-completion-functions)
- tabkey2-fallback))
-
-(defvar tabkey2-overlay-message nil)
-
-(defvar tabkey2-completion-state-mode nil)
-;;(make-variable-buffer-local 'tabkey2-completion-state-mode)
-(defun tabkey2-completion-state-mode (arg)
- "Tab completion state minor mode.
-This pseudo-minor mode holds the 'Tab completion state'. When this
-minor mode is on completion key bindings are available.
-
-With ARG a positive number turn on, otherwise turn off this minor
-mode.
-
-See `tabkey2-first' for more information."
- ;;(assq-delete-all 'tabkey2-completion-state-mode minor-mode-alist)
- (unless (assoc 'tabkey2-completion-state-mode minor-mode-alist)
- ;;(setq minor-mode-alist (cons '(tabkey2-completion-state-mode " Tab2")
- (setq minor-mode-alist (cons (list 'tabkey2-completion-state-mode
- tabkey2-completion-lighter)
- minor-mode-alist)))
- (let ((emul-map (cdr (car tabkey2--emul-keymap-alist)))
- (old-wincfg tabkey2-completion-state-mode))
- (setq tabkey2-completion-state-mode (when (and (numberp arg)
- (> arg 0))
- ;;t
- (current-window-configuration)
- ))
- (if tabkey2-completion-state-mode
- (progn
- ;; Set default completion function
- (tabkey2-make-message-and-set-fun
- (tabkey2-get-default-completion-fun))
- ;; Message
- ;;(setq tabkey2-message-is-shown nil)
- (when tabkey2-show-message-on-enter
- (tabkey2-show-current-message
- (when (numberp tabkey2-show-message-on-enter)
- tabkey2-show-message-on-enter)))
- ;; Move overlays
- (tabkey2-move-overlays)
- ;; Work around eob keymap problem ...
- ;;(set-keymap-parent emul-map (overlay-get tabkey2-keymap-overlay
- ;; 'keymap))
- ;; Set up for pre/post-command-hook
- (add-hook 'pre-command-hook 'tabkey2-completion-state-pre-command)
- (add-hook 'post-command-hook 'tabkey2-completion-state-post-command))
- ;;(set-keymap-parent emul-map nil)
- (setq tabkey2-current-tab-function nil)
- (when (and old-wincfg
- tabkey2-keymap-overlay
- (eq (overlay-get tabkey2-keymap-overlay 'window) (selected-window))
- (not (active-minibuffer-window)))
- (set-window-configuration old-wincfg))
- (let ((inhibit-read-only t))
- (when tabkey2-keymap-overlay
- (delete-overlay tabkey2-keymap-overlay))
- (when tabkey2-overlay
- (delete-overlay tabkey2-overlay)))
- (remove-hook 'pre-command-hook 'tabkey2-completion-state-pre-command)
- (remove-hook 'post-command-hook 'tabkey2-completion-state-post-command)
- (tabkey2-overlay-message nil)
- ;;(message "")
- )))
-
-(defun tabkey2-completion-state-off ()
- "Quit Tab completion state."
- (interactive)
- (tabkey2-completion-state-mode -1)
- (let ((C-g-binding (or (key-binding [(control ?g)])
- (key-binding "\C-g")))
- did-more)
- (when (and (boundp 'company-mode)
- company-mode)
- ;;(message "tabkey2:company-abort")
- (company-abort)
- (setq did-more t))
- (when (and C-g-binding
- (not (eq C-g-binding this-command)))
- ;;(message "tabkey2:c-g=%s" C-g-binding)
- (call-interactively C-g-binding)
- (setq did-more t))
- (message "Quit")))
-
-(defvar tabkey2-message-is-shown nil)
-(defun tabkey2-message-is-shown ()
- (case tabkey2-message-style
- ('popup
- (when tabkey2-overlay-message
- (overlay-buffer tabkey2-overlay-message)))
- ('echo-area
- (get (current-message) 'tabkey2))))
-
-(defun tabkey2-completion-state-pre-command ()
- "Run this in `pre-command-hook'.
-Check if message is shown.
-Remove overlay message.
-Cancel delayed message."
- ;;(message "=====> tabkey2-completion-state-pre-command")
- (condition-case err
- (progn
- (setq tabkey2-message-is-shown (tabkey2-message-is-shown))
- ;;(message "tabkey2-overlay-message=%s, is-shown=%s" tabkey2-overlay-message tabkey2-message-is-shown)
- (tabkey2-overlay-message nil)
- (tabkey2-cancel-delayed-message)
- ;;(message "here buffer=%s, this-command=%s" (current-buffer) this-command)
- )
- (error (message "tabkey2 pre: %s" (error-message-string err)))))
-
-(defun tabkey2-completion-state-post-command ()
- "Turn off Tab completion state if not feasable any more.
-This is run in `post-command-hook' after each command."
- (condition-case err
- ;;(save-match-data
- ;; Delayed messages
- (if (not (tabkey2-completion-state-p))
- (tabkey2-completion-state-mode -1)
- ;;(message "tabkey2-current-tab-function=%s" tabkey2-current-tab-function)
- (tabkey2-move-overlays))
- ;;)
- (error (message "tabkey2 post: %s" (error-message-string err)))))
-
-(defun tabkey2-minibuffer-setup ()
- "Activate/deactivate function `tabkey2-mode' in minibuffer."
- (set (make-local-variable 'tabkey2-mode)
- (and tabkey2-mode
- tabkey2-in-minibuffer))
- (unless tabkey2-mode
- (set (make-local-variable 'emulation-mode-map-alists)
- (delq 'tabkey2--emul-keymap-alist
- (copy-sequence emulation-mode-map-alists)))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Message functions
-
-;; Fix-me: Included in Emacs 23.
-(unless (fboundp 'invisible-p)
- (defun invisible-p (pos)
- "Return non-nil if the character after POS is currently invisible."
- (let ((prop
- (get-char-property pos 'invisible)))
- (if (eq buffer-invisibility-spec t)
- prop
- (if (listp prop)
- (catch 'invis
- (dolist (p prop)
- (when (or (memq p buffer-invisibility-spec)
- (assq p buffer-invisibility-spec))
- (throw 'invis t))))
- (or (memq prop buffer-invisibility-spec)
- (assq prop buffer-invisibility-spec)))))))
-
-;; (defun test-scroll ()
-;; (interactive)
-;; (setq debug-on-error t)
-;; (let* ((buffer-name "test-scroll")
-;; (buffer (get-buffer buffer-name)))
-;; (when buffer (kill-buffer buffer))
-;; (setq buffer (get-buffer-create buffer-name))
-;; (switch-to-buffer buffer)
-;; (message "here 1") (sit-for 1)
-;; (condition-case err
-;; (scroll-up 1)
-;; (error (message "scroll-up error: %s" err)
-;; (sit-for 1)))
-;; (message "here 2") (sit-for 1)
-;; (scroll-up 1)
-;; (message "here 3") (sit-for 1)
-;; ))
-
-(defun tabkey2-overlay-message (txt)
- "Display TXT below or above current line using an overlay."
- ;;(setq tabkey2-message-is-shown txt)
- (if (not txt)
- (when tabkey2-overlay-message
- (delete-overlay tabkey2-overlay-message)
- (setq tabkey2-overlay-message nil))
- (let ((ovl tabkey2-overlay-message)
- (column (current-column))
- (txt-len (length txt))
- (here (point))
- beg end
- (before "")
- (after "")
- ovl-str too-much
- (is-eob (eobp))
- (direction 1))
- (unless ovl (setq ovl (make-overlay 0 0)))
- (when tabkey2-overlay-message
- (delete-overlay tabkey2-overlay-message))
- (setq tabkey2-overlay-message ovl)
-
- (when is-eob
- (setq direction -1))
- (when (and (/= (point-min) (window-start))
- (not (pos-visible-in-window-p (min (point-max) (1+ (line-end-position))))))
- ;; Go back inside window to avoid aggressive scrolling:
- (forward-line -1)
- (scroll-up 1)
- (forward-line 1))
- (forward-line direction)
- ;; Fix-me: Emacs bug workaround
- (if (when (< 1 (point))
- (invisible-p (1- (line-end-position))))
- (progn
- (goto-char here)
- (tabkey2-echo-area-message txt))
- ;; Fix-me: Does this really do anything now:
- (when (invisible-p (point))
- (while (invisible-p (point))
- (forward-line direction)))
- (setq beg (line-beginning-position))
- (setq end (line-end-position))
-
- (if (or (invisible-p beg) (invisible-p end))
- ;; Give up, do not fight invisibility:
- (progn
- (tabkey2-overlay-message nil)
- (tabkey2-echo-area-message txt))
-
- ;; string before
- (move-to-column column)
- (setq before (buffer-substring beg (point)))
- (when (< (current-column) column)
- (setq before
- (concat before
- (make-string (- column (current-column)) ? ))))
- (setq too-much (- (+ 1 txt-len (length before))
- (window-width)))
- (when (> too-much 0)
- (setq before (substring before 0 (- too-much))))
-
- (unless (> too-much 0)
- (move-to-column (+ txt-len (length before)))
- (setq after (buffer-substring (point) end)))
-
- (setq ovl-str (concat before
- (propertize txt 'face 'tabkey2-highlight-popup)
- after
- ))
-
- (overlay-put ovl 'after-string ovl-str)
- (overlay-put ovl 'display "")
- (overlay-put ovl 'window (selected-window))
- (move-overlay ovl beg end (current-buffer)))
-
- (goto-char here)
- ))))
-
-;; Fix-me: This was not usable IMO. Too much flickering.
-;; (defun tabkey2-tooltip (txt)
-;; (let* ((params tooltip-frame-parameters)
-;; (coord (car (point-to-coord (point))))
-;; (left (car coord))
-;; (top (cadr coord))
-;; tooltip-frame-parameters
-;; )
-;; ;; Fix-me: how do you get char height??
-;; (setq top (+ top 50))
-;; (setq params (tooltip-set-param params 'left left))
-;; (setq params (tooltip-set-param params 'top top))
-;; (setq params (tooltip-set-param params 'top top))
-;; (setq tooltip-frame-parameters params)
-;; (tooltip-hide)
-;; (tooltip-show txt nil)))
-
-(defun tabkey2-echo-area-message (txt)
- "Show TXT in the echo area with a special face.
-Shown with the face `tabkey2-highlight-message'."
- (message "%s" (propertize txt
- 'face 'tabkey2-highlight-message
- 'tabkey2 t)))
-
-(defun tabkey2-deliver-message (txt)
- "Show message TXT to user."
- (case tabkey2-message-style
- (popup (tabkey2-overlay-message txt))
- (t (tabkey2-echo-area-message txt))))
-
-(defun tabkey2-timer-deliver-message (txt where)
- "Show message TXT to user.
-Protect from errors cause this is run during a timer."
- (save-match-data ;; runs in timer
- (when (and tabkey2-completion-state-mode
- (equal (point-marker) where))
- (condition-case err
- (tabkey2-deliver-message txt)
- (error (message "tabkey2-timer-deliver-message: %s"
- (error-message-string err)))))))
-
-(defvar tabkey2-delayed-timer nil)
-
-(defun tabkey2-cancel-delayed-message ()
- "Cancel delayed message."
- (when tabkey2-delayed-timer
- (cancel-timer tabkey2-delayed-timer)
- (setq tabkey2-delayed-timer)))
-
-(defun tabkey2-maybe-delayed-message (txt delay)
- "Show message TXT, delay it if DELAY is non-nil."
- (if delay
- (setq tabkey2-delayed-timer
- (run-with-idle-timer
- delay nil
- 'tabkey2-timer-deliver-message txt (point-marker)))
- (tabkey2-deliver-message txt)))
-
-(defun tabkey2-message (delay format-string &rest args)
- "Show, if DELAY delayed, otherwise immediately message.
-FORMAT-STRING and ARGS are like for `message'."
- (let ((txt (apply 'format format-string args)))
- (tabkey2-maybe-delayed-message txt delay)))
-
-(defun tabkey2-show-current-message (&optional delay)
- "Show current completion message, delayed if DELAY is non-nil."
- (tabkey2-cancel-delayed-message)
- (tabkey2-message delay "%s" tabkey2-current-tab-info))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Completion function selection etc
-
-(defun tabkey2-symbol-keys (comp-fun)
- "Get a list of all key bindings for COMP-FUN."
- (let* ((remapped (command-remapping comp-fun)))
- (where-is-internal comp-fun
- nil ;;overriding-local-map
- nil nil remapped)))
-
-(defun tabkey2-get-active-completion-functions ()
- "Get a list of active completion functions.
-Consider only those in `tabkey2-completion-functions'."
- (delq nil
- (mapcar (lambda (rec)
- (let ((fun (nth 1 rec))
- (chk (nth 2 rec)))
- (when (tabkey2-is-active fun chk) rec)))
- tabkey2-completion-functions)))
-
-(defun tabkey2-make-current-default ()
- "Make current Tab completion function default.
-Set the current Tab completion function at point as default for
-the current buffer."
- (interactive)
- (let ((set-it
- (y-or-n-p
- (format
- "Make %s default for Tab completion in current buffer? "
- tabkey2-current-tab-function))))
- (when set-it
- (setq tabkey2-chosen-completion-function
- tabkey2-current-tab-function))
- (unless set-it
- (when (local-variable-p 'tabkey2-chosen-completion-function)
- (when (y-or-n-p "Use default Tab completion selection in buffer? ")
- (setq set-it t))
- (kill-local-variable 'tabkey2-chosen-completion-function)))
- (when (tabkey2-completion-state-p)
- (tabkey2-message nil "%s%s" tabkey2-current-tab-info
- (if set-it " - Done" "")))))
-
-(defun tabkey2-activate-next-completion-function (wrap)
- (let* ((active (mapcar (lambda (rec)
- (nth 1 rec))
- (tabkey2-get-active-completion-functions)))
- (first (car active))
- next)
- ;;(message "is-shown=%s current=%s active=%s overlay=%s" tabkey2-message-is-shown tabkey2-current-tab-function active tabkey2-overlay)
- (when tabkey2-current-tab-function
- (while (and active (not next))
- (when (eq (car active) tabkey2-current-tab-function)
- (setq next (cadr active)))
- (setq active (cdr active))))
- (unless next
- (when wrap (setq next first)))
- ;;(if (eq first next)
- (tabkey2-make-message-and-set-fun next)))
-
-(defun tabkey2-cycle-completion-functions (prefix)
- "Cycle through cnd display ompletion functions.
-If 'Tab completion state' is not on then turn it on.
-
-If PREFIX is given just show what this command will do."
- (interactive "P")
- (if (tabkey2-read-only-p)
- (message "Buffer is read only at point")
- (unless tabkey2-completion-state-mode (tabkey2-completion-state-mode 1))
- (save-match-data
- (if prefix
- ;; fix-me
- (message "(TabKey2) %s: show/cycle completion function"
- last-input-event)
- (when tabkey2-message-is-shown
- ;; Message is shown currently so change
- (tabkey2-activate-next-completion-function 'wrap))
- (tabkey2-show-current-message)))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Handling of Tab and alternate key
-
-;;;###autoload
-(defun tabkey2-emma-without-tabkey2 ()
- ;; Remove keymaps from tabkey2 in this copy:
- (delq 'tabkey2--emul-keymap-alist
- (copy-sequence emulation-mode-map-alists)))
-
-(defvar tabkey2-step-out-of-the-way nil)
-;;(remove-hook 'pre-command-hook 'tabkey2-pre-command)
-;;(remove-hook 'post-command-hook 'tabkey2-pre-command)
-;;(remove-hook 'post-command-hook 'tabkey2-post-command-2)
-(defun tabkey2-post-command ()
- (setq tabkey2-step-out-of-the-way nil)
- (condition-case err
- (when tabkey2-mode
- (when (and (boundp 'company-overriding-keymap-bound) company-overriding-keymap-bound)
- (setq tabkey2-step-out-of-the-way
- (let ((emulation-mode-map-alists (tabkey2-emma-without-tabkey2)))
- (key-binding (this-command-keys))))
- ;;(message "tabkey2-step-out=%s, %s" (this-command-keys) tabkey2-step-out-of-the-way)
- ))
- (error "tabkey2-pre-command: %s" err)))
- ;; (and (boundp 'company-preview-overlay)
- ;; (or company-preview-overlay
- ;; company-pseudo-tooltip-overlay)))
-(defun tabkey2-first (prefix)
- "Do something else after first Tab.
-This function is bound to the Tab key \(or whatever key
-`tabkey2-first-key' is) when minor mode command `tabkey2-mode' is
-on. It works like this:
-
-1. The first time Tab is pressed do whatever Tab would have done
- if minor mode command `tabkey2-mode' was off.
-
- Then before next command enter a new temporary 'Tab completion
- state' for just the next command. Show this by a highlight on
- the indentation and a marker \"Tab2\" in the mode line.
-
- However if either
- - the minibuffer is active and `tabkey2-in-minibuffer' is nil
- - `major-mode' is in `tabkey2-modes-that-use-more-tabs' then
- do not enter this temporary 'Tab completion state'.
-
- For major modes where it make sense to press Tab several times
- you can use `tabkey2-alternate-key' to enter 'Tab completion
- state'.
-
-
-2. As long as point is not move do completion when Tab is pressed
- again. Show that this state is active with a highlighting at
- the line beginning, a marker on the mode line (Tab2) and a
- message in the echo area which tells what kind of completion
- will be done.
-
- When deciding what kind of completion to do look in the table
- below and do whatever it found first that is not nil:
-
- - `tabkey2-preferred'
- - `tabkey2-completion-functions'
- - `tabkey2-fallback'
-
-3. Of course, there must be some way for you to easily determine
- what kind of completion because there are many in Emacs. If
- you do not turn it off this function will show that to you.
- And if you turn it off you can still display it, see the key
- bindings below.
-
- If this function is used with a PREFIX argument then it just
- shows what Tab will do.
-
- If the default kind of completion is not what you want then
- you can choose completion function from any of the candidates
- in `tabkey2-completion-functions'. During the 'Tab completion
- state' the following extra key bindings are available:
-
-\\{tabkey2-completion-state-emul-map}
-
-Of course, some languages does not have a fixed indent as is
-assumed above. You can put major modes for those in
-`tabkey2-modes-that-just-complete'.
-
-Some major modes uses tab for something else already. Those are
-in `tabkey2-modes-that-use-more-tabs'. There is an alternate
-key, `tabkey2-alternate-key' if you want to do completion
-there. Note that this key does not do completion. It however
-enters 'Tab completion state' in which you have access to the
-keys above for completion etc. \(This key also lets you cycle
-through the completion functions too choose which one to use.)
-
------
-NOTE: This uses `emulation-mode-map-alists' and it supposes that
-nothing else is bound to Tab there."
- (interactive "P")
- ;;(message "first:tabkey2-step-out=%s, %s" (this-command-keys) tabkey2-step-out-of-the-way)
- (if tabkey2-step-out-of-the-way
- (progn
- (message "step-out=%s" tabkey2-step-out-of-the-way)
- (call-interactively tabkey2-step-out-of-the-way))
- (if (and tabkey2-keymap-overlay
- (eq (overlay-buffer tabkey2-keymap-overlay) (current-buffer))
- (eq (overlay-get tabkey2-keymap-overlay 'window) (selected-window))
- (>= (point) (overlay-start tabkey2-keymap-overlay))
- (<= (point) (overlay-end tabkey2-keymap-overlay)))
- ;; We should maybe not be here, but the keymap does not work at
- ;; the end of the buffer so we call the second tab function from
- ;; here:
- (if (memq 'shift (event-modifiers last-input-event))
- (call-interactively 'tabkey2-cycle-completion-functions)
- (call-interactively 'tabkey2-complete prefix))
- (let* ((emma-without-tabkey2 (tabkey2-emma-without-tabkey2))
- (at-word-end (looking-at "\\_>"))
- (just-complete (or (memq major-mode tabkey2-modes-that-just-complete)
- at-word-end))
- (what (if just-complete
- 'complete
- (if (or (unless tabkey2-in-minibuffer
- (active-minibuffer-window))
- (when (fboundp 'use-region-p) (use-region-p))
- (not at-word-end)
- (memq major-mode tabkey2-modes-that-use-more-tabs))
- 'indent
- 'indent-complete
- )))
- (to-do-1 (unless (or
- ;; Skip action on tab if shift tab,
- ;; backtab or a mode in the "just
- ;; complete" list
- (memq 'shift (event-modifiers last-input-event))
- (equal [backtab] (this-command-keys-vector))
- )
- (let ((emulation-mode-map-alists emma-without-tabkey2))
- ;; Fix-me: Is this the way to pick up "tab keys"?
- (or (key-binding [tab] t)
- (key-binding [?\t] t))
- )))
- (to-do-2 (unless (or ;;(memq what '(complete))
- (memq what '(indent))
- (memq to-do-1 '(widget-forward button-forward)))
- (tabkey2-get-default-completion-fun))))
- ;;(message "step-out-of-the-way=%s to-do=%s/%s, emmaa-without-tabkey2=%s" step-out-of-the-way to-do-1 to-do-2 emma-without-tabkey2)
- (if prefix
- (if (memq 'shift (event-modifiers last-input-event))
- (message
- "(TabKey2) First shift %s: turn on 'Tab completion state'"
- last-input-event)
- (message "(TabKey2) First %s: %s, next: maybe %s"
- last-input-event to-do-1
- (if to-do-2 to-do-2 "(same)")))
- (when to-do-1
- (let (xmumamo-multi-major-mode)
- (tabkey2-call-interactively to-do-1)))
- (unless (tabkey2-read-only-p)
- (when to-do-2
- (tabkey2-completion-state-mode 1))))))))
-
-(defun tabkey2-call-interactively (function)
- "Like `call-interactively, but handle `this-command'."
- (setq this-command function)
- (call-interactively function))
-
-(defcustom tabkey2-choose-next-on-error t
- "Choose next completion function on error."
- :type 'boolean
- :group 'tabkey2)
-
-(defun tabkey2-complete (prefix)
- "Call current completion function.
-If used with a PREFIX argument then just show what Tab will do."
- (interactive "P")
- (if (and (boundp 'mumamo-multi-major-mode)
- mumamo-multi-major-mode
- (not (mumamo-syntax-maybe-completable (point))))
- (message "Please move out of chunk border before trying to complete.")
- (if prefix
- (message "(TabKey2) %s: %s"
- last-input-event tabkey2-current-tab-function)
- (let ((here (point))
- (res (if tabkey2-choose-next-on-error
- (condition-case err
- (tabkey2-call-interactively tabkey2-current-tab-function)
- (error (message "%s" (error-message-string err))
- nil))
- (tabkey2-call-interactively tabkey2-current-tab-function))))
- (when (and (not res) (= here (point)))
- (tabkey2-activate-next-completion-function nil)
- ;;(message "complete.tabkey2-current-tab-function=%s" tabkey2-current-tab-function)
- (if tabkey2-current-tab-function
- (tabkey2-show-current-message)
- (message "No more active completion functions in this buffer")))))))
-
-;; Fix-me: I am not sure that it really is useful with a globalized
-;; minor mode here because there are so many other ways to control
-;; what happens in a specific buffer. Maybe it would just be
-;; confusing?
-;;
-;; If found another problem with making it globalized: tabkey2-mode
-;; uses emulation-mode-map-alist. I decided to remove this therefore.
-;;
-;; (defun tabkey2-turn-on ()
-;; "Turn on `tabkey2-mode' in current buffer."
-;; (tabkey2-mode 1))
-
-;; (defvar tabkey2-turn-on-function 'tabkey2-turn-on
-;; "Function used to mabye turn on `tabkey2-mode' in current-buffer.
-;; This function is used by `tabkey2-global-mode' to turn on
-;; `tabkey2-mode'.")
-
-;; (defun tabkey2-turn-on-in-buffer ()
-;; (funcall tabkey2-turn-on-function))
-
-;; (define-globalized-minor-mode tabkey2-global-mode
-;; tabkey2-mode tabkey2-turn-on-in-buffer)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Help functions
-
-(defun tabkey2-show-completion-state-help ()
- "Help for 'Tab completion state'.
-To get out of this state you can move out of the current line.
-
-During this state the keymap below is active. This state stops
-as soon as you leave the current row.
-
-\\{tabkey2-completion-state-emul-map}
-See function `tabkey2-mode' for more information.
-
-If you want to use Emacs normal help function then press F1
-again.")
-
-(defun tabkey2-completion-state-help ()
- "Show help for 'Tab completion state'."
- (interactive)
- ;;(message "tckv=%s" (this-command-keys-vector)) ;;(sit-for 1)
- ;; Fix-me: There seems to be an Emacs bug lurking here. Sometimes
- ;; invoked-by-f1 is not [f1].
- (let ((invoked-by-f1 (equal (this-command-keys-vector) [f1]))
- normal-help)
- ;;(message "invoked-by-f1=%s" invoked-by-f1) ;; fix-me
- (if (not invoked-by-f1)
- (describe-function 'tabkey2-show-completion-state-help)
- (setq normal-help
- (read-event
- (propertize
- (concat "Type a key for Emacs help."
- " Or, wait for Tab completion state help: ")
- 'face 'highlight)
- nil
- 4))
- (case normal-help
- ((nil)
- ;;(message "Tab completion state help")
- (describe-function 'tabkey2-show-completion-state-help))
- (?c
- (call-interactively 'describe-key-briefly))
- (?k
- (call-interactively 'describe-key))
- (t
- (tabkey2-completion-state-mode -1)
- (setq unread-command-events
- (reverse
- (cons
- normal-help
- (append (this-command-keys) nil)))))))))
-
-(defun tabkey2-completion-function-help ()
- "Show help for current completion function."
- (interactive)
- (describe-function tabkey2-current-tab-function))
-
-
-
-
-(defun tabkey2-get-key-binding (fun t2)
- "Get key binding for FUN during 'Tab completion state'."
- (let* ((remapped (command-remapping fun))
- (key (where-is-internal fun
- (when t2 tabkey2-completion-state-emul-map)
- t
- nil
- remapped)))
- key))
-
-;; (defun tabkey2-reset-completion-function (comp-fun)
-;; "Reset states for functions in `tabkey2-completion-functions'."
-;; ;; Fix-me: remove hard-coding
-;; (setq dabbrev--last-abbrev-location nil))
-
-(defun tabkey2-make-message-and-set-fun (comp-fun)
- "Set current completion function to COMP-FUN.
-Build message but don't show it."
- ;;(tabkey2-reset-completion-functions)
- (let* ((chs-fun 'tabkey2-cycle-completion-functions)
- (key (tabkey2-get-key-binding chs-fun t))
- ;;(def-fun (tabkey2-get-default-completion-fun))
- what
- (comp-fun-key (tabkey2-get-key-binding comp-fun nil))
- reset)
- (setq tabkey2-current-tab-function comp-fun)
- (dolist (rec tabkey2-completion-functions)
- (let ((fun (nth 1 rec))
- (txt (nth 0 rec))
- (res (nth 3 rec)))
- (when (eq fun comp-fun)
- (eval res)
- (setq what txt))))
- (let ((info (concat (format "Tab: %s" what)
- (if comp-fun-key
- (format " (%s)" (key-description comp-fun-key))
- "")
- (if (cdr (tabkey2-get-active-completion-functions))
- (format ", other %s, help F1"
- (key-description key))
- ""))))
- (setq tabkey2-current-tab-info info))))
-
-(defun tabkey2-get-active-string (bnd fun buf)
- "Get string to show for state.
-BND: means active
-FUN: function
-BUF: buffer"
- (if bnd
- (if (with-current-buffer buf (tabkey2-read-only-p))
- (propertize "active, but read-only" 'face '( :foreground "red"))
- (propertize "active" 'face '( :foreground "green3")))
- (if (and (fboundp fun)
- (commandp fun))
- (propertize "not active" 'face '( :foreground "red2"))
- (propertize "not defined" 'face '( :foreground "gray")))))
-
-(defun tabkey2-show-completion-functions ()
- "Show what currently may be used for completion."
- (interactive)
- (let ((orig-buf (current-buffer))
- (orig-mn mode-name)
- (active-mark (concat " "
- (propertize "<= default"
- 'face '( :background "yellow"))))
- (act-found nil)
- (chosen-fun tabkey2-chosen-completion-function)
- what
- chosen)
- (when chosen-fun
- (dolist (rec tabkey2-completion-functions)
- (let ((fun (nth 1 rec))
- (txt (nth 0 rec)))
- (when (eq fun chosen-fun) (setq what txt))))
- (setq chosen (list what chosen-fun)))
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'tabkey2-show-completion-functions)
- (interactive-p))
- (with-current-buffer (help-buffer)
- (insert (concat "The completion functions available for"
- " 'Tab completion' in buffer\n'"
- (buffer-name orig-buf)
- "' at point with mode " orig-mn " are shown below.\n"
- "The first active function is used by default.\n\n"))
- (if (not chosen)
- (insert " No completion function is set as default.")
- (let* ((txt (nth 0 chosen))
- (fun (nth 1 chosen))
- (chk (nth 2 chosen))
- (bnd (with-current-buffer orig-buf
- (tabkey2-is-active fun chk)))
- (act (tabkey2-get-active-string bnd fun orig-buf)))
- (insert (format " Default is set to\n %s (%s): %s"
- txt fun act))
- (when bnd (insert active-mark) (setq act-found t))))
- (insert "\n\n")
-;;; (if (not tabkey2-preferred)
-;;; (insert " None is preferred")
-;;; (let* ((txt (nth 0 tabkey2-preferred))
-;;; (fun (nth 1 tabkey2-preferred))
-;;; (chk (nth 2 chosen))
-;;; (bnd (with-current-buffer orig-buf
-;;; (tabkey2-is-active fun chk)))
-;;; (act (tabkey2-get-active-string bnd fun orig-buf)))
-;;; (insert (format " Preferred is %s (`%s')': %s"
-;;; txt fun act))
-;;; (when bnd (insert active-mark) (setq act-found t))))
-;;; (insert "\n\n")
- (dolist (comp-fun tabkey2-completion-functions)
- (let* ((txt (nth 0 comp-fun))
- (fun (nth 1 comp-fun))
- (chk (nth 2 comp-fun))
- (bnd (with-current-buffer orig-buf
- (tabkey2-is-active fun chk)))
- (act (tabkey2-get-active-string bnd fun orig-buf))
- (keys (where-is-internal fun)))
- (if (not keys)
- (setq keys "")
- (setq keys (mapconcat 'key-description keys ", "))
- (when (and (< 9 (length keys))
- (string= "<menu-bar>" (substring keys 0 10)))
- (setq keys "Menu"))
- (setq keys (propertize keys 'face 'highlight))
- (setq keys (concat ", " keys))
- )
- (insert
- (format
- " %s (`%s'%s): %s"
- txt fun keys act))
- (when (and (not act-found) bnd)
- (insert active-mark) (setq act-found t))
- (insert "\n")))
- (insert "\n")
- (if (not tabkey2-fallback)
- (insert " There is no fallback")
- (let* ((txt (nth 0 tabkey2-fallback))
- (fun (nth 1 tabkey2-fallback))
- (chk (nth 2 tabkey2-fallback))
- (bnd (with-current-buffer orig-buf
- (tabkey2-is-active fun chk)))
- (act (tabkey2-get-active-string bnd fun orig-buf)))
- (insert (format " Fallback is %s (`%s'): %s"
- txt fun act))
- (when (and (not act-found) bnd)
- (insert active-mark)
- (setq act-found t))))
- (insert "\n\nYou an ")
- (insert-text-button "customize this list"
- 'action (lambda (button)
- (customize-option
- 'tabkey2-completion-functions)))
- (insert ".\nSee function `tabkey2-mode' for more information.")
- (with-no-warnings (print-help-return-message))))))
-
-(defvar tabkey2-completing-read 'completing-read)
-
-(defun tabkey2-set-fun (fun)
- "Use function FUN for Tab in 'Tab completion state'."
- (setq tabkey2-chosen-completion-function fun)
- (unless fun
- (setq fun (tabkey2-first-active-from-completion-functions)))
- (tabkey2-make-message-and-set-fun fun)
- (when (tabkey2-completion-state-p)
- (message "%s" tabkey2-current-tab-info)))
-
-(defun tabkey2-appmenu ()
- "Make a menu for minor mode command `appmenu-mode'."
- (unless (tabkey2-read-only-p)
- (let* ((cf-r (reverse (tabkey2-get-active-completion-functions)))
- (tit "Complete")
- (map (make-sparse-keymap tit)))
- (define-key map [tabkey2-usage]
- (list 'menu-item "Show Available Completion Functions for TabKey2"
- 'tabkey2-show-completion-functions))
- (define-key map [tabkey2-divider-1] (list 'menu-item "--"))
- (let ((set-map (make-sparse-keymap "Set Completion")))
- (define-key map [tabkey2-choose]
- (list 'menu-item "Set Primary TabKey2 Tab Completion in Buffer" set-map))
- (dolist (cf-rec cf-r)
- (let ((dsc (nth 0 cf-rec))
- (fun (nth 1 cf-rec)))
- (define-key set-map
- (vector (intern (format "tabkey2-set-%s" fun)))
- (list 'menu-item dsc
- `(lambda ()
- (interactive)
- (tabkey2-set-fun ',fun))
- :button
- `(:radio
- . (eq ',fun tabkey2-chosen-completion-function))))))
- (define-key set-map [tabkey2-set-div] (list 'menu-item "--"))
- (define-key set-map [tabkey2-set-default]
- (list 'menu-item "Default Tab completion"
- (lambda ()
- (interactive)
- (tabkey2-set-fun nil))
- :button
- '(:radio . (null tabkey2-chosen-completion-function))))
- (define-key set-map [tabkey2-set-header-div] (list 'menu-item "--"))
- (define-key set-map [tabkey2-set-header]
- (list 'menu-item "Set Primary Tab Completion for Buffer"))
- )
- (define-key map [tabkey2-divider] (list 'menu-item "--"))
- (dolist (cf-rec cf-r)
- (let ((dsc (nth 0 cf-rec))
- (fun (nth 1 cf-rec)))
- (define-key map
- (vector (intern (format "tabkey2-call-%s" fun)))
- (list 'menu-item dsc fun
- :button
- `(:toggle
- . (eq ',fun tabkey2-chosen-completion-function))
- ))))
- map)))
-
-;; (defun tabkey2-completion-menu-popup ()
-;; "Pop up a menu with completion alternatives."
-;; (interactive)
-;; (let ((menu (tabkey2-appmenu)))
-;; (popup-menu-at-point menu)))
-
-;; (defun tabkey2-choose-completion-function ()
-;; "Set current completion function.
-;; Let user choose completion function from those in
-;; `tabkey2-completion-functions' that have some key binding at
-;; point.
-
-;; Let the chosen completion function be the default for subsequent
-;; completions in the current buffer."
-;; ;; Fix-me: adjust to mumamo.
-;; (interactive)
-;; (save-match-data
-;; (if (and (featurep 'popcmp)
-;; tabkey2-use-popup-menus)
-;; (tabkey2-completion-menu-popup)
-;; (when (eq 'completing-read tabkey2-completing-read) (isearch-unread 'tab))
-;; (let* ((cf-r (reverse (tabkey2-get-active-completion-functions)))
-;; (cf (cons '("- Use default Tab completion" nil) cf-r))
-;; (hist (mapcar (lambda (rec)
-;; (car rec))
-;; cf))
-;; (tit (funcall tabkey2-completing-read "Set current completion function: " cf
-;; nil ;; predicate
-;; t ;; require-match
-;; nil ;; initial-input
-;; 'hist ;; hist
-;; ))
-;; (fun-rec (assoc-string tit cf))
-;; (fun (cadr fun-rec)))
-;; (setq tabkey2-chosen-completion-function fun)
-;; (unless fun
-;; (setq fun (tabkey2-first-active-from-completion-functions)))
-;; (tabkey2-make-message-and-set-fun fun)
-;; (when (tabkey2-completion-state-p)
-;; (tabkey2-show-current-message))))))
-
-;; (defun tabkey2-add-to-appmenu ()
-;; "Add a menu to function `appmenu-mode'."
-;; (appmenu-add 'tabkey2 nil t "Completion" 'tabkey2-appmenu))
-
-
-(provide 'tabkey2)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; tabkey2.el ends here
diff --git a/emacs.d/nxhtml/util/tyda.el b/emacs.d/nxhtml/util/tyda.el
deleted file mode 100644
index d4f3ea6..0000000
--- a/emacs.d/nxhtml/util/tyda.el
+++ /dev/null
@@ -1,94 +0,0 @@
-;;; tyda.el --- Lookup words in swe/eng dictionary at tyda.se
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-26T02:51:27+0200 Tue
-;; Version: 0.2
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Lookup swedish or english words in the dictionary at
-;;
-;; http://www.tyda.se/
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'appmenu))
-
-(defun tyda-lookup-word (word)
- "Look up word WORD at URL `http://tyda.se/'.
-This site translates between English and Swedish. The site will
-be opened in your webbrowser with WORD looked up."
- (interactive (list (or (thing-at-point 'word)
- (read-string "Lookup word: "))))
- ;; http://tyda.se/search?form=1&w=weird&w_lang=&x=0&y=0
- (browse-url
- ;;(concat "http://www.tyda.se/?rid=651940&w=" word)
- (format "http://tyda.se/search?form=1&w=%s&w_lang=&x=0&y=0" word)
- ))
-
-(defvar tyda-appmenu-map
- (let ((map (make-sparse-keymap)))
- (define-key map [tyda-lookup]
- (list 'menu-item "Lookup word at point in Tyda"
- 'tyda-lookup-word))
- map))
-
-(defvar tyda-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(alt mouse-1)] 'tyda-lookup-word)
- (define-key map [(control ?c) ?=] 'tyda-lookup-word)
- map))
-
-;;;###autoload
-(define-minor-mode tyda-mode
- "Minor mode for key bindings for `tyda-lookup-word'.
-It binds Alt-Mouse-1 just as the Tyda add-on does in Firefox.
-Here are all key bindings
-
-\\{tyda-mode-map}
-"
- :global t
- (if tyda-mode
- (progn
- (require 'appmenu nil t)
- (when (featurep 'appmenu)
- (appmenu-add 'tyda nil tyda-mode "Lookup word" tyda-appmenu-map)))))
-
-
-(provide 'tyda)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; tyda.el ends here
diff --git a/emacs.d/nxhtml/util/udev-ecb.el b/emacs.d/nxhtml/util/udev-ecb.el
deleted file mode 100644
index be3b35f..0000000
--- a/emacs.d/nxhtml/util/udev-ecb.el
+++ /dev/null
@@ -1,229 +0,0 @@
-;;; udev-ecb.el --- Get ECB sources and set it up
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-25T04:02:37+0200 Mon
-(defconst udev-ecb:version "0.2");; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-
-(eval-when-compile (require 'udev nil t))
-
-(defgroup udev-ecb nil
- "Customization group for udev-ecb."
- :group 'nxhtml)
-
-(defcustom udev-ecb-dir "~/.emacs.d/udev/ecb-cvs/"
- "Directory where to put CVS ECB sources."
- :type 'directory
- :group 'udev-ecb)
-
-(defun udev-ecb-cvs-dir ()
- "Return cvs root directory."
- (file-name-as-directory (expand-file-name "ecb" udev-ecb-dir)))
-
-(defvar udev-ecb-miss-cedet nil)
-
-(defun udev-ecb-load-ecb ()
- "Load fetched ECB."
- (setq udev-ecb-miss-cedet nil)
- (unless (featurep 'ecb)
- (add-to-list 'load-path (udev-ecb-cvs-dir))
- (let ((msg nil))
- (unless (or msg (featurep 'cedet)) (setq msg "CEDET is not loaded"))
- (unless (or msg (locate-library "semantic")) (setq msg "can't find CEDET Semantic"))
- (unless (or msg (locate-library "eieio")) (setq msg "can't find CEDET eieio"))
- (if msg
- (progn
- (setq udev-ecb-miss-cedet (format "Can't load ECB because %s." msg))
- (ourcomments-warning udev-ecb-miss-cedet))
- (require 'ecb nil t)))))
-
-(defcustom udev-ecb-load-ecb nil
- "To load or not to load ECB..."
- :type 'boolean
- :require 'udev-ecb
- :set (lambda (sym val)
- (set-default sym val)
- (when val
- (udev-ecb-load-ecb)))
- ;; ecb-activate, ecb-customize-most-important to menu
- :set-after '(udev-cedet-load-cedet)
- :group 'udev-ecb)
-
-(defvar udev-ecb-steps
- '(udev-ecb-fetch
- udev-ecb-fix-bad-files
- udev-ecb-fetch-diff
- udev-ecb-check-diff
- udev-ecb-install
- ))
-
-(defun udev-ecb-buffer-name (mode)
- "Return a name for current compilation buffer ignoring MODE."
- (udev-buffer-name "*Updating ECB %s*" udev-ecb-update-buffer mode))
-
-(defvar udev-ecb-update-buffer nil)
-
-(defun udev-ecb-has-cedet ()
- (cond
- ((not (and (locate-library "semantic")
- (locate-library "eieio")))
- (message (propertize "CEDET must be installed and loaded first"
- 'face 'secondary-selection))
- nil)
- ((not (featurep 'cedet))
- (message (propertize "CEDET must be loaded first"
- 'face 'secondary-selection))
- nil)
- (t t)))
-
-(defun udev-ecb-setup-when-finished (log-buffer)
- (require 'cus-edit)
- (let ((inhibit-read-only t))
- (with-current-buffer log-buffer
- (widen)
- (goto-char (point-max))
- (insert "\n\nYou must restart Emacs to load ECB properly.\n")
- (let ((load-ecb-saved-value (get 'udev-ecb-load-ecb 'saved-value))
- (here (point))
- )
- (if load-ecb-saved-value
- (insert "You have setup to load ECB the next time you start Emacs.\n\n")
- (insert (propertize "Warning:" 'face 'compilation-warning)
- " You have not setup to load ECB the next time you start Emacs.\n\n"))
- (insert-button " Setup "
- 'face 'custom-button
- 'action (lambda (btn)
- (interactive)
- (customize-group-other-window 'udev-ecb)))
- (insert " Setup to load ECB from fetched sources when starting Emacs.")))))
-
-;;;###autoload
-(defun udev-ecb-update ()
- "Fetch and install ECB from the devel sources.
-To determine where to store the sources see `udev-ecb-dir'.
-For how to start ECB see `udev-ecb-load-ecb'."
- (interactive)
- (when (udev-ecb-has-cedet)
- (let* ((has-it (file-exists-p (udev-ecb-cvs-dir)))
- (prompt (if has-it
- "Do you want to update ECB from devel sources? "
- "Do you want to install ECB from devel sources? ")))
- (when (y-or-n-p prompt)
- (setq udev-ecb-update-buffer (get-buffer-create "*Update ECB*"))
- (udev-call-first-step udev-ecb-update-buffer udev-ecb-steps
- "Starting updating ECB from development sources"
- 'udev-ecb-setup-when-finished)))))
-
-;;;###autoload
-(defun udev-ecb-customize-startup ()
- "Customize ECB dev nXhtml startup group."
- (interactive)
- (if (file-exists-p (udev-ecb-cvs-dir))
- (customize-group-other-window 'udev-ecb)
- (message (propertize "You must fetch ECB from nXhtml first"
- 'face 'secondary-selection))))
-
-(defun udev-ecb-fetch (log-buffer)
- "Fetch ECB sources (asynchronously)."
- (let ((default-directory (file-name-as-directory udev-ecb-dir)))
- (unless (file-directory-p default-directory)
- (make-directory default-directory))
- (with-current-buffer
- (compilation-start
- "cvs -z3 -d:pserver:anonymous@ecb.cvs.sourceforge.net:/cvsroot/ecb co -P ecb"
- 'compilation-mode
- 'udev-ecb-buffer-name)
- (current-buffer))))
-
-;;(udev-ecb-fix-bad-files nil)
-(defun udev-ecb-fix-bad-files (log-buffer)
- "Change files that can not be compiled."
- (let* ((bad-file (expand-file-name "ecb/ecb-advice-test.el" udev-ecb-dir))
- (bad-file-buffer (find-buffer-visiting bad-file))
- (this-log-buf (get-buffer-create "*Fix bad ECB files*"))
- (fixed-it nil))
- (when (file-exists-p bad-file)
- (with-current-buffer (find-file-noselect bad-file)
- (save-restriction
- (widen)
- (goto-char (point-min))
- (save-match-data
- (while (re-search-forward "\r" nil t)
- (setq fixed-it t)
- (replace-match ""))))
- (basic-save-buffer)
- (with-current-buffer this-log-buf
- (erase-buffer)
- (if fixed-it
- (insert "Fixed " bad-file "\n")
- (insert "The file " bad-file " was already ok\n")))
- (unless bad-file-buffer (kill-buffer (current-buffer)))))
- this-log-buf))
-
-(defun udev-ecb-fetch-diff (log-buffer)
- "Fetch diff between local ECB sources and repository."
- (udev-fetch-cvs-diff (udev-ecb-cvs-dir) 'udev-ecb-buffer-name))
-
-(defun udev-ecb-check-diff (log-buffer)
- "Check cvs diff output for merge conflicts."
- (udev-check-cvs-diff (expand-file-name "your-patches.diff"
- (udev-ecb-cvs-dir))
- udev-ecb-update-buffer))
-
-(defun udev-ecb-install (log-buffer)
- "Install the ECB sources just fetched.
-Note that they will not be installed in current Emacs session."
- (udev-batch-compile "-l ecb-batch-compile.el"
- udev-this-dir
- 'udev-ecb-buffer-name))
-
-;;(udev-ecb-install-help (get-buffer-create "*temp online-help*"))
-(defun udev-ecb-install-help (log-buffer)
- (let ((trc-buf (get-buffer-create "*temp online-help*")))
- (with-current-buffer trc-buf
- (setq default-directory (udev-ecb-cvs-dir))
- (w32shell-with-shell "msys" (shell-command "make online-help&" trc-buf)))))
-
-(provide 'udev-ecb)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; udev-ecb.el ends here
diff --git a/emacs.d/nxhtml/util/udev-rinari.el b/emacs.d/nxhtml/util/udev-rinari.el
deleted file mode 100644
index ed70c6c..0000000
--- a/emacs.d/nxhtml/util/udev-rinari.el
+++ /dev/null
@@ -1,204 +0,0 @@
-;;; udev-rinari.el --- Get rinary sources and set it up
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-24T22:32:21+0200 Sun
-(defconst udev-rinari:version "0.2");; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'udev nil t))
-
-(defgroup udev-rinari nil
- "Customization group for udev-rinari."
- :group 'nxhtml)
-
-(defcustom udev-rinari-dir "~/rinari-svn/"
- "Directory where to put SVN Rinari sources."
- :type 'directory
- :group 'udev-rinari)
-
-(defcustom udev-rinari-load-rinari nil
- "To load or not to load Rinari..."
- :type '(choice (const :tag "Don't load Rinari" nil)
- (const :tag "Load Rinari" t))
- :set (lambda (sym val)
- (set-default sym val)
- (when val
- (let* ((base-dir (expand-file-name "svn/trunk/" udev-rinari-dir))
- (rhtml-dir (expand-file-name "rhtml/" base-dir))
- (test-dir (expand-file-name "test/lisp/" base-dir)))
- (unless (file-directory-p base-dir) (message "Can't find %s" base-dir))
- (unless (file-directory-p rhtml-dir) (message "Can't find %s" rhtml-dir))
- (unless (file-directory-p test-dir) (message "Can't find %s" test-dir))
- (add-to-list 'load-path base-dir)
- (add-to-list 'load-path rhtml-dir)
- (add-to-list 'load-path test-dir))
- (require 'rinari)
- (require 'ruby-mode)))
- :group 'udev-rinari)
-
-(defvar udev-rinari-steps
- '(udev-rinari-fetch
- udev-rinari-fetch-diff
- udev-rinari-check-diff
- ;;udev-rinari-install
- ))
-
-(defvar udev-rinari-update-buffer nil)
-
-(defun udev-rinari-buffer-name (mode)
- "Return a name for current compilation buffer ignoring MODE."
- (udev-buffer-name "*Updating Rinari %s*" udev-rinari-update-buffer mode))
-
-(defun udev-rinari-check-conflicts ()
- "Check if Rinari and ruby-mode already loaded and from where.
-Give an error if they are loaded from somewhere else than
-`udev-rinari-dir' tree."
- (when (featurep 'rinari)
- (let ((old-dir (file-name-directory (car (load-history-filename-element (load-history-regexp "rinari")))))
- (new-dir (expand-file-name "svn/trunk/" udev-rinari-dir)))
- (unless (string= (file-truename old-dir)
- (file-truename new-dir))
- (error "Rinari is already loaded from: %s" old-dir))))
- (when (featurep 'ruby-mode)
- (let ((old-dir (file-name-directory (car (load-history-filename-element (load-history-regexp "ruby-mode")))))
- (new-dir (expand-file-name "svn/trunk/test/lisp/" udev-rinari-dir)))
- (unless (string= (file-truename old-dir)
- (file-truename new-dir))
- (error "Ruby-mode is already loaded from: %s" old-dir))))
- )
-
-(defun udev-rinari-setup-when-finished (log-buffer)
- (let ((inhibit-read-only t))
- (with-current-buffer log-buffer
- (widen)
- (goto-char (point-max))
- (insert "\n\nYou must restart Emacs to load Rinari properly.\n")
- (let ((load-rinari-saved-value (get 'udev-rinari-load-rinari 'saved-value))
- (here (point))
- )
- (if load-rinari-saved-value
- (insert "You have setup to load Rinari the next time you start Emacs.\n\n")
- (insert (propertize "Warning:" 'face 'compilation-warning)
- " You have not setup to load Rinari the next time you start Emacs.\n\n"))
- (insert-button " Setup "
- 'face 'custom-button
- 'action (lambda (btn)
- (interactive)
- (customize-group-other-window 'udev-rinari)))
- (insert " Setup to load Rinari from fetched sources when starting Emacs.")))))
-
-;;;###autoload
-(defun udev-rinari-update ()
- "Fetch and install Rinari from the devel sources.
-To determine where to store the sources and how to start rinari
-see `udev-rinari-dir' and `udev-rinari-load-rinari'."
- (interactive)
- (udev-rinari-check-conflicts)
- (setq udev-rinari-update-buffer (get-buffer-create "*Update Rinari*"))
- (udev-call-first-step udev-rinari-update-buffer udev-rinari-steps
- "Starting updating Rinari from development sources"
- 'udev-rinari-setup-when-finished))
-
-(defvar udev-rinari-fetch-buffer nil)
-
-(defun udev-rinari-fetch (log-buffer)
- "Fetch Rinari from development sources."
- (let* ((default-directory (file-name-as-directory udev-rinari-dir)) ;; fix-me: for emacs bug
- )
- (unless (file-directory-p default-directory)
- (make-directory default-directory))
- (with-current-buffer
- (compilation-start
- "svn checkout http://rinari.rubyforge.org/svn/"
- 'compilation-mode
- 'udev-rinari-buffer-name)
- (setq udev-rinari-fetch-buffer (current-buffer)))))
-
-(defvar udev-rinari-diff-file nil)
-(defvar udev-rinari-fetch-diff-buffer nil)
-
-(defun udev-rinari-fetch-diff (log-buffer)
- "Fetch diff between local Rinari sources and dev repository."
- (let ((must-fetch-diff t))
- (setq udev-rinari-fetch-diff-buffer
- (when must-fetch-diff
- (let* ((default-directory (file-name-as-directory
- (expand-file-name "svn"
- udev-rinari-dir))))
- (setq udev-rinari-diff-file (expand-file-name "../patches.diff"))
- (with-current-buffer
- (compilation-start
- (concat "svn diff > " (shell-quote-argument udev-rinari-diff-file))
- 'compilation-mode
- 'udev-rinari-buffer-name)
- (setq udev-continue-on-error-function 'udev-cvs-diff-continue)
- (current-buffer)))))))
-
-(defun udev-rinari-check-diff (log-buffer)
- "Check output from svn diff command for merge conflicts."
- ;; Fix-me: How can this be checked?
- (when udev-rinari-fetch-diff-buffer
- (let ((buf (find-buffer-visiting udev-rinari-diff-file)))
- (if buf
- (with-current-buffer buf (revert-buffer nil t))
- (setq buf (find-file-noselect udev-rinari-diff-file)))
- (with-current-buffer buf
- (widen)
- (goto-char (point-min))
- (if (search-forward "<<<<<<<" nil t)
- ;; Merge conflict
- (udev-call-next-step udev-rinari-update-buffer 1 nil)
- buf)))))
-
-;; (defun udev-rinari-install ()
-;; "Install Rinari and ruby-mode for use."
-;; (if udev-rinari-load-rinari
-;; (message "Rinari should be loaded now")
-;; (when (y-or-n-p
-;; "You need to set udev-rinari-load-rinari. Do that now? ")
-;; (customize-group-other-window 'udev-rinari)))
-;; nil)
-
-
-(provide 'udev-rinari)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; udev-rinari.el ends here
diff --git a/emacs.d/nxhtml/util/udev.el b/emacs.d/nxhtml/util/udev.el
deleted file mode 100644
index ee9d86a..0000000
--- a/emacs.d/nxhtml/util/udev.el
+++ /dev/null
@@ -1,456 +0,0 @@
-;;; udev.el --- Helper functions for updating from dev sources
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-08-24
-(defconst udev:version "0.5");; Version:
-;; Last-Updated: 2009-01-06 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
- ;; `cus-edit', `cus-face', `cus-load', `cus-start', `wid-edit'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; When you want to fetch and install sources from a repository you
-;; may have to call several async processes and wait for the answer
-;; before calling the next function. These functions may help you with
-;; this.
-;;
-;; See `udev-call-first-step' for more information. Or look in the
-;; file udev-cedet.el for examples.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-(require 'cus-edit)
-
-;;; Control/log buffer
-
-(defvar udev-log-buffer nil
- "Log buffer pointer for sentinel function.")
-(make-variable-buffer-local 'udev-log-buffer)
-
-(defvar udev-is-log-buffer nil
- "This is t if this is an udev log/control buffer.")
-(make-variable-buffer-local 'udev-is-log-buffer)
-
-(defun udev-check-is-log-buffer (buffer)
- "Check that BUFFER is an udev log/control buffer."
- (with-current-buffer buffer
- (unless udev-is-log-buffer
- (error "Internal error, not a log buffer: %s" buffer))))
-
-(defvar udev-this-chain nil)
-(make-variable-buffer-local 'udev-this-chain)
-
-(defvar udev-last-error nil
- "Error found during last step.")
-(make-variable-buffer-local 'udev-last-error)
-
-(defun udev-set-last-error (log-buffer msg)
- (with-current-buffer log-buffer
- (setq udev-last-error msg)))
-
-;;; Chain utils
-
-(defun udev-chain (log-buffer)
- "Return value of `udev-this-chain' in buffer LOG-BUFFER."
- (udev-check-is-log-buffer log-buffer)
- (with-current-buffer log-buffer
- udev-this-chain))
-
-(defun udev-this-step (log-buffer)
- "Return current function to call from LOG-BUFFER."
- (let ((this-chain (udev-chain log-buffer)))
- (caar this-chain)))
-
-(defun udev-goto-next-step (log-buffer)
- "Set next function as current in LOG-BUFFER."
- (let* ((this-chain (udev-chain log-buffer))
- (this-step (car this-chain)))
- (setcar this-chain (cdr this-step))))
-
-(defun udev-num-steps (log-buffer)
- "Return number of steps."
- (length (nth 2 (udev-chain log-buffer))))
-
-(defun udev-step-num (log-buffer)
- "Return current step number."
- (let ((this-chain (udev-chain log-buffer)))
- (when this-chain
- (1+ (- (udev-num-steps log-buffer)
- (length (car this-chain)))))))
-
-(defun udev-finish-function (log-buffer)
- "Return setup function to be called when finished."
- (nth 3 (udev-chain log-buffer)))
-
-
-(defvar udev-control-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map button-buffer-map)
- map))
-
-(define-derived-mode udev-control-mode nil
- "Udev-Src"
- "Mode for udev control buffer."
- (setq show-trailing-whitespace nil)
- (setq buffer-read-only t)
- (nxhtml-menu-mode 1))
-
-;;; Calling steps
-
-;;;###autoload
-(defun udev-call-first-step (log-buffer steps header finish-fun)
- "Set up and call first step.
-Set up buffer LOG-BUFFER to be used for log messages and
-controling of the execution of the functions in list STEPS which
-are executed one after another.
-
-Write HEADER at the end of LOG-BUFFER.
-
-Call first step.
-
-If FINISH-FUN non-nil it should be a function. This is called
-after last step with LOG-BUFFER as parameter."
- ;;(dolist (step steps) (unless (functionp step) (error "Not a known function: %s" step)))
- (switch-to-buffer log-buffer)
- (udev-control-mode)
- (setq udev-is-log-buffer t)
- (let ((this-chain
- (cons nil
- (cons log-buffer
- (cons (copy-tree steps)
- (cons finish-fun nil))))))
- (setcar this-chain (caddr this-chain))
- (setq udev-this-chain this-chain))
- (assert (eq (car steps) (udev-this-step log-buffer)) t)
- (assert (eq finish-fun (udev-finish-function log-buffer)) t)
- (widen)
- (goto-char (point-max))
- (let ((inhibit-read-only t))
- (unless (= (point) (point-min)) (insert "\n\n"))
- (insert header))
- (udev-call-this-step log-buffer nil)
- (current-buffer))
-
-(defvar udev-step-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) ?r] 'udev-rerun-this-step)
- (define-key map [(control ?c) ?c] 'udev-continue-from-this-step)
- (define-key map [(control ?c) ?s] 'udev-goto-this-step-source)
- map))
-
-(defun udev-step-at-point ()
- (get-text-property (point) 'udev-step))
-
-(defun udev-rerun-this-step ()
- "Rerun this step."
- (interactive)
- (let ((this-step (udev-step-at-point)))
- (udev-call-this-step (current-buffer) this-step)))
-
-(defun udev-continue-from-this-step ()
- "Continue from this step."
- (interactive)
- (let ((this-step (udev-step-at-point)))
- (goto-char (point-max))
- (let ((inhibit-read-only t))
- (insert (format "\n\nContinuing from %s..." this-step)))
- (udev-call-this-step (current-buffer) this-step)))
-
-(defun udev-goto-this-step-source ()
- "Find source function for this step."
- (interactive)
- (let ((this-step (udev-step-at-point)))
- (find-function-other-window this-step)))
-
-(defun udev-call-this-step (log-buffer this-step)
- "Call the current function in LOG-BUFFER.
-If this function returns a buffer and the buffer has a process
-then change the process sentinel to `udev-compilation-sentinel'.
-Otherwise continue to call the next function.
-
-Also put a log message in in LOG-BUFFER with a link to the buffer
-returned above if any."
- (setq this-step (or this-step (udev-this-step log-buffer)))
- (with-current-buffer log-buffer
- (setq udev-last-error nil)
- (widen)
- (goto-char (point-max))
- (let* ((inhibit-read-only t)
- here
- buf
- proc)
- (if (not this-step)
- (let ((finish-fun (udev-finish-function log-buffer)))
- (insert (propertize "\nFinished\n" 'face 'compilation-info))
- (when finish-fun
- (funcall finish-fun log-buffer)))
- (insert (format "\nStep %s(%s): "
- (udev-step-num log-buffer)
- (udev-num-steps log-buffer)))
- (setq here (point))
- (insert (pp-to-string this-step))
- (setq buf (funcall this-step log-buffer))
- (when (bufferp buf)
- (make-text-button here (point)
- 'udev-step this-step
- 'keymap udev-step-keymap
- 'buffer buf
- 'help-echo "Push RET to see log buffer, <APPS> for other actions"
- 'action (lambda (btn)
- (display-buffer
- (button-get btn 'buffer))))
- (setq proc (get-buffer-process buf)))
- ;; Setup for next step
- (if (and proc
- (not udev-last-error))
- (progn
- (with-current-buffer buf
- ;; Make a copy here for the sentinel function.
- (setq udev-log-buffer log-buffer)
- (setq udev-orig-sentinel (process-sentinel proc))
- (set-process-sentinel proc 'udev-compilation-sentinel)))
- ;;(message "proc is nil")
- (if udev-last-error
- (insert " "
- (propertize udev-last-error 'face 'compilation-error))
- (udev-call-next-step log-buffer 0 nil)))))))
-
-(defun udev-call-next-step (log-buffer prev-exit-status exit-status-buffer)
- "Go to next step in LOG-BUFFER and call `udev-call-this-step'.
-However if PREV-EXIT-STATUS \(which is the exit status from the
-previous step) is not 0 and there is in EXIT-STATUS-BUFFER no
-`udev-continue-on-error-function' then stop and insert an error
-message in LOG-BUFFER."
- (with-current-buffer log-buffer
- (let ((inhibit-read-only t))
- (widen)
- (goto-char (point-max))
- (insert " ")
- (if (or (= 0 prev-exit-status)
- (with-current-buffer exit-status-buffer
- (when udev-continue-on-error-function
- (funcall udev-continue-on-error-function exit-status-buffer))))
- (progn
- (insert
- (if (= 0 prev-exit-status)
- (propertize "Ok" 'face 'compilation-info)
- (propertize "Warning, check next step" 'face 'compilation-warning)))
- (udev-goto-next-step log-buffer)
- (udev-call-this-step log-buffer nil))
- (insert (propertize "Error" 'face 'compilation-error))))))
-
-
-;;; Sentinel
-
-(defvar udev-orig-sentinel nil
- "Old sentinel function remembered by `udev-call-this-step'.")
-(make-variable-buffer-local 'udev-orig-sentinel)
-
-(defun udev-compilation-sentinel (proc msg)
- "Sentinel to use for processes started by `udev-call-this-step'.
-Check for error messages and call next step. PROC and MSG have
-the same meaning as for `compilation-sentinel'."
- ;;(message "udev-compilation-sentinel proc=%s msg=%s" proc msg)
- (let ((buf (process-buffer proc))
- (exit-status (process-exit-status proc)))
- (with-current-buffer buf
- (when udev-orig-sentinel
- (funcall udev-orig-sentinel proc msg))
- (when (and (eq 'exit (process-status proc))
- (= 0 exit-status))
- ;; Check for errors
- (let ((here (point))
- (err-point 1)
- (has-error nil))
- (widen)
- (goto-char (point-min))
- (setq has-error
- (catch 'found-error
- (while err-point
- (setq err-point
- (next-single-property-change err-point 'face))
- (when err-point
- (let ((face (get-text-property err-point 'face)))
- (when (or (and (listp face)
- (memq 'compilation-error face))
- (eq 'compilation-error face))
- (throw 'found-error t)))))))
- (when has-error
- (setq exit-status 1)
- (goto-char (point-max))
- (let ((inhibit-read-only t))
- (insert (propertize "There were errors" 'font-lock-face 'compilation-error)))
- (udev-set-compilation-end-message buf 'exit (cons "has errors" 1)))
- (goto-char here)
- ))
- (unless (member proc compilation-in-progress)
- (udev-call-next-step udev-log-buffer exit-status (current-buffer))))))
-
-(defun udev-set-compilation-end-message (buffer process-status status)
- "Change the message shown after compilation.
-This is similar to `compilation-end-message' and BUFFER,
-PROCESS-STATUS and STATUS have the same meaning as there."
- (with-current-buffer buffer
- (setq mode-line-process
- (let ((out-string (format ":%s [%s]" process-status (cdr status)))
- (msg (format "%s %s" mode-name
- (replace-regexp-in-string "\n?$" "" (car status)))))
- (message "%s" msg)
- (propertize out-string
- 'help-echo msg 'face (if (> (cdr status) 0)
- 'compilation-error
- 'compilation-info))))))
-
-(defvar udev-continue-on-error-function nil
- "One-time helper to resolve exit status error problem.
-This can be used for example after calling `cvs diff' which
-returns error exit status if there is a difference - even though
-there does not have to be an error.")
-(make-variable-buffer-local 'udev-continue-on-error-function)
-
-
-;;; Convenience functions
-
-(defun udev-buffer-name (fmt log-buffer mode)
- "Return a name for compilation buffer.
-Use format string FMT and buffer LOG-BUFFER, but ignoring MODE."
- (format fmt (when (buffer-live-p log-buffer)
- (udev-this-step log-buffer))))
-
-(defvar udev-this-dir
- (let ((this-file (or load-file-name (buffer-file-name))))
- (file-name-directory this-file)))
-
-(defun udev-batch-compile (emacs-args defdir name-function)
- "Compile elisp code in an inferior Emacs.
-Start Emacs with
-
- emacs -Q -batch EMACS-ARGS
-
-in the default directory DEFDIR.
-
-Set the buffer name for the inferior process with NAME-FUNCTION
-by giving this to `compilation-start'."
- (let ((default-directory (file-name-as-directory defdir))
- (this-emacs (ourcomments-find-emacs)))
- (compilation-start
- (concat this-emacs " -Q -batch " emacs-args)
- 'compilation-mode
- name-function)))
-
-;;; Convenience functions for CVS
-
-(defun udev-fetch-cvs-diff (defdir name-function)
- "Fetch cvs diff in directory DEFDIR.
-Put the diff in file 'your-patches.diff' in DEFDIR.
-Give inferior buffer name with NAME-FUNCTION."
- (let ((default-directory (file-name-as-directory defdir)))
- (with-current-buffer
- (compilation-start
- (concat "cvs diff -b -u > " (shell-quote-argument "your-patches.diff"))
- 'compilation-mode
- name-function)
- (setq udev-continue-on-error-function 'udev-cvs-diff-continue)
- (current-buffer))))
-
-(defun udev-cvs-diff-continue (cvs-diff-buffer)
- "Return non-nil if it is ok to continue.
-Check the output from the `cvs diff' command in buffer
-CVS-DIFF-BUFFER.
-
-The cvs command exits with a failure status if there is a
-difference, which means that it is hard to know whether there was
-an error or just a difference. This function tries to find out."
- (with-current-buffer cvs-diff-buffer
- (let ((here (point))
- (ret t))
- (goto-char (point-min))
- (when (search-forward "cvs [diff aborted]" nil t) (setq ret nil))
- (goto-char (point-min))
- (when (search-forward "merge conflict" nil t) (setq ret t))
- ;; From cvs co command:
- ;; rcsmerge: warning: conflicts during merge
- (goto-char (point-min))
- (when (search-forward "conflicts during merge" nil t) (setq ret t))
- ;; cvs checkout: conflicts found in emacs/lisp/startup.el
- (goto-char (point-min))
- (when (search-forward "conflicts found in" nil t) (setq ret t))
- (goto-char here)
- ret)))
-
-(defun udev-check-cvs-diff (diff-file log-buffer)
- "Check cvs diff output in file DIFF-FILE for merge conflicts.
-Return buffer containing DIFF-FILE."
- (let ((buf (find-buffer-visiting diff-file)))
- ;; Kill buffer to avoid question about revert.
- (when buf (kill-buffer buf))
- (setq buf (find-file-noselect diff-file))
- (with-current-buffer buf
- (widen)
- (let ((here (point)))
- (goto-char (point-min))
- ;; Fix-me: Better pattern:
- (if (search-forward "<<<<<<<" nil t)
- ;; Merge conflict
- (with-current-buffer log-buffer
- (let ((inhibit-read-only t))
- (setq udev-last-error "Error: merge conflict")))
- (goto-char here))))
- buf))
-
-;;(setq compilation-scroll-output t)
-;;(add-to-list 'compilation-error-regexp-alist 'cvs)
-;;(setq compilation-error-regexp-alist (delq 'cvs compilation-error-regexp-alist))
-
-;;; Misc
-
-(defun udev-send-buffer-process (str)
- (interactive "sString to send to process: ")
- (let* ((procs (process-list))
- (proc (catch 'found
- (dolist (p procs)
- (when (eq (process-buffer p) (current-buffer))
- (throw 'found p))))))
- (unless proc (error "Can't find process in buffer"))
- ;;(message "str=%s" str)
- ;;(message "proc=%s" proc)
- (process-send-string proc (concat str "\n"))
- ))
-
-
-(provide 'udev)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; udev.el ends here
diff --git a/emacs.d/nxhtml/util/useful-commands.el b/emacs.d/nxhtml/util/useful-commands.el
deleted file mode 100644
index 414d2f7..0000000
--- a/emacs.d/nxhtml/util/useful-commands.el
+++ /dev/null
@@ -1,63 +0,0 @@
-;;; useful-commands.el --- Menu with useful Emacs commands
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-09-29T12:56:24+0200 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(defvar useful-commands-definitions nil
- "Defines the menus using a org like syntax.
-* Search and Replace
-** Occur in multiple buffers `multi-occur'
-** Grep in Directory `lgrep'
-** Occur `occur'
-** Grep in Directory Tree `rgrep'
-* END
-"
-)
-
-(defun useful-commands-build-menu ()
- )
-
-(provide 'useful-commands)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; useful-commands.el ends here
diff --git a/emacs.d/nxhtml/util/viper-tut.el b/emacs.d/nxhtml/util/viper-tut.el
deleted file mode 100644
index a941045..0000000
--- a/emacs.d/nxhtml/util/viper-tut.el
+++ /dev/null
@@ -1,1009 +0,0 @@
-;;; viper-tut.el --- Viper tutorial
-;;
-;; Author: Lennart Borgman
-;; Created: Fri Sep 08 2006
-(defconst viper-tut:version "0.2") ;;Version: 0.2
-;; Last-Updated:
-;; Keywords:
-;; Compatibility: Emacs 22
-;;
-;; Features that might be required by this library:
-;;
-;; `button', `cus-edit', `cus-face', `cus-load', `cus-start',
-;; `help-mode', `tutorial', `view', `wid-edit'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'mumamo))
-(eval-when-compile (require 'ourcomments-util))
-(require 'tutorial)
-(require 'cus-edit)
-
-(defface viper-tut-header-top
- '((t (:foreground "black" :background "goldenrod3")))
- "Face for headers."
- :group 'web-vcs)
-
-(defface viper-tut-header
- '((t (:foreground "black" :background "goldenrod2" :height 1.8)))
- "Face for headers."
- :group 'web-vcs)
-
-(defvar tutorial--tab-map
- (let ((map (make-sparse-keymap)))
- (define-key map [tab] 'forward-button)
- (define-key map [(shift tab)] 'backward-button)
- (define-key map [(meta tab)] 'backward-button)
- map)
- "Keymap that allows tabbing between buttons.")
-
-(defconst viper-tut--emacs-part 6)
-
-(defconst viper-tut--default-keys
- `(
-;;;;;;;;;;;;;; Part 1
- ;; ^D Move DOWN one half-screen
- ;;(viper-scroll-up [(control ?d)])
- (viper-scroll-up [?\C-d])
-
- ;; ^U Move UP one half-screen
- ;;(viper-scroll-down [(control ?u)])
- (viper-scroll-down [?\C-u])
-
- ;; h Move left one character
- (viper-backward-char [?h])
-
- ;; j Move down one line
- (viper-next-line [?j])
-
- ;; k Move up one line
- (viper-previous-line [?k])
-
- ;; l Move right one character
- (viper-forward-char [?l])
-
- ;; dd DELETE one line
- (viper-command-argument [?d])
-
- ;; x X-OUT one character
- (viper-delete-char [?x])
-
- ;; u UNDO last change
- (viper-undo [?u])
-
- ;; :q!<RETURN> QUIT without saving changes
- (viper-ex [?:])
-
- ;; ZZ Exit and save any changes
- (viper-save-kill-buffer [?Z ?Z])
-
- ;; o OPEN a line for inserting text
- (viper-open-line [?o])
-
- ;; i INSERT starting at the cursor
- (viper-insert [?i])
-
- ;; ESC ESCAPE from insert mode
- ;;(viper-intercept-ESC-key [(escape)])
- ;(viper-intercept-ESC-key [27])
- (viper-intercept-ESC-key [escape])
- ;; chagned-keys=
- ;; (([27]
- ;; viper-intercept-ESC-key
- ;; viper-intercept-ESC-key
- ;; <escape>
- ;; (more info current-binding (keymap (118 . cua-repeat-replace-region)) viper-intercept-ESC-key [27] <escape>)))
-
-
-;;;;;;;;;;;;;; Part 2
- ;; w Move to the beginning of the next WORD
- (viper-forward-word [?w])
- ;; e Move to the END of the next word
- (viper-end-of-word [?e])
- ;; b Move BACK to the beginning to the previous word
- (viper-backward-word [?b])
-
- ;; $ Move to the end of the line
- (viper-goto-eol [?$])
-
- ;; ^ Move to the first non-white character on the line
- (viper-bol-and-skip-white [?^])
-
- ;; 0 Move to the first column on the line (column zero)
- (viper-beginning-of-line [?0])
- ;; #| Move to an exact column on the line (column #) e.g. 5| 12|
- (viper-goto-col [?|])
-
- ;; f char FIND the next occurrence of char on the line
- (viper-find-char-forward [?f])
- ;; t char Move 'TIL the next occurrence of char on the line
- (viper-goto-char-forward [?t])
-
- ;; F char FIND the previous occurrence of char on the line
- (viper-find-char-backward [?F])
- ;; T char Move 'TIL the previous occurrence of char on the line
- (viper-goto-char-backward [?T])
-
- ;; ; Repeat the last f, t, F, or T
- (viper-repeat-find [?\;])
- ;; , Reverse the last f, t, F, or T
- (viper-repeat-find-opposite [?,])
-
- ;; % Show matching () or {} or []
- (viper-exec-mapped-kbd-macro [?%])
-
- ;; H Move to the HIGHEST position in the window
- (viper-window-top [?H])
- ;; M Move to the MIDDLE position in the window
- (viper-window-middle [?M])
- ;; L Move to the LOWEST position in the window
- (viper-window-bottom [?L])
-
- ;; m char MARK this location and name it char
- (viper-mark-point [?m])
- ;; ' char (quote character) return to line named char
- ;; '' (quote quote) return from last movement
- (viper-goto-mark-and-skip-white [?'])
-
- ;; G GO to the last line in the file
- ;; #G GO to line #. (e.g., 3G , 5G , 175G )
- (viper-goto-line [?G])
-
- ;; { (left brace) Move to the beginning of a paragraph
- ;; } (right brace) Move to the end of a paragraph
- (viper-backward-paragraph [?{])
- (viper-forward-paragraph [?}])
-
- ;; ( (left paren) Move to the beginning of a sentence
- ;; ) (right paren) Move to the beginning of the next sentence
- (viper-backward-sentence [?\(])
- (viper-forward-sentence [?\)])
-
- ;; [[ Move to the beginning of a section
- ;; ]] Move to the end of a section
- (viper-brac-function [?\[])
- (viper-ket-function [?\]])
-
- ;; /string Find string looking forward
- (viper-exec-mapped-kbd-macro [?/])
- ;; ?string Find string looking backward
- (viper-search-backward [??])
-
- ;; n Repeat last / or ? command
- ;; N Reverse last / or ? command
- (viper-search-next [?n])
- (viper-search-Next [?N])
-
-
-;;;;;;;;;;;;;; Part 3
-
- ;; #movement repeat movement # times
- (viper-digit-argument [?1])
- (viper-digit-argument [?2])
- (viper-digit-argument [?3])
- (viper-digit-argument [?4])
- (viper-digit-argument [?5])
- (viper-digit-argument [?6])
- (viper-digit-argument [?7])
- (viper-digit-argument [?8])
- (viper-digit-argument [?9])
-
- ;; dmovement DELETE to where "movement" command specifies
- ;; d#movement DELETE to where the #movement command specifies
- ;; d runs the command viper-command-argument
-
- ;; ymovement YANK to where "movement" command specifies
- ;; y#movement YANK to where the #movement command specifies
- (viper-command-argument [?y])
-
- ;; P (upper p) PUT the contents of the buffer before the cursor
- ;; p (lower p) PUT the contents of the buffer after the cursor
- (viper-put-back [?p])
- (viper-Put-back [?P])
-
- ;; "#P (upper p) PUT contents of buffer # before the cursor
- ;; "#p (lower p) PUT contents of buffer # after the cursor
- ;;
- ;; "aDELETE DELETE text into buffer a
- ;; "aYANK YANK text into buffer a
- ;; "aPUT PUT text from named buffer a
- (viper-command-argument [?\"])
-
- ;; :w<RETURN> WRITE contents of the file (without quitting)
-
- ;; :e filename<RETURN> Begin EDITing the file called "filename"
-
-
-
-;;;;;;;;;;;;;; Part 4
-
-
- ;; o OPEN a line below the cursor
- ;; O OPEN a line above the cursor
- (viper-open-line [?o])
- (viper-Open-line [?O])
-
- ;; i INSERT starting before the cursor
- ;; I INSERT at the beginning of the line
- (viper-insert [?i])
- (viper-Insert [?I])
-
- ;; a APPEND starting after the cursor
- ;; A APPEND at the end of the line
- (viper-append [?a])
- (viper-Append [?A])
-
- ;; ESC ESCAPE from insert mode
- (viper-intercept-ESC-key [(escape)])
-
- ;; J JOIN two lines
- (viper-join-lines [?J])
-
- ;; #s SUBSTITUTE for # characters
- ;; #S SUBSTITUTE for # whole lines
- (viper-substitute [?s])
- (viper-substitute-line [?S])
-
- ;; r REPLACE character (NO need to press ESC)
- ;; R enter over-type mode
- (viper-replace-char [?r])
- (viper-overwrite [?R])
-
- ;; cmovement CHANGE to where the movement commands specifies
- (viper-command-argument [?c])
-
-
-;;;;;;;;;;;;;; Part 5
-
- ;; ~ (tilde) Convert case of current character
- (viper-toggle-case [?~])
- ;; U (upper u) UNDO all changes made to the current line
- ;; not implemented
- ;;(viper-undo [?U])
-
- ;; . (dot) repeat last change
- (viper-repeat [?.])
-
- ;; ^F Move FORWARD one full-screen
- ;; ^B Move BACKWARD one full-screen
- ;;(viper-scroll-screen [(control ?f)])
- (viper-scroll-screen [?\C-f])
- ;;(viper-scroll-screen-back [(control ?b)])
- (viper-scroll-screen-back [?\C-b])
-
- ;; ^E Move the window down one line without moving cursor
- ;; ^Y Move the window up one line without moving cursor
- ;;(viper-scroll-up-one [(control ?e)])
- (viper-scroll-up-one [?\C-e])
- ;;(viper-scroll-down-one [(control ?y)])
- (viper-scroll-down-one [?\C-y])
-
- ;; z<RETURN> Position the current line to top of window
- ;; z. Position the current line to middle of window
- ;; z- Position the current line to bottom of window
- (viper-line-to-top "z\C-m")
- (viper-line-to-middle [?z ?.])
- (viper-line-to-bottom [?z ?-])
-
- ;; ^G Show status of current file
- ;;(viper-info-on-file [(control ?c)(control ?g)])
- (viper-info-on-file [?\C-c ?\C-g])
- ;; ^L Refresh screen
- ;;(recenter [(control ?l)])
- (recenter-top-bottom [?\C-l])
-
- ;; !}fmt Format the paragraph, joining and filling lines to
- ;; !}sort Sort lines of a paragraph alphabetically
- (viper-command-argument [?!])
-
- ;; >movement Shift right to where the movement command specifies
- ;; <movement Shift left to where the movement command specifies
- (viper-command-argument [?>])
- (viper-command-argument [?<])
-
- ))
-
-(defun viper-tut--detailed-help (button)
- "Give detailed help about changed keys."
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'viper-tut--detailed-help button)
- (interactive-p))
- (with-current-buffer (help-buffer)
- (let* ((tutorial-buffer (button-get button 'tutorial-buffer))
- ;;(tutorial-arg (button-get button 'tutorial-arg))
- (explain-key-desc (button-get button 'explain-key-desc))
- (part (button-get button 'part))
- (changed-keys (with-current-buffer tutorial-buffer
- (let ((tutorial--lang "English"))
- (tutorial--find-changed-keys
- (if (= part viper-tut--emacs-part)
- tutorial--default-keys
- viper-tut--default-keys))))))
- (when changed-keys
- (insert
- "The following key bindings used in the tutorial had been changed\n"
- (if (= part viper-tut--emacs-part)
- "from Emacs default in the "
- "from Viper default in the ")
- (buffer-name tutorial-buffer) " buffer:\n\n" )
- (let ((frm " %-9s %-27s %-11s %s\n"))
- (insert (format frm "Key" "Standard Binding" "Is Now On" "Remark")))
- (dolist (tk changed-keys)
- (let* ((def-fun (nth 1 tk))
- (key (nth 0 tk))
- (def-fun-txt (nth 2 tk))
- (where (nth 3 tk))
- (remark (nth 4 tk))
- (rem-fun (command-remapping def-fun))
- (key-txt (key-description key))
- (key-fun (with-current-buffer tutorial-buffer (key-binding key)))
- tot-len)
- (unless (eq def-fun key-fun)
- ;; Insert key binding description:
- (when (string= key-txt explain-key-desc)
- (put-text-property 0 (length key-txt) 'face '(:background "yellow") key-txt))
- (insert " " key-txt " ")
- (setq tot-len (length key-txt))
- (when (> 9 tot-len)
- (insert (make-string (- 9 tot-len) ? ))
- (setq tot-len 9))
- ;; Insert a link describing the old binding:
- (insert-button def-fun-txt
- 'help-echo (format "Describe function '%s" def-fun-txt)
- 'action `(lambda(button) (interactive)
- (describe-function ',def-fun))
- 'follow-link t)
- (setq tot-len (+ tot-len (length def-fun-txt)))
- (when (> 36 tot-len)
- (insert (make-string (- 36 tot-len) ? )))
- (when (listp where)
- (setq where "list"))
- ;; Tell where the old binding is now:
- (insert (format " %-11s " where))
- ;; Insert a link with more information, for example
- ;; current binding and keymap or information about
- ;; cua-mode replacements:
- (insert-button (car remark)
- 'help-echo "Give more information about the changed key binding"
- 'action `(lambda(b) (interactive)
- (let ((value ,(cdr remark)))
- ;; Fix-me:
- (tutorial--describe-nonstandard-key value)))
- 'follow-link t)
- (insert "\n")))))
-
-
-
- (insert "
-It is legitimate to change key bindings, but changed bindings do not
-correspond to what the tutorial says.
-\(See also " )
- (insert-button "Key Binding Conventions"
- 'action
- (lambda(button) (interactive)
- (info
- "(elisp) Key Binding Conventions")
- (message "Type C-x 0 to close the new window"))
- 'follow-link t)
- (insert ".)\n\n")
- (with-no-warnings (print-help-return-message))))))
-
-
-(defvar viper-tut--part nil
- "Viper tutorial part.")
-(make-variable-buffer-local 'viper-tut--part)
-
-(defun viper-tut--saved-file ()
- "File name in which to save tutorials."
- (let* ((file-name
- (file-name-nondirectory (viper-tut--file viper-tut--part)))
- (ext (file-name-extension file-name)))
- (when (or (not ext)
- (string= ext ""))
- (setq file-name (concat file-name ".tut")))
- (expand-file-name file-name (tutorial--saved-dir))))
-
-(defun viper-tut--save-tutorial ()
- "Save the tutorial buffer.
-This saves the part of the tutorial before and after the area
-showing changed keys. It also saves point position and the
-position where the display of changed bindings was inserted.
-
-Do not save anything if not `viper-mode' is enabled in the
-tutorial buffer."
- ;; This runs in a hook so protect it:
- (condition-case err
- (when (boundp 'viper-mode-string)
- (tutorial--save-tutorial-to (viper-tut--saved-file)))
- (error (warn "Error saving tutorial state: %s" (error-message-string err)))))
-
-
-(defvar viper-tut--parts
- '(
- (0 "0intro" "Introduction")
- (1 "1basics" "Basic Editing")
- (2 "2moving" "Moving Efficiently")
- (3 "3cutpaste" "Cutting and Pasting")
- (4 "4inserting" "Inserting Techniques")
- (5 "5tricks" "Tricks and Timesavers")
- (6 "(no file)" "Emacs tutorial for Viper Users")
- ))
-
-(defcustom viper-tut-directory
- (let* ((this-file (if load-file-name
- load-file-name
- (buffer-file-name)))
- (this-dir (file-name-directory this-file)))
- (file-name-as-directory
- (expand-file-name "../etc/viper-tut" this-dir)))
- "Directory where the Viper tutorial files lives."
- :type 'directory
- :group 'viper)
-
-(defun viper-tut--file(part)
- "Get file name for part."
- (let ((tut-file))
- (mapc (lambda(rec)
- (when (= part (nth 0 rec))
- (setq tut-file
- (if (= part viper-tut--emacs-part)
- (let ((tf (expand-file-name (get-language-info "English" 'tutorial) tutorial-directory)))
- (unless (file-exists-p tf)
- (error "Can't find the English tutorial file for Emacs: %S" tf))
- tf)
- (expand-file-name (nth 1 rec) viper-tut-directory)))))
- viper-tut--parts)
- tut-file))
-
-(defun viper-tut-viper-is-on ()
- ;;(message "viper-tut-viper-is-on, vms=%s, cb=%s" (boundp 'viper-mode-string) (current-buffer))
- ;;(boundp 'viper-mode-string)
- (boundp 'viper-current-state))
-
-(defun viper-tut--display-changes (changed-keys part)
- "Display changes to some default Viper key bindings.
-If some of the default key bindings that the Viper tutorial
-depends on have been changed then display the changes in the
-tutorial buffer with some explanatory links.
-
-CHANGED-KEYS should be a list in the format returned by
-`tutorial--find-changed-keys'."
- (when (or changed-keys
- (viper-tut-viper-is-on))
- ;; Need the custom button face for viper buttons:
- ;;(when (and (boundp 'viper-mode) viper-mode) (require 'cus-edit))
- (goto-char tutorial--point-before-chkeys)
- (let* ((start (point))
- end
- (head
- (if (viper-tut-viper-is-on)
- (if (= part viper-tut--emacs-part)
- "
- NOTICE: This part of the Viper tutorial runs the Emacs tutorial.
- Several keybindings are changed from Emacs default (either
- because of Viper or some other customization) and doesn't
- correspond to the tutorial.
-
- We have inserted colored notices where the altered commands have
- been introduced. If you change Viper state (vi state, insert
- state, etc) these notices will be changed to reflect the new
- state. ["
- "
- NOTICE: The main purpose of the Viper tutorial is to teach you
- the most important vi commands (key bindings). However, your
- Emacs has been customized by changing some of these basic Viper
- editing commands, so it doesn't correspond to the tutorial. We
- have inserted colored notices where the altered commands have
- been introduced. [")
- "
- NOTICE: You have currently not turned on Viper. Nothing in this
- tutorial \(the Viper Tutorial\) will work unless you do that. ["
- ))
- (head2 (if (viper-tut-viper-is-on)
- (get-lang-string tutorial--lang 'tut-chgdhead2)
- "More information")))
- (when (and head head2)
- (insert head)
- (insert-button head2
- 'tutorial-buffer
- (current-buffer)
- ;;'tutorial-arg arg
- 'part part
- 'action
- (if (viper-tut-viper-is-on)
- 'viper-tut--detailed-help
- 'go-home-blaha)
- 'follow-link t
- 'echo "Click for more information"
- 'face '(:inherit link :background "yellow"))
- (insert "]\n\n" )
- (when changed-keys
- (dolist (tk changed-keys)
- (let* ((def-fun (nth 1 tk))
- (key (nth 0 tk))
- (def-fun-txt (nth 2 tk))
- (where (nth 3 tk))
- (remark (nth 4 tk))
- (rem-fun (command-remapping def-fun))
- (key-txt (key-description key))
- (key-fun (key-binding key))
- tot-len)
- (unless (eq def-fun key-fun)
- ;; Mark the key in the tutorial text
- (unless (string= "Same key" where)
- (let* ((here (point))
- (key-desc (key-description key))
- (vi-char (= 1 (length key-desc)))
- vi-char-pos
- hit)
- (when (string= "RET" key-desc)
- (setq key-desc "Return"))
- (when (string= "DEL" key-desc)
- (setq key-desc "Delback"))
- (while (if (not vi-char)
- (unless hit ;; Only tell once
- (setq hit t)
- (re-search-forward
- (concat "[^[:alpha:]]\\("
- (regexp-quote key-desc)
- "\\)[^[:alpha:]]") nil t))
- (setq vi-char-pos
- (next-single-property-change
- (point) 'vi-char)))
- (if (not vi-char)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'tutorial-remark nil) ;;'only-colored)
- (put-text-property (match-beginning 0)
- (match-end 0)
- 'face '(:background "yellow"))
- (goto-char (1+ vi-char-pos))
- (setq hit (string= key-desc (char-to-string (char-before))))
- (when hit
- (put-text-property vi-char-pos (1+ vi-char-pos)
- 'face '(:background "yellow"))))
- (when hit
- (forward-line)
- (let ((s (get-lang-string tutorial--lang 'tut-chgdkey))
- (s2 (get-lang-string tutorial--lang 'tut-chgdkey2))
- (start (point))
- end)
- ;; key-desc " has been rebound, but you can use " where " instead ["))
- (when (and s s2)
- (when (or (not where) (= 0 (length where)))
- (setq where (concat "`M-x " def-fun-txt "'")))
- (setq s (format s key-desc where s2))
- (insert s " [")
- (insert-button s2
- 'tutorial-buffer
- (current-buffer)
- ;;'tutorial-arg arg
- 'part part
- 'action
- 'viper-tut--detailed-help
- 'explain-key-desc key-desc
- 'follow-link t
- 'face '(:inherit link :background "yellow"))
- (insert "] **")
- (insert "\n")
- (setq end (point))
- (put-text-property start end 'local-map tutorial--tab-map)
- (put-text-property start end 'tutorial-remark t)
- (put-text-property start end
- 'face '(:background "yellow" :foreground "#c00"))
- (put-text-property start end 'read-only t)))))
- (goto-char here)))))))
-
-
- (setq end (point))
- ;; Make the area with information about change key
- ;; bindings stand out:
- (put-text-property start end
- 'face
- ;; The default warning face does not
- ;;look good in this situation. Instead
- ;;try something that could be
- ;;recognized from warnings in normal
- ;;life:
- ;; 'font-lock-warning-face
- (list :background "yellow" :foreground "#c00"))
- ;; Make it possible to use Tab/S-Tab between fields in
- ;; this area:
- (put-text-property start end 'local-map tutorial--tab-map)
- (put-text-property start end 'tutorial-remark t)
- (setq tutorial--point-after-chkeys (point-marker))
- ;; Make this area read-only:
- (put-text-property start end 'read-only t)))))
-
-(defun viper-tut--at-change-state()
- (condition-case err
- (progn
- (let ((inhibit-read-only t)
- (here (point)))
- ;; Delete the remarks:
- ;;(tutorial--remove-remarks)
- ;; Add them again
- ;;(viper-tut--add-remarks)
- (goto-char here)
- )
- )
- (error (message "error in viper-tut--at-change-state: %s" (error-message-string err)))))
-
-
-;;;###autoload
-(defun viper-tutorial(part &optional dont-ask-for-revert)
- "Run a tutorial for Viper.
-
-A simple classic tutorial in 5 parts that have been used by many
-people starting to learn vi keys. You may learn enough to start
-using `viper-mode' in Emacs.
-
-Some people find that vi keys helps against repetetive strain
-injury, see URL
-
- `http://www.emacswiki.org/emacs/RepeatedStrainInjury'.
-
-Note: There might be a few clashes between vi key binding and
-Emacs standard key bindings. You will be notified about those in
-the tutorial. Even more, if your own key bindings comes in
-between you will be notified about that too."
- (interactive (list
- ;; (condition-case nil
- ;; (widget-choose "The following viper tutorials are available"
- ;; (mapcar (lambda(rec)
- ;; (cons (nth 2 rec) (nth 0 rec)))
- ;; viper-tut--parts))
- ;; (error nil))
- 0
- ))
- (if (not (boundp 'viper-current-state))
- (let ((prompt
- "
- You can not run the Viper tutorial in this Emacs because you
- have not enabled Viper.
-
- Do you want to run the Viper tutorial in a new Emacs? "))
- (if (y-or-n-p prompt)
- (let ((ret (funcall 'emacs--no-desktop
- "-eval"
- (concat
- "(progn"
- " (setq viper-mode t)"
- " (require 'viper)"
- " (require 'viper-tut)"
- " (call-interactively 'viper-tutorial))"))))
- (message "Starting Viper tutorial in a new Emacs"))
- (message "Viper tutorial aborted by user")))
-
- (let* ((filename (viper-tut--file part))
- ;; Choose a buffer name including the language so that
- ;; several languages can be tested simultaneously:
- (tut-buf-name "Viper TUTORIAL")
- (old-tut-buf (get-buffer tut-buf-name))
- (old-tut-part (when old-tut-buf
- (with-current-buffer old-tut-buf
- viper-tut--part)))
- (old-tut-win (when old-tut-buf (get-buffer-window old-tut-buf t)))
- (old-tut-is-ok (when old-tut-buf
- (and
- (= part old-tut-part)
- (not (buffer-modified-p old-tut-buf)))))
- old-tut-file
- (old-tut-point 1))
- (unless (file-exists-p filename) (error "Can't fine %s" filename))
- (setq tutorial--point-after-chkeys (point-min))
- ;; Try to display the tutorial buffer before asking to revert it.
- ;; If the tutorial buffer is shown in some window make sure it is
- ;; selected and displayed:
- (if old-tut-win
- (raise-frame
- (window-frame
- (select-window (get-buffer-window old-tut-buf t))))
- ;; Else, is there an old tutorial buffer? Then display it:
- (when old-tut-buf
- (switch-to-buffer old-tut-buf)))
- ;; Use whole frame for tutorial
- ;;(delete-other-windows)
- ;; If the tutorial buffer has been changed then ask if it should
- ;; be reverted:
- (when (and old-tut-buf
- (not old-tut-is-ok)
- (= part old-tut-part))
- (setq old-tut-is-ok
- (if dont-ask-for-revert
- nil
- (not (y-or-n-p
- "You have changed the Tutorial buffer. Revert it? ")))))
- ;; (Re)build the tutorial buffer if it is not ok
- (unless old-tut-is-ok
- (switch-to-buffer (get-buffer-create tut-buf-name))
- (unless old-tut-buf (text-mode))
- (setq viper-tut--part part)
- (setq old-tut-file (file-exists-p (viper-tut--saved-file)))
- (when (= part 0) (setq old-tut-file nil)) ;; You do not edit in the intro
- (setq buffer-read-only nil)
- (let ((inhibit-read-only t)) ;; For the text property
- (erase-buffer))
- (message "Preparing Viper tutorial ...") (sit-for 0)
-
- ;; Do not associate the tutorial buffer with a file. Instead use
- ;; a hook to save it when the buffer is killed.
- (setq buffer-auto-save-file-name nil)
- (add-hook 'kill-buffer-hook 'viper-tut--save-tutorial nil t)
-
- ;; Insert the tutorial. First offer to resume last tutorial
- ;; editing session.
- (when dont-ask-for-revert
- (setq old-tut-file nil))
- (when old-tut-file
- (setq old-tut-file
- (y-or-n-p
- (format
- "Resume your last saved Viper tutorial part %s? "
- part))))
- (if old-tut-file
- (progn
- (insert-file-contents (viper-tut--saved-file))
- (goto-char (point-min))
- (setq old-tut-point
- (string-to-number
- (buffer-substring-no-properties
- (line-beginning-position) (line-end-position))))
- (forward-line)
- (setq tutorial--point-before-chkeys
- (string-to-number
- (buffer-substring-no-properties
- (line-beginning-position) (line-end-position))))
- (forward-line)
- (delete-region (point-min) (point))
- (goto-char tutorial--point-before-chkeys)
- (setq tutorial--point-before-chkeys (point-marker)))
- ;;(insert-file-contents (expand-file-name filename data-directory))
- (insert-file-contents filename)
- (viper-tut--replace-links)
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "'\\([][+a-zA-Z~<>!;,:.'\"%/?(){}$^0|-]\\)'" nil t)
- (let ((matched-char (match-string 1))
- (inhibit-read-only t))
- (put-text-property 0 1 'vi-char t matched-char)
- (put-text-property 0 1 'face '(:foreground "blue") matched-char)
- (replace-match matched-char))))
- (forward-line)
- (setq tutorial--point-before-chkeys (point-marker)))
-
- (viper-tut--add-remarks)
-
- (goto-char (point-min))
- (when old-tut-file
- ;; Just move to old point in saved tutorial.
- (let ((old-point
- (if (> 0 old-tut-point)
- (- old-tut-point)
- (+ old-tut-point tutorial--point-after-chkeys))))
- (when (< old-point 1)
- (setq old-point 1))
- (goto-char old-point)))
-
- (viper-tut-fix-header-and-footer)
-
- ;; Clear message:
- (message "") (sit-for 0)
-
- (setq buffer-undo-list nil)
- (set-buffer-modified-p nil))
- (setq buffer-read-only (= 0 part)))))
-
-;;(tutorial--find-changed-keys '((scroll-up [?\C-v])))
-(defun viper-tut--add-remarks()
- ;; Check if there are key bindings that may disturb the
- ;; tutorial. If so tell the user.
- (let* ((tutorial--lang "English")
- (changed-keys
- (if (= viper-tut--part viper-tut--emacs-part)
- (tutorial--find-changed-keys tutorial--default-keys)
- (tutorial--find-changed-keys viper-tut--default-keys))))
- (viper-tut--display-changes changed-keys viper-tut--part))
-
- (if (= viper-tut--part viper-tut--emacs-part)
- (progn
- (add-hook 'viper-vi-state-hook 'viper-tut--at-change-state nil t)
- (add-hook 'viper-insert-state-hook 'viper-tut--at-change-state nil t)
- (add-hook 'viper-replace-state-hook 'viper-tut--at-change-state nil t)
- (add-hook 'viper-emacs-state-hook 'viper-tut--at-change-state nil t)
- )
- (remove-hook 'viper-vi-state-hook 'viper-tut--at-change-state t)
- (remove-hook 'viper-insert-statehook 'viper-tut--at-change-state t)
- (remove-hook 'viper-replace-state-hook 'viper-tut--at-change-state t)
- (remove-hook 'viper-emacs-state-hook 'viper-tut--at-change-state t)
- ))
-
-(defun viper-tut-fix-header-and-footer ()
- (save-excursion
- (goto-char (point-min))
- (add-text-properties (point) (1+ (line-end-position))
- '( read-only t face viper-tut-header))
- (goto-char (point-min))
- (viper-tut--insert-goto-row nil)
- (goto-char (point-max))
- (viper-tut--insert-goto-row t)))
-
-(defun viper-tut--insert-goto-row(last)
- (let ((start (point))
- end)
- (insert " Go to part: ")
- (dolist (rec viper-tut--parts)
- (let ((n (nth 0 rec))
- (file (nth 1 rec))
- (title (nth 2 rec)))
- (if (= n viper-tut--part)
- (insert (format "%s" n))
- (insert-button (format "%s" n)
- 'help-echo (concat "Go to part: " title)
- 'follow-link t
- 'action
- `(lambda (button)
- (viper-tutorial ,n t))))
- (insert " ")))
- (insert " ")
- (insert-button "Exit Tutorial"
- 'help-echo "Exit tutorial and close tutorial buffer"
- 'follow-link t
- 'action
- (lambda (button)
- (kill-buffer (current-buffer))))
- (unless last (insert "\n"))
- (setq end (point))
- (put-text-property start end 'local-map tutorial--tab-map)
- (put-text-property start end 'tutorial-remark t)
- (put-text-property start end
- 'face 'viper-tut-header-top)
- (put-text-property start end 'read-only t)))
-
-(defun viper-tut--replace-links()
- "Replace markers for links with actual links."
- (let ((re-links (regexp-opt '("VIPER-MANUAL"
- "README-FILE"
- "DIGIT-ARGUMENT"
- "KILL-BUFFER"
- "ISEARCH-FORWARD"
- "UNIVERSAL-ARGUMENT"
- "SEARCH-COMMANDS"
- "R-AND-R"
- "CUA-MODE"
- "KEYBOARD-MACROS"
- "VIPER-TOGGLE-KEY"
- "* EMACS-NOTICE:")))
- (case-fold-search nil)
- (inhibit-read-only t))
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward re-links nil t)
- (let ((matched (match-string 0))
- start
- end)
- (replace-match "")
- (setq start (point))
- (cond
- ((string= matched "VIPER-TOGGLE-KEY")
- (insert-button "viper-toggle-key"
- 'action
- (lambda(button) (interactive)
- (describe-variable 'viper-toggle-key))
- 'follow-link t))
- ((string= matched "CUA-MODE")
- (insert-button "cua-mode"
- 'action
- (lambda(button) (interactive)
- (describe-function 'cua-mode))
- 'follow-link t))
- ((string= matched "ISEARCH-FORWARD")
- (insert-button "isearch-forward"
- 'action
- (lambda(button) (interactive)
- (describe-function 'isearch-forward))
- 'follow-link t))
- ((string= matched "KILL-BUFFER")
- (insert-button "kill-buffer"
- 'action
- (lambda(button) (interactive)
- (describe-function 'kill-buffer))
- 'follow-link t))
- ((string= matched "UNIVERSAL-ARGUMENT")
- (insert-button "universal-argument"
- 'action
- (lambda(button) (interactive)
- (describe-function 'universal-argument))
- 'follow-link t))
- ((string= matched "DIGIT-ARGUMENT")
- (insert-button "digit-argument"
- 'action
- (lambda(button) (interactive)
- (describe-function 'digit-argument))
- 'follow-link t))
- ((string= matched "* EMACS-NOTICE:")
- (insert "* Emacs NOTICE:")
- (while (progn
- (forward-line 1)
- (not (looking-at "^$"))))
- (put-text-property start (point)
- 'face '(:background
- "#ffe4b5"
- :foreground "#999999"))
- (put-text-property start (point) 'read-only t)
- )
- ((string= matched "SEARCH-COMMANDS")
- (insert-button "search commands"
- 'action
- (lambda(button) (interactive)
- (info-other-window "(emacs) Search")
- (message "Type C-x 0 to close the new window"))
- 'follow-link t))
- ((string= matched "KEYBOARD-MACROS")
- (insert-button "keyboard macros"
- 'action
- (lambda(button) (interactive)
- (info-other-window "(emacs) Keyboard Macros")
- (message "Type C-x 0 to close the new window"))
- 'follow-link t))
- ((string= matched "VIPER-MANUAL")
- (insert-button "Viper manual"
- 'action
- (lambda(button) (interactive)
- (info-other-window "(viper)")
- (message "Type C-x 0 to close the new window"))
- 'follow-link t))
- ((string= matched "R-AND-R")
- (insert-button "r and R"
- 'action
- (lambda(button) (interactive)
- (info-other-window "(viper) Basics")
- (message "Type C-x 0 to close the new window"))
- 'follow-link t))
- ((string= matched "README-FILE")
- (insert-button "README file"
- 'action
- (lambda(button) (interactive)
- (find-file-other-window (expand-file-name "README" viper-tut-directory))
- (message "Type C-x 0 to close the new window"))
- 'follow-link t))
- (t
- (error "Unmatched text: %s" matched)))
- (put-text-property start (point) 'tutorial-remark t)
- (put-text-property start (point) 'tutorial-orig matched)
- (put-text-property start (point) 'local-map tutorial--tab-map)
- (put-text-property start (point) 'read-only t))))))
-
-(provide 'viper-tut)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; viper-tut.el ends here
diff --git a/emacs.d/nxhtml/util/vline.el b/emacs.d/nxhtml/util/vline.el
deleted file mode 100644
index 62bc8dd..0000000
--- a/emacs.d/nxhtml/util/vline.el
+++ /dev/null
@@ -1,350 +0,0 @@
-;;; vline.el --- show vertical line (column highlighting) mode.
-
-;; Copyright (C) 2002, 2008, 2009 by Taiki SUGAWARA <buzz.taiki@gmail.com>
-
-;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com>
-;; Keywords: faces, editing, emulating
-;; Version: 1.09
-;; Time-stamp: <2009-10-12 16:55:13 UTC taiki>
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/vline.el
-
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-
-;;; Usage
-;; put followings your .emacs
-;; (require 'vline)
-;;
-;; if you display a vertical line, type M-x vline-mode. `vline-mode' doesn't
-;; effect other buffers, because it is a buffer local minor mode. if you hide
-;; a vertical line, type M-x vline-mode again.
-;;
-;; if you display a vertical line in all buffers, type M-x vline-global-mode.
-;;
-;; `vline-style' provides a display style of vertical line. see
-;; `vline-style' docstring.
-;;
-;; if you don't want to visual line highlighting (ex. for performance issue), please to set `vline-visual' to nil.
-
-;;; Changes
-;; 2009-08-26 taiki
-;; support org-mode, outline-mode
-
-;; 2009-08-18 taiki
-;; add autoload cookies.
-
-;; 2009-08-18 taiki
-;; fix last line highlighting probrem.
-
-;; 2009-08-18 taiki
-;; support visual line highlighting.
-;; - Added face vline-visual.
-;; - Added defcustom vline-visual-face.
-;; - Added defcustom vline-visual.
-;;
-;; 2009-08-17 taiki
-;; fix continuas line problem.
-;; - Don't display vline when cursor into fringe
-;; - Don't expand eol more than window width.
-;;
-;; 2008-10-22 taiki
-;; fix coding-system problem.
-;; - Added vline-multiwidth-space-list
-;; - Use ucs code-point for japanese fullwidth space.
-;;
-;; 2008-01-22 taiki
-;; applied patch from Lennart Borgman
-;; - Added :group 'vline
-;; - Added defcustom vline-current-window-only
-;; - Added header items to simplify for users
-
-;;; TODO:
-;; - track window-scroll-functions, window-size-change-functions.
-;; - consider other minor modes (using {after,before}-string overlay).
-;; - don't use {post,after}-command-hook for performance??
-
-;;; Code:
-
-(defvar vline-overlay-table-size 200)
-(defvar vline-overlay-table (make-vector vline-overlay-table-size nil))
-(defvar vline-line-char ?|)
-(defvar vline-multiwidth-space-list
- (list
- ?\t
- (decode-char 'ucs #x3000) ; japanese fullwidth space
- ))
-
-(defcustom vline-style 'face
- "*This variable holds vertical line display style.
-Available values are followings:
-`face' : use face.
-`compose' : use composit char.
-`mixed' : use face and composit char."
- :type '(radio
- (const face)
- (const compose)
- (const mixed))
- :group 'vline)
-
-
-(defface vline
- '((t (:background "light steel blue")))
- "*A default face for vertical line highlighting."
- :group 'vline)
-
-(defface vline-visual
- '((t (:background "gray90")))
- "*A default face for vertical line highlighting in visual lines."
- :group 'vline)
-
-(defcustom vline-face 'vline
- "*A face for vertical line highlighting."
- :type 'face
- :group 'vline)
-
-(defcustom vline-visual-face 'vline-visual
- "*A face for vertical line highlighting in visual lines."
- :type 'face
- :group 'vline)
-
-(defcustom vline-current-window-only nil
- "*If non-nil then show column in current window only.
-If the buffer is shown in several windows then show column only
-in the currently selected window."
- :type 'boolean
- :group 'vline)
-
-(defcustom vline-visual t
- "*If non-nil then show column in visual lines.
-If you specified `force' then use force visual line highlighting even
-if `truncate-lines' is non-nil."
- :type '(radio
- (const nil)
- (const t)
- (const force))
- :group 'vline)
-
-;;;###autoload
-(define-minor-mode vline-mode
- "Display vertical line mode."
- :global nil
- :lighter " VL"
- :group 'vline
- (if vline-mode
- (progn
- (add-hook 'pre-command-hook 'vline-pre-command-hook nil t)
- (add-hook 'post-command-hook 'vline-post-command-hook nil t))
- (vline-clear)
- (remove-hook 'pre-command-hook 'vline-pre-command-hook t)
- (remove-hook 'post-command-hook 'vline-post-command-hook t)))
-
-;;;###autoload
-(define-minor-mode vline-global-mode
- "Display vertical line mode as globally."
- :global t
- :lighter " VL"
- :group 'vline
- (if vline-global-mode
- (progn
- (add-hook 'pre-command-hook 'vline-global-pre-command-hook)
- (add-hook 'post-command-hook 'vline-global-post-command-hook))
- (vline-clear)
- (remove-hook 'pre-command-hook 'vline-global-pre-command-hook)
- (remove-hook 'post-command-hook 'vline-global-post-command-hook)))
-
-(defun vline-pre-command-hook ()
- (when (and vline-mode (not (minibufferp)))
- (vline-clear)))
-
-(defun vline-post-command-hook ()
- (when (and vline-mode (not (minibufferp)))
- (vline-show)))
-
-(defun vline-global-pre-command-hook ()
- (when (and vline-global-mode (not (minibufferp)))
- (vline-clear)))
-
-(defun vline-global-post-command-hook ()
- (when (and vline-global-mode (not (minibufferp)))
- (vline-show)))
-
-(defun vline-clear ()
- (mapcar (lambda (ovr)
- (and ovr (delete-overlay ovr)))
- vline-overlay-table))
-
-(defsubst vline-into-fringe-p ()
- (eq (nth 1 (posn-at-point)) 'right-fringe))
-
-(defsubst vline-visual-p ()
- (or (eq vline-visual 'force)
- (and (not truncate-lines)
- vline-visual)))
-
-(defsubst vline-current-column ()
- (if (or (not (vline-visual-p))
- ;; margin for full-width char
- (< (1+ (current-column)) (window-width)))
- (current-column)
- ;; hmm.. posn-at-point is not consider tab width.
- (- (current-column)
- (save-excursion
- (vertical-motion 0)
- (current-column)))))
-
-(defsubst vline-move-to-column (col &optional bol-p)
- (if (or (not (vline-visual-p))
- ;; margin for full-width char
- (< (1+ (current-column)) (window-width)))
- (move-to-column col)
- (unless bol-p
- (vertical-motion 0))
- (let ((bol-col (current-column)))
- (- (move-to-column (+ bol-col col))
- bol-col))))
-
-(defsubst vline-forward (n)
- (unless (memq n '(-1 0 1))
- (error "n(%s) must be 0 or 1" n))
- (if (not (vline-visual-p))
- (progn
- (forward-line n)
- ;; take care of org-mode, outline-mode
- (when (and (not (bobp))
- (invisible-p (1- (point))))
- (goto-char (1- (point))))
- (when (invisible-p (point))
- (if (< n 0)
- (while (and (not (bobp)) (invisible-p (point)))
- (goto-char (previous-char-property-change (point))))
- (while (and (not (bobp)) (invisible-p (point)))
- (goto-char (next-char-property-change (point))))
- (forward-line 1))))
- (vertical-motion n)))
-
-(defun vline-face (visual-p)
- (if visual-p
- vline-visual-face
- vline-face))
-
-(defun vline-show (&optional point)
- (vline-clear)
- (save-window-excursion
- (save-excursion
- (if point
- (goto-char point)
- (setq point (point)))
- (let* ((column (vline-current-column))
- (lcolumn (current-column))
- (i 0)
- (compose-p (memq vline-style '(compose mixed)))
- (face-p (memq vline-style '(face mixed)))
- (line-char (if compose-p vline-line-char ? ))
- (line-str (make-string 1 line-char))
- (visual-line-str line-str)
- (in-fringe-p (vline-into-fringe-p)))
- (when face-p
- (setq line-str (propertize line-str 'face (vline-face nil)))
- (setq visual-line-str (propertize visual-line-str 'face (vline-face t))))
- (goto-char (window-end nil t))
- (vline-forward 0)
- (while (and (not in-fringe-p)
- (< i (window-height))
- (< i (length vline-overlay-table))
- (not (bobp)))
- (let ((cur-column (vline-move-to-column column t))
- (cur-lcolumn (current-column)))
- ;; non-cursor line only (workaround of eol probrem.
- (unless (= (point) point)
- ;; if column over the cursor's column (when tab or wide char is appered.
- (when (> cur-column column)
- (let ((lcol (current-column)))
- (backward-char)
- (setq cur-column (- cur-column (- lcol (current-column))))))
- (let* ((ovr (aref vline-overlay-table i))
- (visual-p (or (< lcolumn (current-column))
- (> lcolumn (+ (current-column)
- (- column cur-column)))))
- ;; consider a newline, tab and wide char.
- (str (concat (make-string (- column cur-column) ? )
- (if visual-p visual-line-str line-str)))
- (char (char-after)))
- ;; create overlay if not found.
- (unless ovr
- (setq ovr (make-overlay 0 0))
- (overlay-put ovr 'rear-nonsticky t)
- (aset vline-overlay-table i ovr))
-
- ;; initialize overlay.
- (overlay-put ovr 'face nil)
- (overlay-put ovr 'before-string nil)
- (overlay-put ovr 'after-string nil)
- (overlay-put ovr 'invisible nil)
- (overlay-put ovr 'window
- (if vline-current-window-only
- (selected-window)
- nil))
-
- (cond
- ;; multiwidth space
- ((memq char vline-multiwidth-space-list)
- (setq str
- (concat str
- (make-string (- (save-excursion (forward-char)
- (current-column))
- (current-column)
- (string-width str))
- ? )))
- (move-overlay ovr (point) (1+ (point)))
- (overlay-put ovr 'invisible t)
- (overlay-put ovr 'after-string str))
- ;; eol
- ((eolp)
- (move-overlay ovr (point) (point))
- (overlay-put ovr 'after-string str)
- ;; don't expand eol more than window width
- (when (and (not truncate-lines)
- (>= (1+ column) (window-width))
- (>= column (vline-current-column))
- (not (vline-into-fringe-p)))
- (delete-overlay ovr)))
- (t
- (cond
- (compose-p
- (let (str)
- (when char
- (setq str (compose-chars
- char
- (cond ((= (char-width char) 1)
- '(tc . tc))
- ((= cur-column column)
- '(tc . tr))
- (t
- '(tc . tl)))
- line-char))
- (when face-p
- (setq str (propertize str 'face (vline-face visual-p))))
- (move-overlay ovr (point) (1+ (point)))
- (overlay-put ovr 'invisible t)
- (overlay-put ovr 'after-string str))))
- (face-p
- (move-overlay ovr (point) (1+ (point)))
- (overlay-put ovr 'face (vline-face visual-p))))))))
- (setq i (1+ i))
- (vline-forward -1)))))))
-
-(provide 'vline)
-
-;;; vline.el ends here
diff --git a/emacs.d/nxhtml/util/web-vcs-revision.txt b/emacs.d/nxhtml/util/web-vcs-revision.txt
deleted file mode 100644
index 27943c8..0000000
--- a/emacs.d/nxhtml/util/web-vcs-revision.txt
+++ /dev/null
@@ -1 +0,0 @@
-321
diff --git a/emacs.d/nxhtml/util/whelp.el b/emacs.d/nxhtml/util/whelp.el
deleted file mode 100644
index 77b8149..0000000
--- a/emacs.d/nxhtml/util/whelp.el
+++ /dev/null
@@ -1,988 +0,0 @@
-;; This is a test file for some enhancement to the possibilities to
-;; find out about widgets or buttons at point in a buffer.
-;;
-;; To use this just load the file. Then put point on a widget or
-;; button and do
-;;
-;; M-x describe-field
-;;
-;; You find a lot of widgets in a Custom buffer. You can find buttons
-;; in for example a help buffer. (Please tell me more places so I can
-;; test!)
-;;
-;; TODO: Add backtrace collecting to some more functions!
-
-;; For widget-get-backtrace-info
-;;(require 'debug)
-(eval-when-compile (require 'cl)) ;; gensym
-(require 'help-mode)
-
-;; Last wins!
-(require 'wid-browse)
-
-(intern ":created-in-function")
-
-(define-widget 'widget-browse-link 'item
- "Button for creating a link style button.
-The :value of the widget shuld be the widget to be browsed."
- :format "%[%v%]"
- ;;:value-create 'widget-browse-value-create
- ;;:action 'widget-browse-action
- )
-
-(defun define-button-type (name &rest properties)
- "Define a `button type' called NAME.
-The remaining arguments form a sequence of PROPERTY VALUE pairs,
-specifying properties to use as defaults for buttons with this type
-\(a button's type may be set by giving it a `type' property when
-creating the button, using the :type keyword argument).
-
-In addition, the keyword argument :supertype may be used to specify a
-button-type from which NAME inherits its default property values
-\(however, the inheritance happens only when NAME is defined; subsequent
-changes to a supertype are not reflected in its subtypes)."
- (let ((catsym (make-symbol (concat (symbol-name name) "-button")))
- (super-catsym
- (button-category-symbol
- (or (plist-get properties 'supertype)
- (plist-get properties :supertype)
- 'button))))
- ;; Provide a link so that it's easy to find the real symbol.
- (put name 'button-category-symbol catsym)
- ;; Initialize NAME's properties using the global defaults.
- (let ((default-props (symbol-plist super-catsym))
- (where-fun (widget-get-backtrace-info 8)))
- (setq default-props
- (cons :created-in-function
- (cons where-fun
- default-props)))
- (while default-props
- (put catsym (pop default-props) (pop default-props))))
- ;; Add NAME as the `type' property, which will then be returned as
- ;; the type property of individual buttons.
- (put catsym 'type name)
- ;; Add the properties in PROPERTIES to the real symbol.
- (while properties
- (let ((prop (pop properties)))
- (when (eq prop :supertype)
- (setq prop 'supertype))
- (put catsym prop (pop properties))))
- ;; Make sure there's a `supertype' property
- (unless (get catsym 'supertype)
- (put catsym 'supertype 'button))
- name))
-
-(defun define-widget (name class doc &rest args)
- "Define a new widget type named NAME from CLASS.
-
-NAME and CLASS should both be symbols, CLASS should be one of the
-existing widget types, or nil to create the widget from scratch.
-
-After the new widget has been defined, the following two calls will
-create identical widgets:
-
-* (widget-create NAME)
-
-* (apply 'widget-create CLASS ARGS)
-
-The third argument DOC is a documentation string for the widget."
- (put name 'widget-type (cons class args))
- (put name 'widget-documentation doc)
- (put name :created-in-function (widget-get-backtrace-info 8))
- name)
-
-(defvar describe-temp-help-buffer nil)
-(defun describe-get-temp-help-buffer ()
- (setq describe-temp-help-buffer (get-buffer-create "*Copy of *Help* Buffer for Description*")))
-
-(defun describe-field (pos)
- "Describe field at marker POS."
- (interactive (list (point)))
- (unless (markerp pos) (setq pos (copy-marker pos)))
- (when (eq (marker-buffer pos) (get-buffer (help-buffer)))
- (with-current-buffer (describe-get-temp-help-buffer)
- (erase-buffer)
- (insert (with-current-buffer (help-buffer)
- (buffer-string)))
- (goto-char (marker-position pos))
- (setq pos (point-marker))))
- (let (field wbutton doc button widget)
- (with-current-buffer (marker-buffer pos)
- (setq field (get-char-property pos 'field))
- (setq wbutton (get-char-property pos 'button))
- (setq doc (get-char-property pos 'widget-doc))
- (setq button (button-at pos))
- (setq widget (or field wbutton doc)))
- (cond ((and widget
- (if (symbolp widget)
- (get widget 'widget-type)
- (and (consp widget)
- (get (widget-type widget) 'widget-type))))
- (describe-widget pos))
- (button
- (describe-button pos))
- ((and (eq major-mode 'Info-mode)
- (memq (get-text-property pos 'font-lock-face)
- '(info-xref info-xref-visited)))
- (message "info link"))
- (t
- (message "No widget or button at point")))))
-
-(defun describe-insert-header (pos)
- (widget-insert
- (add-string-property
- (concat
- (format "Description of the field at position %d in "
- (marker-position pos))
- (format "\"%s\"" (marker-buffer pos))
- ":\n\n")
- 'face '(italic))))
-
-(defun describe-widget (pos)
- ;;(interactive (list (point-marker)))
- (unless (markerp pos) (setq pos (copy-marker pos)))
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'describe-widget pos) (interactive-p))
- (with-current-buffer (help-buffer)
- (let ((inhibit-read-only t))
- (describe-insert-header pos)
- (insert-text-button "This field"
- 'action (lambda (button)
- (let* ((m (button-get button 'field-location))
- (p (marker-position m))
- (b (marker-buffer m)))
- (if (not (buffer-live-p b))
- (message "Sorry the markers buffer is gone")
- (switch-to-buffer b)
- (goto-char p))))
- 'field-location pos)
- (princ " is of type ")
- (insert-text-button "widget"
- 'action (lambda (button)
- (info "(widget)")))
- (princ ". You can ")
- (insert-text-button "browse the widget's properties"
- 'action (lambda (button)
- (widget-browse-at
- (button-get button 'field-location)))
- 'field-location pos))
- (princ " to find out more about it.")
- (fill-region (point-min) (point-max))
- )
- (with-no-warnings (print-help-return-message))))
-
-(defun describe-button (pos)
- (let ((button (button-at pos)))
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'describe-button pos) (interactive-p))
- (with-current-buffer (help-buffer)
- (let ((inhibit-read-only t)
- ;;(button-marker (gensym))
- )
- (describe-insert-header pos)
- (insert-text-button "This field"
- 'action (lambda (button)
- (let* ((m (button-get button 'field-location))
- (p (marker-position m))
- (b (marker-buffer m)))
- (switch-to-buffer b)
- (goto-char p)))
- 'field-location pos)
- (princ " is of type ")
- (insert-text-button "button"
- 'action (lambda (button)
- (info "(elisp) Buttons")))
- (princ ". You can ")
- ;;(set button-marker pos)
- (insert-text-button "browse the button's properties"
- 'action `(lambda (button)
- ;;(button-browse-at (symbol-value ',button-marker)))))
- (button-browse-at ,pos))))
- (princ " to find out more about it.")
- (fill-region (point-min) (point-max))
- )
- (with-no-warnings (print-help-return-message)))))
-
-;; Obsolete
-;; (defun whelp-describe-symbol (sym)
-;; (interactive "SSymbol: ")
-;; (with-output-to-temp-buffer (help-buffer)
-;; (help-setup-xref (list #'describe-symbol sym) (interactive-p))
-;; (with-current-buffer (help-buffer)
-;; (let ((inhibit-read-only t))
-;; (if (not (symbolp sym))
-;; (progn
-;; (princ "Argument does not look like it is a ")
-;; (insert-text-button "symbol"
-;; 'action (lambda (button)
-;; (info "(elisp) Symbols")))
-;; (princ "."))
-;; (let ((n 0))
-;; (when (fboundp sym) (setq n (1+ n)))
-;; (when (boundp sym) (setq n (1+ n)))
-;; (when (facep sym) (setq n (1+ n)))
-;; (when (custom-group-p sym) (setq n (1+ n)))
-;; (if (= n 0)
-;; (progn
-;; (princ "Can't determine usage for the ")
-;; (insert-text-button "symbol"
-;; 'action (lambda (button)
-;; (info "(elisp) Symbols")))
-;; (princ " '")
-;; (princ (symbol-name sym))
-;; (princ "."))
-;; (princ "The ")
-;; (insert-text-button "symbol"
-;; 'action (lambda (button)
-;; (info "(elisp) Symbols")))
-;; (princ " '")
-;; (princ (symbol-name sym))
-;; (if (= n 1)
-;; (progn
-;; (princ " is a ")
-;; (cond ((fboundp sym)
-;; (princ "function (")
-;; (insert-text-button
-;; "describe it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (describe-function value)))
-;; 'value sym)
-;; (insert ")"))
-;; ((boundp sym)
-;; (insert "variable (")
-;; (insert-text-button
-;; "describe it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (describe-variable value)))
-;; 'value sym)
-;; (insert ")"))
-;; ((facep sym)
-;; (insert "face (")
-;; (insert-text-button
-;; "describe it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (describe-face value)))
-;; 'value sym)
-;; (insert ")"))
-;; ((custom-group-p sym)
-;; (insert "customize group (")
-;; (insert-text-button
-;; "customize it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (customize-group value)))
-;; 'value sym)
-;; (insert ")")))
-;; (princ "."))
-;; (princ " has several usages currently.")
-;; (princ " It can be:\n\n")
-;; (when (fboundp sym)
-;; (princ " - A function (")
-;; (insert-text-button "describe it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (describe-function value)))
-;; 'value sym)
-;; (princ ")\n"))
-;; (when (boundp sym)
-;; (princ " - A variable (")
-;; (insert-text-button "describe it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (describe-variable value)))
-;; 'value sym)
-;; (princ ")\n"))
-;; (when (facep sym)
-;; (princ " - A face (")
-;; (insert-text-button "describe it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (describe-face value)))
-;; 'value sym)
-;; (princ ")\n"))
-;; (when (custom-group-p sym)
-;; (princ " - A customization group (")
-;; (insert-text-button "customize it"
-;; 'action (lambda (button)
-;; (let ((value (button-get button 'value)))
-;; (customize-group value)))
-;; 'value sym)
-;; (princ ")\n"))
-;; )))
-;; (princ "\n\nSymbol's property list:\n\n")
-;; (let ((pl (symbol-plist sym))
-;; key
-;; val)
-;; (princ (format " %25s %s\n" "Key" "Value"))
-;; (princ (format " %25s %s\n" "---" "-----"))
-;; (while pl
-;; (setq key (car pl))
-;; (setq pl (cdr pl))
-;; (setq val (car pl))
-;; (setq pl (cdr pl))
-;; (let ((first (point-marker))
-;; last)
-;; (princ (format " %25s - %s" key val))
-;; (setq last (point-marker))
-;; (let ((adaptive-fill-function
-;; (lambda ()
-;; (format " %25s - " key))))
-;; (fill-region first last)
-;; ))
-;; (princ "\n")
-;; )))
-;; (with-no-warnings (print-help-return-message))))))
-
-
-
-(defun widget-browse-sexp (widget key value)
- "Insert description of WIDGET's KEY VALUE.
-Nothing is assumed about value."
- (let ((pp (condition-case signal
- (pp-to-string value)
- (error (prin1-to-string signal)))))
- (when (string-match "\n\\'" pp)
- (setq pp (substring pp 0 (1- (length pp)))))
- (if (cond ((string-match "\n" pp)
- nil)
- ((> (length pp) (- (window-width) (current-column)))
- nil)
- (t t))
- (cond
- ( (and value
- (symbolp value)
- (or (fboundp value)
- (boundp value)
- (facep value)))
- (widget-create 'push-button
- :tag pp
- :value value
- :action '(lambda (widget &optional event)
- (let ((value (widget-get widget :value))
- (n 0))
- (when (fboundp value) (setq n (1+ n)))
- (when (boundp value) (setq n (1+ n)))
- (when (facep value) (setq n (1+ n)))
- (if (= n 1)
- (cond ((fboundp value)
- (describe-function value))
- ((boundp value)
- (describe-variable value))
- ((facep value)
- (describe-face value)))
- (describe-symbol value))))))
- ( (markerp value)
- (widget-create 'push-button
- :tag pp
- :value (list (marker-position value) (marker-buffer value))
- :action '(lambda (widget &optional event)
- (let ((value (widget-get widget :value)))
- (let ((pos (car value))
- (buf (cadr value)))
- (switch-to-buffer-other-window buf)
- (goto-char pos))))))
- ( (overlayp value)
- (widget-create 'push-button
- :tag pp
- :value (list (overlay-start value) (overlay-buffer value))
- :action '(lambda (widget &optional event)
- (let ((value (widget-get widget :value)))
- (let ((pos (car value))
- (buf (cadr value)))
- (switch-to-buffer-other-window buf)
- (goto-char pos))))))
- ( t
- (widget-insert pp)))
-
- (widget-create 'push-button
- :tag "show"
- :action (lambda (widget &optional event)
- (with-output-to-temp-buffer
- "*Pp Eval Output*"
- (princ (widget-get widget :value))))
- pp))))
-
-
-(defvar widget-get-backtrace-active t
- "Whether to collect backtrace info for widgets and buttons.
-Turn this on only for debugging purposes.
-
-Note: This must be t when Emacs is loading to collect the needed
-information.")
-
-(defun widget-get-backtrace-info (n)
- (if widget-get-backtrace-active
- (let ((frame-n t)
- fun)
- (while (and frame-n
- (not fun))
- (setq frame-n (backtrace-frame n))
- (when frame-n
- ;;(message "**BT %s: %s" n (cadr frame-n))
- (when (car frame-n)
- (setq fun (cadr frame-n))
- (when (or (listp fun)
- (member fun
- '(
- backtrace-frame
- widget-get-backtrace-info
-
- eval
- eval-expression
- call-interactively
- apply
- funcall
- ;;lambda
-
- if
- when
- cond
- condition
- mapc
- mapcar
- while
-
- let
- let*
- set
- setq
- set-variable
- set-default
-
- widget-create
- widget-create-child-and-convert
- widget-create-child
- widget-create-child-value
- define-button-type
- define-widget
- make-text-button
- insert-text-button
- make-button
- insert-button
- )))
- (setq fun)))
- (setq n (1+ n))))
- ;;(message "---------- fun=%s" fun)
- fun)
- "Set widget-get-backtrace-info to show this"))
-
-(defun widget-create (type &rest args)
- "Create widget of TYPE.
-The optional ARGS are additional keyword arguments."
- (unless (keywordp :created-in-function) (error ":wcw not interned"))
- (let ((where-fun (widget-get-backtrace-info 8))
- yargs)
- (setq args
- (cons :created-in-function
- (cons where-fun
- args)))
- (let ((widget (apply 'widget-convert type args)))
- (widget-apply widget :create)
- widget)))
-
-
-(defun widget-create-child-and-convert (parent type &rest args)
- "As part of the widget PARENT, create a child widget TYPE.
-The child is converted, using the keyword arguments ARGS."
- (let ((widget (apply 'widget-convert type args)))
- (widget-put widget :parent parent)
- (widget-put widget :created-in-function (widget-get-backtrace-info 15))
- (unless (widget-get widget :indent)
- (widget-put widget :indent (+ (or (widget-get parent :indent) 0)
- (or (widget-get widget :extra-offset) 0)
- (widget-get parent :offset))))
- (widget-apply widget :create)
- widget))
-
-(defun widget-create-child (parent type)
- "Create widget of TYPE."
- (let ((widget (widget-copy type)))
- (widget-put widget :parent parent)
- (widget-put widget :created-in-function (widget-get-backtrace-info 15))
- (unless (widget-get widget :indent)
- (widget-put widget :indent (+ (or (widget-get parent :indent) 0)
- (or (widget-get widget :extra-offset) 0)
- (widget-get parent :offset))))
- (widget-apply widget :create)
- widget))
-
-(defun widget-create-child-value (parent type value)
- "Create widget of TYPE with value VALUE."
- (let ((widget (widget-copy type)))
- (widget-put widget :value (widget-apply widget :value-to-internal value))
- (widget-put widget :parent parent)
- (widget-put widget :created-in-function (widget-get-backtrace-info 15))
- (unless (widget-get widget :indent)
- (widget-put widget :indent (+ (or (widget-get parent :indent) 0)
- (or (widget-get widget :extra-offset) 0)
- (widget-get parent :offset))))
- (widget-apply widget :create)
- widget))
-
-(defvar widget-browse-fb-history nil
- "Forward/backward history.")
-(setq widget-browse-fb-history nil)
-
-(defun widget-fb-button-action (widget &ignore)
- (let* ((num (widget-get widget :history-number))
- (rec (nth num widget-browse-fb-history))
- (fun (nth 0 rec))
- (val (nth 1 rec))
- (loc (nth 2 rec)))
- ;;(message "fun=%s, val=%s, loc=%s" fun val loc)(sit-for 4)
- (funcall fun num)))
-
-(defun widget-insert-fb-buttons (current-number)
- ;;(message "current-number=%s" current-number)(sit-for 2)
- (if (<= 0 (1- current-number))
- (widget-create 'push-button
- :action 'widget-fb-button-action
- :history-number (1- current-number)
- :format "%[%v%]"
- "back")
- (widget-insert (add-string-property "[back]"
- 'face 'shadow)))
- (widget-insert " ")
- (if (< (1+ current-number) (length widget-browse-fb-history))
- (widget-create 'push-button
- :action 'widget-fb-button-action
- :history-number (1+ current-number)
- :format "%[%v%]"
- "forward")
- (widget-insert (add-string-property "[forward]"
- 'face 'shadow)))
- (widget-insert "\n"))
-
-(defun widget-add-fb-history (elt)
- (let ((last (car widget-browse-fb-history)))
- (unless (equal elt last)
- (setq widget-browse-fb-history
- (reverse (cons elt
- (reverse widget-browse-fb-history)))))))
-
-(defun widget-browse (widget &optional location)
- "Create a widget browser for WIDGET."
- (interactive (list (completing-read "Widget: "
- obarray
- (lambda (symbol)
- (get symbol 'widget-type))
- t nil 'widget-browse-history)))
- (let (history-number)
- (if (integerp widget)
- (progn
- ;;(message "was integer=%s" widget)(sit-for 2)
- (setq history-number widget)
- (setq widget (nth 1 (nth widget widget-browse-fb-history))))
- ;;(message "was NOT integer=%s" widget)(sit-for 2)
- (widget-add-fb-history (list 'widget-browse widget location))
- (setq history-number (1- (length widget-browse-fb-history))))
- ;;(message "history-number=%s" history-number)(sit-for 2)
-
- (if (stringp widget)
- (setq widget (intern widget)))
- (unless (if (symbolp widget)
- (get widget 'widget-type)
- (and (consp widget)
- (get (widget-type widget) 'widget-type)))
- (error "Not a widget"))
-
- ;; Create the buffer.
- (if (symbolp widget)
- (let ((buffer (format "*Browse %s Widget*" widget)))
- (kill-buffer (get-buffer-create buffer))
- (switch-to-buffer (get-buffer-create buffer)))
- (kill-buffer (get-buffer-create "*Browse Widget*"))
- (switch-to-buffer (get-buffer-create "*Browse Widget*")))
- (widget-browse-mode)
-
- (make-local-variable 'widget-button-face)
- (setq widget-button-face 'link)
- (set (make-local-variable 'widget-push-button-prefix) "")
- (set (make-local-variable 'widget-push-button-suffix) "")
- (set (make-local-variable 'widget-link-prefix) "")
- (set (make-local-variable 'widget-link-suffix) "")
-
- ;; Top text indicating whether it is a class or object browser.
- (widget-insert-fb-buttons history-number)
- (widget-insert "----------------\n")
- (if (listp widget)
- (progn
- (widget-insert (add-string-property
- "Widget object browser"
- 'face 'widget-browse-h1))
- (widget-insert "\n\n")
- (when location
- (let ((b (marker-buffer location))
- (p (marker-position location)))
- (widget-insert (add-string-property "Location: "
- 'face 'italic))
- (widget-create 'push-button
- :tag (format "position %s in buffer %s" p b)
- :value (list p b)
- :action '(lambda (widget &optional event)
- (let ((value (widget-get widget :value)))
- (let ((pos (car value))
- (buf (cadr value)))
- (switch-to-buffer-other-window buf)
- (goto-char pos)))))
- (widget-insert "\n\n")))
- (widget-insert (add-string-property "Class: "
- 'face 'italic)))
- (widget-insert (add-string-property "Widget class browser"
- 'face 'widget-browse-h1))
- (widget-insert ".\n\n")
- (widget-insert (add-string-property "Class: " 'face 'italic))
- (widget-insert (add-string-property (format "%s\n" widget)
- 'face '(bold)))
- (widget-insert (format "%s" (get widget 'widget-documentation)))
- (unless (eq (preceding-char) ?\n) (widget-insert "\n"))
- (widget-insert (add-string-property "\nSuper: " 'face 'italic))
- (setq widget (get widget 'widget-type))
- )
-
- ;(widget-insert (format "%s\n" widget))
-
- ;; Now show the attributes.
- (let ((name (car widget))
- (items (cdr widget))
- key value printer)
- (if (not name)
- (widget-insert "none\n")
- (let ((ancestors (list name))
- a
- (i1 7)
- i
- )
- (setq i i1)
- (while name
- (setq a (intern-soft name))
- (if a
- (progn
- (setq a (get a 'widget-type))
- (setq name (car a))
- (when (intern-soft name)
- (push name ancestors)))
- (setq name)))
- ;;(widget-insert (format "ancestors=%s\n" ancestors))
- (mapc (lambda (w)
- (widget-insert (make-string (if (= i i1) 0 i) ? ))
- (widget-create 'widget-browse
- :format "%[%v%]"
- w)
- (widget-insert "\n")
- (setq i (+ i 2)))
- ancestors)))
- (while items
- (setq key (nth 0 items)
- value (nth 1 items)
- printer (or (get key 'widget-keyword-printer)
- 'widget-browse-sexp)
- items (cdr (cdr items)))
- (widget-insert "\n"
- (add-string-property (symbol-name key)
- 'face 'italic))
- (when (widget-browse-explained key)
- (widget-insert " (")
- (widget-create
- ;;'push-button
- ;;:tag "explain"
- ;;:format "%[%v%]"
- ;;:button-prefix ""
- ;;:button-suffix ""
- 'widget-browse-link
- :value key
- :tag "explain"
- :format "%[%t%]"
- :action '(lambda (widget &optional event)
- (widget-browse-explain
- ;;(widget-get widget :value)
- (widget-value widget)
- ))
- )
- (widget-insert ")"))
- (widget-insert "\n\t")
- (funcall printer widget key value)
- (widget-insert "\n")))
-
- (widget-insert "\n-----------\n")
- (widget-insert-fb-buttons history-number)
-
- (widget-setup)
- (goto-char (point-min))
-;; (when wid-to-history
-;; (setq widget-browse-fb-history
-;; (reverse (cons (list 'widget-browse wid-to-history location)
-;; (reverse widget-browse-fb-history)))))
- ))
-
-(defun widget-browse-at (pos)
- "Browse the widget under point."
- (interactive "d")
- (let ((mp pos)
- (b (if (markerp pos) (marker-buffer pos)
- (current-buffer))))
- (if (not (buffer-live-p b))
- (message "Sorry the markers buffer is gone")
- (with-current-buffer b
- (when (markerp pos)
- (setq pos (marker-position pos)))
- (let* ((field (get-char-property pos 'field))
- (button (get-char-property pos 'button))
- (doc (get-char-property pos 'widget-doc))
- (text (cond (field "This is an editable text area.")
- (button "This is an active area.")
- (doc "This is documentation text.")
- (t "This is unidentified text.")))
- (widget (or field button doc)))
- (when widget
- (widget-browse widget mp))
- (message text))))))
-
-(defun button-at (pos)
- "Return the button at marker or position POS, or nil.
-If not a marker use the current buffer."
- (with-current-buffer (if (markerp pos) (marker-buffer pos)
- (current-buffer))
- (when (markerp pos)
- (setq pos (marker-position pos)))
- (let ((button (get-char-property pos 'button)))
- (if (or (overlayp button) (null button))
- button
- ;; Must be a text-property button; return a marker pointing to it.
- (copy-marker pos t)))))
-
-(defun button-browse-at (pos)
- (interactive "d")
- (let ((b (if (markerp pos) (marker-buffer pos)
- (current-buffer))))
- (if (not (buffer-live-p b))
- (message "Sorry the button's buffer is gone")
- (button-browse (button-at pos)))))
-
-(defun button-browse (button)
- "Create a widget browser for WIDGET."
- (interactive (list (completing-read "Button: "
- obarray
- (lambda (symbol)
- (or (get symbol 'button-category-symbol)
- (get symbol 'supertype)))
- t nil 'button-browse-history)))
- (let (history-number)
- (if (integerp button)
- (progn
- (setq history-number button)
- (setq button (nth 1 (nth button widget-browse-fb-history))))
- (widget-add-fb-history (list 'button-browse button))
- (setq history-number (1- (length widget-browse-fb-history))))
-
- (when (stringp button)
- (setq button (intern-soft button)))
- (when (symbolp button)
- (unless (and button
- (or (eq button 'default-button)
- (get button 'supertype)
- (get button 'button-category-symbol)
- (save-match-data
- (string-match "-button$" (symbol-name button)))))
- (error "Not a button")))
- ;; Create the buffer.
- (kill-buffer (get-buffer-create "*Browse Button*"))
- (switch-to-buffer (get-buffer-create "*Browse Button*"))
- (widget-browse-mode)
-
- (make-local-variable 'widget-button-face)
- (setq widget-button-face 'link)
-
- (widget-insert-fb-buttons history-number)
- (widget-insert "----------------\n")
-
- ;; Top text indicating whether it is a class or object browser.
- (if (or (overlayp button)
- (markerp button))
- (progn
- (widget-insert (add-string-property "Button object browser"
- 'face 'widget-browse-h1))
- (widget-insert "\n\n")
- (let ((b (if (markerp button)
- (marker-buffer button)
- (overlay-buffer button)))
- (p (if (markerp button)
- (marker-position button)
- (overlay-start button))))
- (widget-insert (add-string-property "Location: "
- 'face 'italic))
- (widget-create 'push-button
- :tag (format "position %s in buffer %s" p b)
- :value (list p b)
- :action '(lambda (widget &optional event)
- (let ((value (widget-get widget :value)))
- (let ((pos (car value))
- (buf (cadr value)))
- (switch-to-buffer-other-window buf)
- (goto-char pos)))))
- (widget-insert "\n\n")))
- (widget-insert (add-string-property "Button class browser"
- 'face 'widget-browse-h1))
- (widget-insert "\n\n")
- (widget-insert (add-string-property "Type: "
- 'face 'italic))
- (widget-insert (add-string-property (symbol-name button)
- 'face 'bold))
- (widget-insert "\n"))
-
- ;; Now show the attributes.
- (let (
- (items
- (if (symbolp button)
- (if (get button 'button-category-symbol)
- (symbol-plist (get button 'button-category-symbol))
- (symbol-plist button))
- (if (markerp button)
- (let ((pos (marker-position button))
- (buf (marker-buffer button)))
- (text-properties-at pos buf))
- (overlay-properties button))))
- rest-items
- name
- key value printer)
- ;;(insert (format "\n%s\n\n" items))
- (let ((copied-items (copy-seq items)))
- (while copied-items
- (setq key (nth 0 copied-items)
- value (nth 1 copied-items)
- copied-items (cdr (cdr copied-items)))
- (if (eq key 'category)
- (setq name value)
- (if (eq key 'supertype)
- (setq name (make-symbol (concat (symbol-name value) "-button")))
- (push value rest-items)
- (push key rest-items)))))
- ;;(insert "\nname=" (symbol-name value) "\n\n")
- (when name
- (widget-insert (add-string-property
- (if (symbolp button)
- (if (get button 'supertype)
- "Supertype: "
- "")
- "Category: ")
- 'face 'italic))
- (let* (a
- (ancestors
- (list name))
- (i1 11)
- (i i1))
- (while name
- (setq a (or (get name 'supertype)
- (get name :supertype)))
- ;;(message "name=%s, a=%s\n name plist=%s" name a (symbol-plist name));(sit-for 4)
- (if (or (not a)
- (eq a 'default-button))
- (setq name)
- (setq name (make-symbol (concat (symbol-name a) "-button")))
- (setq ancestors (cons name ancestors))))
- ;;(message "ancestors=%s" ancestors)(sit-for 2)
- (mapc (lambda (w)
- (widget-insert (make-string (if (= i i1) 0 i) ? ))
- (widget-create 'button-browse
- :format "%[%v%]"
- w)
- (widget-insert "\n")
- (setq i (+ i 2)))
- ancestors)))
- (while rest-items
- (setq key (nth 0 rest-items)
- value (nth 1 rest-items)
- printer (or (get key 'widget-keyword-printer)
- 'widget-browse-sexp)
- rest-items (cdr (cdr rest-items)))
- (widget-insert "\n"
- (add-string-property (symbol-name key)
- 'face 'italic))
- (when (widget-browse-explained key)
- (widget-insert " (")
- (widget-create 'push-button
- :tag "explain"
- :value key
- :action '(lambda (widget &optional event)
- (widget-browse-explain
- (widget-get widget :value))))
- (widget-insert ")"))
- (widget-insert "\n\t")
- (funcall printer button key value)
- (widget-insert "\n")))
- (widget-setup)
- (goto-char (point-min))
-
-;; (when button-to-history
-;; (setq widget-browse-fb-history
-;; (reverse (cons (list 'button-browse button-to-history)
-;; (reverse widget-browse-fb-history)))))
- ))
-
-
-;;;###autoload
-(defgroup whelp nil
- "Customization group for whelp."
- :group 'emacs)
-
-(defface widget-browse-h1
- '((t (:weight bold :height 1.5)))
- "Face for top header in widget/button browse buffers."
- :group 'whelp)
-
-(defun add-string-property (str prop val)
- (let ((s (copy-seq str)))
- (put-text-property 0 (length s)
- prop val
- s)
- s))
-
-;;; The `button-browse' Widget.
-
-(define-widget 'button-browse 'push-button
- "Widget button for creating a button browser.
-The :value of the widget shuld be the button to be browsed."
- :format "%[[%v]%]"
- :value-create 'widget-browse-button-value-create
- :action 'widget-browse-button-action)
-
-(defun widget-browse-button-action (widget &optional event)
- ;; Create widget browser for WIDGET's :value.
- (button-browse (widget-get widget :value)))
-
-(defun widget-browse-button-value-create (widget)
- ;; Insert type name.
- (let ((value (widget-get widget :value)))
- (cond ((symbolp value)
- (insert (symbol-name value)))
- ((consp value)
- (insert (symbol-name (widget-type value))))
- (t
- (insert "strange")))))
-
-
-(defun widget-browse-explained (property)
- (memq property
- '(
- :created-in-function
- )))
-
-(defun widget-browse-explain (property)
- (with-output-to-temp-buffer (help-buffer)
- (help-setup-xref (list #'widget-browse-explain property) (interactive-p))
- (with-current-buffer (help-buffer)
- (let ((inhibit-read-only t))
- (cond
- ( (eq property :created-in-function)
- (princ "Property :created-in-function tells where a field object or class is created.")
- )
- ( t
- (princ (format "No explanation found for %s" property))
- )
- )
- (with-no-warnings (print-help-return-message))))))
-
-(provide 'whelp)
diff --git a/emacs.d/nxhtml/util/winsav.el b/emacs.d/nxhtml/util/winsav.el
deleted file mode 100644
index 771f6ce..0000000
--- a/emacs.d/nxhtml/util/winsav.el
+++ /dev/null
@@ -1,1585 +0,0 @@
-;;; winsav.el --- Save and restore window structure
-;;
-;; Author: Lennart Borgman
-;; Created: Sun Jan 14 2007
-(defconst winsav:version "0.77") ;;Version: 0.77
-;; Last-Updated: 2009-08-04 Tue
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This library contains both user level commands and options and
-;; functions for use in other elisp libraries.
-;;
-;;;; User level commands and options
-;;
-;; The user level commands and options are for saving frame, windows
-;; and buffers between Emacs sessions. To do that you can customize
-;; the options `desktop-save-mode' and `winsav-save-mode' or put this
-;; at the end of your .emacs:
-;;
-;; (desktop-save-mode 1)
-;; (winsav-save-mode 1)
-;;
-;; You can also save configurations that you later switch between.
-;; For more information see the command `winsav-save-mode'.
-;;
-;; (There is also a command in this library for rotating window
-;; borders in a frame, `winsav-rotate'. It is here just because the
-;; needed support functions lives here.)
-;;
-;;
-;;
-;;;; Commands for other elisp libraries
-;;
-;; This library was orignally written to solve the problem of adding a
-;; window to the left of some windows in a frame like the one below
-;;
-;; ___________
-;; | | |
-;; | 1 | 2 |
-;; |____|____|
-;; | |
-;; | 3 |
-;; |_________|
-;;
-;; so that the window structure on the frame becomes
-;;
-;; ___________
-;; | | | |
-;; | | 1| 2 |
-;; | B|__|___|
-;; | A| |
-;; | R| 3 |
-;; |__|______|
-;;
-;;
-;; This problem can be solved by this library. However the solution in
-;; this library is a bit more general: You first copy the window
-;; structure and then restore that into another window. To do the
-;; above you first copy the window structure in the first frame above
-;; with `winsav-get-window-tree'. Then you create windows like this:
-;;
-;; ___________
-;; | | |
-;; | | |
-;; | B| |
-;; | A| |
-;; | R| |
-;; |__|______|
-;;
-;;
-;; Finally you use `winsav-put-window-tree' to put the window
-;; structure into the right window. (Of course you could have put BAR
-;; above, under etc.)
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Bugs and limitations:
-;;
-;; Juanma Barranquero has pointed out there is a serious limitation in
-;; this way of doing it when overlays with 'window properties are
-;; used. The problem is that any pointers to windows are made invalid
-;; since they are deleted. So in fact any code that relies on saved
-;; pointers to windows will have problem if the window is one of those
-;; that are involved here.
-;;
-;; To overcome this problem when doing something like inserting a BAR
-;; window (see above) a new window has to be inserted in the existing
-;; window tree on a frame in a way that is currently not supported in
-;; Emacs.
-;;
-;; It would be nice to be have primitives to manipulate the window
-;; tree more generally from elisp. That requires implementation of
-;; them at the C level of course.
-;;
-;; However it is probably much easier to implement it quite a bit less
-;; general. The concept of splitting is maybe then the right level to
-;; search for primitives at.
-;;
-;; My conclusion is that it will take some time to find suitable
-;; primitives for this.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; Version 0.72:
-;;
-;; - Format of window structure changed in Emacs 23. Adopted to that.
-;; - Added save and restore of frame/window configurations between
-;; Emacs sessions.
-;; - Added named winsav configurations for save and restore of frames,
-;; windows, buffers and files.
-;;
-;; Version 0.71:
-;;
-;; - Added rotation of window structure.
-;;
-;; Version 0.70:
-;;
-;; - Support for save and restore from file.
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-
-(eval-when-compile (require 'cl))
-(eval-and-compile (require 'desktop))
-
-;; (defun winsav-upper-left-window(&optional frame w)
-;; (let* ((tree (if w w (car (window-tree frame))))
-;; (is-split (not (windowp tree))))
-;; (if (not is-split)
-;; tree
-;; (winsav-upper-left-window frame (nth 2 tree)))))
-
-
-(defcustom winsav-after-get-hook nil
- "Hook to run after at the end of `winsav-get-window-tree'.
-The functions in this hook are called with one parameter which is
-the same as the return value from the function above."
- :type 'hook
- :group 'winsav)
-
-(defcustom winsav-after-put-hook nil
- "Hook to run after at the end of `winsav-put-window-tree'.
-The functions in this hook are called with one parameter which is
-a list where each element is a list \(old-win new-win) where
-OLD-WIN are the window from `winsav-get-window-tree' and NEW-WIN
-is the newly created corresponding window. This list is the same
-as the return value from the function above."
- :type 'hook
- :group 'winsav)
-
-(defun winsav-get-window-tree(&optional frame)
- "Get window structure.
-This returns an object with current windows with values, buffers,
-points and the selected window.
-
-FRAME is the frame to save structure from. If nil use selected.
-
-At the very end of this function the hook `winsav-after-get' is
-run."
- ;;(let* ((upper-left (winsav-upper-left-window frame))
- (let* ((upper-left (frame-first-window frame))
- (num -1)
- sel-num)
- (dolist (w (window-list frame nil upper-left))
- (setq num (1+ num))
- (when (eq w (selected-window))
- (setq sel-num num)))
- (let ((ret (list sel-num
- (winsav-get-window-tree-1 frame nil))))
- (run-hook-with-args 'winsav-after-get-hook ret)
- ret)))
-
-;; Fix-me: add window-hscroll
-(defun winsav-get-window-tree-1(frame w)
- (let ((tree (if w w (car (window-tree frame)))))
- (if (windowp tree)
- ;; Note: Desktop is used for saving buffers.
- (with-current-buffer (window-buffer tree)
- (list (window-buffer tree)
- ;; buffer
- (buffer-name)
- (buffer-file-name)
- ;;buffer-read-only
- ;;(if mumamo-multi-major-mode mumamo-multi-major-mode major-mode)
- ;;minor-modes
- ;;buffer locals
- ;;(cons (+ 0 (mark-marker)) (mark-active))
- ;; window
- (window-point tree)
- (window-edges tree)
- (window-scroll-bars tree)
- (window-fringes tree)
- (window-margins tree)
- (window-hscroll tree)
- ;; misc
- (window-dedicated-p tree)
- (when (fboundp 'window-redisplay-end-trigger)
- (window-redisplay-end-trigger tree))
- (window-start tree)
- tree))
- (let* ((dir (nth 0 tree))
- (split (nth 1 tree))
- (wt (cddr tree))
- (wsubs (mapcar (lambda(wc)
- (winsav-get-window-tree-1 nil wc))
- wt)))
- (append (list dir split) wsubs)))))
-
-;;;###autoload
-(defun winsav-put-window-tree (saved-tree window &optional copy-win-ovl win-ovl-all-bufs)
- "Put window structure SAVED-TREE into WINDOW.
-Restore a structure SAVED-TREE returned from
-`winsav-get-window-tree' into window WINDOW.
-
-If COPY-WIN-OVL is non-nil then overlays having a 'window
-property pointing to one of the windows in SAVED-TREE where this
-window still is shown will be copied to a new overlay with
-'window property pointing to the corresponding new window.
-
-If WIN-OVL-ALL-BUFS is non-nil then all buffers will be searched
-for overlays with a 'window property of the kind above.
-
-At the very end of this function the hook `winsav-after-put' is
-run."
- (let* ((sel-num (nth 0 saved-tree))
- (tree (nth 1 saved-tree))
- nsiz
- nh
- nw
- osiz
- oh
- ow
- scale-w
- scale-h
- first-win
- winsav-put-return)
- (unless (or (bufferp (car tree))
- (eq 'buffer (car tree)))
- (setq nsiz (window-edges window))
- (setq nh (- (nth 3 nsiz) (nth 1 nsiz)))
- (setq nw (- (nth 2 nsiz) (nth 0 nsiz)))
- (setq osiz (cadr tree))
- (setq oh (- (nth 3 osiz) (nth 1 osiz)))
- (setq ow (- (nth 2 osiz) (nth 0 osiz)))
- (setq scale-w (unless (= ow nw) (/ nw (float ow))))
- (setq scale-h (unless (= oh nh) (/ nh (float oh)))))
- (setq first-win (winsav-put-window-tree-1 tree window scale-w scale-h t 1))
- (select-window first-win)
- (when sel-num (other-window sel-num))
- (winsav-fix-win-ovl winsav-put-return copy-win-ovl win-ovl-all-bufs)
- (run-hook-with-args 'winsav-after-put-hook winsav-put-return)
- winsav-put-return))
-
-(defun winsav-put-window-tree-1 (saved-tree window scale-w scale-h first-call level)
- "Helper for `winsav-put-window-tree'.
-For the arguments SAVED-TREE and WINDOW see that function.
-
-The arguments SCALE-W and SCALE-H are used to make the saved
-window config fit into its new place. FIRST-CALL is a state
-variable telling if this is the first round. LEVEL helps
-debugging by tells how far down we are in the call chain."
- (if (or (bufferp (car saved-tree))
- ;;(not (car saved-tree))
- (eq 'buffer (car saved-tree))
- )
- (let ((buffer (nth 0 saved-tree))
- ;; buffer
- (bufnam (nth 1 saved-tree))
- (filnam (nth 2 saved-tree))
- ;;(mark (nth 3 saved-tree))
- ;; window
- (point (nth 3 saved-tree))
- (edges (nth 4 saved-tree))
- (scroll (nth 5 saved-tree))
- (fringe (nth 6 saved-tree))
- (margs (nth 7 saved-tree))
- (hscroll (nth 8 saved-tree))
- (dedic (nth 9 saved-tree))
- (trigger (nth 10 saved-tree))
- (start (nth 11 saved-tree))
- (ovlwin (nth 12 saved-tree))
- scr2
- (misbuf " *Winsav information: Buffer is gone*"))
- (or (windowp ovlwin)
- (not ovlwin)
- (error "Parameter mismatch, ovlwin not window: %s" ovlwin))
- (when first-call
- (add-to-list 'winsav-put-return (list ovlwin window))
- (when (eq 'buffer buffer)
- (when filnam
- (setq buffer (winsav-find-file-noselect filnam)))
- (if (buffer-live-p buffer)
- (or (string= bufnam (buffer-name buffer))
- (eq (string-to-char bufnam) 32) ;; Avoid system buffer names
- (rename-buffer bufnam))
- (when (eq (string-to-char bufnam) 32)
- (setq bufnam " *Winsav dummy buffer*"))
- ;; Fix-me, this might need some tweaking: Don't restore
- ;; buffers without a file name and without
- ;; content. (desktop-mode will make that when
- ;; necessary.) Just show the scratch buffer instead.
- (setq buffer (get-buffer bufnam))
- (unless (and buffer
- (< 0 (buffer-size buffer)))
- (setq buffer (get-buffer-create "*scratch*")))))
- (set-window-buffer window buffer)
- (set-window-dedicated-p window dedic)
- ;; Strange incompatibility in scroll args:
- (setq scr2 (list (nth 0 scroll) (nth 2 scroll) (nth 3 scroll)))
- (apply 'set-window-scroll-bars (append (list window) scr2))
- (apply 'set-window-fringes (append (list window) fringe))
- (set-window-margins window (car margs) (cdr margs))
- (set-window-hscroll window hscroll)
- (unless (>= emacs-major-version 23)
- (with-no-warnings
- (set-window-redisplay-end-trigger window trigger))))
- (let* ((nsiz (window-edges window))
- (nh (- (nth 3 nsiz) (nth 1 nsiz)))
- (nw (- (nth 2 nsiz) (nth 0 nsiz)))
- (osiz edges) ;(nth 2 saved-tree))
- (oh (- (nth 3 osiz) (nth 1 osiz)))
- (ow (- (nth 2 osiz) (nth 0 osiz)))
- (diff-w (- (if scale-w
- (round (* scale-w ow))
- ow)
- nw))
- (diff-h (- (if scale-h
- (round (* scale-h oh))
- oh)
- nh)))
- ;; Avoid rounding naggings:
- (when (> (abs diff-h) 1)
- (bw-adjust-window window diff-h nil))
- (when (> (abs diff-w) 1)
- (bw-adjust-window window diff-w t)))
- ;; Fix-me: there were some problems getting point correctly. Don't know why...
- (with-selected-window window
- (with-current-buffer (window-buffer window)
- (goto-char point))
- (set-window-point window point)
- ;;(unless (buffer-live-p buffer) (setq point 1) (setq start 1))
- (set-window-start window start)
- ;; Maybe point got off screen?
- (when (/= point (window-point window))
- (set-window-point window point)))
- window)
- (let* ((ver (car saved-tree))
- (wtree (list (cons window (caddr saved-tree))))
- (nwin window)
- pwin
- pdelta
- (first-win nwin))
- ;; First split to get it in correct order
- (when first-call
- (dolist (subtree (cdddr saved-tree))
- (setq pwin nwin)
- ;;(message "nwin edges=%s, ver=%s" (window-edges nwin) ver)
- (let ((split-err nil)
- (window-min-height 1)
- (window-min-width 1))
- (setq nwin (split-window nwin nil (not ver))))
- ;; Make the previous window as small as permitted to allow
- ;; splitting as many times as possible
- (setq pdelta (-
- (if ver
- window-min-height
- window-min-width)
- (if ver
- (window-width pwin)
- (window-height pwin))))
- ;;(message "pwin=%s, edges=%s, pdelta=%s, ver=%s" pwin (window-edges pwin) pdelta ver)
- ;; No reason to fail here:
- (condition-case err
- (adjust-window-trailing-edge pwin pdelta (not ver))
- (error
- ;;(message "awt=>%s" (error-message-string err))
- nil
- ))
- ;; Add to traverse
- (add-to-list 'wtree
- (cons nwin subtree)
- t)))
- ;; Now traverse. Sizing is a bit tricky, multiple runs have to
- ;; be done (as in balance-windows).
- (let (tried-sizes
- last-sizes
- (windows (window-list (selected-frame))))
- (while (not (member last-sizes tried-sizes))
- (when last-sizes (setq tried-sizes (cons last-sizes tried-sizes)))
- (setq last-sizes (mapcar (lambda (w)
- (window-edges w))
- windows))
- (dolist (wsub (reverse wtree))
- (select-window (car wsub))
- (winsav-put-window-tree-1 (cdr wsub) (selected-window)
- scale-w scale-h
- first-call
- (1+ level)
- ))
- (setq first-call nil)
- ))
- first-win)))
-
-(defun winsav-fix-win-ovl(win-list copy-win-ovl win-ovl-all-bufs)
- (let ((oldwins (mapcar (lambda(elt)
- (car elt))
- win-list))
- ovlwin
- window)
- (let (buffers)
- (if win-ovl-all-bufs
- (setq buffers (buffer-list))
- (mapc (lambda(w)
- (when (window-live-p w)
- (add-to-list 'buffers (window-buffer w))))
- oldwins))
- (dolist (buf buffers)
- (with-current-buffer buf
- (save-restriction
- (widen)
- (dolist (overlay (overlays-in (point-min) (point-max)))
- (when (setq ovlwin (car (memq (overlay-get overlay 'window) oldwins)))
- (setq window (cadr (assoc ovlwin win-list)))
- ;; If the old window is still alive then maybe copy
- ;; overlay, otherwise change the 'window prop. However
- ;; copy only if COPY-WIN-OVL is non-nil.
- (if (not (and (window-live-p ovlwin)
- (window-frame ovlwin)))
- (overlay-put overlay 'window window)
- (when copy-win-ovl
- (let* ((props (overlay-properties overlay))
- (start (overlay-start overlay))
- (end (overlay-end overlay))
- ;; Fix-me: start and end marker props
- (newovl (make-overlay start end)))
- (while props
- (let ((key (car props))
- (val (cadr props)))
- (setq props (cddr props))
- (when (eq key 'window)
- (setq val window))
- (overlay-put newovl key val))))))))))))))
-
-
-
-(defun winsav-transform-edges (edges)
- "Just rotate the arguments in EDGES to make them fit next function."
- (let ((le (nth 0 edges))
- (te (nth 1 edges))
- (re (nth 2 edges))
- (be (nth 3 edges)))
- (list te le be re)))
-
-(defun winsav-transform-1 (tree mirror transpose)
- "Mirroring of the window tree TREE.
-MIRROR could be 'mirror-top-bottom or 'mirror-left-right which I
-think explain what it does here. TRANSPOSE shifts the tree
-between a horisontal and vertical tree."
- (let* ((vertical (nth 0 tree))
- (edges (nth 1 tree))
- (subtrees (nthcdr 2 tree))
- )
- ;;(winsav-log "tree 1" tree)
- (when transpose
- (cond
- ((eq vertical nil)
- (setcar tree t))
- ((eq vertical t)
- (setcar tree nil))
- (t
- (error "Uh? vertical=%S" vertical))))
- (setcar (nthcdr 1 tree) (winsav-transform-edges edges))
- (dolist (subtree subtrees)
- (if (bufferp (car subtree))
- (when transpose
- (let ((edges (nth 4 subtree)))
- ;;(winsav-log "subtree 1" subtree)
- (setcar (nthcdr 4 subtree) (winsav-transform-edges edges))
- ;;(winsav-log "subtree 2" subtree)
- ))
- (winsav-transform-1 subtree mirror transpose)))
- (when (case mirror
- ('mirror-top-bottom vertical)
- ('mirror-left-right (not vertical))
- (nil) ;; Don't mirror
- (t
- (error "Uh? mirror=%s" mirror)))
- (setcdr (nthcdr 1 tree) (reverse subtrees))
- )
- ))
-
-(defun winsav-find-file-noselect (filename)
- "Read file FILENAME into a buffer and return the buffer.
-Like `find-file-noselect', but if file is not find then creates a
-buffer with a message about that."
- (let ((buf (find-file-noselect filename)))
- (unless buf
- (setq buf (generate-new-buffer filename))
- (with-current-buffer buf
- (insert "Winsav could not find the file " filename)
- (set-buffer-modified-p nil)))
- buf))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Session saving and restore etc
-
-;;;###autoload
-(defgroup winsav nil
- "Save frames and windows when you exit Emacs."
- :group 'frames)
-
-;;;###autoload
-(define-minor-mode winsav-save-mode
- "Toggle winsav configuration saving mode.
-With numeric ARG, turn winsav saving on if ARG is positive, off
-otherwise.
-
-When this mode is turned on, winsav configurations are saved from
-one session to another. A winsav configuration consists of
-frames, windows and visible buffers configurations plus
-optionally buffers and files managed by the functions used by
-option `desktop-save-mode'
-
-By default this is integrated with `desktop-save-mode'. If
-`desktop-save-mode' is on and `winsav-handle-also-desktop' is
-non-nil then save and restore also desktop.
-
-See the command `winsav-switch-config' for more information and
-other possibilities.
-
-Note: If you want to avoid saving when you exit just turn off
-this minor mode.
-
-For information about what is saved and restored and how to save
-and restore additional information see the function
-`winsav-save-configuration'."
- :global t
- :group 'winsav)
-
-(defun winsav-save-mode-on ()
- "Ensable option `winsav-save-mode'. Provided for use in hooks."
- (winsav-save-mode 1))
-
-(defun winsav-save-mode-off ()
- "Disable option `winsav-save-mode'. Provided for use in hooks."
- (winsav-save-mode -1))
-
-(defcustom winsav-save 'ask-if-new
- "Specifies whether the winsav config should be saved when it is killed.
-A winsav config \(winsav frame configuration) is killed when the
-user changes winsav directory or quits Emacs.
-
-Possible values are:
- t -- always save.
- ask -- always ask.
- ask-if-new -- ask if no winsav file exists, otherwise just save.
- ask-if-exists -- ask if winsav file exists, otherwise don't save.
- if-exists -- save if winsav file exists, otherwise don't save.
- nil -- never save.
-The winsav config is never saved when the option `winsav-save-mode' is nil.
-The variables `winsav-dirname' and `winsav-base-file-name'
-determine where the winsav config is saved."
- :type
- '(choice
- (const :tag "Always save" t)
- (const :tag "Always ask" ask)
- (const :tag "Ask if winsav file is new, else do save" ask-if-new)
- (const :tag "Ask if winsav file exists, else don't save" ask-if-exists)
- (const :tag "Save if winsav file exists, else don't" if-exists)
- (const :tag "Never save" nil))
- :group 'winsav)
-
-(defcustom winsav-handle-also-desktop t
- "If this is non-nil then desktop is also saved and restored.
-See option `winsav-save-mode' for more information."
- :type 'boolean
- :group 'winsav)
-
-(defcustom winsav-base-file-name
- (convert-standard-filename ".emacs.winsav")
- "Base name of file for Emacs winsav, excluding directory part.
-The actual file name will have a system identifier added too."
- :type 'file
- :group 'winsav)
-
-(defvar winsav-dirname nil
- "The directory in which the winsav file should be saved.")
-
-(defun winsav-current-default-dir ()
- "Current winsav configuration directory."
- (or winsav-dirname "~/"))
-
-;;(find-file (winsav-full-file-name))
-(defun winsav-default-file-name ()
- "Default winsav save file name.
-The file name consist of `winsav-base-file-name' with a system
-identifier added. This will be '-nw' for a terminal and '-' +
-the value of `window-system' otherwise."
- (let ((sys-id (if (not window-system)
- "nw"
- (format "%s" window-system))))
- (concat winsav-base-file-name "-" sys-id)))
-
-(defun winsav-full-file-name (&optional dirname)
- "Return the full name of the winsav session file in DIRNAME.
-DIRNAME omitted or nil means use `~'.
-
-The file name part is given by `winsav-default-file-name'."
- ;; Fix-me: Different frames in different files? Can multi-tty be handled??
- (expand-file-name (winsav-default-file-name) (or dirname
- (winsav-current-default-dir))))
-
-
-
-(defun winsav-serialize (obj)
- "Return a string with the printed representation of OBJ.
-This should be possible to eval and get a similar object like OBJ
-again."
- ;;(message "winsav-serialize a")
- (prin1-to-string obj)
- ;;(message "winsav-serialize b")
- )
-
-(defcustom winsav-before-save-configuration-hook nil
- "Hook called before saving frames.
-Hook for writing elisp code at the beginning of a winsav
-configuration file. When this hook is called the current buffer
-and point is where the code should be written.
-
-This is a normal hook. For more information see
-`winsav-save-configuration'."
- :type 'hook
- :group 'winsav)
-
-(defcustom winsav-after-save-configuration-hook nil
- "Hook called after saving frames.
-Hook for writing elisp code at the end of a winsav configuration
-file. When this hook is called the current buffer and point is
-where the code should be written.
-
-This is a normal hook. For more information see
-`winsav-save-configuration'."
- :type 'hook
- :group 'winsav)
-
-(defcustom winsav-after-save-frame-hook nil
- "Hook called when saving a frame after saving frame data.
-Hook for writing elisp code in a winsav configuration file after
-each frame creation. When this hook is called code for restoring
-a frame has been written and code that sets
-`winsav-last-loaded-frame' to point to it. Point is in the
-configuration file buffer right after this.
-
-This is a normal hook. For more information see
-`winsav-save-configuration'."
- :type 'hook
- :group 'winsav)
-
-(defvar winsav-loaded-frames nil)
-(defvar winsav-last-loaded-frame nil)
-
-(defun winsav-restore-frame (frame-params
- window-tree-params
- use-minibuffer-frame
- window-state
- window-visible)
- "Restore a frame with specified values.
-If this is a minibuffer only frame then just apply the frame
-parameters FRAME-PARAMS. Otherwise create a new frame using
-FRAME-PARAMS and set up windows and buffers according to
-WINDOW-TREE-PARAMS. Also, if USE-MINIBUFFER-FRAME let the new
-frame have this minibuffer frame.
-
-WINDOW-STATE is 1 for minimized, 2 for normal and 3 for
-maximized."
- (let* ((default-minibuffer-frame use-minibuffer-frame)
- (frame-name (cdr (assoc 'name frame-params)))
- (minibuffer-val (cdr (assoc 'minibuffer frame-params)))
- (minibuffer-only (eq 'only minibuffer-val))
- (mini-frames
- (delq nil (mapcar (lambda (frm)
- (when (eq 'only (frame-parameter frm 'minibuffer))
- frm))
- (frame-list))))
- (frame-with-that-name
- (when (and frame-name minibuffer-only)
- (catch 'frame
- (dolist (frame (frame-list))
- (when (string= frame-name (frame-parameter frame 'name))
- (throw 'frame frame))))))
- ;; If this is a minibuffer only frame then if it is already
- ;; there under a correct name then do not create it because
- ;; there might be variables pointing to it; just set the
- ;; parameters. Perhaps even better: if it is not already
- ;; there give an error - because it might be impossible to
- ;; set things up correctly then.
- (frame-with-that-name-has-mini
- (when frame-with-that-name
- (eq 'only
- (frame-parameter frame-with-that-name 'minibuffer))))
- (this-mini-frame (when minibuffer-only
- (or frame-with-that-name
- (and (= 1 (length mini-frames))
- (car mini-frames)))))
- (create-new
- (if minibuffer-only
- (if this-mini-frame ;frame-with-that-name-has-mini
- nil
- (error "Winsav: Can't find minibuffer only frame with name %s"
- frame-name))
- t))
- (this-frame (if create-new
- (make-frame frame-params)
- this-mini-frame))
- (win (frame-first-window this-frame)))
- ;;(message "create-new=%s, frame-with-that-name=%s" create-new frame-with-that-name)
- ;; (when was-max
- ;; (winsav-set-maximized-size this-frame)
- ;; ;; Wait for maximize to occur so horizontal scrolling gets ok.
- ;; (sit-for 1.5)
- ;; )
- (case window-state
- (1 (winsav-set-minimized-state this-frame))
- (3 (winsav-set-maximized-state this-frame)))
- (unless window-visible
- (make-frame-invisible this-frame))
- (if create-new
- (winsav-put-window-tree window-tree-params win)
- (modify-frame-parameters this-frame frame-params))
- (setq winsav-last-loaded-frame this-frame)
- (setq winsav-loaded-frames (cons this-frame winsav-loaded-frames))
- ))
-
-(defcustom winsav-frame-parameters-to-save
- '(
- ;;explicit-name
- ;;name
- ;;parent-id
- ;;title
- alpha
- auto-lower
- auto-raise
- background-color
- background-mode
- border-color
- border-width
- buffer-predicate
- cursor-color
- cursor-type
- font
- font-backend
- foreground-color
- fullscreen
- icon-name
- icon-type
- icon-left
- icon-top
- internal-border-width
- left-fringe
- line-spacing
- menu-bar-lines
- modeline
- mouse-color
- right-fringe
- screen-gamma
- scroll-bar-width
- tool-bar-lines
- top left width height
- tty-color-mode ;; ??
- unsplittable
- user-position
- user-size
- vertical-scroll-bars
- visibility
- )
- "Parameters saved for frames by `winsav-save-configuration'.
-Parameters are those returned by `frame-parameters'."
- :type '(repeat (symbol :tag "Frame parameter"))
- :group 'winsav)
-
-(defun frame-visible-really-p (frame)
- "Return t if FRAME is visible.
-This tries to be more corrent on w32 than `frame-visible-p'."
- (cond ((fboundp 'w32-frame-placement)
- (< 0 (nth 4 (w32-frame-placement frame))))
- (t
- (frame-visible-p frame))))
-
-(defun frame-maximized-p (frame)
- "Return t if it is known that frame is maximized."
- (cond ((fboundp 'w32-frame-placement)
- (= 3 (abs (nth 4 (w32-frame-placement frame)))))
- (t nil)))
-
-(defun frame-minimized-p (frame)
- "Return t if it is known that frame is minimized."
- (cond ((fboundp 'w32-frame-placement)
- (= 3 (abs (nth 4 (w32-frame-placement frame)))))
- (t nil)))
-
-;;(winsav-set-restore-size nil)
-;; (defun winsav-set-restore-size (frame)
-;; (when (fboundp 'w32-send-sys-command)
-;; (let ((cur-frm (selected-frame)))
-;; (select-frame-set-input-focus frame)
-;; (w32-send-sys-command #xf120)
-;; ;; Note: sit-for must be used, not sleep-for. Using the latter
-;; ;; prevents the fetching of the new size (for some reason I do not
-;; ;; understand).
-;; (sit-for 1.5)
-;; (select-frame-set-input-focus cur-frm))
-;; t))
-
-(defun winsav-set-maximized-state (frame)
- (when (fboundp 'w32-send-sys-command)
- (select-frame-set-input-focus frame)
- (w32-send-sys-command #xf030)
- (sit-for 1.0)
- t))
-
-(defun winsav-set-minimized-state (frame)
- (when (fboundp 'w32-send-sys-command)
- (select-frame-set-input-focus frame)
- (w32-send-sys-command #xf020)
- (sit-for 1.0)
- t))
-
-(defun winsav-save-frame (frame mb-frm-nr buffer)
- "Write into buffer BUFFER elisp code to recreate frame FRAME.
-If MB-FRM-NR is a number then it is the order number of the frame
-whose minibuffer should be used."
- (message "winsav-save-frame buffer=%s" buffer)
- (message "winsav-save-frame buffer 2=%s" (current-buffer))
- (let* ((start nil)
- (end nil)
- (obj (winsav-get-window-tree frame))
- (dummy (message "winsav-save-frame buffer 3=%s" (current-buffer)))
- (frm-size-now (cons (frame-pixel-height frame)
- (frame-pixel-width frame)))
- (dummy (message "winsav-save-frame buffer 4=%s" (current-buffer)))
- (placement (when (fboundp 'w32-frame-placement) (w32-frame-placement frame)))
- ;; (was-max (and frm-size-rst
- ;; (not (equal frm-size-now frm-size-rst))))
- (window-state (abs (nth 4 placement)))
- ;; (frm-size-rst (when (winsav-set-restore-size frame)
- ;; (cons (frame-pixel-height frame)
- ;; (frame-pixel-width frame))))
- ;;(frm-size-rst (when was-max))
- ;;(frm-size-rst (when (= 3 (abs (nth 4 placement)))))
- (dummy (message "winsav-save-frame buffer 5=%s" (current-buffer)))
- (frm-par (frame-parameters frame))
- (dummy (message "winsav-save-frame buffer 6=%s" (current-buffer)))
- )
- (message "winsav-save-frame a1 cb=%s" (current-buffer))
- (with-current-buffer buffer
- ;;(y-or-n-p (format "was-max=%s" was-max))
- (message "winsav-save-frame a2 cb=%s" (current-buffer))
- (setq frm-par
- (delq nil
- (mapcar (lambda (elt)
- (cond
- ((memq (car elt) winsav-frame-parameters-to-save)
- elt)
- ((eq (car elt) 'minibuffer)
- (let ((val (cdr elt)))
- (if (not (windowp val))
- elt
- (if (eq (window-frame val) frame)
- nil
- (cons 'minibuffer nil)))))))
- frm-par)))
- (message "winsav-save-frame b cb=%s" (current-buffer))
- (insert "(winsav-restore-frame\n'"
- ;;make-frame-params
- (winsav-serialize frm-par))
- (message "winsav-save-frame b.0.1")
- ;;window-tree-params
- (setq start (point))
- (insert "'" (winsav-serialize obj) "\n")
- (message "winsav-save-frame b.0.2")
- (setq end (copy-marker (point) t))
- (message "winsav-save-frame b.0.3")
- (message "winsav-save-frame b.1")
- ;; (replace-regexp (rx "#<buffer "
- ;; (1+ (not (any ">")))
- ;; (1+ ">")) ;; 1+ for indirect buffers ...
- ;; "buffer"
- ;; nil start end)
- (goto-char start)
- (while (re-search-forward (rx "#<buffer "
- (1+ (not (any ">")))
- (1+ ">")) ;; 1+ for indirect buffers ...
- end t)
- (replace-match "buffer" nil t))
- (message "winsav-save-frame b.2")
- ;; (replace-regexp (rx "#<window "
- ;; (1+ (not (any ">")))
- ;; (1+ ">"))
- ;; "nil"
- ;; nil start end)
- (goto-char start)
- (while (re-search-forward (rx "#<window "
- (1+ (not (any ">")))
- (1+ ">")) ;; 1+ for indirect buffers ...
- end t)
- (replace-match "nil" nil t))
- (message "winsav-save-frame c")
- (goto-char end)
- ;;use-minibuffer-frame
- (insert (if mb-frm-nr
- (format "(nth %s (reverse winsav-loaded-frames))" mb-frm-nr)
- "nil")
- (format " %s" window-state)
- (if (frame-visible-really-p frame) " t " " nil ")
- ")\n\n")
-
- (insert " ;; ---- before after-save-frame-hook ----\n")
- ;; (dolist (fun winsav-after-save-frame-hook)
- ;; (funcall fun frame (current-buffer)))
- (run-hooks winsav-after-save-frame-hook)
- (message "winsav-save-frame d")
- (insert " ;; ---- after after-save-frame-hook ----\n")
-
- ;;(insert " )\n\n\n")
- )))
-
-(defvar winsav-file-version "1"
- "Version number of winsav file format.
-Written into the winsav file and used at winsav read to provide
-backward compatibility.")
-
-
-;; fix-me: This should be in desktop.el
-;; Fix-me: incomplete, not ready.
-(defun winsav-restore-indirect-file-buffer (file name)
- "Make indirect buffer from file buffer visiting file FILE.
-Give it the name NAME."
- (let* ((fbuf (find-file-noselect file)))
- (when fbuf
- (make-indirect-buffer fbuf name))))
-
-(defun winsav-save-indirect-buffers (to-buffer)
- "Save information about indirect buffers.
-Only file visiting buffers currently. Clone the base buffers."
- (with-current-buffer to-buffer
- (dolist (buf (buffer-list))
- (when (buffer-base-buffer buf)
- (let* ((base-buf (buffer-base-buffer buf))
- (file (buffer-file-name base-buf)))
- (when file
- (insert "(winsav-restore-indirect-file-buffer \""
- file "\" \"" (buffer-name buf) "\")\n")))))))
-
-;; Fix-me: test
-;; (defun winsav-restore-minibuffer (frame-num frm-num win-num)
-;; (let* ((frame (nth (1- frame-num) winsav-loaded-frames))
-;; (mini-frm (nth (1- frm-num) winsav-loaded-frames))
-;; (mini-win (nth (1- win-num) (reverse (window-list mini-frm))))
-;; )
-;; (with-selected-frame frame
-;; (set-minibuffer-window mini-win))))
-
-(defvar winsav-minibuffer-alist nil)
-(defun winsav-save-minibuffers (sorted-frames to-buffer)
- "Save information about minibuffer frames.
-SORTED-FRAMES should be a list of all frames sorted using
-`winsav-frame-sort-predicate'."
- (with-current-buffer to-buffer
- (setq winsav-minibuffer-alist nil)
- (dolist (frame sorted-frames)
- (let* ((num-frames (length sorted-frames))
- (mini-win (minibuffer-window frame))
- (mini-frm (window-frame mini-win))
- (win-num (length
- (memq mini-win
- (window-list mini-frm t (frame-first-window mini-frm)))))
- (frm-num (- num-frames (length (memq mini-frm sorted-frames))))
- (frame-num (- num-frames (length (memq frame sorted-frames)))))
- (unless (and (eq mini-frm frame)
- (= win-num 1))
- ;; Not the normal minibuffer window
- ;;(insert (format ";;(winsav-restore-minibuffer %s %s %s)\n"
- ;;(insert (format "'(%s %s)\n" frame-num frm-num)
- (setq winsav-minibuffer-alist (cons (list frame-num frm-num) winsav-minibuffer-alist))
- )))
- (insert "(setq winsav-minibuffer-alist '"
- (winsav-serialize winsav-minibuffer-alist)
- ")\n")))
-
-(defun winsav-restore-dedicated-window (frame-num win-num dedicate-flag)
- "Set dedicated window flag.
-On frame number FRAME-NUM in `winsav-loaded-frames' set the
-dedicated flag on window number WIN-NUM to DEDICATE-FLAG."
- (let* ((frame (nth (1- frame-num) winsav-loaded-frames))
- (win (nth (1- win-num) (reverse (window-list frame t
- (frame-first-window frame))))))
- (set-window-dedicated-p win dedicate-flag)))
-
-(defun winsav-save-dedicated-windows (sorted-frames)
- "Save information about dedicated windows on frames in SORTED-FRAMES.
-Write this to current buffer."
- (dolist (frame sorted-frames)
- (dolist (win (window-list frame))
- (when (window-dedicated-p win)
- (let ((frame-num (length (memq frame sorted-frames)))
- (win-num (length
- (memq win
- (window-list frame t (frame-first-window frame)))))
- (flag (window-dedicated-p win)))
- (insert (format "(winsav-restore-dedicated-window %s %s %S)\n" frame-num win-num flag))
- )))))
-
-(defun winsav-restore-ecb (frame-num layout-ecb)
- "Restore ECB.
-On frame number FRAME-NUM-ECB in `winsav-loaded-frames' restore
-ECB layout LAYOUT-ECB."
- (when (boundp 'ecb-minor-mode)
- (let* ((frame (nth (1- frame-num) winsav-loaded-frames)))
- (select-frame frame)
- (unless (string= layout-ecb ecb-layout-name)
- (setq ecb-layout-name layout-ecb))
- (ecb-minor-mode 1))))
-
-(defun winsav-save-ecb (frame-ecb layout-ecb sorted-frames)
- "Save information about ECB layout on frames in SORTED-FRAMES.
-Write this in current buffer."
- (dolist (frame sorted-frames)
- (when (eq frame frame-ecb)
- (let ((frame-num (length (memq frame sorted-frames))))
- (insert (format "(winsav-restore-ecb %s %S)\n" frame-num layout-ecb))))))
-
-;; (make-frame '((minibuffer)))
-;; (sort (frame-list) 'winsav-frame-sort-predicate)
-(defun winsav-frame-sort-predicate (a b)
- "Compare frame A and B for sorting.
-Sort in the order frames can be created.
-
-- Frames without minibuffers will come later since the need to
- refer to the minibuffer frame when they are created.
-
-- Invisible frames comes last since there must be at least one
- visible frame from the beginning."
- (let* ((a-mbw (minibuffer-window a))
- (a-mbw-frm (window-frame a-mbw))
- (b-mbw (minibuffer-window b))
- (b-mbw-frm (window-frame b-mbw))
- (a-visible (frame-visible-really-p a))
- (b-visible (frame-visible-really-p b))
- )
- ;;(message "a-mbw-frm=%s, b=%s" a-mbw-frm b)
- ;;(message "b-mbw-frm=%s, a=%s" a-mbw-frm b)
- (when (or (not b-visible)
- (eq a-mbw-frm b)
- (not (eq b-mbw-frm b)))
- ;;(message "a > b")
- t
- )))
-
-(defun winsav-can-read-config (config-version)
- "Return t we can read config file version CONFIG-VERSION."
- (when (<= config-version 1)
- t))
-
-(defvar winsav-file-modtime nil)
-
-;; Like desktop-save, fix-me
-(defun winsav-save-configuration (&optional dirname release)
- "Write elisp code to recreate all frames.
-Write into the file name computed by `winsav-full-file-name'
-given the argument DIRNAME.
-
-The information that is saved for each frame is its size and
-position, the window configuration including buffers and the
-parameters in `winsav-frame-parameters-to-save'. If you want save
-more information for frames you can do that in the hook
-`winsav-after-save-frame-hook'.
-
-See also the hook variables
-`winsav-before-save-configuration-hook' and
-`winsav-after-save-configuration-hook'.
-
-Fix-me: RELEASE is not implemented."
- (winsav-save-config-to-file (winsav-full-file-name dirname)))
-
-(defun winsav-save-config-to-file (conf-file)
- "Write elisp code to recreate all frames to CONF-FILE."
- (let (start
- end
- (sorted-frames (sort (frame-list) 'winsav-frame-sort-predicate))
- (frm-nr 0)
- frame-ecb
- layout-ecb)
- ;; Recreating invisible frames hits Emacs bug 3859
- (setq sorted-frames
- (delq nil
- (mapcar (lambda (f)
- (when (frame-parameter f 'visibility) f))
- sorted-frames)))
- (when (and (boundp 'ecb-minor-mode) ecb-minor-mode)
- (when (frame-live-p ecb-frame)
- (setq layout-ecb ecb-layout-name)
- (setq frame-ecb ecb-frame))
- (ecb-minor-mode -1)
- (sit-for 0) ;; Fix-me: is this needed?
- )
- (message "winsav-save-config:here a")
- (with-temp-buffer
- (let ((this-buffer (current-buffer)))
- (message "winsav-save-config:here b")
- ;;(erase-buffer)
- (insert
- ";; -*- mode: emacs-lisp; coding: utf-8; -*-\n"
- ";; --------------------------------------------------------------------------\n"
- ";; Winsav File for Emacs\n"
- ";; --------------------------------------------------------------------------\n"
- ";; Created " (current-time-string) "\n"
- ";; Winsav file format version " winsav-file-version "\n"
- ";; Emacs version " emacs-version "\n\n"
- "(if (not (winsav-can-read-config " winsav-file-version "))\n\n"
- " (message \"Winsav: Can't read config file with version " winsav-file-version "\")\n")
- (message "winsav-save-config:here c")
- (insert ";; ---- indirect buffers ------------------------\n")
- (winsav-save-indirect-buffers this-buffer)
- (message "winsav-save-config:here c.1")
- ;;(insert ";; ---- special minibuffers ------------------------\n")
- (winsav-save-minibuffers sorted-frames this-buffer)
- (message "winsav-save-config:here c.2")
- (insert "(setq winsav-loaded-frames nil)\n")
- (insert ";; ---- before winsav-before-save-configuration-hook ------------------------\n")
- (run-hooks 'winsav-before-save-configuration-hook)
- (message "winsav-save-config:here c.2a cb=%s" (current-buffer))
- (insert ";; ---- after winsav-before-save-configuration-hook ------------------------\n\n")
- (dolist (frm sorted-frames)
- (let ((mb-frm-nr (cadr (assoc frm-nr winsav-minibuffer-alist)))
- ;;(mb-frm (when mb-frm-nr (nth mb-frm-nr sorted-frames)))
- )
- (message "winsav-save-config:here c.2b.1 tb=%s cb=%s frm=%s" this-buffer (current-buffer) frm)
- (winsav-save-frame frm mb-frm-nr this-buffer)
- (message "winsav-save-config:here c.2b.2")
- (setq frm-nr (1+ frm-nr))))
- (message "winsav-save-config:here c.2c cb=%s" (current-buffer))
- (insert ";; ---- dedicated windows ------------------------\n")
- (winsav-save-dedicated-windows sorted-frames)
- (message "winsav-save-config:here c.3")
- (insert ";; ---- ECB --------------------------------------\n")
- (winsav-save-ecb frame-ecb layout-ecb sorted-frames)
- (message "winsav-save-config:here c.4")
- (insert "\n\n;; ---- before winsav-after-save-configuration-hook ------------------------\n")
- (run-hooks 'winsav-after-save-configuration-hook)
- (message "winsav-save-config:here c.5")
- (insert "\n\n;; ---- before winsav-after-save-configuration-hook ------------------------\n")
- (run-hooks 'winsav-after-save-configuration-hook)
- (message "winsav-save-config:here c.6")
- (insert ";; ---- after winsav-after-save-configuration-hook ------------------------\n")
- (insert "\n)\n")
- (message "winsav-save-config:here d")
- ;; For pp-buffer:
- (let (emacs-lisp-mode-hook
- after-change-major-mode-hook
- change-major-mode-hook)
- (font-lock-mode -1)
- (emacs-lisp-mode))
- (message "winsav-save-config:here e")
- (pp-buffer)
- (message "winsav-save-config:here f")
- (indent-region (point-min) (point-max))
- (message "winsav-save-config:here g")
- ;;(save-buffer 0) ;; No backups
- ;;(kill-buffer)
-
- ;;(with-current-buffer (find-file-noselect file)
- (let ((coding-system-for-write 'utf-8))
- (write-region (point-min) (point-max) conf-file nil 'nomessage))
- (setq winsav-file-modtime (nth 5 (file-attributes conf-file)))
- (setq winsav-dirname (file-name-as-directory (file-name-directory conf-file)))
- (message "winsav-save-config:here h")
- ))))
-
-(defvar winsav-current-config-name nil)
-
-;;(winsav-restore-configuration)
-;;(winsav-full-file-name "~")
-;; (defun winsav-restore-winsav-configuration ()
-;; )
-
-(defcustom winsav-after-restore-hook nil
- "Normal hook run after a successful `winsav-restore-configuration'."
- :type 'hook
- :group 'winsav)
-
-;; Like desktop-read, fix-me
-(defun winsav-restore-configuration (&optional dirname)
- "Restore frames from default file in directory DIRNAME.
-The default file is given by `winsav-default-file-name'.
-
-The file was probably written by `winsav-save-configuration'.
-Delete the frames that were used before."
- ;;(message "winsav-restore-configuration %s" dirname)
- (winsav-restore-config-from-file (winsav-full-file-name dirname)))
-
-(defun winsav-restore-config-from-file (conf-file)
- "Restore frames from configuration file CONF-FILE.
-The file was probably written by `winsav-save-configuration'.
-Delete the frames that were used before."
- (let ((old-frames (sort (frame-list) 'winsav-frame-sort-predicate))
- (num-old-deleted 0)
- ;; Avoid winsav saving during restore.
- (winsav-save nil))
- ;;(message "winsav:conf-file=%s" conf-file)
- (if (or (not conf-file)
- (not (file-exists-p conf-file)))
- (progn
- (message (propertize "Winsav: No default configuration file found"
- 'face 'secondary-selection))
- t) ;; Ok
- (setq debug-on-error t) ;; fix-me
- (if (file-exists-p conf-file)
- (progn
- (load conf-file nil nil t)
- (setq winsav-file-modtime (nth 5 (file-attributes conf-file)))
- (setq winsav-dirname (file-name-as-directory (file-name-directory conf-file)))
- (when (< 0 (length winsav-loaded-frames))
- (dolist (old (reverse old-frames))
- (unless (eq 'only (frame-parameter old 'minibuffer))
- (setq num-old-deleted (1+ num-old-deleted))
- (delete-frame old)))
- )
- (message "winsav-after-restore-hook =%S" winsav-after-restore-hook)
- (run-hooks 'winsav-after-restore-hook)
- (message "Winsav: %s frame(s) restored" (length winsav-loaded-frames))
- t)
- ;; No winsav file found
- ;;(winsav-clear)
- (message "No winsav file: %s" conf-file)
- nil))))
-
-;; (defcustom winsav-add-to-desktop nil
-;; "Set this to let desktop save and restore also winsav configurations."
-;; :type 'boolean
-;; :set (lambda (sym val)
-;; (set-default sym val)
-;; (if value
-;; (progn
-;; (add-hook 'desktop-after-read-hook 'winsav-restore-configuration)
-;; (add-hook 'desktop-save-hook 'winsav-save-configuration))
-;; (remove-hook 'desktop-after-read-hook 'winsav-restore-configuration)
-;; (remove-hook 'desktop-save-hook 'winsav-save-configuration)) )
-;; :group 'winsav)
-
-(defun winsav-restore-configuration-protected (&optional dirname)
- "Like `winsav-restore-configuration' but protect for errors.
-DIRNAME has the same meaning."
- (condition-case err
- (winsav-restore-configuration dirname)
- (error
- (message "winsav-restore-configuration: %s" err))))
-
-(defun winsav-relative-~-or-full (dirname)
- (let* ((rel-dir (file-relative-name dirname
- (file-name-directory
- (winsav-full-file-name "~"))))
- (confname (if (string= ".." (substring rel-dir 0 2))
- winsav-dirname
- (if (string= rel-dir "./")
- "(default)"
- (concat "~/" rel-dir)))))
- confname))
-
-(defun winsav-tell-configuration ()
- "Tell which winsav configuration that is used."
- (interactive)
- (save-match-data ;; runs in timer
- (let ((confname (if (not winsav-dirname)
- "(none)"
- (winsav-relative-~-or-full winsav-dirname))))
- (if t ;;(called-interactively-p)
- (message (propertize (format "Current winsav config is '%s'" confname)
- 'face 'secondary-selection))
- (save-window-excursion
- (delete-other-windows)
- (set-window-buffer (selected-window)
- (get-buffer-create " *winsav*"))
- (with-current-buffer (window-buffer)
- (momentary-string-display
- (propertize
- (format "\n\n\n Current winsav config is '%s'\n\n\n\n" confname)
- 'face 'secondary-selection)
- (window-start)
- (kill-buffer))))))))
-
-(defun winsav-tell-configuration-request ()
- "Start an idle timer to call `winsav-tell-configuration'."
- (run-with-idle-timer 1 nil 'winsav-tell-configuration))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Startup and shut down
-
-;; Run after desktop at startup so that desktop has loaded files and
-;; buffers.
-(defun winsav-after-init ()
- "Restore frames and windows.
-Run this once after Emacs startup, after desktop in the
-`after-init-hook'."
- ;; Turn off with --no-deskttop:
- (unless desktop-save-mode (winsav-save-mode -1))
- (when winsav-save-mode
- ;;(run-with-idle-timer 0.1 nil 'winsav-restore-configuration-protected)
- ;;(message "winsav-after-init")
- ;;(winsav-restore-configuration-protected)
- ;; In case of error make sure winsav-save-mode is turned off
- (setq inhibit-startup-screen t)
- (winsav-save-mode -1)
- (winsav-restore-configuration)
- (winsav-save-mode 1)
- ))
-
-(add-hook 'after-init-hook 'winsav-after-init t)
-
-(add-hook 'kill-emacs-hook 'winsav-kill)
-;;(remove-hook 'kill-emacs-hook 'winsav-kill)
-
-(defun winsav-kill ()
- "Save winsav frame configuration.
-Run this before Emacs exits."
- ;; (when winsav-save-mode
- ;; (let ((conf-dir (when winsav-current-config-name
- ;; (winsav-full-config-dir-name winsav-current-config-name))))
- ;; (winsav-save-configuration conf-dir))))
- (when (and winsav-save-mode
- (let ((exists (file-exists-p (winsav-full-file-name))))
- (or (eq winsav-save t)
- (and exists (memq winsav-save '(ask-if-new if-exists)))
- (and
- (or (memq winsav-save '(ask ask-if-new))
- (and exists (eq winsav-save 'ask-if-exists)))
- (y-or-n-p "Save winsav? ")))))
- (unless winsav-dirname
- ;; Fix-me: Since this can be a new user of winsav I think the
- ;; best thing to do here is to encourage the user to save in the
- ;; default directory since otherwise the winsav file will not be
- ;; loaded at startup. Desktop does not currently do that however
- ;; (report that!).
- (when (y-or-n-p "Winsav was not loaded from file. Save it to file? ")
- (let* ((full-file (winsav-full-file-name))
- (default-directory (directory-file-name
- (file-name-directory full-file))))
- (setq winsav-dirname
- (file-name-as-directory
- (expand-file-name
- (read-directory-name "Directory for winsav file: " nil nil t)))))))
- (when winsav-dirname
- (condition-case err
- ;;(winsav-save winsav-dirname t)
- (winsav-save-configuration winsav-dirname)
- (file-error
- (unless (yes-or-no-p
- (format "Error while saving winsav config: %s Save anyway? "
- (error-message-string err)))
- (signal (car err) (cdr err)))))))
- ;; If we own it, we don't anymore.
- ;;(when (eq (emacs-pid) (winsav-owner)) (winsav-release-lock))
- )
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Switching configurations
-
-(defun winsav-restore-full-config (dirname)
- "Restore the winsav configuration in directory DIRNAME.
-If NAME is nil then restore the startup configuration."
- ;;(desktop-change-dir dirname)
- (when (and winsav-handle-also-desktop desktop-save-mode)
- (when (eq (emacs-pid) (desktop-owner)) (desktop-release-lock))
- (desktop-clear)
- (desktop-read dirname))
- (winsav-restore-configuration dirname)
- ;;(setq winsav-current-config-name name)
- (winsav-tell-configuration-request))
-
-(defun winsav-full-config-dir-name (name)
- "Return full directory path where configuration NAME is stored."
- (let* ((base-dir (concat (winsav-full-file-name) ".d"))
- (conf-dir (expand-file-name name base-dir)))
- (setq conf-dir (file-name-as-directory conf-dir))
- ;;(message "conf-dir=%s" conf-dir)
- conf-dir))
-
-;;;###autoload
-(defun winsav-save-full-config (dirname)
- "Saved current winsav configuration in directory DIRNAME.
-Then change to this configuration.
-
-See also `winsav-switch-config'."
- (unless (file-name-absolute-p dirname)
- (error "Directory ame must be absolute: %s" dirname))
- (let* ((conf-dir (or dirname "~"))
- (old-conf-dir winsav-dirname))
- (make-directory conf-dir t)
- (winsav-save-configuration conf-dir)
- (when (and winsav-handle-also-desktop desktop-save-mode)
- (desktop-release-lock)
- (desktop-save conf-dir))
- ;;(unless (string= winsav-current-config-name name)
- (unless (string= old-conf-dir conf-dir)
- ;;(setq winsav-current-config-name name)
- (winsav-tell-configuration-request))))
-
-;; Fix-me: remove named configurations, use just dir as desktop
-(defun winsav-switch-to-default-config ()
- "Change to default winsav configuration.
-See also `winsav-switch-config'."
- (interactive)
- (winsav-switch-config "~"))
-
-;;;###autoload
-(defun winsav-switch-config (dirname)
- "Change to winsav configuration in directory DIRNAME.
-If DIRNAME is the current winsav configuration directory then
-offer to save it or restore it from saved values.
-
-Otherwise, before switching offer to save the current winsav
-configuration. Then finally switch to the new winsav
-configuration, creating it if it does not exist.
-
-If option `desktop-save-mode' is on then buffers and files are also
-restored and saved the same way.
-
-See also option `winsav-save-mode' and command
-`winsav-tell-configuration'."
- (interactive
- (list
- (let ((default-directory (or winsav-dirname default-directory))
- (base-dir (concat (winsav-full-file-name) ".d"))
- new-dir)
- (make-directory base-dir t)
- (setq new-dir
- (read-directory-name "Winsav: Switch config directory: "))
- (when (string= "" new-dir) (setq new-dir nil))
- (or new-dir
- "~"))))
- (setq dirname (file-name-as-directory (expand-file-name dirname)))
- (catch 'stop
- (let ((conf-file (expand-file-name winsav-base-file-name dirname))
- config-exists)
- (if (file-exists-p conf-file)
- (setq config-exists t)
- (unless (y-or-n-p (format "%s was not found. Create it? " conf-file))
- (throw 'stop nil)))
- (if (string= winsav-dirname dirname)
- (if (y-or-n-p "You are already using this configuration, restore it from saved values? ")
- (winsav-restore-full-config winsav-dirname)
- (when (y-or-n-p "You are already using this winsav configuration, save it? ")
- (winsav-save-full-config winsav-dirname)))
- (when (y-or-n-p
- (format "Save current config, %s,\n first before switching to %s? "
- (if (and winsav-dirname
- (not (string= winsav-dirname
- (file-name-directory (winsav-full-file-name "~")))))
- winsav-dirname
- "the startup config")
- dirname))
- (winsav-save-full-config winsav-dirname))
- (if config-exists
- (winsav-restore-full-config dirname)
- (winsav-save-full-config dirname))))))
-
-
-
-
-;;; Old things
-
-;; (defun winsav-log-buffer ()
-;; (get-buffer-create "winsav log buffer"))
-
-;; (defun winsav-log (mark obj)
-;; (with-current-buffer (winsav-log-buffer)
-;; (insert "=== " mark "===\n" (pp-to-string obj))))
-
-;; (global-set-key [f2] 'winsav-test-get)
-;; (global-set-key [f3] 'winsav-test-put)
-;; (defvar winsav-saved-window-tree nil)
-
-;; (defun winsav-test-get()
-;; (interactive)
-;; (setq winsav-saved-window-tree (winsav-get-window-tree)))
-
-;; (defun winsav-test-put()
-;; (interactive)
-;; (let ((ret (winsav-put-window-tree winsav-saved-window-tree
-;; (selected-window))))
-;; ;;(message "ret=%s" ret)
-;; ))
-
-;; (defun winsav-serialize-to-file (obj file)
-;; (with-current-buffer (find-file-noselect file)
-;; ;;(erase-buffer)
-;; (save-restriction
-;; (widen)
-;; (goto-char (point-max))
-;; (insert (winsav-serialize obj)
-;; "\n"))
-;; ;;(basic-save-buffer)
-;; ))
-
-;;(global-set-key [f11] 'winsav-rotate)
-
-;; (defun winsav-de-serialize-window-tree-from-file (file)
-;; (with-current-buffer (find-file-noselect file)
-;; (save-restriction
-;; (widen)
-;; (let ((start (point))
-;; (end nil))
-;; (forward-list)
-;; (setq end (point))
-;; ;;(goto-char (point-min))
-;; (winsav-de-serialize-window-tree (buffer-substring-no-properties start end))))))
-
-;; (defun winsav-restore-from-file (file)
-;; (winsav-put-window-tree
-;; (winsav-de-serialize-window-tree-from-file file)
-;; (selected-window)))
-
-;; (defun winsav-de-serialize-window-tree (str)
-;; (save-match-data
-;; (let ((read-str
-;; (replace-regexp-in-string (rx "#<buffer "
-;; (1+ (not (any ">")))
-;; ">")
-;; "buffer"
-;; str))
-;; obj-last
-;; obj
-;; last)
-;; (setq read-str
-;; (replace-regexp-in-string (rx "#<window "
-;; (1+ (not (any ">")))
-;; ">")
-;; "nil"
-;; read-str))
-;; (setq obj-last (read-from-string read-str))
-;; (setq obj (car obj-last))
-;; (setq last (cdr obj-last))
-;; ;; Fix me, maby check there are only spaces left (or trim them above...)
-;; obj)))
-
-(provide 'winsav)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; winsav.el ends here
diff --git a/emacs.d/nxhtml/util/winsize.el b/emacs.d/nxhtml/util/winsize.el
deleted file mode 100644
index 808daf5..0000000
--- a/emacs.d/nxhtml/util/winsize.el
+++ /dev/null
@@ -1,1173 +0,0 @@
-;;; winsize.el --- Interactive window structure editing
-;;
-;; Author: Lennart Borgman <lennart dot borgman at gmail dot com >
-;; Maintainer:
-;; Created: Wed Dec 07 15:35:09 2005
-(defconst winsize:version "0.98") ;;Version: 0.97
-;; Lxast-Updated: Sun Nov 18 02:14:52 2007 (3600 +0100)
-;; Keywords:
-;; Compatibility:
-;;
-;; Fxeatures that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; This file contains functions for interactive resizing of Emacs
-;; windows. To use it put it in your `load-path' and add the following
-;; to your .emacs:
-;;
-;; (require 'winsize)
-;; (global-set-key [(control x) ?+] 'resize-windows)
-;;
-;; For more information see `resize-windows'.
-;;
-;; These functions are a slightly rewritten version of the second part
-;; of the second part my proposal for a new `balance-windows' function
-;; for Emacs 22. The rewrite is mostly a restructure to more easily
-;; add new functions. All functions and variables have been renamed.
-;; The file was originally named bw-interactive.el.
-;;
-;; New ideas for functionality have been to a large part adopted from
-;; the Emacs Devel mailing list. Probably most of them originated from
-;; Drew Adams and Bastien.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; TODO: Change mouse pointer shape during resizing.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'windmove))
-(eval-when-compile (require 'view))
-(eval-when-compile (require 'winsav nil t))
-(eval-when-compile (require 'ourcomments-widgets))
-(eval-when-compile (require 'ring))
-
-;;; Custom variables
-
-(defcustom winsize-juris-way t
- ""
- :type 'boolean
- :group 'winsize)
-
-(defcustom winsize-autoselect-borders t
- "Determines how borders are selected by default.
-If nil hever select borders automatically (but keep them on the
-same side while changing window). If 'when-single select border
-automatically if there is only one possible choice. If t alwasy
-select borders automatically if they are not selected."
- :type '(choice (const :tag "Always" t)
- (const :tag "When only one possbility" when-single)
- (const :tag "Never" nil))
- :group 'winsize)
-
-(defcustom winsize-mode-line-colors (list t (list "green" "green4"))
- "Mode line colors used during resizing."
- :type '(list (boolean :tag "Enable mode line color changes during resizing")
- (list
- (color :tag "- Active window mode line color")
- (color :tag "- Inactive window mode line color")))
- :group 'winsize)
-
-(defcustom winsize-mark-selected-window t
- "Mark selected window if non-nil."
- :type 'boolean
- :group 'winsize)
-
-(defcustom winsize-make-mouse-prominent t
- "Try to make mouse more visible during resizing.
-The mouse is positioned next to the borders that you can move.
-It can however be hard to see if where it is. Setting this to on
-makes the mouse jump a few times."
- :type 'boolean
- :group 'winsize)
-
-(defvar widget-command-prompt-value-history nil
- "History of input to `widget-function-prompt-value'.")
-
-(defvar winsize-keymap nil
- "Keymap used by `resize-windows'.")
-
-(defun winsize-make-keymap (let-me-use)
- "Build the keymap that should be used by `winsize-keymap'."
- (let ((map (make-sparse-keymap "Window Resizing")))
- (when (featurep 'winsav)
- (define-key map [menu-bar bw rotate]
- '("Rotate window configuration" . winsav-rotate))
- (define-key map [menu-bar bw sep3] '(menu-item "--")))
- (define-key map [menu-bar bw]
- (cons "Resize" (make-sparse-keymap "second")))
- (define-key map [menu-bar bw save-config]
- '("Save window configuration" . winsize-save-window-configuration))
- (define-key map [menu-bar bw next-config]
- '("Next saved window configuration" . winsize-next-window-configuration))
- (define-key map [menu-bar bw prev-config]
- '("Previous saved window configuration" . winsize-previous-window-configuration))
- (define-key map [menu-bar bw sep2] '(menu-item "--"))
- (define-key map [menu-bar bw fit]
- '("Fit Window to Buffer" . fit-window-to-buffer))
- (define-key map [menu-bar bw shrink]
- '("Shrink Window to Buffer" . shrink-window-if-larger-than-buffer))
- (define-key map [menu-bar bw sep1] '(menu-item "--"))
- (define-key map [menu-bar bw siblings]
- '("Balance Window Siblings" . winsize-balance-siblings))
- (define-key map [menu-bar bw balance]
- '("Balance Windows" . balance-windows))
-
- (when (featurep 'winsav)
- (define-key map [?|] 'winsav-rotate))
- (define-key map [?+] 'balance-windows)
- (define-key map [?.] 'winsize-balance-siblings)
- (define-key map [?=] 'fit-window-to-buffer)
- (define-key map [?-] 'shrink-window-if-larger-than-buffer)
-
- (define-key map [(up)] 'winsize-move-border-up)
- (define-key map [(down)] 'winsize-move-border-down)
- (define-key map [(left)] 'winsize-move-border-left)
- (define-key map [(right)] 'winsize-move-border-right)
-
- (define-key map [(shift up)] 'winsize-move-other-border-up)
- (define-key map [(shift down)] 'winsize-move-other-border-down)
- (define-key map [(shift left)] 'winsize-move-other-border-left)
- (define-key map [(shift right)] 'winsize-move-other-border-right)
-
- (define-key map [(meta left)] 'winsize-to-border-or-window-left)
- (define-key map [(meta up)] 'winsize-to-border-or-window-up)
- (define-key map [(meta right)] 'winsize-to-border-or-window-right)
- (define-key map [(meta down)] 'winsize-to-border-or-window-down)
-
- (define-key map [?0] 'delete-window)
- (define-key map [?1] 'delete-other-windows)
- (define-key map [?2] 'split-window-vertically)
- (define-key map [?3] 'split-window-horizontally)
- (define-key map [?4] 'other-window)
-
- (define-key map [?!] 'winsize-save-window-configuration)
- (define-key map [?>] 'winsize-next-window-configuration)
- (define-key map [?<] 'winsize-previous-window-configuration)
-
- ;; Fix-me: These keys could also be set to nil
- (define-key map [mouse-1] 'mouse-set-point)
- ;;(define-key map [down-mouse-1] 'mouse-set-point)
- (define-key map [(mode-line) (down-mouse-1)] 'mouse-drag-mode-line)
- (define-key map [(vertical-line) (down-mouse-1)] 'mouse-drag-vertical-line)
- (define-key map [(vertical-scroll-bar) (mouse-1)] 'scroll-bar-toolkit-scroll)
-
- (define-key map [??] 'winsize-help)
- (define-key map [(control ?g)] 'winsize-quit)
- (define-key map [(control return)] 'winsize-stop-go-back)
- (define-key map [(return)] 'winsize-stop)
- (define-key map [t] 'winsize-stop-and-execute)
-
- (dolist (ks let-me-use)
- (if (and (not (vectorp ks))
- (not (stringp ks))
- (commandp ks))
- (let ((ks-list (where-is-internal ks)))
- (dolist (ks ks-list)
- (unless (lookup-key map ks)
- (define-key map ks nil))))
- (unless (lookup-key map ks)
- (define-key map ks nil))))
-
- (setq winsize-keymap map)))
-
-(defcustom winsize-let-me-use '(next-line ;;[(control ?n)]
- previous-line ;;[(control ?p)]
- forward-char ;;[(control ?f)]
- backward-char ;;[(control ?b)]
- [(home)]
- [(end)]
- ;; Fix-me: replace this with something
- ;; pulling in help-event-list:
- [(f1)]
- execute-extended-command
- eval-expression)
- "Key sequences or commands that should not be overriden during resize.
-The purpose is to make it easier to switch windows. The functions
-`windmove-left' etc depends on the position when chosing the
-window to move to."
- :type '(repeat
- (choice
- ;; Note: key-sequence must be before command here, since
- ;; the key sequences seems to match command too.
- key-sequence command))
- :set (lambda (sym val)
- (set-default sym val)
- (winsize-make-keymap val))
- :group 'winsize)
-
-(defcustom winsize-selected-window-face 'winsize-selected-window-face
- "Variable holding face for marking selected window.
-This variable may be nil or a face symbol."
- :type '(choice (const :tag "Do not mark selected window" nil)
- face)
- :group 'winsize)
-
-(defface winsize-selected-window-face
- '((t (:inherit secondary-selection)))
- "Face for marking selected window."
- :group 'winsize)
-
-
-;;; These variables all holds values to be reset when exiting resizing:
-
-(defvar winsize-old-mode-line-bg nil)
-(defvar winsize-old-mode-line-inactive-bg nil)
-(defvar winsize-old-overriding-terminal-local-map nil)
-(defvar winsize-old-overriding-local-map-menu-flag nil)
-(defvar winsize-old-temp-buffer-show-function nil)
-(defvar winsize-old-mouse-avoidance-mode nil
- "Hold the value of `mouse-avoidance-mode' at resizing start.")
-(defvar winsize-old-view-exit-action nil)
-(make-variable-buffer-local 'winsize-old-view-exit-action)
-
-(defvar winsize-message-end nil
- "Marker, maybe at end of message buffer.")
-
-(defvar winsize-resizing nil
- "t during resizing, nil otherwise.")
-
-(defvar winsize-window-config-init nil
- "Hold window configuration from resizing start.")
-
-(defvar winsize-frame nil
- "Frame that `resize-windows' is operating on.")
-
-
-;;; Borders
-
-(defvar winsize-window-for-side-hor nil
- "Window used internally for resizing in vertical direction.")
-
-(defvar winsize-window-for-side-ver nil
- "Window used internally for resizing in horizontal direction.")
-
-(defvar winsize-border-hor nil
- "Use internally to remember border choice.
-This is set by `winsize-pre-command' and checked by
-`winsize-post-command', see the latter for more information.
-
-The value should be either nil, 'left or 'right.")
-
-(defvar winsize-border-ver nil
- "Use internally to remember border choice.
-This is set by `winsize-pre-command' and checked by
-`winsize-post-command', see the latter for more information.
-
-The value should be either nil, 'up or 'down.")
-
-(defvar winsize-window-at-entry nil
- "Window that was selected when `resize-windows' started.")
-
-
-;;; Keymap, interactive functions etc
-
-(defun winsize-pre-command ()
- "Do this before every command.
-Runs this in `pre-command-hook'.
-
-Remember the currently used border sides for resizing. Also
-remember position in message buffer to be able to see if next
-command outputs some message.
-
-For more information see `winsize-post-command'."
- (setq winsize-message-end (winsize-message-end))
- (setq winsize-border-hor (winsize-border-used-hor))
- (setq winsize-border-ver (winsize-border-used-ver)))
-
-(defun winsize-post-command ()
- "Done after every command.
-Run this in `post-command-hook'.
-
-Check the border sides \(left/right, up/down) remembered in
-`winsize-pre-command' and use the the same side if possible,
-otherwise the opposite side if that is possible. \(This check is
-of course not done if the last command changed the border side.)
-
-The reason for selecting borders this way is to try to give the
-user a coherent and easy picture of what is going on when
-changing window or when window structure is changed. \(Note that
-the commands moving to another window or changing the window
-structure does not have to belong to this package. Those commands
-can therefore not select the border sides.)
-
-Give the user feedback about selected window and borders. Also
-give a short help message unless last command gave some message."
- (unless winsize-juris-way
- (unless winsize-border-hor
- (winsize-select-initial-border-hor))
- (when winsize-border-hor
- (winsize-set-border winsize-border-hor t))
- (unless winsize-border-ver
- (winsize-select-initial-border-ver))
- (when winsize-border-ver
- (winsize-set-border winsize-border-ver t)))
- (winsize-tell-user))
-
-;;;###autoload
-(defun resize-windows ()
- "Start window resizing.
-During resizing a window is selected. You can move its
-borders. In the default configuration the arrow keys moves the
-right or bottom border if they are there. To move the opposite
-border use S-arrowkeys.
-
-You can also do other window operations, like splitting, deleting
-and balancing the sizes. The keybindings below describes the key
-bindings during resizing:\\<winsize-keymap>
-
- `balance-windows' \\[balance-windows]
- `winsize-balance-siblings' \\[winsize-balance-siblings]
- `fit-window-to-buffer' \\[fit-window-to-buffer]
- `shrink-window-if-larger-than-buffer' \\[shrink-window-if-larger-than-buffer]
-
- `winsav-rotate' \\[winsav-rotate]
-
- `winsize-move-border-up' \\[winsize-move-border-up]
- `winsize-move-border-down' \\[winsize-move-border-down]
- `winsize-move-border-left' \\[winsize-move-border-left]
- `winsize-move-border-right' \\[winsize-move-border-right]
-
- `winsize-to-border-or-window-left' \\[winsize-to-border-or-window-left]
- `winsize-to-border-or-window-up' \\[winsize-to-border-or-window-up]
- `winsize-to-border-or-window-right' \\[winsize-to-border-or-window-right]
- `winsize-to-border-or-window-down' \\[winsize-to-border-or-window-down]
-
- Note that you can also use your normal keys for
- `forward-char', `backward-char', `next-line', `previous-line'
- and what you have on HOME and END to move in the windows. That
- might sometimes be necessary to directly select a
- window. \(You may however also use `other-window' or click
- with the mouse, see below.)
-
- `delete-window' \\[delete-window]
- `delete-other-windows' \\[delete-other-windows]
- `split-window-vertically' \\[split-window-vertically]
- `split-window-horizontally' \\[split-window-horizontally]
- `other-window' \\[other-window]
-
- `winsize-save-window-configuration' \\[winsize-save-window-configuration]
- `winsize-next-window-configuration' \\[winsize-next-window-configuration]
- `winsize-previous-window-configuration' \\[winsize-previous-window-configuration]
-
- `mouse-set-point' \\[mouse-set-point]
-
- `winsize-quit' \\[winsize-quit]
- `winsize-stop-go-back' \\[winsize-stop-go-back]
- `winsize-stop' \\[winsize-stop]
- `winsize-stop-and-execute' \\[winsize-stop-and-execute]
-
- `winsize-help' \\[winsize-help]
- `describe-key' \\[describe-key]
- `describe-key-briefly' \\[describe-key-briefly]
- (All the normal help keys work, and at least those above will
- play well with resizing.)
-
-Nearly all other keys exits window resizing and they are also
-executed. However, the key sequences in `winsize-let-me-use' and
-dito for commands there are also executed without exiting
-resizing.
-
-The colors of the modelines are changed to those given in
-`winsize-mode-line-colors' to indicate that you are resizing
-windows. To make this indication more prominent the text in the
-selected window is marked with the face hold in the variable
-`winsize-selected-window-face'.
-
-The option `winsize-juris-way' decides how the borders to move
-are selected. If this option is non-nil then the right or bottom
-border are the ones that are moved with the arrow keys and the
-opposite border with shift arrow keys.
-
-If `winsize-juris-way' is nil then the following apply:
-
-As you select other borders or move to new a window the mouse
-pointer is moved inside the selected window to show which borders
-are beeing moved. The mouse jumps a little bit to make its
-position more visible. You can turn this off by customizing
-`winsize-make-mouse-prominent'.
-
-Which borders initially are choosen are controlled by the
-variable `winsize-autoselect-borders'.
-
-** Example: Border selection, movements and windows.
-
- Suppose you have a frame divided into windows like in the
- figure below. If window B is selected when you start resizing
- then \(with default settings) the borders marked with 'v' and
- 'h' will be the ones that the arrow keys moves. To indicate
- this the mouse pointer is placed in the right lower corner of
- the selected window B.
-
- +----------+-----------+--------+
- | | v |
- | | v |
- | A | _B_ v |
- | | v |
- | | v |
- | | x v |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
- Now if you press M-<left> then the picture below shows what has
- happened. Note that the selected vertical border is now the one
- between A and B. The mouse pointer has moved to the
- corresponding corner in the window B, which is still selected.
-
- +----------+-----------+--------+
- | v | |
- | v | |
- | A v _B_ | |
- | v | |
- | v | |
- | v x | |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
- Press M-<left> once again. This gives this picture:
-
- +----------+-----------+--------+
- | v | |
- | v | |
- | _A_ v B | |
- | v | |
- | v | |
- | x v | |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
- Note that the window A is now selected. However there is no
- border that could be moved to the left of this window \(which
- would otherwise be chosen now) so the border between A and B is
- still the one that <left> and <right> moves. The mouse has
- moved to A.
-
- If we now delete window A the new situation will look like
- this:
-
- +----------+-----------+--------+
- | | |
- | | |
- | _B_ | |
- | | |
- | | |
- | x | |
- +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+
- | | |
- | | |
- | | |
- | | |
- | | |
- | | |
- +----------+---------+----------+
-
-
-
->>>> testing stuff >>>>
-`help-mode-hook'
-`temp-buffer-show-function'
-`view-exit-action'
-<<<<<<<<<<<<<<<<<<<<<<<
-"
- (interactive)
- (setq winsize-resizing t)
- ;; Save old values:
- (unless winsize-old-mouse-avoidance-mode
- (setq winsize-old-mouse-avoidance-mode mouse-avoidance-mode))
- ;; Setup user feedback things:
- (mouse-avoidance-mode 'none)
- (winsize-set-mode-line-colors t)
- (winsize-create-short-help-message)
- (setq winsize-message-end (winsize-message-end))
- ;; Save config for exiting:
- (setq winsize-window-config-init (current-window-configuration))
- (setq winsize-window-at-entry (selected-window))
- (setq winsize-frame (selected-frame))
- ;; Setup keymap and command hooks etc:
- (winsize-setup-local-map)
- (winsize-add-command-hooks)
- (setq winsize-window-for-side-hor nil)
- (setq winsize-window-for-side-ver nil))
-
-
-(defun winsize-setup-local-map ()
- "Setup an overriding keymap and use this during resizing.
-Save current keymaps."
- ;; Fix-me: use copy-keymap for old?
- (unless winsize-old-overriding-terminal-local-map
- (setq winsize-old-overriding-terminal-local-map overriding-terminal-local-map))
- (setq overriding-terminal-local-map (copy-keymap winsize-keymap))
- (setq winsize-old-overriding-local-map-menu-flag overriding-local-map-menu-flag)
- (setq overriding-local-map-menu-flag t))
-
-(defun winsize-restore-local-map ()
- "Restore keymaps saved by `winsize-setup-local-map'."
- (setq overriding-terminal-local-map winsize-old-overriding-terminal-local-map)
- (setq winsize-old-overriding-terminal-local-map nil)
- (setq overriding-local-map-menu-flag winsize-old-overriding-local-map-menu-flag)
- (setq winsize-old-overriding-local-map-menu-flag nil))
-
-
-(defvar winsize-window-config-help nil
- "Hold window configuration when help is shown.")
-
-(defvar winsize-window-config-init-help nil
- "Hold window configuration from resizing start during help.")
-
-(defvar winsize-help-frame nil
- "The frame from which help was called.")
-
-(defun winsize-restore-after-help (buffer)
- "Restore window configuration after help.
-Raise frame and reactivate resizing."
- (remove-hook 'temp-buffer-setup-hook 'winsize-help-mode-hook-function)
- (setq temp-buffer-show-function winsize-old-temp-buffer-show-function)
- ;; Get rid of the view exit action and the extra text in the help
- ;; buffer:
- (with-current-buffer (help-buffer)
- (setq view-exit-action winsize-old-view-exit-action)
- (setq winsize-old-view-exit-action nil)
- (let ((here (point-marker))
- (inhibit-read-only t))
- (goto-char (point-min))
- (forward-line 2)
- (delete-region (point-min) (point))
- (goto-char (point-max))
- (forward-line -2)
- (delete-region (point) (point-max))
- (goto-char here)))
- ;; Restart resizing, restoring window configurations:
- (when (select-frame winsize-help-frame)
- (raise-frame)
- (set-window-configuration winsize-window-config-help)
- (resize-windows)
- (setq winsize-window-config-init winsize-window-config-init-help)))
-
-(defun winsize-help-mode-hook-function ()
- "Setup temp buffer show function to only run second step.
-The first step, `winsize-temp-buffer-show-function', has already been run."
- (setq temp-buffer-show-function 'winsize-temp-buffer-show-function-1))
-
-(defun winsize-temp-buffer-show-function (buffer)
- "First step of setup for showing help during resizing.
-This step is run when showing help during resizing.
-
-Save window configuration etc to be able to resume resizing. Stop
-resizing. Delete other windows.
-
-Run second step (`winsize-temp-buffer-show-function-1') and
-arrange so that second step is run when following help links."
- (setq winsize-window-config-help (current-window-configuration))
- (setq winsize-window-config-init-help winsize-window-config-init)
- (setq winsize-help-frame (selected-frame))
- (winsize-stop)
- (delete-other-windows)
- (winsize-temp-buffer-show-function-1 buffer)
- (add-hook 'temp-buffer-setup-hook 'winsize-help-mode-hook-function))
-
-(defun winsize-temp-buffer-show-function-1 (buffer)
- "Second step of setup for showing help during resizing.
-This is run after the first step when accessing help during
-resizing. It is also when following help links."
- (with-current-buffer buffer
- (let ((inhibit-read-only t)
- (buffer-read-only t) ;; It is reverted in `help-mode-finish'
- )
- (run-hooks 'temp-buffer-show-hook))
- (let ((here (point-marker))
- (str "*** Type q to return to window resizing ***"))
- (put-text-property 0 (length str) 'face 'highlight str)
- (goto-char (point-min))
- (insert str "\n\n")
- (goto-char (point-max))
- (insert "\n\n" str)
- (goto-char here)
- (setq buffer-read-only t))
- (unless winsize-old-view-exit-action
- (setq winsize-old-view-exit-action view-exit-action)
- (setq view-exit-action 'winsize-restore-after-help)))
- (set-window-buffer (selected-window) buffer)
- (message "Type q to return to window resizing"))
-
-(defun winsize-help ()
- "Give help during resizing.
-Save current window configuration and pause resizing."
- (interactive)
- (if pop-up-frames
- (progn
- (winsize-exit-resizing nil)
- (describe-function 'resize-windows))
- ;; Fix-me: move setup of view-exit-action etc here. Or was it
- ;; temp-buffer-show-function?
- ;; Setup help hooks etc:
- (unless (or winsize-old-temp-buffer-show-function
- ;; These things should not happen... :
- (eq temp-buffer-show-function 'winsize-temp-buffer-show-function)
- (eq temp-buffer-show-function 'winsize-temp-buffer-show-function-1))
- (setq winsize-old-temp-buffer-show-function temp-buffer-show-function))
- (setq temp-buffer-show-function 'winsize-temp-buffer-show-function)
- (with-output-to-temp-buffer (help-buffer)
- (with-current-buffer (help-buffer)
- (insert "resize-windows is ")
- (describe-function-1 'resize-windows)))))
-
-(defun winsize-quit ()
- "Quit resing, restore window configuration at start."
- (interactive)
- (set-window-configuration winsize-window-config-init)
- (winsize-exit-resizing nil))
-
-(defun winsize-stop-go-back ()
- "Exit window resizing. Go back to the window started in."
- (interactive)
- (winsize-exit-resizing nil t))
-
-(defun winsize-stop-and-execute ()
- "Exit window resizing and put last key on the input queue.
-Select the window marked during resizing before putting back the
-last key."
- ;; Fix-me: maybe replace this with a check of this-command in
- ;; post-command-hook instead?
- (interactive)
- (winsize-exit-resizing t))
-
-(defun winsize-stop ()
- "Exit window resizing.
-Select the window marked during resizing."
- (interactive)
- (winsize-exit-resizing nil))
-
-;;;###autoload
-(defun winsize-balance-siblings ()
- "Make current window siblings the same height or width.
-It works the same way as `balance-windows', but only for the
-current window and its siblings."
- (interactive)
- (balance-windows (selected-window)))
-
-(defun winsize-to-border-or-window-left ()
- "Switch to border leftwards, maybe moving to next window.
-If already at the left border, then move to left window, the same
-way `windmove-left' does."
- (interactive) (winsize-switch-border 'left t))
-
-(defun winsize-to-border-or-window-right ()
- "Switch to border rightwards, maybe moving to next window.
-For more information see `winsize-to-border-or-window-left'."
- (interactive) (winsize-switch-border 'right t))
-
-(defun winsize-to-border-or-window-up ()
- "Switch to border upwards, maybe moving to next window.
-For more information see `winsize-to-border-or-window-left'."
- (interactive) (winsize-switch-border 'up t))
-
-(defun winsize-to-border-or-window-down ()
- "Switch to border downwards, maybe moving to next window.
-For more information see `winsize-to-border-or-window-left'."
- (interactive) (winsize-switch-border 'down t))
-
-
-(defun winsize-move-border-left ()
- "Move border left, but select border first if not done."
- (interactive) (winsize-resize 'left nil))
-
-(defun winsize-move-border-right ()
- "Move border right, but select border first if not done."
- (interactive) (winsize-resize 'right nil))
-
-(defun winsize-move-border-up ()
- "Move border up, but select border first if not done."
- (interactive) (winsize-resize 'up nil))
-
-(defun winsize-move-border-down ()
- "Move border down, but select border first if not done."
- (interactive) (winsize-resize 'down nil))
-
-
-(defun winsize-move-other-border-left ()
- "Move border left, but select border first if not done."
- (interactive) (winsize-resize 'left t))
-
-(defun winsize-move-other-border-right ()
- "Move border right, but select border first if not done."
- (interactive) (winsize-resize 'right t))
-
-(defun winsize-move-other-border-up ()
- "Move border up, but select border first if not done."
- (interactive) (winsize-resize 'up t))
-
-(defun winsize-move-other-border-down ()
- "Move border down, but select border first if not done."
- (interactive) (winsize-resize 'down t))
-
-
-;;; Internals
-
-
-
-(defun winsize-exit-resizing (put-back-last-event &optional stay)
- "Stop window resizing.
-Put back mode line colors and keymaps that were changed.
-
-Upon exit first select window. If STAY is non-nil then select
-the window which was selected when `resize-windows' was called,
-otherwise select the last window used during resizing. After
-that, if PUT-BACK-LAST-EVENT is non-nil, put back the last input
-event on the input queue."
- (setq winsize-resizing nil)
- ;; Reset user feedback things:
- (mouse-avoidance-mode winsize-old-mouse-avoidance-mode)
- (setq winsize-old-mouse-avoidance-mode nil)
- (winsize-set-mode-line-colors nil)
- (winsize-mark-selected-window nil)
- ;; Remove all hooks etc for help:
- (if (or (eq winsize-old-temp-buffer-show-function 'winsize-temp-buffer-show-function)
- (eq winsize-old-temp-buffer-show-function 'winsize-temp-buffer-show-function-1))
- (setq temp-buffer-show-function nil)
- (setq temp-buffer-show-function winsize-old-temp-buffer-show-function))
- (setq winsize-old-temp-buffer-show-function nil)
- (remove-hook 'help-mode-hook 'winsize-help-mode-hook-function)
- (remove-hook 'temp-buffer-setup-hook 'winsize-help-mode-hook-function)
- ;; Restore keymap and command hooks:
- (winsize-restore-local-map)
- (winsize-remove-command-hooks)
- ;; Exit:
- (when stay (select-window winsize-window-at-entry))
- (message "Exited window resizing")
- (when (and put-back-last-event)
- ;; Add this to the input queue again:
- (isearch-unread last-command-event)))
-
-(defun winsize-add-command-hooks ()
- (add-hook 'pre-command-hook 'winsize-pre-command)
- (add-hook 'post-command-hook 'winsize-post-command))
-
-(defun winsize-remove-command-hooks ()
- (remove-hook 'pre-command-hook 'winsize-pre-command)
- (remove-hook 'post-command-hook 'winsize-post-command))
-
-
-;;; Borders
-
-(defun winsize-border-used-hor ()
- "Return the border side used for horizontal resizing."
- (let ((hor (when winsize-window-for-side-hor
- (if (eq (selected-window) winsize-window-for-side-hor)
- 'right
- 'left))))
- hor))
-
-(defun winsize-border-used-ver ()
- "Return the border side used for vertical resizing."
- (let ((ver (when winsize-window-for-side-ver
- (if (eq (selected-window) winsize-window-for-side-ver)
- 'down
- 'up))))
- ver))
-
-(defun winsize-switch-border (dir allow-windmove)
- "Switch border that is beeing resized.
-Switch to border in direction DIR. If ALLOW-WINDMOVE is non-nil
-then change window if necessary, otherwise stay and do not change
-border."
- (let* ((window-in-that-dir (windmove-find-other-window
- dir nil (selected-window))))
- (when (window-minibuffer-p window-in-that-dir)
- (setq window-in-that-dir nil))
- (if winsize-juris-way
- (if (not window-in-that-dir)
- (message "No window in that direction")
- (windmove-do-window-select dir nil))
- (if (not window-in-that-dir)
- (message "No window or border in that direction")
- (let* ((is-hor (memq dir '(left right)))
- (border-used (if is-hor
- (winsize-border-used-hor)
- (winsize-border-used-ver)))
- (using-dir-border (eq dir border-used)))
- (if using-dir-border
- (when allow-windmove
- (setq winsize-window-for-side-hor nil)
- (setq winsize-window-for-side-ver nil)
- (windmove-do-window-select dir nil)
- (message "Moved to new window"))
- (winsize-select-border dir)
- (message "Switched to border %swards" dir)))))))
-
-
-(defun winsize-select-initial-border-hor ()
- "Select a default border horizontally."
- (if winsize-juris-way
- (winsize-set-border 'right t)
- (let ((has-left (winsize-window-beside (selected-window) 'left))
- (has-right (winsize-window-beside (selected-window) 'right)))
- (cond
- ((not winsize-autoselect-borders) t)
- ((eq winsize-autoselect-borders 'when-single)
- (when (= 1 (length (delq nil (list has-left has-right))))
- (winsize-select-border 'right)))
- (t
- (winsize-select-border 'right))))))
-
-(defun winsize-select-initial-border-ver ()
- "Select a default border vertically."
- (if winsize-juris-way
- (winsize-set-border 'up t)
- (let ((has-up (winsize-window-beside (selected-window) 'up))
- (has-down (winsize-window-beside (selected-window) 'down)))
- (cond
- ((not winsize-autoselect-borders) t)
- ((eq winsize-autoselect-borders 'when-single)
- (when (= 1 (length (delq nil (list has-up has-down))))
- (winsize-select-border 'up)))
- (t
- (winsize-select-border 'up))))))
-
-(defun winsize-select-border (dir)
- "Select border to be set for resizing.
-The actually setting is done in `post-command-hook'."
- (cond
- ((memq dir '(left right))
- (setq winsize-border-hor dir))
- ((memq dir '(up down))
- (setq winsize-border-ver dir))
- (t (error "Bad DIR=%s" dir))))
-
-(defun winsize-set-border (dir allow-other-side)
- "Set border for resizing."
- (let ((window-beside (winsize-window-beside (selected-window) dir))
- (horizontal (memq dir '(left right))))
- (unless window-beside
- (when allow-other-side
- (setq dir (winsize-other-side dir))
- (setq window-beside
- (winsize-window-beside (selected-window) dir))))
- (if horizontal
- (progn
- (setq winsize-border-hor nil)
- (setq winsize-window-for-side-hor nil))
- (setq winsize-border-ver nil)
- (setq winsize-window-for-side-ver nil))
- (when window-beside
- (let ((window-for-side (if (memq dir '(right down))
- (selected-window)
- window-beside)))
- (if horizontal
- (setq winsize-window-for-side-hor window-for-side)
- (setq winsize-window-for-side-ver window-for-side))))))
-
-(defun winsize-resize (dir other-side)
- "Choose border to move. Or if border is chosen move that border.
-Used by `winsize-move-border-left' etc."
- (when winsize-juris-way
- (let ((bside (if (memq dir '(left right))
- (if other-side 'left 'right)
- (if other-side 'up 'down))))
- (winsize-set-border bside t)))
- (let* ((horizontal (memq dir '(left right)))
- (arg (if (memq dir '(left up)) -1 1))
- (window-for-side (if horizontal 'winsize-window-for-side-hor 'winsize-window-for-side-ver))
- (window-for-side-val (symbol-value window-for-side)))
- (if (not window-for-side-val)
- (winsize-select-border dir)
- (when (and winsize-resizing
- (not (eq window-for-side-val 'checked)))
- (condition-case err
- (adjust-window-trailing-edge (symbol-value window-for-side) arg horizontal)
- (error (message "%s" (error-message-string err))))))))
-
-(defun winsize-other-side (side)
- "Return other side for 'left etc, ie 'left => 'right."
- (cond
- ((eq side 'left) 'right)
- ((eq side 'right) 'left)
- ((eq side 'up) 'down)
- ((eq side 'down) 'up)
- (t (error "Invalid SIDE=%s" side))))
-
-(defun winsize-window-beside (window side)
- "Return a window directly beside WINDOW at side SIDE.
-That means one whose edge on SIDE is touching WINDOW. SIDE
-should be one of 'left, 'up, 'right and 'down."
- (require 'windmove)
- (let* ((windmove-wrap-around nil)
- (win (windmove-find-other-window side nil window)))
- (unless (window-minibuffer-p win)
- win)))
-
-
-;;; Window configs
-
-(defconst winsize-window-configuration-ring (make-ring 20)
- "Hold window configurations.")
-
-(defun winsize-ring-rotate (ring forward)
- (when (< 1 (ring-length ring))
- (if forward
- (ring-insert ring (ring-remove ring nil))
- (ring-insert-at-beginning ring (ring-remove ring 0)))))
-
-(defun winsize-ring-index (ring elem)
- (let ((memb (member elem (ring-elements ring))))
- (when memb
- (- (ring-length ring)
- (length memb)))))
-
-(defun winsize-previous-window-configuration ()
- (interactive)
- (winsize-goto-window-configuration nil))
-
-(defun winsize-next-window-configuration ()
- (interactive)
- (winsize-goto-window-configuration t))
-
-(defun winsize-goto-window-configuration (forward)
- (let* ((curr-conf (current-window-configuration))
- (ring winsize-window-configuration-ring)
- (idx (winsize-ring-index ring curr-conf)))
- (if idx
- (progn
- (setq idx (if forward (1- idx) (1+ idx)))
- (set-window-configuration (ring-ref ring idx)))
- ;; Unfortunately idx often seems to be nil so we will have to
- ;; rotate the ring (or something similar).
- (winsize-ring-rotate ring forward)
- (set-window-configuration (ring-ref ring 0)))))
-
-;;;###autoload
-(defun winsize-save-window-configuration ()
- (interactive)
- (let* ((curr-conf (current-window-configuration))
- (ring winsize-window-configuration-ring))
- (if (winsize-ring-index ring curr-conf)
- (error "Current configuration was already stored")
- (ring-insert ring curr-conf)
- (message "Saved window config, use '<' or '>' to get it back"))))
-
-
-;;; User feedback
-
-;;;###autoload
-(defun winsize-set-mode-line-colors (on)
- "Turn mode line colors on if ON is non-nil, otherwise off."
- (if on
- (progn
- (unless winsize-old-mode-line-inactive-bg
- (setq winsize-old-mode-line-inactive-bg (face-attribute 'mode-line-inactive :background)))
- (unless winsize-old-mode-line-bg
- (setq winsize-old-mode-line-bg (face-attribute 'mode-line :background)))
- (let* ((use-colors (car winsize-mode-line-colors))
- (colors (cadr winsize-mode-line-colors))
- (active-color (elt colors 0))
- (inactive-color (elt colors 1)))
- (when use-colors
- (set-face-attribute 'mode-line-inactive nil :background inactive-color)
- (set-face-attribute 'mode-line nil :background active-color))))
- (when winsize-old-mode-line-inactive-bg
- (set-face-attribute 'mode-line-inactive nil :background winsize-old-mode-line-inactive-bg))
- (setq winsize-old-mode-line-inactive-bg nil)
- (when winsize-old-mode-line-bg
- (set-face-attribute 'mode-line nil :background winsize-old-mode-line-bg))
- (setq winsize-old-mode-line-bg nil)))
-
-(defvar winsize-short-help-message nil
- "Short help message shown in echo area.")
-
-(defun winsize-create-short-help-message ()
- "Create short help message to show in echo area."
- (let ((msg ""))
- (mapc (lambda (rec)
- (let ((fun (elt rec 0))
- (desc (elt rec 1))
- (etc (elt rec 2)))
- (when (< 0 (length msg))
- (setq msg (concat msg ", ")))
- (setq msg (concat msg
- desc
- ":"
- (key-description
- (where-is-internal fun winsize-keymap t))
- (if etc " etc" "")))))
- '(
- (balance-windows "balance" nil)
- (winsize-move-border-left "resize" t)
- (winsize-to-border-or-window-left "border" nil)
- ))
- (setq msg (concat msg ", exit:RET, help:?"))
- (setq winsize-short-help-message msg)))
-
-(defun winsize-move-mouse-to-resized ()
- "Move mouse to show which border(s) are beeing moved."
- (let* ((edges (window-edges (selected-window)))
- (L (nth 0 edges))
- (T (nth 1 edges))
- (R (nth 2 edges))
- (B (nth 3 edges))
- (x (/ (+ L R) 2))
- (y (/ (+ T B) 2)))
- (when (and winsize-window-for-side-hor
- (not (eq winsize-window-for-side-hor 'checked)))
- (setq x (if (eq (selected-window) winsize-window-for-side-hor) (- R 6) (+ L 2))))
- (when (and winsize-window-for-side-ver
- (not (eq winsize-window-for-side-ver 'checked)))
- (setq y (if (eq (selected-window) winsize-window-for-side-ver) (- B 2) (+ T 0))))
- (set-mouse-position (selected-frame) x y)))
-
-(defvar winsize-selected-window-overlay nil)
-
-(defun winsize-mark-selected-window (active)
- (when winsize-selected-window-overlay
- (delete-overlay winsize-selected-window-overlay)
- (setq winsize-selected-window-overlay nil))
- (when active
- (with-current-buffer (window-buffer (selected-window))
- (let ((ovl (make-overlay (point-min) (point-max) nil t)))
- (setq winsize-selected-window-overlay ovl)
- (overlay-put ovl 'window (selected-window))
- (overlay-put ovl 'pointer 'arrow)
- (overlay-put ovl 'priority 1000)
- (when winsize-selected-window-face
- (overlay-put ovl 'face winsize-selected-window-face))))))
-
-(defun winsize-message-end ()
- "Return a marker at the end of the message buffer."
- (with-current-buffer (get-buffer-create "*Messages*")
- (point-max-marker)))
-
-(defvar winsize-move-mouse 1)
-
-(defvar winsize-make-mouse-prominent-timer nil)
-
-(defun winsize-move-mouse ()
- ;;(setq winsize-move-mouse (- winsize-move-mouse))
- (save-match-data ;; runs in timer
- (let* ((fxy (mouse-pixel-position))
- (f (car fxy))
- (x (cadr fxy))
- (y (cddr fxy))
- (m (mod winsize-move-mouse 2))
- (d (* (if (= 0 m) 1 -1) 1)))
- (set-mouse-pixel-position f (+ d x) (+ d y))
- (when (< 1 winsize-move-mouse)
- (setq winsize-move-mouse (1- winsize-move-mouse))
- (setq winsize-make-mouse-prominent-timer
- (run-with-timer 0.2 nil 'winsize-move-mouse))))))
-
-(defun winsize-make-mouse-prominent-f (doit)
- (when (and winsize-make-mouse-prominent-timer
- (timerp winsize-make-mouse-prominent-timer))
- (cancel-timer winsize-make-mouse-prominent-timer))
- (when doit
- (setq winsize-move-mouse 3)
- (setq winsize-make-mouse-prominent-timer
- (run-with-idle-timer 0.1 nil 'winsize-move-mouse))))
-
-(defun winsize-tell-user ()
- "Give the user feedback."
- (when winsize-mark-selected-window
- (winsize-mark-selected-window t))
- (unless winsize-juris-way
- (let ((move-mouse (not (member this-command
- '(mouse-drag-mode-line
- mouse-drag-vertical-line
- scroll-bar-toolkit-scroll)))))
- ;;(message "%s, move-mouse=%s" this-command move-mouse);(sit-for 2)
- (when move-mouse
- (winsize-move-mouse-to-resized))
- (when winsize-make-mouse-prominent
- (winsize-make-mouse-prominent-f move-mouse))))
- (when (= winsize-message-end (winsize-message-end))
- (message "%s" winsize-short-help-message)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Window rotating and mirroring
-
-;;;###autoload
-(defun winsav-rotate (mirror transpose)
- "Rotate window configuration on selected frame.
-MIRROR should be either 'mirror-left-right, 'mirror-top-bottom or
-nil. In the first case the window configuration is mirrored
-vertically and in the second case horizontally. If MIRROR is nil
-the configuration is not mirrored.
-
-If TRANSPOSE is non-nil then the window structure is transposed
-along the diagonal from top left to bottom right (in analogy with
-matrix transosition).
-
-If called interactively MIRROR will is 'mirror-left-right by
-default, but 'mirror-top-bottom if called with prefix. TRANSPOSE
-is t. This mean that the window configuration will be turned one
-quarter clockwise (or counter clockwise with prefix)."
- (interactive (list
- (if current-prefix-arg
- 'mirror-left-right
- 'mirror-top-bottom)
- t))
- (require 'winsav)
- (let* ((wintree (winsav-get-window-tree))
- (tree (cadr wintree))
- (win-config (current-window-configuration)))
- ;;(winsav-log "old-wintree" wintree)
- (winsav-transform-1 tree mirror transpose)
- ;;(winsav-log "new-wintree" wintree)
- ;;
- ;; Fix-me: Stay in corresponding window. How?
- (delete-other-windows)
- (condition-case err
- (winsav-put-window-tree wintree (selected-window))
- (error
- (set-window-configuration win-config)
- (message "Can't rotate: %s" (error-message-string err))))
- ))
-
-
-(provide 'winsize)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; winsize.el ends here
diff --git a/emacs.d/nxhtml/util/wrap-to-fill.el b/emacs.d/nxhtml/util/wrap-to-fill.el
deleted file mode 100644
index 223ce1b..0000000
--- a/emacs.d/nxhtml/util/wrap-to-fill.el
+++ /dev/null
@@ -1,364 +0,0 @@
-;;; wrap-to-fill.el --- Make a fill-column wide space for editing
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-08-12 Wed
-;; Version:
-;; Last-Updated: x
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'mumamo))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; Wrapping
-
-;;;###autoload
-(defgroup wrap-to-fill nil
- "Customizing of `wrap-to-fill-column-mode'."
- :group 'convenience)
-
-;;;###autoload
-(defcustom wrap-to-fill-left-marg nil
- "Left margin handling for `wrap-to-fill-column-mode'.
-Used by `wrap-to-fill-column-mode'. If nil then center the
-display columns. Otherwise it should be a number which will be
-the left margin."
- :type '(choice (const :tag "Center" nil)
- (integer :tag "Left margin"))
- :group 'wrap-to-fill)
-(make-variable-buffer-local 'wrap-to-fill-left-marg)
-
-(defvar wrap-to-fill--saved-state nil)
-;;(make-variable-buffer-local 'wrap-to-fill--saved-state)
-(put 'wrap-to-fill--saved-state 'permanent-local t)
-
-;;;###autoload
-(defcustom wrap-to-fill-left-marg-modes
- '(text-mode
- fundamental-mode)
- "Major modes where `wrap-to-fill-left-margin' may be nil."
- :type '(repeat command)
- :group 'wrap-to-fill)
-
-
- ;;ThisisaVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongWord ThisisaVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongWord
-
-(defun wrap-to-fill-wider ()
- "Increase `fill-column' with 10."
- (interactive)
- (setq fill-column (+ fill-column 10))
- (wrap-to-fill-set-values-in-buffer-windows))
-
-(defun wrap-to-fill-narrower ()
- "Decrease `fill-column' with 10."
- (interactive)
- (setq fill-column (- fill-column 10))
- (wrap-to-fill-set-values-in-buffer-windows))
-
-(defun wrap-to-fill-normal ()
- "Reset `fill-column' to global value."
- (interactive)
- ;;(setq fill-column (default-value 'fill-column))
- (kill-local-variable 'fill-column)
- (wrap-to-fill-set-values-in-buffer-windows))
-
-(defvar wrap-to-fill-column-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c) ?+] 'wrap-to-fill-wider)
- (define-key map [(control ?c) ?-] 'wrap-to-fill-narrower)
- (define-key map [(control ?c) ?0] 'wrap-to-fill-normal)
- map))
-
-;; Fix-me: Maybe make the `wrap-prefix' behavior an option or separate
-;; minor mode.
-
-;; Fix-me: better handling of left-column in mumamo buffers (and other
-;; if possible).
-
-;;;###autoload
-(define-minor-mode wrap-to-fill-column-mode
- "Use `fill-column' display columns in buffer windows.
-By default the display columns are centered, but see the option
-`wrap-to-fill-left-marg'.
-
-Fix-me:
-Note 1: When turning this on `visual-line-mode' is also turned on. This
-is not reset when turning off this mode.
-
-Note 2: The text properties 'wrap-prefix and 'wrap-to-fill-prefix
-is set by this mode to indent continuation lines.
-
-Key bindings added by this minor mode:
-
-\\{wrap-to-fill-column-mode-map}"
- :lighter " WrapFill"
- :group 'wrap-to-fill
- ;; (message "wrap-to-fill-column-mode %s, cb=%s, major=%s, multi=%s" wrap-to-fill-column-mode (current-buffer)
- ;; major-mode mumamo-multi-major-mode)
- (if wrap-to-fill-column-mode
- (progn
- ;; Old values (idea from visual-line-mode)
- (set (make-local-variable 'wrap-to-fill--saved-state) nil)
- (dolist (var '(visual-line-mode
- ;;left-margin-width
- ;;right-margin-width
- ))
- (push (list var (symbol-value var) (local-variable-p var))
- wrap-to-fill--saved-state))
- ;; Hooks
- (add-hook 'window-configuration-change-hook 'wrap-to-fill-set-values nil t)
- ;; Wrapping
- (visual-line-mode 1)
- (wrap-to-fill-set-values-in-buffer-windows))
- ;; Hooks
- (remove-hook 'window-configuration-change-hook 'wrap-to-fill-set-values t)
- ;; Old values
- (dolist (saved wrap-to-fill--saved-state)
- (let ((var (nth 0 saved))
- (val (nth 1 saved))
- (loc (nth 2 saved)))
- (cond
- ((eq var 'visual-line-mode)
- (unless val (visual-line-mode -1)))
- (t
- (if loc
- (set (make-local-variable var) val)
- (kill-local-variable var))))))
- (kill-local-variable 'wrap-to-fill--saved-state)
- ;; Margins
- (dolist (win (get-buffer-window-list (current-buffer)))
- (set-window-margins win left-margin-width right-margin-width))
- ;; Indentation
- (let ((here (point))
- (inhibit-field-text-motion t)
- beg-pos
- end-pos)
- (mumamo-with-buffer-prepared-for-jit-lock
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (< (point) (point-max))
- (setq beg-pos (point))
- (setq end-pos (line-end-position))
- (when (equal (get-text-property beg-pos 'wrap-prefix)
- (get-text-property beg-pos 'wrap-to-fill-prefix))
- (remove-list-of-text-properties
- beg-pos end-pos
- '(wrap-prefix)))
- (forward-line))
- (remove-list-of-text-properties
- (point-min) (point-max)
- '(wrap-to-fill-prefix)))
- (goto-char here))))
- (wrap-to-fill-font-lock wrap-to-fill-column-mode))
-(put 'wrap-to-fill-column-mode 'permanent-local t)
-
-(defcustom wrap-to-fill-major-modes '(org-mode
- html-mode
- nxhtml-mode)
- "Major modes where to turn on `wrap-to-fill-column-mode'"
- ;;:type '(repeat major-mode)
- :type '(repeat command)
- :group 'wrap-to-fill)
-
-(defun wrap-to-fill-turn-on-in-buffer ()
- "Turn on fun for globalization."
- (when (catch 'turn-on
- (dolist (m wrap-to-fill-major-modes)
- (when (derived-mode-p m)
- (throw 'turn-on t))))
- (wrap-to-fill-column-mode 1)))
-
-(define-globalized-minor-mode wrap-to-fill-column-global-mode wrap-to-fill-column-mode
- wrap-to-fill-turn-on-in-buffer
- :group 'wrap-to-fill)
-
-;; Fix-me: There is a confusion between buffer and window margins
-;; here. Also the doc says that left-margin-width and dito right may
-;; be nil. However they seem to be 0 by default, but when displaying a
-;; buffer in a window then window-margins returns (nil).
-
-(defvar wrap-to-fill-timer nil)
-(make-variable-buffer-local 'wrap-to-fill-timer)
-
-(defun wrap-to-fill-set-values ()
- (when (timerp wrap-to-fill-timer)
- (cancel-timer wrap-to-fill-timer))
- (setq wrap-to-fill-timer
- (run-with-idle-timer 0 nil 'wrap-to-fill-set-values-in-timer
- (selected-window) (current-buffer))))
-(put 'wrap-to-fill-set-values 'permanent-local-hook t)
-
-(defun wrap-to-fill-set-values-in-timer (win buf)
- (condition-case err
- (when (buffer-live-p buf)
- (wrap-to-fill-set-values-in-buffer-windows buf))
- (error (message "ERROR wrap-to-fill-set-values-in-timer: %s"
- (error-message-string err)))))
-
-(defun wrap-to-fill-set-values-in-timer-old (win buf)
- (when (and (window-live-p win) (buffer-live-p buf)
- (eq buf (window-buffer win)))
- (condition-case err
- (with-current-buffer buf
- (when wrap-to-fill-column-mode
- (wrap-to-fill-set-values-in-window win)))
- (error (message "ERROR wrap-to-fill-set-values: %s"
- (error-message-string err))))))
-
-(defun wrap-to-fill-set-values-in-buffer-windows (&optional buffer)
- "Use `fill-column' display columns in buffer windows."
- (let ((buf-windows (get-buffer-window-list (or buffer
- (current-buffer))
- nil
- t)))
- (dolist (win buf-windows)
- (if wrap-to-fill-column-mode
- (wrap-to-fill-set-values-in-window win)
- (set-window-buffer nil (current-buffer))))))
-
-(defvar wrap-old-win-width nil)
-(make-variable-buffer-local 'wrap-old-win-width)
-;; Fix-me: compensate for left-margin-width etc
-(defun wrap-to-fill-set-values-in-window (win)
- (with-current-buffer (window-buffer win)
- (when wrap-to-fill-column-mode
- (let* ((win-width (window-width win))
- (win-margs (window-margins win))
- (win-full (+ win-width
- (or (car win-margs) 0)
- (or (cdr win-margs) 0)))
- (extra-width (- win-full fill-column))
- (fill-left-marg (unless (memq major-mode wrap-to-fill-left-marg-modes)
- (or (when (> left-margin-width 0) left-margin-width)
- wrap-to-fill-left-marg)))
- (left-marg (if fill-left-marg
- fill-left-marg
- (- (/ extra-width 2) 1)))
- ;; Fix-me: Why do I have to subtract 1 here...???
- (right-marg (- win-full fill-column left-marg 1))
- (need-update nil)
- )
- ;; (when wrap-old-win-width
- ;; (unless (= wrap-old-win-width win-width)
- ;; (message "-")
- ;; (message "win-width 0: %s => %s, win-full=%s, e=%s l/r=%s/%s %S %S %S" wrap-old-win-width win-width win-full extra-width left-marg right-marg (window-edges) (window-inside-edges) (window-margins))
- ;; ))
- (setq wrap-old-win-width win-width)
- (unless (> left-marg 0) (setq left-marg 0))
- (unless (> right-marg 0) (setq right-marg 0))
- (unless nil;(= left-marg (or left-margin-width 0))
- ;;(setq left-margin-width left-marg)
- (setq need-update t))
- (unless nil;(= right-marg (or right-margin-width 0))
- ;;(setq right-margin-width right-marg)
- (setq need-update t))
- ;;(message "win-width a: %s => %s, win-full=%s, e=%s l/r=%s/%s %S %S %S" wrap-old-win-width win-width win-full extra-width left-margin-width right-margin-width (window-edges) (window-inside-edges) (window-margins))
- (when need-update
- ;;(set-window-buffer win (window-buffer win))
- ;;(run-with-idle-timer 0 nil 'set-window-buffer win (window-buffer win))
- ;;(dolist (win (get-buffer-window-list (current-buffer)))
- ;; Fix-me: check window width...
- (set-window-margins win left-marg right-marg)
- ;;)
- ;;(message "win-width b: %s => %s, win-full=%s, e=%s l/r=%s/%s %S %S %S" wrap-old-win-width win-width win-full extra-width left-marg right-marg (window-edges) (window-inside-edges) (window-margins))
- )
- ))))
-
-;; (add-hook 'post-command-hook 'my-win-post-command nil t)
-;; (remove-hook 'post-command-hook 'my-win-post-command t)
-(defun my-win-post-command ()
- (message "win-post-command: l/r=%s/%s %S %S %S" left-margin-width right-margin-width (window-edges) (window-inside-edges) (window-margins))
- )
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Font lock
-
-(defun wrap-to-fill-fontify (bound)
- (save-restriction
- (widen)
- (while (< (point) bound)
- (let ((this-bol (if (bolp) (point)
- (1+ (line-end-position)))))
- (unless (< this-bol bound) (setq this-bol nil))
- (when this-bol
- (goto-char (+ this-bol 0))
- (let (ind-str
- ind-str-fill
- (beg-pos this-bol)
- (end-pos (line-end-position)))
- (when (equal (get-text-property beg-pos 'wrap-prefix)
- (get-text-property beg-pos 'wrap-to-fill-prefix))
- ;; Find indentation
- (skip-chars-forward "[:blank:]")
- (setq ind-str (buffer-substring-no-properties beg-pos (point)))
- ;; Any special markers like -, * etc
- (if (and (< (1+ (point)) (point-max))
- (memq (char-after) '(?- ;; 45
- ?– ;; 8211
- ?*
- ))
- (eq (char-after (1+ (point))) ?\ ))
- (setq ind-str-fill (concat " " ind-str))
- (setq ind-str-fill ind-str))
- ;;(setq ind-str-fill (concat " " ind-str))
- (mumamo-with-buffer-prepared-for-jit-lock
- (put-text-property beg-pos end-pos 'wrap-prefix ind-str-fill)
- (put-text-property beg-pos end-pos 'wrap-to-fill-prefix ind-str-fill))))))
- (forward-line 1))
- ;; Note: doing it line by line and returning t gave problem in mumamo.
- (when nil ;this-bol
- (set-match-data (list (point) (point)))
- t)))
-
-(defun wrap-to-fill-font-lock (on)
- ;; See mlinks.el
- (let* ((add-or-remove (if on 'font-lock-add-keywords 'font-lock-remove-keywords))
- (fontify-fun 'wrap-to-fill-fontify)
- (args (list nil `(( ,fontify-fun ( 0 'font-lock-warning-face t ))))))
- (when fontify-fun
- (when on (setq args (append args (list t))))
- (apply add-or-remove args)
- (font-lock-mode -1)
- (font-lock-mode 1))))
-
-(provide 'wrap-to-fill)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; wrap-to-fill.el ends here
diff --git a/emacs.d/nxhtml/util/zencoding-mode.el b/emacs.d/nxhtml/util/zencoding-mode.el
deleted file mode 100644
index 2545491..0000000
--- a/emacs.d/nxhtml/util/zencoding-mode.el
+++ /dev/null
@@ -1,801 +0,0 @@
-;;; zencoding-mode.el --- Unfold CSS-selector-like expressions to markup
-;;
-;; Copyright (C) 2009, Chris Done
-;;
-;; Author: Chris Done <chrisdone@gmail.com>
-(defconst zencoding-mode:version "0.5")
-;; Last-Updated: 2009-11-20 Fri
-;; Keywords: convenience
-;;
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Unfold CSS-selector-like expressions to markup. Intended to be used
-;; with sgml-like languages; xml, html, xhtml, xsl, etc.
-;;
-;; See `zencoding-mode' for more information.
-;;
-;; Copy zencoding-mode.el to your load-path and add to your .emacs:
-;;
-;; (require 'zencoding-mode)
-;;
-;; Example setup:
-;;
-;; (add-to-list 'load-path "~/Emacs/zencoding/")
-;; (require 'zencoding-mode)
-;; (add-hook 'sgml-mode-hook 'zencoding-mode) ;; Auto-start on any markup modes
-;;
-;; Enable the minor mode with M-x zencoding-mode.
-;;
-;; See ``Test cases'' section for a complete set of expression types.
-;;
-;; If you are hacking on this project, eval (zencoding-test-cases) to
-;; ensure that your changes have not broken anything. Feel free to add
-;; new test cases if you add new features.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; History:
-;;
-;; Modified by Lennart Borgman.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Generic parsing macros and utilities
-
-(eval-when-compile (require 'cl))
-
-(defcustom zencoding-preview-default t
- "If non-nil then preview is the default action.
-This determines how `zencoding-expand-line' works by default."
- :type 'boolean
- :group 'zencoding)
-
-(defcustom zencoding-insert-flash-time 0.5
- "Time to flash insertion.
-Set this to a negative number if you do not want flashing the
-expansion after insertion."
- :type '(number :tag "Seconds")
- :group 'zencoding)
-
-(defmacro zencoding-aif (test-form then-form &rest else-forms)
- "Anaphoric if. Temporary variable `it' is the result of test-form."
- `(let ((it ,test-form))
- (if it ,then-form ,@(or else-forms '(it)))))
-
-(defmacro zencoding-pif (test-form then-form &rest else-forms)
- "Parser anaphoric if. Temporary variable `it' is the result of test-form."
- `(let ((it ,test-form))
- (if (not (eq 'error (car it))) ,then-form ,@(or else-forms '(it)))))
-
-(defmacro zencoding-parse (regex nums label &rest body)
- "Parse according to a regex and update the `input' variable."
- `(zencoding-aif (zencoding-regex ,regex input ',(number-sequence 0 nums))
- (let ((input (elt it ,nums)))
- ,@body)
- `,`(error ,(concat "expected " ,label))))
-
-(defmacro zencoding-run (parser then-form &rest else-forms)
- "Run a parser and update the input properly, extract the parsed
- expression."
- `(zencoding-pif (,parser input)
- (let ((input (cdr it))
- (expr (car it)))
- ,then-form)
- ,@(or else-forms '(it))))
-
-(defmacro zencoding-por (parser1 parser2 then-form &rest else-forms)
- "OR two parsers. Try one parser, if it fails try the next."
- `(zencoding-pif (,parser1 input)
- (let ((input (cdr it))
- (expr (car it)))
- ,then-form)
- (zencoding-pif (,parser2 input)
- (let ((input (cdr it))
- (expr (car it)))
- ,then-form)
- ,@else-forms)))
-
-(defun zencoding-regex (regexp string refs)
- "Return a list of (`ref') matches for a `regex' on a `string' or nil."
- (if (string-match (concat "^" regexp "\\([^\n]*\\)$") string)
- (mapcar (lambda (ref) (match-string ref string))
- (if (sequencep refs) refs (list refs)))
- nil))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Zen coding parsers
-
-(defun zencoding-expr (input)
- "Parse a zen coding expression. This pretty much defines precedence."
- (zencoding-run zencoding-siblings
- it
- (zencoding-run zencoding-parent-child
- it
- (zencoding-run zencoding-multiplier
- it
- (zencoding-run zencoding-pexpr
- it
- (zencoding-run zencoding-tag
- it
- '(error "no match, expecting ( or a-zA-Z0-9")))))))
-
-(defun zencoding-multiplier (input)
- (zencoding-por zencoding-pexpr zencoding-tag
- (let ((multiplier expr))
- (zencoding-parse "\\*\\([0-9]+\\)" 2 "*n where n is a number"
- (let ((multiplicand (read (elt it 1))))
- `((list ,(make-list multiplicand multiplier)) . ,input))))
- '(error "expected *n multiplier")))
-
-(defun zencoding-tag (input)
- "Parse a tag."
- (zencoding-run zencoding-tagname
- (let ((result it)
- (tagname (cdr expr)))
- (zencoding-pif (zencoding-run zencoding-identifier
- (zencoding-tag-classes
- `(tag ,tagname ((id ,(cddr expr)))) input)
- (zencoding-tag-classes `(tag ,tagname ()) input))
- (let ((expr-and-input it) (expr (car it)) (input (cdr it)))
- (zencoding-pif (zencoding-tag-props expr input)
- it
- expr-and-input))))
- '(error "expected tagname")))
-
-(defun zencoding-tag-props (tag input)
- (zencoding-run zencoding-props
- (let ((tagname (cadr tag))
- (existing-props (caddr tag))
- (props (cdr expr)))
- `((tag ,tagname
- ,(append existing-props props))
- . ,input))))
-
-(defun zencoding-props (input)
- "Parse many props."
- (zencoding-run zencoding-prop
- (zencoding-pif (zencoding-props input)
- `((props . ,(cons expr (cdar it))) . ,(cdr it))
- `((props . ,(list expr)) . ,input))))
-
-(defun zencoding-prop (input)
- (zencoding-parse
- " " 1 "space"
- (zencoding-run
- zencoding-name
- (let ((name (cdr expr)))
- (zencoding-parse "=\\([^\\,\\+\\>\\ )]*\\)" 2
- "=property value"
- (let ((value (elt it 1))
- (input (elt it 2)))
- `((,(read name) ,value) . ,input)))))))
-
-(defun zencoding-tag-classes (tag input)
- (zencoding-run zencoding-classes
- (let ((tagname (cadr tag))
- (props (caddr tag))
- (classes `(class ,(mapconcat
- (lambda (prop)
- (cdadr prop))
- (cdr expr)
- " "))))
- `((tag ,tagname ,(append props (list classes))) . ,input))
- `(,tag . ,input)))
-
-(defun zencoding-tagname (input)
- "Parse a tagname a-zA-Z0-9 tagname (e.g. html/head/xsl:if/br)."
- (zencoding-parse "\\([a-zA-Z][a-zA-Z0-9:-]*\\)" 2 "tagname, a-zA-Z0-9"
- `((tagname . ,(elt it 1)) . ,input)))
-
-(defun zencoding-pexpr (input)
- "A zen coding expression with parentheses around it."
- (zencoding-parse "(" 1 "("
- (zencoding-run zencoding-expr
- (zencoding-aif (zencoding-regex ")" input '(0 1))
- `(,expr . ,(elt it 1))
- '(error "expecting `)'")))))
-
-(defun zencoding-parent-child (input)
- "Parse an tag>e expression, where `n' is an tag and `e' is any
- expression."
- (zencoding-run zencoding-multiplier
- (let* ((items (cadr expr))
- (rest (zencoding-child-sans expr input)))
- (if (not (eq (car rest) 'error))
- (let ((child (car rest))
- (input (cdr rest)))
- (cons (cons 'list
- (cons (mapcar (lambda (parent)
- `(parent-child ,parent ,child))
- items)
- nil))
- input))
- '(error "expected child")))
- (zencoding-run zencoding-tag
- (zencoding-child expr input)
- '(error "expected parent"))))
-
-(defun zencoding-child-sans (parent input)
- (zencoding-parse ">" 1 ">"
- (zencoding-run zencoding-expr
- it
- '(error "expected child"))))
-
-(defun zencoding-child (parent input)
- (zencoding-parse ">" 1 ">"
- (zencoding-run zencoding-expr
- (let ((child expr))
- `((parent-child ,parent ,child) . ,input))
- '(error "expected child"))))
-
-(defun zencoding-sibling (input)
- (zencoding-por zencoding-pexpr zencoding-multiplier
- it
- (zencoding-run zencoding-tag
- it
- '(error "expected sibling"))))
-
-(defun zencoding-siblings (input)
- "Parse an e+e expression, where e is an tag or a pexpr."
- (zencoding-run zencoding-sibling
- (let ((parent expr))
- (zencoding-parse "\\+" 1 "+"
- (zencoding-run zencoding-expr
- (let ((child expr))
- `((zencoding-siblings ,parent ,child) . ,input))
- '(error "expected second sibling"))))
- '(error "expected first sibling")))
-
-(defun zencoding-name (input)
- "Parse a class or identifier name, e.g. news, footer, mainimage"
- (zencoding-parse "\\([a-zA-Z][a-zA-Z0-9-_]*\\)" 2 "class or identifer name"
- `((name . ,(elt it 1)) . ,input)))
-
-(defun zencoding-class (input)
- "Parse a classname expression, e.g. .foo"
- (zencoding-parse "\\." 1 "."
- (zencoding-run zencoding-name
- `((class ,expr) . ,input)
- '(error "expected class name"))))
-
-(defun zencoding-identifier (input)
- "Parse an identifier expression, e.g. #foo"
- (zencoding-parse "#" 1 "#"
- (zencoding-run zencoding-name
- `((identifier . ,expr) . ,input))))
-
-(defun zencoding-classes (input)
- "Parse many classes."
- (zencoding-run zencoding-class
- (zencoding-pif (zencoding-classes input)
- `((classes . ,(cons expr (cdar it))) . ,(cdr it))
- `((classes . ,(list expr)) . ,input))
- '(error "expected class")))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Zen coding transformer from AST to HTML
-
-;; Fix-me: make mode specific
-(defvar zencoding-single-tags
- '("br"
- "img"))
-
-(defvar zencoding-inline-tags
- '("a"
- "abbr"
- "acronym"
- "cite"
- "code"
- "dfn"
- "em"
- "h1" "h2" "h3" "h4" "h5" "h6"
- "kbd"
- "q"
- "span"
- "strong"
- "var"))
-
-(defvar zencoding-block-tags
- '("p"))
-
-;; li
-;; a
-;; em
-;; p
-
-(defvar zencoding-leaf-function nil
- "Function to execute when expanding a leaf node in the
- Zencoding AST.")
-
-(defun zencoding-make-tag (tag &optional content)
- (let* ((name (car tag))
- (lf (if
- (or
- (member name zencoding-block-tags)
- (and
- (> (length name) 1)
- (not (member name zencoding-inline-tags))
- ))
- "\n" ""))
- (single (member name zencoding-single-tags))
- (props (apply 'concat (mapcar
- (lambda (prop)
- (concat " " (symbol-name (car prop))
- "=\"" (cadr prop) "\""))
- (cadr tag)))))
- (concat lf "<" name props ">" lf
- (if single
- ""
- (concat
- (if content content
- (if zencoding-leaf-function
- (funcall zencoding-leaf-function)
- ""))
- lf "</" name ">")))))
-
-(defun zencoding-transform (ast)
- (let ((type (car ast)))
- (cond
- ((eq type 'list)
- (mapconcat 'zencoding-transform (cadr ast) ""))
- ((eq type 'tag)
- (zencoding-make-tag (cdr ast)))
- ((eq type 'parent-child)
- (let ((parent (cdadr ast))
- (children (zencoding-transform (caddr ast))))
- (zencoding-make-tag parent children)))
- ((eq type 'zencoding-siblings)
- (let ((sib1 (zencoding-transform (cadr ast)))
- (sib2 (zencoding-transform (caddr ast))))
- (concat sib1 sib2))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Test-cases
-
-(defun zencoding-test-cases ()
- (let ((tests '(;; Tags
- ("a" "<a></a>")
- ("a.x" "<a class=\"x\"></a>")
- ("a#q.x" "<a id=\"q\" class=\"x\"></a>")
- ("a#q.x.y.z" "<a id=\"q\" class=\"x y z\"></a>")
- ;; Siblings
- ("a+b" "<a></a><b></b>")
- ("a+b+c" "<a></a><b></b><c></c>")
- ("a.x+b" "<a class=\"x\"></a><b></b>")
- ("a#q.x+b" "<a id=\"q\" class=\"x\"></a><b></b>")
- ("a#q.x.y.z+b" "<a id=\"q\" class=\"x y z\"></a><b></b>")
- ("a#q.x.y.z+b#p.l.m.n" "<a id=\"q\" class=\"x y z\"></a><b id=\"p\" class=\"l m n\"></b>")
- ;; Parent > child
- ("a>b" "<a><b></b></a>")
- ("a>b>c" "<a><b><c></c></b></a>")
- ("a.x>b" "<a class=\"x\"><b></b></a>")
- ("a#q.x>b" "<a id=\"q\" class=\"x\"><b></b></a>")
- ("a#q.x.y.z>b" "<a id=\"q\" class=\"x y z\"><b></b></a>")
- ("a#q.x.y.z>b#p.l.m.n" "<a id=\"q\" class=\"x y z\"><b id=\"p\" class=\"l m n\"></b></a>")
- ("a>b+c" "<a><b></b><c></c></a>")
- ("a>b+c>d" "<a><b></b><c><d></d></c></a>")
- ;; Multiplication
- ("a*1" "<a></a>")
- ("a*2" "<a></a><a></a>")
- ("a*2+b*2" "<a></a><a></a><b></b><b></b>")
- ("a*2>b*2" "<a><b></b><b></b></a><a><b></b><b></b></a>")
- ("a>b*2" "<a><b></b><b></b></a>")
- ("a#q.x>b#q.x*2" "<a id=\"q\" class=\"x\"><b id=\"q\" class=\"x\"></b><b id=\"q\" class=\"x\"></b></a>")
- ;; Properties
- ("a x=y" "<a x=\"y\"></a>")
- ("a x=y m=l" "<a x=\"y\" m=\"l\"></a>")
- ("a#foo x=y m=l" "<a id=\"foo\" x=\"y\" m=\"l\"></a>")
- ("a.foo x=y m=l" "<a class=\"foo\" x=\"y\" m=\"l\"></a>")
- ("a#foo.bar.mu x=y m=l" "<a id=\"foo\" class=\"bar mu\" x=\"y\" m=\"l\"></a>")
- ("a x=y+b" "<a x=\"y\"></a><b></b>")
- ("a x=y+b x=y" "<a x=\"y\"></a><b x=\"y\"></b>")
- ("a x=y>b" "<a x=\"y\"><b></b></a>")
- ("a x=y>b x=y" "<a x=\"y\"><b x=\"y\"></b></a>")
- ("a x=y>b x=y+c x=y" "<a x=\"y\"><b x=\"y\"></b><c x=\"y\"></c></a>")
- ;; Parentheses
- ("(a)" "<a></a>")
- ("(a)+(b)" "<a></a><b></b>")
- ("a>(b)" "<a><b></b></a>")
- ("(a>b)>c" "<a><b></b></a>")
- ("(a>b)+c" "<a><b></b></a><c></c>")
- ("z+(a>b)+c+k" "<z></z><a><b></b></a><c></c><k></k>")
- ("(a)*2" "<a></a><a></a>")
- ("((a)*2)" "<a></a><a></a>")
- ("((a)*2)" "<a></a><a></a>")
- ("(a>b)*2" "<a><b></b></a><a><b></b></a>")
- ("(a+b)*2" "<a></a><b></b><a></a><b></b>")
- )))
- (mapc (lambda (input)
- (let ((expected (cadr input))
- (actual (zencoding-transform (car (zencoding-expr (car input))))))
- (if (not (equal expected actual))
- (error (concat "Assertion " (car input) " failed:"
- expected
- " == "
- actual)))))
- tests)
- (concat (number-to-string (length tests)) " tests performed. All OK.")))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Zencoding minor mode
-
-;;;###autoload
-(defgroup zencoding nil
- "Customization group for zencoding-mode."
- :group 'convenience)
-
-(defun zencoding-expr-on-line ()
- "Extract a zencoding expression and the corresponding bounds
- for the current line."
- (let* ((start (line-beginning-position))
- (end (line-end-position))
- (line (buffer-substring-no-properties start end))
- (expr (zencoding-regex "\\([ \t]*\\)\\([^\n]+\\)" line 2)))
- (if (first expr)
- (list (first expr) start end))))
-
-(defun zencoding-prettify (markup indent)
- (save-match-data
- ;;(setq markup (replace-regexp-in-string "><" ">\n<" markup))
- (setq markup (replace-regexp-in-string "\n\n" "\n" markup))
- (setq markup (replace-regexp-in-string "^\n" "" markup)))
- (with-temp-buffer
- (indent-to indent)
- (insert "<i></i>")
- (insert "\n")
- (let ((here (point)))
- (insert markup)
- (sgml-mode)
- (indent-region here (point-max))
- (buffer-substring-no-properties here (point-max)))))
-
-;;;###autoload
-(defun zencoding-expand-line (arg)
- "Replace the current line's zencode expression with the corresponding expansion.
-If prefix ARG is given or region is visible call `zencoding-preview' to start an
-interactive preview.
-
-Otherwise expand line directly.
-
-For more information see `zencoding-mode'."
- (interactive "P")
- (let* ((here (point))
- (preview (if zencoding-preview-default (not arg) arg))
- (beg (if preview
- (progn
- (beginning-of-line)
- (skip-chars-forward " \t")
- (point))
- (when mark-active (region-beginning))))
- (end (if preview
- (progn
- (end-of-line)
- (skip-chars-backward " \t")
- (point))
- (when mark-active (region-end)))))
- (if beg
- (progn
- (goto-char here)
- (zencoding-preview beg end))
- (let ((expr (zencoding-expr-on-line)))
- (if expr
- (let* ((markup (zencoding-transform (car (zencoding-expr (first expr)))))
- (pretty (zencoding-prettify markup (current-indentation))))
- (save-excursion
- (delete-region (second expr) (third expr))
- (zencoding-insert-and-flash pretty))))))))
-
-(defvar zencoding-mode-keymap nil
- "Keymap for zencode minor mode.")
-
-(if zencoding-mode-keymap
- nil
- (progn
- (setq zencoding-mode-keymap (make-sparse-keymap))
- (define-key zencoding-mode-keymap (kbd "<C-return>") 'zencoding-expand-line)))
-
-;;;###autoload
-(define-minor-mode zencoding-mode
- "Minor mode for writing HTML and CSS markup.
-With zen coding for HTML and CSS you can write a line like
-
- ul#name>li.item*2
-
-and have it expanded to
-
- <ul id=\"name\">
- <li class=\"item\"></li>
- <li class=\"item\"></li>
- </ul>
-
-This minor mode defines keys for quick access:
-
-\\{zencoding-mode-keymap}
-
-Home page URL `http://www.emacswiki.org/emacs/ZenCoding'.
-
-See also `zencoding-expand-line'."
- :lighter " Zen"
- :keymap zencoding-mode-keymap)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Zencoding yasnippet integration
-
-(defun zencoding-transform-yas (ast)
- (let* ((leaf-count 0)
- (zencoding-leaf-function
- (lambda ()
- (format "$%d" (incf leaf-count)))))
- (zencoding-transform ast)))
-
-;;;###autoload
-(defun zencoding-expand-yas ()
- (interactive)
- (let ((expr (zencoding-expr-on-line)))
- (if expr
- (let* ((markup (zencoding-transform-yas (car (zencoding-expr (first expr)))))
- (filled (replace-regexp-in-string "><" ">\n<" markup)))
- (delete-region (second expr) (third expr))
- (insert filled)
- (indent-region (second expr) (point))
- (yas/expand-snippet
- (buffer-substring (second expr) (point))
- (second expr) (point))))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Real-time preview
-;;
-
-;;;;;;;;;;
-;; Lennart's version
-
-(defvar zencoding-preview-input nil)
-(make-local-variable 'zencoding-preview-input)
-(defvar zencoding-preview-output nil)
-(make-local-variable 'zencoding-preview-output)
-(defvar zencoding-old-show-paren nil)
-(make-local-variable 'zencoding-old-show-paren)
-
-(defface zencoding-preview-input
- '((default :box t :inherit secondary-selection))
- "Face for preview input field."
- :group 'zencoding)
-
-(defface zencoding-preview-output
- '((default :inherit highlight))
- "Face for preview output field."
- :group 'zencoding)
-
-(defvar zencoding-preview-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map (kbd "<return>") 'zencoding-preview-accept)
- (define-key map [(control ?g)] 'zencoding-preview-abort)
- map))
-
-(defun zencoding-preview-accept ()
- (interactive)
- (let ((ovli zencoding-preview-input))
- (if (not (and (overlayp ovli)
- (bufferp (overlay-buffer ovli))))
- (message "Preview is not active")
- (let* ((indent (current-indentation))
- (markup (zencoding-preview-transformed indent)))
- (when markup
- (delete-region (line-beginning-position) (overlay-end ovli))
- (zencoding-insert-and-flash markup)))))
- (zencoding-preview-abort))
-
-(defvar zencoding-flash-ovl nil)
-(make-variable-buffer-local 'zencoding-flash-ovl)
-
-(defun zencoding-remove-flash-ovl (buf)
- (with-current-buffer buf
- (when (overlayp zencoding-flash-ovl)
- (delete-overlay zencoding-flash-ovl))
- (setq zencoding-flash-ovl nil)))
-
-(defun zencoding-insert-and-flash (markup)
- (zencoding-remove-flash-ovl (current-buffer))
- (let ((here (point)))
- (insert markup)
- (setq zencoding-flash-ovl (make-overlay here (point)))
- (overlay-put zencoding-flash-ovl 'face 'zencoding-preview-output)
- (when (< 0 zencoding-insert-flash-time)
- (run-with-idle-timer zencoding-insert-flash-time
- nil 'zencoding-remove-flash-ovl (current-buffer)))))
-
-;;;###autoload
-(defun zencoding-preview (beg end)
- "Expand zencode between BEG and END interactively.
-This will show a preview of the expanded zen code and you can
-accept it or skip it."
- (interactive (if mark-active
- (list (region-beginning) (region-end))
- (list nil nil)))
- (zencoding-preview-abort)
- (if (not beg)
- (message "Region not active")
- (setq zencoding-old-show-paren show-paren-mode)
- (show-paren-mode -1)
- (let ((here (point)))
- (goto-char beg)
- (forward-line 1)
- (unless (= 0 (current-column))
- (insert "\n"))
- (let* ((opos (point))
- (ovli (make-overlay beg end nil nil t))
- (ovlo (make-overlay opos opos))
- (info (propertize " Zen preview. Choose with RET. Cancel by stepping out. \n"
- 'face 'tooltip)))
- (overlay-put ovli 'face 'zencoding-preview-input)
- (overlay-put ovli 'keymap zencoding-preview-keymap)
- (overlay-put ovlo 'face 'zencoding-preview-output)
- (overlay-put ovlo 'before-string info)
- (setq zencoding-preview-input ovli)
- (setq zencoding-preview-output ovlo)
- (add-hook 'before-change-functions 'zencoding-preview-before-change t t)
- (goto-char here)
- (add-hook 'post-command-hook 'zencoding-preview-post-command t t)))))
-
-(defvar zencoding-preview-pending-abort nil)
-(make-variable-buffer-local 'zencoding-preview-pending-abort)
-
-(defun zencoding-preview-before-change (beg end)
- (when
- (or (> beg (overlay-end zencoding-preview-input))
- (< beg (overlay-start zencoding-preview-input))
- (> end (overlay-end zencoding-preview-input))
- (< end (overlay-start zencoding-preview-input)))
- (setq zencoding-preview-pending-abort t)))
-
-(defun zencoding-preview-abort ()
- "Abort zen code preview."
- (interactive)
- (setq zencoding-preview-pending-abort nil)
- (remove-hook 'before-change-functions 'zencoding-preview-before-change t)
- (when (overlayp zencoding-preview-input)
- (delete-overlay zencoding-preview-input))
- (setq zencoding-preview-input nil)
- (when (overlayp zencoding-preview-output)
- (delete-overlay zencoding-preview-output))
- (setq zencoding-preview-output nil)
- (remove-hook 'post-command-hook 'zencoding-preview-post-command t)
- (when zencoding-old-show-paren (show-paren-mode 1)))
-
-(defun zencoding-preview-post-command ()
- (condition-case err
- (zencoding-preview-post-command-1)
- (error (message "zencoding-preview-post: %s" err))))
-
-(defun zencoding-preview-post-command-1 ()
- (if (and (not zencoding-preview-pending-abort)
- (<= (point) (overlay-end zencoding-preview-input))
- (>= (point) (overlay-start zencoding-preview-input)))
- (zencoding-update-preview (current-indentation))
- (zencoding-preview-abort)))
-
-(defun zencoding-preview-transformed (indent)
- (let* ((string (buffer-substring-no-properties
- (overlay-start zencoding-preview-input)
- (overlay-end zencoding-preview-input)))
- (ast (car (zencoding-expr string))))
- (when (not (eq ast 'error))
- (zencoding-prettify (zencoding-transform ast)
- indent))))
-
-(defun zencoding-update-preview (indent)
- (let* ((pretty (zencoding-preview-transformed indent))
- (show (when pretty
- (propertize pretty 'face 'highlight))))
- (when show
- (overlay-put zencoding-preview-output 'after-string
- (concat show "\n")))))
-;; a+bc
-
-;;;;;;;;;;
-;; Chris's version
-
-;; (defvar zencoding-realtime-preview-keymap
-;; (let ((map (make-sparse-keymap)))
-;; (define-key map "\C-c\C-c" 'zencoding-delete-overlay-pair)
-
-;; map)
-;; "Keymap used in zencoding realtime preview overlays.")
-
-;; ;;;###autoload
-;; (defun zencoding-realtime-preview-of-region (beg end)
-;; "Construct a real-time preview for the region BEG to END."
-;; (interactive "r")
-;; (let ((beg2)
-;; (end2))
-;; (save-excursion
-;; (goto-char beg)
-;; (forward-line)
-;; (setq beg2 (point)
-;; end2 (point))
-;; (insert "\n"))
-;; (let ((input-and-output (zencoding-make-overlay-pair beg end beg2 end2)))
-;; (zencoding-handle-overlay-change (car input-and-output) nil nil nil)))
-;; )
-
-;; (defun zencoding-make-overlay-pair (beg1 end1 beg2 end2)
-;; "Construct an input and an output overlay for BEG1 END1 and BEG2 END2"
-;; (let ((input (make-overlay beg1 end1 nil t t))
-;; (output (make-overlay beg2 end2)))
-;; ;; Setup input overlay
-;; (overlay-put input 'face '(:underline t))
-;; (overlay-put input 'modification-hooks
-;; (list #'zencoding-handle-overlay-change))
-;; (overlay-put input 'output output)
-;; (overlay-put input 'keymap zencoding-realtime-preview-keymap)
-;; ;; Setup output overlay
-;; (overlay-put output 'face '(:overline t))
-;; (overlay-put output 'intangible t)
-;; (overlay-put output 'input input)
-;; ;; Return the overlays.
-;; (list input output))
-;; )
-
-;; (defun zencoding-delete-overlay-pair (&optional one)
-;; "Delete a pair of input and output overlays based on ONE."
-;; (interactive) ;; Since called from keymap
-;; (unless one
-;; (let ((overlays (overlays-at (point))))
-;; (while (and overlays
-;; (not (or (overlay-get (car overlays) 'input)
-;; (overlay-get (car overlays) 'output))))
-;; (setq overlays (cdr overlays)))
-;; (setq one (car overlays))))
-;; (when one
-;; (let ((other (or (overlay-get one 'input)
-;; (overlay-get one 'output))))
-;; (delete-overlay one)
-;; (delete-overlay other)))
-;; )
-
-;; (defun zencoding-handle-overlay-change (input del beg end &optional old)
-;; "Update preview after overlay change."
-;; (let* ((output (overlay-get input 'output))
-;; (start (overlay-start output))
-;; (string (buffer-substring-no-properties
-;; (overlay-start input)
-;; (overlay-end input)))
-;; (ast (car (zencoding-expr string)))
-;; (markup (when (not (eq ast 'error))
-;; (zencoding-transform ast))))
-;; (save-excursion
-;; (delete-region start (overlay-end output))
-;; (goto-char start)
-;; (if markup
-;; (insert markup)
-;; (insert (propertize "error" 'face 'font-lock-error-face)))
-;; (move-overlay output start (point))))
-;; )
-
-(provide 'zencoding-mode)
-
-;;; zencoding-mode.el ends here
diff --git a/emacs.d/nxhtml/web-autoload.el b/emacs.d/nxhtml/web-autoload.el
deleted file mode 100644
index 418d32a..0000000
--- a/emacs.d/nxhtml/web-autoload.el
+++ /dev/null
@@ -1,262 +0,0 @@
-;;; web-autoload.el --- Autoload from web site
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-12-26 Sat
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Experimental code. Not ready to use at all.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-;;(eval-when-compile (require 'web-vcs)) ;; Gives recursion
-;;(eval-when-compile (require 'nxhtml-base))
-
-(defcustom web-autoload-autocompile t
- "Byt compile downloaded files if t."
- :type 'boolean
- :group 'web-vcs)
-
-(defun web-autoload (fun src docstring interactive type)
- "Set up FUN to be autoloaded from SRC.
-This works similar to `autoload' and the arguments DOCSTRING,
-INTERACTIVE and TYPE are handled similary.
-
-However loading can be done from a web url.
-In that case SRC should have the format
-
- (WEB-VCS BASE-URL RELATIVE-URL BASE-DIR)
-
-where
-
- - WEB-VCS is specifies a web repository type, see
- `web-vcs-get-files-from-root'.
- - BASE-URL is the base url, similar to the URL argument to the
- function above.
-
- - RELATIVE-URL is relative location. This will be relative to
- BASE-DIR in file tree and to BASE-URL on the web \(only
- logically in the latter case).
-
-Loading will be done from the file resulting from expanding
-RELATIVE-URL relative to BASE-DIR. If this file exists load it
-directly, otherwise download it first."
- (unless (functionp fun)
- (let ((int (when interactive '(interactive))))
- (cond
- ((eq type 'macro)
- (setq type 'defmacro))
- (t
- (setq type 'defun)))
- (put fun 'web-autoload src)
- (eval
- `(web-autoload-1 ,fun ,src ,docstring ,int ,type)))))
-
-;; (defun web-autoload-default-filename-element ()
-;; ;; Fix-me: el or elc?
-;; ;; Fix-me: remove nxhtml binding
-;; (expand-file-name "nxhtml-loaddefs.elc" nxhtml-install-dir))
-
-;; Fix-me: change name
-(defvar web-autoload-skip-require-advice nil)
-
-;; Fix-me: Use TYPE
-(defmacro web-autoload-1 (fun src docstring interactive type)
- `(progn
- (,type ,fun (&rest args)
- ,(concat docstring
- "\n\nArguments are not yet known since the real function is not loaded."
- "\nFunction is defined by `web-autoload' to be loaded using definition\n\n "
- (format "%S"
- src))
- ,interactive
- ;; (find-lisp-object-file-name 'chart-complete 'defun)
- (let* ((lib-web (or (find-lisp-object-file-name ',fun 'defun)
- ;;(web-autoload-default-filename-element)
- ))
- (old-hist-elt (when lib-web (load-history-filename-element lib-web)))
- (auto-fun (symbol-function ',fun))
- err)
- ;; Fix-me: Can't do this because we may have to go back here again...
- ;;(fset ',fun nil)
- (if (not (listp ',src))
- ;; Just a local file, for testing of logics.
- (let ((lib-file (locate-library ',src)))
- (load ',src)
- (unless (symbol-function ',fun)
- (setq err (format "%s is not in library %s" ',fun lib-file))))
- ;; If file is a list then it should be a web url:
- ;; (web-vcs base-url relative-url base-dir)
- ;; Convert from repository url to file download url.
- (let* (;;(vcs (nth 0 ',src))
- ;;(base-url (nth 1 ',src))
- (rel-url (nth 2 ',src))
- ;;(base-dir (nth 3 ',src))
- ;;(rel-url-el (concat rel-url ".el"))
- ;;file-url
- ;;dl-file
- )
- ;;(unless (stringp base-url) (setq base-url (symbol-value base-url)))
- ;;(unless (stringp base-dir) (setq base-dir (symbol-value base-dir)))
- ;;(setq dl-file (expand-file-name rel-url-el base-dir))
- (web-vcs-message-with-face 'web-vcs-gold "web-autoload-1: BEG fun=%s" ',fun)
- ;; Fix-me: assume we can do require (instead of load, so
- ;; we do not have to defadvice load to).
- (unless (ad-is-advised 'require)
- (error "web-autoload-1: require is not advised"))
- (unless (ad-is-active 'require)
- (error "web-autoload-1: require advice is not active"))
- (when (catch 'web-autoload-comp-restart
- (require (intern (file-name-nondirectory rel-url)))
- nil)
- (web-autoload-byte-compile-queue))
- (when (equal (symbol-function ',fun) auto-fun)
- (error "Couldn't web autoload function %s" ',fun))
- (web-vcs-message-with-face 'web-vcs-gold "web-autoload-1: END fun=%s" ',fun)
- (web-vcs-log-save)
- ))
- ;; Fix-me: Wrong place to do the cleanup! It must be done
- ;; after loading a file. All autoload in that file must be
- ;; deleted from the nxhtml-loaddefs entry.
- ;;
- ;; Delete old load-history entry for ,fun. A new entry
- ;; has been added.
- (let* ((tail (cdr old-hist-elt))
- (new-tail (when tail (delete (cons 'defun ',fun) tail))))
- (when tail (setcdr old-hist-elt new-tail)))
- ;; Finally call the real function
- (if (called-interactively-p ',fun)
- (call-interactively ',fun)
- (if (functionp ',fun)
- (apply ',fun args)
- ;; It is a macro
- (let ((the-macro (append '(,fun) args nil)))
- (eval the-macro))))))))
-
-;; Fix-me: Set up a byte compilation queue. Move function for byte compiling here.
-
-(defvar web-autoload-cleanup-dummy-el
- (let* ((this-dir (file-name-directory (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))))
- (expand-file-name "temp-cleanup.el" this-dir)))
-
-(defun web-autoload-try-cleanup-after-failed-compile (active-comp)
- (let* ((bc-input-buffer (get-buffer " *Compiler Input*"))
- (bc-outbuffer (get-buffer " *Compiler Output*"))
- ;;(active-comp (car web-autoload-compile-queue))
- (active-file (car active-comp))
- (active-elc (byte-compile-dest-file active-file)))
- ;; Delete bytecomp buffers
- (display-buffer "*Messages*")
- (web-vcs-message-with-face 'web-vcs-red "Trying to cleanup (%s %s %s)" bc-input-buffer bc-outbuffer active-elc)
- (when bc-input-buffer (kill-buffer bc-input-buffer))
- (when bc-outbuffer
- (kill-buffer bc-outbuffer)
- (setq bytecomp-outbuffer nil))
- ;; Delete half finished elc file
- (when (file-exists-p active-elc)
- (delete-file active-elc))
- ;; Delete load-history entry
- (when nil
- (setq load-history (cdr load-history)))
- ;; Try to reset some variables (just guesses)
- (when nil
- (setq byte-compile-constants nil)
- (setq byte-compile-variables nil)
- (setq byte-compile-bound-variables nil)
- (setq byte-compile-const-variables nil)
- ;;(setq byte-compile-macro-environment byte-compile-initial-macro-environment)
- (setq byte-compile-function-environment nil)
- (setq byte-compile-unresolved-functions nil)
- (setq byte-compile-noruntime-functions nil)
- (setq byte-compile-tag-number 0)
- (setq byte-compile-output nil)
- (setq byte-compile-depth 0)
- (setq byte-compile-maxdepth 0)
- ;;(setq byte-code-vector nil)
- (setq byte-compile-current-form nil)
- (setq byte-compile-dest-file nil)
- (setq byte-compile-current-file nil)
- (setq byte-compile-current-group nil)
- (setq byte-compile-current-buffer nil)
- (setq byte-compile-read-position nil)
- (setq byte-compile-last-position nil)
- (setq byte-compile-last-warned-form nil)
- (setq byte-compile-last-logged-file nil)
- ;;(defvar bytecomp-outbuffer)
- ;;(defvar byte-code-meter)
- )
- ;; Try compiling something go get right state ...
- (when nil
- (unless (file-exists-p web-autoload-cleanup-dummy-el)
- (let ((buf (find-file-noselect web-autoload-cleanup-dummy-el)))
- (with-current-buffer buf
- (insert ";; Dummy")
- (basic-save-buffer)
- (kill-buffer))))
- (byte-compile-file web-autoload-cleanup-dummy-el nil))))
-
-(defun big-trace ()
- (setq trace-buffer "*Messages*")
- (trace-function-background 'byte-compile-form)
- (trace-function-background 'byte-compile-file-form)
- (trace-function-background 'byte-optimize-form)
- (trace-function-background 'byte-compile-normal-call)
- (trace-function-background 'byte-compile-cl-warn)
- (trace-function-background 'byte-compile-const-symbol-p)
- (trace-function-background 'byte-compile-warn)
- (trace-function-background 'byte-compile-warning-enabled-p)
- (trace-function-background 'byte-compile-callargs-warn)
- (trace-function-background 'byte-compile-splice-in-already-compiled-code)
- (trace-function-background 'byte-inline-lapcode)
- (trace-function-background 'byte-decompile-bytecode-1)
- )
-
-(defvar web-autoload-require-list nil)
-
-(defun web-autoload-require (feature web-vcs base-url relative-url base-dir compile-fun)
- "Prepare to download file if necessary when `require' is called.
-WEB-VCS BASE-URL RELATIVE-URL"
- (add-to-list 'web-autoload-require-list `(,feature ,web-vcs ,base-url ,relative-url ,base-dir ,compile-fun)))
-
-;;(big-trace)
-
-(provide 'web-autoload)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; web-autoload.el ends here
diff --git a/emacs.d/nxhtml/web-vcs.el b/emacs.d/nxhtml/web-vcs.el
deleted file mode 100644
index fac58db..0000000
--- a/emacs.d/nxhtml/web-vcs.el
+++ /dev/null
@@ -1,2069 +0,0 @@
-;;; web-vcs.el --- Download file trees from VCS web pages
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2009-11-26 Thu
-(defconst web-vcs:version "0.61") ;; Version:
-;; Last-Updated: 2009-12-11 Fri
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Update file trees within Emacs from VCS systems using information
-;; on their web pages.
-;;
-;; Available download commands are currently:
-;;
-;; `web-vcs-nxhtml'
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 3, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(eval-and-compile (require 'cus-edit))
-(eval-and-compile (require 'mm-decode))
-(eval-when-compile (require 'url-http))
-
-(require 'advice)
-(require 'web-autoload nil t)
-;; (require 'url-util)
-;; (require 'url)
-;;(require 'url-parse)
-
-(defvar web-vcs-comp-dir nil)
-
-(defgroup web-vcs nil
- "Customization group for web-vcs."
- :group 'nxhtml)
-
-(defcustom web-vcs-links-regexp
- `(
- (lp ;; Id
- ;; Comment:
- "http://www.launchpad.com/ uses this 2009-11-29 with Loggerhead 1.10 (generic?)"
- ;; Files URL regexp:
- ;;
- ;; Extend this format to catch date/time too.
- ;;
- ;; ((patt (rx ...))
- ;; ;; use subexp numbers
- ;; (url 1)
- ;; (time 2)
- ;; (rev 3))
-
- ((time 1)
- (url 2)
- (patt ,(rx "<td class=\"date\">"
- (submatch (regexp "[^<]*"))
- "</td>"
- (0+ space)
- "<td class=\"timedate2\">"
- (regexp ".+")
- "</td>"
- (*? (regexp ".\\|\n"))
- "href=\""
- (submatch (regexp ".*/download/[^\"]*"))
- "\"")))
-
- ;; ,(rx "href=\""
- ;; (submatch (regexp ".*/download/[^\"]*"))
- ;; "\"")
-
- ;; Dirs URL regexp:
- ,(rx "href=\""
- (submatch (regexp ".*%3A/[^\"]*/"))
- "\"")
- ;; File name URL part regexp:
- "\\([^\/]*\\)$"
- ;; Page revision regexp:
- ,(rx "for revision"
- (+ whitespace)
- "<span>"
- (submatch (+ digit))
- "</span>")
- ;; Release revision regexp:
- ,(rx "/"
- (submatch (+ digit))
- "\"" (+ (not (any ">"))) ">"
- (optional "Release ")
- (+ digit) "." (+ digit) "<")
- )
- )
- "Regexp patterns for matching links on a VCS web page.
-The patterns are grouped by VCS web system type.
-
-*Note: It is always sub match 1 from these patterns that are
- used."
- :type '(repeat
- (list
- (symbol :tag "VCS web system type specifier")
- (string :tag "Description")
- (regexp :tag "Files URL regexp")
- (regexp :tag "Dirs URL regexp")
- (regexp :tag "File name URL part regexp")
- (regexp :tag "Page revision regexp")
- (regexp :tag "Release revision regexp")
- ))
- :group 'web-vcs)
-
-(defface web-vcs-mode-line
- '((t (:foreground "black" :background "OrangeRed")))
- "Mode line face during download."
- :group 'web-vcs)
-
-(defface web-vcs-mode-line-inactive
- '((t (:foreground "black" :background "Orange")))
- "Mode line face during download."
- :group 'web-vcs)
-
-(defface web-vcs-gold
- '((t (:foreground "black" :background "gold")))
- "Face for web-vcs messages."
- :group 'web-vcs)
-
-(defface web-vcs-red
- '((t (:foreground "black" :background "#f86")))
- "Face for web-vcs messages."
- :group 'web-vcs)
-
-(defface web-vcs-green
- '((t (:foreground "black" :background "#8f6")))
- "Face for web-vcs messages."
- :group 'web-vcs)
-
-(defface web-vcs-yellow
- '((t (:foreground "black" :background "yellow")))
- "Face for web-vcs messages."
- :group 'web-vcs)
-
-(defface web-vcs-pink
- '((t (:foreground "black" :background "pink")))
- "Face for web-vcs messages."
- :group 'web-vcs)
-
-(defcustom web-vcs-default-download-directory
- '~/.emacs.d/
- "Default download directory."
- :type '(choice (const :tag "~/.emacs.d/" '~/.emacs.d/)
- (const :tag "Fist site-lisp in `load-path'" 'site-lisp-dir)
- (const :tag "Directory where `site-run-file' lives" 'site-run-dir)
- (string :tag "Specify directory"))
- :group 'web-vcs)
-
-;;(web-vcs-default-download-directory)
-;;;###autoload
-(defun web-vcs-default-download-directory ()
- "Try to find a suitable place.
-Considers site-start.el, site-
-"
- (let ((site-run-dir (when site-run-file
- (file-name-directory (locate-library site-run-file))))
- (site-lisp-dir (catch 'first-site-lisp
- (dolist (d load-path)
- (let ((dir (file-name-nondirectory (directory-file-name d))))
- (when (string= dir "site-lisp")
- (throw 'first-site-lisp (file-name-as-directory d)))))))
- )
- (message "site-run-dir=%S site-lisp-dir=%S" site-run-dir site-lisp-dir)
- (case web-vcs-default-download-directory
- ('~/.emacs.d/ "~/.emacs.d/")
- ('site-lisp-dir site-lisp-dir)
- ('site-run-dir site-run-dir)
- (t web-vcs-default-download-directory))
- ))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Logging
-
-(defcustom web-vcs-log-file "~/.emacs.d/web-vcs-log.org"
- "Log file for web-vcs."
- :type 'file
- :group 'web-vcs)
-
-;;;###autoload
-(defun web-vcs-log-edit ()
- "Open log file."
- (interactive)
- (find-file web-vcs-log-file))
-
-(defvar web-vcs-log-save-timer nil)
-
-(defun web-vcs-log-save-when-idle ()
- (when (timerp web-vcs-log-save-timer) (cancel-timer web-vcs-log-save-timer))
- (run-with-idle-timer 0 nil 'web-vcs-log-save))
-
-(defun web-vcs-log-save ()
- (let ((log-buf (find-buffer-visiting web-vcs-log-file)))
- (when (and log-buf (buffer-modified-p log-buf))
- (with-current-buffer log-buf
- (basic-save-buffer)))
- log-buf))
-
-(defun web-vcs-log-close ()
- (let ((log-buf (web-vcs-log-save)))
- (when log-buf
- (kill-buffer log-buf))))
-
-;; Fix-me: Add some package descriptor to log
-(defun web-vcs-log (url dl-file msg)
- (unless (file-exists-p web-vcs-log-file)
- (let ((dir (file-name-directory web-vcs-log-file)))
- (unless (file-directory-p dir)
- (make-directory dir))))
- (with-current-buffer (find-file-noselect web-vcs-log-file)
- (setq buffer-save-without-query t)
- (web-vcs-log-save-when-idle)
- (save-restriction
- (widen)
- (let ((today-entries (format-time-string "* %Y-%m-%d"))
- (now (format-time-string "%H:%M:%S GMT" nil t)))
- (goto-char (point-max))
- (unless (re-search-backward (concat "^" today-entries) nil t)
- (goto-char (point-max))
- (insert "\n" today-entries "\n"))
- (goto-char (point-max))
- (when url
- (insert "** Downloading file " now "\n"
- (format " file [[file:%s][%s]]\n from %s\n" dl-file dl-file url)
- ))
- (cond
- ((stringp msg)
- (goto-char (point-max))
- (insert msg "\n"))
- (msg (basic-save-buffer)))))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Finding and downloading files
-
-;;;###autoload
-(defun web-vcs-get-files-from-root (web-vcs url dl-dir)
- "Download a file tree from VCS system using the web interface.
-Use WEB-VCS entry in variable `web-vcs-links-regexp' to download
-files via http from URL to directory DL-DIR.
-
-Show URL first and offer to visit the page. That page will give
-you information about version control system \(VCS) system used
-etc."
- (unless (web-vcs-contains-moved-files dl-dir)
- (when (if (not (y-or-n-p (concat "Download files from \"" url "\".\n"
- "You can see on that page which files will be downloaded.\n\n"
- "Visit that page before downloading? ")))
- t
- (browse-url url)
- (if (y-or-n-p "Start downloading? ")
- t
- (message "Aborted")
- nil))
- (message "")
- (web-vcs-get-files-on-page web-vcs url t (file-name-as-directory dl-dir) nil)
- t)))
-
-(defun web-vcs-get-files-on-page (web-vcs url recursive dl-dir test)
- "Download files listed by WEB-VCS on web page URL.
-WEB-VCS is a specifier in `web-vcs-links-regexp'.
-
-If RECURSIVE go into sub folders on the web page and download
-files from them too.
-
-Place the files under DL-DIR.
-
-Before downloading check if the downloaded revision already is
-the same as the one on the web page. This is stored in the file
-web-vcs-revision.txt. After downloading update this file.
-
-If TEST is non-nil then do not download, just list the files."
- (unless (string= dl-dir (file-name-as-directory (expand-file-name dl-dir)))
- (error "Download dir dl-dir=%S must be a full directory path" dl-dir))
- (catch 'command-level
- (when (web-vcs-contains-moved-files dl-dir)
- (throw 'command-level nil))
- (let ((vcs-rec (or (assq web-vcs web-vcs-links-regexp)
- (error "Does not know web-cvs %S" web-vcs)))
- (start-time (current-time)))
- (unless (file-directory-p dl-dir)
- (if (yes-or-no-p (format "Directory %S does not exist, create it? "
- (file-name-as-directory
- (expand-file-name dl-dir))))
- (make-directory dl-dir t)
- (message "Can't download then")
- (throw 'command-level nil)))
- ;; (let ((old-win (selected-window)))
- ;; (unless (eq (get-buffer "*Messages*") (window-buffer old-win))
- ;; (switch-to-buffer-other-window "*Messages*"))
- ;; (goto-char (point-max))
- ;; (insert "\n")
- ;; (insert (propertize (format "\n\nWeb-Vcs Download: %S\n" url) 'face 'web-vcs-gold))
- ;; (insert "\n")
- ;; (redisplay t)
- ;; (set-window-point (selected-window) (point-max))
- ;; (select-window old-win))
- (web-vcs-message-with-face 'web-vcs-gold "\n\nWeb-Vcs Download: %S\n" url)
- (web-vcs-display-messages nil)
- (let* ((rev-file (expand-file-name "web-vcs-revision.txt" dl-dir))
- (rev-buf (find-file-noselect rev-file))
- ;; Fix-me: Per web vcs speficier.
- (old-rev-range (with-current-buffer rev-buf
- (widen)
- (goto-char (point-min))
- (when (re-search-forward (format "%s:\\(.*\\)\n" web-vcs) nil t)
- ;;(buffer-substring-no-properties (point-min) (line-end-position))
- ;;(match-string 1)
- (cons (match-beginning 1) (match-end 1))
- )))
- (old-revision (when old-rev-range
- (with-current-buffer rev-buf
- (buffer-substring-no-properties (car old-rev-range)
- (cdr old-rev-range)))))
- (dl-revision (web-vcs-get-revision-on-page vcs-rec url))
- ret
- moved)
- (when (and old-revision (string= old-revision dl-revision))
- (when (y-or-n-p (format "You already have revision %s. Quit? " dl-revision))
- (message "Aborted")
- (kill-buffer rev-buf)
- (throw 'command-level nil)))
- ;; We do not have a revision number once we start download.
- (with-current-buffer rev-buf
- (when old-rev-range
- (delete-region (car old-rev-range) (cdr old-rev-range))
- (basic-save-buffer)))
- (setq ret (web-vcs-get-files-on-page-1
- vcs-rec url
- dl-dir
- ""
- nil
- (if recursive 0 nil)
- dl-revision test))
- (setq moved (nth 1 ret))
- ;; Now we have a revision number again.
- (with-current-buffer rev-buf
- (when (= 0 (buffer-size))
- (insert "WEB VCS Revisions\n\n"))
- (goto-char (point-max))
- (unless (eolp) (insert "\n"))
- (insert (format "%s:%s\n" web-vcs dl-revision))
- (basic-save-buffer)
- (kill-buffer))
- (message "-----------------")
- (web-vcs-message-with-face 'web-vcs-gold "Web-Vcs Download Ready: %S" url)
- (web-vcs-message-with-face 'web-vcs-gold " Time elapsed: %S"
- (web-vcs-nice-elapsed start-time (current-time)))
- (when (> moved 0)
- (web-vcs-message-with-face 'web-vcs-yellow
- " %i files updated (old versions renamed to *.moved)"
- moved))))))
-
-(defun web-vcs-get-files-on-page-1 (vcs-rec url dl-root dl-relative file-mask recursive dl-revision test)
- "Download files listed by VCS-REC on web page URL.
-VCS-REC should be an entry like the entries in the list
-`web-vcs-links-regexp'.
-
-If FILE-MASK is non nil then it is used to match a file path.
-Only matching files will be downloaded. FILE-MASK can have two
-forms, a regular expression or a function.
-
-If FILE-MASK is a regular expression then each part of the path
-may be a regular expresion \(not containing /).
-
-If FILE-MASK is a function then this function is called in each
-directory under DL-ROOT. The function is called with the
-directory as a parameter and should return a cons. The first
-element of the cons should be a regular expression matching file
-names in that directory that should be downloaded. The cdr
-should be t if subdirectories should be visited.
-
-If RECURSIVE go into sub folders on the web page and download
-files from them too.
-
-Place the files under DL-DIR.
-
-The revision on the page URL should match DL-REVISION if this is non-nil.
-
-If TEST is non-nil then do not download, just list the files"
- ;;(web-vcs-message-with-face 'font-lock-comment-face "web-vcs-get-files-on-page-1 %S %S %S %S" url dl-root dl-relative file-mask)
- (let* ((files-matcher (nth 2 vcs-rec))
- (dirs-href-regexp (nth 3 vcs-rec))
- (revision-regexp (nth 5 vcs-rec))
- (dl-dir (file-name-as-directory (expand-file-name dl-relative dl-root)))
- (lst-dl-relative (web-vcs-file-name-as-list dl-relative))
- (lst-file-mask (when (stringp file-mask) (web-vcs-file-name-as-list file-mask)))
- ;;(url-buf (url-retrieve-synchronously url))
- this-page-revision
- files
- suburls
- (moved 0)
- (temp-file-base (expand-file-name "web-vcs-temp-list.tmp" dl-dir))
- temp-list-file
- temp-list-buf
- folder-res
- http-sts)
- ;; Fix-me: It looks like there is maybe a bug in url-copy-file so
- ;; that it runs synchronously. Try to workaround the problem by
- ;; making a new file temp file name.
- (web-vcs-display-messages nil)
- (unless (file-directory-p dl-dir) (make-directory dl-dir t))
- ;;(message "TRACE: dl-dir=%S" dl-dir)
- (setq temp-list-file (make-temp-name temp-file-base))
- (setq temp-list-buf (web-vcs-ass-folder-cache url))
- (unless temp-list-buf
- ;;(setq temp-list-buf (generate-new-buffer "web-wcs-folder"))
- ;;(web-vcs-url-copy-file-and-check url temp-list-file nil)
- (setq folder-res (web-vcs-url-retrieve-synch url))
- ;; (with-current-buffer temp-list-buf
- ;; (insert-file-contents temp-list-file))
- (unless (memq (cdr folder-res) '(200 201))
- (web-vcs-message-with-face 'web-vcs-red "Could not get %S" url)
- (web-vcs-display-messages t)
- (throw 'command-level nil)))
- ;;(with-current-buffer temp-list-buf
- (with-current-buffer (car folder-res)
- ;;(delete-file temp-list-file)
- ;;(find-file-noselect temp-list-file)
- (when dl-revision
- (setq this-page-revision (web-vcs-get-revision-from-url-buf vcs-rec (current-buffer) url)))
- (when dl-revision
- (unless (string= dl-revision this-page-revision)
- (web-vcs-message-with-face 'web-vcs-red "Revision on %S is %S, but should be %S"
- url this-page-revision dl-revision)
- (web-vcs-display-messages t)
- (throw 'command-level nil)))
- ;; Find files
- (goto-char (point-min))
- (let ((files-href-regexp (nth 1 (assq 'patt files-matcher)))
- (url-num (nth 1 (assq 'url files-matcher)))
- (time-num (nth 1 (assq 'time files-matcher))))
- (while (re-search-forward files-href-regexp nil t)
- (let ((file (match-string url-num))
- (time (match-string time-num)))
- (add-to-list 'files (list file time)))))
- ;; Find subdirs
- (when recursive
- (goto-char (point-min))
- (while (re-search-forward dirs-href-regexp nil t)
- (let ((suburl (match-string 1))
- (lenurl (length url)))
- (when (and (> (length suburl) lenurl)
- (string= (substring suburl 0 lenurl) url))
- (add-to-list 'suburls suburl)))))
- (kill-buffer))
- ;; Download files
- ;;(message "TRACE: files=%S" files)
- (web-vcs-download-files vcs-rec files dl-dir dl-root file-mask)
- ;; Download subdirs
- (when suburls
- (dolist (suburl (reverse suburls))
- (let* ((dl-sub-dir (substring suburl (length url)))
- (full-dl-sub-dir (file-name-as-directory
- (expand-file-name dl-sub-dir dl-dir)))
- (rel-dl-sub-dir (file-relative-name full-dl-sub-dir dl-root)))
- ;;(message "web-vcs-get-revision-from-url-buf dir: %S %S" file-mask rel-dl-sub-dir)
- (when (or (not file-mask)
- (not (stringp file-mask))
- (web-vcs-match-folderwise file-mask rel-dl-sub-dir))
- ;;(message "matched dir %S" rel-dl-sub-dir)
- (unless (web-vcs-contains-file dl-dir full-dl-sub-dir)
- (error "Subdir %S not in %S" dl-sub-dir dl-dir))
- (let* ((ret (web-vcs-get-files-on-page-1 vcs-rec
- suburl
- dl-root
- rel-dl-sub-dir
- file-mask
- (1+ recursive)
- this-page-revision
- test)))
- (setq moved (+ moved (nth 1 ret))))))))
- (list this-page-revision moved)))
-
-(defun web-vcs-get-missing-matching-files (web-vcs url dl-dir file-mask)
- "Download missing files from VCS system using the web interface.
-Use WEB-VCS entry in variable `web-vcs-links-regexp' to download
-files via http from URL to directory DL-DIR.
-
-Before downloading offer to visit the page from which the
-downloading will be made.
-"
- (let ((vcs-rec (or (assq web-vcs web-vcs-links-regexp)
- (error "Does not know web-cvs %S" web-vcs))))
- (web-vcs-get-files-on-page-1 vcs-rec url dl-dir "" file-mask 0 nil nil)))
-
-
-;; (web-vcs-get-files-on-page 'lp "http://bazaar.launchpad.net/%7Enxhtml/nxhtml/main/files/head%3A/" t "c:/test/temp13/" t)
-
-(defvar web-vcs-folder-cache nil) ;; dyn var
-(defun web-vcs-add-folder-cache (url buf)
- (add-to-list 'web-vcs-folder-cache (list url buf)))
-(defun web-vcs-ass-folder-cache (url)
- (assoc url web-vcs-folder-cache))
-(defun web-vcs-clear-folder-cache ()
- (while web-vcs-folder-cache
- (let ((ub (car web-vcs-folder-cache)))
- (setq web-vcs-folder-cache (cdr web-vcs-folder-cache))
- (kill-buffer (nth 1 ub)))))
-
-(defun web-vcs-url-copy-file-and-check (url dl-file dest-file)
- "Copy URL to DL-FILE.
-Log what happened. Use DEST-FILE in the log, not DL-FILE which is
-a temporary file."
- (let ((http-sts nil)
- (file-nonempty nil)
- (fail-reason nil))
- (when dest-file (web-vcs-log url dest-file nil))
- (web-vcs-display-messages nil)
- ;;(message "before url-copy-file %S" dl-file)
- (setq http-sts (web-vcs-url-copy-file url dl-file nil t)) ;; don't overwrite, keep time
- ;;(message "after url-copy-file %S" dl-file)
- (if (and (file-exists-p dl-file)
- (setq file-nonempty (< 0 (nth 7 (file-attributes dl-file)))) ;; file size 0
- (memq http-sts '(200 201)))
- (when dest-file
- (web-vcs-log nil nil " Done.\n"))
- (setq fail-reason
- (cond
- (http-sts (format "HTTP %s" http-sts))
- (file-nonempty "File looks bad")
- (t "Server did not respond")))
- (unless dest-file (web-vcs-log url dl-file "TEMP FILE"))
- (web-vcs-log nil nil (format " *Failed:* %s\n" fail-reason))
- ;; Requires user attention and intervention
- (web-vcs-message-with-face 'web-vcs-red "Download failed: %s, %S" fail-reason url)
- (web-vcs-display-messages t)
- (message "\n")
- (web-vcs-message-with-face 'web-vcs-yellow "Please retry what you did before!\n")
- (throw 'command-level nil))))
-
-(defvar web-autoload-temp-file-prefix "TEMPORARY-WEB-AUTO-LOAD-")
-(defvar web-autoload-active-file-sub-url) ;; Dyn var, active during file download check
-(defun web-autoload-acvtive ()
- (and (boundp 'web-autoload-active-file-sub-url)
- web-autoload-active-file-sub-url))
-
-(defun web-vcs-download-files (vcs-rec files dl-dir dl-root file-mask)
- (dolist (file (reverse files))
- (let* ((url-file (nth 0 file))
- (url-file-time-str (nth 1 file))
- ;; date-to-time assumes GMT so this is ok:
- (url-file-time (when url-file-time-str (date-to-time url-file-time-str)))
- (url-file-name-regexp (nth 4 vcs-rec))
- (url-file-rel-name (progn
- (when (string-match url-file-name-regexp url-file)
- (match-string 1 url-file))))
- (dl-file-name (expand-file-name url-file-rel-name dl-dir))
- (dl-file-time (nth 5 (file-attributes dl-file-name)))
- (file-rel-name (file-relative-name dl-file-name dl-root))
- (file-name (file-name-nondirectory dl-file-name))
- (temp-file (expand-file-name (concat web-autoload-temp-file-prefix file-name) dl-dir))
- temp-buf)
- (cond
- ((and file-mask (not (web-vcs-match-folderwise file-mask file-rel-name))))
- ((and dl-file-time
- url-file-time
- (progn
- ;;(message "dl-file-time =%s" (when dl-file-time (current-time-string dl-file-time)))
- ;;(message "url-file-time=%s" (when url-file-time (current-time-string url-file-time)))
- ;;(message "url-file-tstr=%s" (when url-file-time url-file-time-str))
- t)
- (time-less-p url-file-time
- (time-add dl-file-time (seconds-to-time 1))))
- (web-vcs-message-with-face 'web-vcs-green "Local file %s is newer or same age" file-rel-name))
- ;;(test (progn (message "TEST url-file=%S" url-file) (message "TEST url-file-rel-name=%S" url-file-rel-name) (message "TEST dl-file-name=%S" dl-file-name) ))
- (t
- ;; Avoid trouble with temp file
- (while (setq temp-buf (find-buffer-visiting temp-file))
- (set-buffer-modified-p nil) (kill-buffer temp-buf))
- (when (file-exists-p temp-file) (delete-file temp-file))
- ;;(web-vcs-message-with-face 'font-lock-comment-face "Starting url-copy-file %S %S t t" url-file temp-file)
- (web-vcs-url-copy-file-and-check url-file temp-file dl-file-name)
- ;;(web-vcs-message-with-face 'font-lock-comment-face "Finished url-copy-file %S %S t t" url-file temp-file)
- (let* ((time-after-url-copy (current-time))
- (old-buf-open (find-buffer-visiting dl-file-name)))
- (when (and old-buf-open (buffer-modified-p old-buf-open))
- (save-excursion
- (switch-to-buffer old-buf-open)
- (when (y-or-n-p (format "Buffer %S is modified, save to make a backup? " dl-file-name))
- (save-buffer))))
- (if (and dl-file-time (web-vcs-equal-files dl-file-name temp-file))
- (progn
- (delete-file temp-file)
- (when url-file-time (set-file-times dl-file-name url-file-time))
- (web-vcs-message-with-face 'web-vcs-green "File %S was ok" dl-file-name))
- (when dl-file-time
- (let ((backup (concat dl-file-name ".moved")))
- (rename-file dl-file-name backup t)))
- ;; Be paranoid and let user check here. I actually
- ;; believe that is a very good thing here.
- (web-vcs-be-paranoid temp-file dl-file-name file-rel-name)
- (rename-file temp-file dl-file-name)
- (when url-file-time (set-file-times dl-file-name url-file-time))
- ;; (let ((buf (find-buffer-visiting dl-file-name)))
- ;; (when buf
- ;; (with-current-buffer buf
- ;; (message "before revert-buffer")
- ;; (revert-buffer nil t t)
- ;; (message "after revert-buffer")
- ;; )))
- (if dl-file-time
- (web-vcs-message-with-face 'web-vcs-yellow "Updated %S" dl-file-name)
- (web-vcs-message-with-face 'web-vcs-green "Downloaded %S" dl-file-name))
- (when old-buf-open
- (with-current-buffer old-buf-open
- (set-buffer-modified-p nil)
- (revert-buffer nil t t)))
- (with-current-buffer (find-file-noselect dl-file-name)
- (setq header-line-format
- (propertize (format-time-string "This file was downloaded %Y-%m-%d %H:%M")
- 'face 'web-vcs-green))))
- (web-vcs-display-messages nil)
- ;; This is both for user and remote server load. Do not remove this.
- (redisplay t) (sit-for (- 1.0 (float-time (time-subtract (current-time) time-after-url-copy))))
- ;; (unless old-buf-open
- ;; (when old-buf
- ;; (kill-buffer old-buf)))
- )))
- (redisplay t))))
-
-(defun web-vcs-get-revision-on-page (vcs-rec url)
- "Get revision number using VCS-REC on page URL.
-VCS-REC should be an entry like the entries in the list
-`web-vcs-links-regexp'."
- ;; url-insert-file-contents
- (let ((url-buf (url-retrieve-synchronously url)))
- (web-vcs-get-revision-from-url-buf vcs-rec url-buf url)))
-
-(defun web-vcs-get-revision-from-url-buf (vcs-rec url-buf url)
- "Get revision number using VCS-REC.
-VCS-REC should be an entry in the list `web-vcs-links-regexp'.
-The buffer URL-BUF should contain the content on page URL."
- (let ((revision-regexp (nth 5 vcs-rec)))
- ;; Get revision number
- (with-current-buffer url-buf
- (goto-char (point-min))
- (if (not (re-search-forward revision-regexp nil t))
- (progn
- (web-vcs-message-with-face 'web-vcs-red "Can't find revision number on %S" url)
- (web-vcs-display-messages t)
- (throw 'command-level nil))
- (match-string 1)))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Auto Download
-
-
-;; fix-me: To emulation-mode-map
-;; Fix-me: put this on better keys
-(defvar web-vcs-paranoid-state-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [(control ?c)(control ?c)] 'exit-recursive-edit)
- (define-key map [(control ?c)(control ?n)] 'web-autoload-continue-no-stop)
- (define-key map [(control ?c)(control ?r)] 'web-vcs-investigate-elisp-file)
- (define-key map [(control ?c)(control ?q)] 'web-vcs-quit-auto-download)
- map))
-
-(defun web-vcs-quit-auto-download ()
- "Quit download process.
-This stops the current web autoload processing."
- (interactive)
- ;; Fix-me.
- (when (y-or-n-p "Stop web autoload processing? You can resume it later. ")
- (web-vcs-message-with-face 'web-vcs-red
- "Stopped autoloading in process. It will be resumed when necessary again.")
- (web-vcs-log nil nil "User stopped autoloading")
- (throw 'top-level 'web-autoload-stop)))
-
-(define-minor-mode web-vcs-paranoid-state-mode
- "Mode used temporarily during user check of downloaded file.
-Do not turn on this yourself."
- :lighter (concat " " (propertize "Download file check" 'face 'font-lock-warning-face))
- :global t
- :group 'web-vcs
- (or (not web-vcs-paranoid-state-mode)
- (web-autoload-acvtive)
- (error "This mode can't be used when not downloading")))
-
-(defcustom web-autoload-paranoid t
- "Be paranoid and break to check each file after download."
- :type 'boolean
- :group 'web-vcs)
-
-(defun web-autoload-continue-no-stop ()
- "Continue web auto download.
-This is used after inspecting downloaded elisp files. Set
-`web-autoload-paranoid' to nil before contiuning to avoid further
-breaks to check downloaded files."
- (interactive)
- (setq web-autoload-paranoid nil)
- (web-autoload-continue))
-
-(defun web-autoload-continue ()
- "Continue web auto download.
-This is used after inspecting downloaded elisp files."
- (interactive)
- (if (< 0 (recursion-depth))
- (exit-recursive-edit)
- (web-autoload-byte-compile-queue)))
-
-(defun web-vcs-be-paranoid (temp-file file-dl-name file-sub-url)
- "Be paranoid and check FILE-DL-NAME."
- (when (or (not (boundp 'web-autoload-paranoid))
- web-autoload-paranoid)
- (save-window-excursion
- (let* ((comp-buf (get-buffer "*Compilation*"))
- (comp-win (and comp-buf
- (get-buffer-window comp-buf)))
- (msg-win (web-vcs-display-messages nil))
- temp-buf
- (kf-desc (lambda (fun)
- (let* ((key (where-is-internal fun nil t))
- (k-desc (when key (key-description key)))
- (fmt-kf "\n %s (or %s)")
- (fmt-f "\n %s"))
- (if key
- (format fmt-kf k-desc fun)
- (format fmt-f fun)
- )))))
- (if comp-win
- (progn
- (select-window comp-win)
- (find-file file-dl-name))
- (select-window msg-win)
- (find-file-other-window temp-file))
- (setq temp-buf (current-buffer))
- (web-vcs-log-save)
- (message "-")
- (message "")
- (with-selected-window msg-win
- (goto-char (point-max)))
- (let ((proceed nil)
- (web-autoload-active-file-sub-url file-sub-url)) ;; Dyn var, active during file download check
- (web-vcs-paranoid-state-mode 1)
- (web-vcs-message-with-face
- 'secondary-selection
- (concat "Please check the downloaded file and then continue by doing"
- (funcall kf-desc 'exit-recursive-edit)
- (if (fboundp 'web-autoload-continue-no-stop)
- (concat
- "\n\nOr, for no more breaks to check files do"
- (funcall kf-desc 'web-autoload-continue-no-stop))
- "")
- "\n\nTo stop the web autoloading process for now do"
- (funcall kf-desc 'web-autoload-quit-download)
- "\n\nTo see the log file you can do"
- (funcall kf-desc 'web-vcs-log-edit)
- "\n"))
- (message "")
- (while (not proceed)
- (condition-case err
- (when (eq 'web-autoload-stop
- (catch 'top-level
- ;; Fix-me: review file before rename!
- (setq header-line-format
- (propertize
- (format "Review for downloading. Continue: C-c C-c%s. Destination: %S"
- (if (string= "el" (file-name-extension file-dl-name))
- ", Check: C-c C-r"
- "")
- file-dl-name)
- 'face 'web-vcs-red))
- (unwind-protect
- (progn
- (recursive-edit))
- (web-vcs-paranoid-state-mode -1))
- (with-current-buffer temp-buf
- (set-buffer-modified-p nil)
- (kill-buffer temp-buf))
- (setq proceed t)))
- (throw 'top-level t))
- (error (message "%s" (error-message-string err))))))
- (web-vcs-display-messages t)
- ))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Auto Download Compile Queue
-;;
-;; Downloaded elisp files are placed in a compile queue. They are not
-;; compiled until all required elisp files are downloaded (and
-;; optionally compiled).
-;;
-;; This mechanism works through
-;; - reading (eval-when-compile ...) etc in the files
-;; - a defadviced require that is the driver of the process
-
-(defvar web-autoload-compile-queue nil)
-
-(defvar web-autoload-byte-compile-queue-active nil) ;; Dyn var
-
-(defun web-autoload-byte-compile-file (file load comp-fun)
- (if nil ;;(file-exists-p file)
- (byte-compile-file file load)
- (let ((added-entry (list file load comp-fun nil)))
- (if (member added-entry web-autoload-compile-queue)
- (setq added-entry nil)
- (web-vcs-message-with-face 'web-vcs-gold "Add to compile queue (%S %s)" file load)
- (setq web-autoload-compile-queue (cons added-entry
- web-autoload-compile-queue)))
- (when added-entry
- (if web-autoload-byte-compile-queue-active
- (throw 'web-autoload-comp-restart t)
- (web-autoload-byte-compile-queue))))))
-
-;;(web-autoload-byte-compile-queue)
-(defun web-autoload-byte-compile-queue ()
- (let ((top-entry)
- (web-autoload-byte-compile-queue-active t))
- (while (and web-autoload-compile-queue
- (not (equal top-entry
- (car web-autoload-compile-queue))))
- (setq top-entry (car web-autoload-compile-queue))
- (catch 'web-autoload-comp-restart
- (web-autoload-byte-compile-first)
- (setq web-autoload-compile-queue (cdr web-autoload-compile-queue))))))
-
-(defun web-autoload-byte-compile-first ()
- "Compile first file on compile queue and maybe load it.
-Compile the car of `web-autoload-compile-queue' and load if this
-entry says so."
- (let* ((compiled-it nil)
- (first-entry (car web-autoload-compile-queue))
- (el-file (nth 0 first-entry))
- (load (nth 1 first-entry))
- (comp-fun (nth 2 first-entry))
- (req-done (nth 3 first-entry))
- (elc-file (byte-compile-dest-file el-file))
- (need-compile (or (not (file-exists-p elc-file))
- (file-newer-than-file-p el-file elc-file))))
- (if (not need-compile)
- nil ;;(when load (load elc-file))
- (unless req-done
- (web-autoload-do-eval-requires el-file)
- (setcar (nthcdr 3 first-entry) t))
- (when (catch 'web-autoload-comp-restart
- (condition-case err
- (progn
- (web-vcs-message-with-face 'font-lock-comment-face "Start byte compiling %S" el-file)
- (web-vcs-message-with-face 'web-vcs-pink "Compiling QUEUE: %S" web-autoload-compile-queue)
- (let ((web-autoload-skip-require-advice t)) (funcall comp-fun el-file load))
- (web-vcs-message-with-face 'font-lock-comment-face "Ready byte compiling %S" el-file)
- ;; Return nil to tell there are no known problems
- (if (file-exists-p elc-file)
- nil
- (web-vcs-message-with-face
- 'web-vcs-red "Error: byte compiling did not produce %S" elc-file)
- (web-vcs-display-messages nil)
- ;; Clean up before restart
- (web-autoload-try-cleanup-after-failed-compile first-entry)
- t))
- (error
- (web-vcs-message-with-face
- 'web-vcs-red "Error in byte compiling %S: %s" el-file (error-message-string err))
- (web-vcs-display-messages nil)
- ;; Clean up before restart
- (web-autoload-try-cleanup-after-failed-compile first-entry)
- t ;; error
- )))
- (throw 'web-autoload-comp-restart t)
- ))))
-
-(defun web-autoload-do-eval-requires (el-file)
- "Do eval-when-compile and eval-and-compile."
- ;;(message "web-autoload-do-eval-requires %S" el-file)
- (let ((old-buf (find-buffer-visiting el-file)))
- (with-current-buffer (or old-buf (find-file-noselect el-file))
- (let ((here (point))
- (web-autoload-require-skip-noerror-entries t))
- (save-restriction
- (widen)
- (goto-char (point-min))
- ;;(message "web-autoload-do-eval-requires cb=%s" (current-buffer))
- (while (progn
- (while (progn (skip-chars-forward " \t\n\^l")
- (looking-at ";"))
- (forward-line 1))
- (not (eobp)))
- (let ((form (read (current-buffer))))
- (when (memq (car form) '(eval-when-compile eval-and-compile))
- (web-vcs-message-with-face 'web-vcs-gold " eval %S" form)
- (eval form))
- )))
- (if old-buf (kill-buffer) (goto-char here))))))
-
-
-;; Fix-me: protect against deep nesting
-(defun web-autoload-do-require (feature filename noerror)
- (let* ((feat-name (symbol-name feature))
- (lib (or filename feat-name)))
- (if (load lib noerror t)
- (progn
- (unless (featurep feature)
- (error "web-autoload: Required feature `%s' was not provided" feature))
- feature)
- nil
- )))
-
-(defvar web-autoload-require-skip-noerror-entries nil)
-
-(defadvice require (around
- web-autoload-ad-require)
- (let ((feature (ad-get-arg 0))
- (filename (ad-get-arg 1))
- (noerror (ad-get-arg 2)))
- (if (featurep feature)
- feature
- (if (or filename
- (and noerror
- (or (not (boundp 'web-autoload-skip-require-advice))
- web-autoload-skip-require-advice)))
- (progn
- (message "Doing nearly original require %s, because skipping" (ad-get-arg 0))
- ;; Can't ad-do-it because defadviced functions in load
- ;;(web-autoload-do-require feature filename noerror)
- ;;
- ;; Fix-me: Implement lazy loading here? Could it be done with while-no-input?
- ;;
- ;;(when (assq feature web-autoload-require-list) )
- ad-do-it)
- (unless (and noerror
- web-autoload-require-skip-noerror-entries)
- (let* ((auto-rec (assq feature web-autoload-require-list))
- (web-vcs (nth 1 auto-rec))
- (base-url (nth 2 auto-rec))
- (relative-url (nth 3 auto-rec))
- (base-dir (nth 4 auto-rec))
- (comp-fun (nth 5 auto-rec)))
- (if (not auto-rec)
- ad-do-it
- (let* ((full-el (concat (expand-file-name relative-url base-dir) ".el"))
- (full-elc (byte-compile-dest-file full-el))
- (our-buffer (current-buffer)) ;; Need to come back here
- (our-wcfg (current-window-configuration))
- (mode-line-old (web-vcs-redefine-face 'mode-line 'web-vcs-mode-line))
- (mode-line-inactive-old (web-vcs-redefine-face 'mode-line-inactive 'web-vcs-mode-line-inactive))
- (header-line-format-old (with-current-buffer "*Messages*"
- (prog1
- header-line-format
- (setq header-line-format
- (propertize "Downloading needed files..."
- 'face 'web-vcs-mode-line
- ;;'face '(:height 1.5) ;; does not work
- ))))))
- ;; Fix-me: can't update while accessing the menus
- ;;(message "trying (redisplay t) ;; mode line")
- ;;(sit-for 1) (redisplay t) ;; mode line
- (unwind-protect
- (progn
- (web-vcs-message-with-face 'web-vcs-gold "Doing the really adviced require for %s" feature)
- ;; Check if already downloaded first
- (unless (file-exists-p full-el)
- (setq base-url (eval base-url))
- ;; Download and try again
- (setq relative-url (concat relative-url ".el"))
- (web-vcs-message-with-face 'web-vcs-green "Need to download feature '%s" feature)
- (catch 'web-autoload-comp-restart
- (web-vcs-get-missing-matching-files web-vcs base-url base-dir relative-url)))
- (set-buffer our-buffer) ;; Before we load..
- (when web-autoload-autocompile
- (unless (file-exists-p full-elc)
- ;; Byte compile the downloaded file
- (web-autoload-byte-compile-file full-el t comp-fun)))
- (web-vcs-message-with-face 'web-vcs-gold "Doing finally require for %s" feature)
- (set-buffer our-buffer) ;; ... and after we load
- (set-window-configuration our-wcfg))
- (with-current-buffer "*Messages*" (setq header-line-format header-line-format-old))
- (web-vcs-redefine-face 'mode-line mode-line-old)
- (web-vcs-redefine-face 'mode-line-inactive mode-line-inactive-old)))
- ad-do-it)))))))
-
-;; (setq x (web-vcs-redefine-face 'mode-line (setq z (face-all-attributes 'web-vcs-mode-line (selected-frame)))))
-;; (setq x (web-vcs-redefine-face 'mode-line 'web-vcs-mode-line))
-;; (setq y (web-vcs-redefine-face 'mode-line x))
-;; (describe-face 'web-vcs-mode-line)
-(defun web-vcs-redefine-face (face as-new)
- "Redefine FACE to use the attributes in AS-NEW.
-AS-NEW may be either a face or a list returned by `face-all-attributes'.
-Return an alist with old attributes."
- (let ((ret (face-all-attributes face (selected-frame)))
- (new-face-att (if (facep as-new)
- (face-all-attributes as-new (selected-frame))
- as-new))
- new-at-prop-list
- )
- (dolist (at new-face-att)
- (let ((sym (car at))
- (val (cdr at)))
- (unless (eq val 'unspecified)
- (setq new-at-prop-list (cons sym
- (cons val
- new-at-prop-list)))
- ;;(message "new=%S" new-at-prop-list)
- )))
- (apply 'set-face-attribute face (selected-frame) new-at-prop-list)
- ret
- ))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Web Autoload Define
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Helpers
-
-;;(web-vcs-file-name-as-list "/a/b/c.el")
-;;(web-vcs-file-name-as-list "a/b/c.el")
-;;(web-vcs-file-name-as-list "c:/a/b/c.el")
-;;(web-vcs-file-name-as-list ".*/a/c/")
-;;(web-vcs-file-name-as-list "[^/]*/a/c/") ;; Just avoid this.
-(defun web-vcs-file-name-as-list (filename)
- "Split file name FILENAME into a list with file names."
- ;; We can't use the primitives since they converts \ to / and
- ;; therefore damages the reg exps. Just use our knowledge of the
- ;; internal file name representation instead.
- (split-string filename "/"))
-;; (let ((lst-name nil)
-;; (head filename)
-;; (old-head ""))
-;; (while (and (not (string= old-head head))
-;; (> (length head) 0))
-;; (let* ((file-head (directory-file-name head))
-;; (tail (file-name-nondirectory (directory-file-name head))))
-;; (setq old-head head)
-;; (setq head (file-name-directory file-head))
-;; ;; For an abs path the final tail is "", use root instead:
-;; (when (= 0 (length tail))
-;; (setq tail head))
-;; (setq lst-name (cons tail lst-name))))
-;; lst-name))
-
-;;(web-vcs-match-folderwise ".*/util/mum.el" "top/util/mum.el")
-;;(web-vcs-match-folderwise ".*/util/mu.el" "top/util/mum.el")
-;;(web-vcs-match-folderwise ".*/ut/mum.el" "top/util/mum.el")
-;;(web-vcs-match-folderwise ".*/ut../mum.el" "top/util/mum.el")
-;;(web-vcs-match-folderwise ".*/ut../mum.el" "top/util")
-;;(web-vcs-match-folderwise ".*/ut../mum.el" "top")
-;;(web-vcs-match-folderwise "top/ut../mum.el" "top")
-(defun web-vcs-match-folderwise (regex file)
- "Split REGEXP as a file path and match against FILE parts."
- ;;(message "folderwise %S %S" regex file)
- (let ((lst-regex (web-vcs-file-name-as-list regex))
- (lst-file (web-vcs-file-name-as-list file)))
- (when (>= (length lst-regex) (length lst-file))
- (catch 'match
- (while lst-file
- (let ((head-file (car lst-file))
- (head-regex (car lst-regex)))
- (unless (or (= 0 (length head-file)) ;; Last /, if present, gives ""
- (string-match-p (concat "^" head-regex "$") head-file))
- (throw 'match nil)))
- (setq lst-file (cdr lst-file))
- (setq lst-regex (cdr lst-regex)))
- t))))
-
-(defun web-vcs-contains-file (dir file)
- "Return t if DIR contain FILE."
- (assert (string= dir (file-name-as-directory (expand-file-name dir))) t)
- (assert (or (string= file (file-name-as-directory (expand-file-name file)))
- (string= file (expand-file-name file))) t)
- (let ((dir-len (length dir)))
- (assert (string= "/" (substring dir (1- dir-len))))
- (when (> (length file) dir-len)
- (string= dir (substring file 0 dir-len)))))
-
-(defun web-vcs-nice-elapsed (start-time end-time)
- "Format elapsed time between START-TIME and END-TIME nicely.
-Those times should have the same format as time returned by
-`current-time'."
- (format-seconds "%h h %m m %z%s s" (float-time (time-subtract end-time start-time))))
-
-;; (web-vcs-equal-files "web-vcs.el" "temp.tmp")
-;; (web-vcs-equal-files "../.nosearch" "temp.tmp")
-(defun web-vcs-equal-files (file-a file-b)
- "Return t if files FILE-A and FILE-B are equal."
- (let* ((cmd (if (eq system-type 'windows-nt)
- (list "fc" nil nil nil
- "/B" "/OFF"
- (convert-standard-filename file-a)
- (convert-standard-filename file-b))
- (list diff-command nil nil nil
- "--binary" "-q" file-a file-b)))
- (ret (apply 'call-process cmd)))
- ;;(message "ret=%s, cmd=%S" ret cmd) (sit-for 2)
- (cond
- ((= 1 ret)
- nil)
- ((= 0 ret)
- t)
- (t
- (error "%S returned %d" cmd ret)))))
-
-(defun web-vcs-display-messages (select)
- "Display *Messages* buffer. Select its window if SELECT."
- (let ((msg-win (display-buffer "*Messages*")))
- (with-selected-window msg-win (goto-char (point-max)))
- (when select (select-window msg-win))
- msg-win))
-
-;; (web-vcs-message-with-face 'secondary-selection "I am saying: %s and %s" "Hi" "Farwell!")
-;;;###autoload
-(defun web-vcs-message-with-face (face format-string &rest args)
- "Display a colored message at the bottom of the string.
-FACE is the face to use for the message.
-FORMAT-STRING and ARGS are the same as for `message'.
-
-Also put FACE on the message in *Messages* buffer."
- (with-current-buffer "*Messages*"
- (save-restriction
- (widen)
- (let* ((start (let ((here (point)))
- (goto-char (point-max))
- (prog1
- (copy-marker
- (if (bolp) (point-max)
- (1+ (point-max))))
- (goto-char here))))
- (msg-with-face (propertize (apply 'format format-string args)
- 'face face)))
- ;; This is for the echo area:
- (message "%s" msg-with-face)
- ;; This is for the buffer:
- (when (< 0 (length msg-with-face))
- (goto-char (1- (point-max)))
- ;;(backward-char)
- ;;(unless (eolp) (goto-char (line-end-position)))
- (put-text-property start (point)
- 'face face))))))
-
-(defun web-vcs-num-moved (root)
- "Return nof files matching *.moved inside directory ROOT."
- (let* ((file-regexp ".*\\.moved$")
- (files (directory-files root t file-regexp))
- (subdirs (directory-files root t)))
- (dolist (subdir subdirs)
- (when (and (file-directory-p subdir)
- (not (or (string= "/." (substring subdir -2))
- (string= "/.." (substring subdir -3)))))
- (setq files (append files (web-vcs-rdir-get-files subdir file-regexp) nil))))
- (length files)))
-
-;; Copy of rdir-get-files in ourcomment-util.el
-(defun web-vcs-rdir-get-files (root file-regexp)
- (let ((files (directory-files root t file-regexp))
- (subdirs (directory-files root t)))
- (dolist (subdir subdirs)
- (when (and (file-directory-p subdir)
- (not (or (string= "/." (substring subdir -2))
- (string= "/.." (substring subdir -3)))))
- (setq files (append files (web-vcs-rdir-get-files subdir file-regexp) nil))))
- files))
-
-(defun web-vcs-contains-moved-files (dl-dir)
- "Return t if there are *.moved files in DL-DIR."
- (let ((num-moved (web-vcs-num-moved dl-dir)))
- (when (> num-moved 0)
- (web-vcs-message-with-face 'font-lock-warning-face
- (concat "There are %d *.moved files (probably from prev download)\n"
- "in %S.\nPlease delete them first.")
- num-moved dl-dir)
- t)))
-
-
-(defun web-vcs-set&save-option (symbol value)
- (customize-set-variable symbol value)
- (customize-set-value symbol value)
- (when (condition-case nil (custom-file) (error nil))
- (customize-mark-to-save symbol)
- (custom-save-all)
- (message "web-vcs: Saved option %s with value %s" symbol value)))
-
-(defvar web-vcs-el-this (or load-file-name
- (when (boundp 'bytecomp-filename) bytecomp-filename)
- buffer-file-name))
-
-
-(require 'bytecomp)
-(defun web-vcs-byte-compile-newer-file (el-file load)
- (let ((elc-file (byte-compile-dest-file el-file)))
- (when (or (not (file-exists-p elc-file))
- (file-newer-than-file-p el-file elc-file))
- (byte-compile-file el-file load))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Compiling
-
-;;;###autoload
-(defun web-vcs-byte-compile-file (file &optional load extra-load-path comp-dir)
- "Byte compile FILE in a new Emacs sub process.
-EXTRA-LOAD-PATH is added to the front of `load-path' during
-compilation.
-
-FILE is set to `buffer-file-name' when called interactively.
-If LOAD"
- (interactive (list (buffer-file-name)
- t))
- (when (with-no-warnings (called-interactively-p))
- (unless (eq major-mode 'emacs-lisp-mode)
- (error "Must be in emacs-lisp-mode")))
- (let* ((old-env-load-path (getenv "EMACSLOADPATH"))
- (sub-env-load-path (or old-env-load-path
- ;;(mapconcat 'identity load-path ";")))
- (mapconcat 'identity load-path path-separator)))
- ;; Fix-me: name of compile log buffer. When should it be
- ;; deleted? How do I bind it to byte-compile-file? Or do I?
- (file-buf (find-buffer-visiting file))
- (out-buf (get-buffer-create "*Compile-Log*"))
- (elc-file (byte-compile-dest-file file))
- (this-emacs-exe (locate-file invocation-name
- (list invocation-directory)
- exec-suffixes))
- (default-directory (or comp-dir default-directory))
- (debug-on-error t)
- start)
- ;; (when (and file-buf
- ;; (buffer-modified-p file-buf))
- ;; (switch-to-buffer file-buf)
- ;; (error "Buffer must be saved first: %S" file-buf))
- (dolist (full-p extra-load-path)
- ;;(setq sub-env-load-path (concat full-p ";" sub-env-load-path)))
- (setq sub-env-load-path (concat full-p path-separator sub-env-load-path)))
- (unless (get-buffer-window out-buf (selected-frame))
- (if (string= file (buffer-file-name))
- (display-buffer out-buf)
- (unless (eq (current-buffer) out-buf)
- (switch-to-buffer out-buf))))
- (with-selected-window (get-buffer-window out-buf)
- (with-current-buffer out-buf
- (unless (local-variable-p 'web-vcs-comp-dir)
- (set (make-local-variable 'web-vcs-comp-dir) (or comp-dir default-directory)))
- (setq default-directory web-vcs-comp-dir)
- (widen)
- (goto-char (point-max))
- (when (or (= 0 (buffer-size))
- (not (derived-mode-p 'compilation-mode)))
- (insert (propertize "\nWeb VCS compilation output" 'font-lock-face 'font-lock-comment-face))
- (compilation-mode)
- (setq font-lock-verbose nil)
- (font-lock-add-keywords nil
- '(("\\<Compile\\>" . 'compilation-info))))
- (let ((inhibit-read-only t)
- (rel-file (file-relative-name file)))
- (insert "\n\n")
- (insert "** Compile " rel-file "\n"))
- (setq start (point))
- (when (file-exists-p elc-file) (delete-file elc-file))
- (if (or (not window-system)
- (< emacs-major-version 23))
- (byte-compile-file file)
- ;;(message "web-vcs-byte-compile-file:sub-env-load-path=%s" sub-env-load-path)
- (unless (file-exists-p this-emacs-exe)
- (error "Can't find this-emacs-exe=%s" this-emacs-exe))
- (unless (stringp sub-env-load-path) (error "I did it again, sub-env-load-path=%S" sub-env-load-path))
- (setenv "EMACSLOADPATH" sub-env-load-path)
- ;; Fix-me: status
- (let* ((inhibit-read-only t)
- (ret (apply 'call-process this-emacs-exe nil out-buf t
- "-Q" "--batch"
- "--eval" "(setq debug-on-error t)"
- "--eval" "(remove-hook 'find-file-hook 'vc-find-file-hook)"
- "--file" file
- "-f" "emacs-lisp-byte-compile"
- nil)))
- ;;(insert (format "call-process returned: %s\n" ret))
- )
- (setenv "EMACSLOADPATH" old-env-load-path))
- (goto-char start)
- (while (re-search-forward "^\\([a-zA-Z0-9/\._-]+\\):[0-9]+:[0-9]+:" nil t)
- (let ((rel-file (file-relative-name file))
- (inhibit-read-only t))
- (replace-match rel-file nil nil nil 1)))
- (goto-char (point-max))))
- (when (file-exists-p elc-file)
- (when (and load window-system) (load elc-file))
- t)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Temporary helpers, possibly included in Emacs
-
-;; (setq x (web-vcs-url-retrieve-synch "http://emacswiki.org/"))
-(defun web-vcs-url-retrieve-synch (url)
- "Retrieve URL, return cons with buffer and http status."
- (let* ((url-show-status nil) ;; just annoying showing status here
- (buffer (url-retrieve-synchronously url))
- (handle nil)
- (http-status nil))
- (if (not buffer)
- (error "Retrieving url %s gave no buffer" url))
- (with-current-buffer buffer
- (if (= 0 (buffer-size))
- (progn
- (kill-buffer)
- nil)
- (require 'url-http)
- (setq http-status (url-http-parse-response))
- (if (memq http-status '(200 201))
- (progn
- (goto-char (point-min))
- (unless (search-forward "\n\n" nil t)
- (error "Could not find header end in buffer for %s" url))
- (delete-region (point-min) (point))
- (set-buffer-modified-p nil)
- (goto-char (point-min)))
- (kill-buffer buffer)
- (setq buffer nil))))
- (cons buffer http-status)))
-
-;; Modified just to return http status
-(defun web-vcs-url-copy-file (url newname &optional ok-if-already-exists
- keep-time preserve-uid-gid)
- "Copy URL to NEWNAME. Both args must be strings.
-Signals a `file-already-exists' error if file NEWNAME already exists,
-unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil.
-A number as third arg means request confirmation if NEWNAME already exists.
-This is what happens in interactive use with M-x.
-Fourth arg KEEP-TIME non-nil means give the new file the same
-last-modified time as the old one. (This works on only some systems.)
-Fifth arg PRESERVE-UID-GID is ignored.
-A prefix arg makes KEEP-TIME non-nil."
- (if (and (file-exists-p newname)
- (not ok-if-already-exists))
- (error "Opening output file: File already exists, %s" newname))
- (let ((buffer (url-retrieve-synchronously url))
- (handle nil)
- (ret nil))
- (if (not buffer)
- (error "Retrieving url %s gave no buffer" url))
- (with-current-buffer buffer
- (if (= 0 (buffer-size))
- (progn
- (kill-buffer)
- nil)
- (require 'url-http)
- (setq ret (url-http-parse-response))
- (setq handle (mm-dissect-buffer t))
- (mm-save-part-to-file handle newname)
- (kill-buffer buffer)
- (mm-destroy-parts handle)))
- ret))
-
-(defun web-vcs-read-and-accept-key (prompt accepted &optional reject-message help-function)
- (let ((key nil)
- rejected)
- (while (not (member key accepted))
- (if (and help-function
- (or (member key help-event-list)
- (eq key ??)))
- (funcall help-function)
- (unless rejected
- (setq rejected t)
- (setq prompt (concat (or reject-message "Please answer with one of the alternatives.")
- "\n\n"
- prompt))
- (setq key (web-vcs-read-key prompt)))))
- key))
-
-(defconst web-vcs-read-key-empty-map (make-sparse-keymap))
-
-(defvar web-vcs-read-key-delay 0.01) ;Fast enough for 100Hz repeat rate, hopefully.
-
-(defun web-vcs-read-key (&optional prompt)
- "Read a key from the keyboard.
-Contrary to `read-event' this will not return a raw event but instead will
-obey the input decoding and translations usually done by `read-key-sequence'.
-So escape sequences and keyboard encoding are taken into account.
-When there's an ambiguity because the key looks like the prefix of
-some sort of escape sequence, the ambiguity is resolved via `web-vcs-read-key-delay'."
- (let ((overriding-terminal-local-map web-vcs-read-key-empty-map)
- (overriding-local-map nil)
- (old-global-map (current-global-map))
- (timer (run-with-idle-timer
- ;; Wait long enough that Emacs has the time to receive and
- ;; process all the raw events associated with the single-key.
- ;; But don't wait too long, or the user may find the delay
- ;; annoying (or keep hitting more keys which may then get
- ;; lost or misinterpreted).
- ;; This is only relevant for keys which Emacs perceives as
- ;; "prefixes", such as C-x (because of the C-x 8 map in
- ;; key-translate-table and the C-x @ map in function-key-map)
- ;; or ESC (because of terminal escape sequences in
- ;; input-decode-map).
- web-vcs-read-key-delay t
- (lambda ()
- (let ((keys (this-command-keys-vector)))
- (unless (zerop (length keys))
- ;; `keys' is non-empty, so the user has hit at least
- ;; one key; there's no point waiting any longer, even
- ;; though read-key-sequence thinks we should wait
- ;; for more input to decide how to interpret the
- ;; current input.
- (throw 'read-key keys)))))))
- (unwind-protect
- (progn
- (use-global-map web-vcs-read-key-empty-map)
- (message (concat (apply 'propertize prompt (member 'face minibuffer-prompt-properties))
- (propertize " " 'face 'cursor)))
- (aref (catch 'read-key (read-key-sequence-vector nil nil t)) 0))
- (cancel-timer timer)
- (use-global-map old-global-map))))
-
-;; End temp helpers
-;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;(web-vcs-existing-files-matcher default-directory)
-(defun web-vcs-existing-files-matcher (dir)
- (let ((files-and-dirs (directory-files dir nil "[^#~]$"))
- files
- (default-directory dir))
- (dolist (df files-and-dirs)
- (unless (file-directory-p df)
- (setq files (cons df files))))
- (cons (regexp-opt files) t)))
-
-(defun web-vcs-update-existing-files (vcs base-url dl-dir this-dir)
- (let ((files-and-dirs (directory-files this-dir nil "\\(?:\\.elc\\|\\.moved\\|[^#~]\\)$"))
- files
- dirs
- (this-rel (file-relative-name this-dir dl-dir))
- file-mask)
- (when (string= "./" this-rel) (setq this-rel ""))
- (dolist (df files-and-dirs)
- (if (and (file-directory-p df)
- (not (member df '("." ".."))))
- (setq dirs (cons df dirs))
- (setq files (cons df files))))
- ;;(web-vcs-message-with-face 'hi-blue "this-rel=%S %S %S" this-rel dl-dir this-dir)
- (setq file-mask (concat this-rel (regexp-opt files)))
- ;;(web-vcs-message-with-face 'hi-blue "r=%S" file-mask)
- (web-vcs-get-missing-matching-files vcs base-url dl-dir file-mask)
- (dolist (d dirs)
- (web-vcs-update-existing-files vcs base-url dl-dir
- (file-name-as-directory
- (expand-file-name d this-dir))))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Some small bits for security and just overview.
-
-(defun web-vcs-fontify-as-ps-print()
- (save-restriction
- (widen)
- (let ((start (point-min))
- (end (point-max)))
- (cond ((and (boundp 'jit-lock-mode) (symbol-value 'jit-lock-mode))
- (jit-lock-fontify-now start end))
- ((and (boundp 'lazy-lock-mode) (symbol-value 'lazy-lock-mode))
- (lazy-lock-fontify-region start end))))))
-
-
-;;(web-vcs-get-fun-details 'describe-function)
-;;(web-vcs-get-fun-details 'require)
-;;(describe-function 'describe-function)
-(defun web-vcs-get-fun-details (function)
- (unless (symbolp function) (error "Not a symbol: %s" function))
- (unless (functionp function) (error "Not a function: %s" function))
- ;; Do as in `describe-function':
- (let* ((advised (and (symbolp function) (featurep 'advice)
- (ad-get-advice-info function)))
- ;; If the function is advised, use the symbol that has the
- ;; real definition, if that symbol is already set up.
- (real-function
- (or (and advised
- (let ((origname (cdr (assq 'origname advised))))
- (and (fboundp origname) origname)))
- function))
- ;; Get the real definition.
- (def (if (symbolp real-function)
- (symbol-function real-function)
- function))
- errtype file-name (beg "") string)
- ;; Just keep this as it is to more easily compare with `describe-function-1'.
- (setq string
- (cond ((or (stringp def)
- (vectorp def))
- "a keyboard macro")
- ((subrp def)
- (if (eq 'unevalled (cdr (subr-arity def)))
- (concat beg "special form")
- (concat beg "built-in function")))
- ((byte-code-function-p def)
- (concat beg "compiled Lisp function"))
- ((symbolp def)
- (while (and (fboundp def)
- (symbolp (symbol-function def)))
- (setq def (symbol-function def)))
- ;; Handle (defalias 'foo 'bar), where bar is undefined.
- (or (fboundp def) (setq errtype 'alias))
- (format "an alias for `%s'" def))
- ((eq (car-safe def) 'lambda)
- (concat beg "Lisp function"))
- ((eq (car-safe def) 'macro)
- "a Lisp macro")
- ((eq (car-safe def) 'autoload)
- ;;(setq file-name-auto (nth 1 def))
- ;;(setq file-name-auto (find-lisp-object-file-name function def))
- ;;(setq file-auto-noext (file-name-sans-extension file-name-auto))
- (format "%s autoloaded %s"
- (if (commandp def) "an interactive" "an")
- (if (eq (nth 4 def) 'keymap) "keymap"
- (if (nth 4 def) "Lisp macro" "Lisp function"))))
- ((keymapp def)
- (let ((is-full nil)
- (elts (cdr-safe def)))
- (while elts
- (if (char-table-p (car-safe elts))
- (setq is-full t
- elts nil))
- (setq elts (cdr-safe elts)))
- (if is-full
- "a full keymap"
- "a sparse keymap")))
- (t "")))
- (setq file-name (find-lisp-object-file-name function def))
- (list errtype advised file-name string)
- ))
-
-;;(web-vcs-investigate-read "c:/emacsw32/nxhtml/nxhtml/nxhtml-autoload.el" "*Messages*")
-(defun web-vcs-investigate-read (elisp out-buf)
- "Check forms in buffer by reading it."
- (let* ((here (point))
- unsafe-eval re-fun re-var
- elisp-el-file
- (is-same-file (lambda (file)
- (when file
- (setq file (concat (file-name-sans-extension file) ".el"))
- (string= (file-truename file) elisp-el-file)))))
- (with-current-buffer elisp
- (setq elisp-el-file (when (buffer-file-name)
- (file-truename (buffer-file-name))))
- (save-restriction
- (widen)
- (web-vcs-fontify-as-ps-print)
- (goto-char (point-min))
- (while (progn
- (while (progn (skip-chars-forward " \t\n\^l")
- (looking-at ";"))
- (forward-line 1))
- (not (eobp)))
- (let* ((pos (point))
- (form (read (current-buffer)))
- (def (nth 0 form))
- (sym (and (listp form)
- (symbolp (nth 1 form))
- (nth 1 form)))
- (form-fun (and sym
- (functionp sym)
- (symbol-function sym)))
- (form-var (boundp sym))
- (safe-forms '( defun defmacro
- define-minor-mode define-globalized-minor-mode
- defvar defconst
- defcustom
- defface defgroup
- ;; fix-me: check if these do re-fun too:
- define-derived-mode
- define-global-minor-mode
- define-globalized-minor-mode
-
- make-local-variable make-variable-buffer-local
- provide
- require
- message))
- (safe-eval (or (memq def safe-forms)
- (and (memq def '( eval-when-compile eval-and-compile))
- (or (not (consp (nth 1 form)))
- (memq (car (nth 1 form)) safe-forms)))))
- )
- (cond
- ((not safe-eval)
- (setq unsafe-eval
- (cons (list form (copy-marker pos) (buffer-substring pos (point)))
- unsafe-eval)))
- ((and form-fun
- (memq def '( defun defmacro define-minor-mode define-globalized-minor-mode)))
- (setq re-fun (cons (cons sym pos) re-fun)))
- ((and form-var
- (memq def '( defvar defconst defcustom))
- (or (not (eq sym 'defvar))
- (< 2 (length form))))
- (setq re-var (cons sym re-var)))))))
- (goto-char here))
- (with-current-buffer out-buf
- (save-restriction
- (widen)
- (goto-char (point-max))
- (unless (bobp) (insert "\n\n"))
- (insert (propertize "Found these possible problems when reading the file:\n"
- 'face '(:height 1.5)))
- (or unsafe-eval
- re-fun
- (insert "\n"
- "Found no problems (but there may still be)"
- "\n"))
-
- ;; Fix-me: Link
- (when unsafe-eval
- (insert (propertize
- (format "\n* Forms that are executed when loading the file (found %s):\n\n"
- (length unsafe-eval))
- 'face '(:height 1.2)))
- (dolist (u unsafe-eval)
- (insert-text-button "Go to form below"
- 'action
- `(lambda (button)
- (let* ((marker ,(nth 1 u))
- (buf (marker-buffer marker)))
- (switch-to-buffer-other-window buf)
- (unless (and (< marker (point-max))
- (> marker (point-min)))
- (widen))
- (goto-char marker))))
- (insert "\n")
- (insert (nth 2 u) "\n\n"))
- (insert "\n"))
- (when re-fun
- (insert (propertize
- (format "\n* The file will possibly redefine these functions that are currently defined (%s):\n"
- (length re-fun))
- 'face '(:height 1.2)))
- (setq re-fun (sort re-fun (lambda (a b) (string< (symbol-name (car a)) (symbol-name (car b))))))
- (let ((row 0)
- (re-fun-with-info (mapcar (lambda (fun)
- (cons fun (web-vcs-get-fun-details (car fun))))
- re-fun))
- re-fun-other-files
- (n-same 0)
- (n-web-auto 0))
- ;; Check same file
- (dolist (info re-fun-with-info)
- (let* ((file-name (nth 3 info))
- (fun (car (nth 0 info)))
- (web-auto (get fun 'web-autoload)))
- (cond ((funcall is-same-file file-name)
- (setq n-same (1+ n-same)))
- (web-auto
- (setq n-web-auto (1+ n-web-auto))
- (setq re-fun-other-files (cons info re-fun-other-files)))
- (t
- (setq re-fun-other-files (cons info re-fun-other-files))))))
-
- (when (< 0 n-same)
- (insert "\n "
- (propertize (format "%s functions alreay defined by this file (which seems ok)" n-same)
- 'face 'web-vcs-green)
- "\n"))
-
- (dolist (info re-fun-other-files)
- (let* ((fun-rec (nth 0 info))
- (errtype (nth 1 info))
- (advised (nth 2 info))
- (file-name (nth 3 info))
- (string (nth 4 info))
- (fun (car fun-rec))
- (fun-pos (cdr fun-rec))
- (fun-web-auto (get fun 'web-autoload))
- )
- (when (= 0 (% row 5)) (insert "\n"))
- (setq row (1+ row))
- (insert " `")
- (insert-text-button (format "%s" fun)
- 'action
- `(lambda (button)
- (describe-function ',fun)))
- (insert "'")
- (insert " (" string)
- (when fun-web-auto
- (insert " autoloaded from web, ")
- (insert-text-button "info"
- 'action
- `(lambda (button)
- ;; Fix-me: maybe a bit more informative ... ;-)
- (message "%S" ',fun-web-auto))))
- (insert ")")
- (when advised (insert ", " (propertize "adviced" 'face 'font-lock-warning-face)))
- (insert ", "
- (cond
- ((funcall is-same-file file-name)
- (propertize "defined in this file" 'face 'web-vcs-green)
- )
- (fun-web-auto
- (if (not (web-autoload-acvtive))
- (propertize "web download not active" 'face 'web-vcs-yellow)
- ;; See if file matches
- (let ((active-sub-url web-autoload-active-file-sub-url)
- (fun-sub-url (nth 2 fun-web-auto)))
- (setq active-sub-url (file-name-sans-extension active-sub-url))
- (if (string-match-p fun-sub-url active-sub-url)
- (propertize "web download, matches" 'face 'web-vcs-yellow)
- (propertize "web download, doesn't matches" 'face 'web-vcs-red)
- ))))
- (t
- (propertize "defined in other file" 'face 'web-vcs-red))))
- (unless (funcall is-same-file file-name)
- (insert " (")
- (insert-text-button "go to new definition"
- 'action
- `(lambda (button)
- (interactive)
- (let ((m-pos ,(with-current-buffer elisp
- (copy-marker fun-pos))))
- (switch-to-buffer-other-window (marker-buffer m-pos))
- (goto-char m-pos))))
- (insert ")"))
- (insert "\n")
- ))))))))
-
-;; I am quite tired of doing this over and over again. Why is this not
-;; in Emacs?
-(defvar web-vcs-button-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [tab] 'forward-button)
- (define-key map [(shift tab)] 'backward-button)
- map))
-(define-minor-mode web-vcs-button-mode
- "Just to bind `forward-button' etc"
- :lighter nil)
-
-(defvar web-vcs-eval-output-start nil)
-
-;;(web-vcs-investigate-file)
-;;;###autoload
-(defun web-vcs-investigate-elisp-file (file-or-buffer)
- (interactive (list
- (if (derived-mode-p 'emacs-lisp-mode)
- (current-buffer)
- (read-file-name "Elisp file to check: "))))
- (let* ((elisp (if (bufferp file-or-buffer)
- file-or-buffer
- (find-file-noselect file-or-buffer)))
- (elisp-file (with-current-buffer elisp (buffer-file-name)))
- (out-buf (get-buffer-create "Web VCS Sec Inv")))
- (if (not (with-current-buffer elisp (derived-mode-p 'emacs-lisp-mode)))
- (progn
- (unless (eq (current-buffer) elisp)
- (display-buffer elisp))
- (message "Buffer %s is not in emacs-lisp-mode" (buffer-name elisp)))
- (switch-to-buffer-other-window out-buf)
- (let ((inhibit-read-only t))
- (erase-buffer)
- (setq buffer-read-only t)
- (web-vcs-button-mode 1)
- (insert "A quick look for problems in ")
- (if elisp-file
- (progn
- (insert "file\n ")
- (insert-text-button elisp-file
- 'action
- `(lambda (button)
- (interactive)
- (find-file-other-window ,elisp-file))))
- (insert "buffer ")
- (insert-text-button (buffer-name elisp)
- 'action
- `(lambda (button)
- (interactive)
- (switch-to-buffer-other-window ,elisp))))
- (insert "\n")
- (let ((here (point)))
- (insert
- "\n"
- (propertize
- (concat "Note that this is just a quick look at the file."
- " You have to investigate the file more carefully yourself"
- " (or be sure someone else has done it for you)."
- " The following are checked for here:"
- "\n")
- 'face font-lock-comment-face))
- (fill-region here (point)))
- (insert
- (propertize
- (concat
- "- Top level forms that might be executed when loading the file.\n"
- "- Redefinition of functions.\n")
- 'face font-lock-comment-face))
- (web-vcs-investigate-read elisp out-buf)
- (when elisp-file
- (insert "\n\n\n")
- (let ((here (point)))
- (insert "If you want to see what will actually be added to `load-history'"
- " and which functions will be defined you can\n")
- (insert-text-button "click here to try to eval the file"
- 'action `(lambda (button) (interactive)
- (if (y-or-n-p "Load the file in a batch Emacs session? ")
- (web-vcs-investigate-eval ,elisp-file ,out-buf)
- (message "Aborted"))))
- (insert ".\n\nThis will load the file in a batch Emacs"
- " which runs the same init files as you have run now"
- (cond
- ((not init-file-user) " (with -Q, ie no init files will run)")
- ((not site-run-file) " (with -q, ie .emacs will not furn)")
- (t " (your normal setup files will be run)"
- ))
- " and send back that information."
- " The variable `load-path' is set to match the downloading"
- " to make the loading possible before your setup is ready."
- "\n\nYour current Emacs will not be affected by the loading,"
- " but please be aware that this does not mean your computer can not be."
- " So please look at the file first.")
- (fill-region here (point))
- (setq web-vcs-eval-output-start (point))
- ))
- (set-buffer-modified-p nil)
- (goto-char (point-min))))))
-
-(make-variable-buffer-local 'web-vcs-eval-output-start)
-
-;;(web-vcs-investigate-eval "c:/emacsw32/nxhtml/nxhtml/nxhtml-autoload.el" "*Messages*")
-;;(web-vcs-investigate-eval "c:/emacsw32/nxhtml/autostart.el" "*Messages*")
-(defun web-vcs-investigate-eval (elisp-file out-buf)
- "Get compile loads when evaling buffer.
-For security reasons do this in a fresh Emacs and return the
-resulting load-history entry."
- (let* ((emacs-exe (locate-file invocation-name
- (list invocation-directory)
- exec-suffixes))
- ;; see custom-load-symbol
- (get-lhe '(let ((lhe (or (assoc buffer-file-name load-history)
- (assoc (concat (file-name-sans-extension buffer-file-name) ".elc")
- load-history))))
- (prin1 "STARTHERE\n")
- (prin1 lhe)))
- (elisp-file-name (file-name-sans-extension (file-name-nondirectory elisp-file)))
- (elisp-el-file (file-truename (concat (file-name-sans-extension elisp-file) ".el")))
- (temp-prefix web-autoload-temp-file-prefix)
- (temp-prefix-len (length temp-prefix))
- (is-downloading (and (boundp 'web-autoload-paranoid)
- web-autoload-paranoid))
- (is-temp-file (and is-downloading
- (< (length temp-prefix) (length elisp-file-name))
- (string= temp-prefix
- (substring elisp-file-name 0 temp-prefix-len))))
- (elisp-feature-name (if is-temp-file
- (substring elisp-file-name temp-prefix-len)
- elisp-file-name))
- (is-same-file (lambda (file)
- (when file ;; self protecting
- (setq file (concat (file-name-sans-extension file) ".el"))
- (string= (file-truename file) elisp-el-file))))
- (active-sub-url (when (web-autoload-acvtive)
- (file-name-sans-extension web-autoload-active-file-sub-url)))
- whole-result
- batch-error
- result)
- (with-current-buffer out-buf
- (let ((here (point))
- (inhibit-read-only t))
- (save-restriction
- (widen)
- (goto-char (point-max))
- (delete-region web-vcs-eval-output-start (point)))
- (goto-char here)))
- ;; Fix-me: do not use temp buffer so we can check errors
- (with-temp-buffer
- (let ((old-loadpath (getenv "EMACSLOADPATH"))
- ;;(new-loadpath (mapconcat 'identity load-path ";"))
- (new-loadpath (mapconcat 'identity load-path path-separator))
- ret-val)
- (setenv new-loadpath)
- (message "Loading file in batch Emacs...")
- (setq ret-val
- (call-process emacs-exe nil
- (current-buffer)
- t "--batch"
- ;; fix-me: "-Q" - should be run in the users current environment.
- ;; init-file-user nil => -Q
- ;; site-run-file nil => -q
- (cond
- ((not init-file-user) "-Q")
- ((not site-run-file) "-q")
- (t "--debug-init")) ;; have to have something here...
- "-l" elisp-file
- elisp-file
- "-eval" (format "%S" get-lhe)))
- (message "Loading file in batch Emacs... done, returned %S" ret-val)
- (setenv old-loadpath))
- ;; Fix-me: how do you check the exit status on different platforms?
- (setq whole-result (buffer-substring-no-properties (point-min) (point-max)))
- (condition-case err
- (progn
- (goto-char (point-min))
- (search-forward "STARTHERE")
- (search-forward "(")
- (backward-char)
- (setq result (read (current-buffer))))
- (error (message "")
- ;; Process should probably have failed if we are here,
- ;; but anyway... ;-)
- (setq batch-error
- (concat "Sorry, batch Emacs failed. It returned this message:\n\n"
- whole-result
- (if is-downloading
- (concat
- "\n--------\n"
- "The error may depend on that not all needed files are yet downloaded.\n")
- "\n")))
- )))
- (with-current-buffer out-buf
- (let ((here (point))
- (inhibit-read-only t))
- (save-restriction
- (widen)
- (goto-char (point-max))
- (if batch-error
- (progn
- (insert "\n\n")
- (insert (propertize batch-error 'face 'web-vcs-red)))
- (insert (propertize "\n\nThis file added the following to `load-history':\n\n"
- 'face '(:height 1.5)))
- (insert " (\"" (car result) "\"\n")
- (dolist (e (cdr result))
- (insert (format " %S" e))
- (cond ((stringp e)) ;; Should not happen...
- ;; Variables
- ((symbolp e)
- (insert " - ")
- (insert (if (not (boundp e))
- (propertize "New" 'face 'web-vcs-yellow)
- (let ((e-file (symbol-file e)))
- (if (funcall is-same-file e-file)
- (propertize "Same file now" 'face 'web-vcs-green)
- (let* ((fun-web-auto (get e 'web-autoload))
- (fun-sub-url (nth 2 fun-web-auto)))
- (if (and fun-sub-url
- (string= fun-sub-url active-sub-url))
- (propertize "Web download, matches current download"
- 'face 'web-vcs-yellow)
- (propertize (format "Loaded from %S now" e-file)
- 'face 'web-vcs-red))))))))
- ;; provide
- ((eq (car e) 'provide)
- (insert " - ")
- (let* ((feat (car e))
- (feat-name (symbol-name feat)))
- (insert (cond
- ((not (featurep feat))
- (if (or (string= elisp-feature-name
- (symbol-name (cdr e))))
- (propertize "Web download, matches file name" 'face 'web-vcs-green)
- (propertize "Does not match file name" 'face 'web-vcs-red)))
- (t
- ;; symbol-file will be where it is loaded
- ;; so check load-path instead.
- (let ((file (locate-library feat-name)))
- (if (funcall is-same-file file)
- (propertize "Probably loaded from same file now" 'face 'web-vcs-yellow)
- (propertize (format "Probably loaded from %S now" file)
- 'face 'web-vcs-yellow))))))))
- ;; require
- ((eq (car e) 'require)
- (if (featurep (cdr e))
- (insert " - " (propertize "Loaded now" 'face 'web-vcs-green))
- (insert " - " (propertize "Not loaded now" 'face 'web-vcs-yellow))))
- ;; Functions
- ((memq (car e) '( defun macro))
- (insert " - ")
- (let ((fun (cdr e)))
- (insert (if (functionp fun)
- (let ((e-file (symbol-file e)))
- (if (funcall is-same-file e-file)
- (propertize "Same file now" 'face 'web-vcs-green)
- (let* ((fun-web-auto (get fun 'web-autoload))
- (fun-sub-url (nth 2 fun-web-auto)))
- ;; Fix-me: check for temp download file.
- (if (string= fun-sub-url active-sub-url)
- (propertize "Web download, matches current download"
- 'face 'web-vcs-yellow)
- (propertize (format "Loaded from %S now" e-file)
- 'face 'web-vcs-yellow)))))
- ;; Note that web autoloaded functions are already defined.
- (propertize "New" 'face 'web-vcs-yellow))))))
- (insert "\n"))
- (insert " )\n")
- (goto-char here))))
- (set-buffer-modified-p nil))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Specific for nXhtml
-
-(defvar nxhtml-web-vcs-base-url "http://bazaar.launchpad.net/%7Enxhtml/nxhtml/main/")
-
-;; Fix-me: make gen for 'lp etc
-(defun nxhtml-download-root-url (revision)
- (let* ((base-url nxhtml-web-vcs-base-url)
- (files-url (concat base-url "files/"))
- (rev-part (if revision (number-to-string revision) "head%3A/")))
- (concat files-url rev-part)))
-
-(defun web-vcs-nxhtml ()
- "Install nXhtml.
-Download and install nXhtml."
- (interactive)
- (catch 'command-level
- (setq debug-on-error t)
- (let* ((this-dir (file-name-directory web-vcs-el-this))
- (root-url (nxhtml-download-root-url nil))
- ;;(files '("nxhtml-web-vcs.el" "nxhtml-base.el"))
- (files '("nxhtml-web-vcs.el"))
- (files2 (mapcar (lambda (file)
- (cons file (expand-file-name file this-dir)))
- files))
- need-dl)
- (dolist (file files2)
- (unless (file-exists-p (cdr file))
- (setq need-dl t)))
- (when need-dl
- (let ((prompt
- (concat "Welcome to install nXhtml."
- "\nFirst the nXhtml specific web install file must be downloaded."
- "\nYou will get a chance to review it before it is used."
- "\n\nDo you want to continue? ")))
- (unless (y-or-n-p prompt)
- (message "Aborted")
- (throw 'command-level nil))))
- (message nil)
- (unless (get-buffer-window "*Messages*")
- (web-vcs-display-messages t)
- (delete-other-windows))
- (dolist (file files2)
- (unless (file-exists-p (cdr file))
- (web-vcs-get-missing-matching-files 'lp root-url this-dir (car file))))
- (load (cdr (car files2))))
- (call-interactively 'nxhtml-setup-install)))
-
-
-(provide 'web-vcs)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; web-vcs.el ends here