Function: package-autosuggest-mode

package-autosuggest-mode is an autoloaded, interactive and byte-compiled function defined in package-activate.el.gz.

Signature

(package-autosuggest-mode &optional ARG)

Documentation

Enable automatic suggestions for installing add-on packages.

When this minor mode is turned on, Emacs will suggest installing add-on packages from ELPA whenever it determines that the buffer's contents and editing could benefit from a better major mode.

See the variable package-autosuggest-style for controlling the style of showing these suggestions. Customize the variable package-autosuggest-once to control repetitive suggestions.

This is a global minor mode. If called interactively, toggle the Package-Autosuggest mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate (default-value \=package-autosuggest-mode)'.

The mode's hook is called both when the mode is enabled and when it is disabled.

View in manual

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package-activate.el.gz
;;;###autoload
(define-minor-mode package-autosuggest-mode
  "Enable automatic suggestions for installing add-on packages.
When this minor mode is turned on, Emacs will suggest installing
add-on packages from ELPA whenever it determines that the buffer's
contents and editing could benefit from a better major mode.

See the variable `package-autosuggest-style' for controlling the style
of showing these suggestions.
Customize the variable `package-autosuggest-once' to control repetitive
suggestions."
  :global t :group 'package
  ;; :initialize #'custom-initialize-delay
  (funcall (if package-autosuggest-mode #'add-hook #'remove-hook)
           'after-change-major-mode-hook
           #'package--autosuggest-after-change-mode))