소스 검색

Use advice for my-isortify

master
10sr 4 년 전
부모
커밋
04a1fd8555
로그인 계정: 10sr GPG 키 ID: C384BB17CBB19347
1개의 변경된 파일9개의 추가작업 그리고 7개의 파일을 삭제
  1. +9
    -7
      emacs.el

+ 9
- 7
emacs.el 파일 보기

@@ -1414,19 +1414,21 @@ found, otherwise returns nil."
(when (require 'with-venv nil t)
(with-venv-advice-add 'blacken-buffer)))

;; isortify-buffer breaks buffer when it contains japanese text
;; `isortify-buffer' breaks buffer when it contains japanese text
(defun my-isortify ()
(interactive)
(cl-assert buffer-file-name)
(cl-assert (not (buffer-modified-p)))
(with-venv
(call-process "python" ;; PROGRAM
nil ;; INFILE
nil ;; DESTINATION
nil ;; DISPLAY
"-m" "isort" buffer-file-name))
(call-process "python" ;; PROGRAM
nil ;; INFILE
nil ;; DESTINATION
nil ;; DISPLAY
"-m" "isort" buffer-file-name)
(message "isortify done")
(revert-buffer nil t))
(when (fboundp 'with-venv-advice-add)
;; TODO: Lazy load with-venv
(with-venv-advice-add 'my-isortify))

;; https://github.com/lunaryorn/old-emacs-configuration/blob/master/lisp/flycheck-virtualenv.el
(defun my-set-venv-flycheck-executable-find ()


불러오는 중...
취소
저장