[Python-modules-team] Bug#418446: python-docutils: rst.el: lazy-lock obsolete in emacs 22 (emacs-snapshot)

Justin Mazzola Paluska jmp at MIT.EDU
Mon Apr 9 19:25:04 UTC 2007


Package: python-docutils
Version: b
Severity: normal
Tags: patch


I use emacs-snapshot (emacs 22) as my default emacs.  Whenever load an
rst file, emacs-snapshot refuses to colorize the file and spits out
the error (copied from *Messages*):

Loading /usr/share/emacs/site-lisp/rst.el (source)…done
font-lock-turn-on-thing-lock: Symbol’s function definition is void: lazy-lock-mode

lazy-lock.el is obsolete in emacs 22; jit-lock should be used instead;
the attached patch to /usr/share/emacs/site-lisp/rst.el implements
this change.

I’ve tested my changes against against etch’s emacs21 and
emacs-snapshot and it seems to work.
	—Justin

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
-------------- next part --------------
--- rst.el~	2007-04-09 15:04:06.000000000 -0400
+++ rst.el	2007-04-09 15:04:56.000000000 -0400
@@ -2196,13 +2196,13 @@
      ((or (not font-lock-support-mode) ;; No support mode set (but required)
 	  (symbolp font-lock-support-mode)) ;; or a fixed mode for all
       (setq font-lock-support-mode
-	    (list (cons 'rst-mode (and rst-mode-lazy 'lazy-lock-mode))
+	    (list (cons 'rst-mode (and rst-mode-lazy 'jit-lock-mode))
 		  (cons t font-lock-support-mode))))
      ((and (listp font-lock-support-mode)
 	   (not (assoc 'rst-mode font-lock-support-mode)))
       ;; A list of modes missing rst-mode
       (setq font-lock-support-mode
-	    (append '((cons 'rst-mode (and rst-mode-lazy 'lazy-lock-mode)))
+	    (append '((cons 'rst-mode (and rst-mode-lazy 'jit-lock-mode)))
 		    font-lock-support-mode)))))
 
   ;; Names and hooks


More information about the Python-modules-team mailing list