emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fontification in ' *' buffers.


From: Michaël Cadilhac
Subject: Fontification in ' *' buffers.
Date: Thu, 23 Aug 2007 19:16:51 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

I may more or less understand why buffers which names start with a space
are not fontified, but I happen to have downloaded files misnamed with
one of those leading spaces, and was surprised that the fontification
wasn't made.

This is a minor issue, but shouldn't we check if we're in a file before?

Index: font-core.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/font-core.el,v
retrieving revision 1.46
diff -c -r1.46 font-core.el
*** font-core.el        26 Jul 2007 05:26:24 -0000      1.46
--- font-core.el        23 Aug 2007 17:13:45 -0000
***************
*** 144,151 ****
  `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) ?\s))
      (setq font-lock-mode nil))
    (funcall font-lock-function font-lock-mode)
    ;; Arrange to unfontify this buffer if we change major mode later.
--- 144,153 ----
  `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)
!   ;; and not a file.
!   (when (or noninteractive (and (eq (aref (buffer-name) 0) ?\s)
!                               (not buffer-file-name)))
      (setq font-lock-mode nil))
    (funcall font-lock-function font-lock-mode)
    ;; Arrange to unfontify this buffer if we change major mode later.

-- 
 |   Michaël `Micha' Cadilhac       |  Un certain Blaise Pascal              |
 |   http://michael.cadilhac.name   |    etc... etc...                       |
 |   JID/MSN:                       |  -- Prévert (Les paris stupides)       |
 `----  address@hidden  |                                   -  --'

Attachment: pgpsXGX5HQtEE.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]