From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Position of functions in `completion-at-point-functions' Date: Fri, 16 Feb 2024 09:42:37 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24215"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: "emacs-devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 16 09:43:45 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ratov-00065q-4u for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Feb 2024 09:43:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ratnw-0005su-0g; Fri, 16 Feb 2024 03:42:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ratnu-0005sk-FV for emacs-devel@gnu.org; Fri, 16 Feb 2024 03:42:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ratnu-0007hz-7P for emacs-devel@gnu.org; Fri, 16 Feb 2024 03:42:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=xO6hU9HUa0CI8nWhjPzEto8xqOVoYUmlsmpFHs//vdI=; b=aYxSII5YCbyVpp yKs8T5d3dE9DROVdIX1zPdtGpWRTNP/XRG18xDoeaGdLOJpqg95k0FmbubFl3tLCNn2KpggsCsQSj ffMti6RRKKqU4vVc/33nL+egTt70X+iuJogWutBX3wVVMFNORWvbG8eaYPptqis/ZBl8yMLMmCxAV lWxp1VGA9YTrbDFUcG/+u55PMYJIGK2HxXvVzMhiV82Mdw3pGD0JgFBbBlMJ+9H+XI5ymhqjBRxBm K/sNIbROtBgG99JstXCLR42LCwP0TmtQUsL2i3IGN4J1f1CoBU9ukWjvL7k4o7eosmIbZaUtLOLIH lqZCmx6w0In/FXbHO8OQ==; X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316247 Archived-At: 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