emacs-lisp: refactor autoloads

This commit is contained in:
Henrik Lissner 2017-02-03 19:22:18 -05:00
parent 22fdf9e2ab
commit b7fb8caa24

View file

@ -2,22 +2,29 @@
;; ---- emacs-lisp --------------------------------------------------- ;; ---- emacs-lisp ---------------------------------------------------
;;;###autoload (autoload 'doom:byte-compile "lang/emacs-lisp/autoload" nil t) ;;;###autoload (autoload '+emacs-lisp:byte-compile "lang/emacs-lisp/autoload" nil t)
(evil-define-command +emacs-lisp:byte-compile (&optional bang) (evil-define-command +emacs-lisp:byte-compile (&optional bang)
"Byte compile the current file, or if BANG, the entire emacs configuration."
(interactive "<!>") (interactive "<!>")
(if bang (doom-byte-compile) (byte-compile-file buffer-file-name))) (if bang (doom-byte-compile) (byte-compile-file buffer-file-name)))
;;;###autoload ;;;###autoload
(defun +emacs-lisp/find-function-at-pt () (defun +emacs-lisp/find-function ()
"Jump to the definition of the function at point."
(interactive) (interactive)
(let ((func (function-called-at-point))) (let ((func (function-called-at-point)))
(if func (find-function func)))) (if func (find-function func))))
;;;###autoload ;;;###autoload
(defun +emacs-lisp/find-function-at-pt-other-window () (defun +emacs-lisp/find-function-other-window ()
"Jump to the definition of the function at point in a popup window."
(interactive) (interactive)
(let ((func (function-called-at-point))) (let ((fn (function-called-at-point)))
(if func (find-function-other-window func)))) (when fn
(find-function-do-it
fn nil
(lambda (buffer)
(select-window (doom-popup-buffer buffer :size 30)))))))
;;;###autoload ;;;###autoload
(defun +emacs-lisp/repl () (defun +emacs-lisp/repl ()