Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra parameter for define-obsolete-function-alias #15

Open
Ergus opened this issue Jan 5, 2021 · 3 comments
Open

Extra parameter for define-obsolete-function-alias #15

Ergus opened this issue Jan 5, 2021 · 3 comments

Comments

@Ergus
Copy link

Ergus commented Jan 5, 2021

Hi:

Recent changes in define-obsolete-function-alias requires an extra parameter to indicate the obsoletion time.

image

@VanLaser
Copy link

VanLaser commented Jan 23, 2021

Indeed, for now I use this incantation, but it's inelegant so hopefully temporary
(there's a pull already, since it's a simple change hopefully it gets merged soon):

(cl-letf (((symbol-function 'define-obsolete-function-alias) #'defalias))
  (use-package benchmark-init
    :config
    (require 'benchmark-init-modes)                                     ; explicitly required
    (add-hook 'after-init-hook #'benchmark-init/deactivate)))

@tshu-w
Copy link

tshu-w commented Jan 23, 2021

Or try this advice from @yangsheng6810

(define-advice define-obsolete-function-alias (:filter-args (ll) fix-obsolete)
  (let ((obsolete-name (pop ll))
        (current-name (pop ll))
        (when (if ll (pop ll) "1"))
        (docstring (if ll (pop ll) nil)))
    (list obsolete-name current-name when docstring)))

kaushalmodi added a commit to kaushalmodi/.emacs.d that referenced this issue Jun 4, 2021
yuravg pushed a commit to yuravg/.emacs.d that referenced this issue Jun 9, 2021
yuravg pushed a commit to yuravg/.emacs.d that referenced this issue Jun 9, 2021
@chaosemer
Copy link
Contributor

I believe this is fixed by #16, which was merged a while ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants