python-mode does not autoload on emacs21

Bug #159432 reported by Jason Gunthorpe
6
Affects Status Importance Assigned to Milestone
python-mode (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-mode

python mode no longer auto loads on emacs21 with gutsy.

Looks like the /etc/emacs/site-start.d/50python-mode.el isn't quite right, I suspect it got broke while fixing 155681.

By my eye, the entire file should be executed when emacs21 is used, but the form of the if statement only executes the first line. The rest of the file is executed on emacs22/emacs20 which does not seem to be the intent. I fixed it by wrapping the bulk of the file in a progn block.

(if (not (or (eq (symbol-name debian-emacs-flavor) "emacs20")
             (eq (symbol-name debian-emacs-flavor) "emacs22")))
  (progn
     (autoload 'python-mode "python-mode" "Python editing mode." t)
[..]

The execution of the bulk of this file as an else block is probbably related to 155681, but the fix from there is needed too, the eq should be string=.

Related branches

Revision history for this message
Christopher DeMarco (demarco) wrote :

I have this problem on a clean install of gutsy; the fix above works.

I've attached a patch to the file; if you want to try the fix and don't know enough Lisp to do it yourself, apply the patch as follows:

  sudo patch -p0 < patch

Revision history for this message
Chris Cole (ccole) wrote :

this issue still exists in hardy...but applying the above patch works. Nice work.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-mode - 1:1.0-3.1ubuntu4

---------------
python-mode (1:1.0-3.1ubuntu4) intrepid; urgency=low

  [ Christopher DeMarco ]
  * debian/emacsen-startup:
    - Autoload with emacs21 (LP: #159432).

  [ Luca Falavigna ]
  * debian/control:
    - Update Maintainer field as per spec (LP: #230350).

 -- Luca Falavigna <email address hidden> Sun, 01 Jun 2008 11:31:19 +0200

Changed in python-mode:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.