emacs noob here.

I’m rewriting my init.el file from scratch using use-package macro. In my existing init file I use require to configure MELPA package archive.

(require 'package)

(add-to-list 'package-archives '("MELPA" . "http://melpa.org/packages/"))

(package-initialize)

Can I rewrite this using use-package macro?

  • thetemp_@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You can use the `setopt’ macro, which is also new in Emacs 29.1.

    (setopt package-archives
            '(("gnu" . "https://elpa.gnu.org/packages/")
              ("nongnu" . "https://elpa.nongnu.org/nongnu/")
              ("melpa" . "https://melpa.org/packages/")))