unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: JD Smith <jdsmith@as.arizona.edu>
Subject: Re: Font-lock in COMINT modes
Date: Thu, 07 Dec 2006 11:00:30 -0700	[thread overview]
Message-ID: <pan.2006.12.07.18.00.29.786753@as.arizona.edu> (raw)
In-Reply-To: pan.2006.12.07.00.57.36.274572@as.arizona.edu


Here is the change which altered the default behavior in comint modes. 

----------------------------
revision 1.348
date: 2006-09-28 19:09:19 +0000;  author: rms;  state: Exp;  lines: +4 -1
(comint-mode): Bind font-lock-defaults non-nil.
----------------------------

If font-lock-defaults is left nil instead of being explicitly set to
'(nil) as it now is, keywords-only is implicitly true, and strings and
comments are not fontified by default.  With this change, strings and
comments are fontified by default in all comint modes (unless they set
font-lock-defaults on their own).

This patch would restore the earlier behavior.  Since I'm uncertain
whether '(nil) was intended to nullify keywords-only, I'm not sure if the
patch is appropriate (i.e. is '(nil t) practically any different from nil).

*** comint.el	28 Nov 2006 11:25:56 -0700	1.350
--- comint.el	07 Dec 2006 10:54:48 -0700	
***************
*** 653,659 ****
    (make-local-variable 'comint-accum-marker)
    (setq comint-accum-marker (make-marker))
    (make-local-variable 'font-lock-defaults)
!   (setq font-lock-defaults '(nil))
    (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
    ;; This behavior is not useful in comint buffers, and is annoying
    (set (make-local-variable 'next-line-add-newlines) nil))
--- 653,659 ----
    (make-local-variable 'comint-accum-marker)
    (setq comint-accum-marker (make-marker))
    (make-local-variable 'font-lock-defaults)
!   (setq font-lock-defaults '(nil t))
    (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
    ;; This behavior is not useful in comint buffers, and is annoying
    (set (make-local-variable 'next-line-add-newlines) nil))

  parent reply	other threads:[~2006-12-07 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  0:57 Font-lock in COMINT modes JD Smith
2006-12-07 16:38 ` JD Smith
2006-12-07 18:00 ` JD Smith [this message]
2006-12-09  1:26   ` Richard Stallman
2006-12-09  2:15     ` JD Smith
2006-12-09  4:02       ` Stefan Monnier
2006-12-11 16:22         ` JD Smith
2006-12-12 14:29           ` Richard Stallman
     [not found]             ` <87vekaf780.fsf@stupidchicken.com>
2006-12-18 16:00               ` Richard Stallman
2006-12-18 16:36                 ` Chong Yidong
2006-12-18 20:38                   ` Stefan Monnier
2006-12-20 13:00                     ` Richard Stallman
2006-12-20 22:06                       ` Stefan Monnier
2006-12-09 18:25       ` Richard Stallman

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=pan.2006.12.07.18.00.29.786753@as.arizona.edu \
    --to=jdsmith@as.arizona.edu \
    /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).