From: Alexander Pohoyda <alexander.pohoyda@gmx.net>
Cc: alex@emacswiki.org, hniksic@xemacs.org, monnier@IRO.UMontreal.CA,
rms@gnu.org
Subject: Re: (font-lock-mode 1) does not always force font-lock
Date: 18 Nov 2003 22:13:34 +0100 [thread overview]
Message-ID: <873cclwfb5.fsf@oak.pohoyda.family> (raw)
In-Reply-To: <E1AEH2G-0007BM-2K@fencepost.gnu.org>
Richard Stallman <rms@gnu.org> writes:
> i think that explicit call to font-lock-mode shd apply to all
> buffers. instead global-font-lock-mode should check to avoid temp bufs.
> someone want to do it?
Please excuse me that it took so long.
Here's the patch. Note that it avoids invisible, not temp buffers.
Index: font-core.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/font-core.el,v
retrieving revision 1.23
diff -u -r1.23 font-core.el
--- font-core.el 1 Sep 2003 15:45:12 -0000 1.23
+++ font-core.el 18 Nov 2003 21:02:45 -0000
@@ -149,10 +149,6 @@
your own function which is called when `font-lock-mode' is toggled via
`font-lock-function'. "
nil nil nil
- ;; Don't turn on Font Lock mode if we don't have a display (we're running a
- ;; batch job) or if the buffer is invisible (the name starts with a space).
- (when (or noninteractive (eq (aref (buffer-name) 0) ?\ ))
- (setq font-lock-mode nil))
(funcall font-lock-function font-lock-mode)
;; Arrange to unfontify this buffer if we change major mode later.
(if font-lock-mode
@@ -282,8 +278,14 @@
:group 'font-lock)
(defun turn-on-font-lock-if-enabled ()
- (unless (and (eq (car-safe font-lock-global-modes) 'not)
- (memq major-mode (cdr font-lock-global-modes)))
+ (unless (or
+ ;; we don't have a display (we're running a batch job)
+ noninteractive
+ ;; the buffer is invisible (the name starts with a space)
+ (eq (aref (buffer-name) 0) ?\ )
+ ;; this mode is in the list which is negative
+ (and (eq (car-safe font-lock-global-modes) 'not)
+ (memq major-mode (cdr font-lock-global-modes))))
(let (inhibit-quit)
(turn-on-font-lock))))
--
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44
prev parent reply other threads:[~2003-11-18 21:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m3smlkygno.fsf@hniksic.iskon.hr>
2003-10-23 18:38 ` (font-lock-mode 1) does not always force font-lock Richard Stallman
2003-10-23 22:30 ` Hrvoje Niksic
2003-10-24 5:22 ` Alexander Pohoyda
2003-10-24 9:49 ` Hrvoje Niksic
2003-10-24 19:12 ` Alexander Pohoyda
2003-10-24 20:15 ` Hrvoje Niksic
2003-10-25 7:35 ` Alexander Pohoyda
2003-10-25 9:52 ` Hrvoje Niksic
2003-10-26 11:32 ` Alexander Pohoyda
2003-10-26 16:56 ` Hrvoje Niksic
2003-10-26 19:07 ` Stefan Monnier
2003-10-27 23:44 ` Richard Stallman
2003-10-28 22:09 ` Alexander Pohoyda
2003-11-18 21:13 ` Alexander Pohoyda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873cclwfb5.fsf@oak.pohoyda.family \
--to=alexander.pohoyda@gmx.net \
--cc=alex@emacswiki.org \
--cc=hniksic@xemacs.org \
--cc=monnier@IRO.UMontreal.CA \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).