[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog hi-lock.el startup.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog hi-lock.el startup.el |
Date: |
Thu, 23 Apr 2009 01:34:59 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/04/23 01:34:58
Modified files:
lisp : ChangeLog hi-lock.el startup.el
Log message:
* hi-lock.el (hi-lock--inhibit-font-lock-hook): New var.
(hi-lock-set-pattern, hi-lock-font-lock-hook): Use it (Bug#3068).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15606&r2=1.15607
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/hi-lock.el?cvsroot=emacs&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/startup.el?cvsroot=emacs&r1=1.527&r2=1.528
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15606
retrieving revision 1.15607
diff -u -b -r1.15606 -r1.15607
--- ChangeLog 21 Apr 2009 07:19:01 -0000 1.15606
+++ ChangeLog 23 Apr 2009 01:34:54 -0000 1.15607
@@ -1,3 +1,8 @@
+2009-04-23 Chong Yidong <address@hidden>
+
+ * hi-lock.el (hi-lock--inhibit-font-lock-hook): New var.
+ (hi-lock-set-pattern, hi-lock-font-lock-hook): Use it (Bug#3068).
+
2009-04-21 Martin Rudalics <address@hidden>
* diff-mode.el (diff-find-source-location): Don't call
Index: hi-lock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/hi-lock.el,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- hi-lock.el 5 Jan 2009 03:19:18 -0000 1.56
+++ hi-lock.el 23 Apr 2009 01:34:58 -0000 1.57
@@ -564,9 +564,18 @@
'face-name-history
(cdr hi-lock-face-defaults))))
+(defvar hi-lock--inhibit-font-lock-hook nil
+ "Inhibit the action of `hi-lock-font-lock-hook'.
+This is used by `hi-lock-set-pattern'.")
+
(defun hi-lock-set-pattern (regexp face)
"Highlight REGEXP with face FACE."
- (let ((pattern (list regexp (list 0 (list 'quote face) t))))
+ (let ((pattern (list regexp (list 0 (list 'quote face) t)))
+ ;; The call to `font-lock-add-keywords' below might disable
+ ;; and re-enable font-lock mode. If so, we don't want
+ ;; `hi-lock-font-lock-hook' to run. This can be removed once
+ ;; Bug#635 is fixed. -- cyd
+ (hi-lock--inhibit-font-lock-hook t))
(unless (member pattern hi-lock-interactive-patterns)
(font-lock-add-keywords nil (list pattern) t)
(push pattern hi-lock-interactive-patterns)
@@ -632,11 +641,12 @@
(defun hi-lock-font-lock-hook ()
"Add hi-lock patterns to font-lock's."
+ (unless hi-lock--inhibit-font-lock-hook
(if font-lock-mode
(progn
(font-lock-add-keywords nil hi-lock-file-patterns t)
(font-lock-add-keywords nil hi-lock-interactive-patterns t))
- (hi-lock-mode -1)))
+ (hi-lock-mode -1))))
(defvar hi-lock-string-serialize-hash
(make-hash-table :test 'equal)
Index: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.527
retrieving revision 1.528
diff -u -b -r1.527 -r1.528
--- startup.el 20 Feb 2009 14:24:57 -0000 1.527
+++ startup.el 23 Apr 2009 01:34:58 -0000 1.528
@@ -499,7 +499,8 @@
(delete (concat "PWD=" pwd)
process-environment)))))
(setq default-directory (abbreviate-file-name default-directory))
- (let ((menubar-bindings-done nil))
+ (let ((menubar-bindings-done nil)
+ (old-face-font-rescale-alist face-font-rescale-alist))
(unwind-protect
(command-line)
;; Do this again, in case .emacs defined more abbreviations.
@@ -540,6 +541,11 @@
(not (and initial-window-system
(not noninteractive)
(not (eq initial-window-system 'pc)))))
+ ;; If face-font-rescale-alist has changed, reload the
+ ;; default font.
+ (unless (eq face-font-rescale-alist
+ old-face-font-rescale-alist)
+ (set-face-attribute 'default nil :font (font-spec)))
;; Modify the initial frame based on what .emacs puts into
;; ...-frame-alist.
(if (fboundp 'frame-notice-user-settings)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog hi-lock.el startup.el,
Chong Yidong <=