unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: can't turn off font-lock
       [not found] <200708112124.l7BLOgG19369@f7.net>
@ 2007-08-12 17:56 ` Richard Stallman
  2007-08-12 19:53   ` Stefan Monnier
                     ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-12 17:56 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

    And invoke:
    M-x eval-expression RET (global-font-lock-mode 0) RET

    And now I try a few commands:
    C-h a font-lock RET             (a *Help* buffer)
    M-x grep RET e /etc/issue RET   (grep to get a couple matches)
    M-x shell RET pwd RET

    In all cases, I observe that fontification is happening.  Argh!
    E.g., the "pwd" is highlighted, the grep matches and filenames are
    highlighted, the *Help* buffer is fancily formatted.

I think these cases are different.  I do not observe any fontification
in M-x shell.  In M-x grep, I do observe it, but M-x font-lock-mode
turns it off.  (I wonder why it was on.)

In C-h a font-lock RET, I see faces regardless of whether Font-Lock
mode is enabled.

All that is in the trunk.

Can someone please debug these problems, then ack?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 17:56 ` can't turn off font-lock Richard Stallman
@ 2007-08-12 19:53   ` Stefan Monnier
  2007-08-12 21:48     ` Karl Berry
  2007-08-13  5:01     ` Richard Stallman
  2007-08-12 21:48   ` Karl Berry
  2007-08-12 22:54   ` Karl Berry
  2 siblings, 2 replies; 27+ messages in thread
From: Stefan Monnier @ 2007-08-12 19:53 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel, Karl Berry

> I think these cases are different.  I do not observe any fontification
> in M-x shell.  In M-x grep, I do observe it, but M-x font-lock-mode
> turns it off.  (I wonder why it was on.)

Because grep relies on compilation-mode, which uses font-lock to do its
work, so it forcefully enables font-lock.


        Stefan

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 17:56 ` can't turn off font-lock Richard Stallman
  2007-08-12 19:53   ` Stefan Monnier
@ 2007-08-12 21:48   ` Karl Berry
  2007-08-13  5:00     ` Richard Stallman
  2007-08-12 22:54   ` Karl Berry
  2 siblings, 1 reply; 27+ messages in thread
From: Karl Berry @ 2007-08-12 21:48 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

    I do not observe any fontification in M-x shell.

Maybe I am using the wrong word, but when I do this:

$ emacs -q --no-site 
M-x eval-expression RET (global-font-lock-mode 0) RET
M-x shell RET pwd RET

I most definitely do observe fontish things happening:
- my shell prompt is in a turquoise color.
- after typing a command (say, "pwd") and hitting RET,
  the command is emboldened.

I see analogous output in -nw mode.

Thanks,
karl

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 19:53   ` Stefan Monnier
@ 2007-08-12 21:48     ` Karl Berry
  2007-08-12 22:11       ` Stefan Monnier
  2007-08-12 22:44       ` Alfred M. Szmidt
  2007-08-13  5:01     ` Richard Stallman
  1 sibling, 2 replies; 27+ messages in thread
From: Karl Berry @ 2007-08-12 21:48 UTC (permalink / raw)
  To: monnier; +Cc: rms, emacs-devel

    rms> In M-x grep, I do observe it, but M-x font-lock-mode turns it off.

I've made various attempts at turning off font-lock in compile/grep
hooks without success.  If someone knows a recipe that works, please
inform.

    monnier> Because grep relies on compilation-mode, which uses
    font-lock to do its work, so it forcefully enables font-lock.

Am I to infer that M-x compile and M-x grep don't work without
fontification/faces (sorry, I don't understand the difference) any more?
If so, this should be mentioned somehow in the Font Lock node -- that
(global-font-lock-mode 0) doesn't turn off everything.  And in fact
there's no way of predicting what it does and doesn't turn off.

(Also, if so, I guess I'll have to write my own versions, since I find
faces badly and uselessly distracting, especially in -nw mode.  Maybe I
am the only person in the world this is true for.  Sigh.)

karl

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 21:48     ` Karl Berry
@ 2007-08-12 22:11       ` Stefan Monnier
  2007-08-12 22:54         ` Karl Berry
  2007-08-12 22:44       ` Alfred M. Szmidt
  1 sibling, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2007-08-12 22:11 UTC (permalink / raw)
  To: Karl Berry; +Cc: rms, emacs-devel

> (Also, if so, I guess I'll have to write my own versions,

You may be better off changing to not use font-lock, and then provide
a patch for it: I'd consider it as a bug-fix.

> since I find faces badly and uselessly distracting, especially in -nw
> mode.  Maybe I am the only person in the world this is true for.  Sigh.)

I'm sure you're not the only person.  I do like font-lock, but customize
most faces to look like `default' because I find them annoying/useless
(e.g. font-lock-keyword-face).


        Stefan

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 21:48     ` Karl Berry
  2007-08-12 22:11       ` Stefan Monnier
@ 2007-08-12 22:44       ` Alfred M. Szmidt
  1 sibling, 0 replies; 27+ messages in thread
From: Alfred M. Szmidt @ 2007-08-12 22:44 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel, monnier, rms

   (Also, if so, I guess I'll have to write my own versions, since I find
   faces badly and uselessly distracting, especially in -nw mode.  Maybe I
   am the only person in the world this is true for.  Sigh.)

FWIW, I find this also annoying when using -nw.  One would expect that
disabling font-lock would disable font-lock...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:11       ` Stefan Monnier
@ 2007-08-12 22:54         ` Karl Berry
  2007-08-12 23:15           ` Andreas Schwab
                             ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Karl Berry @ 2007-08-12 22:54 UTC (permalink / raw)
  To: monnier; +Cc: rms, emacs-devel

    You may be better off changing to not use font-lock, and then provide
    a patch for it: I'd consider it as a bug-fix.

Well, these functions never relied on font-lock before 22.1, so I hope
there was some excellent reason for going to all the trouble of
implementing it that way.  Now going to even more trouble to unimplement
it seems painful, although I don't expect we can just revert, either.
Sigh.

    most faces to look like `default' because I find them annoying/useless

Maybe the defaults should be less fancy.  But that's a different discussion.

    (e.g. font-lock-keyword-face).

I have a lot of trouble figuring out the face names to disable; it takes
me major research to get from output in some non-default face in some
buffer back to the actual face-symbol to disable.  (This is why I was
devoutly hoping that "(global-font-lock-mode 0)" would just work.)

Eli's mention of "C-u C-x =" is very helpful, I had missed that in the
manual.  When I run it in the filenames in the grep output (after -nw
this time), I see the face listed as "(compilation-info underline
underline)".  And unfortunately, I have no idea how to translate that
into a face name to disable without delving into the sources, which is
what I was doing anyway.  Oh well.  Is there a better way?

Meanwhile, I have also never been able to figure out how to disable an
individual face (and could find no documentation about it, either).  I
gather I'm supposed to set whatever-face-symbol to 'default or "default"
or something?  Can you show me how you do it, please?

(For example, it occurred to me that another way to achieve my faceless
desires would be to somehow define "bold", "italic", and so on to all
map to "default".  No luck with anything I tried in that direction,
either.)

Thanks,
Karl

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 17:56 ` can't turn off font-lock Richard Stallman
  2007-08-12 19:53   ` Stefan Monnier
  2007-08-12 21:48   ` Karl Berry
@ 2007-08-12 22:54   ` Karl Berry
  2007-08-13  2:31     ` Eli Zaretskii
  2007-08-13  5:00     ` Richard Stallman
  2 siblings, 2 replies; 27+ messages in thread
From: Karl Berry @ 2007-08-12 22:54 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

> I most definitely do observe fontish things happening:

I'm sorry, my mistake.  I was mistakenly invoking a prior version of Emacs.
With 22.1, I don't see any fontification in M-x shell after
(global-font-lock-mode 0).  Yay.

I did notice another place where it happens in 22.1, though: a simple
M-x shows the "M-x " prompt in blue (in emacs-under-x), likewise other
prompts (e.g., "Eval: " after M-x eval-expression RET).

Thanks,
karl

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54         ` Karl Berry
@ 2007-08-12 23:15           ` Andreas Schwab
  2007-08-13  2:38             ` Eli Zaretskii
  2007-08-12 23:24           ` Juri Linkov
                             ` (3 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Andreas Schwab @ 2007-08-12 23:15 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel, monnier, rms

karl@freefriends.org (Karl Berry) writes:

> Eli's mention of "C-u C-x =" is very helpful, I had missed that in the
> manual.  When I run it in the filenames in the grep output (after -nw
> this time), I see the face listed as "(compilation-info underline
> underline)".  And unfortunately, I have no idea how to translate that
> into a face name to disable without delving into the sources, which is
> what I was doing anyway.  Oh well.  Is there a better way?

Just click on it.

> Meanwhile, I have also never been able to figure out how to disable an
> individual face (and could find no documentation about it, either).  I
> gather I'm supposed to set whatever-face-symbol to 'default or "default"
> or something?  Can you show me how you do it, please?

M-x customize-face RET

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54         ` Karl Berry
  2007-08-12 23:15           ` Andreas Schwab
@ 2007-08-12 23:24           ` Juri Linkov
  2007-08-13 22:14             ` Karl Berry
  2007-08-13  2:37           ` Eli Zaretskii
                             ` (2 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Juri Linkov @ 2007-08-12 23:24 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel, monnier, rms

> Meanwhile, I have also never been able to figure out how to disable an
> individual face (and could find no documentation about it, either).  I
> gather I'm supposed to set whatever-face-symbol to 'default or "default"
> or something?  Can you show me how you do it, please?

You can try this code to disable face attributes of all faces:

  (mapc (lambda (face) (modify-face face)) (face-list))

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54   ` Karl Berry
@ 2007-08-13  2:31     ` Eli Zaretskii
  2007-08-13  5:00     ` Richard Stallman
  1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2007-08-13  2:31 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

> Date: Sun, 12 Aug 2007 17:54:30 -0500
> From: karl@freefriends.org (Karl Berry)
> Cc: emacs-devel@gnu.org
> 
> I did notice another place where it happens in 22.1, though: a simple
> M-x shows the "M-x " prompt in blue (in emacs-under-x), likewise other
> prompts (e.g., "Eval: " after M-x eval-expression RET).

That's a face called `minibuffer-prompt'; customize it to be as
`default', if you don't want to see it.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54         ` Karl Berry
  2007-08-12 23:15           ` Andreas Schwab
  2007-08-12 23:24           ` Juri Linkov
@ 2007-08-13  2:37           ` Eli Zaretskii
  2007-08-13  5:00           ` Richard Stallman
  2007-08-13 19:56           ` Eli Zaretskii
  4 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2007-08-13  2:37 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

> Date: Sun, 12 Aug 2007 17:54:01 -0500
> From: karl@freefriends.org (Karl Berry)
> Cc: rms@gnu.org, emacs-devel@gnu.org
> 
> Eli's mention of "C-u C-x =" is very helpful, I had missed that in the
> manual.  When I run it in the filenames in the grep output (after -nw
> this time), I see the face listed as "(compilation-info underline
> underline)".  And unfortunately, I have no idea how to translate that
> into a face name to disable without delving into the sources, which is
> what I was doing anyway.  Oh well.  Is there a better way?

Yes: go to the face name and press RET.  You will be presented with
the Custom buffer where you can customize this face.

The face name, btw, is the first part: `compilation-info'.

> Meanwhile, I have also never been able to figure out how to disable an
> individual face (and could find no documentation about it, either).  I
> gather I'm supposed to set whatever-face-symbol to 'default or "default"
> or something?  Can you show me how you do it, please?

One way is to use defface to have the face inherit from `default'.
See the examples in the various *.el files (search for ":inherit").

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 23:15           ` Andreas Schwab
@ 2007-08-13  2:38             ` Eli Zaretskii
  0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2007-08-13  2:38 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel, monnier, rms, karl

> From: Andreas Schwab <schwab@suse.de>
> Date: Mon, 13 Aug 2007 01:15:00 +0200
> Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org
> 
> karl@freefriends.org (Karl Berry) writes:
> 
> > Eli's mention of "C-u C-x =" is very helpful, I had missed that in the
> > manual.  When I run it in the filenames in the grep output (after -nw
> > this time), I see the face listed as "(compilation-info underline
> > underline)".  And unfortunately, I have no idea how to translate that
> > into a face name to disable without delving into the sources, which is
> > what I was doing anyway.  Oh well.  Is there a better way?
> 
> Just click on it.

Or type RET with point on the face's name.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 21:48   ` Karl Berry
@ 2007-08-13  5:00     ` Richard Stallman
  0 siblings, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-13  5:00 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

    Maybe I am using the wrong word, but when I do this:

    $ emacs -q --no-site 
    M-x eval-expression RET (global-font-lock-mode 0) RET
    M-x shell RET pwd RET

    I most definitely do observe fontish things happening:
    - my shell prompt is in a turquoise color.
    - after typing a command (say, "pwd") and hitting RET,
      the command is emboldened.

If someone can reproduce it, he can investigate how it happens.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54   ` Karl Berry
  2007-08-13  2:31     ` Eli Zaretskii
@ 2007-08-13  5:00     ` Richard Stallman
  2007-08-13 23:31       ` Karl Berry
  2007-08-13 23:31       ` Karl Berry
  1 sibling, 2 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-13  5:00 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

    I did notice another place where it happens in 22.1, though: a simple
    M-x shows the "M-x " prompt in blue (in emacs-under-x), likewise other
    prompts (e.g., "Eval: " after M-x eval-expression RET).

That is not font-lock mode.  Emacs uses a different face for the prompt.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54         ` Karl Berry
                             ` (2 preceding siblings ...)
  2007-08-13  2:37           ` Eli Zaretskii
@ 2007-08-13  5:00           ` Richard Stallman
  2007-08-13 19:56           ` Eli Zaretskii
  4 siblings, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-13  5:00 UTC (permalink / raw)
  To: Karl Berry; +Cc: monnier, emacs-devel

    Meanwhile, I have also never been able to figure out how to disable an
    individual face (and could find no documentation about it, either).  I
    gather I'm supposed to set whatever-face-symbol to 'default or "default"
    or something?  Can you show me how you do it, please?

This is documented in the Emacs manual.  There are entire sections on faces.
Did you read them?

    (For example, it occurred to me that another way to achieve my faceless
    desires would be to somehow define "bold", "italic", and so on to all
    map to "default".  No luck with anything I tried in that direction,
    either.)

That is a very bad idea for how to turn off font lock.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 19:53   ` Stefan Monnier
  2007-08-12 21:48     ` Karl Berry
@ 2007-08-13  5:01     ` Richard Stallman
  1 sibling, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-13  5:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, karl

    Because grep relies on compilation-mode, which uses font-lock to do its
    work, so it forcefully enables font-lock.

It seems like a bug for it to work this way.

What it ought to do is enable Font Lock in an internal way, so it will
put on font-lock-face properties.  These properties should be created
regardless of whether Font Lock mode is enabled, but they should
only affect display when Font Lock mode is enabled.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 22:54         ` Karl Berry
                             ` (3 preceding siblings ...)
  2007-08-13  5:00           ` Richard Stallman
@ 2007-08-13 19:56           ` Eli Zaretskii
  4 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2007-08-13 19:56 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

> Date: Sun, 12 Aug 2007 17:54:01 -0500
> From: karl@freefriends.org (Karl Berry)
> Cc: rms@gnu.org, emacs-devel@gnu.org
> 
> Eli's mention of "C-u C-x =" is very helpful, I had missed that in the
> manual.

Btw, how did you search for it in the manual?  Perhaps indexing needs
improvement.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-12 23:24           ` Juri Linkov
@ 2007-08-13 22:14             ` Karl Berry
  2007-08-13 23:27               ` Juri Linkov
  0 siblings, 1 reply; 27+ messages in thread
From: Karl Berry @ 2007-08-13 22:14 UTC (permalink / raw)
  To: juri, emacs-devel

      (mapc (lambda (face) (modify-face face)) (face-list))

Thanks Juri, that's very helpful.  I discovered I don't really want mode
line faces disabled :), so I'm playing with some conditions, but that's
a detail.  And it has to be run after packages get loaded, since of
course it can't disable faces that don't exist yet.  Another detail.  At
least now I know how to shut them off.

Karl

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13 22:14             ` Karl Berry
@ 2007-08-13 23:27               ` Juri Linkov
  0 siblings, 0 replies; 27+ messages in thread
From: Juri Linkov @ 2007-08-13 23:27 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

>       (mapc (lambda (face) (modify-face face)) (face-list))
>
> Thanks Juri, that's very helpful.  I discovered I don't really want mode
> line faces disabled :), so I'm playing with some conditions, but that's
> a detail.  And it has to be run after packages get loaded, since of
> course it can't disable faces that don't exist yet.  Another detail.  At
> least now I know how to shut them off.

I use the following trick to post-process faces immediately after they
get created.  I also modified this code to not reset mode line faces:

(defun my-faces-fix (&optional frame)
  "Fix defined faces."
  (interactive)
  ;; Check if this function is called by `custom-define-hook' from
  ;; `custom-declare-face' where the variable `face' is bound locally.
  (when (boundp 'face)
    (dolist (face (face-list))
      (unless (memq face '(mode-line mode-line-highlight mode-line-inactive))
        ;; Reset all face attributes
        (modify-face face)))))

;; 1. Fix existing faces
(let ((face t)) (my-faces-fix))

;; 2. Call `my-faces-fix' every time some new face gets defined
(add-to-list 'custom-define-hook 'my-faces-fix)

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13  5:00     ` Richard Stallman
@ 2007-08-13 23:31       ` Karl Berry
  2007-08-14  3:26         ` Eli Zaretskii
  2007-08-14 16:06         ` Richard Stallman
  2007-08-13 23:31       ` Karl Berry
  1 sibling, 2 replies; 27+ messages in thread
From: Karl Berry @ 2007-08-13 23:31 UTC (permalink / raw)
  To: emacs-devel

    That is not font-lock mode.  Emacs uses a different face for the prompt.

>From a user's point of view, I can say that this apparently-crucial
distinction between font-lock faces and non-font-lock faces is utterly
obscure (I'll send a separate msg about that), and it just seems weird
that (global-font-lock-mode 0) doesn't turn off everything.  

If you feel it's inappropriate for (global-font-lock-mode 0) to turn off
such things, then how about another feature that turns off all these
colorizations and such things?  As in, (black-and-white-emacs) ...

As I wrote in other msgs, it is quite painful to discover and turn off
all the face names individually.  (E.g., C-u C-x = isn't usable with
minibuffer text, mode lines, etc.)

If this isn't going to happen, then I suggest adding something to the
Font Lock node saying that it does not affect all faces.

karl

P.S. I also noticed that the startup screen and *scratch* buffer text are
colorized, although I was turning off font-lock on the cmd line:
  emacs-22.1 -q --no-site --eval "(global-font-lock-mode 0)"
The mode lines also use gray rather than black and white.
(Not that these particular things are very important to me.)

I imagine these are more instances of non-font-lock faces.  Just
mentioning it for the archives.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13  5:00     ` Richard Stallman
  2007-08-13 23:31       ` Karl Berry
@ 2007-08-13 23:31       ` Karl Berry
  2007-08-13 23:51         ` Stefan Monnier
  2007-08-14 16:06         ` Richard Stallman
  1 sibling, 2 replies; 27+ messages in thread
From: Karl Berry @ 2007-08-13 23:31 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

About documentation and font-lock vs non-font-lock faces.

For instance, the third paragraph of the Faces node says this:

     Emacs uses faces automatically for highlighting, through the work of
  Font Lock mode.

This statement is one of the reasons why I conflated Faces and Font Lock
in the first place.  To me, making the minibuffer text appear in blue,
or the mode line in some kind of reverse video, or grep hits in yellow,
is "highlighting".  Everything that isn't normal text was "highlighting",
in my naive understanding.  Oh well.

I can suggest explicitly stating something like "Emacs also uses faces
in other circumstances, not related to Font Lock".

Also, that node's section title is "Using Multiple Typefaces".  This
also misled me.  Emacs' faces are hardly the same as typographic
typefaces; they are at least as much about, well, highlighting (via bold
or underline or whatever), as about choosing Times Roman
vs. Helvetica.  I suggest that simply "Faces" would be a less misleading
name.  Anything that doesn't use the word "Typeface" would be an
improvement, IMHO.

k

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13 23:31       ` Karl Berry
@ 2007-08-13 23:51         ` Stefan Monnier
  2007-08-14 16:06           ` Richard Stallman
  2007-08-14 16:06         ` Richard Stallman
  1 sibling, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2007-08-13 23:51 UTC (permalink / raw)
  To: Karl Berry; +Cc: rms, emacs-devel

> This statement is one of the reasons why I conflated Faces and Font Lock
> in the first place.

The intention in Emacs-22 is indeed to conflate the two, but it hasn;t been
done consistently.


        Stefan

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13 23:31       ` Karl Berry
@ 2007-08-14  3:26         ` Eli Zaretskii
  2007-08-14 16:06         ` Richard Stallman
  1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2007-08-14  3:26 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

> Date: Mon, 13 Aug 2007 18:31:08 -0500
> From: karl@freefriends.org (Karl Berry)
> 
> As I wrote in other msgs, it is quite painful to discover and turn off
> all the face names individually.  (E.g., C-u C-x = isn't usable with
> minibuffer text, mode lines, etc.)

Did you actually try to use "C-u C-x =" in the minibuffer?  It works
for me.

But I agree that discovering the faces is a job best avoided.

> If you feel it's inappropriate for (global-font-lock-mode 0) to turn off
> such things, then how about another feature that turns off all these
> colorizations and such things?  As in, (black-and-white-emacs) ...

I think it makes a lot of sense to have either global-font-lock-mode
turn off all faces (perhaps with minor exceptions, like mode line and
fringe?) or to have another option to do that in one go.

> P.S. I also noticed that the startup screen and *scratch* buffer text are
> colorized, although I was turning off font-lock on the cmd line:
>   emacs-22.1 -q --no-site --eval "(global-font-lock-mode 0)"

Try doing that in one of the hooks defined by startup.el, it could be
that the command-line args are processed too late for them to have any
effect on the initial display.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13 23:51         ` Stefan Monnier
@ 2007-08-14 16:06           ` Richard Stallman
  0 siblings, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-14 16:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, karl

    > This statement is one of the reasons why I conflated Faces and Font Lock
    > in the first place.

    The intention in Emacs-22 is indeed to conflate the two, but it hasn;t been
    done consistently.

That's true for highlighting of buffers due to major modes, but there
are other kinds of highlighting in Emacs.  For instance, of minibuffer
prompts, and Custom buffers.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13 23:31       ` Karl Berry
  2007-08-13 23:51         ` Stefan Monnier
@ 2007-08-14 16:06         ` Richard Stallman
  1 sibling, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-14 16:06 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

This should make it clearer.  Thanks.

  Most major modes assign faces to the text automatically through the
work of Font Lock mode.  @xref{Font Lock}, for more information about
Font Lock mode and syntactic highlighting.  You can print the current
buffer with the highlighting that appears on your screen using the
command @code{ps-print-buffer-with-faces}.  @xref{PostScript}.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: can't turn off font-lock
  2007-08-13 23:31       ` Karl Berry
  2007-08-14  3:26         ` Eli Zaretskii
@ 2007-08-14 16:06         ` Richard Stallman
  1 sibling, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-08-14 16:06 UTC (permalink / raw)
  To: Karl Berry; +Cc: emacs-devel

    >From a user's point of view, I can say that this apparently-crucial
    distinction between font-lock faces and non-font-lock faces is utterly
    obscure (I'll send a separate msg about that), and it just seems weird
    that (global-font-lock-mode 0) doesn't turn off everything.  

I do not want to eliminate the possibility of highlighting under
explicit program control.  For instance, it makes no sense to turn off
the faces in a Custom buffer.

    If this isn't going to happen, then I suggest adding something to the
    Font Lock node saying that it does not affect all faces.

I don't see anything which suggests it does.  Where did you get that
mistaken idea?  If you show me some text which seems to suggest it,
I can clarify that text.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-08-14 16:06 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200708112124.l7BLOgG19369@f7.net>
2007-08-12 17:56 ` can't turn off font-lock Richard Stallman
2007-08-12 19:53   ` Stefan Monnier
2007-08-12 21:48     ` Karl Berry
2007-08-12 22:11       ` Stefan Monnier
2007-08-12 22:54         ` Karl Berry
2007-08-12 23:15           ` Andreas Schwab
2007-08-13  2:38             ` Eli Zaretskii
2007-08-12 23:24           ` Juri Linkov
2007-08-13 22:14             ` Karl Berry
2007-08-13 23:27               ` Juri Linkov
2007-08-13  2:37           ` Eli Zaretskii
2007-08-13  5:00           ` Richard Stallman
2007-08-13 19:56           ` Eli Zaretskii
2007-08-12 22:44       ` Alfred M. Szmidt
2007-08-13  5:01     ` Richard Stallman
2007-08-12 21:48   ` Karl Berry
2007-08-13  5:00     ` Richard Stallman
2007-08-12 22:54   ` Karl Berry
2007-08-13  2:31     ` Eli Zaretskii
2007-08-13  5:00     ` Richard Stallman
2007-08-13 23:31       ` Karl Berry
2007-08-14  3:26         ` Eli Zaretskii
2007-08-14 16:06         ` Richard Stallman
2007-08-13 23:31       ` Karl Berry
2007-08-13 23:51         ` Stefan Monnier
2007-08-14 16:06           ` Richard Stallman
2007-08-14 16:06         ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).