Re: Auto-inserting <![CDATA[ ... ]]>

"D. D. Brierton" <[email protected]> Mon, 23 Feb 2004 11:13:52 +0000
Newsgroups gmane.emacs.psgml.user
Organization DZR Web Development
Message-ID <[email protected]>
On Sun, 2004-02-22 at 17:54, Syd Bauman wrote:
> > Could someone recommend some handy way of including the commented
> > CDATA stuff with the minimum of typing? Is that what Markup ->
> > Custom Markup is for?
> 
> Yes, at least that's what I use Markup -> Custom Markup for. This
> may also help with your namespace insertion.
> 
> I run the following code inside a function that is called by
> sgml-mode-hook. 
> 
>      ;;
>      ;; I insert CDATA marked sections pretty frequently ...
>      ;; 
>      (add-to-list 'sgml-custom-markup '("CDATA section" "<![CDATA[]]>"))
>      (add-to-list 'sgml-custom-markup '("TEI example" "<eg>\n<![CDATA[\r]]></eg>"))

Hmmm ... this doesn't work for me. I added *exactly* what you have above
to my .emacs and I get the following error:

        An error has occurred while loading `/home/darren/.emacs.el':
        
        Symbol's value as variable is void: sgml-custom-markup
        
        To ensure normal operation, you should investigate the cause
        of the error in your initialization file and remove it.  Start
        Emacs with the `--debug-init' option to view a complete error
        backtrace

Starting emacs from a terminal with emacs --debug-init I get this:

        Debugger entered--Lisp error: (void-variable sgml-custom-markup)
          add-to-list(sgml-custom-markup ("CDATA section" "<![CDATA[]]>"))
          eval-buffer(#<buffer  *load*> nil "~/.emacs" nil t)
          load-with-code-conversion("/home/darren/.emacs.el" "~/.emacs" t t)
          load("~/.emacs" t t)
          #[nil <unpasteable gibberish>
          command-line()
          normal-top-level()

I have *no* idea what that means ...

-- 
=====================================================================
D. D. Brierton            [email protected]          www.dzr-web.com
       Trying is the first step towards failure (Homer Simpson)
=====================================================================



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click