help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Helper-files


From: Lars Kristiansson
Subject: Re: Helper-files
Date: Thu, 21 Feb 2002 09:32:53 +0100

Hi.

I tried to compile this el file at home, but it seems to be an error in the
file. I get this message:

Compiling file c:/Program/emacs-20.7/lisp/html-helper-menues.el at Fri Jan 25
09:10:56 2002
  ** reference to free variable html-helper-mode-map

I am no lisp-hacker, so I wouldn't have an idea about what's wrong. This mode
works allright
with UNIX systems.

(Hope I did no error in attaching the file... There also exists a compiled file
"html-helper-mode.elc"
to which I have no source.

========================

Two questions by the way:

*  Where can I learn more about Lisp?

*  Is it possible to decompile an elc-file?

Bye for now.

Douglas Lewan wrote:

> Lars,
>
> You probably need to put the location of your html.elc file into the
> load-path variable.
>
> If that doesn't work, make sure that the file has a (provide
> 'this-html-feature) line in it.
>
> I hope this helps.
>
> ,Doug
> Douglas Lewan
> ADIR Technologies
> 732 836 3916
> dlewan@adirtech.com
>
> The legal department has requested that this message appear as a footnote to
> all e-mails sent from my computer.
>
> This e-mail and attachments, if any, may contain confidential and/or
> proprietary information. Please be advised that the unauthorized use or
> disclosure of the information is strictly prohibited. If you are not the
> intended recipient, please notify the sender immediately by reply e-mail and
> delete all copies of this message and attachments. Thank you.
>
> -----Original Message-----
> From: Lars Kristiansson
> To: emacs
> Sent: 1/15/02 12:35 PM
> Subject: Helper-files
>
> Hi everybody!
>
> I have some el files that I copied from my University, among them a
> HTML-mode file. I have compiled this file into an elc file, that I now
> have in the library where all the default elc files are located.
>
> I do however have some problems in making Emacs load this elc file on
> html file loading. It seems Emacs doesn't know about this file.
>
> How can I notify Emacs that this mode file is present, and to make Emacs
> load it whenever a html file is loaded, just as c-mode is loaded
> whenever a c-source is loaded?
>
> I run Emacs 20.7 on Windows98.
>
> --
> ___M_V_H______________Dr_Xem@cs________________lksign v2.0__
>
> Windows NT crashed.
> I am the Blue Screen of Death.
> No one hears your screams. - [Anonymous]
>
> Dr_Xem@cs, the one and only!         (aka Lars Kristiansson)
> md8lars@mdstud.chalmers.se               dr_xemacs@telia.com
> http://www.mdstud.chalmers.se/~md8lars        ICQ : 25152178
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

--
___M_V_H______________Dr_Xem@cs________________lksign v2.0__

Magnus tuggar på en korkad idiot !!
- [Dr_Xem@cs goes krazy]

Dr_Xem@cs, the one and only!         (aka Lars Kristiansson)
md8lars@mdstud.chalmers.se               dr_xemacs@telia.com
http://www.mdstud.chalmers.se/~md8lars        ICQ : 25152178

;;; Author: Joe.Holloway@adfa.oz.au (Joe Holloway)
;;; Date:   16 Mar 1994

;;; 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.

;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.

;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING.  If not, write to
;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

;;; You can find code for menus in emacs-19 in the emacs-19 sources in
;;; the file lisp/menu-bar.el

;;; To change the order of items in the menu bar that comes with emacs-19
;;; (setq menu-bar-final-items '(cmd-menu spell header mode help))

;;; Additions to .emacs:

;;; (setq html-helper-mode-hook
;;;   (lambda ()
;;;      (load-file "html-helper-menus")))

;;; Code

;; Define Menu Bar
(defvar menu-bar-html-menu (make-sparse-keymap "HTML-Helper"))
(define-key html-helper-mode-map [menu-bar html] 
  (cons "HTML-Helper" menu-bar-html-menu))
(defvar menu-bar-insert-menu (make-sparse-keymap "Insert"))
(define-key html-helper-mode-map [menu-bar insert] 
  (cons "Insert" menu-bar-insert-menu))
    ;; Submenus
    (defvar list-menu-map (make-sparse-keymap "Lists"))
    (fset 'list-menu list-menu-map)
    (defvar input-menu-map (make-sparse-keymap "Input"))
    (fset 'input-menu input-menu-map)
(defvar menu-bar-header-menu (make-sparse-keymap "Header"))
(define-key html-helper-mode-map [menu-bar header] 
  (cons "Headers" menu-bar-header-menu))
(defvar menu-bar-style-menu (make-sparse-keymap "Style"))
(define-key html-helper-mode-map [menu-bar style]
  (cons "Style" menu-bar-style-menu))

;; Define HTML Menu.

(define-key menu-bar-html-menu [w3-preview-this-buffer]
  '("w3 Preview Buffer" . w3-preview-this-buffer))

;; Define Insert Menu.

(define-key menu-bar-insert-menu 
[html-helper-insert-timestamp-delimiter-at-point]
  '("Timestamp" . html-helper-insert-timestamp-delimiter-at-point))
(define-key menu-bar-insert-menu [tempo-template-html-note]
  '("Note" . tempo-template-html-note))
(define-key menu-bar-insert-menu [tempo-template-html-margin]
  '("Margin" . tempo-template-html-margin))
(define-key menu-bar-insert-menu [html-helper-smart-insert-item]
  '("List Item" . html-helper-smart-insert-item))
(define-key menu-bar-insert-menu [list-menu]
  '("List Type  -->>" . list-menu))
(define-key menu-bar-insert-menu [tempo-template-html-image]
  '("Image" . tempo-template-html-image))
(define-key menu-bar-insert-menu [tempo-template-html-horizontal-rule]
  '("Horizontal Rule" . tempo-template-html-horizontal-rule))
(define-key menu-bar-insert-menu [form-inputs]
  '("Form Input -->>" . input-menu))
(define-key menu-bar-insert-menu [form]
  '("Form" . tempo-template-html-form))
(define-key menu-bar-insert-menu [tempo-template-html-footnote]
  '("Footnote" . tempo-template-html-footnote))
(define-key menu-bar-insert-menu [tempo-template-html-target-anchor]
  '("Anchor Label" . tempo-template-html-target-anchor))
(define-key menu-bar-insert-menu [tempo-template-html-anchor]
  '("Anchor" . tempo-template-html-anchor))
(define-key menu-bar-insert-menu [tempo-template-html-address]
  '("Address" . tempo-template-html-address))
(define-key menu-bar-insert-menu [tempo-template-html-abstract]
  '("Abstract" . tempo-template-html-abstract))
(define-key menu-bar-insert-menu [tempo-template-html-title]
  '("Title" . tempo-template-html-title))

;; Define List Menu.

(define-key list-menu-map [directory]
  '("Directory" . tempo-template-html-directory))
(define-key list-menu-map [menu]
  '("Menu" . tempo-template-html-menu))
(define-key list-menu-map [definition-list]
  '("Definition List" . tempo-template-html-definition-list))
(define-key list-menu-map [unordered-list]
  '("Unordered List" . tempo-template-html-unordered-list))
(define-key list-menu-map [ordered]
  '("Ordered List" . tempo-template-html-ordered-list))

;; Define Input Menu.

(define-key input-menu-map [textarea]
  '("Textarea" . tempo-template-html-input-textarea))
(define-key input-menu-map [reset-button]
  '("Reset" . tempo-template-html-input-reset))
(define-key input-menu-map [submit-button]
  '("Submit" . tempo-template-html-input-submit))
(define-key input-menu-map [audio]
  '("Audio" . tempo-template-html-input-audio))
(define-key input-menu-map [scribble]
  '("Scribble" . tempo-template-html-input-scribble))
(define-key input-menu-map [image]
  '("Image" . tempo-template-html-input-image))
(define-key input-menu-map [radio-button]
  '("Radio Button" . tempo-template-html-input-radio))
(define-key input-menu-map [selection]
  '("Selection" . tempo-template-html-input-select))
(define-key input-menu-map [resource-locator]
  '("URL" . tempo-template-html-input-url))
(define-key input-menu-map [date]
  '("Date" . tempo-template-html-input-date))
(define-key input-menu-map [float]
  '("Float" . tempo-template-html-input-float))
(define-key input-menu-map [integer]
  '("Integer" . tempo-template-html-input-int))
(define-key input-menu-map [text]
  '("Text" . tempo-template-html-input-text))

;; Define Header Menu.

(define-key menu-bar-header-menu [tempo-template-html-header-6]
  '("Header 6" . tempo-template-html-header-6))
(define-key menu-bar-header-menu [tempo-template-html-header-5]
  '("Header 5" . tempo-template-html-header-5))
(define-key menu-bar-header-menu [tempo-template-html-header-4]
  '("Header 4" . tempo-template-html-header-4))
(define-key menu-bar-header-menu [tempo-template-html-header-3]
  '("Header 3" . tempo-template-html-header-3))
(define-key menu-bar-header-menu [tempo-template-html-header-2]
  '("Header 2" . tempo-template-html-header-2))
(define-key menu-bar-header-menu [tempo-template-html-header-1]
  '("Header 1" . tempo-template-html-header-1))

;; Define Style Menu.

(define-key menu-bar-style-menu [tempo-template-html-subscript]
  '("Subscript" . tempo-template-html-subscript))
(define-key menu-bar-style-menu [tempo-template-html-superscript]
  '("Superscript" . tempo-template-html-superscript))
(define-key menu-bar-style-menu [tempo-template-html-strikethru]
  '("Strikethru" . tempo-template-html-strikethru))
(define-key menu-bar-style-menu [tempo-template-html-preformatted]
  '("Preformatted" . tempo-template-html-preformatted))
(define-key menu-bar-style-menu [tempo-template-html-blockquote]
  '("Blockquote" . tempo-template-html-blockquote))
(define-key menu-bar-style-menu [tempo-template-html-emphasized]
  '("Emphasized" . tempo-template-html-emphasized))
(define-key menu-bar-style-menu [tempo-template-html-strong]
  '("Strong" . tempo-template-html-strong))
(define-key menu-bar-style-menu [tempo-template-html-code]
  '("Code" . tempo-template-html-code))
(define-key menu-bar-style-menu [tempo-template-html-fixed]
  '("Fixed" . tempo-template-html-fixed))
(define-key menu-bar-style-menu [tempo-template-html-underline]
  '("Underline" . tempo-template-html-underline))
(define-key menu-bar-style-menu [tempo-template-html-italic]
  '("Italic" . tempo-template-html-italic))
(define-key menu-bar-style-menu [tempo-template-html-bold]
  '("Bold" . tempo-template-html-bold))

(setq menu-bar-final-items 
      '(html buffer file edit insert header style help))

;;; end of helper-menus.el


reply via email to

[Prev in Thread] Current Thread [Next in Thread]