1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270
|
\input texinfo @c -*-texinfo-*-
@comment %**start of header (This is for running Texinfo on a region.)
@setfilename hm--html-mode.info
@settitle HM HTML Mode
@setchapternewpage odd
@comment %**end of header (This is for running Texinfo on a region.)
@comment $Id: hm--html-mode.texinfo,v 1.12 1997/07/20 06:36:20 muenkel Exp $
@ifinfo
This file documents the Elisp package @code{hm--html-menus}.
Copyright @copyright{} 1997 Heiko Mnkel
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries a copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
sections entitled ``Distribution'' and ``General Public License'' are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the sections entitled ``Distribution'' and ``General Public
License'' may be included in a translation approved by the author instead
of in the original English.
@end ifinfo
@iftex
@input umlaute.texi
@end iftex
@titlepage
@sp 10
@center @titlefont{The Elisp Package hm{-}{-}html{-}menus}
@sp 4
@center by Heiko Mnkel
@sp 4
@center Version 5.8, July 1997
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1997 Heiko Mnkel
@sp 4
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries a copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
sections entitled ``Distribution'' and ``General Public License'' are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the sections entitled ``Distribution'' and ``General Public
License'' may be included in a translation approved by the author instead
of in the original English.
@end titlepage
@comment The Top node contains the master menu for the Info file.
@comment This appears only in the Info file, not in the printed manual.
@node Top, License, (xemacs20), (xemacs20)
@comment node-name, next, previous, up
@menu
* License:: Your rights
* Overview:: Overview
* Distribution:: How to get the latest version
* Installation:: How to install the package
* Customization:: How to customize the package
* Add New Elements:: How to add new HTML elements
* Use With Other Major Modes::
* Internal Drag And Drop:: The HTML independent drag and drop package
* Template Minor Mode:: The HTML independent template package
* Hints For Emacs 19 Users:: Missing features in the Emacs 19
* Bug Reports:: How and to whom you should send bug reports
* Concept Index:: Concept Index
* Function Index:: Function Index
* Variable Index:: Variable Index
@end menu
@node License, Overview, Top, Top
@comment node-name, next, previous, up
@chapter License
@cindex license to copy hm---html-menus
@cindex General Public License
Copyright (C) 1993 - 1997 Heiko Mnkel, muenkel@@tnt.uni-hannover.de
@sp 2
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; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@node Overview, Distribution, License, Top
@comment node-name, next, previous, up
@chapter Overview
@cindex overview
@cindex version
@findex hm--html-mode
@findex hm--html-minor-mode
This document describes the Elisp package @emph{hm---html-menus 5.8}.
The version of the document is:@*
$Id: hm--html-mode.texinfo,v 1.12 1997/07/20 06:36:20 muenkel Exp $
The package provides commands and various popup and pulldown menus for
an HTML mode called @dfn{hm---html-mode}, a mode for writing HTML pages
for the World Wide Web (WWW). It also provides a minor mode
(@dfn{hm---html-minor-mode}), which can be used together with other HTML
major modes, like the psgml-html mode in XEmacs 19.14 or other major
edit modes, like the perl-mode.
You can easily view the HTML documents by calling the browsers w3 (a
nice elisp package from William M. Perry), Netscape, or Mosaic directly
from the pulldown menu of the mode.
An integrated (emacs internal) drag and drop interface makes it
very easy to insert links or images, by just clicking on them.
When appropriate, identical commands work on selected
regions. You'll see the same menu items and can use the same
keystrokes, whether a region is active or not, but if it's
active, then the commands are operating on the region. Therefore, you
don't need to learn different menus or keys for similar functions!
One major design goal of the package was to make it easier to write a
HTML page, even if you don't know much about HTML. For that I've tried
to put more knowledge about HTML, URL's and so on in it than an SGML based
mode could find out from a DTD file. In most cases the user gets help to
construct a specific link by examples, or by a completion list with
possible input strings. And you can choose between an expert popup menu
and an novice popup menu interactively. The novice menu contains only
the basic HTML elements, so that you're not bothered by the quantity of
different HTML elements. And if you want to use more HTML elements, then
you can easily switch to the expert menus.
You can configure the html mode with a special configuration file for
your site and with another file specific to a user. Look at the
customization chapter for this, @xref{Customization, Customization}.
@node Distribution, Installation, Overview, Top
@comment node-name, next, previous, up
@chapter Distribution
The name of the distribution file is
@file{hm--html-menus-<version>.tar.gz}, where @var{<version>} is the
version number. The package is part of the XEmacs. You should always
find the latest version of the package on the following ftp server:
@display
@emph{ftp.tnt.uni-hannover.de} in @file{/pub/editors/xemacs/contrib}
@end display
You should also find the package in the USA on the ftp server
(which is mirrored on many other servers in the world):
@display
@emph{sunsite.unc.edu} in @file{/pub/Linux/apps/editors/emacs}
@end display
@menu
* Contents:: Contents of the distribution
@end menu
@node Contents, , Distribution, Distribution
@comment node-name, next, previous, up
@section Contents
@cindex contents
The package consists of the following files:
@table @file
@item README
Please, read this first.
@itemx README-EMACS-19
Some special hints only for GNU Emacs 19 users.
@itemx ANNOUNCEMENT
Text of the announcement of this package.
@itemx LSM
Entry for the Linux Software Map.
@itemx NEWS
The NEWS and Change log file.
@itemx adapt.el
Provides (emulates XEmacs) functions for the use of this package with
GNU Emacs 19.
@itemx drop
An xbm file with the drag and drop mouse pointer in the XEmacs.
@itemx dropmsk
An xbm file with the mask for the drag and drop mouse pointer in the XEmacs.
@itemx hm--html.el
Provides functions to write html pages. It defines all commands which
insert html elements and entities.
@itemx hm--html-indentation.el
Provides the lisp code for the indentation.
@itemx hm--html-keys.el
Defines the key bindings.
@itemx hm--html-menu.el
Provides the menus.
@itemx hm--html-mode.el
Provides the functions for the definition of the hm--html-mode and the
hm--html-minor-mode. This is the main file of the package.
@itemx hm--html-not-standard.el
Provides functions to insert some non standard html elements. This file
is not evaluated by default and it may be a bad idea to use it.
@itemx hm--html-configuration.el
Configuration file for the html mode. All the user variables are defined
in this file.
@itemx hm--html-drag-and-drop.el
Defines the HTML-specific functions for the drag and drop interface.
@itemx hm--date.el
Defines the function hm--date, which returns the date in the format
"day-month-year" like "30-Jun-1993".
@itemx html-view.el
Ron Tapia's html-view.el to view html pages in Mosaic. It is
patched for use with XEmacs.
@itemx internal-drag-and-drop.el
Provides the general (html-mode independent) functions of the drag and
drop interface.
@itemx templates.doc
Describes the syntax of the templates provided in the file
@file{tmpl-minor-mode.el}
@itemx tmpl-minor-mode.el
Provides functions for the tmpl-minor-mode. With this mode you can
expand templates, which are described in the file
@file{templates-syntax.doc} (look at the files
@file{command-description.html.tmpl} and @file{frame.html.tmpl} for
examples). Templates can be expanded automatically, if you include a
file with templates via the html pulldown menu item "Templates ..." or
with the item "Templates (fixed dirs)...".
@itemx command-description.html.tmpl
Template file for the use with the tmpl-minor-mode.
@itemx frame.html.tmpl
Template file, provides a simple frame.
@itemx doc/hm--html-mode.texinfo
Package documentation in the Texinfo format.
@itemx doc/umlaute.texinfo
Texinfo include file for German vowel mutation (deutsche Umlaute).
@end table
@node Installation, Customization, Distribution, Top
@comment node-name, next, previous, up
@chapter Installation
@cindex installation
@enumerate
@item Put all the *.el files in one of your XEmacs (or emacs) lisp load
directories (e.g. site-lisp/hm--html-menus).
@item @emph{For XEmacs only}: Put the files @file{drop} and @file{dropmsk}
in the directory specified by the lisp variable
@code{idd-data-directory}. By default it is
@file{<prefix>/lib/xemacs-<version>/etc/idd} (eg: if you have installed
the XEmacs 19.15 at your site in @file{/usr/local}, then it is the
directory @file{/usr/local/xemacs/lib/xemacs-19.15/etc/idd}.
If you'd like to put the files in another directory, then you must set
the variable @code{idd-data-directory} to this directory (eg:
@code{(setq idd-data-directory "/usr/local/data")})
@item Put the following in your .emacs (or default.el or site-init.el):
@lisp
(autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t)
(autoload 'hm--html-minor-mode "hm--html-mode" "HTML minor mode." t)
(or (assoc "\\.html$" auto-mode-alist)
(setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
auto-mode-alist)))
(autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode"
"Expand all templates in the current buffer." t)
(autoload 'tmpl-expand-templates-in-region "tmpl-minor-mode"
"Expands the templates in the region from BEGIN to END.
If BEGIN and END are nil, then the current region is used."
t)
(autoload 'tmpl-insert-template-file-from-fixed-dirs "tmpl-minor-mode"
"Inserts a template FILE and expands it, if `tmpl-automatic-expand' is t.
This command tries to read the template file from a list of
predefined directories (look at `tmpl-template-dir-list') and it filters
the contents of these directories with the regular expression
`tmpl-filter-regexp' (look also at this variable).
The command uses a history variable, which could be changed with the
variable `tmpl-history-variable-name'.
The user of the command is able to change interactively to another
directory by entering at first the string \"Change the directory\".
This may be too difficult for the user. Therefore another command
called `tmpl-insert-template-file' exist, which doesn't use fixed
directories and filters."
t)
(autoload 'tmpl-insert-template-file "tmpl-minor-mode"
"Inserts a template FILE and expand it, if `tmpl-automatic-expand' is t.
Look also at `tmpl-template-dir-list', to specify a default template
directory.
You should also take a look at `tmpl-insert-template-file-from-fixed-dirs'
which has additional advantages (and disadvantages :-).
ATTENTION: The interface of this function has changed. The old
function had the argument list (&optional TEMPLATE-DIR AUTOMATIC-EXPAND).
The variables `tmpl-template-dir-list' and `tmpl-automatic-expand' must
now be used instead of the args TEMPLATE-DIR and AUTOMATIC-EXPAND."
t)
(autoload 'html-view-start-mosaic "html-view" "Start Xmosaic." t)
(autoload 'html-view-view-buffer
"html-view"
"View the current buffer in Xmosaic."
t)
(autoload 'html-view-view-file
"html-view"
"View a file in Xmosaic."
t)
(autoload 'html-view-goto-url
"html-view"
"Goto url in Xmosaic."
t)
(autoload 'html-view-get-display
"html-view"
"Get the display for Xmosaic (i.e. hostxy:0.0)."
t)
@end lisp
The above lines assume that you have not already installed another
html mode. If this isn't true, then you should use the following:
@lisp
(setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
auto-mode-alist))
@end lisp
instead of:
@lisp
(or (assoc "\\.html$" auto-mode-alist)
(setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
auto-mode-alist)))
@end lisp
If you want to use the hm--html-minor-mode together
with the psgml-html modes, then you should add the following
line (works only in XEmacs version >= 19.15 and != 20.0):
@lisp
(add-hook 'html-mode-hook 'hm--html-minor-mode)
@end lisp
@end enumerate
@node Customization, Add New Elements, Installation, Top
@comment node-name, next, previous, up
@chapter Customization
@cindex customization
@cindex configuration
You should be able to use the package after its installation without
any further customization. But it contains a lot of user variables to
adapt the package better to your special needs. How to do this is
described in this chapter.
Since the XEmacs 19.15 and 20.2 a special package can be used for the
customization of lisp packages. This package uses now also this
feature. Therefore you can set all user variables with the help of the
Customize submenu, which can be selected in the Option menu. If you use
it, the variables will currently be saved in a special customization
file and not in one of the configuration files (@pxref{Customization
(Configuration) Files, Customization (Configuration) Files}) of this
package. Please look at the @file{NEWS} file or the info manuals of the
XEmacs to find out more about the customization package.
@menu
* Customization (Configuration) Files::
* Customization Variables::
@end menu
@node Customization (Configuration) Files, Customization Variables, Customization, Customization
@comment node-name, next, previous, up
@section Customization (Configuration) Files
@cindex customization files
@cindex configuration files
This package uses 3 different files to customize the mode, but you need
not use all of them. Only one of them, the file
@file{hm--html-configuration.el} is delivered together with the package.
The reason for three different files is to provide the opportunity to
have different customization for the package, the site and the
user. There's also a pulldown menu item to reload all customization
files. The files are described in the following sections.
@menu
* Where Are All The Customization Variables Defined::
* Where To Put Site Specific Customization::
* Where To Put User Specific Customization::
@end menu
@node Where Are All The Customization Variables Defined, Where To Put Site Specific Customization, Customization (Configuration) Files, Customization (Configuration) Files
@comment node-name, next, previous, up
@subsection Where Are All The Customization Variables Defined
@cindex package specific customization
@cindex hm--configuration.el
@vindex HTML_CONFIG_FILE
All variables which can be used to customize the mode are defined in
the package configuration file @file{hm--configuration.el}. You should
take a look at this file if you don't find how to customize a feature
in this documentation (the documentation of a program is never as
complete as its program code :-).
This file is searched in one of your lisp load directories. You can
change this by setting the environment variable @code{HTML_CONFIG_FILE}
to another file. But I don't recommend this.
@emph{Note}: This file is loaded before the other customization files,
so that its definitions could be overwritten. All variables are set by
@code{defvar}, so that its values could also be overwritten with
@code{setq} in any standard emacs customization files (e.g. in
@file{.emacs}).
@node Where To Put Site Specific Customization, Where To Put User Specific Customization, Where Are All The Customization Variables Defined, Customization (Configuration) Files
@comment node-name, next, previous, up
@subsection Where To Put Site Specific Customization
@cindex site specific customization
@cindex hm--site-configuration-file.el
@vindex HTML_SITE_CONFIG_FILE
@vindex hm--html-site-config-file
In general all users at a site are writing their html pages for the same
WWW server. Therefore it is very likely that most of the customizations
are site specific, and only a few are user specific. However, you
don't have to use a site specific customization if you don't want one.
If you'd like to make a site specific customization of
@code{hm--html-mode}, it's possible to put it in a special file called
@file{hm--site-configuration-file.el}. If you do this, you have to set
either the lisp variable @code{hm--html-site-config-file} or the
environment variable @code{HTML_SITE_CONFIG_FILE} to the file and its
path. If you write the filename without its extension (.el), emacs
tries first to load a compiled version of the file.
The environment variables overwrite the lisp variables.
You can prevent the loading of the site specific customization file
by starting the emacs with the -no-site-file flag.
You can also put the site specific customization in any standard emacs
customization file like, @file{default.el}. But an advantage to
using @file{hm--site-configuration-file.el} is that it is very likely
you will be able to use this file with future versions of the
package. I'll try to make it as backward compatible as possible.
@emph{Note}: This file is loaded after the package customization file
and before the user customization file.
@node Where To Put User Specific Customization, , Where To Put Site Specific Customization, Customization (Configuration) Files
@comment node-name, next, previous, up
@subsection Where To Put User Specific Customization
@cindex user specific customization
@cindex ~/.hm--html-configuration.el
@vindex HTML_USER_CONFIG_FILE
@vindex hm--html-user-config-file
User specific customization can be put in the file
@file{.hm--html-configuration.el}, which is searched by default in the
home directory of the user. This can be overwritten by setting either
the environment variable @code{HTML_USER_CONFIG_FILE} or the lisp
variable @code{hm--html-user-config-file} to the name of the file and
its path. If you write the filename without its extension (.el), emacs
tries first to load a compiled version of the file.
If neither the environment variable nor the lisp variable is set, the
variable @code{init-file-user} will be respected. This means, that
you'll get the @file{~other-user/.hm--html-configuration.el}, if you've
started the emacs with the options @code{-u other-user}. In all cases,
no user specific customization file will be loaded, if the @code{-q}
option was given to the emacs.
You can also put the user specific customization in your
@file{.emacs}. It's up to you to decide which way is better.
@emph{Note}: This file is loaded after the package and the site specific
one. Therefore it overwrites all other customization files.
@node Customization Variables, , Customization (Configuration) Files, Customization
@comment node-name, next, previous, up
@section Customization Variables
In the following subsections the main customization variables are
described.
@menu
* User Name/Signature::
* Switching Between Expert And Novice Menus ::
* HTML Doctype::
* Defaults Used For Generating Links::
* Templates::
* Deleting Automounter Path Prefix::
* Automatic Insert Of Information::
* Latin 1 Characters::
* Drag And Drop::
* Font Lock Keywords::
* Prefix Keys::
* Pulldown Menu Names::
* Hook Variables::
* Previewing HTML Files::
* Meta Element::
* Indentation::
@end menu
@node User Name/Signature, Switching Between Expert And Novice Menus , Customization Variables, Customization Variables
@comment node-name, next, previous, up
@subsection User Name/Signature
@cindex user name
@cindex signature
@vindex hm--html-username
@vindex hm--html-signature-file
@itemize @bullet
@item
@code{hm--html-username}: Your real name. This is used as the name of
the signature links. You need only specify it if your name in the
file @file{/etc/passwd} isn't the one you'd like to see in the html
files. Otherwise this may be set to @code{nil}.
@item
@code{hm--html-signature-file}: The link used in your signature. In
general this should be a link to your home page.
@end itemize
@node Switching Between Expert And Novice Menus , HTML Doctype, User Name/Signature, Customization Variables
@comment node-name, next, previous, up
@subsection Switching Between Expert And Novice Menus
@cindex expert menus
@cindex novice menus
@vindex hm--html-expert
@itemize @bullet
@item
@code{hm--html-expert}: If you're a html novice and don't want to be
bothered with lots of possible html elements, then you should use the
novice popup menus. For that, set this variable to @code{nil},
which is the default. But if you are more familiar with html and would
like to use more html elements, then you should use the expert menus and
set this variable to @code{t}.
@end itemize
@node HTML Doctype, Defaults Used For Generating Links, Switching Between Expert And Novice Menus , Customization Variables
@comment node-name, next, previous, up
@subsection HTML Doctype
@vindex hm--html-html-doctype-version
@cindex HTML doctype
@itemize @bullet
@item
@code{hm--html-html-doctype-version}: The HTML version. This is used in
the doctype element. Change this if you use non HTML 3.2 elements. This
package (@xref{Overview, version}.) defines by default only HTML 3.2 elements.
@end itemize
@node Defaults Used For Generating Links, Templates, HTML Doctype, Customization Variables
@comment node-name, next, previous, up
@subsection Defaults Used For Generating Links
@cindex links
One of the main features of @code{hm--html-mode} is its easy ways to
insert special links to html pages, ftp servers, news servers and so
on. I think that most people will have their own (this may be site
specific. @xref{Where To Put Site Specific Customization, Where To Put
Site Specific Customization}.) favourite servers, directories and so
on. You may customize the default values and the alists with useful
alternatives, which are used from the mode in the inserting functions
for the links.
@menu
* Your Favourite HTTP Server::
* Links to WWW Servers::
* Links To Files::
* Links To FTP Servers::
* Links To Emacs Info Files::
* Links To Gopher Servers::
* Links To WAIS Gateways::
* Links To The Mail Gateway::
* Links For Sending Mail::
* Links To The Program Gateway::
* Links To The Local Program Gateway::
* URL For Forms And Image Tags::
* Marking Of Examples::
@end menu
@node Your Favourite HTTP Server, Links to WWW Servers, Defaults Used For Generating Links, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Your Favourite HTTP Server
@cindex favourite HTTP server
@vindex hm--html-favorite-http-server-host-name
@itemize @bullet
@item
@code{hm--html-favorite-http-server-host-name}: The name of your
favorite http server host. It must be specified! This variable is used
in many other variables.
@end itemize
@node Links to WWW Servers, Links To Files, Your Favourite HTTP Server, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links to WWW Server
@cindex WWW server links
@cindex HTTP links
@vindex hm--html-html-hostname:port-default
@vindex hm--html-html-hostname:port-alist
@vindex hm--html-html-path-alist
@itemize @bullet
@item
@code{hm--html-html-hostname:port-default}: Default hostname with port
for http links to a HTML server.
@item
@code{hm--html-html-hostname:port-alist}: Alist with hostnames and ports
for http links to HTML servers. It contains useful alternatives.
@item
@code{hm--html-html-path-alist}: Alist with directories for the HTML
server. Each alist element must consist of a number and a directory
string. The number is used to select the directory during the query
about the directory for an http link.
@end itemize
@node Links To Files, Links To FTP Servers, Links to WWW Servers, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To Files
@cindex file gateway links
@vindex hm--html-file-path-alist
@itemize @bullet
@item
@code{hm--html-file-path-alist}: Alist with directories for the file
gateway. Each alist element must consist of a number and a directory
string. The number is used to select the directory during the query
about the directory for a file link.
@end itemize
@node Links To FTP Servers, Links To Emacs Info Files, Links To Files, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To FTP Servers
@cindex FTP links
@vindex hm--html-ftp-hostname:port-default
@vindex hm--html-ftp-hostname:port-alist
@vindex hm--html-ftp-path-alist
@itemize @bullet
@item
@code{hm--html-ftp-hostname:port-default}: Default hostname with port
for links to an ftp server. This is for the default FTP server. In general
you don't need to specify a port for this.
@item
@code{hm--html-ftp-hostname:port-alist}: Alist with hostnames and ports
for links to ftp servers. It contains useful alternatives. In general
you don't need to specify ports for the ftp servers.
@item
@code{hm--html-ftp-path-alist}: Alist with directories for the ftp
server links. It contains useful alternatives with /pub, /pub/gnu and
so on. Each alist element must consist of a number and a directory
string. The number is used to select the directory during the query
about the directory for an ftp link.
@end itemize
@node Links To Emacs Info Files, Links To Gopher Servers, Links To FTP Servers, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To Emacs Info Files
@cindex emacs info links
@vindex hm--html-info-hostname:port-alist
@vindex hm--html-info-hostname:port-default
@vindex hm--html-info-path-alist
@itemize @bullet
@item
@code{hm--html-info-hostname:port-default}: Default hostname with port
for the Info gateway.
@item
@code{hm--html-info-hostname:port-alist}: Alist with hostnames and ports
for Info gateways. It contains useful alternatives.
@item
@code{hm--html-info-path-alist}: Alist with directories for the Info
gateway. This may be a list with all of your emacs info directories.
@end itemize
@node Links To Gopher Servers, Links To WAIS Gateways, Links To Emacs Info Files, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To Gopher Servers
@cindex Gopher gateway links
@vindex hm--html-gopher-hostname:port-default
@vindex hm--html-gopher-hostname:port-alist
@vindex hm--html-gopher-doctype-default
@vindex hm--html-gopher-doctype-alist
@vindex hm--html-gopher-anchor-alist
There are a lot of useful gopher information servers on the Internet.
You can access them with a gopher browser or with a WWW browser. In the
latter case you have to use the gopher gateway.
@itemize @bullet
@item
@code{hm--html-gopher-hostname:port-default}: Default hostname with port
for links to the default gopher server.
@item
@code{hm--html-gopher-hostname:port-alist}: Alist with hostnames and
ports for links to gopher servers. It contains useful alternatives.
@item
@code{hm--html-gopher-doctype-default}: For gopher links you have to
specify the doctype. In most cases this should be the string \"/1\".
Therefore this is the default doctype, but you can change it to
another.
@item
@code{hm--html-gopher-doctype-alist}: Alist with doctype strings for links
to a gopher server. The strings \"/1\", \"/11\" and \"/00\" are the only
doctype strings that I know. Please let me know if there are other
strings.
@item
@code{hm--html-gopher-anchor-alist}: Alist with directories for links to
a gopher server. It contains useful alternatives for the main gopher
servers. Each alist element must consist of a number and a directory
string. The number is used to select the directory during the query
about the directory for a local program gateway link.
@end itemize
@node Links To WAIS Gateways, Links To The Mail Gateway, Links To Gopher Servers, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To WAIS Gateways
@cindex WAIS gateway links
@vindex hm--html-wais-hostname:port-alist
@vindex hm--html-wais-hostname:port-default
@vindex hm--html-wais-servername:port-alist
@vindex hm--html-wais-servername:port-default
@vindex hm--html-wais-path-alist
You can either make a link direct to a WAIS server (it may be that not
all WWW browsers support this) or an http link to a server (relay host)
which queries the WAIS server. The variables
@code{hm--html-wais-hostname:port-default} and
@code{hm--html-wais-hostname} refer to these relay hosts and the
variables @code{hm--html-wais-servername:port-default} and
@code{hm--html-wais-servername:port-alist} refer to the WAIS servers.
@itemize @bullet
@item
@code{hm--html-wais-hostname:port-default}: Default hostname of the
relay host with port for the WAIS gateway.
@item
@code{hm--html-wais-hostname:port-alist}: Alist with hostnames of
possible relay hosts and ports for the WAIS gateway. It contains
useful alternatives.
@item
@code{hm--html-wais-servername:port-default}: Default WAIS servername
with port for the WAIS gateway.
@item
@code{hm--html-wais-servername:port-alist}: Alist with WAIS servernames
and ports for the WAIS gateway. It contains useful alternatives.
@item
@code{hm--html-wais-path-alist}: Alist with directories for the wais gateway.
@end itemize
@node Links To The Mail Gateway, Links For Sending Mail, Links To WAIS Gateways, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To The Mail Gateway
@cindex Mail gateway links
@cindex Mail folder links
@vindex hm--html-mail-hostname:port-default
@vindex hm--html-mail-hostname:port-alist
@vindex hm--html-mail-path-alist
The following variables are for customizing the insertion of links to a mail
folder. You need a special server for this, which sends the email back
to the browser.
@itemize @bullet
@item
@code{hm--html-mail-hostname:port-default}: Default hostname with port
for the mail gateway.
@item
@code{hm--html-mail-hostname:port-alist}: Alist with hostnames and ports
for the mail gateway. It contains useful alternatives.
@item
@code{hm--html-mail-path-alist}: Alist with directories for the mail
gateway. In these directories you'll probably find mail folders. Each
alist element must consist of a number and a directory string. The
number is used to select the directory during the query about the
directory for a mail folder link.
@end itemize
@node Links For Sending Mail, Links To The Program Gateway, Links To The Mail Gateway, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links For Sending Mail
@cindex mailto links
@vindex hm--html-mailto-alist
@itemize @bullet
@item
@code{hm--html-mailto-alist}: Alist with mail addresses for the mailto
alist. The value of `user-mail-address' will also be added by the
package to this alist.
@end itemize
@node Links To The Program Gateway, Links To The Local Program Gateway, Links For Sending Mail, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To The Program Gateway
@cindex program gateway links
@vindex hm--html-proggate-hostname:port-default
@vindex hm--html-proggate-hostname:port-alist
@vindex hm--html-proggate-allowed-file
The program gateway is a special TNT site specific gateway for starting
programs out of a html page. The programs are started by a special
server, which looks in an allowed file to determine if it is allowed to
start the program. This is necessary because the programs are running
under the user id of the server. We're only allowed to start simple
display programs like man, ls and so on.
@itemize @bullet
@item
@code{hm--html-proggate-hostname:port-default}: Default hostname with
port for the proggate server.
@item
@code{hm--html-proggate-hostname:port-alist}: Alist with hostnames and
ports for the proggate server. It contains useful alternatives.
@item
@code{hm--html-proggate-allowed-file}: The filename (with path) of the
proggate allowed file.
@end itemize
@node Links To The Local Program Gateway, URL For Forms And Image Tags, Links To The Program Gateway, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Links To The Local Program Gateway
@cindex local program gateway links
@vindex hm--html-local-proggate-path-alist
Another TNT site specific way to start programs from a html page. These
programs are started with the id of the user on the host where the
client (browser) is running. Therefore no restriction about the allowed
programs is made. With this you can start only programs and do only
things, which you can do also without the WWW browser.
@itemize @bullet
@item
@code{hm--html-local-proggate-path-alist}: Alist with directories for
the local program gateway. Contains directories, where you can find
programs.
@end itemize
@node URL For Forms And Image Tags, Marking Of Examples, Links To The Local Program Gateway, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection URL For Forms And Image Tags
@cindex forms URL
@cindex image URL
@vindex hm--html-url-alist
@itemize @bullet
@item
@code{hm--html-url-alist}: Alist with URL's for FORMS and IMAGE tags.
The cdr of each list contains symbols, which specifies the use of the
URL.
@end itemize
@node Marking Of Examples, , URL For Forms And Image Tags, Defaults Used For Generating Links
@comment node-name, next, previous, up
@subsubsection Marking Of Examples
@cindex color of help text
@cindex font of help text
@vindex hm--html-help-foreground
@vindex hm--html-help-background
@vindex hm--html-help-font
The following variables are for marking the examples in the help
buffer.
@itemize @bullet
@item
@code{hm--html-help-foreground}: The foreground color for highlighting
examples.
@item
@code{hm--html-help-background}: The background color for highlighting
examples.
@item
@code{hm--html-help-font}: The font for highlighting examples.
@end itemize
@node Templates, Deleting Automounter Path Prefix, Defaults Used For Generating Links, Customization Variables
@comment node-name, next, previous, up
@subsection Templates
@cindex templates
@vindex hm--html-template-dir
@vindex hm--html-frame-template-file
@vindex hm--html-automatic-expand-templates
For inserting html template files you can customize where you keep your
templates.
@itemize @bullet
@item
@code{hm--html-template-dir}: A directory with template files. It is now
also possible to use it as a list of directories. Look at the variable
@code{tmpl-template-dir-list} for further descriptions. If this
variable is set to a non-existent directory, then it defaults to the
directory where the package is in XEmacs. This is done during
loading the file @file{hm--html-configuration.el} (@xref{Where Are All
The Customization Variables Defined, Where Are All The Customization
Variables Defined}.). This may only be useful in XEmacs >= 19.12.
@item
@code{hm--html-frame-template-file}: File which is used as template for
a html frame. An example is in the package
@emph{hm--html-menus}. @xref{Contents, Contents}.
@item
@code{hm--html-automatic-expand-templates}: Automatic expansion of
templates. This feature needs the file @file{tmpl-minor-mode.el} from Heiko
Mnkel (@cite{muenkel@@tnt.uni-hannover.de}), which is distributed with the
package hm--html-menus.
@item
@code{hm--html-template-filter-regexp}: Regexp for filtering out non
(html) template files in a directory.
@end itemize
@node Deleting Automounter Path Prefix, Automatic Insert Of Information, Templates, Customization Variables
@comment node-name, next, previous, up
@subsection Deleting Automounter Path Prefix
@cindex automounter path
@vindex hm--html-delete-wrong-path-prefix
@itemize @bullet
@item
@code{hm--html-delete-wrong-path-prefix}: If non-nil, it specifies path-prefixes which should be deleted in paths.
The Sun automounter adds a temporary prefix to the automounted directories
(at our site the prefix is /tmp_mnt). But you can't select such a path
if the automounter has currently not mounted the directory, and so you
can't follow an html link which consists of such a path. To overcome
this behaviour, you can set this variable to the prefix
(e.g. "/tmp_mnt"). After that, the prefix should be stripped from the
paths during the creation of the links. ATTENTION: This variable is
used as a regular expression! It can be set to a string or to a list of
strings.
@end itemize
@node Automatic Insert Of Information, Latin 1 Characters, Deleting Automounter Path Prefix, Customization Variables
@comment node-name, next, previous, up
@subsection Automatic Insert Of Information
@cindex automatic insert
@cindex date
@cindex changed comment
@cindex created comment
@vindex hm--html-automatic-update-title-date
@vindex hm--html-automatic-changed-comment
@vindex hm--html-automatic-create-modified-line
@vindex hm--html-automatic-update-modified-line
@vindex hm--html-changed-comment-prefix
@vindex hm--html-created-comment-prefix
@vindex hm--html-comment-infix
@vindex hm--html-modified-prefix
@vindex hm--html-modified-end-tag
@vindex hm--html-modified-insert-before
@vindex hm--html-modified-start-tag
The @code{hm--html-mode} automatically inserts some useful information in
html pages. This behaviour can be changed by the following variables.
@itemize @bullet
@item
@code{hm--html-automatic-create-title-date}: t => A date string will be
inserted in the title line. This will be updated each time before file
saving, if @code{hm--html-automatic-update-title-date} is also set to t.
@item
@code{hm--html-automatic-update-title-date}: t => The date in the title
line will be updated before file saving. nil => No automatic update of
the date.
@item
@code{hm--html-automatic-created-comment}: t => A "created comment"
line will be added. nil => No automatic insert of a "created
comment" line.
@item
@code{hm--html-created-comment-prefix}: The prefix text of the "created
comment" lines. By default this is set to "Created by: ".
@item
@code{hm--html-comment-infix}: The infix (second part) of the "created
comment" and the "changed comment" lines. By default, if this variable
is nil, the value of @code{hm--html-username} or, if this variable is
also nil, the return value of @code{(user-full-name)} will be used.
In these cases the infix looks like "Heiko Mnkel, ".
Set it to an empty string, if you don't want to have your name in the
comments.
@item
@code{hm--html-automatic-changed-comment}: t => A "changed comment"
line will be added before file saving. nil => No automatic insert
of a "changed comment" line.
@item
@code{hm--html-changed-comment-prefix}: The prefix text of the "changed
comment" lines. By default this is set to "Changed by: ".
@item
@code{hm--html-automatic-create-modified-line}: t => Some commands will
insert a visible "modified" line with the current date, if such a line
does not exist already. If it already exist, the date in the line will
be updated. Visible means, that it is not a HTML comment. By default it
looks like the following:
@samp{<EM>Modified 24-May-1997</EM>}
@item
@code{hm--html-automatic-update-modified-line}: t => The visible
"modified" line will be updated with the current date before file
saving. If such a line does not exist, nothing will be done.
@item
@code{hm--html-modified-prefix}: Prefix of the "modified" line.
By default it is set to @samp{"Modified: "}.
@item
@code{hm--html-modified-start-tag}: Start tag of the modified line.
By default it is @samp{<EM>}. If you change this, you'll need to change also
@code{hm--html--modified-end-tag}.
@item
@code{hm--html-modified-end-tag}: End tag of the modified line.
By default it is @samp{</EM>}. If you change this, you'll need to change
also @code{hm--html-modified-start-tag}.
@item
@code{hm--html-modified-insert-before}: The "modified line" will be
inserted before this string. The search will be done from the end to the
beginning. And the "modified line" will be put at least before the
@samp{</HTML>} and the @samp{</BODY>} tags.
@end itemize
@node Latin 1 Characters, Drag And Drop, Automatic Insert Of Information, Customization Variables
@comment node-name, next, previous, up
@subsection Latin 1 Characters
@cindex latin 1 characters
@vindex hm--html-bind-latin-1-char-entities
@itemize @bullet
@item
@code{hm--html-bind-latin-1-char-entities}: Set this to nil, if you
don't want to use the ISO Latin 1 character entities. This is only
useful if @code{hm--html-use-old-keymap} is set to nil. It is only used
when loading the html package the first time.
@end itemize
@node Drag And Drop, Font Lock Keywords, Latin 1 Characters, Customization Variables
@comment node-name, next, previous, up
@subsection Drag And Drop
@cindex drag and drop
@vindex hm--html-idd-create-relative-links
@vindex hm--html-idd-actions
@itemize @bullet
@item
@code{hm--html-idd-create-relative-links}: If t, then the
@code{hm--html-idd-*} functions create relative links. Otherwise
absolute links are used. The idd functions are used for drag and drop.
@item
@code{hm--html-idd-actions}: The action list for the destination mode
@code{hm--html-mode}. Look at the description of the variable
idd-actions.
@end itemize
@node Font Lock Keywords, Prefix Keys, Drag And Drop, Customization Variables
@comment node-name, next, previous, up
@subsection Font Lock Keywords
@cindex font lock keywords
@vindex hm--html-font-lock-keywords-1
@vindex hm--html-font-lock-keywords-2
@vindex hm--html-font-lock-keywords
@itemize @bullet
@item
@code{hm--html-font-lock-keywords-1}: Subdued level highlighting for
@code{hm--html-mode}.
@item
@code{hm--html-font-lock-keywords-2}: Gaudy level highlighting for
@code{hm--html-mode}.
@item
@code{hm--html-font-lock-keywords}: Default expressions to highlight in
the @code{hm--html-mode}.
@end itemize
@node Prefix Keys, Pulldown Menu Names, Font Lock Keywords, Customization Variables
@comment node-name, next, previous, up
@subsection Prefix Keys
@cindex prefix keys
@kindex prefix keys
@vindex hm--html-minor-mode-prefix-key
@vindex hm--html-mode-prefix-key
@itemize @bullet
@item
@code{hm--html-minor-mode-prefix-key}: The prefix key for the key tables
in the minor mode @code{hm--html-minor-mode}.
@item
@code{hm--html-mode-prefix-key}: The prefix key for the keys in the
major mode @code{hm--html-mode}.
@end itemize
@node Pulldown Menu Names, Hook Variables, Prefix Keys, Customization Variables
@comment node-name, next, previous, up
@subsection Pulldown Menu Names
@cindex pulldown menu names
@vindex hm--html-minor-mode-pulldown-menu-name
@vindex hm--html-mode-pulldown-menu-name
Perhaps you'd like to change the names to get the same menu
names in the major and in the minor modes of the @code{hm--html-menus}
package.
@itemize @bullet
@item
@code{hm--html-mode-pulldown-menu-name}: The name of the pulldown menu
in the major html mode.
@item
@code{hm--html-minor-mode-pulldown-menu-name}: The name of the pulldown
menu in the minor html mode.
@end itemize
@node Hook Variables, Previewing HTML Files, Pulldown Menu Names, Customization Variables
@comment node-name, next, previous, up
@subsection Hook Variables
@vindex hm--html-mode-hook
You may use the following two variables, if you'd like to call special
functions each time the major html mode is entered or the package is
loaded.
@itemize @bullet
@item
@code{hm--html-mode-hook}: This hook will be called each time
@code{hm--html-mode} is invoked.
@item
@code{hm--html-load-hook}: Hook variable to execute functions after
loading the package.
@end itemize
@node Previewing HTML Files, Meta Element, Hook Variables, Customization Variables
@comment node-name, next, previous, up
@subsection Previewing HTML Files
@cindex previewing HTML files
@vindex html-view-mosaic-command
@vindex html-sigusr1-signal-value
The following two variables are only used, if you preview html
documents with @code{Mosaic}. There are also some other variables in
@file{hmtl-view.el}. @xref{Contents, Contents}. Look at that file if
you have trouble with the functions to preview the html document with
@code{Mosaic}.
@itemize @bullet
@item
@code{html-view-mosaic-command}: The command that runs @code{Mosaic} on your
system.
@item
@code{html-sigusr1-signal-value}: Value for the SIGUSR1 signal on your
system. See, usually, @file{/usr/include/sys/signal.h}.
@example
SunOS 4.1.x : (setq html-sigusr1-signal-value 30)
SunOS 5.x : (setq html-sigusr1-signal-value 16)
Linux : (setq html-sigusr1-signal-value 10))
@end example
@end itemize
@node Meta Element, Indentation, Previewing HTML Files, Customization Variables
@comment node-name, next, previous, up
@subsection Meta Element
@cindex meta element
@vindex hm--html-meta-name-alist
@itemize @bullet
@item
@code{hm--html-meta-name-alist}: Alist with possible names for the name
or http-equiv attribute of meta. Currently I know of the names
@code{Expires}, @code{Keys} and @code{Author}. Please send me
(@emph{muenkel@@tnt.uni-hannover.de}) an email, if you know other
standard html names for the meta element.
@end itemize
@node Indentation, , Meta Element, Customization Variables
@comment node-name, next, previous, up
@subsection Indentation
@cindex indentation
@vindex hm--html-disable-indentation
@vindex hm--html-inter-tag-indent
@vindex hm--html-comment-indent
@vindex hm--html-intra-tag-indent
@vindex hm--html-tag-name-alist
@itemize @bullet
@item
@code{hm--html-disable-indentation}: Set this to t if you want to
disable indentation in @code{hm--html-mode}. And maybe send me
(@emph{muenkel@@tnt.uni-hannover.de}) a note why you did this.
@item
@code{hm--html-inter-tag-indent}: The indentation after a start tag.
@item
@code{hm--html-comment-indent}: The indentation of a comment.
@item
@code{hm--html-intra-tag-indent}: The indentation after the start of a
tag.
@item
@code{hm--html-tag-name-alist}: An alist with tag names known by
@code{hm--html-mode}. It is used to determine if a tag is a one element
tag or not. In the future it should also be used to get possible
parameters of the tag. Use lower case characters in this list!!!! If
you have problems with the indentation of
@code{:hm--html-one-or-two-element-tag} elements, then you should set
them to either @code{:hm--html-one-element-tag} or
@code{:hm--html-two-element-tag}, depending on how you use these
elements. In the future I'll try to implement a better indentation for
these elements.
@end itemize
@node Add New Elements, Use With Other Major Modes, Customization, Top
@comment node-name, next, previous, up
@chapter Add New Elements
@cindex add new html elements
@cindex non standard html
@vindex hm--html-tag-name-alist
If you'd like to add new HTML elements to this package, you should first take
a look at the file @file{hm--html-not-standard.el}, which
already contains some non-standard elements. If you find your tags
there, you should uncomment the line @code{(require
'hm--html-not-standard)} in the file @file{hm--html-mode.el}. There are
also menu entries for these elements in the file
@file{hm--html-menu.el}, which are commented out. Don't forget to
recompile the changed lisp files after that!
If you don't find your new elements there, you should do the following
steps to add them:
@enumerate
@item
Locate a tag which is similar to the one you want to add. "Similar"
means that it is inserted in the way you want to insert the new
tags. Now let's assume, that you chose @samp{<strong></strong>}.
@item
Look at the file @file{hm--html.el} and search the function(s) which
inserts the similar tag(s). If the HTML element consists of only one
tag, then there should be only one function for inserting the tag. If
the element consists of a start and an end tag, there are at least two
functions. Only in some special cases, if it is possible to insert
elements with different attribute values, are there more than two
functions. In the case of @samp{<strong></strong>}, there are the two
functions @code{hm--html-add-strong} and
@code{hm--html-add-strong-to-region}. The first one is used if no
region is active, and the second if a region is active. The naming scheme
of these functions is always @var{hm--html-add-<tagname>} and
@var{hm--html-add-<tagname>-to-region}. @var{<tagname>} is not in all
cases the tagname. Sometimes a more human readable name is used (e.g.
bold instead of b).
@item
To get the right indentation for the new tags you should add an entry
for them to the variable @code{hm--html-tag-name-alist}, which is defined
in @file{hm--html-configuration.el}. Let's assume that the new tagname
is @samp{foo}. The entry in @code{hm--html-tag-name-alist} should
be
@lisp
("foo" (:hm--html-one-element-tag t))
@end lisp
if the new element consists only of one tag (@samp{img} is such an
element) or
@lisp
("foo" (:hm--html-two-element-tag t))
@end lisp
if the new element consists of two tags (@samp{strong} is such an
element) or
@lisp
("foo" (:hm--html-one-or-two-element-tag t))
@end lisp
if the new element consists of two tags, but it is permissible to use the
start tag without its end tag (@samp{p} is such an element).
@end enumerate
Now you are ready and able to insert the new tags with
@example
M-x hm--html-add-foo
@end example
and
@example
M-x hm--html-add-foo-to-region
@end example
If you want to add the new commands also to the popup menu,
then you have to take a look at @file{hm--html-menu.el}, where all the
menus are defined. Look at @code{hm--html-menu-noregion-expert} and
@code{hm--html-menu-region-expert}. The first one is used if no region is
active, and the second if a region is active (both are only available
if the "expert menus" are used; this is an option in the pulldown
menu). You should now add an entry like
@lisp
["Foo" hm--html-add-foo t]
@end lisp
to the @code{hm--html-menu-noregion-expert} variable and an entry
@lisp
["Foo" hm--html-add-foo-to-region t]
@end lisp
to the @code{hm--html-menu-region-expert} variable (only if
@code{hm--html-add-foo-to-region} exists). You can do this by setting the
whole variable to a new value or by using the function
@code{add-menu-button}. I recommend the last method.
If you'd like to have a key sequence for inserting the new tag as well,
take a look at @file{hm--html-keys.el}. There are
different key tables defined for region and no region cases and for
different sorts of elements, like anchors, frame elements (doesn't mean
the Netscape element frame) and so on. These "groups" are the same as
the submenu groups.
@node Use With Other Major Modes, Internal Drag And Drop, Add New Elements, Top
@comment node-name, next, previous, up
@chapter Use With Other Major Modes
@cindex use with other major modes
@cindex use with psgml-html
@cindex psgml-html
@findex hm--html-minor-mode
The package provides a minor mode called @code{hm--html-minor-mode},
which could be used to join the features of this package with other HTML
packages or use it's features in other major edit modes. This is
usefull, if you'd like to extend another HTML mode or if you'll write
program code, which contain HTML parts.
Currently this is tested with the psgml-html mode, the @code{perl-mode}
and the @code{java-mode}. Please let me know if it works or not with
other packages.
If you'd like to use the minor mode in psgml-html mode,
put the following line in your @file{.emacs}:
@lisp
(add-hook 'html-mode-hook 'hm--html-minor-mode)
@end lisp
Note: This should work only in XEmacs versions greater than 19.14 and not
in 20.0. It doesn't work in other versions because the hook variable
@code{html-mode-hook} doesn't exist in those versions. Therefore in those
versions you must either call the minor mode by hand or change the
lisp file of the psgml-html mode.
@node Internal Drag And Drop, Template Minor Mode, Use With Other Major Modes, Top
@comment node-name, next, previous, up
@chapter Internal Drag And Drop
@cindex drag and drop
@cindex internal drag and drop
@vindex idd-actions
@vindex hm--html-idd-actions
The file @file{internal-drag-and-drop.el}, which is shipped with
@file{hm--html-menus}, provides a general package for internal drag and
drop in emacs. "General" means that it can be used apart from
@code{hm--html-mode} in any other mode.
You can start such an action by clicking with the mouse in the source
buffer and then in the destination buffer. The action may depend on
the points where you've clicked with the mouse, on the state of the
region, the point, the mark and any other properties of the source and
the destination buffers. The actions are defined by the variable
@code{idd-actions}, which is a buffer local variable.
@menu
* Drag And Drop Customization::
* The Drag And Drop Commands::
@end menu
@node Drag And Drop Customization, The Drag And Drop Commands, Internal Drag And Drop, Internal Drag And Drop
@comment node-name, next, previous, up
@section Drag And Drop Customization
@cindex customization
@cindex configuration
Since the XEmacs 19.15 and 20.2 a special package can be used for the
customization of lisp packages. The internal drag and drop package uses
now also this feature. Therefore you can set all user variables with the
help of the Customize submenu, which can be selected in the Option menu.
If you use it, the variables will currently be saved in a special
customization file. Please look at the @file{NEWS} file or the info
manuals of the XEmacs to find out more about the customization package.
The internal drag and drop functions may be used in all
modes. Therefore their general customization isn't done in
@file{hm--html-configuration.el}. Its variables are defined in the file
@file{internal-drag-and-drop.el} instead. You can set them in your
@file{.emacs} or in one of the other emacs init files (e.g.
@file{default.el}). The following subsections describe the main
customization variables.
@menu
* Defining The Drag And Drop Actions::
* The Mouse Bindings::
* The Drag And Drop Mouse Pointer::
@end menu
@node Defining The Drag And Drop Actions, The Mouse Bindings, Drag And Drop Customization, Drag And Drop Customization
@comment node-name, next, previous, up
@subsection Defining The Drag And Drop Actions
@cindex actions
@cindex drag and drop actions
@vindex idd-actions
The drag and drop actions are commands which are called after an
internal drag and drop. They depend on the source and the destination
of the drag and drop. Drag and drop actions are defined by the
variable:
@itemize @bullet
@item
@code{idd-actions}: A list with actions, depending on the source and the
destination of the drag and drop command.
@end itemize
The list looks like:
@lisp
'((@var{<destination-specification-1>} (@var{<source-specification-1>} @var{<action-1-1>})
(@var{<source-specification-2>} @var{<action-1-2>})
:
)
(@var{<destination-specification-2>} (@var{<source-specification-1>} @var{<action-2-1>})
(@var{<source-specification-2>} @var{<action-2-2>})
:
)
:
)
@end lisp
The @var{<source-specification>} looks like the following:
@lisp
'([(@var{<specification-type>} @var{<value>})])
@end lisp
with
@lisp
@table @var
@item <specification-type> :==
@w{@code{idd-if-minor-mode-p}} | @w{@code{idd-if-buffer-name-p}} |
@w{@code{idd-if-region-active-p}} | @w{@code{idd-if-url-at-point-p}} |
@w{@code{idd-if-major-mode-p}} | @w{@code{idd-if-variable-non-nil-p}} |
@w{@code{idd-if-dired-file-on-line-p}} |
@w{@code{idd-if-dired-no-file-on-line-p}} |
@w{@code{idd-if-local-file-p}} | @w{@code{idd-if-buffer-name-p}} |
@w{@code{idd-if-modifiers-p}} | ...
@end table
@end lisp
The @var{<specification-type>} - functions must have two arguments. The
first one is the source or destination and the second is the
@var{<value>}. It must return @code{nil}, if the test wasn't successful,
and a number (in general 1), which specifies the weight of the test
function. The weights of all single tests are added to a summary weight
and assigned to the action. The action with the highest weight is called
from the action handler. Look at the definition of
@w{@code{idd-if-major-mode-p}}, @w{@code{idd-if-minor-mode-p}} and so on for
examples. Look at the function
@code{idd-get-source-or-destination-alist}, if you want to know the
structure of the @code{source-or-destination} argument of these
functions.
The @var{<destination-specification>} looks like
@var{<source-specification>}, but in general it could be set to
@code{nil} in mode specific idd-action lists.
If @var{<destination-specification-1>} or @var{<source-specification-1>}
is set to @code{nil}, then every source or source
matches. @code{idd-actions} is a buffer local variable, which should be
at least mode depended. So if the @var{<destination-specification-1>} is
set to @code{nil} it says, that the destination buffer must only have a
specific mode. However, it's also possible to define a general
@code{idd-actions} list, where the destination mode is specified by
@code{idd-if-major-mode-p}.
@var{<action>} is a function which has two arguments. The first
specifies the source and the second the destination. Look at the
function definition of @code{idd-action-copy-region} and
@code{idd-action-copy-replace-region}. They are examples for such
actions.
The following is an example for @code{hm--html-mode}:
@lisp
(defvar idd-actions
'((nil (((idd-if-major-mode-p . dired-mode)
(idd-if-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpq\\)"))
hm--html-idd-add-include-image-from-dired-line)
(((idd-if-major-mode-p . dired-mode)
(idd-if-dired-no-file-on-line-p . nil))
hm--html-idd-add-file-link-to-file-on-dired-line)
(((idd-if-major-mode-p . dired-mode)
(idd-if-dired-no-file-on-line-p . t))
hm--html-idd-add-file-link-to-directory-of-buffer)
(((idd-if-major-mode-p . w3-mode)
(idd-if-url-at-point-p . t))
hm--html-idd-add-html-link-from-w3-buffer-point)
(((idd-if-major-mode-p . w3-mode))
hm--html-idd-add-html-link-to-w3-buffer)
(((idd-if-local-file-p . t))
hm--html-idd-add-file-link-to-buffer)))
@end lisp
@node The Mouse Bindings, The Drag And Drop Mouse Pointer, Defining The Drag And Drop Actions, Drag And Drop Customization
@comment node-name, next, previous, up
@subsection The Mouse Bindings
@cindex mouse bindings
@vindex idd-global-mouse-keys
@vindex idd-global-help-mouse-keys
@vindex idd-drag-and-drop-mouse-binding-type
@findex idd-mouse-drag-and-drop
@findex idd-help-mouse-drag-and-drop
The following three variables determine the mouse
bindings and the mouse behaviour for the internal drag and drop package:
@itemize @bullet
@item
@code{idd-global-mouse-keys}: The mouse keys for the command
@code{idd-mouse-drag-and-drop}. The command
@code{idd-mouse-drag-and-drop} is bound during the loading of the
package @file{internal-drag-and-drop} to these keys in the @b{global
keymap}. The drag and drop action @b{must be bound global}, because the
drag and drop action must be started by a click in the source
buffer. Therefore no action will be performed if the mouse keys are not
bound to @code{idd-mouse-drag-and-drop} in the destination buffer.
Set it to @code{nil}, if you don't want to bind this function during
loading.
If the command is already bound in the global keymap during loading,
then this key sequence will not be bound.
By default the mouse binding is @key{meta} @key{control} @key{button1}.
@item
@code{idd-global-help-mouse-keys}: The mouse keys for the command
@code{idd-help-mouse-drag-and-drop}. The command
@code{idd-help-mouse-drag-and-drop} is bound during the loading of the
package @file{internal-drag-and-drop} to these keys in the @b{global
keymap}.
Set it to @code{nil} if you don't want to bind this function during
loading.
If the command is already bound in the global keymap during loading,
then this key sequence will not be bound.
By default the mouse binding is @key{meta} @key{control} @key{button3}.
@item
@code{idd-drag-and-drop-mouse-binding-type}: The type of the drag and
drop mouse binding. The value may be @code{click} or
@code{press-button-during-move}. A value of @code{click} means that
you have to click over the source, release the button and click it again
over the destination. A value of @code{press-button-during-move} means
that you have to press the button down over the source and hold it until
the mouse pointer is over the destination.
The @emph{disadvantage} of the @code{press-button-during-move} type
compared with the @code{click} type is that you can't select a destination
region, and therefore a drag and drop action depending on a selected
region can't be started with that type of mouse binding.
@end itemize
@node The Drag And Drop Mouse Pointer, , The Mouse Bindings, Drag And Drop Customization
@comment node-name, next, previous, up
@subsection The Drag And Drop Mouse Pointer
@cindex mouse pointer glyph
@vindex idd-mouse-pointer-image
@vindex idd-data-directory
@vindex idd-overwrite-mouse-pointers
@vindex idd-drag-and-drop-pointer-glyph
@findex idd-make-drag-and-drop-pointer-glyph
In the XEmacs the mouse pointer glyph (shape) can be set to any
glyph. This is used during the drag and drop command to indicate, that
the command is active. There exists the following three variables to
customize this:
@itemize @bullet
@item
@code{idd-mouse-pointer-image}: The name of the xbm file with the mouse
pointer image. By default this is the file @file{drop}. There exists
also a file called @file{dropmsk}, which contains the mask image. The
mask file is loaded automaticly.
@item
@code{idd-data-directory}: The name fo the directory, where the file
@code{idd-mouse-pointer-image} is searched. By default this is the
subdirectory @file{idd} in the XEmacs install directory
@code{data-directory}.
@item
@code{idd-overwrite-mouse-pointers}: A list with pointer glyph
variables, which should be overwritten by the
@code{idd-drag-and-drop-pointer-glyph}. If it is nil, the pointer wont
be changed. Currently it must be nil in the Emacs.
@end itemize
If one of the variables @code{idd-mouse-pointer-image} or
@code{idd-data-directory} is changed, the command
@code{idd-make-drag-and-drop-pointer-glyph} must be called. This command
builds the mouse pointer glyph, which is stored in
@code{idd-drag-and-drop-pointer-glyph}.
I don't know how to set the the mouse pointer in the Emacs to a drag and
drop image. Any hints for doing this are welcome.
@node The Drag And Drop Commands, , Drag And Drop Customization, Internal Drag And Drop
@comment node-name, next, previous, up
@section The Drag And Drop Commands
@cindex drag and drop commands
There are 2 groups of commands. The first contains commands which
perform the drag and drop action and the second displays help
messages about a possible drag and drop action.
@menu
* Performing The Drag And Drop Action::
* Displaying Help On Drag And Drop::
@end menu
@node Performing The Drag And Drop Action, Displaying Help On Drag And Drop, The Drag And Drop Commands, The Drag And Drop Commands
@comment node-name, next, previous, up
@subsection Performing The Drag And Drop Action
@cindex drag and drop commands
@cindex performing drag and drop
@findex idd-mouse-drag-and-drop
@findex idd-start-mouse-drag-and-drop
@findex idd-mouse-drag-and-drop-press-button-during-move
@findex idd-mouse-drag-and-drop-click
@findex idd-help-start-action
@vindex idd-drag-and-drop-mouse-binding-type
The following five commands perform internal
drag and drop actions:
@itemize @bullet
@item
@code{idd-mouse-drag-and-drop}: Performs a drag and drop action. It
calls the command @code{idd-mouse-drag-and-drop-click} or
@code{idd-mouse-drag-and-drop-press-button-during-move} depending on the
value of @code{idd-drag-and-drop-mouse-binding-type}. However you've set
this, you start a drag and drop action with this command by pressing
down its mouse button over the source. This command is bound by default
to a global mouse key sequence. @xref{The Mouse Bindings}.
@item
@code{idd-start-mouse-drag-and-drop}: Starts a drag and drop command.
This command could be used to start a drag and drop command without a
button event. Therefore this should not be bound directly to a mouse
button. This command can be used to start a drag and drop action with a
click on a menu item or tool bar icon. After that you have to press a
mouse button over the source. The rest depends on the value of
@code{idd-drag-and-drop-mouse-binding-type}, as with the command
@code{idd-mouse-drag-and-drop}.
@item
@code{idd-help-start-action}: It is possible to display a help buffer
with a message in it, which describes the action instead of performing
it immediately (@pxref{Displaying Help On Drag And Drop}). In this case
you can perform the action by clicking on a special extent in the help
buffer, which runs this command.
@item
@code{idd-mouse-drag-and-drop-press-button-during-move}: Performs a drag
and drop action in a more traditional way than
@code{idd-mouse-drag-and-drop-click}. First you press the button
over the source and then move with the depressed button to the
destination, where you release the button. This must be bound to a
mouse button. The @code{SOURCE-EVENT} must be a
@code{button-press-event}.
The disadvantage of this command compared with the command
@code{idd-mouse-drag-and-drop-click} is, that you can't select a
destination region.
You should bind the command @code{idd-mouse-drag-and-drop} instead of
this one, because it's then possible to switch between both drag and
drop behaviours by changing only one variable.
@item
@code{idd-mouse-drag-and-drop-click}: Performs a drag and drop action in
a more useful way than
@code{idd-mouse-drag-and-drop-press-button-during-move}. First you
click on the source and then on the destination. This must
be bound to a mouse button. The @code{SOURCE-EVENT} must be a
@code{button-press-event}.
You should bind the command @code{idd-mouse-drag-and-drop} instead of
this one, because it's then possible to switch between both drag and
drop behaviours by changing only one variable.
@end itemize
@node Displaying Help On Drag And Drop, , Performing The Drag And Drop Action, The Drag And Drop Commands
@comment node-name, next, previous, up
@subsection Displaying Help On Drag And Drop
@cindex help on drag and drop
@cindex displaying help on drag and drop
@findex idd-help-mouse-drag-and-drop
@findex idd-start-help-mouse-drag-and-drop
It's possible to display a buffer with a help message describing the
action being considered before actually performing it. To perform the
action, you then click on a special extent in the help buffer. To get
the help buffer, you do the same things as you do to perform the action
itself. Only the mouse key differs. There are two commands for this:
@itemize @bullet
@item
@code{idd-help-mouse-drag-and-drop}: Displays help about the drag and
drop action. It works similarly to @code{idd-mouse-drag-and-drop}
(@pxref{Performing The Drag And Drop Action}).
By default this command is globally bound to @key{meta} @key{control}
@key{button3}. This may be changed with the variable
@code{idd-global-help-mouse-keys} (@pxref{The Mouse Bindings}).
@item
@code{idd-start-help-mouse-drag-and-drop}: Starts displaying help about
the drag and drop action. It works similarly to
@code{idd-start-mouse-drag-and-drop} (@pxref{Performing The Drag And
Drop Action}) and can be used to start the help by clicking on a menu
item or a tool bar icon.
@end itemize
@node Template Minor Mode, Hints For Emacs 19 Users, Internal Drag And Drop, Top
@comment node-name, next, previous, up
@chapter Template Minor Mode
@cindex templates
There's a file called @file{tmpl-minor-mode.el} in the distribution
of the package @emph{hm---html-menus}. It provides functions to use
templates for the @code{hm--html-mode} and also for other modes. It
needs nothing from the rest of the package and therefore it can be used
independently of @code{hm--html-mode}.
@menu
* What Are Templates::
* Syntax Of Templates::
* Template Customization::
* Template Commands::
@end menu
@node What Are Templates, Syntax Of Templates, Template Minor Mode, Template Minor Mode
@comment node-name, next, previous, up
@section What Are Templates
@cindex templates
@findex tmpl-insert-template-file
@findex tmpl-expand-templates-in-buffer
@findex tmpl-expand-templates-in-region
Templates are special pieces of text, which can be expanded by
emacs. Expansion means that the template is replaced by something else,
determined by evaluating lisp forms or emacs commands. The
expansion can be done automatically after the insertion of templates
with the command @code{tmpl-insert-template-file} in a buffer or by hand
with the commands @code{tmpl-expand-templates-in-buffer} or
@code{tmpl-expand-templates-in-region}.
Templates can be put together with normal text in a so called template
file to provide prototype files. You should name these files with the
following naming scheme:
@example
@var{<file>}.@var{<type>}.tmpl
@end example
where @var{<file>} is a string which describes for what the template
could be used and @var{<type>} the normal file extension, e.g. @samp{c}
for C- files or @samp{html} for HTML- files.
@node Syntax Of Templates, Template Customization, What Are Templates, Template Minor Mode
@comment node-name, next, previous, up
@section Syntax Of Templates
@cindex template syntax
@vindex tmpl-sign
The templates are marked with the sign ^@@, which stands for the null
character (\000). It can be inserted in a buffer with the keys @kbd{C-q
C-SPC}. You can also use any other character or string of characters by
changing the variable @code{tmpl-sign}.
At the moment, there are 3 major types of templates:
@enumerate
@item
@emph{Emacs Lisp function templates}: The expansion of such a template
evals a lisp form. It is possible to use functions or variables as lisp
forms. The following is a simple example:
@lisp
^@@LISP^@@ (insert-file "~/.emacs") ^@@END LISP^@@
@end lisp
inserts the contents of the file @file{~/.emacs} in the current
buffer during the expansion.
@item
@emph{Emacs command templates}: The expansion of a command template
evals a template in the same way as an interactive command, which is
invoked with @kbd{M-x command}. For example:
@lisp
^@@COMMAND^@@ insert-file ^@@END COMMAND^@@
@end lisp
runs the interactive command @code{insert-file} during the expansion.
@item
@emph{Template comments} Nothing will be evaluated during the expansion
of a template comment. It is only a comment. For example:
@lisp
^@@C^@@ This is a comment
@end lisp
The end of the comment is the end of the line. Therefore it has the same
syntax as a lisp or C++ comment.
@end enumerate
By default, a template will be deleted after its expansion, but
without the linefeed. Look at the following examples:
Before the expansion:
@example
Line before the template
^@@C^@@ The Text of a comment template
Line after the template
@end example
After the expansion:
Line before the template
Line after the template
Templates can start in any column, and only the template will be deleted
after its expansion.
It is also possible to put an attribute list in a template. The
attributes of the list control the deletion of the template. It
may be that this will be extended in the future with other attributes.
The attribute list must be specified as an alist (assoc list) in the start
tag of a template and after its type. Each element of the alist consists
of the name of the attribute following its value.
If no attribute list is specified or if an attribute is missing, then the
default values are used. At the moment there are the following 2 attributes:
@enumerate
@item @emph{don't delete attribute} (@code{DONT_DELETE}): If the value
is t, then the template will not be deleted after its expansion. If the
value is nil then the template will be deleted. The default is nil. For
example:
Before the expansion:
@example
Line before the template
^@@LISP ((DONT-DELETE t))^@@ (insert-file "~/.cshrc") ^@@END LISP^@@
Line after the template
@end example
After the expansion:
@example
Line before the template
^@@LISP ((DONT-DELETE t))^@@ (insert-file "~/.cshrc") ^@@END LISP^@@
Line after the template
@end example
It was assumed, that the file @file{~/.cshrc} was empty !
@item @emph{delete line attribute} (@code{DELETE-LINE}): If the value is
t, then the linefeed before or after the template will be deleted. If
the value is nil then no linefeed will be deleted. The default is
nil. For example:
Before the expansion:
@example
Line before the template
^@@LISP ((DELETE-LINE t))^@@ (insert-file "~/.cshrc") ^@@END LISP^@@
Line after the template
@end example
After the expansion:
@example
Line before the template
Line after the template
@end example
It was assumed, that the file @file{~/.cshrc} was empty !
@end enumerate
These attributes can be combined. For example:
@example
^@@COMMAND ((DELETE-LINE t) (DONT-DELETE nil))^@@
insert-file
^@@END COMMAND^@@
@end example
The last examples show also that whitespace (blanks, tabs, linefeeds)
is allowed at most positions in a template.
Look at the file @file{tmpl-minor-mode.el} for a description of the
commands to expand templates.
@node Template Customization, Template Commands, Syntax Of Templates, Template Minor Mode
@comment node-name, next, previous, up
@section Template Customization
@cindex customization
@cindex configuration
@vindex tmpl-template-dir-list
@vindex tmpl-automatic-expand
@vindex tmpl-filter-regexp
@vindex tmpl-sign
@vindex tmpl-minor-mode-map
Since the XEmacs 19.15 and 20.2 a special package can be used for the
customization of lisp packages. The internal drag and drop package uses
now also this feature. Therefore you can set all user variables with the
help of the Customize submenu, which can be selected in the Option menu.
If you use it, the variables will currently be saved in a special
customization file. Please look at the @file{NEWS} file or the info
manuals of the XEmacs to find out more about the customization package.
Templates may be used for all editing modes, not only for
@code{hm--html-mode}. Therefore their general customization isn't done
in @file{hm--html-configuration.el}. Template variables are defined in
the file @file{tmpl-minor-mode.el} instead. You can set them in your
@file{.emacs} or in one of the other emacs init files (e.g.
@file{default.el}). The following are the main variables for
customization.
@itemize @bullet
@item
@code{tmpl-template-dir-list}: A list of directories with template
files. If it is nil, the default-directory will be used. If more than
one directory is specified, then the template filenames should differ
in all directories.
This variable is used in the commands for inserting templates. Look at
@code{tmpl-insert-template-file-from-fixed-dirs} and at
@code{tmpl-insert-template-file}. The command
@code{tmpl-insert-template-file} uses only the car of the list (if it is
a list.)
@item
@code{tmpl-filter-regexp}: This defines a regular expression used for
filtering out non-template files in template directories. It is used in
the command @code{tmpl-insert-template-file-from-fixed-dirs} to allow
only the selection of files which match the regexp. If it is
nil, then the Filter @code{".*\\.tmpl$"} is used. Set it to
@code{\".*\"} if you want to disable the filter function or use the
command @code{tmpl-insert-template-file}.
@item
@code{tmpl-automatic-expand}: If you insert a template file with
@code{tmpl-insert-template-file-from-fixed-dirs} or with
@code{tmpl-insert-template-file}, this variable is used. The templates
in the buffer will be automatically expanded if the variable is set to
t, which is the default.
@item
@code{tmpl-sign}: Thisdetermines the sign which marks the beginning and
the end of template expressions. By default it is set to the null
character (displayed in emacs as ^@@). You can also set this to a
string. Be careful if you change it, so that the templates will not be
mixed up with other non-template text! Note: The expansion function
looks at the whole template, so that it is very unlikely that the
function will make a mistake.
@item
@code{tmpl-minor-mode-map}: The keymap for the template minor mode.
@end itemize
@node Template Commands, , Template Customization, Template Minor Mode
@comment node-name, next, previous, up
@section Template Commands
@cindex commands
In this section the commands of the template package are described.
@menu
* Insert Of Template Files::
* Expansion Of Templates::
* Escaping Of Template Signs::
* The Template Minor Mode::
@end menu
@node Insert Of Template Files, Expansion Of Templates, Template Commands, Template Commands
@comment node-name, next, previous, up
@subsection Insert Of Template Files
@cindex template insert
@cindex template files
@findex tmpl-insert-template-file-from-fixed-dirs
@findex tmpl-insert-template-file
The template package provides the following two commands for inserting
template files in an emacs buffer.
@itemize @bullet
@item
@code{tmpl-insert-template-file}: This command can be used to insert a
template file in the current buffer. It will expand the templates in the
buffer if @code{tmpl-automatic-expand} is set to @code{t}. You can set
a default directory for this command by setting the variable
@code{tmpl-template-dir-list}. @xref{Template Customization}.
@item
@code{tmpl-insert-template-file-from-fixed-dirs}: The difference from
the simpler command @code{tmpl-insert-template-file} is that this
command will build a list for filename completion from a list of
predefined directories (look at @code{tmpl-template-dir-list}). The
filename completion list will also be filtered with the regular
expression defined by @code{tmpl-filer-regexp}. @xref{Template
Customization}. You can set the directory list and/or the filter
differently in each mode where you use templates, so that you will get
in the completion list only template files which could be used for the
current mode.
If you want to insert a template file with this command, which is not in
one of the directories from @code{tmpl-template-dir-list}, then you have
to enter the string @emph{"Change the directory"} instead of a template
file. This string is also in the completion list.
@end itemize
Both commands can also be used as functions. In this case the template
file with is directory path must be given to them as an parameter.
You can also use commands like @code{insert-file} to insert template
files and expand them by hand (@pxref{Expansion Of Templates}).
@node Expansion Of Templates, Escaping Of Template Signs, Insert Of Template Files, Template Commands
@comment node-name, next, previous, up
@subsection Expansion Of Templates
@cindex template expansion
@cindex expansion
@findex tmpl-expand-templates-in-region
@findex tmpl-expand-templates-in-buffer
You can expand templates by hand or automatically after their
insertion. @xref{Insert Of Template Files}, for automatic
expansion. Expansion by hand can be done with one of the
following two functions:
@itemize @bullet
@item
@code{tmpl-expand-templates-in-region}: Expands the templates in the
region. The region is established by the optional arguments @code{BEGIN}
and @code{END}. If the arguments are @code{nil}, or if the function is called
interactively, then the current region will be used.
@item
@code{tmpl-expand-templates-in-buffer}: Expands all templates in the
current buffer.
@end itemize
Both commands are bound to keys in the @code{tmpl-minor-mode}. @xref{The
Template Minor Mode}.
@node Escaping Of Template Signs, The Template Minor Mode, Expansion Of Templates, Template Commands
@comment node-name, next, previous, up
@subsection Escaping Of Template Signs
@cindex template escaping
@cindex escaping
@findex tmpl-escape-tmpl-sign-in-region
@findex tmpl-escape-tmpl-sign-in-buffer
It is possible to escape template signs in a buffer or in a
region. Templates with escaped template signs are not expanded, but they
are un-escaped by the expansion functions. Therefore it is possible to
exclude single templates from the expansion by escaping them. Note:
You can't escape a template twice. The commands which can be used for
this are:
@itemize @bullet
@item
@code{tmpl-escape-tmpl-sign-in-region}: Escapes all @code{tmpl-sign}s
(@pxref{Template Customization}) with a @code{tmpl-sign} in a
region. The region is established by the optional arguments @code{BEGIN}
and @code{END}. If the arguments are @code{nil}, or if the function is
called interactively, then the current region will be used.
@item
@code{tmpl-escape-tmpl-sign-in-buffer}: Same as
@code{tmpl-escape-tmpl-sign-in-region}, but escapes all templates in the
whole buffer.
@end itemize
Both commands are bound to keys in @code{tmpl-minor-mode}. @xref{The
Template Minor Mode}.
@node The Template Minor Mode, , Escaping Of Template Signs, Template Commands
@comment node-name, next, previous, up
@subsection The Template Minor Mode
@cindex template minor mode
@cindex minor mode
@cindex key bindings
@findex tmpl-minor-mode
The template minor mode can be toggled with the command
@code{tmpl-minor-mode}. The purpose of this mode is only to provide
key bindings for some of the commands of the package
@file{tmpl-minor-mode}. If you don't want to use the key bindings, you
don't need this minor mode.
Look at the key table @code{tmpl-minor-mode-map} (@pxref{Template
Customization}) for the definition of the keys.
It may be that I'll also provide a pulldown or popup menu for the minor
mode in a future release.
@node Hints For Emacs 19 Users, Bug Reports, Template Minor Mode, Top
@comment node-name, next, previous, up
@chapter Hints For Emacs 19 Users
@cindex Emacs 19
@cindex missing features in the Emacs 19
@vindex tmpl-history-variable-name
@findex file-remote-p
This package is tested with the GNU Emacs 19.34. The Emacs 19.34 has had
not all features of the XEmacs. Therefore also some of the features of
this package could not be implemeted in the Emacs 19.
Please read also the Emacs 19 related file @file{README-EMACS-19}!
The following is a list of missing features:
@itemize @bullet
@item
The capability to start an action from the help buffer. This is only
possible in the XEmacs, because in the Emacs 19.34 one can't assign
keymaps to a text region (overlay).
@item
The keybindings of the drag and drop commands are not displayed in
the menus, because the Emacs 19 isn't able to handle the following
menu specification: @code{:keys "\\[idd-help-mouse-drag-and-drop]"}.
@item
The function @code{file-remote-p} couldn't be implemeted, because of the
lack of the function @code{ange-ftp-ftp-p} in the ange-ftp package of
the Emacs 19.34.
@item
The history variable determined by @code{tmpl-history-variable-name}
isn't used, because the function @code{read-file-name} doesn't support
it in the Emacs 19.
@item
The mouse pointer shape (glyph) wont be changed in the Emacs 19 during a
drag and drop command. For that a way is needed to set the mouse pointer
shape to an image.
@end itemize
@node Bug Reports, Concept Index, Hints For Emacs 19 Users, Top
@comment node-name, next, previous, up
@chapter Bug Reports
@cindex bug report
@findex hm--html-submit-bug-report
There's no software out there without bugs. This package contains
software, therefore it has bugs. I (Heiko Mnkel
<muenkel@@tnt.uni-hannover.de>) have inserted most of the bugs in this
package by myself, but I've forgotten where. So please help me out of
this disaster and send bug reports, if you've found one of these little
animals. I'll try to do my very best to fix them and to insert new ones.
If it's possible, you should use the command
@lisp
M-x hm--html-submit-bug-report
@end lisp
There's also an entry in the pulldown menu for this.
In some cases a backtrace would also be appropriate.
If you can't send the report with this function, at
least include the package version and your @code{Emacs}/@code{XEmacs}
version.
In the best of all worlds you would also include a patch to fix the bug.
@emph{Note}: It's not true that I've inserted the bugs as a marketing trick,
so that you must buy the next version to get some of them fixed. This is
false, because this software is free.
@node Concept Index, Function Index, Bug Reports, Top
@comment node-name, next, previous, up
@unnumbered Concept Index
@printindex cp
@node Function Index, Variable Index, Concept Index, Top
@comment node-name, next, previous, up
@unnumbered Function Index
@printindex fn
@node Variable Index, , Function Index, Top
@comment node-name, next, previous, up
@unnumbered Variable Index
@printindex vr
@summarycontents
@contents
@bye
|