Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Using Emacs for XML documents

Install add-ons to the powerful Emacs text editor to build a platform-independent (and free) environment for working with XML

Return to the article


Listing 2. Adding PSGML to the Emacs initialization file

;;; Set up PSGML
; Add PSGML to load-path so Emacs can find it.
; Note the forward slashes in the path... this is platform-independent so I 
; would suggest using them over back slashes. If you use back slashes, they 
; MUST BE doubled, as Emacs treats backslash as an escape character. 
(setq load-path (append (list nil "d:/Emacs/site-lisp/psgml-1.2.2") load-path))

; Use PSGML for sgml and xml major modes.
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)