Skip to content

Commit

Permalink
Merge pull request #20 from trishume/package-fixes
Browse files Browse the repository at this point in the history
Package Config Improvements
  • Loading branch information
syl20bnr committed Oct 20, 2014
2 parents 194484f + c229ecb commit aaf6fef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ bookmarks
.DS_Store
tmp/
/history
.python-environments/
7 changes: 6 additions & 1 deletion core/contribsys.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ keys:
:dir the absolute path to the base directory of the layer.
:ext-dir the absolute path to the directory containing the extensions.
")
(defvar spacemacs-config-disabled-packages '()
"A list of packages that are disabled and will not be loaded.
Users can set this in their .spacemacs file in the event they don't want one of
the default packages.'")
(defvar spacemacs-all-packages #s(hash-table size 200 data ())
"Hash table of all declared packages in all layers where the key is a package
symbol and the value is the layer symbol where to initialize the package. ")
Expand Down Expand Up @@ -88,7 +92,8 @@ extension.
(unless (not (file-exists-p pkg-file))
(load pkg-file)
(dolist (pkg (eval (intern (format "%s-packages" (symbol-name sym)))))
(puthash pkg sym spacemacs-all-packages)))
(unless (member pkg spacemacs-config-disabled-packages)
(puthash pkg sym spacemacs-all-packages))))
;; extensions
(unless (not (file-exists-p ext-file))
(load ext-file)
Expand Down
16 changes: 6 additions & 10 deletions spacemacs/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ inserted in the buffer (if it is not read-only)."

(defun spacemacs/init-ledger-mode ()
(use-package ledger-mode
:mode ("\\.ledger\\'" . ledger-mode)
:mode ("\\.\\(ledger\\|ldg\\)\\'" . ledger-mode)
:init
(progn
(setq ledger-post-amount-alignment-column 62)
Expand Down Expand Up @@ -1376,14 +1376,7 @@ inserted in the buffer (if it is not read-only)."
neo-dont-be-alone t
neo-banner-message "File Tree browser"
neo-smart-open t))
(evil-leader/set-key "ft" 'neotree-toggle)
(defadvice neotree-toggle (around spacemacs/neotree-toggle activate)
(let ((neotree-visible t)
(golden-ratio-enabled (symbol-value golden-ratio-mode)))
(if (and neotree-visible golden-ratio-enabled)
(message "pre-processing"))
(ad-do-it)
(message "post-processing")))))
(evil-leader/set-key "ft" 'neotree-toggle)))

(defun spacemacs/init-org ()
(use-package org
Expand Down Expand Up @@ -1650,7 +1643,10 @@ inserted in the buffer (if it is not read-only)."
(add-to-hooks 'smartparens-mode '(erlang-mode-hook
markdown-mode-hook
prog-mode-hook))
(spacemacs//diminish smartparens-mode " (Ⓢ)"))))
(spacemacs//diminish smartparens-mode " (Ⓢ)"))
:config
(progn
(sp-local-pair 'emacs-lisp-mode "'" nil :actions nil))))

(defun spacemacs/init-smeargle ()
(use-package smeargle
Expand Down

0 comments on commit aaf6fef

Please sign in to comment.