General cleanup & minor refactoring

This commit is contained in:
Henrik Lissner 2018-12-22 04:01:17 -05:00
parent 3dd34abe61
commit d6cb0ec5f5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 12 additions and 10 deletions

View file

@ -35,7 +35,8 @@
;; Curse Lion and its sudden but inevitable fullscreen mode! ;; Curse Lion and its sudden but inevitable fullscreen mode!
;; NOTE Meaningless to railwaycat's emacs-mac build ;; NOTE Meaningless to railwaycat's emacs-mac build
ns-use-native-fullscreen nil ns-use-native-fullscreen nil
;; Don't open files from the workspace in a new frame ;; Visit files opened outside of Emacs in existing frame, rather
;; than a new one
ns-pop-up-frames nil) ns-pop-up-frames nil)
;; Fix the clipboard in terminal or daemon Emacs (non-GUI) ;; Fix the clipboard in terminal or daemon Emacs (non-GUI)

View file

@ -47,7 +47,7 @@
(when (and (not (file-exists-p parent-directory)) (when (and (not (file-exists-p parent-directory))
(y-or-n-p (format "Directory `%s' does not exist! Create it?" parent-directory))) (y-or-n-p (format "Directory `%s' does not exist! Create it?" parent-directory)))
(make-directory parent-directory t)))) (make-directory parent-directory t))))
(push #'+dired|create-non-existent-directory find-file-not-found-functions) (add-to-list 'find-file-not-found-functions '+dired|create-non-existent-directory nil #'eq)
;; Kill buffer when quitting dired buffers ;; Kill buffer when quitting dired buffers
(define-key dired-mode-map [remap quit-window] (λ! (quit-window t)))) (define-key dired-mode-map [remap quit-window] (λ! (quit-window t))))

View file

@ -3,7 +3,8 @@
(def-package! elixir-mode (def-package! elixir-mode
:defer t :defer t
:init :init
;; disable default smartparens config ;; Disable default smartparens config; there are too many, they're intrusive
;; and we only want a subset of them (defined below).
(provide 'smartparens-elixir) (provide 'smartparens-elixir)
:config :config
;; ...and only complete the basics ;; ...and only complete the basics
@ -15,6 +16,7 @@
:post-handlers '("||\n[i]")) :post-handlers '("||\n[i]"))
(sp-local-pair "do " " end" :unless '(sp-in-comment-p sp-in-string-p)) (sp-local-pair "do " " end" :unless '(sp-in-comment-p sp-in-string-p))
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p)))) (sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p))))
(set-pretty-symbols! 'elixir-mode (set-pretty-symbols! 'elixir-mode
;; Functional ;; Functional
:def "def" :def "def"

View file

@ -12,4 +12,3 @@
"Opens a Haskell REPL." "Opens a Haskell REPL."
(interactive "P") (interactive "P")
(display-buffer (+haskell-repl-buffer arg))) (display-buffer (+haskell-repl-buffer arg)))

View file

@ -77,7 +77,7 @@ If no viewers are found, `latex-preview-pane' is used.")
"\\Bigl\\{" "\\Biggl\\{" "\\Bigl\\{" "\\Biggl\\{"
"\\lfloor" "\\lceil" "\\langle" "\\lfloor" "\\lceil" "\\langle"
"\\lVert" "\\lvert" "`")) "\\lVert" "\\lvert" "`"))
(sp-local-pair modes open nil :actions nil)) (sp-local-pair modes open nil :actions :rem))
(sp-local-pair modes "``" nil :unless '(:add sp-in-math-p))))) (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))))

View file

@ -44,7 +44,7 @@ the first function to return non-nil.")
t)) t))
(advice-add #'org-babel-confirm-evaluate :after-while #'+org*babel-lazy-load-library) (advice-add #'org-babel-confirm-evaluate :after-while #'+org*babel-lazy-load-library)
;; I prefer C-c C-c over C-c ' ;; I prefer C-c C-c over C-c ' (more consistent)
(define-key org-src-mode-map (kbd "C-c C-c") #'org-edit-src-exit) (define-key org-src-mode-map (kbd "C-c C-c") #'org-edit-src-exit)
;; `org-babel-get-header' was removed from org in 9.0. Quite a few babel ;; `org-babel-get-header' was removed from org in 9.0. Quite a few babel
@ -69,7 +69,7 @@ the first function to return non-nil.")
(setq ob-ipython-resources-dir ".ob-ipython-resrc") (setq ob-ipython-resources-dir ".ob-ipython-resrc")
(defun +org|babel-load-ipython (lang) (defun +org|babel-load-ipython (lang)
(and (string-match-p "^jupyter-" (symbol-name lang)) (and (string-prefix-p "jupyter-" (symbol-name lang))
(require 'ob-ipython nil t))) (require 'ob-ipython nil t)))
(add-hook '+org-babel-load-functions #'+org|babel-load-ipython) (add-hook '+org-babel-load-functions #'+org|babel-load-ipython)
:config :config

View file

@ -45,7 +45,7 @@
(add-hook 'sh-mode-hook #'rainbow-delimiters-mode) (add-hook 'sh-mode-hook #'rainbow-delimiters-mode)
;; autoclose backticks ;; autoclose backticks
(sp-local-pair 'sh-mode "`" nil :unless '(sp-point-before-word-p sp-point-before-same-p)) (sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p))
;; sh-mode has file extensions checks for other shells, but not zsh, so... ;; sh-mode has file extensions checks for other shells, but not zsh, so...
(defun +sh|detect-zsh () (defun +sh|detect-zsh ()