Skip to content

sp--syntax-class-to-char: Symbol’s function definition is void: fixnump #1237

@zahardzhan

Description

@zahardzhan

The alias sp--syntax-class-to-char uses the function fixnump, which is available only in Emacs 27 and later.
Consequently, calling backward-kill-word in earlier versions (e.g. Emacs 25) signals:

sp--syntax-class-to-char: Symbol’s function definition is void: fixnump

Providing the missing definition eliminates the error:

(unless (fboundp 'fixnump)
  (defun fixnump (object)
    "Return t if OBJECT is a fixnum."
    (and (integerp object)
         (<= most-negative-fixnum object most-positive-fixnum))))

(unless (fboundp 'defvar-local)
  (defmacro defvar-local (var val &optional docstring)
    "Define VAR as a buffer-local variable with default value VAL.
Like `defvar' but additionally marks the variable as automatically
buffer-local wherever it is set."
    (declare (debug defvar) (doc-string 3))
    ;; Can't use backquote here, it's too early in the bootstrap.
    (list 'progn (list 'defvar var val docstring)
          (list 'make-variable-buffer-local (list 'quote var)))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions