Function: use-package-as-mode

use-package-as-mode is a byte-compiled function defined in use-package-core.el.gz.

Signature

(use-package-as-mode STRING-OR-SYMBOL)

Documentation

If STRING-OR-SYMBOL ends in -mode (or its name does), return it as a symbol. Otherwise, return it as a symbol with -mode appended.

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defun use-package-as-mode (string-or-symbol)
  "If STRING-OR-SYMBOL ends in `-mode' (or its name does), return
it as a symbol.  Otherwise, return it as a symbol with `-mode'
appended."
  (let ((string (use-package-as-string string-or-symbol)))
    (intern (if (string-match "-mode\\'" string)
                string
              (concat string "-mode")))))