home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / hm--html-menus / hm--html-menu.el < prev    next >
Encoding:
Text File  |  1995-08-26  |  18.1 KB  |  540 lines

  1. ;;;  hm--html-menu.el: A menu for the html-mode.
  2. ;;;  v4.50; 22 Aug 1995
  3. ;;;  Copyright (C) 1993, 1994, 1995  Heiko Muenkel
  4. ;;;  email: muenkel@tnt.uni-hannover.de
  5. ;;;
  6. ;;;  This program is free software; you can redistribute it and/or modify
  7. ;;;  it under the terms of the GNU General Public License as published by
  8. ;;;  the Free Software Foundation; either version 2, or (at your option)
  9. ;;;  any later version.
  10. ;;;
  11. ;;;  This program is distributed in the hope that it will be useful,
  12. ;;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;;;  GNU General Public License for more details.
  15. ;;;
  16. ;;;  You should have received a copy of the GNU General Public License
  17. ;;;  along with this program; if not, write to the Free Software
  18. ;;;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. ;;;
  20. ;;; 
  21. ;;; Description:
  22. ;;;
  23. ;;;    Defines pulldown and popup menus for the html mode.
  24. ;;;    This file requires the following files:
  25. ;;;        hm--html.el
  26. ;;;        hm--date.el
  27. ;;;        hm--html-configuration.el
  28. ;;;        adapt.el
  29. ;;;        html-mode.el
  30. ;;;    The file html-mode.el is the html mode file from Marc Andreessen.
  31. ;;;
  32. ;;;    You should also have the w3 package from William M. Perry, for
  33. ;;;    browsing html- files in the xemacs and the program Xmosaic together
  34. ;;;    with the file html-view.el from Ron Tapia for browsing html- files
  35. ;;;    in the Xmosaic.
  36. ;;; 
  37. ;;; Installation: 
  38. ;;;   
  39. ;;;    Put this file in one of your load path directories and the
  40. ;;;    following lines in your .emacs:
  41. ;;;    
  42. ;;;    (autoload 'html-mode "hm--html-menu" "HTML major mode." t)
  43. ;;;    (or (assoc "\\.html$" auto-mode-alist)
  44. ;;;         (setq auto-mode-alist (cons '("\\.html$" . html-mode) 
  45. ;;;                        auto-mode-alist)))
  46. ;;;
  47. ;;;    Look at the file hm--html-configuration for further installation
  48. ;;;     points.
  49. ;;;
  50.  
  51.  
  52. (provide 'hm--html-menu)
  53. (require 'html-mode)
  54. (require 'hm--html)
  55. (require 'adapt)
  56.  
  57.  
  58. ;;
  59. ;; Menu "HTML"
  60. ;;
  61.  
  62. (defvar hm--html-pulldown-menu nil "*A List with the HTML-Menu.")
  63. (defvar hm--html-menu-region-expert nil "*A List with the HTML-Menu.")
  64. (defvar hm--html-menu-region-novice nil "*A List with the HTML-Menu.")
  65. (defvar hm--html-menu-noregion-expert nil "*A List with the HTML-Menu.")
  66. (defvar hm--html-menu-noregion-novice nil "*A List with the HTML-Menu.")
  67.  
  68. (setq hm--html-menu-noregion-expert
  69.        '("HTML Noregion Expert Menu"
  70.      ("Anchors"
  71.       ["Html link..." hm--html-add-html-link t]
  72.       ["Info link..." hm--html-add-info-link t]
  73.       ["Gopher link..." hm--html-add-gopher-link t]
  74.       ["File link..." hm--html-add-file-link t]
  75.       "----"
  76.       ["Ftp link..." hm--html-add-ftp-link t]
  77.       ["News link..." hm--html-add-news-link t]
  78.       ["Mail link..." hm--html-add-mail-link t]
  79.       ["Wais link (direct)..." hm--html-add-direct-wais-link t]
  80.       ["Wais link (gateway)..." hm--html-add-wais-link t]
  81.       "----"
  82.       ["Proggate link..." hm--html-add-proggate-link t]
  83.       ["Local Proggate link..." hm--html-add-local-proggate-link t]
  84.       ["General link..." html-add-normal-link t]
  85.       "----"
  86.       ["Link target..." hm--html-add-link-target t]
  87.       )
  88.      ("Frame"
  89.       ["Full html frame..." hm--html-add-full-html-frame t]
  90.       ["Frame template..." 
  91.        (hm--html-insert-template hm--html-frame-template-file)
  92.        (file-exists-p hm--html-frame-template-file)]
  93.       "----"
  94.       ["Html" hm--html-add-html t]
  95.       ["Head" hm--html-add-head t]
  96.       ["Body" hm--html-add-body t]
  97.       "----"
  98.       ["Title and Header..." hm--html-add-title-and-header t]
  99.       ["Title..." hm--html-add-title t]
  100.       ["Header..." hm--html-add-header t]
  101.       ["Node Link..." hm--html-add-normal-node-link t]
  102.       ["Address" html-add-address t]
  103.       ["Signature" hm--html-add-signature t]
  104.       "----"
  105.       ["Created comment" hm--html-insert-created-comment t]
  106.       ["Changed comment" hm--html-insert-changed-comment t]
  107.       ["New date in title" hm--html-new-date t]
  108.       )
  109.      ("Structure"
  110.       ["Menu or list item" html-add-list-or-menu-item t]
  111.       ["Menu" html-add-menu t]
  112.       ["Unordered list" html-add-list t]
  113.       ["Ordered list" hm--html-add-numberlist t]
  114.       ["Directory list" hm--html-add-directory-list t]
  115.       "----"
  116.       ["Description list" html-add-description-list t]
  117.       ["Description title" hm--html-add-description-title t]
  118.       ["Description entry" hm--html-add-only-description-entry t]
  119.       ["Description title + entry" html-add-description-entry t]
  120.       "----"
  121.       ["Table..." hm--html-add-table t]
  122.       ["Table title..." hm--html-add-table-title t]
  123.       ["Table header..." hm--html-add-table-header t]
  124.       ["Table first row..." hm--html-add-first-table-row t]
  125.       ["Table additional row..." hm--html-add-additional-table-row t]
  126.       ("Additional Commands"
  127.        ["Table row frame..." hm--html-add-row-frame t]
  128.        ["Table header entry..." hm--html-add-header-entry t]
  129.        ["Table row entry..." hm--html-add-row-entry t]
  130.        ["Span columns..." hm--html-table-add-colspan-attribute t]
  131.        ["Span rows..." hm--html-table-add-rowspan-attribute t]
  132.        )
  133.       "----"
  134.       ["Paragraph container" hm--html-add-paragraph t]
  135.       ["Paragraph start tag" hm--html-add-paragraph-separator t]
  136.       ["New line" hm--html-add-line-break t]
  137.       ["Horizontal rule" hm--html-add-horizontal-rule t]
  138.       )
  139.      ("Formating Paragraphs"
  140.       ["Without links" html-add-plaintext t]
  141.       ["With links" hm--html-add-preformated t]
  142.       "----"
  143.           ["Blockquote" html-add-blockquote t]
  144.       ["Listing" html-add-listing t]
  145.       ["Abstract" hm--html-add-abstract t]
  146.       )
  147.      ("Formatting Words"
  148.       ["Bold" hm--html-add-bold t]
  149.       ["Italic" hm--html-add-italic t]
  150.       ["Underline" hm--html-add-underline t]
  151.           ["Typewriter" html-add-fixed t]
  152.       ["Strikethru" hm--html-add-strikethru t]
  153.       ["Superscript" hm--html-add-superscript t]
  154.       ["Subscript" hm--html-add-subscript t]
  155.       ;;      ["Render" hm--html-add-render t]
  156.       "----"
  157.           ["Emphasized" html-add-emphasized t]
  158.           ["Strong" html-add-strong t]
  159.       "----"
  160.       ("Computing"
  161.        ["Definition" hm--html-add-definition t]
  162.        ["Keyboard" html-add-keyboard t]
  163.        ["Command" hm--html-add-command t]
  164.        ["Argument" hm--html-add-argument t]
  165.        ["Option" hm--html-add-option t]
  166.        ["Variable" html-add-variable t]
  167.        ["Instance" hm--html-add-instance t]
  168.        ["Code" hm--html-add-code t]
  169.        ["Sample" html-add-sample t]
  170.        )
  171.       ("Literature"
  172.        ["Quote" hm--html-add-quote t]
  173.        ["Acronym" hm--html-add-acronym t]
  174.        ["Abbrevation" hm--html-add-abbrevation t]
  175.        ["Citation" html-add-citation t]
  176.        ["Literature" hm--html-add-literature t]
  177.        ["Publication" hm--html-add-publication t]
  178.        ["ISBN" hm--html-add-isbn t]
  179.        )
  180.       ("Person"
  181.        ["Person" hm--html-add-person t]
  182.        ["Author" hm--html-add-author t]
  183.        ["Editor" hm--html-add-editor t]
  184.        ["Credits" hm--html-add-credits t]
  185.        ["Copyright" hm--html-add-copyright t]
  186.        )
  187.       "----"
  188.       ["Footnote" hm--html-add-footnote t]
  189.       ["Margin" hm--html-add-margin t]
  190.       "----"
  191.       ["HTML Comment" hm--html-add-comment t]
  192.       )
  193.      ("Include"
  194.       ["Top aligned image..." hm--html-add-image-top t]
  195.       ["Middle aligned image..." hm--html-add-image-middle t]
  196.       ["Bottom aligned image..." hm--html-add-image-bottom t]
  197. ;      "----"
  198. ;      ["File..."  hm--html-add-server-side-include-file t]
  199. ;      ["Command..." hm--html-add-server-side-include-command t]
  200. ;      ["Command with isindex parameter..." 
  201. ;       hm--html-add-server-side-include-command-with-isindex-parameter
  202. ;       t]
  203.       )
  204.      ("Forms"
  205.       ["Form..." hm--html-add-form t]
  206.       "----"
  207.       ["Text field..." hm--html-form-add-input-text t]
  208.       ["Password field..." hm--html-form-add-input-password t]
  209.       ["Isindex field..." hm--html-form-add-input-isindex t]
  210.       ["Integer field..." hm--html-form-add-input-integer t]
  211.       ["Float field..." hm--html-form-add-input-float t]
  212.       ["Date field..." hm--html-form-add-input-date t]
  213.       ["Url field..." hm--html-form-add-input-url t]
  214.       ["Scribble field..." hm--html-form-add-input-scribble t]
  215.       "----"
  216.       ["Checkbox button..." hm--html-form-add-input-checkbox t]
  217.       ["Radio button..." hm--html-form-add-input-radio t]
  218.       ["Reset button..." hm--html-form-add-input-reset t]
  219.       ["Submit button..." hm--html-form-add-input-submit t]
  220.       ["Image button..." hm--html-form-add-input-image t]
  221.       ["Audio button..." hm--html-form-add-input-audio t]
  222.       "----"
  223.       ["Option Menu..." hm--html-form-add-select-option-menu t]
  224.       ["Scrolled List..." hm--html-form-add-select-scrolled-list t]
  225.       ["Option..." hm--html-form-add-select-option t]
  226.       "----"
  227.       ["Textarea..." hm--html-form-add-textarea t]
  228.       )
  229.      ))
  230.  
  231.  
  232. (setq hm--html-menu-noregion-novice
  233.        '("HTML No-region Novice Menu"
  234.      ("Anchors"
  235.       ["Html link..." hm--html-add-html-link t]
  236.       ["File link..." hm--html-add-file-link t]
  237.       )
  238.      ("Frame"
  239.       ["Full html frame..." hm--html-add-full-html-frame t]
  240.       "----"
  241.       ["Title and Header..." hm--html-add-title-and-header t]
  242.       ["Signature" hm--html-add-signature t]
  243.       )
  244.      ("Structure"
  245.       ["Menu item" html-add-list-or-menu-item t]
  246.       ["Menu" html-add-menu t]
  247.       "----"
  248.       ["Paragraph Container" hm--html-add-paragraph t]
  249.       )
  250.      ("Formating Paragraphs"
  251.       ["Without links" html-add-plaintext t]
  252.       ["With links" hm--html-add-preformated t]
  253.       )
  254.      ("Formatting Words"
  255.       ["Bold" hm--html-add-bold t]
  256.       ["Italic" hm--html-add-italic t]
  257.       ["Underline" hm--html-add-underline t]
  258.           ["Typewriter" html-add-fixed t]
  259.       )))
  260.  
  261. (setq hm--html-menu-region-expert
  262.        '("HTML Region Expert Menu"
  263.      ("Anchors"
  264.       ["Html link..." hm--html-add-html-link-to-region t]
  265.       ["Info link..." hm--html-add-info-link-to-region t]
  266.       ["Gopher link..." hm--html-add-gopher-link-to-region t]
  267.       ["File link..." hm--html-add-file-link-to-region t]
  268.       "----"
  269.       ["Ftp link..." hm--html-add-ftp-link-to-region t]
  270.       ["News link..." hm--html-add-news-link-to-region t]
  271.       ["Mail link..." hm--html-add-mail-link-to-region t]
  272.       ["WAIS link (direct)..." hm--html-add-direct-wais-link-to-region t]
  273.       ["WAIS link (gateway)..." hm--html-add-wais-link-to-region t]
  274.       "----"
  275.       ["Proggate link..." hm--html-add-proggate-link-to-region t]
  276.       ["Local Proggate link..." 
  277.        hm--html-add-local-proggate-link-to-region 
  278.        t]
  279.       ["General link..." hm--html-add-normal-link-to-region t]
  280.       "----"
  281.       ["Link target..." html-add-reference-to-region t]
  282.       )
  283.      ("Frame"
  284.       ["Full html frame..." hm--html-add-full-html-frame-with-region t]
  285.       "----"
  286.       ["Head" hm--html-add-head-to-region t]
  287.       ["Body" hm--html-add-body-to-region t]
  288.       "----"
  289.       ["Title and Header..." hm--html-add-title-and-header-to-region t]
  290.       ["Title" hm--html-add-title-to-region t]
  291.       ["Header..." hm--html-add-header-to-region t]
  292.       ["Address" hm--html-add-address-to-region t]
  293.       )
  294.      ("Structure"
  295.       ["Menu" hm--html-add-menu-to-region t]
  296.       ["Unordered list" hm--html-add-list-to-region t]
  297.       ["Ordered list" hm--html-add-numberlist-to-region t]
  298.       ["Directory list" hm--html-add-directorylist-to-region t]
  299.       "----"
  300.       ["Description list" hm--html-add-description-list-to-region t]
  301.       "----"
  302.       ["Table..." hm--html-add-table-to-region t]
  303.       ["Table Title..." hm--html-add-table-title-to-region t]
  304.       ("Additional Commands"
  305.        ["Table row frame..." hm--html-add-row-frame-to-region t]
  306.        )
  307.       "----"
  308.       ["Paragraph container" hm--html-add-paragraph-to-region t]
  309.       )
  310.      ("Formatting Paragraphs"
  311.       ["Without links" hm--html-add-plaintext-to-region t]
  312.       ["With links" hm--html-add-preformated-to-region t]
  313.       "----"
  314.           ["Blockquote" hm--html-add-blockquote-to-region t]
  315.       ["Listing" hm--html-add-listing-to-region t]
  316.       ["Abstract" hm--html-add-abstract-to-region t]
  317.       )
  318.      ("Formatting Words"
  319.       ["Bold" hm--html-add-bold-to-region t]
  320.       ["Italic" hm--html-add-italic-to-region t]
  321.       ["Underline" hm--html-add-underline-to-region t]
  322.           ["Typewriter" hm--html-add-fixed-to-region t]
  323.       ["Strikethru" hm--html-add-strikethru-to-region t]
  324.       ["Superscript" hm--html-add-superscript-to-region t]
  325.       ["Subscript" hm--html-add-subscript-to-region t]
  326.       ;;      ["Render" hm--html-add-render-to-region t]
  327.       "----"
  328.           ["Emphasized" hm--html-add-emphasized-to-region t]
  329.           ["Strong" hm--html-add-strong-to-region t]
  330.       "----"
  331.       ("Computing"
  332.        ["Definition" hm--html-add-definition-to-region t]
  333.        ["Keyboard" hm--html-add-keyboard-to-region t]
  334.        ["Command" hm--html-add-command-to-region t]
  335.        ["Argument" hm--html-add-argument-to-region t]
  336.        ["Option" hm--html-add-option-to-region t]
  337.        ["Variable" hm--html-add-variable-to-region t]      
  338.        ["Instance" hm--html-add-instance-to-region t]
  339.        ["Code" hm--html-add-code-to-region t]
  340.        ["Sample" hm--html-add-sample-to-region t]
  341.        )
  342.       ("Literature"
  343.        ["Quote" hm--html-add-quote-to-region t]
  344.        ["Acronym" hm--html-add-acronym-to-region t]
  345.        ["Abbrevation" hm--html-add-abbrevation-to-region t]
  346.        ["Citation" hm--html-add-citation-to-region t]
  347.        ["Literature" hm--html-add-literature-to-region t]
  348.        ["Publication" hm--html-add-publication-to-region t]
  349.        ["ISBN" hm--html-add-isbn-to-region t]
  350.        )
  351.       ("Person"
  352.        ["Person" hm--html-add-person-to-region t]
  353.        ["Author" hm--html-add-author-to-region t]
  354.        ["Editor" hm--html-add-editor-to-region t]
  355.        ["Credits" hm--html-add-credits-to-region t]
  356.        ["Copyright" hm--html-add-copyright-to-region t]
  357.        )
  358.       "----"
  359.       ["Footnote" hm--html-add-footnote-to-region t]
  360.       ["Margin" hm--html-add-margin-to-region t]
  361.       "----"
  362.       ["HTML Comment" hm--html-add-comment-to-region t]
  363.       )
  364.      ("Forms"
  365.       ["Form..." hm--html-add-form-to-region t])
  366.      ))
  367.  
  368.  
  369. (setq hm--html-menu-region-novice
  370.       '("HTML Region Novice Menu"
  371.      ("Anchors"
  372.       ["Html link..." hm--html-add-html-link-to-region t]
  373.       ["File link..." hm--html-add-file-link-to-region t]
  374.       )
  375.      ("Frame"
  376.       ["Full html frame..." hm--html-add-full-html-frame-with-region t]
  377.       "----"
  378.       ["Title and Header..." hm--html-add-title-and-header-to-region t]
  379.       )
  380.      ("Structure"
  381.       ["Menu" hm--html-add-menu-to-region t]
  382.       )
  383.      ("Formatting Paragraphs"
  384.       ["Without links" hm--html-add-plaintext-to-region t]
  385.       ["With links" hm--html-add-preformated-to-region t]
  386.       )
  387.      ("Formatting Words"
  388.       ["Bold" hm--html-add-bold-to-region t]
  389.       ["Italic" hm--html-add-italic-to-region t]
  390.       ["Underline" hm--html-add-underline-to-region t]
  391.           ["Typewriter" hm--html-add-fixed-to-region t]
  392.       )
  393.      ))
  394.  
  395.  
  396.  
  397. (setq hm--html-pulldown-menu
  398.       '("HTML Config Menu"
  399.     ("Set popup menu"
  400.      ["Novice menu" hm--html-use-novice-menu t]
  401.      ["Expert menu" hm--html-use-expert-menu t]
  402.      ["Marcs menu" hm--html-use-marcs-menu t]
  403.      )
  404. ;    ("Highlighting"
  405. ;     ["Toggle font lock mode" font-lock-mode (adapt-xemacsp)]
  406. ;     ["Fontify buffer" font-lock-fontify-buffer (adapt-xemacsp)]
  407. ;     ["Set font lock color..." 
  408. ;      hm--html-set-font-lock-color 
  409. ;      (or (adapt-xemacsp) (adapt-emacs19p))]
  410. ;     "----"
  411. ;     ["Toggle use highlighting" 
  412. ;      hm--html-toggle-use-highlighting 
  413. ;      html-use-highlighting]
  414. ;     )
  415. ;    "----"
  416.     ["Reload config files" hm--html-load-config-files t]
  417.     ["Templates ..." hm--html-insert-template t]
  418.     "----"
  419.     ["Remove numeric names" hm--html-remove-numeric-names t]
  420.     ["Quotify hrefs" html-quotify-hrefs t]
  421.     "----"
  422.     ["Submit bug report..." hm--html-submit-bug-report t]
  423.     ["WWW Package Docs" hm--html-view-www-package-docu t]
  424.     "----"
  425.     ("Preview Document"     
  426.      ["Netscape view buffer" (hm--html-send-buffer-to-netscape 
  427.                   (current-buffer)) t]
  428.      "----"
  429.      ["Xmosaic start" html-view-start-mosaic t]
  430.      ["Xmosaic view buffer" html-view-view-buffer t]
  431.      ["Xmosaic view file" html-view-view-file t]
  432.      ["Xmosaic goto url" html-view-goto-url t]
  433.      ["Xmosaic get display" html-view-get-display t]
  434.      "----"
  435.      ["W3 start" w3 t]
  436.      ["W3 view buffer" w3-preview-this-buffer t]
  437.      ["W3 open remote file..." w3-fetch t]
  438.      ["W3 open local..." w3-open-local t]
  439.      ["W3 use hotlist..." w3-use-hotlist t]
  440.      )
  441.     ))
  442.     
  443.  
  444. (if (adapt-xemacsp)
  445.     (defun hm--install-html-menu ()
  446.       (if (and current-menubar (not (assoc "HTML" current-menubar)))
  447.       (progn
  448.         (set-buffer-menubar (copy-sequence current-menubar))
  449.         (add-menu nil "HTML" (cdr hm--html-pulldown-menu))))) 
  450.   (defun hm--install-html-menu ()
  451.     (if (and current-menubar (not (assoc "HTML" current-menubar)))
  452.     (progn
  453.       (set-buffer-menubar current-menubar)))
  454. ;      (setq lucid-menubar-map nil)
  455. ;      (make-local-variable 'lucid-menubar-map)
  456. ;      (set-buffer-menubar (copy-sequence current-menubar))
  457. ;      (make-local-variable 'lucid-menubar-map)
  458. ;      (make-local-variable 'current-menubar)))
  459.     (add-menu nil "HTML" (cdr hm--html-pulldown-menu))
  460.       ))
  461.  
  462. ;    (add-menu nil "HTML" (cdr hm--html-pulldown-menu))))
  463.  
  464.  
  465. ;(defun hm--popup-html-menu (event)
  466. ;  "Pops the HTML- menu up."
  467. ;  (interactive "@e")
  468. ;  (if hm--html-marc
  469. ;      (popup-menu html-menu)
  470. ;    (if hm--html-expert
  471. ;    (if hm--region-active
  472. ;        (popup-menu hm--html-menu-region-expert)
  473. ;      (popup-menu hm--html-menu-noregion-expert))
  474. ;      (if hm--region-active
  475. ;      (popup-menu hm--html-menu-region-novice)
  476. ;    (popup-menu hm--html-menu-noregion-novice)))))
  477.  
  478.  
  479. (defun hm--popup-html-menu (event)
  480.   "Pops the HTML- menu up, if no region is active."
  481.   (interactive "@e")
  482.   (if hm--html-marc
  483.       (popup-menu html-menu)
  484.     (if hm--html-expert
  485.     (popup-menu hm--html-menu-noregion-expert)
  486.       (popup-menu hm--html-menu-noregion-novice))))
  487.  
  488.  
  489. (defun hm--popup-html-menu-region (event)
  490.   "Pops the HTML- menu up, if a region is active."
  491.   (interactive "@e")
  492.   (if hm--html-marc
  493.       (popup-menu html-menu)
  494.     (if hm--html-expert
  495.     (popup-menu hm--html-menu-region-expert)
  496.       (popup-menu hm--html-menu-region-novice))))
  497.  
  498.  
  499. (defun hm--html-use-novice-menu ()
  500.   "Changes the HTML popup menu to the novice menu."
  501.   (interactive)
  502.   (setq hm--html-expert nil)
  503.   (setq hm--html-marc nil)
  504. ;  (define-key html-mode-map '(button3) 'hm--popup-html-menu)
  505. ;  (define-key html-region-mode-map '(button3) 'hm--popup-html-menu)
  506.   )    
  507.  
  508.  
  509. (defun hm--html-use-expert-menu ()
  510.   "Changes the HTML popup menu to the expert menu."
  511.   (interactive)
  512.   (setq hm--html-expert t)
  513.   (setq hm--html-marc nil)
  514. ;  (define-key html-mode-map '(button3) 'hm--popup-html-menu)
  515. ;  (define-key html-region-mode-map '(button3) 'hm--popup-html-menu)
  516.   )
  517.  
  518.  
  519. (defun hm--html-use-marcs-menu ()
  520.   "Changes the HTML popup menu to Marc Andreessens menu."
  521.   (interactive)
  522.   (setq hm--html-marc t)
  523. ;  (define-key html-mode-map '(button3) 'hm--popup-html-menu)
  524. ;  (define-key html-region-mode-map '(button3) 'hm--popup-html-menu)
  525.   )
  526.  
  527.  
  528. ;(define-key html-mode-map '(button3) 'hm--popup-html-menu)
  529. ;(define-key html-region-mode-map '(button3) 'hm--popup-html-menu)
  530.  
  531. (add-hook 'html-mode-hook 'hm--install-html-menu)
  532.  
  533.  
  534. (defvar hm--html-menu-load-hook nil
  535.   "*Hook variable to execute functions after loading the file hm--html-menu.")
  536.  
  537.  
  538. (run-hooks 'hm--html-menu-load-hook)
  539.  
  540.