Solved

Emacs for windows loading the visual-basic.el mode.

Posted on 2003-12-03
4
1,725 Views
Last Modified: 2012-06-27
Im running emacs for windows and i just need to how to load the visual basic mode for it.
I searched and searched
0
Comment
Question by:djohnson104
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 9871802
Where did you download emacs from?

The versions I found don't mention a VB editor mode.

mlmcc
0
 
LVL 2

Author Comment

by:djohnson104
ID: 9874218
http://ftp.gnu.org/gnu/windows/emacs/

http://ftp.gnu.org/gnu/windows/emacs/docs/ntemacs/contrib/visual-basic-mode.el


Download emacs then install the Visual basic mode
 But i cant figure out how to use it.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 9879019
To use it I believe you will need a LISP compiler to compile the source.

mlmcc
0
 

Accepted Solution

by:
Matthew_X_Economou earned 100 total points
ID: 10058657
Installation of the aforementioned "visual-basic-mode.el" is similar to most other Emacs Lisp programs.  Copy the ".el" file to somewhere in your load path and cause it to be loaded via the Emacs startup script.  The easiest way to do that for all users on a particular workstation is, assuming Emacs is installed in "C:\Program Files\emacs" (Windows) or "/usr/local/" (UNIX):

(1) Save "visual-basic-mode.el" in the all-users Emacs Lisp directory "C:\Program Files\emacs\site-lisp" (Windows) or "/usr/local/share/emacs/site-lisp" (UNIX).  Make certain the file is readable by all users.

(2) Add the following lines to the following lines to the all-users Emacs startup script, "C:\Program Files\emacs\site-lisp\site-start.el" (Windows) or "/usr/local/share/emacs/site-lisp/site-start.el" (UNIX), making certain the file is readable by all users:

    (load-library "visual-basic-mode")
    (setq auto-mode-alist (cons '("\\.\\(frm\\|bas\\|cls\\|vbs\\)$" . visual-basic-mode) auto-mode-alist))

(3) Restart Emacs.  At some point while Emacs loads, you may see a message at the bottom of the screen that says "Loading textmodes/visual-basic-mode (source)...".

Now, any file with any of the extensions ".frm", ".bas", ".cls", or ".vbs" will be opened in Visual Basic mode, with syntax highlighting and indenting enabled.

Best wishes,
Matthew
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now