From: Arash Esbati <arash@gnu.org>
To: "emacs-devel" <emacs-devel@gnu.org>
Subject: Position of functions in `completion-at-point-functions'
Date: Fri, 16 Feb 2024 09:42:37 +0100 [thread overview]
Message-ID: <m2y1bkztoi.fsf@macmutant.fritz.box> (raw)
Hi all,
Emacs 30.0.50 has this in text-mode.el (line 155; line break added for
better legibility):
(when (eq text-mode-ispell-word-completion 'completion-at-point)
(add-hook 'completion-at-point-functions
#'ispell-completion-at-point 10 t))
With the latest AUCTeX, the new LaTeX-mode now derives from text-mode
and the value of `completion-at-point-functions' becomes this in a .tex
file:
(TeX--completion-at-point t ispell-completion-at-point
LaTeX--arguments-completion-at-point)
The problem is that `ispell-completion-at-point' kicks in also when
point is inside a macro argument and one actually expects key=val
completion for instance, so I want
`LaTeX--arguments-completion-at-point' before
`ispell-completion-at-point' in that list. AUCTeX requires Emacs 27
now, and I can fix this by changing this addition in latex.el from:
(add-hook 'completion-at-point-functions
#'LaTeX--arguments-completion-at-point t t)
to something like:
(add-hook 'completion-at-point-functions
#'LaTeX--arguments-completion-at-point 5 t)
Before making this change to 5 (which is an arbitrary choice): Is there
any kind of range convention where major/minor modes should put their
completion functions? Any pointer is appreciated.
Best, Arash
next reply other threads:[~2024-02-16 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 8:42 Arash Esbati [this message]
2024-02-19 16:10 ` Position of functions in `completion-at-point-functions' Eshel Yaron
2024-02-20 7:35 ` Juri Linkov
2024-02-20 11:38 ` Arash Esbati
2024-02-20 11:52 ` Arash Esbati
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=m2y1bkztoi.fsf@macmutant.fritz.box \
--to=arash@gnu.org \
--cc=emacs-devel@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.