# HG changeset patch # User Alan Mackenzie # Date 1168177001 0 # Node ID b9690e9e273dbcdc6e36656f2878fe7cb75c3542 # Parent 8c012d019e68de11703bf2832f01c6fa4ca5b48a (c-operators, c-filter-ops): Amend doc-string and comments. diff -r 8c012d019e68 -r b9690e9e273d lisp/progmodes/cc-langs.el --- a/lisp/progmodes/cc-langs.el Sun Jan 07 13:35:07 2007 +0000 +++ b/lisp/progmodes/cc-langs.el Sun Jan 07 13:36:41 2007 +0000 @@ -208,23 +208,31 @@ ;; Some helper functions used when building the language constants. (defun c-filter-ops (ops opgroup-filter op-filter &optional xlate) - ;; Used to filter operators from the list OPS in a DWIM:ey way: - ;; OPS either has the structure of `c-operators', as a single + ;; Extract a subset of the operators in the list OPS in a DWIM:ey + ;; way. The return value is a plain list of operators: + ;; + ;; OPS either has the structure of `c-operators', is a single ;; group in `c-operators', or is a plain list of operators. - ;; OPGROUP-FILTER is used filter out the operator groups. It can - ;; be t to choose all groups, a list of the group type symbols to - ;; accept, or a function which will be called with the group - ;; symbol for each group and should return non-nil for those to - ;; include. OP-FILTER filters the individual operators in each - ;; group. It can be t to choose all operators, a regexp to test - ;; against each operator, or a function which will be called for - ;; each operator and should return non-nil for those to include. + ;; + ;; OPGROUP-FILTER specifies how to select the operator groups. It + ;; can be t to choose all groups, a list of group type symbols + ;; (such as 'prefix) to accept, or a function which will be called + ;; with the group symbol for each group and should return non-nil + ;; if that group is to be included. + ;; + ;; OP-FILTER filters the individual operators in each group. It + ;; can be t to choose all operators, a regexp to test against each + ;; operator, or a function which will be called for each operator + ;; and should return non-nil for those to include. + ;; ;; If XLATE is given, it's a function which is called for each ;; matching operator and its return value is collected instead. ;; If it returns a list, the elements are spliced directly into ;; the final result, which is returned as a list with duplicates - ;; removed using `equal'. `c-mode-syntax-table' for the current - ;; mode is in effect during the whole procedure. + ;; removed using `equal'. + ;; + ;; `c-mode-syntax-table' for the current mode is in effect during + ;; the whole procedure. (unless (listp (car-safe ops)) (setq ops (list ops))) (cond ((eq opgroup-filter t) @@ -719,11 +727,11 @@ (c-lang-defconst c-operators "List describing all operators, along with their precedence and associativity. The order in the list corresponds to the precedence of -the operators: The operators in each element is a group with the same +the operators: The operators in each element are a group with the same precedence, and the group has higher precedence than the groups in all -following elements. The car of each element describes the type of of -the operator group, and the cdr is a list of the operator tokens in -it. The operator group types are: +following elements. The car of each element describes the type of the +operator group, and the cdr is a list of the operator tokens in it. +The operator group types are: 'prefix Unary prefix operators. 'postfix Unary postfix operators.