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 ---------------------------------------------------
;;;###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)
"Byte compile the current file, or if BANG, the entire emacs configuration."
(interactive "<!>")
(if bang (doom-byte-compile) (byte-compile-file buffer-file-name)))
;;;###autoload
(defun +emacs-lisp/find-function-at-pt ()
(defun +emacs-lisp/find-function ()
"Jump to the definition of the function at point."
(interactive)
(let ((func (function-called-at-point)))
(if func (find-function func))))
;;;###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)
(let ((func (function-called-at-point)))
(if func (find-function-other-window func))))
(let ((fn (function-called-at-point)))
(when fn
(find-function-do-it
fn nil
(lambda (buffer)
(select-window (doom-popup-buffer buffer :size 30)))))))
;;;###autoload
(defun +emacs-lisp/repl ()