Use `cl-gensym' to fix Emacs 25 compatibility (Fixes #24)
`gensym' used to be an alias for `cl-gensym'. It was replaced with a "native" implementation in subr.el with Emacs 26.1. Go back to using `cl-gensym' to make sure Emacs 25 still works.
This commit is contained in:
parent
7bfbd1929d
commit
6739aa327c
1 changed files with 8 additions and 8 deletions
|
@ -192,9 +192,9 @@
|
||||||
`(push (cons ,font-id (intern ,font-name)) (sclang-rtf-state-font-table ,state)))
|
`(push (cons ,font-id (intern ,font-name)) (sclang-rtf-state-font-table ,state)))
|
||||||
|
|
||||||
(defmacro sclang-rtf-state-apply (state)
|
(defmacro sclang-rtf-state-apply (state)
|
||||||
(let ((pos (gensym))
|
(let ((pos (cl-gensym))
|
||||||
(font (gensym))
|
(font (cl-gensym))
|
||||||
(face (gensym)))
|
(face (cl-gensym)))
|
||||||
`(with-current-buffer (sclang-rtf-state-output ,state)
|
`(with-current-buffer (sclang-rtf-state-output ,state)
|
||||||
(let ((,pos (or (sclang-rtf-state-pos ,state) (point-min)))
|
(let ((,pos (or (sclang-rtf-state-pos ,state) (point-min)))
|
||||||
(,font (cdr (assq
|
(,font (cdr (assq
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
(setf (sclang-rtf-state-font ,state) ,font)))
|
(setf (sclang-rtf-state-font ,state) ,font)))
|
||||||
|
|
||||||
(defmacro sclang-rtf-state-push-face (state face)
|
(defmacro sclang-rtf-state-push-face (state face)
|
||||||
(let ((list (gensym)))
|
(let ((list (cl-gensym)))
|
||||||
`(let ((,list (sclang-rtf-state-face state)))
|
`(let ((,list (sclang-rtf-state-face state)))
|
||||||
(sclang-rtf-state-apply ,state)
|
(sclang-rtf-state-apply ,state)
|
||||||
(unless (memq ,face ,list)
|
(unless (memq ,face ,list)
|
||||||
|
@ -224,7 +224,7 @@
|
||||||
(append ,list (list ,face)))))))
|
(append ,list (list ,face)))))))
|
||||||
|
|
||||||
(defmacro sclang-rtf-state-pop-face (state face)
|
(defmacro sclang-rtf-state-pop-face (state face)
|
||||||
(let ((list (gensym)))
|
(let ((list (cl-gensym)))
|
||||||
`(let* ((,list (sclang-rtf-state-face ,state)))
|
`(let* ((,list (sclang-rtf-state-face ,state)))
|
||||||
(sclang-rtf-state-apply ,state)
|
(sclang-rtf-state-apply ,state)
|
||||||
(setf (sclang-rtf-state-face ,state) (delq ,face ,list)))))
|
(setf (sclang-rtf-state-face ,state) (delq ,face ,list)))))
|
||||||
|
@ -326,9 +326,9 @@
|
||||||
(define-key map "\C-c\C-v" 'sclang-edit-help-file))
|
(define-key map "\C-c\C-v" 'sclang-edit-help-file))
|
||||||
|
|
||||||
(defmacro sclang-help-mode-limit-point-to-code (&rest body)
|
(defmacro sclang-help-mode-limit-point-to-code (&rest body)
|
||||||
(let ((min (gensym))
|
(let ((min (cl-gensym))
|
||||||
(max (gensym))
|
(max (cl-gensym))
|
||||||
(res (gensym)))
|
(res (cl-gensym)))
|
||||||
`(if (and (sclang-code-p (point))
|
`(if (and (sclang-code-p (point))
|
||||||
(not (or (bobp) (eobp)))
|
(not (or (bobp) (eobp)))
|
||||||
(sclang-code-p (1- (point)))
|
(sclang-code-p (1- (point)))
|
||||||
|
|
Loading…
Reference in a new issue