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

Lines Matching +refs:syntax +refs:table

36 ;; syntax functions with text properties maintained by font-lock makes
120 (not (syntax escape))) ; avoid escaped leading quote
121 (group (optional (any "uUrR"))) ; prefix gets syntax property
123 (group (syntax string-quote)) ; maybe gets property
126 (1 (python-quote-syntax 1))
127 (2 (python-quote-syntax 2))
128 (3 (python-quote-syntax 3)))
133 (defun python-quote-syntax (n)
134 "Put `syntax-table' property correctly on triple quote.
139 ;; the same job as `syntax-ppss' to be correct and it seems to be OK
149 ;; Fixme: """""" goes wrong (due to syntax-ppss not getting the string
156 (let ((syntax (syntax-ppss)))
157 (when (eq t (nth 3 syntax)) ; after unclosed fence
158 (goto-char (nth 8 syntax)) ; fence position
162 (eval-when-compile (string-to-syntax "|"))))))
168 (unless (nth 3 (syntax-ppss))
169 (eval-when-compile (string-to-syntax "|"))))
180 ;; a `syntax-table' property on the inside of the string or comment which is
181 ;; the standard syntax table."
189 ;; 'syntax-table (standard-syntax-table))
192 ;; 'syntax-table (standard-syntax-table))
196 ;;;; Keymap and syntax
283 (defvar python-mode-syntax-table
284 (let ((table (make-syntax-table)))
285 ;; Give punctuation syntax to ASCII that normally has symbol
286 ;; syntax or has word syntax and isn't a letter.
287 (let ((symbol (string-to-syntax "_"))
288 (sst (standard-syntax-table)))
292 (modify-syntax-entry i "." table)))))
293 (modify-syntax-entry ?$ "." table)
294 (modify-syntax-entry ?% "." table)
296 (modify-syntax-entry ?# "<" table)
297 (modify-syntax-entry ?\n ">" table)
298 (modify-syntax-entry ?' "\"" table)
299 (modify-syntax-entry ?` "$" table)
300 table))
308 (nth 8 (syntax-ppss)))
310 (defconst python-space-backslash-table
311 (let ((table (copy-syntax-table python-mode-syntax-table)))
312 (modify-syntax-entry ?\\ " " table)
313 table)
314 "`python-mode-syntax-table' with backslash given whitespace syntax.")
325 ;; of it. Don't set the syntax table round this bit!
326 (let ((syntax (syntax-ppss)))
327 (if (nth 4 syntax)
328 (goto-char (nth 8 syntax)))
331 (with-syntax-table python-space-backslash-table
337 (not (syntax-ppss-context (syntax-ppss)))))
344 (let ((depth (syntax-ppss-depth
345 (save-excursion ; syntax-ppss with arg changes point
346 (syntax-ppss (line-beginning-position))))))
358 (when (eq 'comment (syntax-ppss-context (syntax-ppss)))
360 (looking-at (rx (or (syntax comment-start) line-end))))))
371 (let ((state (syntax-ppss)))
372 (when (eq 'string (syntax-ppss-context state))
460 (or (syntax comment-start)
495 (let ((syntax (syntax-ppss))
498 ((eq 'string (syntax-ppss-context syntax)) ; multi-line string
505 (looking-at (rx (or (syntax string-delimiter)
506 (syntax string-quote))))))
509 (setq start (nth 8 syntax))
516 (open-start (cadr syntax))
525 (if (with-syntax-table python-space-backslash-table
541 (+ (current-indentation) (* (car syntax) python-indent))))
557 ((looking-at (rx (0+ space) (syntax comment-start)
574 ((and (looking-at (rx (syntax comment-start)
767 (group (1+ (or word (syntax symbol))))))
824 (skip-syntax-forward " >")
855 (defun python-skip-out (&optional forward syntax)
858 If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point.
860 (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss))))
865 (condition-case () ; beware invalid syntax
868 ;; Invalid syntax (too many closed brackets).
886 (while (let ((s (syntax-ppss)))
887 (cond ((eq 'comment (syntax-ppss-context s))
890 ((eq 'string (syntax-ppss-context s))
893 (condition-case () ; beware invalid syntax
1023 ;; fontified. I guess this is really a bug in syntax.el. OTOH,
1212 (defvar inferior-python-mode-syntax-table
1213 (let ((st (make-syntax-table python-mode-syntax-table)))
1216 (modify-syntax-entry ?\' "." st)
1218 ;; (modify-syntax-entry ?\" "." st)
1223 ;; syntax?; font-locking, e.g. for triple-quoted strings?
1554 (defconst python-dotty-syntax-table
1555 (let ((table (make-syntax-table)))
1556 (set-char-table-parent table python-mode-syntax-table)
1557 (modify-syntax-entry ?. "_" table)
1558 table)
1559 "Syntax table giving `.' symbol syntax.
1560 Otherwise inherits from `python-mode-syntax-table'.")
1584 (let ((symbol (with-syntax-table python-dotty-syntax-table
1631 (let ((symbol (with-syntax-table python-dotty-syntax-table
1640 (let ((s (syntax-ppss)))
1645 (skip-syntax-backward "-")
1761 (let* ((syntax (syntax-ppss))
1763 (start (nth 8 syntax))
1765 (cond ((eq t (nth 3 syntax)) ; in fenced string
1766 (goto-char (nth 8 syntax)) ; string start
1846 (group (1+ (or word (syntax symbol))))))
1884 (unless (syntax-ppss-context (syntax-ppss))
1979 (if (not (he-string-member he-search-string he-tried-table))
1980 (push he-search-string he-tried-table))
1984 (he-string-member (car he-expand-list) he-tried-table))
2017 (defvar python-mode-abbrev-table nil
2018 "Abbrev table for Python mode.
2020 (define-abbrev-table 'python-mode-abbrev-table ())
2024 ;; the abbrev table.
2031 (define-abbrev python-mode-abbrev-table ,name "" ',function nil t))
2191 "Set the syntax table before possibly expanding abbrevs."
2193 (set-syntax-table python-mode-syntax-table))
2195 (defvar python-abbrev-syntax-table
2196 (copy-syntax-table python-mode-syntax-table)
2197 "Syntax table used when expanding abbrevs.")
2200 "Reset the syntax table after possibly expanding abbrevs."
2201 (set-syntax-table python-abbrev-syntax-table)
2203 (modify-syntax-entry ?/ "w" python-abbrev-syntax-table)
2238 module/attribute names, not variables. An abbrev table is set up