5

Since an upgrade to GNU Emacs 24.4.1, I

Error running timer `font-latex-jit-lock-force-redisplay': (wrong-number-of-arguments (2 . 2) 3) [N times]

where N in my observations ranges from single digits to 240.

C-h f font-latex-jit-lock-force-redisplay says only

Compatibility for Emacsen not offering `jit-lock-force-redisplay'.

Any pointers?

2

I found a following redefinition of font-latex-jit-lock-force-redisplay that appears to solve my problem. I put the following into my .emacs file:

(require 'font-latex)

(defun font-latex-jit-lock-force-redisplay (buf start end)
  "Compatibility for Emacsen not offering `jit-lock-force-redisplay'."
    ;; The following block is an expansion of `jit-lock-force-redisplay'
    ;; and involved macros taken from CVS Emacs on 2007-04-28.
    (with-current-buffer buf
      (let ((modified (buffer-modified-p)))
    (unwind-protect
        (let ((buffer-undo-list t)
          (inhibit-read-only t)
          (inhibit-point-motion-hooks t)
          (inhibit-modification-hooks t)
          deactivate-mark
          buffer-file-name
          buffer-file-truename)
          (put-text-property start end 'fontified t))
      (unless modified
        (restore-buffer-modified-p nil))))))

The first line was necessary, I suppose, because otherwise font-latex.el is only loaded when the first .tex file is visited and overwrites the definition from .emacs.

  • 3
    You can just upgrade your AUCTeX version as well, this has been fixed upstream long time ago. – giordano Jun 13 '15 at 7:56
  • @wasamasa with pleasure :-) – xebtl Oct 12 '15 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.