Emacs python-mode problem

Anand B Pillai abpillai at lycos.com
Mon Apr 7 02:14:32 EDT 2003


Chunyu <dddkk at sina.com> wrote in message news:<m2of3ktq67.fsf at db.hit.edu.cn>...
> While debugging a C/C++ program with GDB in emacs (version 21.3.50),
> there is an arrow symbol `=>' in the source window to indicate the
> current line normally. But After I load the python-mode.el file from
> my ~/.emacs.el, the arrow symbol disappear while debugging with GDB in
> emacs. (The python-mode.el is from
> http://www.python.org/emacs/python-mode, version 4.6.)
> 
> I load the python in my ~/.emacs.el by
> (require 'python-mode)
> (setq auto-mode-alist
>       (cons '("\\.py$" . python-mode) auto-mode-alist))
> (setq interpreter-mode-alist
>       (cons '("python" . python-mode) interpreter-mode-alist))
>

     In my .emacs file I see the following code.
(setq auto-mode-alist
       (append '(("\\.C$"  . c-mode)
                ("\\.cc$" . c++-mode)
                 ...
                 ...
                 ("\\.py$" . python-mode)) auto-mode-alist)

Perhaps you can try that form.

Btw you dont need to 'require python-mode or for that matter any
of the mode-specific functions before your definition of auto-mode-alist.
The 'require' call can come later, no problem.
 
> Now, I have to comment these lines, and load python-mode.el by hand
> when I want to use python-mode. How can I solve it? Is there another
> better python-mode code? Thanks for your replay.

Thanks

Anand




More information about the Python-list mailing list