I like the idea... Here is another alternative:
(font-lock-add-keywords
'org-mode `(("\\[X\\]"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
"☑")
nil)))
("\\[ \\]"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
"☐")
nil)))))
-- Jon Miller
2012/2/11 Jambunathan K <[email protected]>:
> Jambunathan K <[email protected]> writes:
>
>> [email protected] (François Pinard) writes:
>>
>>> I notice in org.el that [X] is hard-wired, while I would have liked the
>>> possibility of changing it by [✓] in my things, which I find both softer
>>> and cleaner.
>>
>> How about a variation of this
>>
>> #+begin_src emacs-lisp
>> (font-lock-add-keywords
>> 'org-mode `(("\\[X\\]"
>> (0 (progn (compose-region (match-beginning 0) (match-end 0)
>> "")
>> nil)))))
>> #+end_src
>>
>> along the lines of http://www.emacswiki.org/emacs/PrettyLambda
>
> Btw, C-h f org-toggle-pretty-entities does composition and decomposition.
> --
>