Paste number 82176: Python-Mode Ignores Global Font Lock

Index of paste annotations: 1

Paste number 82176: Python-Mode Ignores Global Font Lock
Pasted by: sbp
When:2 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+1REO
Channel:#swhack
Paste contents:
Raw Source | XML | Display As
To: emacs-pretest-bug@gnu.org

In my .emacs file I turn of global font lock:

   (global-font-lock-mode 0)

This is to turn syntax highlighting OFF in modes where there would normally be syntax highlighting by default. The operation in emacs 22.1.1 was to remove syntax highlighting from Perl, C, and Python files.

In emacs 23.0.95.1 (full build details below), this no longer works for Python files. That is to say, various *.py files that I've tested have syntax highlighting ON when I edit them in emacs with a normal command:

   $ emacs example.py
   $ emacs api.py

Perl and C files have syntax highlighting OFF, on the other hand. When editing one of the Python files, syntax highlighting can be turned OFF by using the following procedure:

   M-x eval-expression <RET>
   (global-font-lock-mode 0) <RET>

In other words, by evaluating the expression from my .emacs file manually. On repeating the expression, syntax highlighting remains OFF, so it is not apparently acting as a toggle.

When I use emacs -q, syntax highlighting is ON by default when editing any Perl, C, or Python file. I've moved the position of the global font lock line in my .emacs file, moving it to the top, to the middle, and to the bottom, and that has no effect.

The full .emacs file is available here:

   http://inamidst.com/config/emacs

I'm using the following version of emacs from CVS:

   GNU Emacs 23.0.95.1 (i386-apple-darwin8.11.1, X toolkit) of 2009-06-20

Compiled with:

   $ ./configure --prefix=$PACKAGES/emacs \
      --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no

And there doesn't appear to be any mention of this bug in etc/PROBLEMS; I also asked in #emacs on freenode about this bug before they advised me to file this bug by email.

Thanks,

-- 
Sean B. Palmer, http://inamidst.com/sbp/

Annotations for this paste:

Annotation number 1: er, the version I actually sent was...
Pasted by: sbp
When:2 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+1REO/1
Paste contents:
Raw Source | Display As
In my .emacs file I turn off global font lock:

  (global-font-lock-mode 0)

The effect is to turn syntax highlighting OFF in modes where there
would normally be syntax highlighting by default. The result in emacs
22.1.1 was to remove syntax highlighting from Perl, C, and Python
files.

In emacs 23.0.95.1 (build details below), this no longer works for
Python files. That is to say, various *.py files that I've tested have
syntax highlighting ON when I edit them in emacs with a normal
command:

  $ emacs example.py
  $ emacs api.py

Perl and C files have syntax highlighting OFF, on the other hand. When
editing one of the Python files, syntax highlighting can be turned OFF
by using the following procedure:

  M-x eval-expression <RET>
  (global-font-lock-mode 0) <RET>

In other words, by evaluating the expression from my .emacs file
manually. On repeating the expression, syntax highlighting remains
OFF, so it is apparently not acting as a toggle.

When I use emacs -q, syntax highlighting is ON by default when editing
any Perl, C, or Python file as expected. I've tried using different
positions for the global font lock line in my .emacs file, moving it
to the top, to the middle, and to the bottom, and that has no effect:
syntax highlighting is always ON in Python-Mode.

My full .emacs file is available here:

  http://inamidst.com/config/emacs

I'm using the following version of emacs from CVS:

  GNU Emacs 23.0.95.1 (i386-apple-darwin8.11.1, X toolkit) of 2009-06-20

Compiled with:

  $ ./configure --prefix=$PACKAGES/emacs \
     --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no

And there doesn't appear to be any mention of this bug in
etc/PROBLEMS; I also asked in #emacs on freenode about this bug before
they advised me to file this bug by email.

Colorize as:
Show Line Numbers
Index of paste annotations: 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.