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

discuss: when/if keyword #1067

Open
seagle0128 opened this issue Jan 10, 2024 · 1 comment
Open

discuss: when/if keyword #1067

seagle0128 opened this issue Jan 10, 2024 · 1 comment

Comments

@seagle0128
Copy link
Contributor

Think about this snippet

(use-package vertico-posframe
  :when (display-graphic-p))

According to the current design, the snippet will expand to

(progn
  (use-package-ensure-elpa 'vertico-posframe
                           '(t)
                           'nil)
  (when
      (display-graphic-p)))

But, I think it's better expand to below,, so that the package will not be installed in TUI. Does it make sense?

(progn
   (when
      (display-graphic-p)
          (use-package-ensure-elpa 'vertico-posframe
                           '(t)
                           'nil)
    ))
@sjrmanning
Copy link

Yeah this seems like a bug. I think this used to work, but it definitely doesn't now. I use :if (display-graphic-p) a lot but packages are still being loaded in my terminal emacs.

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

2 participants