From: Chong Yidong Date: Sun, 21 Aug 2011 03:00:52 +0000 (-0400) Subject: Add some docstrings to font-lock.el. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~70^2~15^2~25 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2c34e8dad78b1fc1d1473f320226ffe60510c0ab;p=emacs.git Add some docstrings to font-lock.el. * font-lock.el (font-lock-fontify-region) (font-lock-unfontify-region, font-lock-default-fontify-buffer) (font-lock-default-unfontify-buffer) (font-lock-default-fontify-region) (font-lock-default-unfontify-region): Add docstrings (Bug#8624). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ef01205bd2..edb2fc2cd9f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2011-08-21 Chong Yidong + * font-lock.el (font-lock-fontify-region) + (font-lock-unfontify-region, font-lock-default-fontify-buffer) + (font-lock-default-unfontify-buffer) + (font-lock-default-fontify-region) + (font-lock-default-unfontify-region): Add docstrings (Bug#8624). + * progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 9cf889e1aec..22c716ae67e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1018,14 +1018,20 @@ The region it returns may start or end in the middle of a line.") (funcall font-lock-unfontify-buffer-function)) (defun font-lock-fontify-region (beg end &optional loudly) + "Fontify the text between BEG and END. +If LOUDLY is non-nil, print status messages while fontifying. +This works by calling `font-lock-fontify-region-function'." (font-lock-set-defaults) (funcall font-lock-fontify-region-function beg end loudly)) (defun font-lock-unfontify-region (beg end) + "Unfontify the text between BEG and END. +This works by calling `font-lock-unfontify-region-function'." (save-buffer-state (funcall font-lock-unfontify-region-function beg end))) (defun font-lock-default-fontify-buffer () + "Fontify the whole buffer using `font-lock-fontify-buffer-function'." (let ((verbose (if (numberp font-lock-verbose) (> (buffer-size) font-lock-verbose) font-lock-verbose))) @@ -1045,6 +1051,7 @@ The region it returns may start or end in the middle of a line.") (quit (font-lock-unfontify-buffer))))))) (defun font-lock-default-unfontify-buffer () + "Unfontify the whole buffer using `font-lock-unfontify-region-function'." ;; Make sure we unfontify etc. in the whole buffer. (save-restriction (widen) @@ -1114,6 +1121,9 @@ Put first the functions more likely to cause a change and cheaper to compute.") changed)) (defun font-lock-default-fontify-region (beg end loudly) + "Fontify the text between BEG and END. +If LOUDLY is non-nil, print status messages while fontifying. +This function is the default `font-lock-fontify-region-function'." (save-buffer-state ;; Use the fontification syntax table, if any. (with-syntax-table (or font-lock-syntax-table (syntax-table)) @@ -1162,6 +1172,9 @@ This is used by `font-lock-default-unfontify-region' to decide what properties to clear before refontifying a region.") (defun font-lock-default-unfontify-region (beg end) + "Unfontify the text between BEG and END. +This function is the default value of the variable + `font-lock-unfontify-region-function'." (remove-list-of-text-properties beg end (append font-lock-extra-managed-props