all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 40502@debbugs.gnu.org
Subject: bug#40502: 28.0.50; Hangul Jamo conjoining characters are not composed
Date: Wed, 08 Apr 2020 14:11:19 +0200	[thread overview]
Message-ID: <m2lfn6rxco.fsf@gmail.com> (raw)
In-Reply-To: <83o8s2p6o1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Apr 2020 14:18:22 +0300")

>>>>> On Wed, 08 Apr 2020 14:18:22 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: 40502-done@debbugs.gnu.org
    >> Date: Wed, 08 Apr 2020 12:11:56 +0200
    >> 
    Eli> The call is incorrect: 'vector' should include both 0 and the function
    Eli> symbol.
    >> 
    >> Yes. I misread the docstring of composition-function-table rather than
    >> copying the correct call I had sitting in a buffer already.

    Eli> Maybe we should improve the doc string?  Which part was confusing?

I donʼt know if itʼs confusing, just that it says:

    The element at index C in the table, if non-nil, is a list of
    composition rules of this form: ([PATTERN PREV-CHARS FUNC] ...)

So I did
   (list (vector [..]

then continued to read the docstring, and by the time I got back to
the code, my brain conflated the brackets from the regexp with the
ones from the vector, so I closed the list, and carried on. So
entirely down to my brain fart. Maybe saying

((vector PATTERN PREV-CHARS FUNC) ...)

would have helped, but itʼs too late to tell now.

Perhaps we should have a macro or defun 'composition-function-add-entry' or
somesuch to hide the details? And ensure that weʼre not overwriting
previous entries. How often do people write these things?

    (defsubst composition-function-add-entry (char-or-range pattern
    prev-chars func &optional replace)
    "Add composition-function-table entry for CHAR-OR-RANGE.

    CHAR-OR-RANGE is a single character or a cons of character codes.
    Adds [PATTERN PREV-CHARS FUNC] to any existing composition-function-table
    entry for CHAR-OR-RANGE.

    Optional arg REPLACE non-nil means replace the existing entry rather
    than adding to it.

    See `composition-function-table' and `auto-composition-mode' for
    more details.

(or does this end up growing 'add-to-front', 'supersede',
'sort-then-insert' etc options? :-) )

Robert





  reply	other threads:[~2020-04-08 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  9:28 bug#40502: 28.0.50; Hangul Jamo conjoining characters are not composed Robert Pluim
2020-04-08  9:55 ` Eli Zaretskii
2020-04-08 10:11   ` Robert Pluim
2020-04-08 11:18     ` Eli Zaretskii
2020-04-08 12:11       ` Robert Pluim [this message]
2020-04-08 13:51         ` Eli Zaretskii
2020-04-08 10:00 ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2lfn6rxco.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=40502@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.