aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love1999-11-26 17:41:55 +0000
committerDave Love1999-11-26 17:41:55 +0000
commit019f00d822bb5d7bb87e0e214e76c6977899e75d (patch)
tree779b2f3609a190dc314b0c2c90b2aac8ca1c7896
parent78976e0a1a5cb9d7471655831a7b430beddd975c (diff)
downloademacs-019f00d822bb5d7bb87e0e214e76c6977899e75d.tar.gz
emacs-019f00d822bb5d7bb87e0e214e76c6977899e75d.zip
Doc fixes.
-rw-r--r--lisp/font-lock.el46
1 files changed, 24 insertions, 22 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 9dcb8a3facb..ab3f84f18be 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -287,7 +287,7 @@ decoration for buffers in C++ mode, and level 1 decoration otherwise."
287 (symbol :tag "name")) 287 (symbol :tag "name"))
288 (radio :tag "Decoration" 288 (radio :tag "Decoration"
289 (const :tag "default" nil) 289 (const :tag "default" nil)
290 (const :tag "maximum" t) 290 (const :tag "maximum" t)
291 (integer :tag "level" 1))))) 291 (integer :tag "level" 1)))))
292 :group 'font-lock) 292 :group 'font-lock)
293 293
@@ -454,7 +454,7 @@ and those for buffer-specialised fontification functions,
454 nil nil ((?_ . "w")) beginning-of-defun 454 nil nil ((?_ . "w")) beginning-of-defun
455 (font-lock-mark-block-function . mark-defun))) 455 (font-lock-mark-block-function . mark-defun)))
456 (c++-mode-defaults 456 (c++-mode-defaults
457 '((c++-font-lock-keywords c++-font-lock-keywords-1 457 '((c++-font-lock-keywords c++-font-lock-keywords-1
458 c++-font-lock-keywords-2 c++-font-lock-keywords-3) 458 c++-font-lock-keywords-2 c++-font-lock-keywords-3)
459 nil nil ((?_ . "w")) beginning-of-defun 459 nil nil ((?_ . "w")) beginning-of-defun
460 (font-lock-mark-block-function . mark-defun))) 460 (font-lock-mark-block-function . mark-defun)))
@@ -593,7 +593,7 @@ This is normally set via `font-lock-defaults'.")
593 593
594(defvar font-lock-inhibit-thing-lock nil 594(defvar font-lock-inhibit-thing-lock nil
595 "List of Font Lock mode related modes that should not be turned on. 595 "List of Font Lock mode related modes that should not be turned on.
596Currently, valid mode names as `fast-lock-mode', `jit-lock-mode' and 596Currently, valid mode names are `fast-lock-mode', `jit-lock-mode' and
597`lazy-lock-mode'. This is normally set via `font-lock-defaults'.") 597`lazy-lock-mode'. This is normally set via `font-lock-defaults'.")
598 598
599(defvar font-lock-mode nil) ; Whether we are turned on/modeline. 599(defvar font-lock-mode nil) ; Whether we are turned on/modeline.
@@ -862,7 +862,7 @@ use either \\[customize] or the function `global-font-lock-mode'."
862 862
863(defcustom font-lock-global-modes t 863(defcustom font-lock-global-modes t
864 "*Modes for which Font Lock mode is automagically turned on. 864 "*Modes for which Font Lock mode is automagically turned on.
865Global Font Lock mode is controlled by the `global-font-lock-mode' command. 865Global Font Lock mode is controlled by the command `global-font-lock-mode'.
866If nil, means no modes have Font Lock mode automatically turned on. 866If nil, means no modes have Font Lock mode automatically turned on.
867If t, all modes that support Font Lock mode have it automatically turned on. 867If t, all modes that support Font Lock mode have it automatically turned on.
868If a list, it should be a list of `major-mode' symbol names for which Font Lock 868If a list, it should be a list of `major-mode' symbol names for which Font Lock
@@ -1036,7 +1036,7 @@ The value of this variable is used when Font Lock mode is turned on."
1036 1036
1037;;;###autoload 1037;;;###autoload
1038(defun font-lock-fontify-buffer () 1038(defun font-lock-fontify-buffer ()
1039 "Fontify the current buffer the way `font-lock-mode' would." 1039 "Fontify the current buffer the way the function `font-lock-mode' would."
1040 (interactive) 1040 (interactive)
1041 (let ((font-lock-verbose (or font-lock-verbose (interactive-p)))) 1041 (let ((font-lock-verbose (or font-lock-verbose (interactive-p))))
1042 (funcall font-lock-fontify-buffer-function))) 1042 (funcall font-lock-fontify-buffer-function)))
@@ -1116,7 +1116,7 @@ The value of this variable is used when Font Lock mode is turned on."
1116;; The following must be rethought, since keywords can override fontification. 1116;; The following must be rethought, since keywords can override fontification.
1117; ;; Now scan for keywords, but not if we are inside a comment now. 1117; ;; Now scan for keywords, but not if we are inside a comment now.
1118; (or (and (not font-lock-keywords-only) 1118; (or (and (not font-lock-keywords-only)
1119; (let ((state (parse-partial-sexp beg end nil nil 1119; (let ((state (parse-partial-sexp beg end nil nil
1120; font-lock-cache-state))) 1120; font-lock-cache-state)))
1121; (or (nth 4 state) (nth 7 state)))) 1121; (or (nth 4 state) (nth 7 state))))
1122; (font-lock-fontify-keywords-region beg end)) 1122; (font-lock-fontify-keywords-region beg end))
@@ -1382,8 +1382,8 @@ START should be at the beginning of a line."
1382 (when (or (nth 3 state) (nth 4 state)) 1382 (when (or (nth 3 state) (nth 4 state))
1383 (setq string (nth 3 state) beg (point)) 1383 (setq string (nth 3 state) beg (point))
1384 (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table)) 1384 (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
1385 (put-text-property beg (point) 'face 1385 (put-text-property beg (point) 'face
1386 (if string 1386 (if string
1387 font-lock-string-face 1387 font-lock-string-face
1388 font-lock-comment-face))) 1388 font-lock-comment-face)))
1389 ;; 1389 ;;
@@ -1395,8 +1395,8 @@ START should be at the beginning of a line."
1395 (or (nth 3 state) (nth 4 state)))) 1395 (or (nth 3 state) (nth 4 state))))
1396 (setq string (nth 3 state) beg (nth 8 state)) 1396 (setq string (nth 3 state) beg (nth 8 state))
1397 (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table)) 1397 (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
1398 (put-text-property beg (point) 'face 1398 (put-text-property beg (point) 'face
1399 (if string 1399 (if string
1400 font-lock-string-face 1400 font-lock-string-face
1401 font-lock-comment-face))))) 1401 font-lock-comment-face)))))
1402 1402
@@ -1503,8 +1503,9 @@ START should be at the beginning of a line."
1503;; Various functions. 1503;; Various functions.
1504 1504
1505(defun font-lock-compile-keywords (keywords) 1505(defun font-lock-compile-keywords (keywords)
1506 ;; Compile KEYWORDS into the form (t KEYWORD ...) where KEYWORD is of the 1506 "Compile KEYWORDS into the form (t KEYWORD ...).
1507 ;; form (MATCHER HIGHLIGHT ...) as shown in `font-lock-keywords' doc string. 1507Here KEYWORD is of the form (MATCHER HIGHLIGHT ...) as shown in the
1508`font-lock-keywords' doc string."
1508 (if (eq (car-safe keywords) t) 1509 (if (eq (car-safe keywords) t)
1509 keywords 1510 keywords
1510 (cons t (mapcar 'font-lock-compile-keyword keywords)))) 1511 (cons t (mapcar 'font-lock-compile-keyword keywords))))
@@ -1529,7 +1530,7 @@ START should be at the beginning of a line."
1529 keyword))) 1530 keyword)))
1530 1531
1531(defun font-lock-eval-keywords (keywords) 1532(defun font-lock-eval-keywords (keywords)
1532 ;; Evalulate KEYWORDS if a function (funcall) or variable (eval) name. 1533 "Evalulate KEYWORDS if a function (funcall) or variable (eval) name."
1533 (if (listp keywords) 1534 (if (listp keywords)
1534 keywords 1535 keywords
1535 (font-lock-eval-keywords (if (fboundp keywords) 1536 (font-lock-eval-keywords (if (fboundp keywords)
@@ -1537,15 +1538,16 @@ START should be at the beginning of a line."
1537 (eval keywords))))) 1538 (eval keywords)))))
1538 1539
1539(defun font-lock-value-in-major-mode (alist) 1540(defun font-lock-value-in-major-mode (alist)
1540 ;; Return value in ALIST for `major-mode', or ALIST if it is not an alist. 1541 "Return value in ALIST for `major-mode', or ALIST if it is not an alist.
1541 ;; Structure is ((MAJOR-MODE . VALUE) ...) where MAJOR-MODE may be t. 1542Structure is ((MAJOR-MODE . VALUE) ...) where MAJOR-MODE may be t."
1542 (if (consp alist) 1543 (if (consp alist)
1543 (cdr (or (assq major-mode alist) (assq t alist))) 1544 (cdr (or (assq major-mode alist) (assq t alist)))
1544 alist)) 1545 alist))
1545 1546
1546(defun font-lock-choose-keywords (keywords level) 1547(defun font-lock-choose-keywords (keywords level)
1547 ;; Return LEVELth element of KEYWORDS. A LEVEL of nil is equal to a 1548 "Return LEVELth element of KEYWORDS.
1548 ;; LEVEL of 0, a LEVEL of t is equal to (1- (length KEYWORDS)). 1549A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
1550\(1- (length KEYWORDS))."
1549 (cond ((symbolp keywords) 1551 (cond ((symbolp keywords)
1550 keywords) 1552 keywords)
1551 ((numberp level) 1553 ((numberp level)
@@ -1616,7 +1618,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1616 (setq alist (cdr alist)))))))) 1618 (setq alist (cdr alist))))))))
1617 1619
1618(defun font-lock-unset-defaults () 1620(defun font-lock-unset-defaults ()
1619 "Unset fontification defaults. See `font-lock-set-defaults'." 1621 "Unset fontification defaults. See function `font-lock-set-defaults'."
1620 (setq font-lock-set-defaults nil 1622 (setq font-lock-set-defaults nil
1621 font-lock-keywords nil 1623 font-lock-keywords nil
1622 font-lock-keywords-only nil 1624 font-lock-keywords-only nil
@@ -1666,7 +1668,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1666 "Face name to use for things that should stand out.") 1668 "Face name to use for things that should stand out.")
1667 1669
1668(defvar font-lock-reference-face 'font-lock-constant-face 1670(defvar font-lock-reference-face 'font-lock-constant-face
1669 "This variable is obsolete. Use font-lock-constant-face.") 1671 "This variable is obsolete. Use `font-lock-constant-face'.")
1670 1672
1671;; Originally face attributes were specified via `font-lock-face-attributes'. 1673;; Originally face attributes were specified via `font-lock-face-attributes'.
1672;; Users then changed the default face attributes by setting that variable. 1674;; Users then changed the default face attributes by setting that variable.
@@ -2309,7 +2311,7 @@ See also `c-font-lock-extra-types'.")
2309 (regexp-opt-depth c-type-specs)) 2311 (regexp-opt-depth c-type-specs))
2310 (c-type-names 2312 (c-type-names
2311 `(mapconcat 'identity 2313 `(mapconcat 'identity
2312 (cons 2314 (cons
2313 (,@ (eval-when-compile 2315 (,@ (eval-when-compile
2314 (regexp-opt 2316 (regexp-opt
2315 '("char" "short" "int" "long" "signed" "unsigned" 2317 '("char" "short" "int" "long" "signed" "unsigned"
@@ -2508,7 +2510,7 @@ See also `c++-font-lock-extra-types'.")
2508 (regexp-opt-depth c++-type-specs)) 2510 (regexp-opt-depth c++-type-specs))
2509 (c++-type-names 2511 (c++-type-names
2510 `(mapconcat 'identity 2512 `(mapconcat 'identity
2511 (cons 2513 (cons
2512 (,@ (eval-when-compile 2514 (,@ (eval-when-compile
2513 (regexp-opt 2515 (regexp-opt
2514 '("signed" "unsigned" "short" "long" 2516 '("signed" "unsigned" "short" "long"
@@ -2849,7 +2851,7 @@ See also `java-font-lock-extra-types'.")
2849 ;; Classes immediately followed by an object name. 2851 ;; Classes immediately followed by an object name.
2850 (java-type-names 2852 (java-type-names
2851 `(mapconcat 'identity 2853 `(mapconcat 'identity
2852 (cons 2854 (cons
2853 (,@ (eval-when-compile 2855 (,@ (eval-when-compile
2854 (regexp-opt '("boolean" "char" "byte" "short" "int" "long" 2856 (regexp-opt '("boolean" "char" "byte" "short" "int" "long"
2855 "float" "double" "void")))) 2857 "float" "double" "void"))))