답변:
@King으로 답변에 표시된대로 지정된 버퍼 (buffer-local 변수 사용)에 대해 커서 유형을 설정할 수 있습니다 cursor-type
. (이 답변은 setq-default
모든 버퍼의 기본값을 설정하는 데 사용 됩니다.)
또는 주어진 프레임 에 대해 프레임 매개 변수로 설정할 수 있습니다 cursor-type
.
option에 추가하여 모든 프레임의 기본 커서 유형을 설정할 수 있습니다 default-frame-alist
. 예를 들어 다음 항목을 목록에 추가하십시오 (cursor-type . bar)
.
다음은 현재 프레임의 커서 유형을 설정 하는 명령 (라이브러리 oneonone.el )입니다.
(defun 1on1-set-cursor-type (cursor-type)
"Set the cursor type of the selected frame to CURSOR-TYPE.
When called interactively, prompt for the type to use.
To get the frame's current cursor type, use `frame-parameters'."
(interactive
(list (intern (completing-read
"Cursor type: "
(mapcar 'list '("box" "hollow" "bar" "hbar" nil))))))
(modify-frame-parameters (selected-frame) (list (cons 'cursor-type cursor-type))))
커서 색 은 항상 버퍼 단위가 아니라 프레임 단위입니다.
라이브러리 oneonone.el
에는 버퍼를 읽기 전용과 쓰기 가능 사이 또는 덮어 쓰기 모드와 삽입 모드간에 전환 할 때 커서 유형을 자동으로 변경하거나 Emacs가 유휴 상태 일 때 유형을 상자 커서 (보다 눈에 띄게)로 변경하는 옵션도 있습니다. .