Opened 15 years ago

Last modified 9 years ago

#276 accepted task

Unicode tokens: resolve font-lock issues, optimise

Reported by: David Aspinall Owned by: David Aspinall
Priority: major Milestone: PG-Emacs-4.3
Component: 2:pg-emacs Keywords: emacsbug
Cc:

Description

Unicode tokens interacts closely with font lock but there was a problem with merging property lists for the 'face property that prevented expected behaviour with merged face attributes:

  ;; good, desirable property value for 'face 
   (append '(:slant italic) '(:weight bold font-lock-string-face))
   (:slant italic :weight bold font-lock-string-face)

   ;; bad, value obtained with font-lock-{append/prepend}-property:
   (append '(:slant italic) '((:weight bold font-lock-string-face)))
   (:slant italic (:weight bold font-lock-string-face))

for now there is a local version of font-lock-prepend-text-property with a hack to address this problem. We should discuss with Emacs developers to see how to resolve this properly. (If it is really an Emacs bug we may have to live with the ugly workaround for a while).

Additionally, some of the property mangling code could probably be optimised. The font-lock-keywords are getting quite intensive now for Isabelle!

Change History (4)

comment:1 Changed 13 years ago by David Aspinall

Milestone: PG-Emacs-4.1PG-Emacs-4.2
Status: newaccepted

Another Emacs bug/issue to raise.

comment:2 Changed 13 years ago by David Aspinall

Keywords: emacsbug added

comment:3 Changed 12 years ago by David Aspinall

Milestone: PG-Emacs-4.2PG-Emacs-4.3

comment:4 Changed 9 years ago by coquser

Another approach to this, probably more viable in the long run: Emacs 24.4 includes prettify-symbols-mode, which takes care of most of what we may want in terms of unicode symbols rendering. I'm not sure how it's implemented, but it feels rather snappy on my machine.

I've implemented support for this in company-coq; we could merge it.

-- cpitcla

Note: See TracTickets for help on using tickets.