Emacs: Remove python settings.
parent
adef37fd27
commit
06055533bf
|
@ -285,8 +285,6 @@
|
||||||
(add-hook 'pdf-view-mode-hook 'pdf-view-midnight-minor-mode)
|
(add-hook 'pdf-view-mode-hook 'pdf-view-midnight-minor-mode)
|
||||||
(pdf-tools-install t t t))
|
(pdf-tools-install t t t))
|
||||||
|
|
||||||
(with-eval-after-load 'python (require 'init-python))
|
|
||||||
|
|
||||||
(when (require 'rainbow-mode nil t)
|
(when (require 'rainbow-mode nil t)
|
||||||
(dolist (hook '(css-mode-hook html-mode-hook sass-mode-hook))
|
(dolist (hook '(css-mode-hook html-mode-hook sass-mode-hook))
|
||||||
(add-hook hook 'rainbow-mode)))
|
(add-hook hook 'rainbow-mode)))
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
;;; Python
|
|
||||||
|
|
||||||
(defun ambrevar/python-set-compiler ()
|
|
||||||
"Returns the value of the shebang if any, `python-shell-interpreter' otherwise."
|
|
||||||
(when buffer-file-name
|
|
||||||
(let* ((firstline
|
|
||||||
(save-excursion (goto-char (point-min)) (buffer-substring-no-properties (line-beginning-position) (line-end-position))))
|
|
||||||
(interpreter
|
|
||||||
(if (not (string-match "^#!" firstline))
|
|
||||||
python-shell-interpreter
|
|
||||||
(substring firstline 2))))
|
|
||||||
(setq compile-command
|
|
||||||
(concat interpreter " " (shell-quote-argument buffer-file-name))))))
|
|
||||||
|
|
||||||
(add-hook 'python-mode-hook 'ambrevar/python-set-compiler)
|
|
||||||
|
|
||||||
;;; Doc lookup. Requires the python.info file to be installed. See
|
|
||||||
;;; https://bitbucket.org/jonwaltman/pydoc-info/.
|
|
||||||
;; (add-to-list 'load-path "~/path/to/pydoc-info")
|
|
||||||
;; (require 'pydoc-info nil t)
|
|
||||||
|
|
||||||
(provide 'init-python)
|
|
Loading…
Reference in New Issue