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

Lines Matching +defs:face +defs:or +defs:list

13 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; the Free Software Foundation; either version 2, or (at your option)
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;; statements can be inserted with one command or abbrev. Completion is
59 ;; By changing this one variable you can increase or decrease how much
77 ;; current line's indentation. You can enter a number or one of a
79 ;; or its negative, or half it, or twice it, etc. If you've used
95 ;; if there are any conflicts found or if `sh-popup-occur-buffer' is
124 ;; to reload them in another buffer or at another point in time.
134 ;; Indentation variables - buffer local or global?
202 (defvar font-lock-comment-face)
204 (defvar font-lock-string-face)
281 (or
283 ;; the executable extension, so comparisons with the list of
291 (if (or (null shell)
352 (or (symbolp shell)
354 (or (cdr (assq shell sh-alias-alist))
404 (defun sh-mode-syntax-table (table &rest list)
407 (while list
408 (modify-syntax-entry (pop list) (pop list) table))
583 Any quote characters or leading whitespace in the word are
660 Note that on some systems not all builtins are available or some are
680 "*List of keywords that may be immediately followed by a builtin or keyword.
683 flow of control or syntax. See `sh-feature'."
831 (put 'sh-heredoc-face 'face-alias 'sh-heredoc)
832 (defvar sh-heredoc-face 'sh-heredoc)
834 (defface sh-escaped-newline '((t :inherit font-lock-string-face))
842 font-lock-variable-name-face))
846 font-lock-variable-name-face))
853 font-lock-variable-name-face)
855 ("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face)
857 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
859 1 font-lock-negation-char-face))
863 ;; Using font-lock-string-face here confuses sh-get-indent-info.
865 ("\\\\[^A-Za-z0-9]" 0 font-lock-string-face)
867 font-lock-variable-name-face))
869 ("%{?\\(\\sw+\\)" 1 font-lock-keyword-face))
871 ("^\\(\\sw+\\):" 1 font-lock-variable-name-face)))
889 ;; possible (because we bump into EOB or the search bound), then we should
922 (not (sh-in-comment-or-string (match-beginning 0))))
932 (sh-in-comment-or-string (point)))))
936 ((not (or start (save-excursion (re-search-forward sre nil t))))
937 ;; There's no <<EOF either before or after us,
952 (unless (or (memq (char-before start) '(?< ?>))
953 (sh-in-comment-or-string start))
967 (if (or (nth 5 ppss) (> (count-lines start (point)) 1))
993 ;; bingo we have a $( or a ` inside a ""
1000 (seen nil) ;; list of important positions
1006 ;; ` => increase or decrease nesting level based on bq flag
1030 (setq data (list (current-buffer)))
1049 (or (/= 0 (skip-syntax-backward "w_"))
1080 ;; The list of special chars is taken from the single-unix spec
1102 (defun sh-font-lock-syntactic-face-function (state)
1106 (if (eq q ?\`) 'sh-quoted-exec font-lock-string-face)
1107 sh-heredoc-face)
1108 font-lock-comment-face)))
1162 Can be set to a number, or to nil which means leave it as is."
1201 (defconst sh-symbol-list
1221 ,@ sh-symbol-list
1225 (defconst sh-number-or-symbol-list
1229 sh-symbol-list))
1233 :type `(choice ,@ sh-number-or-symbol-list )
1238 :type `(choice ,@ sh-number-or-symbol-list )
1243 :type `(choice ,@ sh-number-or-symbol-list )
1249 does not affect the `else', `elif' or `fi' statements themselves."
1250 :type `(choice ,@ sh-number-or-symbol-list )
1255 :type `(choice ,@ sh-number-or-symbol-list )
1261 `while', `until', `for', `repeat' or `select' statement."
1262 :type `(choice ,@ sh-number-or-symbol-list)
1269 `while', `until', `for', `repeat' or `select' statement."
1270 :type `(choice ,@ sh-number-or-symbol-list)
1277 loop statement (e.g., `until', `while' or `for').
1279 :type `(choice ,@ sh-number-or-symbol-list)
1289 :type `(choice ,@ sh-number-or-symbol-list)
1295 :type `(choice ,@ sh-number-or-symbol-list)
1301 :type `(choice ,@ sh-number-or-symbol-list)
1307 :type `(choice ,@ sh-number-or-symbol-list)
1311 "*How much to indent after a line with an opening parenthesis or brace.
1313 :type `(choice ,@ sh-number-or-symbol-list)
1318 :type `(choice ,@ sh-number-or-symbol-list)
1326 :type `(choice ,@ sh-number-or-symbol-list)
1332 :type `(choice ,@ sh-number-or-symbol-list)
1373 (defconst sh-var-list
1391 "A list of variables used by script mode to control indentation.
1392 This list is used when switching between buffer-local and global
1453 Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``.
1489 (or (eolp) (newline) (indent-relative)))
1505 (font-lock-syntactic-face-function
1506 . sh-font-lock-syntactic-face-function))
1515 ;; Parse or insert magic number for exec, and set all variables depending
1551 (lambda (list)
1553 1 font-lock-variable-name-face)
1555 ,@list
1571 (2 font-lock-keyword-face nil t)
1572 (6 font-lock-builtin-face))
1575 2 font-lock-keyword-face)
1587 "A buffer-local, since it is shell-type dependent, list of keywords.")
1590 ;; This is used to set `sh-kw-alist' which is a list of sublists each
1600 ;; If it returned false or the keyword was not found in the table,
1651 (interactive (list (completing-read (format "Shell \(default %s\): "
1661 sh-shell (or (cdr (assq sh-shell sh-alias-alist))
1711 If ALIST isn't a list where every element is a cons, it is returned as is.
1718 - If the value thus looked up is a list starting with `sh-append',
1719 we call the function `sh-append' with the rest of the list as
1721 list is not used as-is; instead, we look it up recursively
1728 (or (if (consp alist)
1762 ;;(defun sh-abbrevs (ancestor &rest list)
1765 ;;table or a list of (NAME1 EXPANSION1 ...). In addition it will define abbrevs
1767 ;;EXPANSION may be either a string or a skeleton command."
1768 ;; (or (if (boundp sh-shell)
1772 ;; (nconc list ancestor))
1776 ;; (or (eq atom 0)
1782 ;; (while list
1784 ;; (car list)
1785 ;; (if (stringp (car (cdr list)))
1786 ;; (car (cdr list))
1788 ;; (if (symbolp (car (cdr list)))
1789 ;; (car (cdr list))))
1790 ;; (setq list (cdr (cdr list)))))
1794 (defun sh-append (ancestor &rest list)
1795 "Return list composed of first argument (a list) physically appended to rest."
1796 (nconc list ancestor))
1799 (defun sh-modify (skeleton &rest list)
1802 (while list
1803 (setcar (or (nthcdr (car list) skeleton)
1804 (error "Index %d out of bounds" (car list)))
1805 (car (cdr list)))
1806 (setq list (nthcdr 2 list)))
1821 (or (eolp)
1856 (let (buffer-undo-list)
1869 (or (< (length var) sh-remember-variable-min)
1897 (mapcar 'make-local-variable sh-var-list)
1904 (mapcar 'kill-local-variable sh-var-list)
1906 (mapcar 'make-local-variable sh-var-list)))
1931 sh-symbol-list "\n\t"))))
1952 (defun sh-in-comment-or-string (start)
1953 "Return non-nil if START is in a comment or string."
1956 (or (nth 3 state) (nth 4 state)))))
1971 (list '(+ sh-indent-after-if)))
1975 ;; (list "aligned to if")
1976 (list "aligned to if" '(+ sh-indent-for-else))
1982 (list '(+ sh-indent-after-if))
1987 (list "aligned to if" '(+ sh-indent-for-fi))
2003 (list '(+ sh-indent-for-then))
2009 (list '(+ sh-indent-after-if))
2018 (or
2022 (list '(+ sh-indent-after-function))
2023 (list '(+ sh-indent-after-open)))
2029 (list "aligned to opening paren")))
2039 (list '(+ sh-indent-for-case-label))
2044 (list "aligned to matching case")))
2048 (list "matching case")))
2052 (list '(+ sh-indent-for-case-alt))))
2056 (list '(+ sh-indent-for-case-label))))
2063 (forward-sexp (or arg 1))
2076 (list "aligned to do stmt" '(+ sh-indent-for-done))))
2080 (list "previous done")))
2084 (list '(+ sh-indent-for-do))))
2096 (list '(+ sh-indent-after-loop-construct)))
2099 (list '(+ sh-indent-after-do)))
2111 (list '(+ sh-indent-after-switch))
2112 ;; (list '(+ sh-indent-for-case-label))
2116 (list '(+ sh-indent-after-case)))
2131 This is a list. nil means the line is to be left as is.
2132 Otherwise it contains one or more of the following sublists:
2139 \(- VAR\) Get the value of variable VAR and add to or subtract from
2160 ((or (and (boundp 'font-lock-string-face) (not (bobp))
2161 (eq (get-text-property (1- (point)) 'face)
2162 font-lock-string-face))
2163 (eq (get-text-property (point) 'face) sh-heredoc-face))
2169 (setq result (list '(= sh-indent-comment)))
2186 ;; preceded by a SPC or a TAB it means that the line
2189 (list '(= nil))
2194 (list '(+ sh-indent-for-continuation))))
2238 (or (bobp)
2248 (list "aligned to opening paren")))
2263 ;; (or (eq t (car val))
2281 ;; was: (setq result (append result (list (list t align-point))))
2282 (setq result (append (list (list t align-point)) result))
2286 (or result
2287 (setq result (list (if prev-line-end
2288 (list t prev-line-end)
2289 (list '= 'sh-first-lines-indent)))))
2308 (or info
2320 ;; so it is a list
2334 (error "sh-get-indent-var-for-line invalid list elt: %s" elt)))
2337 (or result
2339 (or result
2368 (equal (get-text-property (1- (point)) 'face)
2369 sh-heredoc-face))
2370 (let ((p1 (previous-single-property-change (1- (point)) 'face)))
2387 "Return the address of the previous stmt or nil."
2391 ;; appears in a string or quote. This way is slower, but (I think) safer.
2420 (if (or (and (bolp) (not (sh-this-is-a-continuation)))
2434 (or found
2484 ;; skipped over. Maybe we skipped too far (e.g. past a `do' or
2536 (setq depth (or depth 1))
2567 It can also return t or nil.
2628 (or info
2674 ((or (null base-value)(null ofs))
2836 ;;; or vice-versa.
2883 '(mouse-face highlight
2902 ;; (defun what-i-learned (list)
2903 ;; (let ((p list))
2934 Otherwise, sh-basic-offset may or may not be changed, according
2939 with an alist of variables learned. This feature may be changed or
2947 (let ((learned-var-list nil)
2997 (if (setq previous-set-info (assoc var learned-var-list))
3011 ;; (delete previous-set-info learned-var-list)
3013 (list (symbol-value var) (point)))
3016 (setq learned-var-list
3017 (append (list (list var (symbol-value var)
3019 learned-var-list)))
3034 (or (eq comment-col curr-indent)
3042 "at %s learned-var-list is %s" (point) learned-var-list)
3088 (setq learned-var-list
3089 (append (list (list 'sh-basic-offset
3092 learned-var-list))
3106 (setq learned-var-list
3107 (append (list (list 'sh-indent-comment comment-col (point-max)))
3108 learned-var-list))
3115 (dolist (learned-var (reverse learned-var-list))
3121 (dolist (learned-var (reverse learned-var-list))
3137 (run-hook-with-args 'sh-learned-buffer-hook learned-var-list)
3138 (if (or sh-popup-occur-buffer (> num-diffs 0))
3149 list of numbers - no obvious one, here is a list of one or more
3169 (setq x (append x (list (cons i (aref totals i))))))
3191 ;; 1st & 2nd together >= 50% - return a list
3195 (setq result (append result (list (car (car p)))))
3211 "A list of all known shell indentation styles.")
3217 - - it was called interactively with a prefix argument, or
3221 (list
3226 sh-var-list)))
3230 (not (y-or-n-p "This style exists. Overwrite it? ")))
3239 (interactive (list (completing-read
3251 (interactive (list
3263 ;; You are welcome to add the syntax or even completely new statements as
3392 CODE can be nil, t or `lambda'.
3393 nil means to return the best completion of STRING, or nil if there is none.
3394 t means to return a list of all possible completions of STRING.
3398 (or sh-shell-variables-initialized
3415 (list (completing-read "Variable: " 'sh-add-completer)
3676 (or arg
3687 (or (eolp) (looking-at "[ \t]") (insert ?\s))
3721 (or (zerop (skip-chars-backward " \t"))
3742 "Insert, align, or delete end-of-line backslashes on the lines in the region.
3778 ;; Add or remove backslashes on all the lines.
3803 (or (bolp)