1

According to this question, an alias to a function can be created like so:

(defun some-function () ...)
(setf (fdefinition 'sfunc) #'some-function)

But:

(defun some-function () ...)
(defun (setf some-function) () ...)
(setf (fdefinition 'sfunc) #'some-function)

> (setf (sfunc) ...)
; caught STYLE-WARNING:
;   undefined function: (SETF SFUNC)

The alias is not created for the setf function. How can an alias be created for a setf function?

acelent
  • 7,965
  • 21
  • 39
BnMcGn
  • 1,440
  • 8
  • 22

1 Answers1

5
(setf (fdefinition '(setf sfunc)) (fdefinition '(setf some-function)))
BnMcGn
  • 1,440
  • 8
  • 22