diff options
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 621aec8d571..bb13298d6fe 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2221,12 +2221,20 @@ from `standard-syntax-table' otherwise." | |||
| 2221 | table)) | 2221 | table)) |
| 2222 | 2222 | ||
| 2223 | (defun syntax-after (pos) | 2223 | (defun syntax-after (pos) |
| 2224 | "Return the syntax of the char after POS." | 2224 | "Return the syntax of the char after POS. |
| 2225 | The value is either a syntax class character (a character that designates | ||
| 2226 | a syntax in `modify-syntax-entry'), or a cons cell | ||
| 2227 | of the form (CLASS . MATCH), where CLASS is the syntax class character | ||
| 2228 | and MATCH is the matching parenthesis." | ||
| 2225 | (unless (or (< pos (point-min)) (>= pos (point-max))) | 2229 | (unless (or (< pos (point-min)) (>= pos (point-max))) |
| 2226 | (let ((st (if parse-sexp-lookup-properties | 2230 | (let* ((st (if parse-sexp-lookup-properties |
| 2227 | (get-char-property pos 'syntax-table)))) | 2231 | (get-char-property pos 'syntax-table))) |
| 2228 | (if (consp st) st | 2232 | (value |
| 2229 | (aref (or st (syntax-table)) (char-after pos)))))) | 2233 | (if (consp st) st |
| 2234 | (aref (or st (syntax-table)) (char-after pos)))) | ||
| 2235 | (code (if (consp value) (car value) value))) | ||
| 2236 | (setq code (aref "-.w_()'\"$\\/<>@!|" code)) | ||
| 2237 | (if (consp value) (cons code (cdr value)) code)))) | ||
| 2230 | 2238 | ||
| 2231 | (defun add-to-invisibility-spec (arg) | 2239 | (defun add-to-invisibility-spec (arg) |
| 2232 | "Add elements to `buffer-invisibility-spec'. | 2240 | "Add elements to `buffer-invisibility-spec'. |