diff options
author | Vincent Ambo <tazjin@gmail.com> | 2017-11-12T21·41+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2017-11-12T21·44+0100 |
commit | 0511e7eb970e99f3c889aac323ff5ae2a550232e (patch) | |
tree | e08e8efe9c72986e05435dc9a34d63c1d9f5bbe5 | |
parent | 0d5bdbd7ceceaa48d2caa8129f78a499d8bc68c1 (diff) |
fix: Fix warnings & errors detected by elisp compiler
Minor things that came up when byte-compiling the configuration.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | init.el | 3 | ||||
-rw-r--r-- | init/functions.el | 14 | ||||
-rw-r--r-- | init/rust-setup.el | 1 |
4 files changed, 8 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore index 0f9b0bae467f..7b666905f847 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ local.el other/ scripts/ themes/ +*.elc diff --git a/init.el b/init.el index 4f26322adf08..c1dd7fc51022 100644 --- a/init.el +++ b/init.el @@ -13,7 +13,7 @@ (package-initialize) ;; This variable controls all packages that should be installed. -(setq-local desired-packages +(defvar desired-packages '(;; elisp libraries dash dash-functional @@ -25,6 +25,7 @@ ag browse-kill-ring cargo + company confluence dash dockerfile-mode diff --git a/init/functions.el b/init/functions.el index af8ab51b45ff..c47e64d348e5 100644 --- a/init/functions.el +++ b/init/functions.el @@ -1,3 +1,4 @@ +(require 's) ;; A few handy functions I use in init.el (or not, but they're nice to ;; have) @@ -22,11 +23,11 @@ (defun custom-download-script (url filename) "Downloads an Elisp script, places it in ~/.emacs/other and then loads it" - + ;; Ensure the directory exists (unless (file-exists-p "~/.emacs.d/other") (make-directory "~/.emacs.d/other")) - + ;; Download file if it doesn't exist. (let ((file (concat "~/.emacs.d/other/" filename))) @@ -99,13 +100,6 @@ Including indent-buffer, which should not be called automatically on save." (find-file (concat "/sudo:root@localhost:" (read-file-name "File: "))) (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) -;; Evaluate sexp and replace it with result -(defun replace-last-sexp () - (interactive) - (let ((value (eval (preceding-sexp)))) - (kill-sexp -1) - (insert (format "%S" value)))) - ;; Open Fefes blog (defun fefes-blog () (interactive) @@ -125,6 +119,6 @@ Including indent-buffer, which should not be called automatically on save." (defun insert-nix-store-path () (interactive) (let ((derivation (read-string "Derivation name (in <nixos>): "))) - (insert-string (nix-store-path derivation)))) + (insert (nix-store-path derivation)))) (provide 'functions) diff --git a/init/rust-setup.el b/init/rust-setup.el index 8eab1d9bdc9f..b1a568152778 100644 --- a/init/rust-setup.el +++ b/init/rust-setup.el @@ -1,3 +1,4 @@ +(require 'company) (require 'rust-mode) ;; Enable cargo-related (C-c C-c C-...) commands. |