diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-11-22 06:00:51 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-11-22 06:00:51 +0000 |
commit | d8ac3d271c6ff4377b597006753df7dc074d1b55 (patch) | |
tree | 192990e5db8b5c93521ab1a6fd74edd9527b1507 /lisp/subr.el | |
parent | abe0aa3e2a84edd77b72dac37f9ffae9901a7ae8 (diff) | |
download | emacs-d8ac3d271c6ff4377b597006753df7dc074d1b55.tar.gz |
(syntax-after): Undo last change.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index c8dfedbd8c6..b40c64c63eb 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2227,20 +2227,12 @@ from `standard-syntax-table' otherwise." table)) (defun syntax-after (pos) - "Return the syntax of the char after POS. -The value is either a syntax class character (a character that designates -a syntax in `modify-syntax-entry'), or a cons cell -of the form (CLASS . MATCH), where CLASS is the syntax class character -and MATCH is the matching parenthesis." + "Return the raw syntax of the char after POS." (unless (or (< pos (point-min)) (>= pos (point-max))) - (let* ((st (if parse-sexp-lookup-properties - (get-char-property pos 'syntax-table))) - (value - (if (consp st) st - (aref (or st (syntax-table)) (char-after pos)))) - (code (if (consp value) (car value) value))) - (setq code (aref "-.w_()'\"$\\/<>@!|" code)) - (if (consp value) (cons code (cdr value)) code)))) + (let ((st (if parse-sexp-lookup-properties + (get-char-property pos 'syntax-table)))) + (if (consp st) st + (aref (or st (syntax-table)) (char-after pos)))))) (defun add-to-invisibility-spec (arg) "Add elements to `buffer-invisibility-spec'. |