Skip to content

Commit

Permalink
Merge pull request #1206 from juergenhoetzel/fix-invalid-alias-defini…
Browse files Browse the repository at this point in the history
…tion

Fix invalid alias definition for `syntax-class-to-char'
  • Loading branch information
Fuco1 authored Apr 16, 2024
2 parents 77327ee + 8e4130d commit c6cd1c3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions smartparens.el
Original file line number Diff line number Diff line change
Expand Up @@ -1858,12 +1858,13 @@ P is the point at which we run `syntax-ppss'"
(list p (point-min) (point-max))
(sp-state-last-syntax-ppss-result sp-state) (syntax-ppss p)))))

(eval-when-compile
(defalias 'sp--syntax-class-to-char 'syntax-class-to-char)
(when (version< emacs-version "28.1")
;; `syntax-class-to-char' is new in Emacs 28.1.
(defalias 'sp--syntax-class-to-char
(if (fboundp 'syntax-class-to-char)
#'syntax-class-to-char
;; Ripped from Emacs 27.0 subr.el.
;; See Github Issue#946 and Emacs bug#31692.
(defun sp--syntax-class-to-char (syntax)
(lambda (syntax)
"Return the syntax char of CLASS, described by an integer.
For example, if SYNTAX is word constituent (the integer 2), the
character ‘w’ (119) is returned.
Expand Down

0 comments on commit c6cd1c3

Please sign in to comment.