From: Alan Mackenzie Date: Sun, 7 Jan 2007 13:36:41 +0000 (+0000) Subject: (c-operators, c-filter-ops): Amend doc-string and comments. X-Git-Tag: emacs-pretest-22.0.93~219 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6a9e5841f6dea9eb0f5567f851ee6cad0dcea4a;p=emacs.git (c-operators, c-filter-ops): Amend doc-string and comments. --- diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index b3c0a578649..6907b56d6c6 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -208,23 +208,31 @@ the evaluated constant value at compile time." ;; 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 @@ expression." (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.