Emacs Lisp 見た目の変更

http://cmdnote.net/search?q=tag%3Aemacs に移転します。

文字のプロパティ

関数

  • put-text-property
  • get-text-property
  • add-text-properties
  • remove-text-properties
  • set-text-properties

一部をread-onlyにする

(put-text-property (line-beginning-position) (point) 'read-only t)

read-onlyを解除する

(inhibit-read-only t)としないと変更できない。

(let ((inhibit-read-only t))
  (remove-text-properties (line-beginning-position) (line-end-position) '(read-only t))
  ... ))

faceを変える

(add-text-properties (point-min) (point) '(face bold))

Tags of current page

, ,