aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAlan Mackenzie2007-01-07 13:36:41 +0000
committerAlan Mackenzie2007-01-07 13:36:41 +0000
commite6a9e5841f6dea9eb0f5567f851ee6cad0dcea4a (patch)
treeff2c3c07fab2f18e72670b07f2233aa19e483c86 /lisp
parentb38be6cc38286f0d6534d199666a4df43e3a43e4 (diff)
downloademacs-e6a9e5841f6dea9eb0f5567f851ee6cad0dcea4a.tar.gz
emacs-e6a9e5841f6dea9eb0f5567f851ee6cad0dcea4a.zip
(c-operators, c-filter-ops): Amend doc-string and comments.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-langs.el40
1 files changed, 24 insertions, 16 deletions
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."
208 ;; Some helper functions used when building the language constants. 208 ;; Some helper functions used when building the language constants.
209 209
210 (defun c-filter-ops (ops opgroup-filter op-filter &optional xlate) 210 (defun c-filter-ops (ops opgroup-filter op-filter &optional xlate)
211 ;; Used to filter operators from the list OPS in a DWIM:ey way: 211 ;; Extract a subset of the operators in the list OPS in a DWIM:ey
212 ;; OPS either has the structure of `c-operators', as a single 212 ;; way. The return value is a plain list of operators:
213 ;;
214 ;; OPS either has the structure of `c-operators', is a single
213 ;; group in `c-operators', or is a plain list of operators. 215 ;; group in `c-operators', or is a plain list of operators.
214 ;; OPGROUP-FILTER is used filter out the operator groups. It can 216 ;;
215 ;; be t to choose all groups, a list of the group type symbols to 217 ;; OPGROUP-FILTER specifies how to select the operator groups. It
216 ;; accept, or a function which will be called with the group 218 ;; can be t to choose all groups, a list of group type symbols
217 ;; symbol for each group and should return non-nil for those to 219 ;; (such as 'prefix) to accept, or a function which will be called
218 ;; include. OP-FILTER filters the individual operators in each 220 ;; with the group symbol for each group and should return non-nil
219 ;; group. It can be t to choose all operators, a regexp to test 221 ;; if that group is to be included.
220 ;; against each operator, or a function which will be called for 222 ;;
221 ;; each operator and should return non-nil for those to include. 223 ;; OP-FILTER filters the individual operators in each group. It
224 ;; can be t to choose all operators, a regexp to test against each
225 ;; operator, or a function which will be called for each operator
226 ;; and should return non-nil for those to include.
227 ;;
222 ;; If XLATE is given, it's a function which is called for each 228 ;; If XLATE is given, it's a function which is called for each
223 ;; matching operator and its return value is collected instead. 229 ;; matching operator and its return value is collected instead.
224 ;; If it returns a list, the elements are spliced directly into 230 ;; If it returns a list, the elements are spliced directly into
225 ;; the final result, which is returned as a list with duplicates 231 ;; the final result, which is returned as a list with duplicates
226 ;; removed using `equal'. `c-mode-syntax-table' for the current 232 ;; removed using `equal'.
227 ;; mode is in effect during the whole procedure. 233 ;;
234 ;; `c-mode-syntax-table' for the current mode is in effect during
235 ;; the whole procedure.
228 (unless (listp (car-safe ops)) 236 (unless (listp (car-safe ops))
229 (setq ops (list ops))) 237 (setq ops (list ops)))
230 (cond ((eq opgroup-filter t) 238 (cond ((eq opgroup-filter t)
@@ -719,11 +727,11 @@ expression."
719(c-lang-defconst c-operators 727(c-lang-defconst c-operators
720 "List describing all operators, along with their precedence and 728 "List describing all operators, along with their precedence and
721associativity. The order in the list corresponds to the precedence of 729associativity. The order in the list corresponds to the precedence of
722the operators: The operators in each element is a group with the same 730the operators: The operators in each element are a group with the same
723precedence, and the group has higher precedence than the groups in all 731precedence, and the group has higher precedence than the groups in all
724following elements. The car of each element describes the type of of 732following elements. The car of each element describes the type of the
725the operator group, and the cdr is a list of the operator tokens in 733operator group, and the cdr is a list of the operator tokens in it.
726it. The operator group types are: 734The operator group types are:
727 735
728'prefix Unary prefix operators. 736'prefix Unary prefix operators.
729'postfix Unary postfix operators. 737'postfix Unary postfix operators.