[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Global Font Lock by default
From: |
Luc Teirlinck |
Subject: |
Re: Global Font Lock by default |
Date: |
Tue, 1 Nov 2005 19:33:12 -0600 (CST) |
Here are patches that will enable global-font-lock-mode by default
unless the -D option was specified or unless Emacs is running in batch
mode (but they provide no --no-font-lock or -nfl options). Unlike
previous proposals, they should create no problems with Custom. This
requires a change to `define-global-minor-mode'. Unlike at present,
after my patch to easy-mmode.el, `define-global-minor-mode' will pass
_all_ provided keywords to `define-minor-mode'. This is necessary for
the defcustom, as the present situation shows.
I can install if desired.
===File ~/easy-mmode-diff===================================
*** easy-mmode.el 24 Aug 2005 08:06:37 -0500 1.71
--- easy-mmode.el 01 Nov 2005 17:39:25 -0600
***************
*** 285,305 ****
(pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode))
(group nil)
! (extra-args nil)
(MODE-buffers (intern (concat global-mode-name "-buffers")))
(MODE-enable-in-buffers
(intern (concat global-mode-name "-enable-in-buffers")))
(MODE-check-buffers
(intern (concat global-mode-name "-check-buffers")))
(MODE-cmhh (intern (concat global-mode-name "-cmhh")))
! (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))))
;; Check keys.
! (while (keywordp (car keys))
! (case (pop keys)
! (:extra-args (setq extra-args (pop keys)))
(:group (setq group (nconc group (list :group (pop keys)))))
! (t (setq keys (cdr keys)))))
(unless group
;; We might as well provide a best-guess default group.
--- 285,306 ----
(pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode))
(group nil)
! (extra-keywords nil)
(MODE-buffers (intern (concat global-mode-name "-buffers")))
(MODE-enable-in-buffers
(intern (concat global-mode-name "-enable-in-buffers")))
(MODE-check-buffers
(intern (concat global-mode-name "-check-buffers")))
(MODE-cmhh (intern (concat global-mode-name "-cmhh")))
! (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode")))
! keyw)
;; Check keys.
! (while (keywordp (setq keyw (car keys)))
! (setq keys (cdr keys))
! (case keyw
(:group (setq group (nconc group (list :group (pop keys)))))
! (t (push keyw extra-keywords) (push (pop keys) extra-keywords))))
(unless group
;; We might as well provide a best-guess default group.
***************
*** 317,323 ****
%s is actually not turned on in every buffer but only in those
in which `%s' turns it on."
pretty-name pretty-global-name pretty-name turn-on)
! :global t :extra-args ,extra-args ,@group
;; Setup hook to handle future mode changes and new buffers.
(if ,global-mode
--- 318,324 ----
%s is actually not turned on in every buffer but only in those
in which `%s' turns it on."
pretty-name pretty-global-name pretty-name turn-on)
! :global t ,@group ,@(nreverse extra-keywords)
;; Setup hook to handle future mode changes and new buffers.
(if ,global-mode
============================================================
===File ~/font-core-diff====================================
*** font-core.el 20 Oct 2005 08:28:35 -0500 1.33
--- font-core.el 01 Nov 2005 17:29:48 -0600
***************
*** 293,299 ****
(easy-mmode-define-global-mode
global-font-lock-mode font-lock-mode turn-on-font-lock-if-enabled
! :extra-args (dummy))
;;; End of Global Font Lock mode.
--- 293,301 ----
(easy-mmode-define-global-mode
global-font-lock-mode font-lock-mode turn-on-font-lock-if-enabled
! :extra-args (dummy)
! :initialize 'custom-initialize-safe-default
! :init-value (not (or noninteractive emacs-basic-display)))
;;; End of Global Font Lock mode.
============================================================
===File ~/startup-diff======================================
*** startup.el 30 Oct 2005 08:25:09 -0600 1.383
--- startup.el 01 Nov 2005 17:29:28 -0600
***************
*** 765,770 ****
--- 765,771 ----
(custom-reevaluate-setting 'blink-cursor-mode)
(custom-reevaluate-setting 'normal-erase-is-backspace)
(custom-reevaluate-setting 'tooltip-mode)
+ (custom-reevaluate-setting 'global-font-lock-mode)
;; Register default TTY colors for the case the terminal hasn't a
;; terminal init file.
============================================================
- Re: Global Font Lock by default, (continued)
- Re: Global Font Lock by default, Kim F. Storm, 2005/11/01
- Re: Global Font Lock by default, Chong Yidong, 2005/11/01
- Re: Global Font Lock by default, Kim F. Storm, 2005/11/01
- Re: Global Font Lock by default, Dan Nicolaescu, 2005/11/01
- Re: Global Font Lock by default, Luc Teirlinck, 2005/11/01
- Re: Global Font Lock by default, Luc Teirlinck, 2005/11/01
- Re: Global Font Lock by default, Luc Teirlinck, 2005/11/01
- Re: Global Font Lock by default, Eli Zaretskii, 2005/11/01
- Re: Global Font Lock by default, Eli Zaretskii, 2005/11/01
- Re: Global Font Lock by default, Kim F. Storm, 2005/11/01
- Re: Global Font Lock by default,
Luc Teirlinck <=
- Re: Global Font Lock by default, Richard M. Stallman, 2005/11/02
- Re: Global Font Lock by default, David Kastrup, 2005/11/02
- Re: Global Font Lock by default, Luc Teirlinck, 2005/11/02
- Re: Global Font Lock by default, Richard M. Stallman, 2005/11/03
- Re: Global Font Lock by default, Stefan Monnier, 2005/11/03
- Re: Global Font Lock by default, David Kastrup, 2005/11/03
- Re: Global Font Lock by default, Luc Teirlinck, 2005/11/03
Re: Global Font Lock by default, Romain Francoise, 2005/11/01
Re: Global Font Lock by default, Dan Nicolaescu, 2005/11/01
Re: Global Font Lock by default, Richard M. Stallman, 2005/11/01