• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/progmodes/

Lines Matching defs:lang

885       ;; Inside a `c-lang-defconst'.
886 `(c-lang-major-mode-is ,mode)
1347 (c-get-lang-constant 'c-nonsymbol-key nil mode)
1572 ;; Language constants are defined with `c-lang-defconst', and their
1575 ;; `c-lang-const'. It's therefore possible to refer to the values of
1577 ;; long as all the relevant `c-lang-defconst' have been loaded when
1578 ;; `c-lang-const' is actually evaluated from somewhere else.
1580 ;; `c-lang-const' forms are also evaluated at compile time and
1584 ;; the `c-lang-defconst' forms don't need to be loaded at all then.
1587 ;; in compiled versions, or if `c-lang-const' is used uncompiled.
1589 ;; Note that the source definitions in a `c-lang-defconst' form are
1595 ;; (`c-lang-defvar') works. That file also contains a lot of
1602 `c-lang-defconst'. MODE is the mode name symbol for the new language,
1617 (defvar c-lang-constants (make-vector 151 0))
1619 ;; defined by `c-lang-defconst' and the evaluated values returned by
1620 ;; `c-lang-const'. It's mostly used at compile time but it's not
1630 (defvar c-lang-const-expansion nil)
1649 (defmacro c-lang-defconst-eval-immediately (form)
1650 "Can be used inside a VAL in `c-lang-defconst' to evaluate FORM
1651 immediately, i.e. at the same time as the `c-lang-defconst' form
1654 ;; `cl-macroexpand-all' inside `c-lang-defconst'.
1657 (defmacro c-lang-defconst (name &rest args)
1670 quoted. `c-lang-defconst-eval-immediately' can however be used inside
1674 made current so that `c-lang-const' without an explicit language can
1679 with `c-lang-const'. Thus it's possible to use `c-lang-const' inside
1686 \(c-lang-const NAME) may be used inside a VAL to refer to the last
1691 one `c-lang-defconst' for each NAME is permitted per file. If there
1693 earlier definition will not affect `c-lang-const' on the same
1696 (let* ((sym (intern (symbol-name name) c-lang-constants))
1697 ;; Make `c-lang-const' expand to a straightforward call to
1698 ;; `c-get-lang-constant' in `cl-macroexpand-all' below.
1709 (c-lang-const-expansion 'call)
1725 (error "No assignments in `c-lang-defconst' for %s" name))
1729 ;; the demand-driven (i.e. reversed) evaluation in `c-lang-const'.
1737 (mapcar (lambda (lang)
1738 (or (symbolp lang)
1741 (intern (concat (symbol-name lang)
1759 ;; `c-lang-defconst-eval-immediately' and to register
1760 ;; dependencies on the `c-lang-const's in VAL.)
1775 (c-define-lang-constant ',name ',bindings
1778 (put 'c-lang-defconst 'lisp-indent-function 1)
1781 (def-edebug-spec c-lang-defconst
1784 (defun c-define-lang-constant (name bindings &optional pre-files)
1785 ;; Used by `c-lang-defconst'.
1787 (let* ((sym (intern (symbol-name name) c-lang-constants))
1791 (error "`c-lang-defconst' must be used in a file"))))
1798 ;; `c-lang-defconst' reverses the bindings, this reverses the
1831 (defmacro c-lang-const (name &optional lang)
1834 \"-mode\" suffix. If used inside `c-lang-defconst' or
1835 `c-lang-defvar', LANG may be left out to refer to the current
1841 (or (symbolp lang)
1842 (error "Not a symbol: %s" lang))
1844 (let ((sym (intern (symbol-name name) c-lang-constants))
1847 (when lang
1848 (setq mode (intern (concat (symbol-name lang) "-mode")))
1852 (symbol-name lang))))
1854 (if (eq c-lang-const-expansion 'immediate)
1858 `',(c-get-lang-constant name nil mode)
1876 ;; `c-get-lang-constant' since it will be compiled in.
1882 (if (or (eq c-lang-const-expansion 'call)
1883 (and (not c-lang-const-expansion)
1892 `(c-get-lang-constant ',name ,@args)
1899 (c-get-lang-constant ',name ,@args))
1900 (c-get-lang-constant ',name ,@args))))))
1902 (defvar c-lang-constants-under-evaluation nil)
1904 (defun c-get-lang-constant (name &optional source-files mode)
1905 ;; Used by `c-lang-const'.
1911 (let* ((sym (intern (symbol-name name) c-lang-constants))
1914 (eval-in-sym (and c-lang-constants-under-evaluation
1915 (caar c-lang-constants-under-evaluation))))
1946 (or (assq sym c-lang-constants-under-evaluation)
1948 ;; Append `c-lang-constants-under-evaluation' even if an
1951 (c-lang-constants-under-evaluation
1952 (cons source-pos c-lang-constants-under-evaluation))
1956 ;; since the `c-lang-const' dependencies can go deep.
1968 c-lang-constants)
1976 c-lang-constants)))
1980 c-lang-constants))
1991 (message "Eval error in the `c-lang-defconst' for `%s' in %s:"
1999 (defun c-find-assignment-for-mode (source-pos mode match-any-lang name)
2005 ;; `c-lang-constants' is returned as a magic value.
2023 ;; next. Due to the check in `c-lang-defconst', we know
2032 (c-lang-constants-under-evaluation nil))
2058 match-any-lang)
2061 c-lang-constants)))
2063 (defun c-lang-major-mode-is (mode)
2065 ;; `c-lang-defconst'. Here we also match the mode(s) against any