[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/font-core.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/font-core.el |
Date: |
Tue, 10 Sep 2002 12:43:48 -0400 |
Index: emacs/lisp/font-core.el
diff -c emacs/lisp/font-core.el:1.16 emacs/lisp/font-core.el:1.17
*** emacs/lisp/font-core.el:1.16 Mon Sep 9 19:22:49 2002
--- emacs/lisp/font-core.el Tue Sep 10 12:43:48 2002
***************
*** 220,225 ****
--- 220,237 ----
(defun font-lock-change-mode ()
(font-lock-mode -1))
+ (defun font-lock-defontify ()
+ "Clear out all `font-lock-face' properties in current buffer.
+ A major mode that uses `font-lock-face' properties should put
+ this function onto `change-major-mode-hook'."
+ (let ((modp (buffer-modified-p))
+ (inhibit-read-only t))
+ (save-restriction
+ (widen)
+ (remove-list-of-text-properties (point-min) (point-max)
+ '(font-lock-face)))
+ (set-buffer-modified-p modp)))
+
(defun font-lock-default-function (mode)
;; Turn on Font Lock mode.
(when mode