emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20613: closed (Font locking is poorly documented)


From: GNU bug Tracking System
Subject: bug#20613: closed (Font locking is poorly documented)
Date: Thu, 16 Apr 2020 04:14:01 +0000

Your message dated Thu, 16 Apr 2020 06:13:22 +0200
with message-id <address@hidden>
and subject line Re: bug#20613: Font locking is poorly documented
has caused the debbugs.gnu.org bug report #20613,
regarding Font locking is poorly documented
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
20613: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20613
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Font locking is poorly documented Date: Tue, 19 May 2015 15:42:05 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 I was recently urged to use font locking to support a feature in Emacs, and I must say that I am still confused about how it works even after reading the Elisp manual several times. The manual has a lot of low-level discussion of mechanism, but it doesn't explain policy and since crucial features seem to be undocumented, I'm at a loss as to how to use it, or how to debug it when it's not working. I finally gave up and used Google and found cookbook stuff, but I have no idea how or why it works as well as it does, or why it fails when it does. For example:

http://www.emacswiki.org/emacs/PrettyLambda

gives this example:

(defun  pretty-lambdas  ()
  (font-lock-add-keywords
   nil `(("(\\(lambda\\>\\)"
          (0 (progn  (compose-region (match-beginning 1) (match-end 1)
                                    ,(make-char 'greek-iso8859-7 107))
                    nil))))))

but I can't find documentation explaining why a progn is needed, or why it must return niil, or why one must use compose-region, or why one must use it with a single λ rather than just having a λ character there.

One small suggestion: add a section explaining how the above example works.



--- End Message ---
--- Begin Message --- Subject: Re: bug#20613: Font locking is poorly documented Date: Thu, 16 Apr 2020 06:13:22 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Lars Ingebrigtsen <address@hidden> writes:

> I started futzing around with font locking recently (I've never looked
> at it before), and the manual seemed to explain things pretty well
> (although it didn't explain how to test stuff, which is why I added the
> `font-lock-debug-fontify' command).
>
> So is there anything else here that needs to be done, or can this bug
> report be closed?

Since there have been no more comments within 21 weeks, I'm going to
assume that the answer is yes.  I'm consequently closing this bug now.

If my assumption is incorrect and this is still an issue, please
reopen the bug report.

Best regards,
Stefan Kangas


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]