diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-08-20 23:00:52 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-08-20 23:00:52 -0400 |
commit | 2c34e8dad78b1fc1d1473f320226ffe60510c0ab (patch) | |
tree | 898efd4371b3de0251d1bc903752cbd4a43d8b09 /lisp/font-lock.el | |
parent | 02e5c89e678bf4fa9d29bcc1c4064e44672d7dde (diff) | |
download | emacs-2c34e8dad78b1fc1d1473f320226ffe60510c0ab.tar.gz |
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).
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r-- | lisp/font-lock.el | 13 |
1 files changed, 13 insertions, 0 deletions
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 |