1

I'm using prettify-symbols-mode with this basic setting:

(setq prettify-symbols-alist
      '(("lambda" . ?λ)))

When I'm before the lambda, and e.g. the point is 50, and I press C-f, the point will increase by 6 to 56.

However, in the same situation (call-interactively 'forward-char) will advance the point only by 1. What am I missing here? I'd like (call-interactively 'forward-char) to advance the point by 6.

  • The question is incomplete because you don't say how you execute (call-interactively 'forward-char). E.g. if I try it with M-: it does advance by 6 chars. – Stefan May 11 '15 at 13:27
2

I think the answer is simple: forward-char always only advances by 1 char. It's the top-level read-eval-loop which then advances an extra 5 chars to move point away from the inside of the composed text.

  • Is there an easy way to add an overlay on top of a composed char? If I add an overlay over "l" from "lambda", "λ" becomes decomposed. – abo-abo May 11 '15 at 13:49
  • I find it surprising that just adding an overlay would do that. But of course, if your overlay has properties that affect display (such as face, or display), then indeed it may break the composition. – Stefan May 11 '15 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.