Minor tweaks & byte-compiler offerings

This commit is contained in:
Henrik Lissner 2019-05-15 20:53:11 -04:00
parent c612ba58a9
commit 40d2d4d222
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 16 additions and 6 deletions

View file

@ -440,11 +440,12 @@ If prefix arg is present, refresh the cache."
(cl-destructuring-bind (file line _match) (cl-destructuring-bind (file line _match)
,(split-string location ":") ,(split-string location ":")
(find-file (expand-file-name file doom-emacs-dir)) (find-file (expand-file-name file doom-emacs-dir))
(goto-line (string-to-number line)) (goto-char (point-min))
(forward-line (1- line))
(recenter))))))))) (recenter)))))))))
;;;###autoload ;;;###autoload
(defun doom/help-package-config (package &optional arg) (defun doom/help-package-config (package)
"Jump to any `def-package!', `after!' or ;;;###package block for PACKAGE. "Jump to any `def-package!', `after!' or ;;;###package block for PACKAGE.
This only searches `doom-emacs-dir' (typically ~/.emacs.d) and does not include This only searches `doom-emacs-dir' (typically ~/.emacs.d) and does not include
@ -475,5 +476,6 @@ config blocks in your private config."
(user-error "This package isn't configured by you or Doom"))) (user-error "This package isn't configured by you or Doom")))
":") ":")
(find-file (expand-file-name file doom-emacs-dir)) (find-file (expand-file-name file doom-emacs-dir))
(goto-line (string-to-number line)) (goto-char (point-min))
(forward-line (1- line))
(recenter))) (recenter)))

View file

@ -73,7 +73,8 @@ following:
;;;###autoload ;;;###autoload
(defun doom|persist-scratch-buffers () (defun doom|persist-scratch-buffers ()
"Save all scratch buffers to `doom-scratch-dir'." "Save all scratch buffers to `doom-scratch-dir'."
(dolist (buffer (cl-delete-if-not #'buffer-live-p doom-scratch-buffers)) (setq doom-scratch-buffers (cl-delete-if-not #'buffer-live-p doom-scratch-buffers))
(dolist (buffer doom-scratch-buffers)
(with-current-buffer buffer (with-current-buffer buffer
(doom|persist-scratch-buffer)))) (doom|persist-scratch-buffer))))

View file

@ -291,6 +291,7 @@ savehist file."
;; `helpful' --- a better *help* buffer ;; `helpful' --- a better *help* buffer
(def-package! helpful (def-package! helpful
;; a better *help* buffer
:commands helpful--read-symbol :commands helpful--read-symbol
:init :init
(define-key! (define-key!

View file

@ -171,7 +171,7 @@ Doom was setup, which may cause problems.")
jka-compr-verbose doom-debug-mode ; silence compression messages jka-compr-verbose doom-debug-mode ; silence compression messages
ffap-machine-p-known 'reject ; don't ping things that look like domain names ffap-machine-p-known 'reject ; don't ping things that look like domain names
find-file-visit-truename t ; resolve symlinks when opening files find-file-visit-truename t ; resolve symlinks when opening files
idle-update-delay 2 ; update ui slightly less often idle-update-delay 1 ; update ui slightly less often
;; be quiet at startup; don't load or display anything unnecessary ;; be quiet at startup; don't load or display anything unnecessary
inhibit-startup-message t inhibit-startup-message t
inhibit-startup-echo-area-message user-login-name inhibit-startup-echo-area-message user-login-name

View file

@ -2,7 +2,13 @@
;;;###autodef ;;;###autodef
(defun set-eshell-alias! (&rest aliases) (defun set-eshell-alias! (&rest aliases)
"Define aliases for eshell." "Define aliases for eshell.
ALIASES is a flat list of alias -> command pairs. e.g.
(set-eshell-alias!
\"hi\" \"echo hello world\"
\"bye\" \"echo goodbye world\")"
(or (cl-evenp (length aliases)) (or (cl-evenp (length aliases))
(signal 'wrong-number-of-arguments (list 'even (length aliases)))) (signal 'wrong-number-of-arguments (list 'even (length aliases))))
(after! eshell (after! eshell