0
파일 관리자에서 Emacs로 문서를 열려면 파일을 마우스 오른쪽 버튼으로 클릭 할 때 다음 함수 (Replace one space by two after sentences in Emacs)를 시작하고 싶습니다.이맥스에서 시작할 때 함수를 실행하는 방법
(defun space12()
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\\. \\([^ ]\\)" nil t)
(replace-match ". \\1" t))))
이 기존의 두 공간을 발생 공간을 증가시키지 않고 ". "
에 ". "
변환한다.
어떻게 수행 할 수 있습니까? 나는 init.el에 (space12)를 추가 할 생각을했지만 문서가로드되기 전에로드 된 것으로 보인다.
샘플 입력 :
This is for test. This is second line with only one space at start. This is third line which already has 2 spaces before it. End of document.
특정 파일 유형입니까? 아마도 적절한 메이저 모드에 후크를 추가 할 것입니다. – Chris